Commit Graph

77 Commits

Author SHA1 Message Date
Dhravya Shah 22b65a2fd8 feat: entity context asks for human-memorable memories, skips git-tracked state
Extraction was memorizing transient working-tree snapshots
("uncommitted changes to X, ready to be committed to PR #N") — state
git already tracks and no teammate would remember. The entity context
now leads with "try to remember things that a human would remember"
and explicitly skips uncommitted file lists, branch position, and
in-flight commit/push status.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 20:29:56 -07:00
Dhravya Shah 38f8ab265d fix: mid-luminance brand tint so the ◪ reads on dark and light terminals
#3B35F3 measured 2.4:1 against a dark background — below the 3:1
legibility floor. rgb(124,120,250) measures 4.7:1 on dark and 3.5:1 on
light; shimmer tiers re-derived from the new base.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 20:00:42 -07:00
Dhravya Shah 7c2eb06613 feat: recall dedup across the session; brand-colored banners
Injected memories are hashed into a per-session recalled.json (pruned
with statusline state, capped at 500) so a memory already in context is
never re-injected — the banner reports only fresh hits, with repeats as
a gray '… already in context' tail. Banners share lib/colors.js: brand
blue for the ◪ mark, red for recall failures.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 19:49:37 -07:00
Dhravya Shah f76ec6757f fix: readStdin resolves on complete JSON instead of waiting for stream end
Fixes #25: on Windows the stdin 'end' event never fires for hook
subprocesses, hanging every hook for its full timeout. readStdin now
parses incrementally and resolves as soon as the payload is complete
JSON, with a 3s fallback timer — the same pattern the statusline
renderer already used. Also drops dead formatRelativeTime code.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 19:15:47 -07:00
Dhravya Shah a0f5d5bc49 feat: recall reads chunk/document hits, not just memories
Search results are memory-shaped (.memory) or document/chunk-shaped
(.chunk/.content/.text with a filepath); recall now injects both,
annotating chunks with their filepath.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 19:13:26 -07:00
Dhravya Shah 74d0ed0fe4 feat: recall on every substantive prompt, done by the hook itself
The recall directive was advisory — the model had to choose to spend a
tool call, so mid-session recall almost never happened. The
UserPromptSubmit hook now searches supermemory with the prompt itself
(4s timeout, skips short prompts and /, !, # inputs) and injects the
top matches directly, with a visible '◪ recalled N memories' notice
and statusline search state. A configured recallDirective restores
advisory mode.

Also fixes recall-approve missing the claude.ai connector namespace
(mcp__claude_ai_supermemory__*), which silently dropped the recall
notice and statusline count when the model did search.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 19:12:06 -07:00
Dhravya Shah 1e6e887173 chore: align version to 0.1.3 everywhere; statusline tip includes refreshInterval
latest.json (update-check) and package.json were stuck at 0.0.16 while
plugin.json moved on. The one-time statusline tip now gives the full
settings snippet including refreshInterval, without which the animation
freezes between renders while idle.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 19:02:26 -07:00
Dhravya Shah 26b6e0eb7f chore: bump to 0.1.3
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 19:00:25 -07:00
Dhravya Shah dbce2bf88c feat: statusline rotates live content panes, not just paint
The resting line cycles every 4s between the tally, "saved Ns ago",
and "recalled Nm ago" — the ages tick upward each render, so the
words change, not only the shimmer.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 18:59:31 -07:00
Dhravya Shah cbda62406b feat: statusline animation engine
Frames are pure functions of (state, now), rendered by Claude Code's
statusLine.refreshInterval timer (1s idle floor; ~300ms during
activity) — no persistent process. A shimmer crest sweeps the brand
word (3-letter stride), saving gets a braille spinner (3-step stride),
and the tally rotates emphasis every 2s. Strides are coprime with
their cycle lengths so every pose is visited, and no frame repeats
within a 10s window (tested). Render cost is ~0.5µs per frame.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 18:49:11 -07:00
Dhravya Shah 77e3bd0257 fix: context-gatherer resolves supermemory tools under any MCP namespace
The tools frontmatter pinned mcp__supermemory__* only, so the agent
spawned with zero tools (and was refused) whenever the server surfaced
under the plugin-scoped or claude.ai connector namespace. List all
three variants; unresolved names are ignored at spawn.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 18:49:11 -07:00
Dhravya Shah 42441eb948 feat: ◪ replaces ◆ as the supermemory mark; natural attribution phrasing
All hook surfaces now use ◪ and the recall directive asks for natural
sentences ("◪ last week you told me about X") instead of the
"◆ from memory:" label. Source is always named "supermemory", never
"memory".

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 18:49:01 -07:00
Dhravya Shah 1d1c9d8f57 feat: live statusline tally + one-time ◆ explainer
Resting label is now a session tally (N loaded · N captured · N recalls)
that ticks on every turn and every recall, instead of a static count with
decaying flashes. First session shows a one-time notice teaching that ◆
marks anything sourced from supermemory.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 17:34:35 -07:00
Dhravya Shah db0fe7548b chore: bump to 0.1.1
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 17:32:21 -07:00
Dhravya Shah 104aa48c86 feat: ◆ is the supermemory mark — one glyph across every surface
Statusline, systemMessages, injected memory lines, and the attribution rule
all carry ◆. The mark ships on the injected data itself, so the model
propagates it naturally when citing memories: if you see ◆, it came from
supermemory.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 17:32:04 -07:00
Dhravya Shah 44610b0e1a refactor!: CLI-free architecture — hooks + hosted MCP, zero build, zero deps
Plugin is now 24 files of committed plain source. All API interaction via
fetch or the hosted MCP at mcp.supermemory.ai (through a stdio proxy that
shares the hooks' credentials.json — one browser login covers both).

- hooks/: session-start (profile + welcome-back + auth bootstrap + statusline
  symlink), recall-directive (search-liberal + ◆ attribution + container tag),
  recall-approve (MCP tool-name matching, read-only allowlist), capture
  (transcript delta + entityContext)
- hooks/mcp-proxy.js: stdio ⇄ streamable-HTTP bridge with session tracking
- statusline.js: self-contained renderer; state in fixed
  ~/.supermemory-claude/statusline; settings point at a hook-maintained symlink
- agents/context-gatherer.md: deep multi-container recall subagent
- deleted: esbuild bundles + build step, supermemory SDK, legacy container-tag
  resolvers (Cursor/Codex/OpenCode), bash-teaching skills, custom integrity
  headers, statusline installer
- requires mcp.supermemory.ai API-key auth (supermemoryai/supermemory#1537)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 17:24:21 -07:00
Dhravya Shah e9f018c6b6 checkpoint: visibility fixes in src + new CLI-free hooks architecture (pre-restructure)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 17:19:14 -07:00
Cursor Agent c3fcf0492d chore: bump plugin version to 0.0.16 for statusline release
Bump all update surfaces so existing installs get the auto-update
notice after merge: latest.json, PLUGIN_VERSION, plugin manifest,
package versions, and rebuilt hooks.

Co-authored-by: Dhravya Shah <dhravya@supermemory.com>
2026-08-14 18:34:44 +00:00
Cursor Agent d8ea6e947f Merge main into statusline feature branch
Resolve generated script conflicts by rebuilding hooks so statusline
state updates keep the search-result parsing and status/session fixes
from main.

Co-authored-by: Dhravya Shah <dhravya@supermemory.com>
2026-08-14 18:32:17 +00:00
ved015 192ab043e7 fix: preserve memory search result text 2026-08-13 18:31:15 +05:30
Ishaan Gupta 7c4249ebe9 fix: harden statusline setup and state 2026-08-07 18:46:07 +05:30
Prasanna A P db3fd71ef2 fix plugin update notice 2026-08-05 18:15:06 -07:00
Prasanna A P 8543ec8ff5 add privacy policy links 2026-08-05 14:12:58 -07:00
Cursor Agent 133d76a9c0 Merge main and resolve generated script conflicts
Co-authored-by: Dhravya Shah <dhravya@supermemory.com>
2026-08-01 04:58:15 +00:00
ved015 c3b63f2b5d feat: read legacy Cursor memories 2026-07-25 19:10:14 +05:30
Cursor Agent 2c205a6a22 Merge main and resolve PR conflicts
Co-authored-by: Dhravya Shah <dhravya@supermemory.com>
2026-07-25 01:57:21 +00:00
ved015 ba77cb3efd Bump plugin version to 0.0.12 2026-07-24 20:57:06 +05:30
Dhravya Shah 39dc74da4d Bump plugin version to 0.0.11
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-18 12:34:04 -07:00
Dhravya Shah a6b5e9b3b7 Merge remote-tracking branch 'origin/main' into feat/agents
# Conflicts:
#	plugin/scripts/add-memory.cjs
#	plugin/scripts/context-hook.cjs
#	plugin/scripts/save-project-memory.cjs
#	plugin/scripts/search-memory.cjs
#	plugin/scripts/status.cjs
#	plugin/scripts/summary-hook.cjs
2026-07-18 12:08:03 -07:00
Dhravya Shah 97c997348e bump plugin version to 0.0.10
latest.json on main already advertised 0.0.10 while the installed
manifest and baked PLUGIN_VERSION were still 0.0.9, so the update
check nagged every session for a release that was never published.
Bump manifest, package.json, plugin-version.js and rebuild hooks so
the announced and installed versions match.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-16 17:26:24 -07:00
ved015 968a7c2110 Unify agent memories in stable repository containers 2026-07-14 09:44:12 +05:30
ved015 605998e05d Unify Claude agent memory containers 2026-07-13 21:22:07 +05:30
Cursor Agent d9d198d795 Merge main into statusline feature branch
Co-authored-by: Dhravya Shah <dhravya@supermemory.com>
2026-06-29 19:32:49 +00:00
Dhravya Shah 02bb8ccde3 bump version to 0.0.10, make brand label bold white
- Bump plugin-version.js, plugin.json, package.json to 0.0.10
- Make  bright blue and "supermemory" bold white so the brand
  pops on dark terminal backgrounds

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-17 20:40:25 -07:00
Dhravya Shah e4abca610c feat: add live statusline with intent surfacing, learning, and recall
Adds a dynamic statusline script that shows Supermemory activity in
Claude Code's statusline bar. Three categories rotate per render:

- Things Added: "surfaced 9 intents", "vibing on 9 intents", etc.
- Things Learnt (📘): "picked up 5 insights", "5 memories crystallized"
- Things Recalled (🔁): "resurfaced 4 facts", "4 memories re-entered the chat"
- Syncing states: "encoding to memory", "saving the vibes"

Each render randomly picks one message from the available pools, with
creative varied phrasing so the statusline feels alive. Uses Supermemory
brand blue (#3B35F3) true-color ANSI. Syncing auto-expires after 15s to
prevent stale states.

Includes /supermemory:statusline setup command and first-time onboarding
tip shown at SessionStart.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-17 11:16:02 -07:00
Sreeram Sreedhar 2b5a6fcd66 bumping up version 2026-06-16 23:48:43 -07:00
Sreeram Sreedhar 178acc23e0 Bump plugin version to 0.0.9 2026-06-16 19:11:49 -07:00
Sreeram Sreedhar 35681629ce build: commit recall bundles + refresh stale bundles
main has the recall source + hooks.json wiring (from #65) but never got
the built bundles, so UserPromptSubmit -> recall-hook.cjs errored with
MODULE_NOT_FOUND on every turn. This commits the build output:

- recall-hook.cjs, recall-approve.cjs (new) — the two missing bundles
  hooks.json already references
- context-hook/summary-hook/add-memory/save-project-memory/search-memory/
  status .cjs (refreshed) — were stale on main (built pre-#65), so they
  reported version 0.0.7 while the source is 0.0.8; rebuilding aligns them
  (also clears the false "update available" notice loop)

No package/version files changed — source is already at 0.0.8; this only
ships the bundles that build.js produces.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 18:31:48 -07:00
Sreeram Sreedhar 2556183965 feat: reasoned per-turn memory recall with auto-approve
Re-introduces the reasoned recall feature (previously reverted in #64),
source files only — generated plugin/scripts/*.cjs are intentionally not
included and must be produced by the build step.

- recall-hook (UserPromptSubmit): injects a per-turn directive so Claude
  decides whether recalling saved memory helps the current message.
- recall-approve (PreToolUse): auto-approves only the supermemory-search
  tool call (narrow allow-list, rejects shell-laced commands).
- settings: recallDirective override + getRecallConfig.
- build/hooks wiring and version bump to 0.0.8.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 23:13:17 -07:00
Vedant Mahajan ba4595dacb Revert "feat: reasoned per-turn memory recall with auto-approve" 2026-06-16 11:32:10 +05:30
Sreeram Sreedhar 389dd56c6c Merge remote-tracking branch 'origin/main' into sreedharsreeram/conditional-search-reasoning-v1
# Conflicts:
#	plugin/scripts/add-memory.cjs
#	plugin/scripts/context-hook.cjs
#	plugin/scripts/save-project-memory.cjs
#	plugin/scripts/search-memory.cjs
#	plugin/scripts/status.cjs
#	plugin/scripts/summary-hook.cjs
#	src/context-hook.js
2026-06-15 21:19:25 -07:00
Mahesh Sanikommu fe40ebc129 Polish plugin manifest for official marketplace listing
Enrich plugin.json (displayName, homepage, repository, license,
keywords), move category to the marketplace entry and drop the
duplicate version, add a marketplace description, and note the
Node 18+ requirement in the README.
2026-06-13 11:33:03 -07:00
Sreeram Sreedhar 311cb8d0ce Merge remote-tracking branch 'origin/main' into 05-31-add_baseurl_to_config-v1
# Conflicts:
#	.claude-plugin/marketplace.json
#	latest.json
#	plugin/.claude-plugin/plugin.json
#	plugin/scripts/add-memory.cjs
#	plugin/scripts/context-hook.cjs
#	plugin/scripts/save-project-memory.cjs
#	plugin/scripts/search-memory.cjs
#	plugin/scripts/status.cjs
#	plugin/scripts/summary-hook.cjs
2026-06-11 13:54:14 -07:00
Claude 80241df3c4 Bump runtime PLUGIN_VERSION to 0.0.6
src/lib/plugin-version.js held the version the SessionStart hook reports
itself as. It was missed in the previous bump, so an installed 0.0.6
plugin would still self-report 0.0.5 and keep showing the 'update
available' notice after updating. Rebuilt the bundled hooks.

https://claude.ai/code/session_01424Bk69KXtjWYvnueZJJad
2026-06-11 07:39:54 +00:00
Claude f7e5243283 Bump version to 0.0.6 for plugin rename
So existing installs are notified via the update check (which compares
the installed version against latest.json) to reinstall under the new
'supermemory' plugin name.

https://claude.ai/code/session_01424Bk69KXtjWYvnueZJJad
2026-06-11 07:34:00 +00:00
Claude a200ef1281 Rename plugin to 'supermemory' while keeping repo as claude-supermemory
Set the Claude Code plugin name to 'supermemory' in plugin.json and
marketplace.json, and update install commands and command prefixes
(/supermemory:*) accordingly. Repository paths and GitHub URLs remain
supermemoryai/claude-supermemory.

https://claude.ai/code/session_01424Bk69KXtjWYvnueZJJad
2026-06-11 07:27:13 +00:00
Sreeram Sreedhar 51bd029b14 chore: bump version to 0.0.6
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 12:23:44 -07:00
Sreeram Sreedhar 3a0c34c169 add baseUrl to config 2026-06-10 12:22:24 -07:00
Sreeram Sreedhar 35d766cdf4 Merge origin/main into sreedharsreeram/conditional-search-reasoning
Resolve by rebuilding plugin/scripts/*.cjs so the artifacts carry BOTH
main's source changes (Windows auth fix, update-notice via version-check)
and this branch's recall hooks — the .cjs were otherwise stale against the
merged source. Apply biome auto-format to the inherited context-hook.js /
version-check.js so `biome ci` passes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 11:33:42 -07:00
Sreeram Sreedhar 0493e6ee47 feat: reasoned per-turn memory recall with auto-approve
Add a UserPromptSubmit hook that injects a directive telling Claude to
reason — per message — about whether recalling memory would help, and
only then search via the supermemory-search skill. A PreToolUse hook
auto-approves that search so it runs silently, like auto-capture, instead
of interrupting with a permission prompt.

Reasoned recall and auto-approve are built-in (no toggles): searching
only when it helps keeps more usage on the user's plan. The auto-approve
is scoped to the read-only search and refuses any command laced with
shell chaining/redirection. SUPERMEMORY_DEBUG surfaces a per-turn
[recall-decision] line for debugging. SessionStart profile load and the
Stop-hook save are unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 14:30:40 -07:00