Skip to content

Commit 63c65c7

Browse files
committed
cp dines
2 parents f5bf2bf + 58ac02b commit 63c65c7

25 files changed

Lines changed: 795 additions & 55 deletions

.github/workflows/publish-npm.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,20 @@ jobs:
3030
bash ./bin/publish-npm
3131
env:
3232
NPM_TOKEN: ${{ secrets.RUNLOOP_NPM_TOKEN || secrets.NPM_TOKEN }}
33+
34+
- name: Add stable tag to NPM release
35+
run: |
36+
npm config set '//registry.npmjs.org/:_authToken' "$NPM_TOKEN"
37+
cd dist
38+
PACKAGE_NAME="$(jq -r -e '.name' ./package.json)"
39+
VERSION="$(jq -r -e '.version' ./package.json)"
40+
41+
# Only add stable tag if this is not a prerelease version
42+
if [[ ! "$VERSION" =~ -([a-zA-Z]+) ]]; then
43+
echo "Adding stable tag to version $VERSION"
44+
npm dist-tag add "$PACKAGE_NAME@$VERSION" stable
45+
else
46+
echo "Skipping stable tag for prerelease version $VERSION"
47+
fi
48+
env:
49+
NPM_TOKEN: ${{ secrets.RUNLOOP_NPM_TOKEN || secrets.NPM_TOKEN }}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# This workflow allows manually setting the "stable" dist-tag to a specific version on NPM.
2+
# You can run this workflow by navigating to https://www.github.com/runloopai/api-client-ts/actions/workflows/set-stable-tag.yml
3+
name: Set Stable Tag
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
version:
8+
description: 'Version to tag as stable (e.g., 0.67.1)'
9+
required: true
10+
type: string
11+
12+
jobs:
13+
set-stable-tag:
14+
name: Set stable tag
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Set up Node
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: '20'
24+
25+
- name: Set stable tag on NPM
26+
run: |
27+
npm config set '//registry.npmjs.org/:_authToken' "$NPM_TOKEN"
28+
PACKAGE_NAME="@runloop/api-client"
29+
VERSION="${{ inputs.version }}"
30+
31+
echo "Setting stable tag to version $VERSION for package $PACKAGE_NAME"
32+
npm dist-tag add "$PACKAGE_NAME@$VERSION" stable
33+
34+
echo "Successfully set stable tag to $VERSION"
35+
echo "You can verify with: npm dist-tag ls $PACKAGE_NAME"
36+
env:
37+
NPM_TOKEN: ${{ secrets.RUNLOOP_NPM_TOKEN || secrets.NPM_TOKEN }}

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.67.1"
2+
".": "0.68.0"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 94
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-63df0e3eb49d4874724f380b650693d90e071a41748bc163e93236b72a342883.yml
3-
openapi_spec_hash: eb5df67593bd1c4a5c8d1082f24d73fb
4-
config_hash: 95facb8cef59b5a1b05763b871bf6a4b
1+
configured_endpoints: 97
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-5f33221208c1febba343daf570f73a5086f150a9b128df045ebddc3fe2c86607.yml
3+
openapi_spec_hash: 0aea07130ddbe43a665a13a68231e2ca
4+
config_hash: 2363f563f42501d2b1587a4f64bdccaf

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# Changelog
22

3+
## 0.68.0 (2025-11-19)
4+
5+
Full Changelog: [v0.67.1...v0.68.0](https://github.com/runloopai/api-client-ts/compare/v0.67.1...v0.68.0)
6+
7+
### Features
8+
9+
* **blueprint:** adds queued state ([c8f5e0b](https://github.com/runloopai/api-client-ts/commit/c8f5e0b01cbd2fd573403b7d9b61816efce03b1f))
10+
* **blueprints:** Cleanup the BuildContext API ([#6407](https://github.com/runloopai/api-client-ts/issues/6407))\n\nTest ([8bd1c44](https://github.com/runloopai/api-client-ts/commit/8bd1c4468565effadc66b8524594daa5761938a4))
11+
* **blueprints:** prevent deletion of blueprints with dependent snapshots ([f52eb9a](https://github.com/runloopai/api-client-ts/commit/f52eb9aedc5d9317a2ab27952c13b0f2b2172339))
12+
* **devbox:** adding devbox execution std out / err last n lines ([#643](https://github.com/runloopai/api-client-ts/issues/643)) ([71de54c](https://github.com/runloopai/api-client-ts/commit/71de54c13bca60f3057e8c8ed2b8e5e531fffc9f))
13+
* **object:** Added ability to give objects a Time To Live, after which they are automatically deleted.\nfeat(blueprints): Added the ability to attach objects as build contexts that can be referenced in your Dockerfile. ([0ee5067](https://github.com/runloopai/api-client-ts/commit/0ee50676c734c536a8d1b5c25ef19d154da1f121))
14+
* **streaming:** harden SSE timeout recovery ([#645](https://github.com/runloopai/api-client-ts/issues/645)) ([cb249a7](https://github.com/runloopai/api-client-ts/commit/cb249a7d2c854a28e3932f35b2ad98dd30c8737b))
15+
16+
17+
### Bug Fixes
18+
19+
* **file-mount:** client side validation for file_mount size checks ([#639](https://github.com/runloopai/api-client-ts/issues/639)) ([30e7123](https://github.com/runloopai/api-client-ts/commit/30e712315740c393c21dbfe34e4d2611dca0d0dc))
20+
* **snapshot:** added "deleted" status to DevboxSnapshotStatus enum \n fix(storage-object): added ObjectState enum, fixed createObject() to appropriately type content_type and state as the respective enums ([5f8b203](https://github.com/runloopai/api-client-ts/commit/5f8b2031aa38ff9a87e3554c9e5100189ea448e2))
21+
322
## 0.67.1 (2025-11-05)
423

524
Full Changelog: [v0.67.0...v0.67.1](https://github.com/runloopai/api-client-ts/compare/v0.67.0...v0.67.1)

api.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Types:
44

55
- <code><a href="./src/resources/shared.ts">AfterIdle</a></code>
66
- <code><a href="./src/resources/shared.ts">AgentMountParameters</a></code>
7+
- <code><a href="./src/resources/shared.ts">AgentSource</a></code>
78
- <code><a href="./src/resources/shared.ts">CodeMountParameters</a></code>
89
- <code><a href="./src/resources/shared.ts">LaunchParameters</a></code>
910
- <code><a href="./src/resources/shared.ts">Mount</a></code>
@@ -41,6 +42,20 @@ Methods:
4142
- <code title="post /v1/benchmarks/runs/{id}/complete">client.benchmarks.runs.<a href="./src/resources/benchmarks/runs.ts">complete</a>(id) -> BenchmarkRunView</code>
4243
- <code title="get /v1/benchmarks/runs/{id}/scenario_runs">client.benchmarks.runs.<a href="./src/resources/benchmarks/runs.ts">listScenarioRuns</a>(id, { ...params }) -> ScenarioRunViewsBenchmarkRunsCursorIDPage</code>
4344

45+
# Agents
46+
47+
Types:
48+
49+
- <code><a href="./src/resources/agents.ts">AgentCreateParameters</a></code>
50+
- <code><a href="./src/resources/agents.ts">AgentListView</a></code>
51+
- <code><a href="./src/resources/agents.ts">AgentView</a></code>
52+
53+
Methods:
54+
55+
- <code title="post /v1/agents">client.agents.<a href="./src/resources/agents.ts">create</a>({ ...params }) -> AgentView</code>
56+
- <code title="get /v1/agents/{id}">client.agents.<a href="./src/resources/agents.ts">retrieve</a>(id) -> AgentView</code>
57+
- <code title="get /v1/agents">client.agents.<a href="./src/resources/agents.ts">list</a>({ ...params }) -> AgentViewsAgentsCursorIDPage</code>
58+
4459
# Blueprints
4560

4661
Types:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@runloop/api-client",
3-
"version": "0.67.1",
3+
"version": "0.68.0",
44
"description": "The official TypeScript library for the Runloop API",
55
"author": "Runloop <support@runloop.ai>",
66
"types": "dist/sdk.d.ts",

src/index.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import * as Core from './core';
55
import * as Errors from './error';
66
import * as Pagination from './pagination';
77
import {
8+
type AgentsCursorIDPageParams,
9+
AgentsCursorIDPageResponse,
810
type BenchmarkRunsCursorIDPageParams,
911
BenchmarkRunsCursorIDPageResponse,
1012
type BenchmarksCursorIDPageParams,
@@ -28,6 +30,15 @@ import {
2830
} from './pagination';
2931
import * as Uploads from './uploads';
3032
import * as API from './resources/index';
33+
import {
34+
AgentCreateParameters,
35+
AgentCreateParams,
36+
AgentListParams,
37+
AgentListView,
38+
AgentView,
39+
AgentViewsAgentsCursorIDPage,
40+
Agents,
41+
} from './resources/agents';
3142
import {
3243
BlueprintBuildFromInspectionParameters,
3344
BlueprintBuildLog,
@@ -289,6 +300,7 @@ export class Runloop extends Core.APIClient {
289300
}
290301

291302
benchmarks: API.Benchmarks = new API.Benchmarks(this);
303+
agents: API.Agents = new API.Agents(this);
292304
blueprints: API.Blueprints = new API.Blueprints(this);
293305
devboxes: API.Devboxes = new API.Devboxes(this);
294306
scenarios: API.Scenarios = new API.Scenarios(this);
@@ -341,6 +353,8 @@ export class Runloop extends Core.APIClient {
341353

342354
Runloop.Benchmarks = Benchmarks;
343355
Runloop.BenchmarkViewsBenchmarksCursorIDPage = BenchmarkViewsBenchmarksCursorIDPage;
356+
Runloop.Agents = Agents;
357+
Runloop.AgentViewsAgentsCursorIDPage = AgentViewsAgentsCursorIDPage;
344358
Runloop.Blueprints = Blueprints;
345359
Runloop.BlueprintViewsBlueprintsCursorIDPage = BlueprintViewsBlueprintsCursorIDPage;
346360
Runloop.Devboxes = Devboxes;
@@ -387,6 +401,12 @@ export declare namespace Runloop {
387401
type BenchmarksCursorIDPageResponse as BenchmarksCursorIDPageResponse,
388402
};
389403

404+
export import AgentsCursorIDPage = Pagination.AgentsCursorIDPage;
405+
export {
406+
type AgentsCursorIDPageParams as AgentsCursorIDPageParams,
407+
type AgentsCursorIDPageResponse as AgentsCursorIDPageResponse,
408+
};
409+
390410
export import BenchmarkRunsCursorIDPage = Pagination.BenchmarkRunsCursorIDPage;
391411
export {
392412
type BenchmarkRunsCursorIDPageParams as BenchmarkRunsCursorIDPageParams,
@@ -434,6 +454,16 @@ export declare namespace Runloop {
434454
type BenchmarkStartRunParams as BenchmarkStartRunParams,
435455
};
436456

457+
export {
458+
Agents as Agents,
459+
type AgentCreateParameters as AgentCreateParameters,
460+
type AgentListView as AgentListView,
461+
type AgentView as AgentView,
462+
AgentViewsAgentsCursorIDPage as AgentViewsAgentsCursorIDPage,
463+
type AgentCreateParams as AgentCreateParams,
464+
type AgentListParams as AgentListParams,
465+
};
466+
437467
export {
438468
Blueprints as Blueprints,
439469
type BlueprintBuildFromInspectionParameters as BlueprintBuildFromInspectionParameters,
@@ -561,6 +591,7 @@ export declare namespace Runloop {
561591

562592
export type AfterIdle = API.AfterIdle;
563593
export type AgentMountParameters = API.AgentMountParameters;
594+
export type AgentSource = API.AgentSource;
564595
export type CodeMountParameters = API.CodeMountParameters;
565596
export type LaunchParameters = API.LaunchParameters;
566597
export type Mount = API.Mount;

src/pagination.ts

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,80 @@ export class BenchmarksCursorIDPage<Item extends { id: string }>
372372
}
373373
}
374374

375+
export interface AgentsCursorIDPageResponse<Item> {
376+
agents: Array<Item>;
377+
378+
has_more: boolean;
379+
380+
total_count: number;
381+
}
382+
383+
export interface AgentsCursorIDPageParams {
384+
starting_after?: string;
385+
386+
limit?: number;
387+
}
388+
389+
export class AgentsCursorIDPage<Item extends { id: string }>
390+
extends AbstractPage<Item>
391+
implements AgentsCursorIDPageResponse<Item>
392+
{
393+
agents: Array<Item>;
394+
395+
has_more: boolean;
396+
397+
total_count: number;
398+
399+
constructor(
400+
client: APIClient,
401+
response: Response,
402+
body: AgentsCursorIDPageResponse<Item>,
403+
options: FinalRequestOptions,
404+
) {
405+
super(client, response, body, options);
406+
407+
this.agents = body.agents || [];
408+
this.has_more = body.has_more || false;
409+
this.total_count = body.total_count || 0;
410+
}
411+
412+
getPaginatedItems(): Item[] {
413+
return this.agents ?? [];
414+
}
415+
416+
override hasNextPage(): boolean {
417+
if (this.has_more === false) {
418+
return false;
419+
}
420+
421+
return super.hasNextPage();
422+
}
423+
424+
// @deprecated Please use `nextPageInfo()` instead
425+
nextPageParams(): Partial<AgentsCursorIDPageParams> | null {
426+
const info = this.nextPageInfo();
427+
if (!info) return null;
428+
if ('params' in info) return info.params;
429+
const params = Object.fromEntries(info.url.searchParams);
430+
if (!Object.keys(params).length) return null;
431+
return params;
432+
}
433+
434+
nextPageInfo(): PageInfo | null {
435+
const agents = this.getPaginatedItems();
436+
if (!agents.length) {
437+
return null;
438+
}
439+
440+
const id = agents[agents.length - 1]?.id;
441+
if (!id) {
442+
return null;
443+
}
444+
445+
return { params: { starting_after: id } };
446+
}
447+
}
448+
375449
export interface BenchmarkRunsCursorIDPageResponse<Item> {
376450
runs: Array<Item>;
377451

0 commit comments

Comments
 (0)