sync update from LAN repo (source ji @ 85078a31)
This commit is contained in:
1 parent
5d6627af50
commit
e602d88695
864 files changed
+99150
-6346
No files matched your search
+21
@@ -30,6 +30,18 @@ EXCLUDED_SYSTEM_THREAD_TYPES = frozenset(
|
||||
"deep_research",
|
||||
"writing_setup",
|
||||
"report_structure_setup",
|
||||
"task-analysis",
|
||||
"task-analysis-qa",
|
||||
}
|
||||
)
|
||||
|
||||
# 这些系统线程 id 只存在于编排内部,不进「最近的对话」;loopback 派活必须能跨
|
||||
# 「点击触发的 HTTP 用户」和「绑定 created_by 签发的 JWT」读写,否则会 404 not accessible。
|
||||
SHARED_ACCESS_THREAD_TYPES = frozenset(
|
||||
{
|
||||
"roundtable",
|
||||
"task-analysis",
|
||||
"task-analysis-qa",
|
||||
}
|
||||
)
|
||||
|
||||
@@ -43,6 +55,15 @@ def is_excluded_system_thread(metadata: dict[str, Any] | None) -> bool:
|
||||
return isinstance(thread_type, str) and thread_type in EXCLUDED_SYSTEM_THREAD_TYPES
|
||||
|
||||
|
||||
def is_shared_access_thread(metadata: dict[str, Any] | None) -> bool:
|
||||
"""Return True when any authenticated caller may read/write this thread."""
|
||||
md = metadata or {}
|
||||
if md.get("taskId"):
|
||||
return True
|
||||
thread_type = md.get("thread_type")
|
||||
return isinstance(thread_type, str) and thread_type in SHARED_ACCESS_THREAD_TYPES
|
||||
|
||||
|
||||
class ThreadMetaStore(abc.ABC):
|
||||
@abc.abstractmethod
|
||||
async def create(
|
||||
|
||||
Reference in new issue
Block a user