diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2d867fd..d3ed6f4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -5,16 +5,20 @@ on: tags: - "v*" +permissions: + contents: read + jobs: publish: + name: Publish to PyPI runs-on: ubuntu-latest permissions: id-token: write + contents: read steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.7 + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - - name: Set up Python - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.3.0 + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 with: python-version: "3.12" @@ -25,4 +29,6 @@ jobs: run: python -m build - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 # v1.12.3 + uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0 + with: + attestations: true diff --git a/README.md b/README.md index b9eec10..97ea027 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ + > **For AI agents:** This is the official Python SDK for CueAPI. Run `pip install cueapi-sdk`. Your API key is in `CUEAPI_API_KEY`. Create a client: `client = CueAPI(os.environ["CUEAPI_API_KEY"])`. Schedule a task: `client.cues.create(name="task-name", cron="0 9 * * *", callback="https://your-handler.com", payload={})`. For agents without a public URL: set `transport="worker"` and run `pip install cueapi-worker`, then define a handler with `@worker.handler("task-name")` returning `{"success": true}` or `{"success": false, "error": "reason"}`. List executions: `client.executions.list()`. Get one: `client.executions.get("exec_id")`. Do not retry on `AuthenticationError` or `CueLimitExceededError`. Wait `e.retry_after` seconds on `RateLimitError`. # cueapi-sdk @@ -267,6 +268,12 @@ See [`/examples`](examples/) for working code: --- +## Releases + +Releases are published to PyPI with PEP 740 attestations via GitHub Actions Trusted Publishing. + +--- + ## License MIT. See [LICENSE](LICENSE). diff --git a/cueapi/__init__.py b/cueapi/__init__.py index fc882f3..3dc5817 100644 --- a/cueapi/__init__.py +++ b/cueapi/__init__.py @@ -14,7 +14,7 @@ from cueapi.resources.executions import ExecutionsResource from cueapi.webhook import verify_webhook -__version__ = "0.1.0" +__version__ = "0.1.2" __all__ = [ "CueAPI", diff --git a/cueapi/resources/executions.py b/cueapi/resources/executions.py index 4a4d017..713a28d 100644 --- a/cueapi/resources/executions.py +++ b/cueapi/resources/executions.py @@ -58,6 +58,7 @@ def report_outcome( metadata: Optional[dict] = None, external_id: Optional[str] = None, result_url: Optional[str] = None, + result_ref: Optional[str] = None, result_type: Optional[str] = None, summary: Optional[str] = None, artifacts: Optional[list] = None, @@ -74,6 +75,8 @@ def report_outcome( body["external_id"] = external_id if result_url is not None: body["result_url"] = result_url + if result_ref is not None: + body["result_ref"] = result_ref if result_type is not None: body["result_type"] = result_type if summary is not None: diff --git a/pyproject.toml b/pyproject.toml index 1a598ac..c5cce87 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,24 +4,51 @@ build-backend = "hatchling.build" [project] name = "cueapi-sdk" -version = "0.1.0" -description = "The official Python SDK for CueAPI — scheduling infrastructure for agents" +version = "0.1.3" +description = "Official Python SDK for CueAPI — open-source execution accountability primitive for AI agents. Schedule agent work, require evidence-backed outcomes, and gate execution with write-once verification." readme = "README.md" -license = { text = "MIT" } +license = { text = "Apache-2.0" } requires-python = ">=3.9" -authors = [{ name = "CueAPI", email = "support@cueapi.ai" }] -keywords = ["cueapi", "scheduling", "ai-agents", "cron", "webhooks", "sdk"] +authors = [{ name = "Vector Apps", email = "support@cueapi.ai" }] +maintainers = [{ name = "Vector Apps", email = "support@cueapi.ai" }] +keywords = [ + "cueapi", + "ai-agents", + "agent-infrastructure", + "scheduling", + "cron", + "webhooks", + "sdk", + "llm", + "llm-observability", + "accountability", + "verification", + "outcome-reporting", + "claude", + "gpt", + "gemini", +] classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", + "Intended Audience :: System Administrators", + "Intended Audience :: Information Technology", + "License :: OSI Approved :: Apache Software License", + "Operating System :: OS Independent", + "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3 :: Only", "Topic :: Software Development :: Libraries", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: System :: Monitoring", + "Topic :: System :: Distributed Computing", + "Topic :: Internet :: WWW/HTTP", + "Typing :: Typed", ] dependencies = [ "httpx>=0.24.0", @@ -32,6 +59,10 @@ dependencies = [ Homepage = "https://cueapi.ai" Documentation = "https://docs.cueapi.ai" Repository = "https://github.com/cueapi/cueapi-python" +"Bug Tracker" = "https://github.com/cueapi/cueapi-python/issues" +Changelog = "https://github.com/cueapi/cueapi-python/blob/main/CHANGELOG.md" +"Source Code" = "https://github.com/cueapi/cueapi-python" +"Status Page" = "https://status.cueapi.ai" [tool.pytest.ini_options] testpaths = ["tests"]