semvec/pypi-packages huggingface dataset:
langchain-agentmesh 0.1.0
AgentMesh trust layer integration for LangChain - cryptographic identity and trust-gated tool execution
Requires Python: >=3.9
Keywords: agentmesh, agents, cryptography, identity, langchain, multi-agent, trust

# LangChain AgentMesh Integration

Cryptographic identity verification and trust-gated tool execution for LangChain agents.

## Installation

```bash
pip install langchain-agentmesh
```

## Features

- **CMVKIdentity**: Ed25519-based cryptographic identity for agents
- **TrustGatedTool**: Wrap any tool with trust requirements
- **TrustedToolExecutor**: Execute tools with automatic verification
- **TrustCallbackHandler**: Monitor trust events during chain execution
- **TrustHandshake**: Verify peer agents before collaboration
- **DelegationChain**: Hierarchical capability delegation

## Quick Start

```python
from langchain_agentmesh import CMVKIdentity, TrustGatedTool, TrustedToolExecutor

# Generate agent identity
identity = CMVKIdentity.generate('research-agent', capabilities=['search', 'summarize'])

# Wrap a tool with trust requirements
gated_tool = TrustGatedTool(
    tool=search_tool,
    required_capabilities=['search'],
    min_trust_score=0.8
)

# Execute with verification
executor = TrustedToolExecutor(identity=identity)
result = executor.invoke(gated_tool, 'query')
```

## Use Cases

### Multi-Agent Trust Verification

```python
from langchain_agentmesh import TrustHandshake

# Create handshake for peer verification
handshake = TrustHandshake(my_identity)

# Verify peer before collaboration
result = await handshake.verify_peer(peer_identity)
if result.trusted:
    # Safe to delegate task
    response = await peer_agent.invoke(task)
```

### Trust-Gated Tool Execution

```python
from langchain_agentmesh import TrustGatedTool

# Sensitive tool requiring high trust
code_execution_tool = TrustGatedTool(
    tool=python_repl,
    required_capabilities=['code:execute'],
    min_trust_score=0.9,
    audit_logging=True
)

# Only trusted agents can use this tool
result = executor.invoke(code_execution_tool, code)
```

### Callback Integration

```python
from langchain_agentmesh import TrustCallbackHandler

# Monitor trust events
callback = TrustCallbackHandler(
    on_verification=lambda r: print(f"Verified: {r.peer_did}"),
    on_violation=lambda v: alert(f"Violation: {v}")
)

agent = create_agent(callbacks=[callback])
```

## Configuration

| Parameter | Default | Description |
|-----------|---------|-------------|
| `min_trust_score` | 0.5 | Minimum trust score required |
| `required_capabilities` | [] | Required capability list |
| `audit_logging` | False | Enable audit trail |
| `cache_ttl` | 900 | Verification cache TTL (seconds) |

## Related

- [AgentMesh](https://github.com/imran-siddique/agent-mesh) - Core trust mesh platform
- [Agent-OS](https://github.com/imran-siddique/agent-os) - Governance kernel

## License

MIT
yearn-treasury 0.2.1
This WIP library runs the eth-portfolio and dao-treasury exporters for the Yearn Finance treasury.
Requires Python: <3.13,>=3.10

This WIP library runs the [dao-treasury](https://github.com/BobTheBuidler/dao-treasury) exporter for the [Yearn Finance](https://yearn.fi/) treasury.

## Installation

- **pip:**
  ```bash
   pip install yearn-treasury
  ```

- **From Source:**  
  ```bash
  git clone https://github.com/BobTheBuidler/yearn-treasury
  cd yearn-treasury
  poetry install
  ```

## Requirements
- Python 3.10 or higher.
- At least 16GB of RAM.
- All dependencies installed as specified in the project’s pyproject.toml file.

## Prerequisites

- First, you will need to bring your own archive node. This can be one you run yourself, or one from one of the common providers (Tenderly, Alchemy, QuickNode, etc.). Your archive node must have tracing enabled (free-tier Alchemy nodes do not support this option).
- You must configure a [brownie network](https://eth-brownie.readthedocs.io/en/stable/network-management.html) to use your RPC.
- You will need an auth token for [Etherscan](https://etherscan.io/)'s API. Follow their [guide](https://docs.etherscan.io/etherscan-v2/getting-an-api-key) to get your key, and set env var `ETHERSCAN_TOKEN` with its value.
- You'll also need [Docker](https://www.docker.com/get-started/) installed on your system. If on MacOS, you will need to leave Docker Desktop open while Yearn Treasury is running.

## Usage

Run the treasury export tool:

```bash
# For pip installations:
GF_SECURITY_ADMIN_USER=admin GF_SECURITY_ADMIN_PASSWORD=... yearn-treasury --network mainnet --interval 12h
```

For local development (from source installation), use:
```bash
GF_SECURITY_ADMIN_USER=admin GF_SECURITY_ADMIN_PASSWORD=... poetry run yearn-treasury --network mainnet --interval 12h
```

**CLI Options:**
- `--network`: The id of the brownie network the exporter will connect to (default: mainnet)
- `--interval`: The time interval between each data snapshot (default: 12h)
- `--daemon`: Run the export process in the background (default: False) (NOTE: currently unsupported)
- `--grafana-port`: Set the port for the Grafana dashboard where you can view data (default: 3004)
- `--renderer-port`: Set the port for the report rendering service (default: 8080)
- `--victoria-port`: Set the port for the Victoria metrics reporting endpoint (default: 8430)

**Grafana Auth:**
- Requires `GF_SECURITY_ADMIN_USER` and `GF_SECURITY_ADMIN_PASSWORD`.
- Optional anonymous access via `DAO_TREASURY_GRAFANA_ANON_ENABLED=true`.

After running the command, the export script will run continuously until you close your terminal.
To access the dashboard, open your browser and navigate to [http://localhost:3004](http://localhost:3004) for the [dao-treasury](https://github.com/BobTheBuidler/dao-treasury) dashboard and log in with your Grafana admin credentials.

Enjoy!

## Screenshots

#### [Transactions Dashboard](https://bobthebuidler.github.io/yearn-treasury/transactions.html)

![image](https://github.com/user-attachments/assets/4293b62d-827a-4bae-af4f-014c99511f99)
kmbox-net-rust 1.0.1
Python bindings for KmBox Net
Requires Python: >=3.9

# KmBoxNet

[![PyPI](https://img.shields.io/pypi/v/kmbox-net-rust)](https://pypi.org/project/kmbox-net-rust/)

高性能的 KmBoxNet (网络版) Python 绑定库，基于 Rust 开发。

High-performance Python bindings for KmBoxNet, written in Rust.

## 功能特性 (Features)

*   🚀 **高性能**: 核心通讯逻辑由 Rust 实现，极低延迟。
*   🖱️ **全功能控制**: 支持鼠标移动、点击、滚轮，键盘按键控制。
*   🔐 **加密通信**: 支持加密协议，防止数据包特征检测。
*   👀 **硬件监听**: 支持监听物理键鼠的输入事件 (Monitor模式)。
*   🖼️ **LCD控制**: 支持修改屏幕颜色、显示图片。
*   🔧 **硬件算法**: 内置贝塞尔曲线等硬件级轨迹修正算法。

## 安装 (Installation)

使用 pip 安装：

```bash
pip install kmbox-net-rust
```

*注意：在代码中导入时请使用 `import kmbox_net`。*

## 快速开始 (Quick Start)

### 1. 连接设备与控制

```python
import kmbox_net
import time

# 连接设备
# IP: 盒子显示的IP (例如 192.168.2.188)
# Port: 端口 (默认 8888)
# MAC: 盒子MAC地址 (例如 "0B50E466")，用于握手和加密
client = kmbox_net.KmBoxNetClient("192.168.2.188", 8888, "0B50E466")

# 鼠标相对移动 (X=100, Y=100)
client.mouse_move(100, 100)

# 鼠标左键点击
client.mouse_left(True)  # 按下
time.sleep(0.05)
client.mouse_left(False) # 松开

# 键盘输入 (按下 'A')
client.keydown(kmbox_net.KEY_A)
time.sleep(0.05)
client.keyup(kmbox_net.KEY_A)
```

### 2. 监听物理键鼠 (Monitor)

```python
import kmbox_net
import time

# 定义回调函数
def on_event(mouse: kmbox_net.HardMouse, keyboard: kmbox_net.HardKeyboard):
    # 打印鼠标数据
    if mouse.buttons != 0 or mouse.x != 0 or mouse.y != 0:
        print(f"[Mouse] Btn:{mouse.buttons} X:{mouse.x} Y:{mouse.y}")
    
    # 打印键盘数据
    if keyboard.data:
        print(f"[Keyboard] Keys:{keyboard.data}")

# 1. 在本地端口 12345 开启监听线程
monitor = kmbox_net.KmBoxNetMonitor(12345, on_event)

# 2. 告诉盒子把数据推流到这个端口
# 注意：你需要先连接上盒子
client = kmbox_net.KmBoxNetClient("192.168.2.188", 8888, "0B50E466")
client.monitor(12345)

print("正在监听物理键鼠输入... 按 Ctrl+C 停止")
try:
    while True:
        time.sleep(1)
except KeyboardInterrupt:
    client.monitor(0) # 停止推流
    monitor.shutdown() # 停止本地监听
```

### 3. 加密功能 (Encryption)

```python
import kmbox_net

# 使用加密通道移动鼠标 (防止抓包特征)
client.enc_mouse_move(100, 100)

# XXTEA 加密工具函数 (原地修改)
data = bytearray(128)
key = b"1234567890123456"
kmbox_net.xxtea_encrypt(data, key)
```

## 编译指南 (Building from source)

如果你需要自己编译项目，需要安装 Rust 工具链。

```bash
# 安装 maturin
pip install maturin

# 编译并安装到当前环境
maturin develop --release
```

## License

MIT