Repository navigation
Conversation
cursor
Bot
force-pushed
the
cursor/ftry-1469-memory-sdk-cli-ccb2
branch
3 times, most recently
from
October 27, 2026 09:57
43280ac to
737c022
Compare
dvlpjrs
marked this pull request as ready for review
October 27, 2026 15:51
cursor
Bot
force-pushed
the
cursor/ftry-1469-memory-sdk-cli-ccb2
branch
from
October 27, 2026 16:02
737c022 to
328050e
Compare
|
@devin review |
Typed MemoryCard, MemoryFact, MemoryRevision, MemorySync and the list envelopes; the Wiki* names stay as aliases for client.wiki importers. Every memory call is personal (no team scoping), like browser profiles. Co-authored-by: jyoti <jyoti@gumloop.com>
cursor
Bot
force-pushed
the
cursor/ftry-1469-memory-sdk-cli-ccb2
branch
from
October 27, 2026 16:18
328050e to
d648730
Compare
|
@devin review |
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.
Ticket: https://linear.app/gumloop/issue/FTRY-1469
Adds
client.memory(sync and async) andgumloop memoryover the public memory API. Tracks the backend PR https://github.com/gumloop/gumloop_backend/pull/11023 at 792518967a (source of truth for the wire shapes). Draft until the backend lands on staging and this is re-verified against it.Why
The SDK and CLI only read the wiki through
POST /wiki/query. The product treats it as the user's memory, so callers get the same thing under the product name: browse cards and facts, remember and forget, state tone and design rules, review and undo changes, check or start a sync.Scope
src/gumloop/resources/memory.py:Memory/AsyncMemorywithoverview,query,list_cards,get_card,update_card,regenerate_card,delete_card,list_facts,create_fact,get_fact,update_fact,delete_fact,get_rules,create_rule,list_revisions,undo_revision,get_sync,start_sync. Flat methods likeBrain; lists takepage_size/cursorand return the plain cursor envelope (data,page_size,next_cursor,has_more, no totals); csv filters accept a list or a string.src/gumloop/types.py:MemoryCard,MemoryFact,MemoryCardRef,MemoryCardRank+MemoryRankSource,MemoryRevision(withundoable) +MemorySnapshot,MemorySync,MemoryRuleSet, request models and list envelopes, mirroringapi/types/public_api/memory.pyon the backend branch.WikiCard,WikiFact,WikiCardType,WikiQueryRequest,WikiQueryResponsestay as aliases soclient.wikiimporters keep working and pick up the newconnectortype and additive fields.src/gumloop/cli/commands/memory.py:gumloop memory overview|query,cards list|get|update|regenerate|delete,facts list|create|get|update|delete,rules list|create,revisions list|undo(list showsUNDOABLE),sync status|start.--jsoneverywhere,Next cursor:on lists. The 402credit_limit_exceededfromcards regenerateandsync startsurfaces like every other API error (Error: <message>, or the error object under--json), the same asbrain sources approve.client.wikiandgumloop wiki querykeep working; the CLI group help namesmemory. Error codes pass through untouched:memory_*(including the 400memory_card_key_invalidoncreate_factwithparam: entity_key) from every/memoryroute,wiki_card_not_foundonly fromPOST /wiki/query.gumloop_api.memoryorgumloop_api.wiki, writes needgumloop_api.memoryor a personal API key; stated in README anddocs/client-capabilities.md.gumloop loginrequestsgumloop_api, which covers both, so no CLI change.tests/sdk/test_wiki.pyandtests/cli/test_wiki.py; README anddocs/client-capabilities.mdrows.Out of scope: sharing (no backend primitive), docs site pages.
Open questions
POST /memory/factsandPOST /memory/rulesanswer 201 on create and 200 on revive; the SDK returns the body only, as every sibling does, so a caller cannot tell the two apart. Fine, or expose it?team_ideven when the client has a team selected (scoped=False, like browser profiles), since the routes take no team keys.client.wiki.querystill rides the team param; left as is.update_card(status=...)andcreate_rule(type=...)are plain strings; the server's 400 is the validation, as forbrain.create_source(scope=...).Verification
No backend with these routes is reachable with a credential I hold: staging does not have them yet, and a local backend on the PR branch would need a staging personal API key or OAuth token for the test user, which means minting one (a staging write). So every command ran against a local stub (
/tmp/memory_stub.py, outside the repo) that replays the payload shapes from the backend branch'sapi/types/public_api/memory.pyandpagination/flask.pyenvelope and logs each request. All 28 commands produced the expected output; the stub received the backend's paths, query strings (csv joins,%40in entity keys, noteam_id) and bodies; 400 / 402 / 404 / 409 envelopes (memory_card_key_invalid,credit_limit_exceeded,memory_card_not_found,memory_card_has_no_summary,memory_revision_superseded,memory_revision_not_undoable,wiki_card_not_foundon the legacy path) surface asError: <message>and as the JSON error object under--json. Transcript and request log attached asmemory-cli-stub-run.txt. Will re-run against staging once #11023 deploys.uv run pytest(minustests/integration, which needs live credentials): 887 passed; the 2test_voicefailures andtest_oauth_default_does_not_send_x_auth_key_headerfail identically onmain.Trail
cursor(cloud agent VM), chatbc-6b22d7ba-8ef8-411f-96d6-b1c62adb33c1(workerbc-60957ea4-6b0a-5b74-888b-cebbe3a2ccb2)Need help on this PR? Tag
@codesmith-botwith what you need.