Skip to content

Sawra/sdk_fix_ts#93

Merged
sawradip merged 2 commits into
mainfrom
sawra/sdk_fix_ts
Nov 14, 2025
Merged

Sawra/sdk_fix_ts#93
sawradip merged 2 commits into
mainfrom
sawra/sdk_fix_ts

Conversation

@sawradip
Copy link
Copy Markdown
Contributor

@sawradip sawradip commented Nov 14, 2025

  • Updated all SDK versions to 0.1.32
  • Generated changelog with git-cliff

Summary by CodeRabbit

  • New Features

    • Added support for local agent execution with specialized error handling
    • Expanded agent architecture responses with additional metadata fields
  • Bug Fixes

    • Improved error handling with structured error codes and detailed guidance messages
  • Chores

    • Version bumped to 0.1.32 across all SDKs

- Updated all SDK versions to 0.1.32
- Generated changelog with git-cliff
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Nov 14, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Version 0.1.32 release bumps versions across Python, Go, Rust, and TypeScript SDKs. Introduces structured API response envelope support (success/data/error/message fields) to client response handlers and server endpoints. Adds new metadata fields (agent_id, name, description, extractor) to type definitions. Implements local-run modality support in TypeScript client with refined error extraction.

Changes

Cohort / File(s) Summary
Version Bumps
CHANGELOG.md, pyproject.toml, runagent-go/runagent/version.go, runagent-rust/runagent/Cargo.toml, runagent-ts/package.json, runagent/__init__.py, runagent/__version__.py
Updates version from 0.1.31 to 0.1.32 across package manifests, constants, and changelog. Adds miscellaneous tasks section to changelog.
Type Schema Expansions
runagent-go/runagent/pkg/types/types.go, runagent-ts/src/types/index.ts
EntryPoint adds Name, Description, Extractor fields with omitempty tags; marks File/Module as omitempty. AgentArchitecture adds AgentID field. TypeScript introduces new AgentEntrypoint interface and updates AgentArchitecture to include agent_id/agentId aliases.
Client Envelope Response Handling
runagent-go/runagent/pkg/client/client.go, runagent-rust/runagent/src/client/rest_client.rs, runagent-ts/src/rest/index.ts, runagent/sdk/rest_client.py
GetAgentArchitecture methods now parse envelope-wrapped responses; extract data on success or error messages on failure; fall back to raw response if envelope not detected. TypeScript adds local-run modality flag and normalizeArchitecture/extractArchitectureError helpers.
Client Error Handling
runagent-ts/src/client/index.ts
Initialization error handlers now rethrow existing RunAgentExecutionError or wrap unexpected errors with INITIALIZATION_ERROR code and sanitized message.
Server Response Structure
runagent/sdk/server/local_server.py
Health check architecture endpoint wraps flat response in structured envelope with success, data, message, error, timestamp, and request_id fields.

Sequence Diagram

sequenceDiagram
    participant Client
    participant Server
    participant Handler

    Note over Client,Server: Old Flow (0.1.31)
    Client->>Server: GET /agent-architecture
    Server->>Server: Build response (flat)
    Server-->>Client: {agent_id, entrypoints}
    Client->>Handler: Pass raw response

    Note over Client,Server: New Flow (0.1.32)
    Client->>Server: GET /agent-architecture
    Server->>Server: Build envelope response
    Server-->>Client: {success: true, data: {agent_id, entrypoints}, ...}
    Client->>Handler: Parse envelope
    alt success = true
        Handler->>Handler: Extract data
        Handler-->>Client: AgentArchitecture
    else success = false
        Handler->>Handler: Extract error message
        Handler-->>Client: Error (ServerError/RunAgentExecutionError)
    else Malformed
        Handler->>Handler: Fallback to raw response
        Handler-->>Client: AgentArchitecture
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Focus areas:
    • Envelope parsing logic in runagent-ts/src/rest/index.ts — complex error extraction with local-run branching and multiple error type mappings
    • Go and Rust client implementations — verify error message extraction and fallback behavior are consistent
    • Type field additions across Go and TypeScript — confirm omitempty/optional handling and backward compatibility
    • Local-run modality introduction in TypeScript — ensure isLocal flag propagates correctly through initialization and request paths

Possibly related PRs

Poem

🐰 A version hop from .31 to .32,
With envelopes sealed, our responses are true,
New fields now dance in our type ballet,
Local or remote, we route the right way,
Agent IDs spark with metadata's grace! ✨

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch sawra/sdk_fix_ts

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fbb5e00 and 05556bd.

⛔ Files ignored due to path filters (3)
  • leads_20251102_115848.csv is excluded by !**/*.csv
  • leads_20251102_120327.csv is excluded by !**/*.csv
  • runagent-ts/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (15)
  • CHANGELOG.md (1 hunks)
  • pyproject.toml (3 hunks)
  • runagent-go/runagent/pkg/client/client.go (1 hunks)
  • runagent-go/runagent/pkg/types/types.go (1 hunks)
  • runagent-go/runagent/version.go (1 hunks)
  • runagent-rust/runagent/Cargo.toml (1 hunks)
  • runagent-rust/runagent/src/client/rest_client.rs (1 hunks)
  • runagent-ts/package.json (1 hunks)
  • runagent-ts/src/client/index.ts (1 hunks)
  • runagent-ts/src/rest/index.ts (5 hunks)
  • runagent-ts/src/types/index.ts (1 hunks)
  • runagent/__init__.py (1 hunks)
  • runagent/__version__.py (1 hunks)
  • runagent/sdk/rest_client.py (1 hunks)
  • runagent/sdk/server/local_server.py (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sawradip sawradip merged commit 5ba4497 into main Nov 14, 2025
1 of 2 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Dec 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant