truceptor 0.3.2__py3-none-any.whl
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.
- acp/__init__.py +16 -0
- acp/bundle/dashboard/app.js +1564 -0
- acp/bundle/dashboard/index.html +123 -0
- acp/bundle/dashboard/styles.css +1114 -0
- acp/bundle/docker-compose.yml +82 -0
- acp/bundle/interceptor/Dockerfile +16 -0
- acp/bundle/interceptor/README.md +105 -0
- acp/bundle/interceptor/api/openapi.yaml +220 -0
- acp/bundle/interceptor/cmd/server/main.go +41 -0
- acp/bundle/interceptor/go.mod +47 -0
- acp/bundle/interceptor/go.sum +111 -0
- acp/bundle/interceptor/internal/approval/errors.go +10 -0
- acp/bundle/interceptor/internal/approval/repository.go +12 -0
- acp/bundle/interceptor/internal/approval/store.go +221 -0
- acp/bundle/interceptor/internal/approval/store_test.go +47 -0
- acp/bundle/interceptor/internal/approval/sync.go +48 -0
- acp/bundle/interceptor/internal/approval/sync_test.go +53 -0
- acp/bundle/interceptor/internal/audit/events.go +6 -0
- acp/bundle/interceptor/internal/audit/logger.go +53 -0
- acp/bundle/interceptor/internal/audit/store.go +116 -0
- acp/bundle/interceptor/internal/audit/store_iface.go +9 -0
- acp/bundle/interceptor/internal/auth/context.go +41 -0
- acp/bundle/interceptor/internal/auth/load.go +42 -0
- acp/bundle/interceptor/internal/auth/principal.go +9 -0
- acp/bundle/interceptor/internal/auth/validator.go +168 -0
- acp/bundle/interceptor/internal/auth/validator_test.go +61 -0
- acp/bundle/interceptor/internal/config/config.go +24 -0
- acp/bundle/interceptor/internal/config/env.go +83 -0
- acp/bundle/interceptor/internal/gateway/bootstrap.go +51 -0
- acp/bundle/interceptor/internal/gateway/router.go +36 -0
- acp/bundle/interceptor/internal/gateway/routes.go +42 -0
- acp/bundle/interceptor/internal/gateway/server.go +90 -0
- acp/bundle/interceptor/internal/handlers/agent_handler.go +94 -0
- acp/bundle/interceptor/internal/handlers/approval_handler.go +122 -0
- acp/bundle/interceptor/internal/handlers/insights_handler.go +37 -0
- acp/bundle/interceptor/internal/handlers/policy_catalog_handler.go +35 -0
- acp/bundle/interceptor/internal/handlers/replay_handler.go +61 -0
- acp/bundle/interceptor/internal/handlers/tool_handler.go +51 -0
- acp/bundle/interceptor/internal/middleware/auth.go +29 -0
- acp/bundle/interceptor/internal/middleware/cors.go +60 -0
- acp/bundle/interceptor/internal/middleware/jwt.go +47 -0
- acp/bundle/interceptor/internal/middleware/logging.go +35 -0
- acp/bundle/interceptor/internal/middleware/recovery.go +27 -0
- acp/bundle/interceptor/internal/middleware/tracing.go +15 -0
- acp/bundle/interceptor/internal/models/policy.go +38 -0
- acp/bundle/interceptor/internal/models/request.go +11 -0
- acp/bundle/interceptor/internal/models/response.go +8 -0
- acp/bundle/interceptor/internal/policy/evaluator.go +64 -0
- acp/bundle/interceptor/internal/policy/mapper.go +33 -0
- acp/bundle/interceptor/internal/policy/opa_client.go +83 -0
- acp/bundle/interceptor/internal/policycatalog/rules.go +242 -0
- acp/bundle/interceptor/internal/policycatalog/rules_test.go +80 -0
- acp/bundle/interceptor/internal/policycatalog/scanner.go +126 -0
- acp/bundle/interceptor/internal/policycatalog/scanner_test.go +54 -0
- acp/bundle/interceptor/internal/registry/agent.go +53 -0
- acp/bundle/interceptor/internal/registry/memory.go +154 -0
- acp/bundle/interceptor/internal/replay/service.go +187 -0
- acp/bundle/interceptor/internal/replay/service_test.go +76 -0
- acp/bundle/interceptor/internal/services/audit_service.go +18 -0
- acp/bundle/interceptor/internal/services/interceptor_service.go +183 -0
- acp/bundle/interceptor/internal/services/policy_service.go +23 -0
- acp/bundle/interceptor/internal/storage/postgres/agents.go +153 -0
- acp/bundle/interceptor/internal/storage/postgres/approval.go +171 -0
- acp/bundle/interceptor/internal/storage/postgres/audit.go +156 -0
- acp/bundle/interceptor/internal/storage/postgres/db.go +62 -0
- acp/bundle/interceptor/internal/storage/postgres/migrations/001_schema.sql +55 -0
- acp/bundle/interceptor/internal/storage/postgres/migrations/002_seed_agents.sql +7 -0
- acp/bundle/interceptor/internal/tracing/context.go +24 -0
- acp/bundle/interceptor/internal/tracing/trace.go +34 -0
- acp/bundle/interceptor/internal/utils/errors.go +13 -0
- acp/bundle/interceptor/internal/utils/response.go +28 -0
- acp/bundle/interceptor/internal/utils/validation.go +21 -0
- acp/bundle/interceptor/policies/README.md +102 -0
- acp/bundle/interceptor/policies/mortgage_application.rego +25 -0
- acp/bundle/interceptor/policies/mortgage_underwriting.rego +34 -0
- acp/bundle/interceptor/policies/rbac.rego +50 -0
- acp/bundle/interceptor/policies/router.rego +30 -0
- acp/bundle/interceptor/scripts/generate-jwt-keys.sh +35 -0
- acp/bundle/interceptor/scripts/run-local.sh +24 -0
- acp/bundle/jwt/public.pem +9 -0
- acp/bundle/nginx-dashboard.conf +26 -0
- acp/bundle/nginx-gateway.conf +36 -0
- acp/bundle/policies/README.md +102 -0
- acp/bundle/policies/mortgage_application.rego +25 -0
- acp/bundle/policies/mortgage_underwriting.rego +34 -0
- acp/bundle/policies/rbac.rego +50 -0
- acp/bundle/policies/router.rego +30 -0
- acp/bundle/public/index.html +12 -0
- acp/cli.py +177 -0
- acp/client.py +215 -0
- acp/config.py +19 -0
- acp/decorators.py +61 -0
- acp/exceptions.py +30 -0
- acp/policies.py +113 -0
- acp/policy-starter/mortgage_application.rego +25 -0
- acp/policy-starter/mortgage_underwriting.rego +34 -0
- acp/policy-starter/rbac.rego +50 -0
- acp/policy-starter/router.rego +30 -0
- acp/runtime.py +93 -0
- truceptor-0.3.2.dist-info/METADATA +401 -0
- truceptor-0.3.2.dist-info/RECORD +105 -0
- truceptor-0.3.2.dist-info/WHEEL +5 -0
- truceptor-0.3.2.dist-info/entry_points.txt +2 -0
- truceptor-0.3.2.dist-info/licenses/LICENSE +21 -0
- truceptor-0.3.2.dist-info/top_level.txt +1 -0
acp/__init__.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""ACP Python SDK + CLI — governed execution client for the interceptor."""
|
|
2
|
+
|
|
3
|
+
__version__ = "0.3.2"
|
|
4
|
+
|
|
5
|
+
from acp.client import ACPClient, ToolCallResponse
|
|
6
|
+
from acp.decorators import governed_tool
|
|
7
|
+
from acp.exceptions import ACPSDKError, PolicyDenied, PolicyEscalated
|
|
8
|
+
|
|
9
|
+
__all__ = [
|
|
10
|
+
"ACPClient",
|
|
11
|
+
"ToolCallResponse",
|
|
12
|
+
"governed_tool",
|
|
13
|
+
"ACPSDKError",
|
|
14
|
+
"PolicyDenied",
|
|
15
|
+
"PolicyEscalated",
|
|
16
|
+
]
|