Conversation
…tions endpoint Lets an agent pull a compact timeline of a different session (its own past or another agent's) and audits the recall as a kind:'recall' observation in the calling session. Progressive disclosure preserved: only IDs come back — bodies still come from get_observations(ids[]). Wire contract on the recall observation: - kind === 'recall' - metadata.recalled_session_id - metadata.owner_ide (inferIdeFromSessionId fallback when the row's ide column is 'unknown', so foreign-session recalls stay traceable) - metadata.observation_ids - metadata.around_id, metadata.limit Both target_session_id and current_session_id are validated up-front via storage.getSession(); MemoryStore.addObservation routes through ensureSession (memory-store.ts:96), which silently materialises a missing sessions row, so the early checks make a typo loud instead of writing a recall row into a phantom session. Foreign-session around_id is also validated: the integer would otherwise be used as a numeric anchor in the target's id space and silently slice the target's history at a position the caller never meant. The tool returns an empty timeline (and the worker route returns []) instead — bleed-free. Worker's GET /api/sessions/:id/observations gains ?around=<id>&limit=<n> so the same paged window is reachable from the HTTP surface. The route already proxied to Storage.timeline, which has supported aroundId for a while.
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.
Automated by gx branch finish (PR flow).