feat(box): add global sandbox scope option

Add a 'Global (shared by all)' option to the sandbox scope selector.
Uses a constant '{global}' template variable that always resolves to
'global', so all users and chats share one sandbox container.
This commit is contained in:
Junyan Qin
2026-04-19 14:45:38 +08:00
committed by WangCham
parent f196cbc79d
commit e955b3d6e8

View File

@@ -176,7 +176,8 @@ class BoxService:
.get('local-agent', {})
.get('box-session-id-template', '{launcher_type}_{launcher_id}')
)
variables = query.variables or {}
variables = dict(query.variables or {})
variables.setdefault('global', 'global')
return template.format_map(collections.defaultdict(lambda: 'unknown', variables))
def build_skill_extra_mounts(self, query: pipeline_query.Query) -> list[dict]: