2.5 KiB
2.5 KiB
ctx.sessionQuery
SessionQueryService — provided by @deepseek-ai/dsh-session-query.
Live-preferred logical-corpus exact-read and relationship-tracing service.
ctx.sessionQuery.listSessions()
listSessions(): Promise<SessionRecord[]>
List the complete logical corpus using live-preferred records.
Returns deterministic newest-first cloned session records.
ctx.sessionQuery.listEvents(sessionId)
async listEvents(sessionId: SessionId): Promise<SessionEventRecord[]>
List lightweight raw-log event records for one logical session.
sessionId— live-preferred session id to read.
Returns event records in ascending seq order.
ctx.sessionQuery.traceSession(sessionId)
async traceSession(sessionId: SessionId): Promise<SessionLineageTrace>
Trace known ancestry and descendants from one corpus observation.
sessionId— logical session id to trace.
Returns a complete lineage or an explicit unresolved parent boundary.
ctx.sessionQuery.traceEvent(request)
async traceEvent(request: SessionEventTraceRequest): Promise<SessionEventTrace>
Trace one event's direct positional and provenance relationships.
request— target session id and event seq.
Returns direct links plus the target's positional replacement chain.
ctx.sessionQuery.readEvent(request)
async readEvent(request: SessionEventReadRequest): Promise<SessionEventWindow>
Read one full event plus a bounded raw-log context window.
request— target session/seq and context sizes.
Returns cloned target and neighboring events.