@runtypelabs/sdk 1.24.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +13 -2
- package/dist/index.d.cts +46 -4
- package/dist/index.d.ts +46 -4
- package/dist/index.mjs +13 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3737,7 +3737,10 @@ var RecordsEndpoint = class {
|
|
|
3737
3737
|
return this.client.delete(`/records/${id}/results`, { resultId });
|
|
3738
3738
|
}
|
|
3739
3739
|
/**
|
|
3740
|
-
* Upload CSV file to create multiple records
|
|
3740
|
+
* Upload CSV file to create multiple records.
|
|
3741
|
+
* Provide either `typeColumn` (read each row's type from a column) or
|
|
3742
|
+
* `typeValue` (assign the same constant type to every row). `typeValue`
|
|
3743
|
+
* takes precedence when both are supplied.
|
|
3741
3744
|
*/
|
|
3742
3745
|
async uploadCsv(file, params) {
|
|
3743
3746
|
const formData = new FormData();
|
|
@@ -3748,6 +3751,9 @@ var RecordsEndpoint = class {
|
|
|
3748
3751
|
if (params?.nameColumn) {
|
|
3749
3752
|
formData.append("nameColumn", params.nameColumn);
|
|
3750
3753
|
}
|
|
3754
|
+
if (params?.typeValue) {
|
|
3755
|
+
formData.append("typeValue", params.typeValue);
|
|
3756
|
+
}
|
|
3751
3757
|
return this.client.postFormData("/records/upload-csv", formData);
|
|
3752
3758
|
}
|
|
3753
3759
|
/**
|
|
@@ -4315,7 +4321,12 @@ var EvalEndpoint = class {
|
|
|
4315
4321
|
}
|
|
4316
4322
|
/**
|
|
4317
4323
|
* Run virtual eval with streaming response
|
|
4318
|
-
* Executes multiple eval configs simultaneously and streams results via multiplexed SSE
|
|
4324
|
+
* Executes multiple eval configs simultaneously and streams results via multiplexed SSE.
|
|
4325
|
+
*
|
|
4326
|
+
* Targets are mutually exclusive — provide exactly one of `flowId`,
|
|
4327
|
+
* `flowDefinition`, or `agentId`. The `agentId` form targets a
|
|
4328
|
+
* `claude_managed` agent; combine with per-config `claudeManagedOverride`
|
|
4329
|
+
* to vary model / system prompt / tool permissions across configs.
|
|
4319
4330
|
*/
|
|
4320
4331
|
async runVirtualEval(data) {
|
|
4321
4332
|
return this.client.requestStream("/eval/stream", {
|
package/dist/index.d.cts
CHANGED
|
@@ -1142,7 +1142,6 @@ interface Flow {
|
|
|
1142
1142
|
id: string;
|
|
1143
1143
|
name: string;
|
|
1144
1144
|
description?: string | null;
|
|
1145
|
-
status: 'draft' | 'active' | 'paused' | 'failed';
|
|
1146
1145
|
config?: JsonObject;
|
|
1147
1146
|
userId: string;
|
|
1148
1147
|
organizationId: string | null;
|
|
@@ -1262,6 +1261,12 @@ interface CreateFlowRequest {
|
|
|
1262
1261
|
name: string;
|
|
1263
1262
|
description?: string;
|
|
1264
1263
|
flowSteps?: Array<{
|
|
1264
|
+
/**
|
|
1265
|
+
* Stable step identifier. When provided, the server preserves it across
|
|
1266
|
+
* saves so references in `flow_step_results` and dashboard state remain
|
|
1267
|
+
* valid. When omitted, the server mints one on first save.
|
|
1268
|
+
*/
|
|
1269
|
+
id?: string;
|
|
1265
1270
|
type: 'prompt' | 'context' | 'condition' | 'output' | 'email';
|
|
1266
1271
|
name: string;
|
|
1267
1272
|
order?: number;
|
|
@@ -1378,6 +1383,8 @@ interface DispatchRequest {
|
|
|
1378
1383
|
id?: number | string;
|
|
1379
1384
|
name?: string;
|
|
1380
1385
|
type?: string;
|
|
1386
|
+
/** First-class owner; stored as `metadata.ownerId` (overrides any value in `metadata`). */
|
|
1387
|
+
ownerId?: string;
|
|
1381
1388
|
metadata?: Metadata;
|
|
1382
1389
|
};
|
|
1383
1390
|
flow: {
|
|
@@ -3280,11 +3287,15 @@ declare class RecordsEndpoint {
|
|
|
3280
3287
|
*/
|
|
3281
3288
|
deleteResult(id: string, resultId: string): Promise<void>;
|
|
3282
3289
|
/**
|
|
3283
|
-
* Upload CSV file to create multiple records
|
|
3290
|
+
* Upload CSV file to create multiple records.
|
|
3291
|
+
* Provide either `typeColumn` (read each row's type from a column) or
|
|
3292
|
+
* `typeValue` (assign the same constant type to every row). `typeValue`
|
|
3293
|
+
* takes precedence when both are supplied.
|
|
3284
3294
|
*/
|
|
3285
3295
|
uploadCsv(file: File, params?: {
|
|
3286
3296
|
typeColumn?: string;
|
|
3287
3297
|
nameColumn?: string;
|
|
3298
|
+
typeValue?: string;
|
|
3288
3299
|
}): Promise<any>;
|
|
3289
3300
|
/**
|
|
3290
3301
|
* Get record types (distinct values)
|
|
@@ -3716,7 +3727,12 @@ declare class EvalEndpoint {
|
|
|
3716
3727
|
constructor(client: ApiClient);
|
|
3717
3728
|
/**
|
|
3718
3729
|
* Run virtual eval with streaming response
|
|
3719
|
-
* Executes multiple eval configs simultaneously and streams results via multiplexed SSE
|
|
3730
|
+
* Executes multiple eval configs simultaneously and streams results via multiplexed SSE.
|
|
3731
|
+
*
|
|
3732
|
+
* Targets are mutually exclusive — provide exactly one of `flowId`,
|
|
3733
|
+
* `flowDefinition`, or `agentId`. The `agentId` form targets a
|
|
3734
|
+
* `claude_managed` agent; combine with per-config `claudeManagedOverride`
|
|
3735
|
+
* to vary model / system prompt / tool permissions across configs.
|
|
3720
3736
|
*/
|
|
3721
3737
|
runVirtualEval(data: {
|
|
3722
3738
|
record?: {
|
|
@@ -3730,10 +3746,36 @@ declare class EvalEndpoint {
|
|
|
3730
3746
|
}>;
|
|
3731
3747
|
flowId?: string;
|
|
3732
3748
|
flowDefinition?: any;
|
|
3749
|
+
/**
|
|
3750
|
+
* Target a `claude_managed` agent rather than a flow. Mutually exclusive
|
|
3751
|
+
* with `flowId` and `flowDefinition`.
|
|
3752
|
+
*/
|
|
3753
|
+
agentId?: string;
|
|
3733
3754
|
evalConfigs: Array<{
|
|
3734
3755
|
evalConfigId?: string;
|
|
3735
3756
|
evalName?: string;
|
|
3736
3757
|
stepOverrides?: Record<string, any>;
|
|
3758
|
+
/**
|
|
3759
|
+
* Per-config override applied when the eval target is a
|
|
3760
|
+
* `claude_managed` agent. Mirrors `ClaudeManagedEvalOverride` from
|
|
3761
|
+
* `@runtypelabs/shared` — defined inline here to keep the SDK
|
|
3762
|
+
* dependency-free.
|
|
3763
|
+
*/
|
|
3764
|
+
claudeManagedOverride?: {
|
|
3765
|
+
targetType?: 'claude_managed';
|
|
3766
|
+
model?: string;
|
|
3767
|
+
systemPrompt?: string;
|
|
3768
|
+
toolPermissions?: {
|
|
3769
|
+
bash?: boolean;
|
|
3770
|
+
read?: boolean;
|
|
3771
|
+
write?: boolean;
|
|
3772
|
+
edit?: boolean;
|
|
3773
|
+
glob?: boolean;
|
|
3774
|
+
grep?: boolean;
|
|
3775
|
+
webFetch?: boolean;
|
|
3776
|
+
webSearch?: boolean;
|
|
3777
|
+
};
|
|
3778
|
+
};
|
|
3737
3779
|
}>;
|
|
3738
3780
|
evalGroupId?: string;
|
|
3739
3781
|
}): Promise<Response>;
|
|
@@ -3960,7 +4002,7 @@ interface AgentMediaEvent extends BaseAgentEvent {
|
|
|
3960
4002
|
* Local SDK copy of `ExternalAgentContext` from `@runtypelabs/shared`'s
|
|
3961
4003
|
* `sse-parser.ts`. The SDK has zero production dependencies and
|
|
3962
4004
|
* re-derives wire types by design (Phase 9 — see
|
|
3963
|
-
* `docs/features/
|
|
4005
|
+
* `docs/features/shipped/2026-02-25-user-cloud-deployment.md`). Keep
|
|
3964
4006
|
* the shape identical to `@runtypelabs/shared`'s `ExternalAgentContext`.
|
|
3965
4007
|
*/
|
|
3966
4008
|
interface ExternalAgentContext {
|
package/dist/index.d.ts
CHANGED
|
@@ -1142,7 +1142,6 @@ interface Flow {
|
|
|
1142
1142
|
id: string;
|
|
1143
1143
|
name: string;
|
|
1144
1144
|
description?: string | null;
|
|
1145
|
-
status: 'draft' | 'active' | 'paused' | 'failed';
|
|
1146
1145
|
config?: JsonObject;
|
|
1147
1146
|
userId: string;
|
|
1148
1147
|
organizationId: string | null;
|
|
@@ -1262,6 +1261,12 @@ interface CreateFlowRequest {
|
|
|
1262
1261
|
name: string;
|
|
1263
1262
|
description?: string;
|
|
1264
1263
|
flowSteps?: Array<{
|
|
1264
|
+
/**
|
|
1265
|
+
* Stable step identifier. When provided, the server preserves it across
|
|
1266
|
+
* saves so references in `flow_step_results` and dashboard state remain
|
|
1267
|
+
* valid. When omitted, the server mints one on first save.
|
|
1268
|
+
*/
|
|
1269
|
+
id?: string;
|
|
1265
1270
|
type: 'prompt' | 'context' | 'condition' | 'output' | 'email';
|
|
1266
1271
|
name: string;
|
|
1267
1272
|
order?: number;
|
|
@@ -1378,6 +1383,8 @@ interface DispatchRequest {
|
|
|
1378
1383
|
id?: number | string;
|
|
1379
1384
|
name?: string;
|
|
1380
1385
|
type?: string;
|
|
1386
|
+
/** First-class owner; stored as `metadata.ownerId` (overrides any value in `metadata`). */
|
|
1387
|
+
ownerId?: string;
|
|
1381
1388
|
metadata?: Metadata;
|
|
1382
1389
|
};
|
|
1383
1390
|
flow: {
|
|
@@ -3280,11 +3287,15 @@ declare class RecordsEndpoint {
|
|
|
3280
3287
|
*/
|
|
3281
3288
|
deleteResult(id: string, resultId: string): Promise<void>;
|
|
3282
3289
|
/**
|
|
3283
|
-
* Upload CSV file to create multiple records
|
|
3290
|
+
* Upload CSV file to create multiple records.
|
|
3291
|
+
* Provide either `typeColumn` (read each row's type from a column) or
|
|
3292
|
+
* `typeValue` (assign the same constant type to every row). `typeValue`
|
|
3293
|
+
* takes precedence when both are supplied.
|
|
3284
3294
|
*/
|
|
3285
3295
|
uploadCsv(file: File, params?: {
|
|
3286
3296
|
typeColumn?: string;
|
|
3287
3297
|
nameColumn?: string;
|
|
3298
|
+
typeValue?: string;
|
|
3288
3299
|
}): Promise<any>;
|
|
3289
3300
|
/**
|
|
3290
3301
|
* Get record types (distinct values)
|
|
@@ -3716,7 +3727,12 @@ declare class EvalEndpoint {
|
|
|
3716
3727
|
constructor(client: ApiClient);
|
|
3717
3728
|
/**
|
|
3718
3729
|
* Run virtual eval with streaming response
|
|
3719
|
-
* Executes multiple eval configs simultaneously and streams results via multiplexed SSE
|
|
3730
|
+
* Executes multiple eval configs simultaneously and streams results via multiplexed SSE.
|
|
3731
|
+
*
|
|
3732
|
+
* Targets are mutually exclusive — provide exactly one of `flowId`,
|
|
3733
|
+
* `flowDefinition`, or `agentId`. The `agentId` form targets a
|
|
3734
|
+
* `claude_managed` agent; combine with per-config `claudeManagedOverride`
|
|
3735
|
+
* to vary model / system prompt / tool permissions across configs.
|
|
3720
3736
|
*/
|
|
3721
3737
|
runVirtualEval(data: {
|
|
3722
3738
|
record?: {
|
|
@@ -3730,10 +3746,36 @@ declare class EvalEndpoint {
|
|
|
3730
3746
|
}>;
|
|
3731
3747
|
flowId?: string;
|
|
3732
3748
|
flowDefinition?: any;
|
|
3749
|
+
/**
|
|
3750
|
+
* Target a `claude_managed` agent rather than a flow. Mutually exclusive
|
|
3751
|
+
* with `flowId` and `flowDefinition`.
|
|
3752
|
+
*/
|
|
3753
|
+
agentId?: string;
|
|
3733
3754
|
evalConfigs: Array<{
|
|
3734
3755
|
evalConfigId?: string;
|
|
3735
3756
|
evalName?: string;
|
|
3736
3757
|
stepOverrides?: Record<string, any>;
|
|
3758
|
+
/**
|
|
3759
|
+
* Per-config override applied when the eval target is a
|
|
3760
|
+
* `claude_managed` agent. Mirrors `ClaudeManagedEvalOverride` from
|
|
3761
|
+
* `@runtypelabs/shared` — defined inline here to keep the SDK
|
|
3762
|
+
* dependency-free.
|
|
3763
|
+
*/
|
|
3764
|
+
claudeManagedOverride?: {
|
|
3765
|
+
targetType?: 'claude_managed';
|
|
3766
|
+
model?: string;
|
|
3767
|
+
systemPrompt?: string;
|
|
3768
|
+
toolPermissions?: {
|
|
3769
|
+
bash?: boolean;
|
|
3770
|
+
read?: boolean;
|
|
3771
|
+
write?: boolean;
|
|
3772
|
+
edit?: boolean;
|
|
3773
|
+
glob?: boolean;
|
|
3774
|
+
grep?: boolean;
|
|
3775
|
+
webFetch?: boolean;
|
|
3776
|
+
webSearch?: boolean;
|
|
3777
|
+
};
|
|
3778
|
+
};
|
|
3737
3779
|
}>;
|
|
3738
3780
|
evalGroupId?: string;
|
|
3739
3781
|
}): Promise<Response>;
|
|
@@ -3960,7 +4002,7 @@ interface AgentMediaEvent extends BaseAgentEvent {
|
|
|
3960
4002
|
* Local SDK copy of `ExternalAgentContext` from `@runtypelabs/shared`'s
|
|
3961
4003
|
* `sse-parser.ts`. The SDK has zero production dependencies and
|
|
3962
4004
|
* re-derives wire types by design (Phase 9 — see
|
|
3963
|
-
* `docs/features/
|
|
4005
|
+
* `docs/features/shipped/2026-02-25-user-cloud-deployment.md`). Keep
|
|
3964
4006
|
* the shape identical to `@runtypelabs/shared`'s `ExternalAgentContext`.
|
|
3965
4007
|
*/
|
|
3966
4008
|
interface ExternalAgentContext {
|
package/dist/index.mjs
CHANGED
|
@@ -3665,7 +3665,10 @@ var RecordsEndpoint = class {
|
|
|
3665
3665
|
return this.client.delete(`/records/${id}/results`, { resultId });
|
|
3666
3666
|
}
|
|
3667
3667
|
/**
|
|
3668
|
-
* Upload CSV file to create multiple records
|
|
3668
|
+
* Upload CSV file to create multiple records.
|
|
3669
|
+
* Provide either `typeColumn` (read each row's type from a column) or
|
|
3670
|
+
* `typeValue` (assign the same constant type to every row). `typeValue`
|
|
3671
|
+
* takes precedence when both are supplied.
|
|
3669
3672
|
*/
|
|
3670
3673
|
async uploadCsv(file, params) {
|
|
3671
3674
|
const formData = new FormData();
|
|
@@ -3676,6 +3679,9 @@ var RecordsEndpoint = class {
|
|
|
3676
3679
|
if (params?.nameColumn) {
|
|
3677
3680
|
formData.append("nameColumn", params.nameColumn);
|
|
3678
3681
|
}
|
|
3682
|
+
if (params?.typeValue) {
|
|
3683
|
+
formData.append("typeValue", params.typeValue);
|
|
3684
|
+
}
|
|
3679
3685
|
return this.client.postFormData("/records/upload-csv", formData);
|
|
3680
3686
|
}
|
|
3681
3687
|
/**
|
|
@@ -4243,7 +4249,12 @@ var EvalEndpoint = class {
|
|
|
4243
4249
|
}
|
|
4244
4250
|
/**
|
|
4245
4251
|
* Run virtual eval with streaming response
|
|
4246
|
-
* Executes multiple eval configs simultaneously and streams results via multiplexed SSE
|
|
4252
|
+
* Executes multiple eval configs simultaneously and streams results via multiplexed SSE.
|
|
4253
|
+
*
|
|
4254
|
+
* Targets are mutually exclusive — provide exactly one of `flowId`,
|
|
4255
|
+
* `flowDefinition`, or `agentId`. The `agentId` form targets a
|
|
4256
|
+
* `claude_managed` agent; combine with per-config `claudeManagedOverride`
|
|
4257
|
+
* to vary model / system prompt / tool permissions across configs.
|
|
4247
4258
|
*/
|
|
4248
4259
|
async runVirtualEval(data) {
|
|
4249
4260
|
return this.client.requestStream("/eval/stream", {
|
package/package.json
CHANGED