File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,6 +74,10 @@ through the relevant items below.
7474- Lists are unbounded; implement TTL via ` EXPIRE ` in a subclass if needed.
7575- Redis Cluster: keys with the same ` {project_key}:{session_id} ` prefix should
7676 hash to the same slot — wrap in ` {...} ` hash tags if using Cluster.
77+ - If you derive ` project_key ` or ` session_id ` outside the SDK, ensure they
78+ cannot contain ` : ` (the key separator) — collisions would mix data across
79+ keys. The SDK's own ` project_key_for_directory() ` and UUID session IDs are
80+ already safe.
7781
7882### Postgres
7983
@@ -349,6 +353,12 @@ CREATE INDEX IF NOT EXISTS claude_session_store_list_idx
349353` append() ` is a single multi-row ` INSERT ... SELECT unnest($entries::jsonb[]) ` ;
350354` load() ` is ` SELECT entry ... ORDER BY seq ` .
351355
356+ Note: this schema differs from the TypeScript SDK's Postgres reference adapter
357+ (which defaults to table ` claude_session_entries ` , uses ` NULL ` rather than
358+ ` '' ` as the main-transcript subpath sentinel, and stores `created_at
359+ TIMESTAMPTZ` rather than epoch-ms ` mtime`). Sharing one Postgres table across
360+ the two SDKs requires aligning on a single schema first.
361+
352362### JSONB key ordering
353363
354364Entries are stored as ` jsonb ` , which ** reorders object keys** on read-back
Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ only-include = ["src/claude_agent_sdk"]
6666include = [
6767 " /src" ,
6868 " /tests" ,
69+ " /examples" ,
6970 " /README.md" ,
7071 " /LICENSE" ,
7172]
You can’t perform that action at this time.
0 commit comments