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
66 changes: 62 additions & 4 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,50 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Extract changelog for version
id: extract-changelog
run: |
VERSION="${{ needs.detect-release.outputs.version }}"
TAG="${{ needs.detect-release.outputs.latest_tag }}"

# Function to extract changelog section
extract_section() {
local pattern="$1"
# Extract from the pattern to the next ## or end of file
awk -v pattern="$pattern" '
/^## \[/ {
if (found) exit
if ($0 ~ pattern) { found=1; next }
}
found { print }
' CHANGELOG.md | sed '/^<!-- generated by git-cliff -->/d'
}

# Try to find the changelog section
CHANGELOG_CONTENT=""

if grep -q "## \[$VERSION\]" CHANGELOG.md; then
CHANGELOG_CONTENT=$(extract_section "\\[$VERSION\\]")
elif grep -q "## \[$TAG\]" CHANGELOG.md; then
CHANGELOG_CONTENT=$(extract_section "\\[$TAG\\]")
else
# Fallback: get the first version section (usually the latest)
CHANGELOG_CONTENT=$(awk '/^## \[/,/^## \[|^$/' CHANGELOG.md | tail -n +2 | head -n -1 | sed '/^<!-- generated by git-cliff -->/d')
fi

# If still empty, provide a default message
if [ -z "$CHANGELOG_CONTENT" ]; then
CHANGELOG_CONTENT="No changelog entries found for this version."
fi

# Output using multiline format for GitHub Actions
{
echo 'changelog<<CHANGELOG_EOF'
echo "$CHANGELOG_CONTENT"
echo 'CHANGELOG_EOF'
} >> "$GITHUB_OUTPUT"

- name: Create main GitHub Release
uses: softprops/action-gh-release@v1
with:
Expand All @@ -166,19 +210,33 @@ jobs:

## 📋 What's New

For detailed changes in this release, see [CHANGELOG.md](./CHANGELOG.md).

This release synchronizes all RunAgent SDKs (Python, JavaScript, Rust, Go) to version ${{ needs.detect-release.outputs.version }}.
${{ steps.extract-changelog.outputs.changelog }}

## 📦 Installation

```bash
pip install runagent==${{ needs.detect-release.outputs.version }}
```

```bash
npm install @runagent/sdk@${{ needs.detect-release.outputs.version }}
```

```bash
cargo add runagent@${{ needs.detect-release.outputs.version }}
```

```bash
go get github.com/runagent-dev/runagent-go@${{ needs.detect-release.outputs.latest_tag }}
```

---

For the full changelog, see [CHANGELOG.md](./CHANGELOG.md).

draft: false
prerelease: false
generate_release_notes: true # Let GitHub add commit-based notes
generate_release_notes: false
files: |
CHANGELOG.md
env:
Expand Down
23 changes: 14 additions & 9 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -370,35 +370,40 @@ if [[ ! $REPLY =~ ^[Yy]$ ]]; then
exit 0
fi

# Generate changelog BEFORE creating tag
generate_changelog

# Handle existing tag
# Handle existing tag FIRST (before generating changelog)
if handle_existing_tag "$VERSION"; then
echo "✅ Tag v$VERSION updated successfully!"
exit 0
fi

# Stage and commit changes (including changelog)
# Stage and commit version changes FIRST (without changelog)
git add .

if git diff --staged --quiet; then
echo "⚠️ No changes to commit."
exit 1
fi

# Commit changes first
# Commit version changes first
git commit -m "chore: bump version to v$VERSION

- Updated all SDK versions to $VERSION
- Generated changelog with git-cliff" -q
- Updated all SDK versions to $VERSION" -q

# Create new tag
# Create tag BEFORE generating changelog (so git-cliff knows about it)
git tag -a "v$VERSION" -m "Release v$VERSION
RunAgent Universal Release v$VERSION

All SDKs updated to version $VERSION"

# NOW generate changelog (tag exists, so git-cliff can reference it properly)
generate_changelog

# Stage and commit changelog separately
git add CHANGELOG.md
if ! git diff --staged --quiet; then
git commit -m "docs: update changelog for v$VERSION" -q
fi

CURRENT_BRANCH=$(git branch --show-current 2>/dev/null || git rev-parse --abbrev-ref HEAD 2>/dev/null)

# Push commit first, then tag (to prevent orphaned tags)
Expand Down
18 changes: 9 additions & 9 deletions runagent-go/PUBLISH.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Publishing `runagent-go`

The Go SDK is distributed through this monorepo using Go modules. Releasing a new version requires tagging the repository so `go get github.com/runagent-dev/runagent/runagent-go/runagent@vX.Y.Z` resolves to the new code.
The Go SDK is distributed through this repository using Go modules. Releasing a new version requires tagging the repository so `go get github.com/runagent-dev/runagent-go@vX.Y.Z` resolves to the new code.

---

Expand All @@ -15,7 +15,7 @@ The Go SDK is distributed through this monorepo using Go modules. Releasing a ne
### 2. Preflight Checklist

1. **Bump the SDK version**
- Update `runagent/runagent-go/runagent/version.go`.
- Update `version.go` in the root directory.
- Follow semver (increment patch for fixes, minor for new features, major for breaking changes).
2. **Changelog / release notes**
- Update the main repo changelog or docs to record the release.
Expand All @@ -29,8 +29,8 @@ The Go SDK is distributed through this monorepo using Go modules. Releasing a ne

```bash
# From runagent-go/
go test ./runagent/...
golangci-lint run ./runagent/... # optional but recommended
go test ./...
golangci-lint run ./... # optional but recommended
```

For extra assurance, run the example binaries:
Expand All @@ -45,13 +45,13 @@ go run ./examples/streaming.go
### 4. Commit & Tag

```bash
git add runagent-go
git add .
git commit -m "chore(go): release v0.1.34"

# Tag with the `sdk-go-` prefix so automation can detect it
git tag sdk-go-v0.1.34
# Tag with version prefix
git tag v0.1.34
git push origin main
git push origin sdk-go-v0.1.34
git push origin v0.1.34
```

> If releasing from a feature branch, merge it first (or push the tag from the release branch) so `main` reflects the published state.
Expand All @@ -62,7 +62,7 @@ git push origin sdk-go-v0.1.34

- Announce the release internally and update documentation links (docs site, README tables, etc.).
- Monitor `go proxy` and `pkg.go.dev` (usually available within minutes after pushing the tag).
- Verify `go list -m github.com/runagent-dev/runagent/runagent-go/runagent@latest` resolves to the new version.
- Verify `go list -m github.com/runagent-dev/runagent-go@latest` resolves to the new version.

---

Expand Down
4 changes: 2 additions & 2 deletions runagent-go/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The Go SDK mirrors the Python CLI client so Go services can trigger hosted or lo
### Installation

```bash
go get github.com/runagent-dev/runagent/runagent-go/runagent
go get github.com/runagent-dev/runagent-go
```

Requires Go 1.21+.
Expand Down Expand Up @@ -101,7 +101,7 @@ import (
"time"
"os"

"github.com/runagent-dev/runagent/runagent-go/runagent"
"github.com/runagent-dev/runagent-go"
)

func main() {
Expand Down
Binary file added runagent-go/basic
Binary file not shown.
4 changes: 2 additions & 2 deletions runagent-go/runagent/client.go → runagent-go/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (

"github.com/gorilla/websocket"

"github.com/runagent-dev/runagent/runagent-go/runagent/pkg/constants"
"github.com/runagent-dev/runagent/runagent-go/runagent/pkg/db"
"github.com/runagent-dev/runagent-go/internal/constants"
"github.com/runagent-dev/runagent-go/internal/db"
)

// RunAgentClient is the main entry point for invoking RunAgent deployments.
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion runagent-go/examples/basic.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"log"
"time"

"github.com/runagent-dev/runagent/runagent-go/runagent"
"github.com/runagent-dev/runagent-go"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion runagent-go/examples/streaming.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"log"
"time"

"github.com/runagent-dev/runagent/runagent-go/runagent"
"github.com/runagent-dev/runagent-go"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion runagent-go/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/runagent-dev/runagent/runagent-go
module github.com/runagent-dev/runagent-go

go 1.23.4

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"time"

"github.com/gorilla/websocket"
"github.com/runagent-dev/runagent/runagent-go/runagent/pkg/config"
"github.com/runagent-dev/runagent/runagent-go/runagent/pkg/db"
"github.com/runagent-dev/runagent/runagent-go/runagent/pkg/types"
"github.com/runagent-dev/runagent-go/internal/config"
"github.com/runagent-dev/runagent-go/internal/db"
"github.com/runagent-dev/runagent-go/internal/types"
)

// WebSocketMessage represents a WebSocket message
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"path/filepath"
"strings"

"github.com/runagent-dev/runagent/runagent-go/runagent/pkg/constants"
"github.com/runagent-dev/runagent-go/internal/constants"
)

// Config holds the SDK configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"time"

_ "github.com/mattn/go-sqlite3"
"github.com/runagent-dev/runagent/runagent-go/runagent/pkg/constants"
"github.com/runagent-dev/runagent-go/internal/constants"
)

// Agent represents an agent in the database
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"time"

"github.com/gorilla/mux"
"github.com/runagent-dev/runagent/runagent-go/runagent/pkg/types"
"github.com/runagent-dev/runagent-go/internal/types"
)

// Server represents a local RunAgent server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"net"

"github.com/runagent-dev/runagent/runagent-go/runagent/pkg/constants"
"github.com/runagent-dev/runagent-go/internal/constants"
)

// PortManager manages port allocation
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 9 additions & 9 deletions runagent-rust/runagent/src/utils/serializer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,10 @@ mod tests {
MessageType::Status,
serde_json::json!({"status": "ok"}),
);

let result = serializer.serialize_message(&message);
assert!(result.is_ok());

let serialized = result.unwrap();
let deserialized = serializer.deserialize_message(&serialized);
assert!(deserialized.is_ok());
Expand All @@ -321,40 +321,40 @@ mod tests {
let serializer = CoreSerializer::new(0.001).unwrap(); // Very small limit
let small_str = "test";
let large_str = "a".repeat(2000);

assert!(serializer.check_size_limit(small_str));
assert!(!serializer.check_size_limit(&large_str));
}

#[test]
fn test_json_serializable_check() {
let serializer = CoreSerializer::new(10.0).unwrap();

let simple_obj = serde_json::json!({"key": "value"});
assert!(serializer.is_json_serializable(&simple_obj));

let null_obj = Value::Null;
assert!(serializer.is_json_serializable(&null_obj));

let array_obj = serde_json::json!([1, 2, 3]);
assert!(serializer.is_json_serializable(&array_obj));
}

#[test]
fn test_nested_reconstruction() {
let serializer = CoreSerializer::new(10.0).unwrap();

let nested_data = serde_json::json!({
"level1": {
"level2": {
"value": "test"
}
}
});

let result = serializer.reconstruct_nested_json(nested_data.clone());
assert!(result.is_ok());

let reconstructed = result.unwrap();
assert_eq!(reconstructed, nested_data);
}
Expand Down