MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / todo_node_id

Function todo_node_id

atomic-core/src/pristine/txn/write/session_kg.rs:54–60  ·  view source on GitHub ↗

Node id for a todo. Agent-provided IDs are only stable within their session, so qualify them with that session. Generated turn-local IDs are already fully qualified and pass through unchanged.

(session_id: &str, todo_id: &str)

Source from the content-addressed store, hash-verified

52/// session, so qualify them with that session. Generated turn-local IDs are
53/// already fully qualified and pass through unchanged.
54pub(crate) fn todo_node_id(session_id: &str, todo_id: &str) -> String {
55 if todo_id.starts_with(&format!("session:{session_id}/")) {
56 todo_id.to_string()
57 } else {
58 format!("session:{session_id}/todo:{todo_id}")
59 }
60}
61
62fn legacy_todo_node_id(todo_id: &str) -> String {
63 if todo_id.starts_with("session:") {

Callers 4

clear_session_turn_kgMethod · 0.85
emit_turn_kgMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected