thread store interface#17659
Conversation
921c3a3 to
7adf7ef
Compare
| fn is_terminal_thread_read_error(err: &color_eyre::Report) -> bool { | ||
| err.chain() | ||
| .any(|cause| cause.to_string().contains("thread not loaded:")) | ||
| err.chain().any(|cause| { |
There was a problem hiding this comment.
unintentional during unit test fixing, will remove
7adf7ef to
51a470a
Compare
| pub originator: String, | ||
| /// CLI/app version creating the thread. | ||
| pub cli_version: String, |
There was a problem hiding this comment.
should originator and cli_version be on params? or should thread store already know about them?
There was a problem hiding this comment.
Already know about them by virtue of it knowing its own version (for cli_version) and operating context (for originator)? I think that's doable yes, assuming the originator is baked in somehow.
|
|
||
| /// Describes who owns a thread for multi-tenant storage backends. | ||
| #[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] | ||
| pub struct ThreadOwner { |
There was a problem hiding this comment.
let's include only existing features for now. we can add new features in followup PRs
| /// Items to append in order. | ||
| pub items: Vec<RolloutItem>, | ||
| /// Optional idempotency key supplied by callers that may retry the same append. | ||
| pub idempotency_key: Option<String>, |
There was a problem hiding this comment.
is this actually used?
| dynamic_tools, | ||
| memory_mode, | ||
| event_persistence_mode, | ||
| .. |
There was a problem hiding this comment.
surprised we are discarding a bunch of these fields
| }) | ||
| } | ||
|
|
||
| async fn find_thread_by_name( |
c9acf36 to
645e9e5
Compare
| /// Working directory captured for the thread. | ||
| pub cwd: PathBuf, | ||
| /// Version of the CLI/app that created the thread. | ||
| pub cli_version: String, |
There was a problem hiding this comment.
this won't change in the scope of cli build
645e9e5 to
4edef55
Compare
4edef55 to
0c6fd51
Compare
Introduce a ThreadStore interface for mediating access to the filesystem (rollout jsonl files + sqlite db) based thread storage.
In later PRs we'll move the existing fs code behind a "local" implementation of this ThreadStore interface.
This PR should be a no-op behaviorally, it only introduces the interface.