Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/sdk-frozen-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: SDK frozen workspace install
on:
pull_request:
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: |
pnpm install --frozen-lockfile
git diff --exit-code -- pnpm-lock.yaml
- name: Build, test and pack the published SDK
run: |
pnpm --filter '@tangle-network/tcloud...' run build
pnpm --filter @tangle-network/tcloud test
pnpm --dir packages/tcloud pack --pack-destination "$RUNNER_TEMP"
2 changes: 1 addition & 1 deletion packages/tcloud/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 2 additions & 2 deletions packages/tcloud/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1097,15 +1097,15 @@ export class TCloudClient {

/** Generate video */
async videoGenerate(options: VideoGenerateOptions): Promise<VideoResponse> {
return this._request(`${this.baseURL}/video/generate`, {
return this._request(`${this.baseURL}/videos`, {
method: 'POST',
body: JSON.stringify(options),
})
}

/** Get video generation status */
async videoStatus(id: string): Promise<VideoResponse> {
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).
Expand Down
4 changes: 2 additions & 2 deletions packages/tcloud/tests/api-methods.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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')
})
})

Expand Down
Loading