Repository navigation
Stop writing org settings on startup; apply filterPrompt to the project namespace - #120
Draft
MaheshtheDev wants to merge 2 commits into
Draft
MaheshtheDev wants to merge 2 commits into
MaheshtheDev wants to merge 2 commits into
Conversation
…ct namespace Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
MaheshtheDev
force-pushed
the
capy/stop-writing-org-settings
branch
from
October 29, 2026 06:52
b4ba528 to
57f55b8
Compare
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every plugin start called
PATCH /v3/settingswith{ shouldLLMFilter: true, filterPrompt }, in both v5 and legacy mode. That overwrote the organization's context (/organizationreads and writes the samefilterPromptcolumn). Sentry puts about 47.7K calls/30d from 799 users on this path (Supermemory/JS 4.0.0). Spec: SCR-306.No org settings write
getClient()no longer callssettings.update, andV5Clientno longer takes the legacy settings client.filterPrompthas no built-in default anymore. Unset, empty, or over 1500 characters means "not configured".A configured
filterPromptgoes to the project namespacePATCH /ns/{namespace}withsupportingContextonce per namespace at startup (V1 init and OpenCode 2 session tag resolution). It's best-effort with a 3s timeout and no retries, and failures are logged.supportingContextinstead of the built-in coding-agent context. The API upserts documentsupportingContextonto the namespace, so without this the next capture would overwrite the PATCH. It also covers the cases where the PATCH can't land: a namespace that doesn't exist yet (404), a non-admin key (403) and the legacy protocol, which has no/nsroute.Other
supermemory-legacy(supermemory@4.0.0) stays, because it's still the content client for custom servers on the legacy protocol.filterPromptto the config sample. CHANGELOG entry added, version bumped to 2.1.1 (on top of main's 2.1.0). Merging publishes throughrelease.yml.Verification
bun run typecheck,bun test(37 pass) andbun run buildall pass.src/services/client.test.tsruns the real client in a subprocess against a local request recorder with a tempHOMEconfig. It checks four cases: v5 with no prompt (no settings call and no PATCH), v5 with a prompt (onePATCH /ns/{ns}with the trimmed prompt and no org call), a prompt over the limit (ignored), and legacy with a prompt (no settings call and no PATCH). Onmain, the same recorder showsPATCH /v3/settingsin both v5 and legacy mode.api.supermemory.aion a throwaway namespace: the startup PATCH got a 404 on the new namespace and logged it, the first capture setsupportingContextto the prompt, a later startup PATCH restored it after a manual overwrite, andGET /organizationstill returnedorganizationalContext: null. The namespace was deleted afterwards.