Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,12 @@ what the adapter drops.
`listTrajectories()` enumerates the sessions in a source's standard local
store, newest first, with cursor pagination. It is a discovery layer beside
normalization — `normalizeTranscript()` itself never touches the filesystem.
Copilot CLI, Cursor, Gemini CLI, and OpenCode are export-only input contracts
and intentionally return `listing_unavailable`; callers locate and read the
exports themselves.
Copilot CLI, Gemini CLI, and OpenCode are export-only input contracts and
intentionally return `listing_unavailable`; callers locate and read the
exports themselves. Cursor lists `~/.cursor/projects/*/agent-transcripts`
(parents and `subagents/` children); pass each item's `path` as
`sourceContext.locator` when normalizing so subagent identity can be parsed
from the path without reading it.

```ts
import { listTrajectories } from "@letta-ai/trajectory";
Expand Down
4 changes: 3 additions & 1 deletion fixtures/claude-code/subagent/expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"source": "claude-code",
"cwd": "/workspace/project",
"git_branch": "main",
"model": "claude-sonnet"
"model": "claude-sonnet",
"kind": "subagent",
"parent_id": "parent-session-fixture"
},
{
"role": "user",
Expand Down
3 changes: 3 additions & 0 deletions python/src/trajectory/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ class SourceContext(TypedDict, total=False):
groupId: str
baseByteOffset: int
partial: bool
locator: str


class _NormalizeInputOptional(TypedDict, total=False):
Expand Down Expand Up @@ -139,6 +140,8 @@ class _MetaOptional(TypedDict, total=False):
cwd: str
git_branch: str
model: str
kind: Literal["subagent"]
parent_id: str


class MetaRecord(_MetaOptional):
Expand Down
Loading