Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
82f9644
codegen metadata
stainless-app[bot] Apr 24, 2026
2763780
feat(api): manual updates
stainless-app[bot] Apr 24, 2026
f47086d
codegen metadata
stainless-app[bot] Apr 24, 2026
fe6da53
codegen metadata
stainless-app[bot] Apr 24, 2026
28d9974
codegen metadata
stainless-app[bot] Apr 24, 2026
253d5a5
codegen metadata
stainless-app[bot] Apr 24, 2026
5264d8d
feat(go): add default http client with timeout
stainless-app[bot] Apr 26, 2026
5c6579f
feat: support setting headers via env
stainless-app[bot] Apr 28, 2026
5a087e9
codegen metadata
stainless-app[bot] Apr 29, 2026
8670a4e
feat(api): manual updates
stainless-app[bot] Apr 29, 2026
9bf0c17
codegen metadata
stainless-app[bot] Apr 30, 2026
d7e1bc0
feat(api): api update
stainless-app[bot] Apr 30, 2026
276aaba
codegen metadata
stainless-app[bot] Apr 30, 2026
1993ace
feat(api): api update
stainless-app[bot] Apr 30, 2026
3ca4114
codegen metadata
stainless-app[bot] Apr 30, 2026
7186cf4
codegen metadata
stainless-app[bot] Apr 30, 2026
338ac04
codegen metadata
stainless-app[bot] Apr 30, 2026
df5c5b2
codegen metadata
stainless-app[bot] Apr 30, 2026
b87d3ca
feat(api): api update
stainless-app[bot] May 1, 2026
04e8d51
codegen metadata
stainless-app[bot] May 1, 2026
cdbaf37
codegen metadata
stainless-app[bot] May 1, 2026
6718c03
codegen metadata
stainless-app[bot] May 1, 2026
4cc4d6f
codegen metadata
stainless-app[bot] May 1, 2026
3ff26ae
codegen metadata
stainless-app[bot] May 1, 2026
3a4ca71
chore: avoid embedding reflect.Type for dead code elimination
stainless-app[bot] May 1, 2026
32b19de
codegen metadata
stainless-app[bot] May 1, 2026
b9529a7
codegen metadata
stainless-app[bot] May 1, 2026
59da953
feat(api): api update
stainless-app[bot] May 1, 2026
470ebbe
release: 0.1.0
stainless-app[bot] May 1, 2026
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 .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.0.1"
".": "0.1.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 66
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/calvinfo-o4h6u5%2Fcerca-6bd8aeaf9c5b9629c1db5e9770e0e735b2c4fc3a4b9f2700b83a7201152088c4.yml
openapi_spec_hash: b4978a5083d3d075b52101297da89918
config_hash: 6933f26e5db3cc830b92644a8db3b664
configured_endpoints: 64
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/calvinfo-o4h6u5/cerca-a3610b6045d1d701859276e09dff35829bdf50509b762116860d8005831b0297.yml
openapi_spec_hash: 2a240632b5ef4814881e36247ec3c8dc
config_hash: 5d687451efd1d2898e81fa3ddb25f8ed
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Changelog

## 0.1.0 (2026-05-01)

Full Changelog: [v0.0.1...v0.1.0](https://github.com/matrices/cerca-go/compare/v0.0.1...v0.1.0)

### Features

* **api:** api update ([59da953](https://github.com/matrices/cerca-go/commit/59da953ed2c87a54dfa22a339651d6b1cf48ddce))
* **api:** api update ([b87d3ca](https://github.com/matrices/cerca-go/commit/b87d3caf820dceb55385e68abc20ed9a98f3f59a))
* **api:** api update ([1993ace](https://github.com/matrices/cerca-go/commit/1993ace6337df84d6f5f898493a3f63af7ad14e7))
* **api:** api update ([d7e1bc0](https://github.com/matrices/cerca-go/commit/d7e1bc066e9d6e1168070a1bb0b94159d161a98c))
* **api:** manual updates ([8670a4e](https://github.com/matrices/cerca-go/commit/8670a4e255e029af5600c5355ecc1054c43eceb0))
* **api:** manual updates ([2763780](https://github.com/matrices/cerca-go/commit/2763780292758cbac65255da7a8c83d0cb1800a7))
* **api:** manual updates ([5400c58](https://github.com/matrices/cerca-go/commit/5400c5818fb359dd56b8ddd3c31454c55873aefa))
* **go:** add default http client with timeout ([5264d8d](https://github.com/matrices/cerca-go/commit/5264d8d2efdbf5b4b5d5ccc16b0442feaa1827b2))
* support setting headers via env ([5c6579f](https://github.com/matrices/cerca-go/commit/5c6579f082703dbd457d333312c3d11eeb3ded86))


### Chores

* avoid embedding reflect.Type for dead code elimination ([3a4ca71](https://github.com/matrices/cerca-go/commit/3a4ca71ce279af304fce557e47a883a0a80dd285))
* configure new SDK language ([f3c82b6](https://github.com/matrices/cerca-go/commit/f3c82b6f072168405c3aa4b2a4e03fc283f44c26))
* **internal:** more robust bootstrap script ([5e7983b](https://github.com/matrices/cerca-go/commit/5e7983b03881403b643d1c2ff43f12f900873deb))
* **tests:** bump steady to v0.22.1 ([3d1fcf8](https://github.com/matrices/cerca-go/commit/3d1fcf893fdfeda758337ae72803c56024f3d749))
55 changes: 40 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Or to pin the version:
<!-- x-release-please-start-version -->

```sh
go get -u 'github.com/matrices/cerca-go@v0.0.1'
go get -u 'github.com/matrices/cerca-go@v0.1.0'
```

<!-- x-release-please-end -->
Expand Down Expand Up @@ -52,11 +52,11 @@ func main() {
client := cercago.NewClient(
option.WithAPIKey("My API Key"), // defaults to os.LookupEnv("CERCA_API_KEY")
)
thread, err := client.Cells.Threads.New(
thread, err := client.Threads.New(
context.TODO(),
"cell_abc123",
cercago.CellThreadNewParams{
UserMessage: cercago.F("What's on my calendar today?"),
"agent_abc123",
cercago.ThreadNewParams{
Message: cercago.F("What's on my calendar today?"),
},
)
if err != nil {
Expand Down Expand Up @@ -151,7 +151,7 @@ client := cercago.NewClient(
option.WithHeader("X-Some-Header", "custom_header_info"),
)

client.Cells.New(context.TODO(), ...,
client.Agents.New(context.TODO(), ...,
// Override the header
option.WithHeader("X-Some-Header", "some_other_custom_header_info"),
// Add an undocumented field to the request body, using sjson syntax
Expand All @@ -167,9 +167,34 @@ This library provides some conveniences for working with paginated list endpoint

You can use `.ListAutoPaging()` methods to iterate through items across all pages:

```go
iter := client.Agents.ListAutoPaging(context.TODO(), cercago.AgentListParams{})
// Automatically fetches more pages as needed.
for iter.Next() {
agentSummary := iter.Current()
fmt.Printf("%+v\n", agentSummary)
}
if err := iter.Err(); err != nil {
panic(err.Error())
}
```

Or you can use simple `.List()` methods to fetch a single page and receive a standard response object
with additional helper methods like `.GetNextPage()`, e.g.:

```go
page, err := client.Agents.List(context.TODO(), cercago.AgentListParams{})
for page != nil {
for _, agent := range page.Agents {
fmt.Printf("%+v\n", agent)
}
page, err = page.GetNextPage()
}
if err != nil {
panic(err.Error())
}
```

### Errors

When the API returns a non-success status code, we return an error with type
Expand All @@ -180,7 +205,7 @@ When the API returns a non-success status code, we return an error with type
To handle errors, we recommend that you use the `errors.As` pattern:

```go
_, err := client.Cells.New(context.TODO(), cercago.CellNewParams{
_, err := client.Agents.New(context.TODO(), cercago.AgentNewParams{
UserID: cercago.F("user_abc123"),
})
if err != nil {
Expand All @@ -189,7 +214,7 @@ if err != nil {
println(string(apierr.DumpRequest(true))) // Prints the serialized HTTP request
println(string(apierr.DumpResponse(true))) // Prints the serialized HTTP response
}
panic(err.Error()) // GET "/cells": 400 Bad Request { ... }
panic(err.Error()) // GET "/agents": 400 Bad Request { ... }
}
```

Expand All @@ -207,9 +232,9 @@ To set a per-retry timeout, use `option.WithRequestTimeout()`.
// This sets the timeout for the request, including all the retries.
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()
client.Cells.New(
client.Agents.New(
ctx,
cercago.CellNewParams{
cercago.AgentNewParams{
UserID: cercago.F("user_abc123"),
},
// This sets the per-retry timeout
Expand Down Expand Up @@ -245,9 +270,9 @@ client := cercago.NewClient(
)

// Override per-request:
client.Cells.New(
client.Agents.New(
context.TODO(),
cercago.CellNewParams{
cercago.AgentNewParams{
UserID: cercago.F("user_abc123"),
},
option.WithMaxRetries(5),
Expand All @@ -262,17 +287,17 @@ you need to examine response headers, status codes, or other details.
```go
// Create a variable to store the HTTP response
var response *http.Response
cell, err := client.Cells.New(
agent, err := client.Agents.New(
context.TODO(),
cercago.CellNewParams{
cercago.AgentNewParams{
UserID: cercago.F("user_abc123"),
},
option.WithResponseInto(&response),
)
if err != nil {
// handle error
}
fmt.Printf("%+v\n", cell)
fmt.Printf("%+v\n", agent)

fmt.Printf("Status Code: %d\n", response.StatusCode)
fmt.Printf("Headers: %+#v\n", response.Header)
Expand Down
Loading
Loading