agenthandler 0.92.0__tar.gz → 0.93.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {agenthandler-0.92.0 → agenthandler-0.93.0}/.gitignore +0 -5
- {agenthandler-0.92.0 → agenthandler-0.93.0}/CHANGELOG.md +6 -1
- {agenthandler-0.92.0 → agenthandler-0.93.0}/PKG-INFO +39 -38
- {agenthandler-0.92.0 → agenthandler-0.93.0}/README.md +36 -37
- {agenthandler-0.92.0 → agenthandler-0.93.0}/agenthandler/__init__.py +33 -1
- agenthandler-0.93.0/agenthandler/a2a.py +624 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/agenthandler/connectors.py +3 -3
- agenthandler-0.93.0/agenthandler/mcp_server.py +318 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/agenthandler/observe.py +8 -8
- {agenthandler-0.92.0 → agenthandler-0.93.0}/agenthandler/redact.py +1 -1
- agenthandler-0.93.0/agenthandler/sdk_adapters.py +303 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/agenthandler/server.py +1 -7
- {agenthandler-0.92.0 → agenthandler-0.93.0}/agenthandler/streams.py +3 -3
- agenthandler-0.93.0/examples/a2a_agents.py +145 -0
- agenthandler-0.93.0/examples/mcp_server.py +72 -0
- agenthandler-0.93.0/examples/sdk_adapters.py +175 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/npm/package.json +1 -7
- {agenthandler-0.92.0 → agenthandler-0.93.0}/pyproject.toml +5 -2
- agenthandler-0.93.0/tests/test_a2a.py +456 -0
- agenthandler-0.93.0/tests/test_sdk_adapters.py +372 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/tests/test_server.py +0 -14
- agenthandler-0.92.0/docs/superpowers/plans/2026-06-09-hardening-pass.md +0 -1138
- agenthandler-0.92.0/docs/superpowers/specs/2026-06-09-hardening-pass-design.md +0 -91
- agenthandler-0.92.0/openclaw-plugin/openclaw.plugin.json +0 -30
- agenthandler-0.92.0/openclaw-plugin/package.json +0 -22
- agenthandler-0.92.0/openclaw-plugin/src/index.ts +0 -120
- agenthandler-0.92.0/openclaw-plugin/tsconfig.json +0 -12
- {agenthandler-0.92.0 → agenthandler-0.93.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/.github/workflows/ci.yml +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/.github/workflows/claude-pr-review.yml +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/CONTRIBUTING.md +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/LICENSE +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/agenthandler/approval.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/agenthandler/audit.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/agenthandler/auth.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/agenthandler/budget.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/agenthandler/builder.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/agenthandler/circuit_breaker.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/agenthandler/context.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/agenthandler/errors.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/agenthandler/guardrails/__init__.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/agenthandler/guardrails/deterministic.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/agenthandler/guardrails/llm_based.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/agenthandler/guardrails/types.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/agenthandler/openclaw.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/agenthandler/pipeline.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/agenthandler/pipeline_poml.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/agenthandler/policy.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/agenthandler/py.typed +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/agenthandler/reflection.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/agenthandler/replay.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/agenthandler/session.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/agenthandler/skill.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/agenthandler/store.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/agenthandler/supervisor.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/agenthandler/triggers.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/dashboard.html +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/docs/architecture.svg +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/docs/manifesto.md +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/examples/approval_flow.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/examples/audit_logging.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/examples/basic.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/examples/circuit_breaker.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/examples/context_compression.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/examples/cost_attribution.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/examples/data_flows.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/examples/from_config.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/examples/guardrails.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/examples/long_running_agent.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/examples/openclaw_bridge.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/examples/pii_redaction.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/examples/pipeline.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/examples/poml_pipeline.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/examples/session_lifecycle.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/examples/skill_builder.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/examples/streaming.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/examples/tool_scoping.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/examples/triggers.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/npm/README.md +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/npm/bin/agenthandler.js +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/tests/__init__.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/tests/test_approval.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/tests/test_audit.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/tests/test_budget.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/tests/test_circuit_breaker.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/tests/test_connectors.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/tests/test_context.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/tests/test_cost_attribution.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/tests/test_errors.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/tests/test_guardrails.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/tests/test_llm_decisions.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/tests/test_observe.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/tests/test_openclaw.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/tests/test_pipeline.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/tests/test_pipeline_poml.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/tests/test_policy.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/tests/test_redact.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/tests/test_replay_reflection.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/tests/test_schema_discovery.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/tests/test_scopes.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/tests/test_session.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/tests/test_skill.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/tests/test_store.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/tests/test_streams.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/tests/test_supervisor.py +0 -0
- {agenthandler-0.92.0 → agenthandler-0.93.0}/tests/test_triggers.py +0 -0
|
@@ -12,9 +12,14 @@ All notable changes to AgentHandler are documented here.
|
|
|
12
12
|
- Test count badge in README.
|
|
13
13
|
|
|
14
14
|
### Changed
|
|
15
|
-
- **
|
|
15
|
+
- **Rebrand**: Clawboss → AgentHandler. `pip install agenthandler`.
|
|
16
|
+
- **MCP server mode**: `SupervisedMCPServer` exposes tools via Model Context Protocol with full supervision. `pip install agenthandler[mcp]`.
|
|
17
|
+
- **mypy --strict** enabled across all 30 source files with zero errors. Full type annotations on every function.
|
|
16
18
|
- Python 3.13 compatibility: replaced deprecated `asyncio.get_event_loop()` in approval tests.
|
|
17
19
|
|
|
20
|
+
### Removed
|
|
21
|
+
- `openclaw-plugin/` directory — superseded by native MCP server mode. The Python-side `OpenClawBridge` remains for backward compatibility.
|
|
22
|
+
|
|
18
23
|
## [0.91.0] — 2026-06-10
|
|
19
24
|
|
|
20
25
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agenthandler
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.93.0
|
|
4
4
|
Summary: A way of controlling deployed agents to keep your (and their) sanity.
|
|
5
5
|
Project-URL: Homepage, https://github.com/arunvenkatadri/AgentHandler
|
|
6
6
|
Project-URL: Repository, https://github.com/arunvenkatadri/AgentHandler
|
|
@@ -29,6 +29,8 @@ Provides-Extra: kafka
|
|
|
29
29
|
Requires-Dist: aiokafka>=0.10; extra == 'kafka'
|
|
30
30
|
Provides-Extra: kinesis
|
|
31
31
|
Requires-Dist: aioboto3>=12.0; extra == 'kinesis'
|
|
32
|
+
Provides-Extra: mcp
|
|
33
|
+
Requires-Dist: mcp>=1.0; extra == 'mcp'
|
|
32
34
|
Provides-Extra: redis
|
|
33
35
|
Requires-Dist: redis>=5.0; extra == 'redis'
|
|
34
36
|
Provides-Extra: server
|
|
@@ -56,9 +58,11 @@ Description-Content-Type: text/markdown
|
|
|
56
58
|
[]()
|
|
57
59
|
[]()
|
|
58
60
|
|
|
59
|
-
|
|
61
|
+
*Every agent needs a handler.*
|
|
60
62
|
|
|
61
|
-
|
|
63
|
+
**AgentHandler is the governance layer for AI agents.** Wrap tool calls with timeouts, budgets, circuit breakers, guardrails, and audit logging — so one bad tool call doesn't drain your wallet or loop forever. MCP-native, with adapters for OpenAI Agents SDK and Claude Agent SDK.
|
|
64
|
+
|
|
65
|
+
Zero dependencies. Works with **any agent framework** — OpenAI Agents SDK, Claude Agent SDK, Mastra, LangChain, CrewAI, your own custom loop, whatever. Just wrap your tool calls. Includes durable sessions that survive restarts, a REST control plane, MCP server mode, and a [dashboard](#dashboard) for managing everything in one place.
|
|
62
66
|
|
|
63
67
|
> **AgentHandler is built for long-duration agents** — agents that run for hours or days, not minutes. Read [the manifesto](docs/manifesto.md) for the full vision.
|
|
64
68
|
|
|
@@ -178,11 +182,12 @@ The Sessions tab connects to the REST control plane (`uvicorn agenthandler.serve
|
|
|
178
182
|
AgentHandler doesn't care what framework you use. It supervises tool calls — any async or sync callable. If your agent calls tools, AgentHandler can wrap them.
|
|
179
183
|
|
|
180
184
|
```python
|
|
181
|
-
#
|
|
182
|
-
#
|
|
183
|
-
#
|
|
185
|
+
# OpenAI Agents SDK? Wrap your tools.
|
|
186
|
+
# Claude Agent SDK? Wrap your tools.
|
|
187
|
+
# Mastra? Wrap your tools.
|
|
188
|
+
# LangChain / CrewAI? Wrap your tools.
|
|
189
|
+
# MCP server? Built-in (see below).
|
|
184
190
|
# Custom loop? Wrap your tools.
|
|
185
|
-
# OpenClaw? There's a built-in bridge (see below).
|
|
186
191
|
|
|
187
192
|
result = await supervisor.call("my_tool", my_tool_fn, **kwargs)
|
|
188
193
|
```
|
|
@@ -792,46 +797,42 @@ AgentHandler is designed to supervise untrusted agent behavior. The stateful ses
|
|
|
792
797
|
|
|
793
798
|
**Sessions can expire.** Call `SqliteStore.delete_expired(max_age_seconds)` to clean up old sessions.
|
|
794
799
|
|
|
795
|
-
##
|
|
800
|
+
## MCP server mode
|
|
801
|
+
|
|
802
|
+
Expose supervised tools via Model Context Protocol. Any MCP client — Claude Desktop, Claude Code, Cursor — gets governed tool access with full supervision.
|
|
796
803
|
|
|
797
|
-
|
|
804
|
+
```bash
|
|
805
|
+
pip install agenthandler[mcp]
|
|
806
|
+
```
|
|
798
807
|
|
|
799
808
|
```python
|
|
800
|
-
from agenthandler import
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
809
|
+
from agenthandler import SupervisedMCPServer, UrlGuard, RecursionDetector
|
|
810
|
+
|
|
811
|
+
server = SupervisedMCPServer(
|
|
812
|
+
name="my-tools",
|
|
813
|
+
tools={
|
|
814
|
+
"search": search_fn,
|
|
815
|
+
"write": write_fn,
|
|
816
|
+
"send_email": email_fn,
|
|
817
|
+
},
|
|
818
|
+
policy={
|
|
819
|
+
"tool_timeout": 30,
|
|
820
|
+
"token_budget": 50000,
|
|
821
|
+
"require_confirm": ["send_email"],
|
|
822
|
+
},
|
|
823
|
+
pre_guardrails=[
|
|
824
|
+
UrlGuard(allowlist=["*.example.com"]),
|
|
825
|
+
RecursionDetector(max_repeats=3),
|
|
815
826
|
],
|
|
816
|
-
supervision={"tool_timeout": 15, "max_iterations": 5, "token_budget": 10000},
|
|
817
827
|
)
|
|
818
828
|
|
|
819
|
-
#
|
|
820
|
-
|
|
821
|
-
bridge.register_skill(skill, {"web_search": my_search_fn})
|
|
822
|
-
bridge.serve() # GET /tools, POST /execute/{name}
|
|
829
|
+
server.run() # stdio for Claude Desktop
|
|
830
|
+
# server.run(transport="streamable-http") # network mode
|
|
823
831
|
```
|
|
824
832
|
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
You can also convert schemas without running a bridge:
|
|
833
|
+
Every tool call through MCP goes through the Supervisor — timeouts, budgets, circuit breakers, PII redaction, guardrails, approvals, audit, cost tracking. A capability manifest is available at `agenthandler://manifest`.
|
|
828
834
|
|
|
829
|
-
|
|
830
|
-
from agenthandler import to_openclaw_tool_schema, to_openclaw_manifest
|
|
831
|
-
|
|
832
|
-
schema = to_openclaw_tool_schema(tool_def) # OpenClaw JSON Schema format
|
|
833
|
-
manifest = to_openclaw_manifest(skill) # openclaw.plugin.json content
|
|
834
|
-
```
|
|
835
|
+
See `examples/mcp_server.py` for a full working example.
|
|
835
836
|
|
|
836
837
|
## Policy from config
|
|
837
838
|
|
|
@@ -13,9 +13,11 @@
|
|
|
13
13
|
[]()
|
|
14
14
|
[]()
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
*Every agent needs a handler.*
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
**AgentHandler is the governance layer for AI agents.** Wrap tool calls with timeouts, budgets, circuit breakers, guardrails, and audit logging — so one bad tool call doesn't drain your wallet or loop forever. MCP-native, with adapters for OpenAI Agents SDK and Claude Agent SDK.
|
|
19
|
+
|
|
20
|
+
Zero dependencies. Works with **any agent framework** — OpenAI Agents SDK, Claude Agent SDK, Mastra, LangChain, CrewAI, your own custom loop, whatever. Just wrap your tool calls. Includes durable sessions that survive restarts, a REST control plane, MCP server mode, and a [dashboard](#dashboard) for managing everything in one place.
|
|
19
21
|
|
|
20
22
|
> **AgentHandler is built for long-duration agents** — agents that run for hours or days, not minutes. Read [the manifesto](docs/manifesto.md) for the full vision.
|
|
21
23
|
|
|
@@ -135,11 +137,12 @@ The Sessions tab connects to the REST control plane (`uvicorn agenthandler.serve
|
|
|
135
137
|
AgentHandler doesn't care what framework you use. It supervises tool calls — any async or sync callable. If your agent calls tools, AgentHandler can wrap them.
|
|
136
138
|
|
|
137
139
|
```python
|
|
138
|
-
#
|
|
139
|
-
#
|
|
140
|
-
#
|
|
140
|
+
# OpenAI Agents SDK? Wrap your tools.
|
|
141
|
+
# Claude Agent SDK? Wrap your tools.
|
|
142
|
+
# Mastra? Wrap your tools.
|
|
143
|
+
# LangChain / CrewAI? Wrap your tools.
|
|
144
|
+
# MCP server? Built-in (see below).
|
|
141
145
|
# Custom loop? Wrap your tools.
|
|
142
|
-
# OpenClaw? There's a built-in bridge (see below).
|
|
143
146
|
|
|
144
147
|
result = await supervisor.call("my_tool", my_tool_fn, **kwargs)
|
|
145
148
|
```
|
|
@@ -749,46 +752,42 @@ AgentHandler is designed to supervise untrusted agent behavior. The stateful ses
|
|
|
749
752
|
|
|
750
753
|
**Sessions can expire.** Call `SqliteStore.delete_expired(max_age_seconds)` to clean up old sessions.
|
|
751
754
|
|
|
752
|
-
##
|
|
755
|
+
## MCP server mode
|
|
756
|
+
|
|
757
|
+
Expose supervised tools via Model Context Protocol. Any MCP client — Claude Desktop, Claude Code, Cursor — gets governed tool access with full supervision.
|
|
753
758
|
|
|
754
|
-
|
|
759
|
+
```bash
|
|
760
|
+
pip install agenthandler[mcp]
|
|
761
|
+
```
|
|
755
762
|
|
|
756
763
|
```python
|
|
757
|
-
from agenthandler import
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
764
|
+
from agenthandler import SupervisedMCPServer, UrlGuard, RecursionDetector
|
|
765
|
+
|
|
766
|
+
server = SupervisedMCPServer(
|
|
767
|
+
name="my-tools",
|
|
768
|
+
tools={
|
|
769
|
+
"search": search_fn,
|
|
770
|
+
"write": write_fn,
|
|
771
|
+
"send_email": email_fn,
|
|
772
|
+
},
|
|
773
|
+
policy={
|
|
774
|
+
"tool_timeout": 30,
|
|
775
|
+
"token_budget": 50000,
|
|
776
|
+
"require_confirm": ["send_email"],
|
|
777
|
+
},
|
|
778
|
+
pre_guardrails=[
|
|
779
|
+
UrlGuard(allowlist=["*.example.com"]),
|
|
780
|
+
RecursionDetector(max_repeats=3),
|
|
772
781
|
],
|
|
773
|
-
supervision={"tool_timeout": 15, "max_iterations": 5, "token_budget": 10000},
|
|
774
782
|
)
|
|
775
783
|
|
|
776
|
-
#
|
|
777
|
-
|
|
778
|
-
bridge.register_skill(skill, {"web_search": my_search_fn})
|
|
779
|
-
bridge.serve() # GET /tools, POST /execute/{name}
|
|
784
|
+
server.run() # stdio for Claude Desktop
|
|
785
|
+
# server.run(transport="streamable-http") # network mode
|
|
780
786
|
```
|
|
781
787
|
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
You can also convert schemas without running a bridge:
|
|
788
|
+
Every tool call through MCP goes through the Supervisor — timeouts, budgets, circuit breakers, PII redaction, guardrails, approvals, audit, cost tracking. A capability manifest is available at `agenthandler://manifest`.
|
|
785
789
|
|
|
786
|
-
|
|
787
|
-
from agenthandler import to_openclaw_tool_schema, to_openclaw_manifest
|
|
788
|
-
|
|
789
|
-
schema = to_openclaw_tool_schema(tool_def) # OpenClaw JSON Schema format
|
|
790
|
-
manifest = to_openclaw_manifest(skill) # openclaw.plugin.json content
|
|
791
|
-
```
|
|
790
|
+
See `examples/mcp_server.py` for a full working example.
|
|
792
791
|
|
|
793
792
|
## Policy from config
|
|
794
793
|
|
|
@@ -17,7 +17,7 @@ Usage:
|
|
|
17
17
|
print(result.error)
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
|
-
__version__ = "0.
|
|
20
|
+
__version__ = "0.93.0"
|
|
21
21
|
|
|
22
22
|
from .approval import ApprovalQueue, ApprovalRequest, ApprovalStatus
|
|
23
23
|
from .audit import AuditEntry, AuditLog, AuditOutcome, AuditPhase, AuditSink, JsonlAuditSink
|
|
@@ -54,6 +54,13 @@ from .policy import Action, OnFailure, Policy, ScopeRule, ToolScope
|
|
|
54
54
|
from .redact import Redactor
|
|
55
55
|
from .reflection import ReflectionCycle, ReflectionLoop, ReflectionResult
|
|
56
56
|
from .replay import ReplayFrame, ReplaySummary, SessionReplay
|
|
57
|
+
from .sdk_adapters import (
|
|
58
|
+
AgentHandlerMiddleware,
|
|
59
|
+
openai_guardrail_adapter,
|
|
60
|
+
supervised_tool_registry,
|
|
61
|
+
wrap_claude_tool,
|
|
62
|
+
wrap_openai_tool,
|
|
63
|
+
)
|
|
57
64
|
from .session import SessionManager
|
|
58
65
|
from .skill import Skill, SkillStore, ToolDefinition, ToolParameter
|
|
59
66
|
from .store import (
|
|
@@ -73,6 +80,16 @@ from .streams import (
|
|
|
73
80
|
from .supervisor import SupervisedResult, Supervisor
|
|
74
81
|
from .triggers import DbWatchEntry, Scheduler, WebhookTrigger
|
|
75
82
|
|
|
83
|
+
try:
|
|
84
|
+
from .mcp_server import SupervisedMCPServer
|
|
85
|
+
except ImportError:
|
|
86
|
+
pass
|
|
87
|
+
|
|
88
|
+
try:
|
|
89
|
+
from .a2a import A2AAgentCard, A2AClient, A2ASkill, A2ASupervisedEndpoint, A2ATask, TaskState
|
|
90
|
+
except ImportError:
|
|
91
|
+
pass
|
|
92
|
+
|
|
76
93
|
__all__ = [
|
|
77
94
|
"Policy",
|
|
78
95
|
"OnFailure",
|
|
@@ -160,4 +177,19 @@ __all__ = [
|
|
|
160
177
|
"SessionReplay",
|
|
161
178
|
"ReplayFrame",
|
|
162
179
|
"ReplaySummary",
|
|
180
|
+
# MCP
|
|
181
|
+
"SupervisedMCPServer",
|
|
182
|
+
# A2A
|
|
183
|
+
"A2AAgentCard",
|
|
184
|
+
"A2AClient",
|
|
185
|
+
"A2ASkill",
|
|
186
|
+
"A2ASupervisedEndpoint",
|
|
187
|
+
"A2ATask",
|
|
188
|
+
"TaskState",
|
|
189
|
+
# SDK adapters
|
|
190
|
+
"wrap_openai_tool",
|
|
191
|
+
"wrap_claude_tool",
|
|
192
|
+
"openai_guardrail_adapter",
|
|
193
|
+
"supervised_tool_registry",
|
|
194
|
+
"AgentHandlerMiddleware",
|
|
163
195
|
]
|