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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
plugins/getstream/vision_agents/plugins/getstream/sfu_events.py linguist-generated=true
sdks/go/acceleration/generated.go linguist-generated=true
104 changes: 104 additions & 0 deletions .github/workflows/release-sdk-go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: Release Go SDK (verify)

# A Go module is released by its tag: pushing sdks/go/vX.Y.Z is the release, and the Go module
# proxy fetches it the first time anybody asks for it. This checks the tagged copy, then asks
# for it from an empty module outside this repository, as a consumer would. It publishes
# nothing and creates no GitHub Release: release.yml publishes the Python packages on any
# published release.
on:
push:
tags: [ 'sdks/go/v*' ]
workflow_dispatch:
inputs:
tag:
description: An existing tag to verify again, such as sdks/go/v0.1.0
required: true

permissions:
contents: read

concurrency:
group: release-sdk-go-${{ inputs.tag || github.ref_name }}
cancel-in-progress: false

env:
TAG: ${{ inputs.tag || github.ref_name }}
GOWORK: 'off'
GOTOOLCHAIN: local

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: refs/tags/${{ env.TAG }}
# The whole history, to see that the tag is on main.
fetch-depth: 0

- name: The tag names a version on main
run: |
if ! printf '%s' "$TAG" | grep -Eq '^sdks/go/v[0-9]+\.[0-9]+\.[0-9]+$'; then
echo "$TAG is not sdks/go/vX.Y.Z"
exit 1
fi
git merge-base --is-ancestor HEAD origin/main || { echo "$TAG is not on main"; exit 1; }

- uses: actions/setup-go@v5
with:
go-version: '1.25.0'
cache: false

- name: The tagged copy is tidy, vets and passes
working-directory: sdks/go
env:
GOFLAGS: ''
run: |
go mod tidy -diff
go mod verify
go vet ./...
go test -race ./...

consumer:
needs: check
runs-on: ubuntu-latest
env:
GOFLAGS: -mod=mod
GOPROXY: https://proxy.golang.org
GOSUMDB: sum.golang.org
GOPRIVATE: ''
GONOSUMDB: ''
GONOPROXY: ''
steps:
- uses: actions/checkout@v4
with:
ref: refs/tags/${{ env.TAG }}
path: source

- uses: actions/setup-go@v5
with:
go-version: '1.25.0'
cache: false

- name: Install the tagged version through the proxy and build the quickstart with it
run: |
version="${TAG#sdks/go/}"
consumer="$RUNNER_TEMP/consumer"
mkdir -p "$consumer"
cd "$consumer"
go mod init example.com/consumer
cp "$GITHUB_WORKSPACE/source/sdks/go/examples/quickstart/main.go" .
# The proxy fetches a new tag on the first request and can take minutes to answer
# for it, so the first attempts may find nothing yet.
for attempt in $(seq 1 20); do
if go get "github.com/GetStream/Vision-Agents/sdks/go@$version"; then
break
fi
if [ "$attempt" = 20 ]; then
echo "proxy.golang.org never served $version"
exit 1
fi
sleep 30
done
go build ./...
go list -m github.com/GetStream/Vision-Agents/sdks/go
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,19 @@ permissions:
contents: read
id-token: write # REQUIRED for PyPI Trusted Publishing (OIDC)

# Only a release of the Python packages, tagged vX.Y.Z, publishes them. A release made for
# another tag, such as the Go SDK's sdks/go/vX.Y.Z or sdk-js-vX.Y.Z, runs nothing here.
jobs:
integration:
if: startsWith(github.event.release.tag_name, 'v')
uses: ./.github/workflows/run_tests.yml
with:
marker: 'integration'
secrets: inherit

build-core:
name: Build & Test Core SDK
if: startsWith(github.event.release.tag_name, 'v')
Comment thread
bokan marked this conversation as resolved.
Resolved
runs-on: ubuntu-latest
environment: pypi
outputs:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,12 @@ jobs:
sudo rm -rf "/usr/local/lib/android" || true
sudo rm -rf "/usr/local/share/boost" || true
sudo rm -rf "$AGENT_TOOLSDIRECTORY" || true
# Ubuntu 26.04's PortAudio (19.7) has a PulseAudio backend, and `import sounddevice`
# fails without a server to connect to, so the job runs one.
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libportaudio2
run: |
sudo apt-get update && sudo apt-get install -y --no-install-recommends libportaudio2 pulseaudio
pulseaudio --start --exit-idle-time=-1
- name: Install dependencies
uses: ./.github/actions/python-uv-setup
- name: Run core tests
Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/sdk-go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Go SDK

# sdks/go here is a copy of sdks/go on accelerate, where the SDK is developed (see the
# Versioning section of sdks/go/README.md). This checks the copy the way a consumer gets it:
# alone, with no go.work, on the oldest Go its go directive allows. GOTOOLCHAIN=local keeps
# 1.25 from switching to a newer toolchain, which would prove nothing about 1.25.
on:
push:
branches: [ "main" ]
paths:
- 'sdks/go/**'
- '.github/workflows/sdk-go.yml'
pull_request:
paths:
- 'sdks/go/**'
- '.github/workflows/sdk-go.yml'

permissions:
contents: read

concurrency:
Comment thread
bokan marked this conversation as resolved.
Resolved
group: sdk-go-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true

jobs:
check:
runs-on: ubuntu-latest
defaults:
run:
working-directory: sdks/go
env:
GOWORK: 'off'
GOTOOLCHAIN: local
GOFLAGS: ''
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: '1.25.0'
cache-dependency-path: sdks/go/go.sum

- name: Check formatting
run: test -z "$(gofmt -l .)"

- name: Check go.mod and go.sum are tidy and verified
run: |
go mod tidy -diff
go mod verify

- name: Vet, the end-to-end suite included
run: |
go vet ./...
go vet -tags e2e .

- name: Test
run: go test -race ./...
7 changes: 7 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ module-level `logger = logging.getLogger(__name__)`. Use `debug` for lifecycle,
- Change only what I asked for. Don't refactor adjacent code — ask first.
- Do not remove valid comments when editing/refactoring code.

## Go SDK

- `sdks/go` is the Go SDK, module `github.com/GetStream/Vision-Agents/sdks/go`. It is developed on the `accelerate` branch and copied here from one `accelerate` commit for each release, so `go get ...@latest` and pkg.go.dev see it. Never edit it on `main`: change it on `accelerate`, then copy it again.
- `main` and `accelerate` share no history under `sdks/go`, so merging `accelerate` into `main` conflicts on every file there. Resolve it by taking `accelerate`'s tree: `git checkout accelerate -- sdks/go`.
- A version is a tag `sdks/go/vX.Y.Z` on the `main` commit that holds the copy: the release PR's merge commit, named by its SHA (`gh pr view <n> --json mergeCommit`), not whatever `main` is by then. `.github/workflows/release-sdk-go.yml` verifies it through the Go proxy. Never create a GitHub Release for it, and never move or delete a released tag: retract it in `sdks/go/go.mod` and release the next patch.
- The steps are in the `sdk-go` skill on `accelerate` (`.claude/skills/sdk-go/SKILL.md`).

## Plugins

- In every `plugins/*/pyproject.toml`, the wheel target must be `packages = ["vision_agents"]`. Listing `"."` pulls `tests/`, `README.md`, `example/`, etc. into the published wheel.
Expand Down
2 changes: 2 additions & 0 deletions sdks/go/.sdk_update_log
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
spec ed7c3387375e2128c9749eadf5eab87ed2e2eeac
skill 681bc49c6f0625c505a3464b8c1edc7d533469d6
Loading
Loading