Metadata-Version: 2.4
Name: moshe
Version: 0.1.1
Summary: Runtime security SDK for AI agents — policy enforcement, approval workflows, taint tracking, and chain-risk detection.
Author: MosheSDK Contributors
License: Apache-2.0
Project-URL: Homepage, https://github.com/Totoro1121/MosheSDK
Project-URL: Repository, https://github.com/Totoro1121/MosheSDK
Project-URL: Issues, https://github.com/Totoro1121/MosheSDK/issues
Keywords: ai-agents,agent-security,llm,policy,safety,tool-use
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Security
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
Requires-Dist: mypy>=1.9; extra == "dev"

# moshe

Python SDK for [MosheSDK](../../README.md) — runtime security for AI agents.

## Installation

```bash
pip install moshe
```

Requires Python ≥ 3.11. Zero mandatory runtime dependencies.

## Quick Start

```python
from moshe import GenericAdapter, MemoryStore, Moshe, PolicyConfig

moshe = Moshe(
    policy=PolicyConfig(
        forbidden_commands=[r"rm\s+-rf"],
        forbidden_files=[".env"],
        sensitive_files=["id_rsa"],
    ),
    store=MemoryStore(),
    on_error="BLOCK",
    on_unhandled_review="BLOCK",
)

session = moshe.with_session("run-001")
adapter = GenericAdapter(session, framework="my-agent")

result = await adapter.wrap_command(
    command="ls -la",
    tool_name="shell",
    execute=lambda: run_shell("ls -la"),
)
```

## Adapters

```python
from moshe import OpenAIAdapter, AnthropicAdapter

# OpenAI tool calls
adapter = OpenAIAdapter(session)
result = await adapter.wrap_tool_call(tool_call=tc, execute=lambda: run(tc))

# Anthropic tool_use blocks
adapter = AnthropicAdapter(session)
result = await adapter.wrap_tool_use(tool_use=tu, execute=lambda: run(tu))
```

## Documentation

See the [root README](../../README.md) for the full integration guide, feature
overview, and use cases.
