mirror of
https://github.com/NVIDIA/OpenShell.git
synced 2026-10-22 06:19:47 +08:00
Narrow OPP to two yes/no security questions: 1. Can data leave this sandbox? (exfiltration) 2. Can the agent write despite read-only intent? (write bypass) Removes 4 advisory/lint queries (overpermissive methods, L4 gaps, binary inheritance, inference relay), 3 output modes (Mermaid, topology, HTML), and fixes 3 bugs (include_workdir not used in exfil analysis, __all__ broken when protos missing, CLI PYTHONPATH). ~40% line reduction (2900 -> 1769 lines). Signed-off-by: Alexander Watson <zredlined@gmail.com>
47 lines
1.1 KiB
Python
47 lines
1.1 KiB
Python
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
"""OpenShell - Agent execution and management SDK."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import contextlib
|
|
|
|
# Proto stubs may not be generated yet (requires Rust build).
|
|
# Suppress so subpackages like openshell.prover can still be imported.
|
|
with contextlib.suppress(ImportError):
|
|
from .sandbox import ( # noqa: F401 — intentional re-exports
|
|
ClusterInferenceConfig,
|
|
ExecChunk,
|
|
ExecResult,
|
|
InferenceRouteClient,
|
|
Sandbox,
|
|
SandboxClient,
|
|
SandboxError,
|
|
SandboxRef,
|
|
SandboxSession,
|
|
TlsConfig,
|
|
)
|
|
|
|
try:
|
|
from importlib.metadata import version
|
|
|
|
__version__ = version("openshell")
|
|
except Exception:
|
|
__version__ = "0.0.0"
|
|
|
|
_SDK_SYMBOLS = [
|
|
"ClusterInferenceConfig",
|
|
"ExecChunk",
|
|
"ExecResult",
|
|
"InferenceRouteClient",
|
|
"Sandbox",
|
|
"SandboxClient",
|
|
"SandboxError",
|
|
"SandboxRef",
|
|
"SandboxSession",
|
|
"TlsConfig",
|
|
]
|
|
|
|
__all__ = [s for s in _SDK_SYMBOLS if s in dir()] + ["__version__"]
|