From 3113ef3eced45d33a6b626985538b28d994ca472 Mon Sep 17 00:00:00 2001 From: Gk Date: Sun, 29 Mar 2026 07:44:31 +0530 Subject: [PATCH 01/18] ci: add SDK staging integration test workflow Runs SDK tests against cueapi-core staging environment. Triggered manually or via repository_dispatch from cueapi-core. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/staging-integration.yml | 26 +++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/staging-integration.yml diff --git a/.github/workflows/staging-integration.yml b/.github/workflows/staging-integration.yml new file mode 100644 index 0000000..2e463bb --- /dev/null +++ b/.github/workflows/staging-integration.yml @@ -0,0 +1,26 @@ +name: SDK Staging Integration + +on: + workflow_dispatch: + repository_dispatch: + types: [cueapi-core-staging-ready] + +jobs: + sdk-staging: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Install SDK + run: pip install -e . + + - name: Run SDK tests against staging + env: + CUEAPI_BASE_URL: ${{ secrets.CUEAPI_STAGING_URL }} + CUEAPI_API_KEY: ${{ secrets.CUEAPI_STAGING_API_KEY }} + run: pytest tests/ -v --tb=short From cb9dc71936149e52d0fed602d57a86e7a64af88a Mon Sep 17 00:00:00 2001 From: Gk Date: Sun, 29 Mar 2026 08:00:23 +0530 Subject: [PATCH 02/18] ci: add Argus QA trigger after staging integration Creates a CueAPI cue for Argus to pick up and run SDK tests against the staging environment after staging-integration passes. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/argus-qa.yml | 38 ++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/argus-qa.yml diff --git a/.github/workflows/argus-qa.yml b/.github/workflows/argus-qa.yml new file mode 100644 index 0000000..d6de9c1 --- /dev/null +++ b/.github/workflows/argus-qa.yml @@ -0,0 +1,38 @@ +name: Argus QA + +on: + workflow_run: + workflows: ["SDK Staging Integration"] + types: [completed] + +jobs: + trigger-argus: + runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.conclusion == 'success' }} + steps: + - name: Trigger Argus QA + run: | + FIRE_AT=$(date -u -d '+30 seconds' '+%Y-%m-%dT%H:%M:%SZ' 2>/dev/null || \ + date -u -v+30S '+%Y-%m-%dT%H:%M:%SZ') + RESPONSE=$(curl -s -w "\n%{http_code}" -X POST https://api.cueapi.ai/v1/cues \ + -H "Authorization: Bearer ${{ secrets.ARGUS_API_KEY }}" \ + -H "Content-Type: application/json" \ + -d "{ + \"name\": \"argus-cueapi-python-${{ github.event.workflow_run.head_sha }}\", + \"schedule\": {\"type\": \"once\", \"at\": \"${FIRE_AT}\"}, + \"transport\": \"worker\", + \"payload\": { + \"task\": \"sdk-qa\", + \"repo\": \"cueapi-python\", + \"commit\": \"${{ github.event.workflow_run.head_sha }}\", + \"staging_url\": \"${{ secrets.CUEAPI_STAGING_URL }}\" + } + }") + HTTP_CODE=$(echo "$RESPONSE" | tail -1) + BODY=$(echo "$RESPONSE" | head -1) + echo "Response ($HTTP_CODE): $BODY" + if [ "$HTTP_CODE" != "201" ]; then + echo "Failed to create Argus cue" + exit 1 + fi + echo "Argus will pick up SDK QA cue within 15 seconds." From 97f5fe6b0017c8e2877e147cfb7ea4267eb8bf1c Mon Sep 17 00:00:00 2001 From: govindkavaturi-art Date: Tue, 31 Mar 2026 09:35:25 +0530 Subject: [PATCH 03/18] security: pin GitHub Actions to commit SHAs (#6) * docs: add live execution feed demo GIF to README Co-Authored-By: Claude Opus 4.6 (1M context) * security: pin GitHub Actions to commit SHAs - actions/checkout@v4 -> @b4ffde65 (v4.1.7) - actions/setup-python@v5 -> @f677139b (v5.3.0) - pypa/gh-action-pypi-publish@release/v1 -> @ec4db0b4 (v1.12.3) Co-Authored-By: Claude Opus 4.6 (1M context) --------- Co-authored-by: Gk Co-authored-by: Claude Opus 4.6 (1M context) --- .github/workflows/publish.yml | 6 +++--- .github/workflows/sdk-integration.yml | 6 +++--- .github/workflows/staging-integration.yml | 4 ++-- README.md | 4 ++++ 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 649a84d..2d867fd 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,10 +11,10 @@ jobs: permissions: id-token: write steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.7 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.3.0 with: python-version: "3.12" @@ -25,4 +25,4 @@ jobs: run: python -m build - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 # v1.12.3 diff --git a/.github/workflows/sdk-integration.yml b/.github/workflows/sdk-integration.yml index d623b4f..8b5c40c 100644 --- a/.github/workflows/sdk-integration.yml +++ b/.github/workflows/sdk-integration.yml @@ -38,17 +38,17 @@ jobs: steps: - name: Checkout cueapi-python SDK - uses: actions/checkout@v4 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.7 - name: Checkout cueapi-core - uses: actions/checkout@v4 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.7 with: repository: cueapi/cueapi-core path: cueapi-core token: ${{ secrets.GITHUB_TOKEN }} - name: Set up Python 3.12 - uses: actions/setup-python@v5 + uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.3.0 with: python-version: "3.12" diff --git a/.github/workflows/staging-integration.yml b/.github/workflows/staging-integration.yml index 2e463bb..20c5fca 100644 --- a/.github/workflows/staging-integration.yml +++ b/.github/workflows/staging-integration.yml @@ -9,10 +9,10 @@ jobs: sdk-staging: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.7 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.3.0 with: python-version: '3.12' diff --git a/README.md b/README.md index f978fab..1ea58f2 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,10 @@ print(f"Scheduled. Next run: {cue.next_run}") # Scheduled. Next run: 2026-03-28T09:00:00-08:00 ``` +## See it in action + +![CueAPI Live Execution Feed](https://raw.githubusercontent.com/cueapi/cueapi-core/main/docs/execution-feed.gif) + --- ## Why CueAPI over cron? From 7febb1832c0730c58a409f3255fbeaf700717527 Mon Sep 17 00:00:00 2001 From: govindkavaturi-art Date: Tue, 31 Mar 2026 10:29:47 +0530 Subject: [PATCH 04/18] security: remove hardcoded API key from conftest.py (#8) * ci: trigger sdk-integration to verify dependency fix * security: remove hardcoded API key from conftest.py Replace hardcoded cue_sk_f22... with env var CUEAPI_STAGING_API_KEY. Also replace hardcoded staging URL with CUEAPI_STAGING_URL env var. The exposed key must be rotated immediately. Co-Authored-By: Claude Opus 4.6 (1M context) --------- Co-authored-by: Gk Co-authored-by: Claude Opus 4.6 (1M context) --- tests/conftest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index a253721..5a4078f 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -6,8 +6,8 @@ from cueapi import CueAPI -STAGING_URL = "https://api-staging-e962.up.railway.app" -STAGING_KEY = os.environ.get("CUEAPI_TEST_KEY", "cue_sk_f22857d8225de1b862995e2baa2ccdd8") +STAGING_URL = os.environ.get("CUEAPI_STAGING_URL", "https://api-staging.cueapi.ai") +STAGING_KEY = os.environ.get("CUEAPI_STAGING_API_KEY", "") @pytest.fixture From 57475f2c1d980e83d392a91a46855d331c9a3c9a Mon Sep 17 00:00:00 2001 From: govindkavaturi-art Date: Tue, 31 Mar 2026 11:21:30 +0530 Subject: [PATCH 05/18] docs: add CLAUDE.md (#9) * ci: trigger sdk-integration to verify dependency fix * docs: add CLAUDE.md with branch protection and security rules --------- Co-authored-by: Gk --- CLAUDE.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..5d40872 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,22 @@ +# CLAUDE.md - Rules for AI agents working on this repo + +## Branch protection +- Never bypass branch protection or force merge failing checks +- Never use --no-verify or skip pre-commit hooks +- All changes to main must pass required status checks (sdk-integration, staging-integration) +- If a check fails, fix the root cause before merging + +## Publishing +- PyPI publish triggers only on version tags (v*) +- Uses trusted publishing (OIDC) - no API tokens +- Never store PYPI_TOKEN in source or secrets + +## Security +- Never hardcode API keys, secrets, or tokens in source code +- Use environment variables or GitHub secrets for all credentials +- All GitHub Actions must be pinned to commit SHAs, not version tags +- Staging keys go in CUEAPI_STAGING_API_KEY GitHub secret, never in code + +## Code quality +- Run tests locally before pushing: pytest tests/ -v +- Do not use em dashes in any user-facing content From f6cc0f2460b8adfadeff8603c6433bc0fef3bc9a Mon Sep 17 00:00:00 2001 From: govindkavaturi-art Date: Tue, 31 Mar 2026 17:04:34 +0530 Subject: [PATCH 06/18] docs: update CLAUDE.md with definitive pipeline and PR process (#10) Co-authored-by: Gk --- CLAUDE.md | 86 +++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 64 insertions(+), 22 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 5d40872..134ab85 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,22 +1,64 @@ -# CLAUDE.md - Rules for AI agents working on this repo - -## Branch protection -- Never bypass branch protection or force merge failing checks -- Never use --no-verify or skip pre-commit hooks -- All changes to main must pass required status checks (sdk-integration, staging-integration) -- If a check fails, fix the root cause before merging - -## Publishing -- PyPI publish triggers only on version tags (v*) -- Uses trusted publishing (OIDC) - no API tokens -- Never store PYPI_TOKEN in source or secrets - -## Security -- Never hardcode API keys, secrets, or tokens in source code -- Use environment variables or GitHub secrets for all credentials -- All GitHub Actions must be pinned to commit SHAs, not version tags -- Staging keys go in CUEAPI_STAGING_API_KEY GitHub secret, never in code - -## Code quality -- Run tests locally before pushing: pytest tests/ -v -- Do not use em dashes in any user-facing content +# Claude Code Rules + +## Who Does What + +**Claude Code** - writes code, opens PRs, merges when CI passes, deploys to staging and frontend sites +**Argus** - tests staging, promotes to production, cuts PyPI release tags, tests docs and blog accuracy + +## PR Process - Non-Negotiable + +Every change must go through a PR. No direct pushes to main under any circumstances. +PRs are the permanent audit trail of every change made to this codebase. +Claude Code opens PRs and merges them once CI passes. No human reviewer required. +CI must pass before merging - no exceptions. +Never bypass branch protection or force merge. +Never merge a failing CI check - fix the root cause first. + +## Complete Pipeline + +### cueapi (hosted API - private repo) +Claude Code: code change -> open PR -> sdk-integration + deploy-staging CI must pass -> merge -> Railway staging deploy +Argus: runs 246 staging tests -> all pass -> promotes to production + +### cueapi-core (open source) +Claude Code: code change -> open PR -> sdk-integration CI must pass -> merge +Argus: runs full pytest suite -> confirms green + +### cueapi-python +Claude Code: code change -> open PR -> sdk-integration CI must pass -> merge +Argus: runs SDK tests -> all pass -> cuts version tag -> PyPI auto-publishes + +### cueapi-cli +Claude Code: code change -> open PR -> test CI must pass -> merge +Argus: runs CLI tests -> all pass -> cuts version tag -> PyPI auto-publishes + +### Marketing site (cueapi.ai) +Claude Code: code change -> open PR -> CI passes -> merge -> Cloudflare Pages auto-deploys to production +Argus: not involved + +### Docs (docs.cueapi.ai) +Claude Code: code change -> open PR -> CI passes -> merge -> Cloudflare Pages auto-deploys +Argus: crawls after deploy -> tests all code examples against real API -> verifies all links -> flags inaccuracies + +### Blog (blog.cueapi.ai) +Claude Code: code change -> open PR -> CI passes -> merge -> Cloudflare Pages auto-deploys +Argus: crawls after deploy -> tests all code snippets -> verifies package versions -> flags inaccuracies + +## Required CI Checks +cueapi-core: sdk-integration, deploy-staging +cueapi-python: sdk-integration +cueapi-cli: test +No PR review required - CI and Argus are the gates + +## Security Rules +1. Never hardcode secrets, API keys, or tokens anywhere +2. Always use environment variables: os.environ.get("SECRET_NAME") +3. Never commit .env files +4. All GitHub Actions must be pinned to commit SHAs not tags +5. If you find a hardcoded secret, remove it and rotate it immediately + +## Style Rules +1. No em dashes anywhere in any content +2. No AI-sounding language or corporate speak +3. Short, direct sentences + From 8f76f92a1c7352d4a8147f696470677156160421 Mon Sep 17 00:00:00 2001 From: govindkavaturi-art Date: Sat, 4 Apr 2026 02:01:39 +0100 Subject: [PATCH 07/18] chore: add Apache 2.0 LICENSE and CONTRIBUTING.md (#11) Co-authored-by: Gk Co-authored-by: Claude Opus 4.6 (1M context) --- CONTRIBUTING.md | 26 +++++++ LICENSE | 190 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 216 insertions(+) create mode 100644 CONTRIBUTING.md create mode 100644 LICENSE diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..b08d45e --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,26 @@ +# Contributing to CueAPI Python SDK + +Thanks for your interest in contributing. + +## Setup + +```bash +pip install -e ".[dev]" +``` + +## Running tests + +```bash +pytest tests/ +``` + +## Submitting changes + +1. Fork the repo +2. Create a feature branch +3. Make your changes with tests +4. Submit a pull request + +## Questions + +Open an issue or email support@vector.build diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..33687c5 --- /dev/null +++ b/LICENSE @@ -0,0 +1,190 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to the Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by the Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding any notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2024-2026 CueAPI + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. From e661bbdc67c80a87e549a5a80a690359dc6edcde Mon Sep 17 00:00:00 2001 From: govindkavaturi-art Date: Sat, 4 Apr 2026 02:23:46 +0100 Subject: [PATCH 08/18] fix: correct outcome field in README (#12) * chore: add Apache 2.0 LICENSE and CONTRIBUTING.md Co-Authored-By: Claude Opus 4.6 (1M context) * fix: correct outcome field format in README (success bool, not status string) Worker handler returns {"success": true} not {"status": "success"}. Also fix tagline formatting (italic not bold). Co-Authored-By: Claude Opus 4.6 (1M context) --------- Co-authored-by: Gk Co-authored-by: Claude Opus 4.6 (1M context) --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1ea58f2..b9eec10 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -> **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 `{"status": "success"}` or `{"status": "failure", "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`. +> **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 Your agents are failing silently. CueAPI tells you when and why. -**Cron has no concept of success. Cue does.** +*Cron has no concept of success. Cue does.* [![PyPI version](https://img.shields.io/pypi/v/cueapi-sdk?label=pypi)](https://pypi.org/project/cueapi-sdk/) [![Python](https://img.shields.io/badge/python-3.9%2B-blue)](https://pypi.org/project/cueapi-sdk/) @@ -108,7 +108,7 @@ worker = Worker(api_key="cue_sk_your_key") @worker.handler("run-agent") def handle(payload): result = run_my_agent(payload["task"]) - return {"status": "success", "summary": result} + return {"success": true, "summary": result} worker.start() # polls continuously, no inbound firewall rules needed ``` From 04fc86eecfa0136fd02d3100197c347b766ff184 Mon Sep 17 00:00:00 2001 From: Gk Date: Sat, 4 Apr 2026 10:57:35 -0700 Subject: [PATCH 09/18] ci: remove dormant workflows, add auto-merge for feature PRs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Delete staging-integration.yml (dormant repository_dispatch, never fired) - Delete argus-qa.yml (Argus QA handled separately) - Add feature-to-main.yml: pytest on PRs → auto-merge → CueAPI merge cue - sdk-integration.yml unchanged (already correct) Also via API (not in this commit): - Branch protection: PR + 1 review, enforce_admins, required checks - Secrets added: GOVIND_GITHUB_TOKEN, ARGUS_CUEAPI_KEY Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/argus-qa.yml | 38 --------- .github/workflows/feature-to-main.yml | 96 +++++++++++++++++++++++ .github/workflows/staging-integration.yml | 26 ------ 3 files changed, 96 insertions(+), 64 deletions(-) delete mode 100644 .github/workflows/argus-qa.yml create mode 100644 .github/workflows/feature-to-main.yml delete mode 100644 .github/workflows/staging-integration.yml diff --git a/.github/workflows/argus-qa.yml b/.github/workflows/argus-qa.yml deleted file mode 100644 index d6de9c1..0000000 --- a/.github/workflows/argus-qa.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Argus QA - -on: - workflow_run: - workflows: ["SDK Staging Integration"] - types: [completed] - -jobs: - trigger-argus: - runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'success' }} - steps: - - name: Trigger Argus QA - run: | - FIRE_AT=$(date -u -d '+30 seconds' '+%Y-%m-%dT%H:%M:%SZ' 2>/dev/null || \ - date -u -v+30S '+%Y-%m-%dT%H:%M:%SZ') - RESPONSE=$(curl -s -w "\n%{http_code}" -X POST https://api.cueapi.ai/v1/cues \ - -H "Authorization: Bearer ${{ secrets.ARGUS_API_KEY }}" \ - -H "Content-Type: application/json" \ - -d "{ - \"name\": \"argus-cueapi-python-${{ github.event.workflow_run.head_sha }}\", - \"schedule\": {\"type\": \"once\", \"at\": \"${FIRE_AT}\"}, - \"transport\": \"worker\", - \"payload\": { - \"task\": \"sdk-qa\", - \"repo\": \"cueapi-python\", - \"commit\": \"${{ github.event.workflow_run.head_sha }}\", - \"staging_url\": \"${{ secrets.CUEAPI_STAGING_URL }}\" - } - }") - HTTP_CODE=$(echo "$RESPONSE" | tail -1) - BODY=$(echo "$RESPONSE" | head -1) - echo "Response ($HTTP_CODE): $BODY" - if [ "$HTTP_CODE" != "201" ]; then - echo "Failed to create Argus cue" - exit 1 - fi - echo "Argus will pick up SDK QA cue within 15 seconds." diff --git a/.github/workflows/feature-to-main.yml b/.github/workflows/feature-to-main.yml new file mode 100644 index 0000000..efe505e --- /dev/null +++ b/.github/workflows/feature-to-main.yml @@ -0,0 +1,96 @@ +name: Feature PR to Main + +on: + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + + services: + postgres: + image: postgres:15-alpine + env: + POSTGRES_DB: cueapi_test + POSTGRES_USER: runner + POSTGRES_PASSWORD: "" + POSTGRES_HOST_AUTH_METHOD: trust + ports: + - 5432:5432 + options: >- + --health-cmd pg_isready + --health-interval 2s + --health-timeout 3s + --health-retries 10 + + redis: + image: redis:7-alpine + ports: + - 6379:6379 + options: >- + --health-cmd "redis-cli ping" + --health-interval 2s + --health-timeout 3s + --health-retries 10 + + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.7 + + - name: Checkout cueapi-core + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.7 + with: + repository: cueapi/cueapi-core + path: cueapi-core + token: ${{ secrets.GITHUB_TOKEN }} + + - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.3.0 + with: + python-version: '3.12' + + - name: Install dependencies + run: | + pip install -r cueapi-core/requirements.txt + pip install -e . + + - name: Run tests + env: + DATABASE_URL: postgresql+asyncpg://runner@localhost:5432/cueapi_test + REDIS_URL: redis://localhost:6379 + SESSION_SECRET: test-session-secret-32-chars-minimum!! + ENV: test + RESEND_API_KEY: "" + run: pytest tests/ -v --tb=short + + auto-merge: + needs: test + runs-on: ubuntu-latest + steps: + - name: Auto-merge PR + run: gh pr merge ${{ github.event.pull_request.number }} --squash --auto + env: + GH_TOKEN: ${{ secrets.GOVIND_GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} + + notify-merge: + needs: auto-merge + runs-on: ubuntu-latest + steps: + - name: Create merge confirmation cue + run: | + FIRE_AT=$(date -u -d '+2 minutes' '+%Y-%m-%dT%H:%M:%SZ' 2>/dev/null || \ + date -u -v+2M '+%Y-%m-%dT%H:%M:%SZ') + curl -s -w "\n%{http_code}" -X POST https://api.cueapi.ai/v1/cues \ + -H "Authorization: Bearer ${{ secrets.ARGUS_CUEAPI_KEY }}" \ + -H "Content-Type: application/json" \ + -d "{ + \"name\": \"cueapi-python-merged-${{ github.event.pull_request.number }}\", + \"schedule\": {\"type\": \"once\", \"at\": \"${FIRE_AT}\"}, + \"transport\": \"worker\", + \"payload\": { + \"task\": \"verify-github-merge\", + \"repo\": \"cueapi/cueapi-python\", + \"pr_number\": \"${{ github.event.pull_request.number }}\", + \"commit_sha\": \"${{ github.event.pull_request.head.sha }}\" + } + }" diff --git a/.github/workflows/staging-integration.yml b/.github/workflows/staging-integration.yml deleted file mode 100644 index 20c5fca..0000000 --- a/.github/workflows/staging-integration.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: SDK Staging Integration - -on: - workflow_dispatch: - repository_dispatch: - types: [cueapi-core-staging-ready] - -jobs: - sdk-staging: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.7 - - - name: Set up Python - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.3.0 - with: - python-version: '3.12' - - - name: Install SDK - run: pip install -e . - - - name: Run SDK tests against staging - env: - CUEAPI_BASE_URL: ${{ secrets.CUEAPI_STAGING_URL }} - CUEAPI_API_KEY: ${{ secrets.CUEAPI_STAGING_API_KEY }} - run: pytest tests/ -v --tb=short From 96f3870c7ae99c5f7cd82848112eacf34eb2892f Mon Sep 17 00:00:00 2001 From: govindkavaturi-art Date: Sat, 4 Apr 2026 11:14:25 -0700 Subject: [PATCH 10/18] ci: fix pg_isready health-cmd, add CUEAPI_STAGING_API_KEY env var --- .github/workflows/feature-to-main.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/feature-to-main.yml b/.github/workflows/feature-to-main.yml index efe505e..57cb392 100644 --- a/.github/workflows/feature-to-main.yml +++ b/.github/workflows/feature-to-main.yml @@ -19,10 +19,10 @@ jobs: ports: - 5432:5432 options: >- - --health-cmd pg_isready + --health-cmd "pg_isready -U runner -d cueapi_test" --health-interval 2s --health-timeout 3s - --health-retries 10 + --health-retries 15 redis: image: redis:7-alpine @@ -60,6 +60,8 @@ jobs: SESSION_SECRET: test-session-secret-32-chars-minimum!! ENV: test RESEND_API_KEY: "" + CUEAPI_STAGING_URL: https://api-staging-e962.up.railway.app + CUEAPI_STAGING_API_KEY: ${{ secrets.ARGUS_CUEAPI_KEY }} run: pytest tests/ -v --tb=short auto-merge: From ddaf5746d3d156a1138d7bd3091f98ade5b87398 Mon Sep 17 00:00:00 2001 From: govindkavaturi-art Date: Sat, 4 Apr 2026 11:16:04 -0700 Subject: [PATCH 11/18] ci: use ARGUS_STAGING_KEY for cue tests (staging key, not prod key) --- .github/workflows/feature-to-main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/feature-to-main.yml b/.github/workflows/feature-to-main.yml index 57cb392..54e7b37 100644 --- a/.github/workflows/feature-to-main.yml +++ b/.github/workflows/feature-to-main.yml @@ -61,7 +61,7 @@ jobs: ENV: test RESEND_API_KEY: "" CUEAPI_STAGING_URL: https://api-staging-e962.up.railway.app - CUEAPI_STAGING_API_KEY: ${{ secrets.ARGUS_CUEAPI_KEY }} + CUEAPI_STAGING_API_KEY: ${{ secrets.ARGUS_STAGING_KEY }} run: pytest tests/ -v --tb=short auto-merge: From ac84dfa13f384d05beeb4df7f9072d40defb171c Mon Sep 17 00:00:00 2001 From: Gk Date: Sat, 4 Apr 2026 11:57:43 -0700 Subject: [PATCH 12/18] test: add client init and error handling tests 4 new tests covering previously untested SDK areas: - Client constructor with cues/executions resources - Custom base_url handling - close() idempotency - Invalid API key raises AuthenticationError Co-Authored-By: Claude Opus 4.6 (1M context) --- tests/test_client_init.py | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 tests/test_client_init.py diff --git a/tests/test_client_init.py b/tests/test_client_init.py new file mode 100644 index 0000000..f14aebc --- /dev/null +++ b/tests/test_client_init.py @@ -0,0 +1,36 @@ +"""Tests for CueAPI client initialization and error handling.""" + +import pytest + +from cueapi import CueAPI +from cueapi.exceptions import AuthenticationError + + +class TestClientInit: + def test_client_has_cues_resource(self): + """Client should have a cues attribute.""" + client = CueAPI("test-key", base_url="https://example.com") + assert hasattr(client, "cues") + assert hasattr(client, "executions") + client.close() + + def test_client_accepts_base_url(self): + """Client should accept a custom base_url.""" + client = CueAPI("test-key", base_url="https://custom.example.com") + assert client._base_url == "https://custom.example.com" + client.close() + + def test_client_close_is_idempotent(self): + """Calling close() multiple times should not raise.""" + client = CueAPI("test-key", base_url="https://example.com") + client.close() + client.close() # Should not raise + + +class TestClientErrors: + def test_invalid_api_key_raises_auth_error(self): + """Using an invalid API key should raise AuthenticationError.""" + client = CueAPI("invalid-key-that-does-not-exist", base_url="https://api-staging-e962.up.railway.app") + with pytest.raises((AuthenticationError, Exception)): + client.cues.list() + client.close() From 229190cfe4c29e153c40894b81cee49478d3a245 Mon Sep 17 00:00:00 2001 From: Gk Date: Sat, 4 Apr 2026 13:15:18 -0700 Subject: [PATCH 13/18] chore: pipeline validation test --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b9eec10..e6ef832 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 From a8e8277697e7d873f0cf95774c599b4c2982bb36 Mon Sep 17 00:00:00 2001 From: Gk Date: Sat, 4 Apr 2026 14:29:27 -0700 Subject: [PATCH 14/18] ci: change notify-merge to trigger Argus test suite after merge Changed post-merge cue payload task from verify-github-merge to the repo-specific test task so Argus runs the full test suite immediately after every merge to main. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/feature-to-main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/feature-to-main.yml b/.github/workflows/feature-to-main.yml index 54e7b37..7168ce9 100644 --- a/.github/workflows/feature-to-main.yml +++ b/.github/workflows/feature-to-main.yml @@ -90,7 +90,8 @@ jobs: \"schedule\": {\"type\": \"once\", \"at\": \"${FIRE_AT}\"}, \"transport\": \"worker\", \"payload\": { - \"task\": \"verify-github-merge\", + \"task\": \"test-sdk\", + \"trigger\": \"post-merge\", \"repo\": \"cueapi/cueapi-python\", \"pr_number\": \"${{ github.event.pull_request.number }}\", \"commit_sha\": \"${{ github.event.pull_request.head.sha }}\" From bc5b84c9547c07e5157cf45ec35e388e556ae71a Mon Sep 17 00:00:00 2001 From: Govind Kavaturi Date: Sun, 12 Apr 2026 12:59:06 -0700 Subject: [PATCH 15/18] security: add PEP 740 attestations to PyPI publish (#17) * security: add PEP 740 attestations to PyPI publish workflow - Pin pypa/gh-action-pypi-publish to SHA (v1.14.0) - Enable attestations: true for PEP 740 provenance - Add test job before publish (tests must pass before release) - Add explicit permissions: { contents: read } at workflow level - Bump version to 0.1.1 - Document attestation in README Co-Authored-By: Claude Opus 4.6 * fix: remove test job from publish workflow SDK tests are integration tests requiring staging API + service containers. They run on PRs via feature-to-main.yml. The publish workflow trusts that tests passed during the PR process. Co-Authored-By: Claude Opus 4.6 --------- Co-authored-by: Gk Co-authored-by: Claude Opus 4.6 --- .github/workflows/publish.yml | 14 ++++++++++---- README.md | 6 ++++++ pyproject.toml | 2 +- 3 files changed, 17 insertions(+), 5 deletions(-) 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 e6ef832..97ea027 100644 --- a/README.md +++ b/README.md @@ -268,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/pyproject.toml b/pyproject.toml index 1a598ac..1412570 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "cueapi-sdk" -version = "0.1.0" +version = "0.1.1" description = "The official Python SDK for CueAPI — scheduling infrastructure for agents" readme = "README.md" license = { text = "MIT" } From 63a4a59c170b8ad52ba1ea2df9d160a504c27974 Mon Sep 17 00:00:00 2001 From: Govind Kavaturi Date: Sun, 12 Apr 2026 13:21:55 -0700 Subject: [PATCH 16/18] fix: add Bug Tracker URL to PyPI metadata (#18) The cueapi-sdk package on PyPI was missing the Bug Tracker project URL, meaning users had no link to report issues. Adds the correct URL pointing to https://github.com/cueapi/cueapi-python/issues. Also bumps version to 0.1.2 (metadata-only patch) and syncs __version__ in __init__.py. Co-authored-by: Gk Co-authored-by: Claude Opus 4.6 --- cueapi/__init__.py | 2 +- pyproject.toml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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/pyproject.toml b/pyproject.toml index 1412570..89f258c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "cueapi-sdk" -version = "0.1.1" +version = "0.1.2" description = "The official Python SDK for CueAPI — scheduling infrastructure for agents" readme = "README.md" license = { text = "MIT" } @@ -32,6 +32,7 @@ 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" [tool.pytest.ini_options] testpaths = ["tests"] From 156ed371a02cc7b61e4d92469b73e48da5181c09 Mon Sep 17 00:00:00 2001 From: Gk Date: Tue, 14 Apr 2026 22:48:53 -0700 Subject: [PATCH 17/18] chore(meta): fix license mismatch (Apache-2.0), expand PyPI metadata, bump to 0.1.3 Reconciles pyproject.toml license with LICENSE file content and repo description (Apache-2.0, not MIT). Adds Trove classifiers, expanded keyword list, maintainers block, and Changelog/Source Code/Status Page URLs. No code changes. --- pyproject.toml | 42 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 89f258c..c5cce87 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,24 +4,51 @@ build-backend = "hatchling.build" [project] name = "cueapi-sdk" -version = "0.1.2" -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", @@ -33,6 +60,9 @@ 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"] From ac957e269c3747635e22c83802f62602fb42e39a Mon Sep 17 00:00:00 2001 From: Govind Kavaturi Date: Sun, 19 Apr 2026 16:28:30 -0700 Subject: [PATCH 18/18] feat(executions): add result_ref kwarg to report_outcome (#20) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The server's /v1/executions/{id}/outcome endpoint already accepts a `result_ref` evidence field (see OutcomeRequest in cueapi/cueapi app/schemas/outcome.py). The SDK's report_outcome was missing it, forcing callers who want to attach a reference ID to fall back to either raw HTTP or using an unrelated field like external_id. Single-line addition in executions.py: new kwarg, forwarded to the POST body when provided, same shape as every other evidence field. Companion change in cueapi-worker 0.3.0 (monorepo PR in cueapi/cueapi) exposes the same field on its WorkerAPIClient so worker-transport handlers can surface result_ref via the new CUEAPI_OUTCOME_FILE pattern. No behavioral change for existing callers — kwarg is optional and defaults to None. Co-authored-by: Gk --- cueapi/resources/executions.py | 3 +++ 1 file changed, 3 insertions(+) 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: