@bctrl/sdk 1.0.6 → 1.0.7
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/accountTypes.d.ts +20 -126
- package/dist/aiTypes.d.ts +18 -96
- package/dist/browserExtensionTypes.d.ts +7 -36
- package/dist/generated/openapi-types.d.ts +13755 -0
- package/dist/generated/openapi-types.js +5 -0
- package/dist/invocations.d.ts +4 -1
- package/dist/node.d.ts +100 -2
- package/dist/openapi.d.ts +7 -0
- package/dist/openapi.js +1 -0
- package/dist/proxyTypes.d.ts +16 -112
- package/dist/runs.d.ts +86 -6
- package/dist/runtimes.js +0 -12
- package/dist/toolCallTypes.d.ts +6 -41
- package/dist/toolsetTypes.d.ts +7 -32
- package/dist/types.d.ts +115 -681
- package/dist/vaultTypes.d.ts +9 -73
- package/package.json +1 -1
package/dist/invocations.d.ts
CHANGED
|
@@ -22,9 +22,12 @@ interface AiSelectionOptions {
|
|
|
22
22
|
model?: V1AiModelSelection;
|
|
23
23
|
temperature?: number;
|
|
24
24
|
}
|
|
25
|
+
type StagehandActionInput = Extract<V1RuntimeInvocationCreateRequest, {
|
|
26
|
+
action: 'act';
|
|
27
|
+
}>['stagehandAction'];
|
|
25
28
|
export interface StagehandActOptions extends RuntimeInvocationCommonOptions, AiSelectionOptions {
|
|
26
29
|
instruction: string;
|
|
27
|
-
stagehandAction?:
|
|
30
|
+
stagehandAction?: StagehandActionInput;
|
|
28
31
|
timeoutMs?: number;
|
|
29
32
|
}
|
|
30
33
|
export interface StagehandObserveOptions extends RuntimeInvocationCommonOptions, AiSelectionOptions {
|
package/dist/node.d.ts
CHANGED
|
@@ -5,8 +5,106 @@ type V1HostedToolCreateRequest = Extract<V1ToolCreateRequest, {
|
|
|
5
5
|
}>;
|
|
6
6
|
export declare function createHostedToolFromFile(client: BctrlV1, request: Omit<V1HostedToolCreateRequest, 'source'> & {
|
|
7
7
|
filePath: string;
|
|
8
|
-
}): Promise<
|
|
8
|
+
}): Promise<{
|
|
9
|
+
builtin: "files" | "vault" | "captcha";
|
|
10
|
+
createdAt: string;
|
|
11
|
+
description: string | null;
|
|
12
|
+
id: string;
|
|
13
|
+
inputSchema: {
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
};
|
|
16
|
+
metadata?: import("./generated/openapi-types.js").components["schemas"]["ToolMetadata"] | null;
|
|
17
|
+
name: string;
|
|
18
|
+
outputSchema: {
|
|
19
|
+
[key: string]: unknown;
|
|
20
|
+
};
|
|
21
|
+
spaceId: string | null;
|
|
22
|
+
status: "enabled" | "disabled";
|
|
23
|
+
type: "builtin";
|
|
24
|
+
updatedAt: string;
|
|
25
|
+
} | {
|
|
26
|
+
createdAt: string;
|
|
27
|
+
currentVersionId: string | null;
|
|
28
|
+
description: string | null;
|
|
29
|
+
id: string;
|
|
30
|
+
inputSchema: {
|
|
31
|
+
[key: string]: unknown;
|
|
32
|
+
};
|
|
33
|
+
metadata?: import("./generated/openapi-types.js").components["schemas"]["ToolMetadata"] | null;
|
|
34
|
+
name: string;
|
|
35
|
+
outputSchema: {
|
|
36
|
+
[key: string]: unknown;
|
|
37
|
+
};
|
|
38
|
+
spaceId: string | null;
|
|
39
|
+
status: "enabled" | "disabled";
|
|
40
|
+
type: "hosted";
|
|
41
|
+
updatedAt: string;
|
|
42
|
+
} | {
|
|
43
|
+
createdAt: string;
|
|
44
|
+
description: string | null;
|
|
45
|
+
id: string;
|
|
46
|
+
inputSchema: {
|
|
47
|
+
[key: string]: unknown;
|
|
48
|
+
};
|
|
49
|
+
metadata?: import("./generated/openapi-types.js").components["schemas"]["ToolMetadata"] | null;
|
|
50
|
+
name: string;
|
|
51
|
+
outputSchema: {
|
|
52
|
+
[key: string]: unknown;
|
|
53
|
+
};
|
|
54
|
+
serverId: string;
|
|
55
|
+
spaceId: string | null;
|
|
56
|
+
status: "enabled" | "disabled";
|
|
57
|
+
toolName: string;
|
|
58
|
+
type: "mcp";
|
|
59
|
+
updatedAt: string;
|
|
60
|
+
} | {
|
|
61
|
+
authSecretId?: string;
|
|
62
|
+
createdAt: string;
|
|
63
|
+
description: string | null;
|
|
64
|
+
id: string;
|
|
65
|
+
inputSchema: {
|
|
66
|
+
[key: string]: unknown;
|
|
67
|
+
};
|
|
68
|
+
metadata?: import("./generated/openapi-types.js").components["schemas"]["ToolMetadata"] | null;
|
|
69
|
+
name: string;
|
|
70
|
+
outputSchema: {
|
|
71
|
+
[key: string]: unknown;
|
|
72
|
+
};
|
|
73
|
+
spaceId: string | null;
|
|
74
|
+
status: "enabled" | "disabled";
|
|
75
|
+
timeoutMs?: number;
|
|
76
|
+
type: "webhook";
|
|
77
|
+
updatedAt: string;
|
|
78
|
+
url: string;
|
|
79
|
+
} | {
|
|
80
|
+
createdAt: string;
|
|
81
|
+
description: string | null;
|
|
82
|
+
id: string;
|
|
83
|
+
inputSchema: {
|
|
84
|
+
[key: string]: unknown;
|
|
85
|
+
};
|
|
86
|
+
metadata?: import("./generated/openapi-types.js").components["schemas"]["ToolMetadata"] | null;
|
|
87
|
+
name: string;
|
|
88
|
+
outputSchema: {
|
|
89
|
+
[key: string]: unknown;
|
|
90
|
+
};
|
|
91
|
+
spaceId: string | null;
|
|
92
|
+
status: "enabled" | "disabled";
|
|
93
|
+
type: "workflow";
|
|
94
|
+
updatedAt: string;
|
|
95
|
+
workflowId: string;
|
|
96
|
+
}>;
|
|
9
97
|
export declare function createToolVersionFromFile(client: BctrlV1, toolId: string, request: Omit<V1ToolVersionCreateRequest, 'source'> & {
|
|
10
98
|
filePath: string;
|
|
11
|
-
}): Promise<
|
|
99
|
+
}): Promise<{
|
|
100
|
+
createdAt: string;
|
|
101
|
+
current: boolean;
|
|
102
|
+
envKeys: string[];
|
|
103
|
+
id: string;
|
|
104
|
+
metadata?: import("./generated/openapi-types.js").components["schemas"]["ToolMetadata"] | null;
|
|
105
|
+
source: string;
|
|
106
|
+
timeoutMs: number;
|
|
107
|
+
toolId: string;
|
|
108
|
+
version: number;
|
|
109
|
+
}>;
|
|
12
110
|
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { components, operations } from './generated/openapi-types.js';
|
|
2
|
+
export type OpenApiSchemas = components['schemas'];
|
|
3
|
+
export type OpenApiQuery<OperationId extends keyof operations> = operations[OperationId] extends {
|
|
4
|
+
parameters: {
|
|
5
|
+
query?: infer Query;
|
|
6
|
+
};
|
|
7
|
+
} ? NonNullable<Query> : never;
|
package/dist/openapi.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/proxyTypes.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
export type
|
|
3
|
-
export type
|
|
4
|
-
export type
|
|
5
|
-
export type
|
|
6
|
-
export type
|
|
1
|
+
import type { OpenApiQuery, OpenApiSchemas } from './openapi.js';
|
|
2
|
+
export type V1ProxyProtocol = NonNullable<OpenApiSchemas['ProxyManagedRotatingCreateRequest']['protocol']>;
|
|
3
|
+
export type V1ProxyDnsResolution = NonNullable<OpenApiSchemas['ProxyManagedRotatingCreateRequest']['dnsResolution']>;
|
|
4
|
+
export type V1ProxyType = OpenApiSchemas['Proxy']['type'];
|
|
5
|
+
export type V1ManagedRotatingPreference = NonNullable<OpenApiSchemas['ProxyManagedRotatingCreateRequest']['preference']>;
|
|
6
|
+
export type V1ManagedRotatingRotation = NonNullable<OpenApiSchemas['ProxyManagedRotatingCreateRequest']['rotation']>;
|
|
7
|
+
export type V1ManagedRotatingDevice = NonNullable<OpenApiSchemas['ProxyManagedRotatingCreateRequest']['device']>;
|
|
7
8
|
export interface V1ProxyBase {
|
|
8
9
|
id: string;
|
|
9
10
|
name: string;
|
|
@@ -11,109 +12,12 @@ export interface V1ProxyBase {
|
|
|
11
12
|
createdAt: string;
|
|
12
13
|
updatedAt: string;
|
|
13
14
|
}
|
|
14
|
-
export
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
state?: string;
|
|
24
|
-
city?: string;
|
|
25
|
-
isp?: string;
|
|
26
|
-
geoStrict?: boolean;
|
|
27
|
-
device?: V1ManagedRotatingDevice;
|
|
28
|
-
deviceStrict?: boolean;
|
|
29
|
-
}
|
|
30
|
-
export type V1Proxy = (V1ProxyBase & {
|
|
31
|
-
type: 'custom';
|
|
32
|
-
protocol: V1ProxyProtocol;
|
|
33
|
-
dnsResolution?: V1ProxyDnsResolution;
|
|
34
|
-
host: string;
|
|
35
|
-
port: number;
|
|
36
|
-
username?: string | null;
|
|
37
|
-
hasPassword: boolean;
|
|
38
|
-
}) | (V1ProxyBase & V1ManagedRotatingProxyConfig & {
|
|
39
|
-
type: 'managed-rotating';
|
|
40
|
-
}) | (V1ProxyBase & {
|
|
41
|
-
type: 'managed-static';
|
|
42
|
-
status: 'provisioning' | 'active' | 'expired' | 'renewal_failed';
|
|
43
|
-
poolId: string;
|
|
44
|
-
autoRenew: boolean;
|
|
45
|
-
assignedIp?: string;
|
|
46
|
-
location?: {
|
|
47
|
-
country: string;
|
|
48
|
-
city?: string;
|
|
49
|
-
};
|
|
50
|
-
expiresAt?: string;
|
|
51
|
-
renewsAt?: string | null;
|
|
52
|
-
pricing?: {
|
|
53
|
-
priceCredits: number;
|
|
54
|
-
termDays: number;
|
|
55
|
-
};
|
|
56
|
-
});
|
|
57
|
-
export type V1ProxyCreateRequest = {
|
|
58
|
-
type: 'custom';
|
|
59
|
-
name?: string;
|
|
60
|
-
url?: string;
|
|
61
|
-
protocol?: V1ProxyProtocol;
|
|
62
|
-
dnsResolution?: V1ProxyDnsResolution;
|
|
63
|
-
host?: string;
|
|
64
|
-
port?: number;
|
|
65
|
-
username?: string;
|
|
66
|
-
password?: string;
|
|
67
|
-
} | ({
|
|
68
|
-
type: 'managed-rotating';
|
|
69
|
-
name?: string;
|
|
70
|
-
} & V1ManagedRotatingProxyConfig) | {
|
|
71
|
-
type: 'managed-static';
|
|
72
|
-
name?: string;
|
|
73
|
-
poolId: string;
|
|
74
|
-
autoRenew?: boolean;
|
|
75
|
-
};
|
|
76
|
-
export interface V1ProxyUpdateRequest extends Partial<V1ManagedRotatingProxyConfig> {
|
|
77
|
-
name?: string;
|
|
78
|
-
url?: string;
|
|
79
|
-
protocol?: V1ProxyProtocol;
|
|
80
|
-
dnsResolution?: V1ProxyDnsResolution;
|
|
81
|
-
host?: string;
|
|
82
|
-
port?: number;
|
|
83
|
-
username?: string | null;
|
|
84
|
-
password?: string | null;
|
|
85
|
-
autoRenew?: boolean;
|
|
86
|
-
}
|
|
87
|
-
interface V1ProxyPageQuery {
|
|
88
|
-
cursor?: string;
|
|
89
|
-
limit?: number;
|
|
90
|
-
}
|
|
91
|
-
export interface V1ProxyListQuery extends V1ProxyPageQuery {
|
|
92
|
-
}
|
|
93
|
-
export interface V1ProxyDeleteResponse {
|
|
94
|
-
id: string;
|
|
95
|
-
deleted: true;
|
|
96
|
-
}
|
|
97
|
-
export interface V1ProxyTestResponse {
|
|
98
|
-
ok: boolean;
|
|
99
|
-
latencyMs?: number;
|
|
100
|
-
error?: string;
|
|
101
|
-
httpStatus?: number | null;
|
|
102
|
-
exitIp?: string | null;
|
|
103
|
-
country?: string | null;
|
|
104
|
-
}
|
|
105
|
-
export interface V1ProxyPool {
|
|
106
|
-
id: string;
|
|
107
|
-
label: string;
|
|
108
|
-
country: string;
|
|
109
|
-
category: 'tickets' | 'sneakers' | 'social' | 'retail';
|
|
110
|
-
termDays: number;
|
|
111
|
-
priceCredits: number;
|
|
112
|
-
availableCount: number;
|
|
113
|
-
}
|
|
114
|
-
export interface V1ProxyPoolListQuery extends V1ProxyPageQuery {
|
|
115
|
-
country?: string;
|
|
116
|
-
category?: V1ProxyPool['category'];
|
|
117
|
-
available?: boolean;
|
|
118
|
-
}
|
|
119
|
-
export {};
|
|
15
|
+
export type V1ManagedRotatingProxyConfig = Omit<OpenApiSchemas['ProxyManagedRotatingCreateRequest'], 'name' | 'type'>;
|
|
16
|
+
export type V1Proxy = OpenApiSchemas['Proxy'];
|
|
17
|
+
export type V1ProxyCreateRequest = OpenApiSchemas['ProxyCreateRequest'];
|
|
18
|
+
export type V1ProxyUpdateRequest = OpenApiSchemas['ProxyUpdateRequest'];
|
|
19
|
+
export type V1ProxyListQuery = OpenApiQuery<'proxies.list'>;
|
|
20
|
+
export type V1ProxyDeleteResponse = OpenApiSchemas['ProxyDeleteResponse'];
|
|
21
|
+
export type V1ProxyTestResponse = OpenApiSchemas['ProxyTestResponse'];
|
|
22
|
+
export type V1ProxyPool = OpenApiSchemas['ProxyPool'];
|
|
23
|
+
export type V1ProxyPoolListQuery = OpenApiQuery<'proxies.pools.list'>;
|
package/dist/runs.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type V1HttpClient, type V1IdempotencyOptions } from './http.js';
|
|
2
|
-
import type { V1ListEnvelope, V1File,
|
|
2
|
+
import type { V1ListEnvelope, V1File, V1Run, V1RunEvent, V1RunEventsListQuery, V1RunListQuery, V1RunLiveRequest, V1RunLiveResponse, V1RunRecordingRequest, V1RunRecordingResponse, V1RunActivityItem, V1RunActivityListQuery, V1RunFilesExportRequest, V1RunFilesListQuery, V1RunInvocationsListQuery, V1RunUsage } from './types.js';
|
|
3
3
|
export declare class V1RunsClient {
|
|
4
4
|
private readonly http;
|
|
5
5
|
readonly events: V1RunEventsNamespaceClient;
|
|
@@ -31,14 +31,94 @@ export declare class V1RunActivityNamespaceClient {
|
|
|
31
31
|
export declare class V1RunFilesNamespaceClient {
|
|
32
32
|
private readonly http;
|
|
33
33
|
constructor(http: V1HttpClient);
|
|
34
|
-
list(runId: string, query?: V1RunFilesListQuery): Promise<V1ListEnvelope<
|
|
35
|
-
|
|
34
|
+
list(runId: string, query?: V1RunFilesListQuery): Promise<V1ListEnvelope<{
|
|
35
|
+
contentType: string;
|
|
36
|
+
createdAt: string;
|
|
37
|
+
downloadUrl: string;
|
|
38
|
+
expiresAt?: string;
|
|
39
|
+
id: string;
|
|
40
|
+
metadata?: import("./generated/openapi-types.js").components["schemas"]["JsonObject"] | null;
|
|
41
|
+
name: string;
|
|
42
|
+
path: string;
|
|
43
|
+
runId?: string;
|
|
44
|
+
runtimeId?: string;
|
|
45
|
+
sizeBytes: number;
|
|
46
|
+
source: "upload" | "runtime";
|
|
47
|
+
spaceId: string;
|
|
48
|
+
type?: string;
|
|
49
|
+
}>>;
|
|
50
|
+
iter(runId: string, query?: V1RunFilesListQuery): AsyncGenerator<{
|
|
51
|
+
contentType: string;
|
|
52
|
+
createdAt: string;
|
|
53
|
+
downloadUrl: string;
|
|
54
|
+
expiresAt?: string;
|
|
55
|
+
id: string;
|
|
56
|
+
metadata?: import("./generated/openapi-types.js").components["schemas"]["JsonObject"] | null;
|
|
57
|
+
name: string;
|
|
58
|
+
path: string;
|
|
59
|
+
runId?: string;
|
|
60
|
+
runtimeId?: string;
|
|
61
|
+
sizeBytes: number;
|
|
62
|
+
source: "upload" | "runtime";
|
|
63
|
+
spaceId: string;
|
|
64
|
+
type?: string;
|
|
65
|
+
}, void, undefined>;
|
|
36
66
|
export(runId: string, request?: V1RunFilesExportRequest, options?: V1IdempotencyOptions): Promise<V1File>;
|
|
37
67
|
}
|
|
38
68
|
export declare class V1RunInvocationsNamespaceClient {
|
|
39
69
|
private readonly http;
|
|
40
70
|
constructor(http: V1HttpClient);
|
|
41
|
-
list(runId: string, query?: V1RunInvocationsListQuery): Promise<V1ListEnvelope<
|
|
42
|
-
|
|
43
|
-
|
|
71
|
+
list(runId: string, query?: V1RunInvocationsListQuery): Promise<V1ListEnvelope<{
|
|
72
|
+
action: "act" | "observe" | "extract" | "browserUse" | "stagehandAgent" | "solveCaptcha";
|
|
73
|
+
createdAt: string;
|
|
74
|
+
durationMs?: number | null;
|
|
75
|
+
error?: {
|
|
76
|
+
code?: string;
|
|
77
|
+
details?: {
|
|
78
|
+
[key: string]: unknown;
|
|
79
|
+
};
|
|
80
|
+
message: string;
|
|
81
|
+
} | null;
|
|
82
|
+
finishedAt?: string | null;
|
|
83
|
+
id: string;
|
|
84
|
+
runId: string;
|
|
85
|
+
runtimeId: string;
|
|
86
|
+
status: "queued" | "dispatching" | "running" | "cancelling" | "succeeded" | "failed" | "cancelled" | "timed_out";
|
|
87
|
+
}>>;
|
|
88
|
+
iter(runId: string, query?: V1RunInvocationsListQuery): AsyncGenerator<{
|
|
89
|
+
action: "act" | "observe" | "extract" | "browserUse" | "stagehandAgent" | "solveCaptcha";
|
|
90
|
+
createdAt: string;
|
|
91
|
+
durationMs?: number | null;
|
|
92
|
+
error?: {
|
|
93
|
+
code?: string;
|
|
94
|
+
details?: {
|
|
95
|
+
[key: string]: unknown;
|
|
96
|
+
};
|
|
97
|
+
message: string;
|
|
98
|
+
} | null;
|
|
99
|
+
finishedAt?: string | null;
|
|
100
|
+
id: string;
|
|
101
|
+
runId: string;
|
|
102
|
+
runtimeId: string;
|
|
103
|
+
status: "queued" | "dispatching" | "running" | "cancelling" | "succeeded" | "failed" | "cancelled" | "timed_out";
|
|
104
|
+
}, void, undefined>;
|
|
105
|
+
get(runId: string, invocationId: string): Promise<{
|
|
106
|
+
action: "act" | "observe" | "extract" | "browserUse" | "stagehandAgent" | "solveCaptcha";
|
|
107
|
+
createdAt: string;
|
|
108
|
+
durationMs?: number | null;
|
|
109
|
+
error?: {
|
|
110
|
+
code: "invocation.failed" | "invocation.cancelled" | "invocation.timed_out" | "invocation.dispatch_preparation_failed" | "invocation.dispatch_unavailable" | "invocation.captcha_not_found" | "invocation.captcha_solve_failed" | "invocation.output_validation_failed" | "invocation.stagehand_failed" | "invocation.stagehand_incomplete" | "invocation.browser_use_failed" | "invocation.browser_use_interrupted" | "invocation.browser_use_incomplete";
|
|
111
|
+
details?: {
|
|
112
|
+
[key: string]: unknown;
|
|
113
|
+
};
|
|
114
|
+
message: string;
|
|
115
|
+
} | null;
|
|
116
|
+
finishedAt?: string | null;
|
|
117
|
+
id: string;
|
|
118
|
+
output?: import("./generated/openapi-types.js").components["schemas"]["JsonValue"];
|
|
119
|
+
runId: string;
|
|
120
|
+
runtimeId: string;
|
|
121
|
+
startedAt?: string | null;
|
|
122
|
+
status: "queued" | "dispatching" | "running" | "cancelling" | "succeeded" | "failed" | "cancelled" | "timed_out";
|
|
123
|
+
}>;
|
|
44
124
|
}
|
package/dist/runtimes.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { BctrlValidationError } from './errors.js';
|
|
2
1
|
import { v1IdempotencyHeaders } from './http.js';
|
|
3
2
|
import { V1RuntimeInvocationsNamespaceClient } from './invocations.js';
|
|
4
3
|
import { iterateV1Pages } from './pagination.js';
|
|
@@ -88,15 +87,6 @@ class V1RuntimeTargetsClient {
|
|
|
88
87
|
return this.http.request(`/runtimes/${encodeURIComponent(this.runtimeId)}/targets/${encodeURIComponent(targetId)}`, { method: 'DELETE' });
|
|
89
88
|
}
|
|
90
89
|
}
|
|
91
|
-
function validateRuntimeCreateRequest(request) {
|
|
92
|
-
const profileBacked = request.config?.profile === true;
|
|
93
|
-
if (!profileBacked)
|
|
94
|
-
return;
|
|
95
|
-
const unsupported = ['stealth', 'fingerprint', 'extensionIds'].filter((key) => request.config?.[key] !== undefined);
|
|
96
|
-
if (unsupported.length > 0) {
|
|
97
|
-
throw new BctrlValidationError('Only config.profile, config.proxy, config.autoUpgrade, config.idleTimeoutMinutes, config.webRtcProxyOnly, config.forceOpenShadowRoots, and config.networkTraffic are supported for profile-backed browser runtimes', 'runtime.profile_config_unsupported', { unsupported });
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
90
|
export class V1RuntimesClient {
|
|
101
91
|
http;
|
|
102
92
|
files;
|
|
@@ -117,14 +107,12 @@ export class V1RuntimesClient {
|
|
|
117
107
|
return iterateV1Pages(query, (pageQuery) => this.list(pageQuery));
|
|
118
108
|
}
|
|
119
109
|
async create(request) {
|
|
120
|
-
validateRuntimeCreateRequest(request);
|
|
121
110
|
return this.http.request('/runtimes', {
|
|
122
111
|
method: 'POST',
|
|
123
112
|
body: request,
|
|
124
113
|
});
|
|
125
114
|
}
|
|
126
115
|
async createInSpace(spaceId, request) {
|
|
127
|
-
validateRuntimeCreateRequest(request);
|
|
128
116
|
return this.http.request('/runtimes', {
|
|
129
117
|
method: 'POST',
|
|
130
118
|
body: { ...request, spaceId },
|
package/dist/toolCallTypes.d.ts
CHANGED
|
@@ -1,41 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export type V1ToolCallActor = '
|
|
3
|
-
export type V1ToolCallStatus = '
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
type: V1ToolType;
|
|
8
|
-
}
|
|
9
|
-
export interface V1ToolCall {
|
|
10
|
-
id: string;
|
|
11
|
-
toolCallId: string;
|
|
12
|
-
spaceId: string;
|
|
13
|
-
runId?: string | null;
|
|
14
|
-
invocationId?: string | null;
|
|
15
|
-
toolsetId?: string | null;
|
|
16
|
-
tool: V1ToolCallTool;
|
|
17
|
-
actor: V1ToolCallActor;
|
|
18
|
-
status: V1ToolCallStatus;
|
|
19
|
-
redactedInput?: JsonValue;
|
|
20
|
-
redactedOutput?: JsonValue;
|
|
21
|
-
redactedError?: JsonObject | null;
|
|
22
|
-
inputSummary?: JsonObject | null;
|
|
23
|
-
outputSummary?: JsonObject | null;
|
|
24
|
-
error?: {
|
|
25
|
-
code: string;
|
|
26
|
-
message: string;
|
|
27
|
-
details?: JsonObject;
|
|
28
|
-
} | null;
|
|
29
|
-
startedAt: string;
|
|
30
|
-
finishedAt: string;
|
|
31
|
-
durationMs: number;
|
|
32
|
-
createdAt: string;
|
|
33
|
-
}
|
|
34
|
-
export interface V1ToolCallListQuery extends V1PageQuery {
|
|
35
|
-
spaceId?: string;
|
|
36
|
-
runId?: string;
|
|
37
|
-
invocationId?: string;
|
|
38
|
-
toolId?: string;
|
|
39
|
-
status?: V1ToolCallStatus;
|
|
40
|
-
actor?: V1ToolCallActor;
|
|
41
|
-
}
|
|
1
|
+
import type { OpenApiQuery, OpenApiSchemas } from './openapi.js';
|
|
2
|
+
export type V1ToolCallActor = OpenApiSchemas['ToolCall']['actor'];
|
|
3
|
+
export type V1ToolCallStatus = OpenApiSchemas['ToolCall']['status'];
|
|
4
|
+
export type V1ToolCallTool = OpenApiSchemas['ToolCallTool'];
|
|
5
|
+
export type V1ToolCall = OpenApiSchemas['ToolCall'];
|
|
6
|
+
export type V1ToolCallListQuery = OpenApiQuery<'tool-calls.list'>;
|
package/dist/toolsetTypes.d.ts
CHANGED
|
@@ -1,32 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export type V1ToolsetBuiltinName = '
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
toolIds: string[];
|
|
9
|
-
metadata?: JsonObject | null;
|
|
10
|
-
createdAt: string;
|
|
11
|
-
updatedAt: string;
|
|
12
|
-
}
|
|
13
|
-
export interface V1ToolsetListQuery extends V1PageQuery {
|
|
14
|
-
spaceId?: string;
|
|
15
|
-
}
|
|
16
|
-
export interface V1ToolsetCreateRequest {
|
|
17
|
-
spaceId?: string;
|
|
18
|
-
name: string;
|
|
19
|
-
builtins?: V1ToolsetBuiltinName[];
|
|
20
|
-
toolIds?: string[];
|
|
21
|
-
metadata?: JsonObject | null;
|
|
22
|
-
}
|
|
23
|
-
export interface V1ToolsetUpdateRequest {
|
|
24
|
-
name?: string;
|
|
25
|
-
builtins?: V1ToolsetBuiltinName[];
|
|
26
|
-
toolIds?: string[];
|
|
27
|
-
metadata?: JsonObject | null;
|
|
28
|
-
}
|
|
29
|
-
export interface V1ToolsetDeleteResponse {
|
|
30
|
-
id: string;
|
|
31
|
-
deleted: true;
|
|
32
|
-
}
|
|
1
|
+
import type { OpenApiQuery, OpenApiSchemas } from './openapi.js';
|
|
2
|
+
export type V1ToolsetBuiltinName = OpenApiSchemas['Toolset']['builtins'][number];
|
|
3
|
+
export type V1Toolset = OpenApiSchemas['Toolset'];
|
|
4
|
+
export type V1ToolsetListQuery = OpenApiQuery<'toolsets.list'>;
|
|
5
|
+
export type V1ToolsetCreateRequest = OpenApiSchemas['ToolsetCreateRequest'];
|
|
6
|
+
export type V1ToolsetUpdateRequest = OpenApiSchemas['ToolsetUpdateRequest'];
|
|
7
|
+
export type V1ToolsetDeleteResponse = OpenApiSchemas['ToolsetDeleteResponse'];
|