From 713feb1a2a5db30f5f54be90e35ad47a0f6b5c3a Mon Sep 17 00:00:00 2001 From: tangletools Date: Fri, 25 Sep 2026 23:34:02 -0600 Subject: [PATCH 1/6] build: apply and verify canonical Router video routes in their SDK owner --- .github/workflows/tangle-agent-v1-media.yml | 56 +++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/tangle-agent-v1-media.yml diff --git a/.github/workflows/tangle-agent-v1-media.yml b/.github/workflows/tangle-agent-v1-media.yml new file mode 100644 index 0000000..8178807 --- /dev/null +++ b/.github/workflows/tangle-agent-v1-media.yml @@ -0,0 +1,56 @@ +name: Tangle agent media SDK verification +on: + push: + branches: [pro/tangle-agent-v1-video-routes] + paths: [.github/workflows/tangle-agent-v1-media.yml] +permissions: + contents: write +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + with: + ref: pro/tangle-agent-v1-video-routes + - uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 + with: + version: '10.28.0' + - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 + with: + node-version: '22' + - name: Commit the existing SDK correction + run: | + set -euo pipefail + python3 - <<'PY' + from pathlib import Path + p=Path('packages/tcloud/src/client.ts'); s=p.read_text() + for old,new in [('`${this.baseURL}/video/generate`','`${this.baseURL}/videos`'),('`${this.baseURL}/video/${encodeURIComponent(id)}`','`${this.baseURL}/videos/${encodeURIComponent(id)}`')]: + assert s.count(old)==1, old + s=s.replace(old,new) + p.write_text(s) + PY + git diff --check + git add packages/tcloud/src/client.ts + git rm .github/workflows/tangle-agent-v1-media.yml + git -c user.name=tangletools -c user.email=hello@tangle.tools commit -m 'fix: use canonical Router video create and status endpoints' + git push origin HEAD:pro/tangle-agent-v1-video-routes + mkdir -p /tmp/tcloud-v1 + git rev-parse HEAD > /tmp/tcloud-v1/REVISION + - name: Install and build the real SDK + run: | + set -euo pipefail + pnpm install --frozen-lockfile 2>&1 | tee /tmp/tcloud-v1/install.log + pnpm --filter '@tangle-network/tcloud...' run build 2>&1 | tee /tmp/tcloud-v1/build.log + pnpm --filter @tangle-network/tcloud pack --pack-destination /tmp/tcloud-v1 + - name: Retain exact source + if: always() + run: | + mkdir -p /tmp/tcloud-v1 + git archive --format=tar HEAD > /tmp/tcloud-v1/source.tar + - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a + if: always() + with: + name: tcloud-v1-sdk-check + path: /tmp/tcloud-v1/ + retention-days: 3 From 5131d43a1b298ac5b488d7fcef00ea1e9896e7c1 Mon Sep 17 00:00:00 2001 From: tangletools Date: Fri, 25 Sep 2026 23:49:01 -0600 Subject: [PATCH 2/6] build: use tcloud's declared package manager for video SDK verification --- .github/workflows/tangle-agent-v1-media.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/tangle-agent-v1-media.yml b/.github/workflows/tangle-agent-v1-media.yml index 8178807..2858e5f 100644 --- a/.github/workflows/tangle-agent-v1-media.yml +++ b/.github/workflows/tangle-agent-v1-media.yml @@ -14,8 +14,6 @@ jobs: with: ref: pro/tangle-agent-v1-video-routes - uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 - with: - version: '10.28.0' - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 with: node-version: '22' @@ -51,6 +49,6 @@ jobs: - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a if: always() with: - name: tcloud-v1-sdk-check + name: tcloud-v1-sdk-check-${{ github.run_attempt }} path: /tmp/tcloud-v1/ retention-days: 3 From 35f0016dfca45c0c6fe9fa7140a8511096c473c4 Mon Sep 17 00:00:00 2001 From: tangletools Date: Sat, 26 Sep 2026 05:49:14 +0000 Subject: [PATCH 3/6] fix: use canonical Router video create and status endpoints --- .github/workflows/tangle-agent-v1-media.yml | 54 --------------------- packages/tcloud/src/client.ts | 4 +- 2 files changed, 2 insertions(+), 56 deletions(-) delete mode 100644 .github/workflows/tangle-agent-v1-media.yml diff --git a/.github/workflows/tangle-agent-v1-media.yml b/.github/workflows/tangle-agent-v1-media.yml deleted file mode 100644 index 2858e5f..0000000 --- a/.github/workflows/tangle-agent-v1-media.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: Tangle agent media SDK verification -on: - push: - branches: [pro/tangle-agent-v1-video-routes] - paths: [.github/workflows/tangle-agent-v1-media.yml] -permissions: - contents: write -jobs: - build: - runs-on: ubuntu-latest - timeout-minutes: 20 - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 - with: - ref: pro/tangle-agent-v1-video-routes - - uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 - - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 - with: - node-version: '22' - - name: Commit the existing SDK correction - run: | - set -euo pipefail - python3 - <<'PY' - from pathlib import Path - p=Path('packages/tcloud/src/client.ts'); s=p.read_text() - for old,new in [('`${this.baseURL}/video/generate`','`${this.baseURL}/videos`'),('`${this.baseURL}/video/${encodeURIComponent(id)}`','`${this.baseURL}/videos/${encodeURIComponent(id)}`')]: - assert s.count(old)==1, old - s=s.replace(old,new) - p.write_text(s) - PY - git diff --check - git add packages/tcloud/src/client.ts - git rm .github/workflows/tangle-agent-v1-media.yml - git -c user.name=tangletools -c user.email=hello@tangle.tools commit -m 'fix: use canonical Router video create and status endpoints' - git push origin HEAD:pro/tangle-agent-v1-video-routes - mkdir -p /tmp/tcloud-v1 - git rev-parse HEAD > /tmp/tcloud-v1/REVISION - - name: Install and build the real SDK - run: | - set -euo pipefail - pnpm install --frozen-lockfile 2>&1 | tee /tmp/tcloud-v1/install.log - pnpm --filter '@tangle-network/tcloud...' run build 2>&1 | tee /tmp/tcloud-v1/build.log - pnpm --filter @tangle-network/tcloud pack --pack-destination /tmp/tcloud-v1 - - name: Retain exact source - if: always() - run: | - mkdir -p /tmp/tcloud-v1 - git archive --format=tar HEAD > /tmp/tcloud-v1/source.tar - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a - if: always() - with: - name: tcloud-v1-sdk-check-${{ github.run_attempt }} - path: /tmp/tcloud-v1/ - retention-days: 3 diff --git a/packages/tcloud/src/client.ts b/packages/tcloud/src/client.ts index 484c9bc..29cda28 100644 --- a/packages/tcloud/src/client.ts +++ b/packages/tcloud/src/client.ts @@ -1097,7 +1097,7 @@ export class TCloudClient { /** Generate video */ async videoGenerate(options: VideoGenerateOptions): Promise { - return this._request(`${this.baseURL}/video/generate`, { + return this._request(`${this.baseURL}/videos`, { method: 'POST', body: JSON.stringify(options), }) @@ -1105,7 +1105,7 @@ export class TCloudClient { /** Get video generation status */ async videoStatus(id: string): Promise { - return this._fetch(`${this.baseURL}/video/${encodeURIComponent(id)}`) + return this._fetch(`${this.baseURL}/videos/${encodeURIComponent(id)}`) } /** Generate an avatar video (lip-synced talking head from audio + face image). From 7b2a4ad589f4d18fa114221c883ae9d352b33b0b Mon Sep 17 00:00:00 2001 From: drewstone Date: Sat, 26 Sep 2026 03:16:36 -0700 Subject: [PATCH 4/6] ci: verify the complete workspace lock and canonical media SDK on every PR --- .github/workflows/sdk-frozen-check.yml | 42 ++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/sdk-frozen-check.yml diff --git a/.github/workflows/sdk-frozen-check.yml b/.github/workflows/sdk-frozen-check.yml new file mode 100644 index 0000000..f769692 --- /dev/null +++ b/.github/workflows/sdk-frozen-check.yml @@ -0,0 +1,42 @@ +name: SDK frozen workspace install +on: + pull_request: + push: + branches: [pro/tangle-agent-v1-video-routes] +permissions: + contents: read +jobs: + sdk: + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + - uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 + - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 + with: + node-version: '24' + - name: Frozen install of all workspace importers + run: | + set -euo pipefail + mkdir -p verification + git rev-parse HEAD > verification/REVISION + git ls-files 'packages/*/package.json' | tee verification/workspaces.txt + pnpm install --frozen-lockfile 2>&1 | tee verification/install.log + git diff --exit-code -- pnpm-lock.yaml + - name: Build and test the actual published SDK + run: | + set -euo pipefail + pnpm --filter '@tangle-network/tcloud...' run build 2>&1 | tee verification/build.log + pnpm --filter @tangle-network/tcloud test 2>&1 | tee verification/tests.log + pnpm --dir packages/tcloud pack --pack-destination ../../verification + - name: Retain exact checked source + if: always() + run: | + mkdir -p verification + git archive --format=tar HEAD > verification/source.tar + - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a + if: always() + with: + name: sdk-frozen-${{ github.sha }} + path: verification/ + retention-days: 3 From 7bed85901b440d469711d7e8d6ed09f1e1188d04 Mon Sep 17 00:00:00 2001 From: Drew Stone Date: Sat, 26 Sep 2026 04:16:56 -0600 Subject: [PATCH 5/6] fix(tcloud): assert the canonical video routes and prepare 0.5.3 The published client posted to /v1/video/generate, which Router answers with 404. Router serves POST /v1/videos and GET /v1/videos/:id. Co-Authored-By: Claude Opus 5.5 (1M context) --- packages/tcloud/package.json | 2 +- packages/tcloud/tests/api-methods.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/tcloud/package.json b/packages/tcloud/package.json index 22bcdf8..13c8c17 100644 --- a/packages/tcloud/package.json +++ b/packages/tcloud/package.json @@ -1,6 +1,6 @@ { "name": "@tangle-network/tcloud", - "version": "0.5.2", + "version": "0.5.3", "description": "TypeScript SDK and CLI for Tangle Router, Sandbox, model routing, and agent service calls", "type": "module", "main": "./dist/index.cjs", diff --git a/packages/tcloud/tests/api-methods.test.ts b/packages/tcloud/tests/api-methods.test.ts index 95506f9..c13257a 100644 --- a/packages/tcloud/tests/api-methods.test.ts +++ b/packages/tcloud/tests/api-methods.test.ts @@ -371,7 +371,7 @@ describe('video generation', () => { generate_audio: true, }) - expect(fn.mock.calls[0][0]).toBe('https://router.tangle.tools/v1/video/generate') + expect(fn.mock.calls[0][0]).toBe('https://router.tangle.tools/v1/videos') const body = JSON.parse(fn.mock.calls[0][1].body) expect(body).toMatchObject({ provider: 'kling', @@ -390,7 +390,7 @@ describe('video generation', () => { globalThis.fetch = fn const client = new TCloudClient({ apiKey: 'sk-tan-test' }) await client.videoStatus('orv_job') - expect(fn.mock.calls[0][0]).toBe('https://router.tangle.tools/v1/video/orv_job') + expect(fn.mock.calls[0][0]).toBe('https://router.tangle.tools/v1/videos/orv_job') }) }) From d59a9fdd356245f6d807fbe9da4656bae830dd0f Mon Sep 17 00:00:00 2001 From: Drew Stone Date: Sat, 26 Sep 2026 04:17:48 -0600 Subject: [PATCH 6/6] ci(tcloud): run the SDK check on pull requests only Co-Authored-By: Claude Opus 5.5 (1M context) --- .github/workflows/sdk-frozen-check.yml | 28 +++++--------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/.github/workflows/sdk-frozen-check.yml b/.github/workflows/sdk-frozen-check.yml index f769692..088cd5f 100644 --- a/.github/workflows/sdk-frozen-check.yml +++ b/.github/workflows/sdk-frozen-check.yml @@ -1,8 +1,6 @@ name: SDK frozen workspace install on: pull_request: - push: - branches: [pro/tangle-agent-v1-video-routes] permissions: contents: read jobs: @@ -17,26 +15,10 @@ jobs: node-version: '24' - name: Frozen install of all workspace importers run: | - set -euo pipefail - mkdir -p verification - git rev-parse HEAD > verification/REVISION - git ls-files 'packages/*/package.json' | tee verification/workspaces.txt - pnpm install --frozen-lockfile 2>&1 | tee verification/install.log + pnpm install --frozen-lockfile git diff --exit-code -- pnpm-lock.yaml - - name: Build and test the actual published SDK + - name: Build, test and pack the published SDK run: | - set -euo pipefail - pnpm --filter '@tangle-network/tcloud...' run build 2>&1 | tee verification/build.log - pnpm --filter @tangle-network/tcloud test 2>&1 | tee verification/tests.log - pnpm --dir packages/tcloud pack --pack-destination ../../verification - - name: Retain exact checked source - if: always() - run: | - mkdir -p verification - git archive --format=tar HEAD > verification/source.tar - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a - if: always() - with: - name: sdk-frozen-${{ github.sha }} - path: verification/ - retention-days: 3 + pnpm --filter '@tangle-network/tcloud...' run build + pnpm --filter @tangle-network/tcloud test + pnpm --dir packages/tcloud pack --pack-destination "$RUNNER_TEMP"