mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-08 20:30:59 +00:00
e3832ca536
Co-authored-by: dadachann <185672915+dadachann@users.noreply.github.com>
17 lines
532 B
Python
17 lines
532 B
Python
from __future__ import annotations
|
|
|
|
import typing
|
|
|
|
|
|
class WorkspaceExecutionContext(typing.Protocol):
|
|
@property
|
|
def workspace_uuid(self) -> str: ...
|
|
|
|
|
|
def workspace_identity(execution_context: WorkspaceExecutionContext) -> dict[str, str]:
|
|
"""Build the canonical telemetry identity for one Workspace execution."""
|
|
workspace_uuid = execution_context.workspace_uuid.strip()
|
|
if not workspace_uuid:
|
|
raise ValueError('Telemetry execution Workspace UUID is empty')
|
|
return {'workspace_uuid': workspace_uuid}
|