Metadata-Version: 2.4
Name: gatecore-sdk
Version: 0.1.0
Summary: GateCore client SDK: build, sign (Ed25519), and submit governed AI interaction requests
Author-email: GateCore AI LLC <hello@gatecoreai.com>
License-Expression: MIT
Project-URL: Homepage, https://gatecoreai.com
Project-URL: Repository, https://github.com/GateCoreAI-com/GateCoreAI
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx>=0.27
Requires-Dist: cryptography>=42
Dynamic: license-file

# gatecore-sdk

`gatecore-sdk` is GateCore's Python client SDK. It builds a GateCore interaction request,
signs it with an Ed25519 private key, and submits it to a GateCore gateway for governed
execution. The SDK contains transport and signing only; GateCore services enforce identity,
policy, trust, provenance, pricing, funding, delegation, and settlement.

## Install from the GateCore monorepo

```bash
python -m pip install -e ./libs/sdk
```

## Usage

```python
from gatecore_sdk import GateCoreClient

client = GateCoreClient("https://api.example.com", bearer_token="...")

req = client.build_request(
    origin_entity_id="agent:example",
    target_type="tool",
    target_id="example-tool",
    operation="tool_call",
    payload={"query": "example"},
)
signed = client.sign_request(req, private_key_pem=open("/secure/path/agent-key.pem").read())
decision = client.execute(signed)
```

`build_request` auto-attaches `provenance.payload_sha256`, matching the provenance engine's
canonicalization exactly. `sign_request` signs the canonical request payload with an Ed25519
private key (PEM, PKCS8). `mediate()` builds, optionally signs, and posts to `/v1/mediate` in
one call; `execute()` posts an already-signed request to `/v1/execute`.

## Note on internal module layout

The SDK's signing/transport implementation lives at `gatecore_sdk._common` (private — not
part of the public API; import `GateCoreClient` from `gatecore_sdk` directly, as shown above).
An earlier working copy of this package exposed the same code as a separate top-level
`gatecore_common` module. That name was never published to PyPI, so this rename has no
external-consumer impact; it exists to avoid a published package claiming a second, overly
generic top-level import name (`gatecore_common`) alongside `gatecore_sdk`.
