@runtypelabs/sdk 1.7.2 → 1.8.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 +7254 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +5195 -0
- package/dist/index.d.ts +5194 -27
- package/dist/index.js +7182 -77
- package/dist/index.js.map +1 -1
- package/package.json +14 -7
- package/dist/batch-builder.d.ts +0 -106
- package/dist/batch-builder.d.ts.map +0 -1
- package/dist/batch-builder.js +0 -124
- package/dist/batch-builder.js.map +0 -1
- package/dist/batches-namespace.d.ts +0 -132
- package/dist/batches-namespace.d.ts.map +0 -1
- package/dist/batches-namespace.js +0 -128
- package/dist/batches-namespace.js.map +0 -1
- package/dist/case-types.d.ts +0 -42
- package/dist/case-types.d.ts.map +0 -1
- package/dist/case-types.js +0 -16
- package/dist/case-types.js.map +0 -1
- package/dist/client-token-types.d.ts +0 -143
- package/dist/client-token-types.d.ts.map +0 -1
- package/dist/client-token-types.js +0 -11
- package/dist/client-token-types.js.map +0 -1
- package/dist/client.d.ts +0 -135
- package/dist/client.d.ts.map +0 -1
- package/dist/client.js +0 -522
- package/dist/client.js.map +0 -1
- package/dist/endpoints.d.ts +0 -1353
- package/dist/endpoints.d.ts.map +0 -1
- package/dist/endpoints.js +0 -2936
- package/dist/endpoints.js.map +0 -1
- package/dist/error-handling-types.d.ts +0 -71
- package/dist/error-handling-types.d.ts.map +0 -1
- package/dist/error-handling-types.js +0 -12
- package/dist/error-handling-types.js.map +0 -1
- package/dist/eval-builder.d.ts +0 -216
- package/dist/eval-builder.d.ts.map +0 -1
- package/dist/eval-builder.js +0 -225
- package/dist/eval-builder.js.map +0 -1
- package/dist/evals-namespace.d.ts +0 -205
- package/dist/evals-namespace.d.ts.map +0 -1
- package/dist/evals-namespace.js +0 -208
- package/dist/evals-namespace.js.map +0 -1
- package/dist/flow-builder.d.ts +0 -717
- package/dist/flow-builder.d.ts.map +0 -1
- package/dist/flow-builder.js +0 -592
- package/dist/flow-builder.js.map +0 -1
- package/dist/flow-result.d.ts +0 -117
- package/dist/flow-result.d.ts.map +0 -1
- package/dist/flow-result.js +0 -175
- package/dist/flow-result.js.map +0 -1
- package/dist/flows-namespace.d.ts +0 -442
- package/dist/flows-namespace.d.ts.map +0 -1
- package/dist/flows-namespace.js +0 -686
- package/dist/flows-namespace.js.map +0 -1
- package/dist/generated-tool-gate.d.ts +0 -75
- package/dist/generated-tool-gate.d.ts.map +0 -1
- package/dist/generated-tool-gate.js +0 -314
- package/dist/generated-tool-gate.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/prompts-namespace.d.ts +0 -237
- package/dist/prompts-namespace.d.ts.map +0 -1
- package/dist/prompts-namespace.js +0 -222
- package/dist/prompts-namespace.js.map +0 -1
- package/dist/runtype.d.ts +0 -232
- package/dist/runtype.d.ts.map +0 -1
- package/dist/runtype.js +0 -367
- package/dist/runtype.js.map +0 -1
- package/dist/stream-utils.d.ts +0 -58
- package/dist/stream-utils.d.ts.map +0 -1
- package/dist/stream-utils.js +0 -373
- package/dist/stream-utils.js.map +0 -1
- package/dist/transform.d.ts +0 -30
- package/dist/transform.d.ts.map +0 -1
- package/dist/transform.js +0 -196
- package/dist/transform.js.map +0 -1
- package/dist/types.d.ts +0 -717
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -7
- package/dist/types.js.map +0 -1
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Client Token Types
|
|
3
|
-
*
|
|
4
|
-
* Types for the client tokens system that enables secure browser-to-API communication.
|
|
5
|
-
*
|
|
6
|
-
* Note: These types are inlined from the internal shared package to avoid
|
|
7
|
-
* requiring users to install @runtypelabs/shared.
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* Environment for a client token
|
|
11
|
-
*/
|
|
12
|
-
export type ClientTokenEnvironment = 'test' | 'live';
|
|
13
|
-
/**
|
|
14
|
-
* Version pinning options for client tokens
|
|
15
|
-
*/
|
|
16
|
-
export type ClientTokenVersionPin = 'latest' | 'published' | string;
|
|
17
|
-
/**
|
|
18
|
-
* Theme configuration for the client widget
|
|
19
|
-
*/
|
|
20
|
-
export interface ClientWidgetTheme {
|
|
21
|
-
/** Primary brand color */
|
|
22
|
-
primaryColor?: string;
|
|
23
|
-
/** Background color */
|
|
24
|
-
backgroundColor?: string;
|
|
25
|
-
/** Text color */
|
|
26
|
-
textColor?: string;
|
|
27
|
-
/** Font family */
|
|
28
|
-
fontFamily?: string;
|
|
29
|
-
/** Border radius for elements */
|
|
30
|
-
borderRadius?: string;
|
|
31
|
-
/** Light or dark mode */
|
|
32
|
-
mode?: 'light' | 'dark';
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Client token configuration (theme, welcome message, etc.)
|
|
36
|
-
*/
|
|
37
|
-
export interface ClientTokenConfig {
|
|
38
|
-
/** Welcome message shown when widget opens */
|
|
39
|
-
welcomeMessage?: string;
|
|
40
|
-
/** Input placeholder text */
|
|
41
|
-
placeholder?: string;
|
|
42
|
-
/** Theme configuration */
|
|
43
|
-
theme?: ClientWidgetTheme;
|
|
44
|
-
/** Custom data passed to flows */
|
|
45
|
-
customData?: Record<string, any>;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Client token data returned from the API
|
|
49
|
-
*/
|
|
50
|
-
export interface ClientToken {
|
|
51
|
-
id: string;
|
|
52
|
-
name: string | null;
|
|
53
|
-
flowIds: string[];
|
|
54
|
-
defaultFlowId: string;
|
|
55
|
-
allowedOrigins: string[];
|
|
56
|
-
environment: ClientTokenEnvironment;
|
|
57
|
-
pinToVersion: ClientTokenVersionPin | null;
|
|
58
|
-
rateLimitPerMinute: number | null;
|
|
59
|
-
rateLimitPerHour: number | null;
|
|
60
|
-
maxMessagesPerSession: number | null;
|
|
61
|
-
sessionIdleTimeoutMinutes: number | null;
|
|
62
|
-
config: ClientTokenConfig;
|
|
63
|
-
isActive: boolean;
|
|
64
|
-
tokenPrefix: string;
|
|
65
|
-
tokenHint: string | null;
|
|
66
|
-
conversationCount?: number;
|
|
67
|
-
lastUsedAt: string | null;
|
|
68
|
-
createdAt: string;
|
|
69
|
-
updatedAt: string;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Request to create a client token
|
|
73
|
-
*/
|
|
74
|
-
export interface CreateClientTokenRequest {
|
|
75
|
-
name: string;
|
|
76
|
-
flowIds: string[];
|
|
77
|
-
defaultFlowId: string;
|
|
78
|
-
allowedOrigins: string[];
|
|
79
|
-
environment?: ClientTokenEnvironment;
|
|
80
|
-
pinToVersion?: ClientTokenVersionPin;
|
|
81
|
-
rateLimitPerMinute?: number;
|
|
82
|
-
rateLimitPerHour?: number;
|
|
83
|
-
maxMessagesPerSession?: number;
|
|
84
|
-
sessionIdleTimeoutMinutes?: number;
|
|
85
|
-
config?: ClientTokenConfig;
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Request to update a client token
|
|
89
|
-
*/
|
|
90
|
-
export interface UpdateClientTokenRequest {
|
|
91
|
-
name?: string;
|
|
92
|
-
flowIds?: string[];
|
|
93
|
-
defaultFlowId?: string;
|
|
94
|
-
allowedOrigins?: string[];
|
|
95
|
-
pinToVersion?: ClientTokenVersionPin;
|
|
96
|
-
rateLimitPerMinute?: number;
|
|
97
|
-
rateLimitPerHour?: number;
|
|
98
|
-
maxMessagesPerSession?: number;
|
|
99
|
-
sessionIdleTimeoutMinutes?: number;
|
|
100
|
-
config?: ClientTokenConfig;
|
|
101
|
-
isActive?: boolean;
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Security warning for token configuration
|
|
105
|
-
*/
|
|
106
|
-
export interface SecurityWarning {
|
|
107
|
-
type: string;
|
|
108
|
-
message: string;
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Response from creating a client token
|
|
112
|
-
*/
|
|
113
|
-
export interface CreateClientTokenResponse {
|
|
114
|
-
clientToken: ClientToken;
|
|
115
|
-
/** The plain token value - only shown once! */
|
|
116
|
-
token: string;
|
|
117
|
-
warnings: SecurityWarning[];
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Conversation record from the API
|
|
121
|
-
*/
|
|
122
|
-
export interface ClientConversation {
|
|
123
|
-
id: string;
|
|
124
|
-
name: string;
|
|
125
|
-
flowId: string;
|
|
126
|
-
origin: string;
|
|
127
|
-
messageCount: number;
|
|
128
|
-
firstMessage: string | null;
|
|
129
|
-
createdAt: string;
|
|
130
|
-
updatedAt: string;
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* List conversations response
|
|
134
|
-
*/
|
|
135
|
-
export interface ListConversationsResponse {
|
|
136
|
-
conversations: ClientConversation[];
|
|
137
|
-
pagination: {
|
|
138
|
-
limit: number;
|
|
139
|
-
offset: number;
|
|
140
|
-
hasMore: boolean;
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
//# sourceMappingURL=client-token-types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client-token-types.d.ts","sourceRoot":"","sources":["../src/client-token-types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,MAAM,CAAA;AAEpD;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,QAAQ,GAAG,WAAW,GAAG,MAAM,CAAA;AAEnE;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,0BAA0B;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,uBAAuB;IACvB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,iBAAiB;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,kBAAkB;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,iCAAiC;IACjC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,yBAAyB;IACzB,IAAI,CAAC,EAAE,OAAO,GA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,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,aAAa,EAAE,kBAAkB,EAAE,CAAA;IACnC,UAAU,EAAE;QACV,KAAK,EAAE,MAAM,CAAA;QACb,MAAM,EAAE,MAAM,CAAA;QACd,OAAO,EAAE,OAAO,CAAA;KACjB,CAAA;CACF"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Client Token Types
|
|
4
|
-
*
|
|
5
|
-
* Types for the client tokens system that enables secure browser-to-API communication.
|
|
6
|
-
*
|
|
7
|
-
* Note: These types are inlined from the internal shared package to avoid
|
|
8
|
-
* requiring users to install @runtypelabs/shared.
|
|
9
|
-
*/
|
|
10
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
//# sourceMappingURL=client-token-types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client-token-types.js","sourceRoot":"","sources":["../src/client-token-types.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG"}
|
package/dist/client.d.ts
DELETED
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @layer sdk
|
|
3
|
-
* @case camelCase (SDK and API both use native camelCase - no conversion needed)
|
|
4
|
-
*
|
|
5
|
-
* Main Runtype API Client.
|
|
6
|
-
*
|
|
7
|
-
* The SDK and API both use native camelCase for all request/response bodies.
|
|
8
|
-
* No case transformation is performed.
|
|
9
|
-
*
|
|
10
|
-
* @see packages/client/src/transform.ts for pass-through utilities
|
|
11
|
-
*/
|
|
12
|
-
import type { ClientConfig, DispatchRequest } from './types';
|
|
13
|
-
import { FlowsEndpoint, PromptsEndpoint, RecordsEndpoint, ApiKeysEndpoint, ModelConfigsEndpoint, DispatchEndpoint, ChatEndpoint, UsersEndpoint, AnalyticsEndpoint, FlowStepsEndpoint, ContextTemplatesEndpoint, ToolsEndpoint, EvalEndpoint, ClientTokensEndpoint, AgentsEndpoint, type ApiClient } from './endpoints';
|
|
14
|
-
import { ClientFlowBuilder, StreamCallbacks, FlowSummary } from './flow-builder';
|
|
15
|
-
import { FlowResult } from './flow-result';
|
|
16
|
-
type LocalToolHandler = (args: unknown) => Promise<unknown>;
|
|
17
|
-
/**
|
|
18
|
-
* RuntypeClient - The main entry point for interacting with the Runtype API
|
|
19
|
-
*
|
|
20
|
-
* Automatically transforms field names between camelCase (client) and snake_case (API)
|
|
21
|
-
* to provide an idiomatic JavaScript/TypeScript experience while maintaining API consistency.
|
|
22
|
-
*/
|
|
23
|
-
export declare class RuntypeClient implements ApiClient {
|
|
24
|
-
private baseUrl;
|
|
25
|
-
private apiVersion;
|
|
26
|
-
private timeout;
|
|
27
|
-
private headers;
|
|
28
|
-
flows: FlowsEndpoint;
|
|
29
|
-
prompts: PromptsEndpoint;
|
|
30
|
-
records: RecordsEndpoint;
|
|
31
|
-
apiKeys: ApiKeysEndpoint;
|
|
32
|
-
modelConfigs: ModelConfigsEndpoint;
|
|
33
|
-
dispatch: DispatchEndpoint;
|
|
34
|
-
chat: ChatEndpoint;
|
|
35
|
-
users: UsersEndpoint;
|
|
36
|
-
analytics: AnalyticsEndpoint;
|
|
37
|
-
flowSteps: FlowStepsEndpoint;
|
|
38
|
-
contextTemplates: ContextTemplatesEndpoint;
|
|
39
|
-
tools: ToolsEndpoint;
|
|
40
|
-
eval: EvalEndpoint;
|
|
41
|
-
clientTokens: ClientTokensEndpoint;
|
|
42
|
-
agents: AgentsEndpoint;
|
|
43
|
-
constructor(config?: ClientConfig);
|
|
44
|
-
/**
|
|
45
|
-
* Set the API key for authentication
|
|
46
|
-
*/
|
|
47
|
-
setApiKey(apiKey: string): void;
|
|
48
|
-
/**
|
|
49
|
-
* Start building a flow with fluent API
|
|
50
|
-
*
|
|
51
|
-
* @example
|
|
52
|
-
* ```typescript
|
|
53
|
-
* const response = await runtype
|
|
54
|
-
* .flow('My Flow')
|
|
55
|
-
* .withRecord({ name: 'Test', type: 'data' })
|
|
56
|
-
* .fetchUrl({ name: 'Fetch', url: '...', outputVariable: 'data' })
|
|
57
|
-
* .prompt({ name: 'Process', model: 'gpt-4', userPrompt: '...' })
|
|
58
|
-
* .run()
|
|
59
|
-
* ```
|
|
60
|
-
*/
|
|
61
|
-
flow(name: string): ClientFlowBuilder;
|
|
62
|
-
/**
|
|
63
|
-
* Remove the API key
|
|
64
|
-
*/
|
|
65
|
-
clearApiKey(): void;
|
|
66
|
-
/**
|
|
67
|
-
* Run a flow with client-side tools (automatic pause/resume loop)
|
|
68
|
-
*
|
|
69
|
-
* @param request - The dispatch request configuration
|
|
70
|
-
* @param clientTools - Map of tool names to async functions that execute the tool logic
|
|
71
|
-
* @param callbacks - Optional callbacks for streaming events
|
|
72
|
-
* @returns The final result of the flow execution or summary if streaming
|
|
73
|
-
*/
|
|
74
|
-
runWithLocalTools(request: DispatchRequest, localTools: Record<string, LocalToolHandler>, callbacks?: StreamCallbacks): Promise<FlowResult | FlowSummary>;
|
|
75
|
-
/**
|
|
76
|
-
* Generic GET request
|
|
77
|
-
*/
|
|
78
|
-
get<T>(path: string, params?: Record<string, unknown>): Promise<T>;
|
|
79
|
-
/**
|
|
80
|
-
* Generic POST request
|
|
81
|
-
*/
|
|
82
|
-
post<T>(path: string, data?: unknown): Promise<T>;
|
|
83
|
-
/**
|
|
84
|
-
* POST request with FormData support for file uploads
|
|
85
|
-
*/
|
|
86
|
-
postFormData<T>(path: string, formData: FormData): Promise<T>;
|
|
87
|
-
/**
|
|
88
|
-
* Generic request that returns raw Response for streaming
|
|
89
|
-
*/
|
|
90
|
-
requestStream(path: string, options?: RequestInit): Promise<Response>;
|
|
91
|
-
/**
|
|
92
|
-
* Generic PUT request
|
|
93
|
-
*/
|
|
94
|
-
put<T>(path: string, data?: unknown): Promise<T>;
|
|
95
|
-
/**
|
|
96
|
-
* Generic PATCH request
|
|
97
|
-
*/
|
|
98
|
-
patch<T>(path: string, data?: unknown): Promise<T>;
|
|
99
|
-
/**
|
|
100
|
-
* Generic DELETE request
|
|
101
|
-
*/
|
|
102
|
-
delete<T>(path: string, data?: unknown): Promise<T>;
|
|
103
|
-
/**
|
|
104
|
-
* Build full URL with query parameters
|
|
105
|
-
*/
|
|
106
|
-
private buildUrl;
|
|
107
|
-
/**
|
|
108
|
-
* Make HTTP request with timeout and error handling
|
|
109
|
-
*/
|
|
110
|
-
private makeRequest;
|
|
111
|
-
/**
|
|
112
|
-
* Make HTTP request that returns raw Response (for streaming)
|
|
113
|
-
*/
|
|
114
|
-
private makeRawRequest;
|
|
115
|
-
/**
|
|
116
|
-
* Handle error responses
|
|
117
|
-
*/
|
|
118
|
-
private createApiError;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Custom error class for Runtype API errors
|
|
122
|
-
*/
|
|
123
|
-
export declare class RuntypeApiError extends Error {
|
|
124
|
-
statusCode: number;
|
|
125
|
-
data?: unknown | undefined;
|
|
126
|
-
headers?: Headers | undefined;
|
|
127
|
-
statusText?: string | undefined;
|
|
128
|
-
constructor(message: string, statusCode: number, data?: unknown | undefined, headers?: Headers | undefined, statusText?: string | undefined);
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* Convenience function to create a new RuntypeClient instance
|
|
132
|
-
*/
|
|
133
|
-
export declare function createClient(config?: ClientConfig): RuntypeClient;
|
|
134
|
-
export {};
|
|
135
|
-
//# sourceMappingURL=client.d.ts.map
|
package/dist/client.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE5D,OAAO,EACL,aAAa,EACb,eAAe,EACf,eAAe,EACf,eAAe,EACf,oBAAoB,EACpB,gBAAgB,EAChB,YAAY,EACZ,aAAa,EAC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