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
2 changes: 1 addition & 1 deletion .claude/skills/sdk-dotnet/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Stream's .NET packages are `getstream-net` (the current generated server SDK, na
namespace stays **`GetStream.VisionAgents`**, with the generated DTOs under
`GetStream.VisionAgents.Models`.

Releases run by hand: Actions, "Release .NET SDK", "Use workflow from" `accelerate`, pick the
Releases run by hand: Actions, "Release .NET SDK", "Use workflow from" `main`, pick the
part to bump or type an exact version, and untick the dry run to publish. The workflow is
`.github/workflows/release-sdk-dotnet.yml`; it pushes to NuGet through trusted publishing and
tags `sdk-dotnet-v<version>`. Keep the file name: the nuget.org policy is bound to it. Do not rename to `StreamIO.*`; nothing
Expand Down
52 changes: 21 additions & 31 deletions .claude/skills/sdk-go/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Always keep the SDK to latest version of Golang
`api/oapi-codegen.yaml`, which leaves out the `Staff` operations and the four socket
operations: `stream` holds the three it uses by hand on `stream/socket.go`, and
`openSocketSession` has no Go client yet. The output is committed; CI's `go` job regenerates
it and fails on a diff. The spec is only on `accelerate`, so generation runs there.
it and fails on a diff.

Models public, operations not:

Expand Down Expand Up @@ -100,53 +100,44 @@ E2E_REQUIRED=1 go test -tags e2e -count=1 -v -run "$SMOKE" .
## README

The README renders on pkg.go.dev too, where only links inside the module resolve: a link
outside `sdks/go` is an absolute `https://github.com/GetStream/Vision-Agents/tree/accelerate/...`.
outside `sdks/go` is an absolute `https://github.com/GetStream/Vision-Agents/tree/main/...`.
Every identifier in a code block exists; the quickstart is the example file verbatim.

## Releasing

`sdks/go` is developed on `accelerate` and released from `main`, the default branch, so
`go get ...@latest`, `@main` and pkg.go.dev see it. `main` holds a copy of `sdks/go` from one
`accelerate` commit and is never edited there. A version is a tag `sdks/go/vX.Y.Z` on the
`main` merge commit. While 0.x, a minor may break a signature; a patch only fixes.

1. Land the change on `accelerate`, with the `CHANGELOG.md` entry.
2. Run the smoke set with `E2E_REQUIRED=1`, as above, and keep its output.
3. Copy onto a branch off `main`, and check the copy is exact:

```bash
git fetch origin
git switch -c ai-xxxx-go-sdk-vX.Y.Z origin/main
SRC=$(git rev-parse origin/accelerate)
git rm -rq sdks/go # so a file deleted on accelerate goes too
git checkout "$SRC" -- sdks/go
git diff --stat "$SRC" -- sdks/go # prints nothing
```

Commit, and open a PR to `main` titled `[AI-xxxx] Go SDK vX.Y.Z`, with the source SHA and the
smoke run in the body. `main`'s `Go SDK` workflow (`.github/workflows/sdk-go.yml`) checks the
copy on Go 1.25 alone. `main` and `accelerate` share no history under `sdks/go`, so a merge
of `accelerate` into `main` conflicts there: take `accelerate`'s tree.
4. Once it is merged, tag the merge commit by its SHA, not whatever `main` is by then. Never
`sdks/go` is developed and released on `main`, the default branch, so `go get ...@latest`,
`@main` and pkg.go.dev see it. A version is a tag `sdks/go/vX.Y.Z` on a `main` commit; nothing
is copied. While 0.x, a minor may break a signature; a patch only fixes.

1. Land the change on `main` by a pull request, with the `CHANGELOG.md` entry. The `Go SDK`
workflow (`.github/workflows/sdk-go.yml`) checks `sdks/go` alone on Go 1.25, as a consumer
gets it.
2. Check out the commit to tag (`git switch --detach <the main commit>`), run the smoke set
from `sdks/go` with `E2E_REQUIRED=1`, as above, and keep its output, so the result is the
tagged commit's.
3. Tag the commit that holds the change by its SHA, not whatever `main` is by then. Never
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
create a GitHub Release for it: `release.yml` publishes the Python packages on a release.

```bash
set -euo pipefail # a failed check below stops before the tag
git fetch origin
MERGED=$(gh pr view <n> --json mergeCommit -q .mergeCommit.oid)
git tag sdks/go/vX.Y.Z "$MERGED"
SHA=<the main commit>
git merge-base --is-ancestor "$SHA" origin/main # exits 0, else the script stops
git tag sdks/go/vX.Y.Z "$SHA"
git push origin sdks/go/vX.Y.Z
```

5. `release-sdk-go.yml` runs on the tag: it checks the tagged copy and builds the quickstart in
an empty module through proxy.golang.org. By hand, with `GOPRIVATE` cleared:
4. `release-sdk-go.yml` runs on the tag: it checks the tag is on `main`, checks the tagged copy
and builds the quickstart in an empty module through proxy.golang.org. By hand, with
`GOPRIVATE` cleared:

```bash
GOPRIVATE= GONOSUMDB= GOFLAGS=-mod=mod GOPROXY=https://proxy.golang.org \
go list -m -versions github.com/GetStream/Vision-Agents/sdks/go
```

A version found broken is never moved or deleted: the proxy and the checksum database keep it.
Add `retract vX.Y.Z // why` to `sdks/go/go.mod` on `accelerate`, and release the next patch the
Add `retract vX.Y.Z // why` to `sdks/go/go.mod` on `main`, and release the next patch the
same way; `@latest` then skips the retracted one.

## Reject in review
Expand All @@ -155,4 +146,3 @@ same way; `@latest` then skips the retracted one.
- A parameter of a generated client type, or a new accessor for the generated client.
- A retry of an HTTP request without an owner, a bound and a named threat (AGENTS.md).
- A stdlib or language feature newer than the `go` directive.
- An edit to `sdks/go` on `main`.
2 changes: 1 addition & 1 deletion .cursor/install.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# Build-time setup for Cursor cloud agents. Must be idempotent and terminate.
# Builds read this from main, but agents also run on branches such as accelerate,
# Builds read this from main, but agents also run on other branches,
# so it installs their toolchain too: Go, Postgres, Redis and uv.
set -euo pipefail

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI (unit)
# uncancellable copy of every job.
on:
push:
branches: [ "main", "accelerate" ]
branches: [ "main" ]
paths-ignore:
- '**/*.md'
- '**/*.png'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/client-sdks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI (client SDKs)
# uncancellable copy of every job.
on:
push:
branches: [ "main", "accelerate" ]
branches: [ "main" ]
paths:
- 'sdks/kotlin/**'
- 'sdks/swift/**'
Expand Down Expand Up @@ -39,7 +39,7 @@ permissions:
# VISION_AGENTS_URL, which nothing here sets.
jobs:
# A pull request builds only the SDKs it touches, so a Dart change does not wait on the
# macOS runner. A push to main or accelerate builds them all.
# macOS runner. A push to main builds them all.
changes:
runs-on: ubuntu-latest
outputs:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,4 @@ jobs:
notify-on-failure: true
# The provider keys and the Slack webhook live in this environment.
environment: integration
# The environment's rules let only main, accelerate and v* tags run this
# workflow: Run workflow from any other branch is refused.
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ name: Integration (router)
# on a pull request, which is given no secrets.
on:
push:
branches: [ "main", "accelerate" ]
branches: [ "main" ]
paths:
- 'acceleration/**'
- '!**/*.md'
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/publish-sdk-kotlin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ name: Publish Kotlin SDK
# X.Y.Z-<yyyyMMddHHmm>-SNAPSHOT, which expires after 7 days. X.Y.Z must be newer than the last
# release.
# - A pull request from release-kotlin-X.Y.Z (version=X.Y.Z) fails unless X.Y.Z is newer than the
# last `sdk-kotlin-v*` tag and not already published. Merging it into accelerate publishes the
# last `sdk-kotlin-v*` tag and not already published. Merging it into main publishes the
# release, then tags the commit `sdk-kotlin-vX.Y.Z`.
# - Any other push to accelerate publishes nothing, and other pull requests do not run the jobs.
# - Any other push to main publishes nothing, and other pull requests do not run the jobs.
#
# There is no GitHub release: publishing one starts the Python release (release.yml), and the
# repository's releases are the Python packages'.
on:
push:
branches: [ "accelerate", "release-kotlin-*-SNAPSHOT" ]
branches: [ "main", "release-kotlin-*-SNAPSHOT" ]
paths:
- 'sdks/kotlin/**'
- '.github/workflows/publish-sdk-kotlin.yml'
pull_request:
branches: [ "accelerate" ]
branches: [ "main" ]
paths:
- 'sdks/kotlin/**'
- '.github/workflows/publish-sdk-kotlin.yml'
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
echo "::error file=sdks/kotlin/gradle.properties::$BRANCH publishes ${BASH_REMATCH[1]}, but version=$version"; exit 1
fi
last=$(git tag -l 'sdk-kotlin-v*' | sed 's/^sdk-kotlin-v//' | sort -V | tail -1)
if [ "$BRANCH" = accelerate ] && { [[ "$version" == *-SNAPSHOT ]] || [ "$version" = "$last" ]; }; then
if [ "$BRANCH" = main ] && { [[ "$version" == *-SNAPSHOT ]] || [ "$version" = "$last" ]; }; then
# Not a release: snapshots are published from release-kotlin-X.Y.Z-SNAPSHOT only.
echo "channel=none" >> "$GITHUB_OUTPUT"
exit 0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-versions.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Python compatibility check
on:
push:
branches: [ "main", "accelerate" ]
branches: [ "main" ]
paths:
- '**/pyproject.toml'
- 'uv.lock'
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/release-sdk-dotnet.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Release .NET SDK

# Run by hand from the Actions tab, with "Use workflow from" set to accelerate. It raises the last sdk-dotnet-v* version by the chosen part, or takes the exact version typed in, tests and packs that copy, pushes it to nuget.org through trusted publishing, then tags the commit sdk-dotnet-v<version>.
# The same file is on main only because GitHub offers "Run workflow" for workflows on the default branch; a run from main does nothing.
# Run by hand from the Actions tab, with "Use workflow from" set to main. It raises the last sdk-dotnet-v* version by the chosen part, or takes the exact version typed in, tests and packs that copy, pushes it to nuget.org through trusted publishing, then tags the commit sdk-dotnet-v<version>.
# No GitHub Release: publishing one runs release.yml, which uploads the Python packages to PyPI.
on:
workflow_dispatch:
Expand Down Expand Up @@ -29,10 +28,10 @@ concurrency:

jobs:
release:
if: github.ref == 'refs/heads/accelerate'
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
# The NuGet trusted publisher accepts only a token minted in this environment. A run enters
# it only from `accelerate`, and only after a reviewer approves it.
# The NuGet trusted publisher accepts only a token minted in this environment. The job
# `if` above lets only a run from `main` enter it; the environment has no reviewer gate.
environment: registry-publish
permissions:
contents: write # push the release tag
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-sdk-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ concurrency:

jobs:
release:
if: github.ref == 'refs/heads/accelerate'
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
# The npm trusted publisher accepts only a token minted in this environment. A run enters
# it only from `accelerate`, and only after a reviewer approves it.
# The npm trusted publisher accepts only a token minted in this environment. The job
# `if` above lets only a run from `main` enter it; the environment has no reviewer gate.
environment: registry-publish
permissions:
contents: write # push the tag and the GitHub release
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ jobs:
uv run plugins/stream/generate.py
changed=$(git status --porcelain -- plugins/stream/vision_agents/plugins/stream/_generated)
if [ -n "$changed" ]; then echo "$changed"; git diff; exit 1; fi
# Run mypy. A cache key is written once and never updated, so each push to main or
# accelerate saves its own, and every other run starts from the newest one.
# Run mypy. A cache key is written once and never updated, so each push to main
# saves its own, and every other run starts from the newest one.
- name: Restore mypy cache
uses: actions/cache/restore@v5
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sdk-go.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
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:
# sdks/go is released by a tag on main (see the Versioning section of sdks/go/README.md).
# This checks it 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:
Expand Down
17 changes: 8 additions & 9 deletions sdks/go/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Vision Agents Go SDK

The Go SDK for agents that run in Stream's [acceleration backend](https://github.com/GetStream/Vision-Agents/tree/accelerate/acceleration).
The Go SDK for agents that run in Stream's [acceleration backend](https://github.com/GetStream/Vision-Agents/tree/main/acceleration).

It is the Go counterpart of [plugins/stream](https://github.com/GetStream/Vision-Agents/tree/accelerate/plugins/stream), not of
[sdks/python](https://github.com/GetStream/Vision-Agents/tree/accelerate/sdks/python). The backend already runs the whole pipeline: it joins the
It is the Go counterpart of [plugins/stream](https://github.com/GetStream/Vision-Agents/tree/main/plugins/stream), not of
[sdks/python](https://github.com/GetStream/Vision-Agents/tree/main/sdks/python). The backend already runs the whole pipeline: it joins the
call, transcribes, answers and speaks. What this does is create the session, hold the events
socket, run your functions and configure everything.

Expand Down Expand Up @@ -741,9 +741,8 @@ Work a limit refuses is a `*stream.RouterError` of 402 `spend_limit_reached`, or
## Versioning

Versions are tags of the form `sdks/go/vX.Y.Z`, which `go get` reads as `vX.Y.Z`. The SDK is
developed on the repository's `accelerate` branch and released from `main`, which holds a copy
of this directory taken from one `accelerate` commit. While the version is `0.x`, a minor
version may change a signature; a patch only fixes. A version found broken after release is
developed on the repository's `main` branch, and a version is a tag on a `main` commit. While
the version is `0.x`, a minor version may change a signature; a patch only fixes. A version found broken after release is
retracted in `go.mod` and followed by the next patch, never replaced.

## Generated types
Expand All @@ -761,10 +760,10 @@ wherever one exists.
## Regenerating the client

`acceleration/generated.go` comes from
[acceleration/api/openapi.yaml](https://github.com/GetStream/Vision-Agents/blob/accelerate/acceleration/api/openapi.yaml), which is the same file
[acceleration/api/openapi.yaml](https://github.com/GetStream/Vision-Agents/blob/main/acceleration/api/openapi.yaml), which is the same file
the Go server and the Python client come from. It is committed, so installing this module
needs no code generation. Generating it needs the spec beside it, so it runs in a checkout of
`accelerate`:
this repository:

```bash
go generate ./...
Expand All @@ -787,7 +786,7 @@ what they are given.

`e2e_test.go` drives a running router instead of a stand-in for one, so it is behind a tag.
Start Postgres, Redis and the router as
[acceleration/README.md](https://github.com/GetStream/Vision-Agents/blob/accelerate/acceleration/README.md) describes, then:
[acceleration/README.md](https://github.com/GetStream/Vision-Agents/blob/main/acceleration/README.md) describes, then:

```bash
STREAM_ACCELERATION_URL=http://localhost:8080 \
Expand Down
2 changes: 1 addition & 1 deletion sdks/go/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// The generated client in acceleration/ is built from acceleration/api/openapi.yaml, the same
// file the Go server and the Python client are built from. Its output is committed, so
// installing this module needs no code generation; generating it needs the spec beside it,
// which only a checkout of the accelerate branch has. Its types are the SDK's models. Its
// which a checkout of this repository has. Its types are the SDK's models. Its
// operation methods are not the SDK's API and carry no compatibility promise.
package agentscorego

Expand Down
2 changes: 1 addition & 1 deletion sdks/js/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ still passes and only the one test that needed an answer steps aside.

### Releasing

The **Release JS SDK** workflow publishes to npm, run by hand from the `accelerate` branch.
The **Release JS SDK** workflow publishes to npm, run by hand from the `main` branch.
semantic-release (`release.config.mjs`) reads the commits since the last `sdk-js-v*` tag and
counts only those scoped `sdk-js`: `feat(sdk-js):` moves the minor, `fix(sdk-js):` and
`perf(sdk-js):` the patch, and while the package is 0.x a breaking change moves the minor too.
Expand Down
2 changes: 1 addition & 1 deletion sdks/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"url": "git+https://github.com/GetStream/Vision-Agents.git",
"directory": "sdks/js"
},
"homepage": "https://github.com/GetStream/Vision-Agents/tree/accelerate/sdks/js",
"homepage": "https://github.com/GetStream/Vision-Agents/tree/main/sdks/js",
"publishConfig": {
"access": "public"
},
Expand Down
2 changes: 1 addition & 1 deletion sdks/js/release.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
const scope = "sdk-js";

export default {
branches: ["accelerate"],
branches: ["main"],
tagFormat: "sdk-js-v${version}",
plugins: [
[
Expand Down
4 changes: 2 additions & 2 deletions sdks/kotlin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -378,10 +378,10 @@ to `https://stream-io-repo.com` from `release-kotlin-*` branches only. `version`
- **A snapshot:** push a branch named `release-kotlin-X.Y.Z-SNAPSHOT` that sets
`version=X.Y.Z-SNAPSHOT`. Each push publishes `X.Y.Z-<yyyyMMddHHmm>-SNAPSHOT`, which expires
after 7 days. `X.Y.Z` must be newer than the last release.
- **A release:** open a pull request to `accelerate` from `release-kotlin-X.Y.Z` that sets
- **A release:** open a pull request to `main` from `release-kotlin-X.Y.Z` that sets
`version=X.Y.Z`. It fails unless `X.Y.Z` is newer than the last release and not already
published. Merging it publishes the release and tags the commit `sdk-kotlin-vX.Y.Z`.

Other merges into `accelerate` publish nothing.
Other merges into `main` publish nothing.
Comment thread
kanat marked this conversation as resolved.
Resolved

There is no GitHub release: publishing one starts the Python release, `release.yml`.
6 changes: 3 additions & 3 deletions sdks/kotlin/core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ publishing {
pom {
name = artifactId
description = "Android client for Stream Agents."
url = "https://github.com/GetStream/Vision-Agents/tree/accelerate/sdks/kotlin"
url = "https://github.com/GetStream/Vision-Agents/tree/main/sdks/kotlin"
licenses {
license {
name = "Apache-2.0"
url = "https://github.com/GetStream/Vision-Agents/blob/accelerate/LICENSE"
url = "https://github.com/GetStream/Vision-Agents/blob/main/LICENSE"
}
}
developers {
Expand All @@ -64,7 +64,7 @@ publishing {
}
scm {
connection = "scm:git:github.com/GetStream/Vision-Agents.git"
url = "https://github.com/GetStream/Vision-Agents/tree/accelerate/sdks/kotlin"
url = "https://github.com/GetStream/Vision-Agents/tree/main/sdks/kotlin"
}
}
}
Expand Down
Loading