pyc • Lines: 240�
(�~j� � �p � d Z ddlZddlZddlZddlZddlZddlmZ d� Zd� Z dZ
d� Zd� Zd � Z
d
� Zd� Zd� Zy)
aa Public message sharing: create, fetch and revoke single-message shares.
A share is a capability URL: whoever knows the unguessable token can read the
message without logging in. The message content is snapshotted at share time so
later edits to or deletion of the session never change or break the share.
Storage is a simple JSON file (``SHARES_FILE``) shaped as::
{
"<token>": {
"session_id": "...",
"msg_index": 3,
"owner": "alice",
"created": 1234567890.0,
"message": { "role": "assistant", "content": "...", ... }
}
}
� N)�Mc �F � t j 5 t j j � ddd� t j } | rt
j j | � sy t | d�� 5 }t j |� }ddd� t j 5 xs i j � D ] \ }}|t j |<