From 5d30f736000b9d9d63f54c42c0ef9f2b7e0da19a Mon Sep 17 00:00:00 2001 From: Multi-Repo Pushback Bot Date: Fri, 24 Apr 2026 12:37:11 +0200 Subject: [PATCH 1/2] fix(ci): update codegen-models workflow to use new Python output path After moving Python codegen output from sdk-py/agent_relay/ to sdk-py/src/agent_relay/, the CI workflow was still referencing the old paths in its git diff check and git add step, causing exit code 128. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/codegen-models.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codegen-models.yml b/.github/workflows/codegen-models.yml index ad2cbe46f..05d739a33 100644 --- a/.github/workflows/codegen-models.yml +++ b/.github/workflows/codegen-models.yml @@ -35,7 +35,7 @@ jobs: - name: Check for changes id: changes run: | - if git diff --quiet packages/config/src/cli-registry.generated.ts packages/sdk-py/agent_relay/models.py packages/sdk-py/agent_relay/__init__.py; then + if git diff --quiet packages/config/src/cli-registry.generated.ts packages/sdk-py/src/agent_relay/models.py; then echo "changed=false" >> $GITHUB_OUTPUT else echo "changed=true" >> $GITHUB_OUTPUT @@ -46,7 +46,7 @@ jobs: run: | git config --local user.email "github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" - git add packages/config/src/cli-registry.generated.ts packages/sdk-py/agent_relay/models.py packages/sdk-py/agent_relay/__init__.py + git add packages/config/src/cli-registry.generated.ts packages/sdk-py/src/agent_relay/models.py git commit -m "chore: regenerate models from cli-registry.yaml [skip ci]" git push From bcfd08642250f4b3ba183805208d050b1ba7dfc8 Mon Sep 17 00:00:00 2001 From: Multi-Repo Pushback Bot Date: Fri, 24 Apr 2026 12:40:53 +0200 Subject: [PATCH 2/2] fix(codegen): update Python output path and remove __init__.py generation - codegen-py.mjs was still writing to sdk-py/agent_relay/ (old path), making the CI diff check against sdk-py/src/agent_relay/ always quiet - Stop generating __init__.py to avoid clobbering the hand-maintained SDK public API at src/agent_relay/__init__.py - Update lint-staged git add in package.json to match the new path and drop the stale __init__.py reference Co-Authored-By: Claude Sonnet 4.6 --- package.json | 2 +- packages/shared/codegen-py.mjs | 33 ++------------------------------- 2 files changed, 3 insertions(+), 32 deletions(-) diff --git a/package.json b/package.json index 2bff9eff2..0d4e66456 100644 --- a/package.json +++ b/package.json @@ -173,7 +173,7 @@ ], "packages/shared/cli-registry.yaml": [ "npm run codegen:models", - "git add packages/config/src/cli-registry.generated.ts packages/sdk-py/agent_relay/models.py packages/sdk-py/agent_relay/__init__.py" + "git add packages/config/src/cli-registry.generated.ts packages/sdk-py/src/agent_relay/models.py" ] }, "keywords": [ diff --git a/packages/shared/codegen-py.mjs b/packages/shared/codegen-py.mjs index 2beb8e005..3a9a3e29e 100644 --- a/packages/shared/codegen-py.mjs +++ b/packages/shared/codegen-py.mjs @@ -3,7 +3,7 @@ * Generate Python models from cli-registry.yaml * * Usage: node codegen-py.mjs - * Output: ../sdk-py/agent_relay/models.py + * Output: ../sdk-py/src/agent_relay/models.py */ import { readFileSync, writeFileSync, mkdirSync, existsSync } from 'node:fs'; @@ -13,7 +13,7 @@ import { fileURLToPath } from 'node:url'; const __dirname = dirname(fileURLToPath(import.meta.url)); const registryPath = join(__dirname, 'cli-registry.yaml'); -const outputDir = join(__dirname, '../sdk-py/agent_relay'); +const outputDir = join(__dirname, '../sdk-py/src/agent_relay'); const outputPath = join(outputDir, 'models.py'); // Create output directory if it doesn't exist @@ -184,32 +184,3 @@ output += `} writeFileSync(outputPath, output); console.log(`Generated ${outputPath}`); - -// Update __init__.py with new exports -const initPath = join(outputDir, '__init__.py'); -writeFileSync( - initPath, - `"""Agent Relay Python SDK.""" - -from .models import ( - CLIs, - CLIVersions, - CLI_REGISTRY, - DEFAULT_MODELS, - Models, - ModelOptions, - SwarmPatterns, -) - -__all__ = [ - "CLIs", - "CLIVersions", - "CLI_REGISTRY", - "DEFAULT_MODELS", - "Models", - "ModelOptions", - "SwarmPatterns", -] -` -); -console.log(`Generated ${initPath}`);