Skip to content

feat(facade): context() for POST /api/v2/memory/context (1.3.0) - #25

Merged
dani1005 merged 1 commit into
v1from
feat/facade-context
Oct 30, 2026
Merged

dani1005 merged 1 commit into
v1from
feat/facade-context

Conversation

@dani1005

@dani1005 dani1005 commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Adds client.context() for Context Retrieval, the multi-round LLM retrieval endpoint added in contract 2.0.0 at engine release-20261008_v21.

  • context(query, *, user_id, top_k=None, include_profile=None, filters=None, app_id=None, project_id=None) → SearchData, same shape as search(). episodes[].cited marks what the model's answer rested on.
  • user_id is required: the loop returns episodes for user owners only, so agent_id is left out.
  • The request body carries none of the fields /context rejects with 422 (min_score, radius, enable_llm_rerank, with_readable_episode). A test covers this.
  • retrieve_context → context in the AttributeError hint table. Quickstart and README list the method.

Built on the generated 1.3.0-rc1 (#26, factory MR !14), which provides ContextInput and MemoryApi.retrieve_context. Rebased onto v1 after #26 merged: 60 passed locally and in CI. The same build passed a live end-to-end run of client.context() against production (cited set on the right episode, /search unaffected, test data cleaned up).

🤖 Generated with Claude Code

@gloryfromca gloryfromca left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking: the generated context model and endpoint artifacts must be included so the package imports again.

I found one blocker, marked inline. In a fresh virtual environment with the declared runtime and test dependencies, pytest -q stops during collection with 1 error because EverOS is no longer exported; both Python CI jobs reproduce the same import failure.

I covered the full diff, surrounding facade/model/API callers, recent facade and generated-SDK history, public backward compatibility, test strength, and the facade/generated-client architecture. I found no AGENTS.md, CLAUDE.md, or CONTEXT*.md repository guidance to apply. The new tests were not weakened, but they cannot collect against the artifacts in this revision. The facade signature, default preservation, scoping, and docs otherwise look consistent with nearby memory methods.

Comment thread everos_cloud/client.py
AddOperation,
Content,
ContentItem,
ContextInput,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking: include the generated context endpoint and model before this facade lands.

ContextInput is absent from the package, and MemoryApi does not define retrieve_context. Importing everos_cloud.client therefore raises ImportError; because the top-level __init__.py swallows that error, from everos_cloud import EverOS fails too, breaking the entire existing facade rather than only context(). The clean-environment test run stops during collection on this import, and both CI versions reproduce it. Please add or regenerate the 1.3.0 model, API, exports, and contract artifacts alongside this wrapper.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blockers; this can merge as far as I am concerned.

Fixed by rebasing onto the merged 1.3.0-rc1 generated SDK: ContextInput is exported, MemoryApi.retrieve_context targets /api/v2/memory/context, and EverOS imports normally again. A fresh environment now reports 239 passed, and the Python 3.12, Python 3.14, and build checks all pass. I am closing this thread.

Wrap Context Retrieval on the facade as `context(query, *, user_id, top_k,
include_profile, filters, app_id, project_id)`, the last segment of its
route like the other memory methods. user_id is required: the loop returns
episodes for user owners only. The body carries none of the fields the
endpoint rejects with 422 (min_score, radius, enable_llm_rerank,
with_readable_episode). Quickstart and README list the method.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@dani1005
dani1005 marked this pull request as ready for review October 30, 2026 20:34
@dani1005
dani1005 force-pushed the feat/facade-context branch from 7fade3c to 25dc08c Compare October 30, 2026 20:34
@dani1005
dani1005 merged commit 72166c0 into v1 Oct 30, 2026
3 checks passed
@dani1005
dani1005 deleted the feat/facade-context branch October 30, 2026 20:37

@gloryfromca gloryfromca left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blockers; this can merge as far as I am concerned.

The prior missing-generated-artifacts blocker is fixed by the 1.3.0-rc1 SDK base, and I found no new findings in this revision. A clean environment reports 239 passed; the Python 3.12, Python 3.14, and build checks also pass.

I covered the current PR diff and its generated API/model base, surrounding callers and facade patterns, recent history, backward compatibility, test strength, and the facade/generated-client architecture. No AGENTS.md, CLAUDE.md, or CONTEXT*.md repository guidance exists in scope. The PR merged while this review was running. I posted a closing reply on my prior thread; GitHub then refused the resolution mutation with FORBIDDEN, so its remaining open UI state is not an outstanding objection.

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.

2 participants