MCPcopy Create free account
hub / github.com/Louisym/MiniCC / SandboxStatus

Class SandboxStatus

tutorials/14_bash_engine_deep_dive.py:92–118  ·  view source on GitHub ↗

最终沙箱状态 — 源码 sandbox.rs:52-68 这是一个详尽的状态报告,包含了所有决策结果。 它会被附加到每个命令执行结果里(BashCommandOutput.sandbox_status)。 这样你事后可以审计:这条命令到底跑在什么隔离环境里?

Source from the content-addressed store, hash-verified

90
91@dataclass
92class SandboxStatus:
93 """最终沙箱状态 — 源码 sandbox.rs:52-68
94
95 这是一个详尽的状态报告,包含了所有决策结果。
96 它会被附加到每个命令执行结果里(BashCommandOutput.sandbox_status)。
97 这样你事后可以审计:这条命令到底跑在什么隔离环境里?
98 """
99 enabled: bool = False
100 requested: Optional[SandboxRequest] = None
101 supported: bool = False
102 active: bool = False
103 # 命名空间隔离
104 namespace_supported: bool = False
105 namespace_active: bool = False
106 # 网络隔离
107 network_supported: bool = False
108 network_active: bool = False
109 # 文件系统隔离
110 filesystem_mode: FilesystemIsolationMode = FilesystemIsolationMode.WORKSPACE_ONLY
111 filesystem_active: bool = False
112 # 挂载白名单
113 allowed_mounts: List[str] = field(default_factory=list)
114 # 容器检测
115 in_container: bool = False
116 container_markers: List[str] = field(default_factory=list)
117 # 降级原因(如果无法启用某些隔离)
118 fallback_reason: Optional[str] = None
119
120
121def resolve_request(

Callers 1

resolve_sandbox_statusFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected