@runflow-ai/sdk 1.0.55 โ†’ 1.0.58

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/README.md CHANGED
@@ -69,7 +69,58 @@ pnpm add @runflow-ai/sdk
69
69
 
70
70
  - **Node.js**: >= 22.0.0
71
71
  - **TypeScript**: >= 5.0.0 (recommended)
72
- - **Zod**: ^3.22.0 (included as dependency)
72
+
73
+ ### ๐Ÿ“š Built-in Libraries
74
+
75
+ The SDK includes the following libraries out-of-the-box. **No need to install them separately** - they're available in all your agents:
76
+
77
+ | Library | Version | Description | Import |
78
+ |---------|---------|-------------|--------|
79
+ | **axios** | ^1.7.0 | HTTP client for API requests | `import axios from 'axios'` |
80
+ | **zod** | ^3.22.0 | Schema validation and TypeScript inference | `import { z } from 'zod'` |
81
+ | **date-fns** | ^3.0.0 | Modern date utility library | `import { format, addDays } from 'date-fns'` |
82
+ | **lodash** | ^4.17.21 | JavaScript utility library | `import _ from 'lodash'` |
83
+ | **cheerio** | ^1.0.0 | Fast, flexible HTML/XML parsing | `import * as cheerio from 'cheerio'` |
84
+ | **pino** | ^8.19.0 | Fast JSON logger | `import pino from 'pino'` |
85
+
86
+ **Quick Examples:**
87
+
88
+ ```typescript
89
+ import { createTool } from '@runflow-ai/sdk';
90
+ import { z } from 'zod';
91
+ import axios from 'axios';
92
+ import { format, addDays } from 'date-fns';
93
+ import _ from 'lodash';
94
+
95
+ const myTool = createTool({
96
+ id: 'example-tool',
97
+ description: 'Shows all available libraries',
98
+ inputSchema: z.object({
99
+ url: z.string().url(),
100
+ data: z.array(z.any()),
101
+ }),
102
+ execute: async ({ context }) => {
103
+ // โœ… HTTP requests with axios
104
+ const response = await axios.get(context.url);
105
+
106
+ // โœ… Date manipulation
107
+ const tomorrow = addDays(new Date(), 1);
108
+ const formatted = format(tomorrow, 'yyyy-MM-dd');
109
+
110
+ // โœ… Array/Object utilities with lodash
111
+ const unique = _.uniq(context.data);
112
+ const grouped = _.groupBy(context.data, 'category');
113
+
114
+ return { response: response.data, date: formatted, unique, grouped };
115
+ },
116
+ });
117
+ ```
118
+
119
+ > ๐Ÿ’ก **Tip**: You can also use the SDK's HTTP helpers for convenience:
120
+ > ```typescript
121
+ > import { httpGet, httpPost } from '@runflow-ai/sdk/http';
122
+ > const data = await httpGet('https://api.example.com/data');
123
+ > ```
73
124
 
74
125
  ---
75
126
 
@@ -738,6 +789,247 @@ The `execute` function receives:
738
789
 
739
790
  ---
740
791
 
792
+ ### HTTP Utilities
793
+
794
+ The **HTTP** module provides pre-configured utilities for making HTTP requests in tools and agents. Built on top of **axios**, it comes with sensible defaults, automatic error handling, and full TypeScript support.
795
+
796
+ #### Features
797
+
798
+ - ๐ŸŒ **Pre-configured axios instance** with 30s timeout
799
+ - ๐Ÿ›ก๏ธ **Automatic error handling** with enhanced error messages
800
+ - ๐ŸŽฏ **Helper functions** for common HTTP methods (GET, POST, PUT, PATCH, DELETE)
801
+ - ๐Ÿ“ฆ **Zero configuration** - works out of the box
802
+ - ๐Ÿ”’ **Type-safe** - Full TypeScript support with exported types
803
+ - โšก **Available in all agents** - No need to install additional dependencies
804
+
805
+ #### Quick Start
806
+
807
+ ```typescript
808
+ import { createTool } from '@runflow-ai/sdk';
809
+ import { http, httpGet, httpPost } from '@runflow-ai/sdk/http';
810
+ import { z } from 'zod';
811
+
812
+ const weatherTool = createTool({
813
+ id: 'get-weather',
814
+ description: 'Get current weather for a city',
815
+ inputSchema: z.object({
816
+ city: z.string(),
817
+ }),
818
+ execute: async ({ context }) => {
819
+ try {
820
+ // Option 1: Using httpGet helper (simplest)
821
+ const data = await httpGet('https://api.openweathermap.org/data/2.5/weather', {
822
+ params: {
823
+ q: context.city,
824
+ appid: process.env.OPENWEATHER_API_KEY,
825
+ units: 'metric',
826
+ },
827
+ });
828
+
829
+ return {
830
+ city: data.name,
831
+ temperature: data.main.temp,
832
+ condition: data.weather[0].description,
833
+ };
834
+ } catch (error: any) {
835
+ return { error: `Failed to fetch weather: ${error.message}` };
836
+ }
837
+ },
838
+ });
839
+ ```
840
+
841
+ #### Helper Functions
842
+
843
+ The SDK provides convenient helper functions that automatically extract data from responses:
844
+
845
+ ```typescript
846
+ import { httpGet, httpPost, httpPut, httpPatch, httpDelete } from '@runflow-ai/sdk/http';
847
+
848
+ // GET request - returns only the data payload
849
+ const user = await httpGet('https://api.example.com/users/123');
850
+ console.log(user.name);
851
+
852
+ // POST request
853
+ const newUser = await httpPost('https://api.example.com/users', {
854
+ name: 'John Doe',
855
+ email: 'john@example.com',
856
+ });
857
+
858
+ // PUT request
859
+ const updated = await httpPut('https://api.example.com/users/123', {
860
+ name: 'Jane Doe',
861
+ });
862
+
863
+ // PATCH request
864
+ const patched = await httpPatch('https://api.example.com/users/123', {
865
+ email: 'newemail@example.com',
866
+ });
867
+
868
+ // DELETE request
869
+ await httpDelete('https://api.example.com/users/123');
870
+ ```
871
+
872
+ #### Using the HTTP Instance
873
+
874
+ For more control, use the pre-configured `http` instance directly:
875
+
876
+ ```typescript
877
+ import { http } from '@runflow-ai/sdk/http';
878
+
879
+ // GET with full response
880
+ const response = await http.get('https://api.example.com/data');
881
+ console.log(response.status);
882
+ console.log(response.headers);
883
+ console.log(response.data);
884
+
885
+ // POST with custom headers
886
+ const response = await http.post(
887
+ 'https://api.example.com/resource',
888
+ { data: 'value' },
889
+ {
890
+ headers: {
891
+ 'Authorization': `Bearer ${process.env.API_TOKEN}`,
892
+ 'Content-Type': 'application/json',
893
+ },
894
+ timeout: 5000,
895
+ }
896
+ );
897
+
898
+ // Multiple requests in parallel
899
+ const [users, posts, comments] = await Promise.all([
900
+ http.get('https://api.example.com/users'),
901
+ http.get('https://api.example.com/posts'),
902
+ http.get('https://api.example.com/comments'),
903
+ ]);
904
+ ```
905
+
906
+ #### Advanced: Direct Axios Usage
907
+
908
+ For complete control, use axios directly:
909
+
910
+ ```typescript
911
+ import { axios } from '@runflow-ai/sdk/http';
912
+
913
+ // Create a custom instance
914
+ const customAPI = axios.create({
915
+ baseURL: 'https://api.example.com',
916
+ headers: {
917
+ 'Authorization': `Bearer ${process.env.API_TOKEN}`,
918
+ },
919
+ timeout: 10000,
920
+ });
921
+
922
+ // Add interceptors
923
+ customAPI.interceptors.request.use((config) => {
924
+ console.log(`Request: ${config.method?.toUpperCase()} ${config.url}`);
925
+ return config;
926
+ });
927
+
928
+ // Use the custom instance
929
+ const response = await customAPI.get('/users');
930
+ ```
931
+
932
+ #### Error Handling
933
+
934
+ All HTTP utilities provide enhanced error messages:
935
+
936
+ ```typescript
937
+ import { httpGet } from '@runflow-ai/sdk/http';
938
+
939
+ try {
940
+ const data = await httpGet('https://api.example.com/data');
941
+ return { success: true, data };
942
+ } catch (error: any) {
943
+ // Error message includes HTTP status and details
944
+ console.error(error.message);
945
+ // "HTTP GET failed: HTTP 404: Not Found"
946
+
947
+ return { success: false, error: error.message };
948
+ }
949
+ ```
950
+
951
+ #### TypeScript Types
952
+
953
+ All axios types are re-exported for convenience:
954
+
955
+ ```typescript
956
+ import type {
957
+ AxiosInstance,
958
+ AxiosRequestConfig,
959
+ AxiosResponse,
960
+ AxiosError,
961
+ } from '@runflow-ai/sdk/http';
962
+
963
+ async function fetchData(
964
+ url: string,
965
+ config?: AxiosRequestConfig
966
+ ): Promise<AxiosResponse> {
967
+ const response = await http.get(url, config);
968
+ return response;
969
+ }
970
+ ```
971
+
972
+ #### Complete Example: Weather Tool
973
+
974
+ ```typescript
975
+ import { Agent, openai, createTool } from '@runflow-ai/sdk';
976
+ import { httpGet } from '@runflow-ai/sdk/http';
977
+ import { z } from 'zod';
978
+
979
+ const weatherTool = createTool({
980
+ id: 'get-weather',
981
+ description: 'Get current weather for any city',
982
+ inputSchema: z.object({
983
+ city: z.string().describe('City name (e.g., "Sรฃo Paulo", "New York")'),
984
+ }),
985
+ execute: async ({ context }) => {
986
+ try {
987
+ const apiKey = process.env.OPENWEATHER_API_KEY;
988
+
989
+ const data = await httpGet('https://api.openweathermap.org/data/2.5/weather', {
990
+ params: {
991
+ q: context.city,
992
+ appid: apiKey,
993
+ units: 'metric',
994
+ lang: 'pt_br',
995
+ },
996
+ timeout: 5000,
997
+ });
998
+
999
+ return {
1000
+ city: data.name,
1001
+ temperature: data.main.temp,
1002
+ feelsLike: data.main.feels_like,
1003
+ condition: data.weather[0].description,
1004
+ humidity: data.main.humidity,
1005
+ windSpeed: data.wind.speed,
1006
+ };
1007
+ } catch (error: any) {
1008
+ if (error.message.includes('404')) {
1009
+ return { error: `City "${context.city}" not found` };
1010
+ }
1011
+ throw new Error(`Weather API error: ${error.message}`);
1012
+ }
1013
+ },
1014
+ });
1015
+
1016
+ const agent = new Agent({
1017
+ name: 'Weather Assistant',
1018
+ instructions: 'You help users check the weather. Use the weather tool when users ask about weather conditions.',
1019
+ model: openai('gpt-4o'),
1020
+ tools: {
1021
+ weather: weatherTool,
1022
+ },
1023
+ });
1024
+
1025
+ // Use the agent
1026
+ const result = await agent.process({
1027
+ message: 'What is the weather like in Sรฃo Paulo?',
1028
+ });
1029
+ ```
1030
+
1031
+ ---
1032
+
741
1033
  ### Connectors
742
1034
 
743
1035
  **Connectors** are dynamic integrations with external services defined in the Runflow backend. Connector tools automatically load schemas from the backend, support mock execution, and handle path parameters seamlessly.
@@ -0,0 +1,101 @@
1
+ import axios, { AxiosInstance, AxiosRequestConfig, AxiosResponse, AxiosError } from 'axios';
2
+ /**
3
+ * Pre-configured axios instance with sensible defaults for agent tools
4
+ *
5
+ * @example
6
+ * ```typescript
7
+ * import { http } from '@runflow-ai/sdk/http';
8
+ *
9
+ * const response = await http.get('https://api.example.com/data');
10
+ * console.log(response.data);
11
+ * ```
12
+ */
13
+ export declare const http: AxiosInstance;
14
+ /**
15
+ * Utility function to make GET requests with automatic error handling
16
+ * Returns only the data payload for convenience
17
+ *
18
+ * @example
19
+ * ```typescript
20
+ * import { httpGet } from '@runflow-ai/sdk/http';
21
+ *
22
+ * const data = await httpGet('https://api.example.com/users/123');
23
+ * console.log(data.name);
24
+ * ```
25
+ */
26
+ export declare function httpGet<T = any>(url: string, config?: AxiosRequestConfig): Promise<T>;
27
+ /**
28
+ * Utility function to make POST requests with automatic error handling
29
+ * Returns only the data payload for convenience
30
+ *
31
+ * @example
32
+ * ```typescript
33
+ * import { httpPost } from '@runflow-ai/sdk/http';
34
+ *
35
+ * const data = await httpPost('https://api.example.com/users', {
36
+ * name: 'John Doe',
37
+ * email: 'john@example.com'
38
+ * });
39
+ * console.log(data.id);
40
+ * ```
41
+ */
42
+ export declare function httpPost<T = any>(url: string, data?: any, config?: AxiosRequestConfig): Promise<T>;
43
+ /**
44
+ * Utility function to make PUT requests with automatic error handling
45
+ * Returns only the data payload for convenience
46
+ *
47
+ * @example
48
+ * ```typescript
49
+ * import { httpPut } from '@runflow-ai/sdk/http';
50
+ *
51
+ * const data = await httpPut('https://api.example.com/users/123', {
52
+ * name: 'Jane Doe'
53
+ * });
54
+ * ```
55
+ */
56
+ export declare function httpPut<T = any>(url: string, data?: any, config?: AxiosRequestConfig): Promise<T>;
57
+ /**
58
+ * Utility function to make PATCH requests with automatic error handling
59
+ * Returns only the data payload for convenience
60
+ *
61
+ * @example
62
+ * ```typescript
63
+ * import { httpPatch } from '@runflow-ai/sdk/http';
64
+ *
65
+ * const data = await httpPatch('https://api.example.com/users/123', {
66
+ * email: 'newemail@example.com'
67
+ * });
68
+ * ```
69
+ */
70
+ export declare function httpPatch<T = any>(url: string, data?: any, config?: AxiosRequestConfig): Promise<T>;
71
+ /**
72
+ * Utility function to make DELETE requests with automatic error handling
73
+ * Returns only the data payload for convenience
74
+ *
75
+ * @example
76
+ * ```typescript
77
+ * import { httpDelete } from '@runflow-ai/sdk/http';
78
+ *
79
+ * await httpDelete('https://api.example.com/users/123');
80
+ * ```
81
+ */
82
+ export declare function httpDelete<T = any>(url: string, config?: AxiosRequestConfig): Promise<T>;
83
+ /**
84
+ * Re-export axios for advanced users who need full control
85
+ *
86
+ * @example
87
+ * ```typescript
88
+ * import { axios } from '@runflow-ai/sdk/http';
89
+ *
90
+ * const customInstance = axios.create({
91
+ * baseURL: 'https://api.example.com',
92
+ * headers: { 'Authorization': 'Bearer token' }
93
+ * });
94
+ * ```
95
+ */
96
+ export { axios };
97
+ /**
98
+ * Re-export axios types for convenience
99
+ */
100
+ export type { AxiosInstance, AxiosRequestConfig, AxiosResponse, AxiosError, };
101
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/http/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,kBAAkB,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE5F;;;;;;;;;;GAUG;AACH,eAAO,MAAM,IAAI,EAAE,aAMjB,CAAC;AA6BH;;;;;;;;;;;GAWG;AACH,wBAAsB,OAAO,CAAC,CAAC,GAAG,GAAG,EACnC,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,kBAAkB,GAC1B,OAAO,CAAC,CAAC,CAAC,CAOZ;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,QAAQ,CAAC,CAAC,GAAG,GAAG,EACpC,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE,GAAG,EACV,MAAM,CAAC,EAAE,kBAAkB,GAC1B,OAAO,CAAC,CAAC,CAAC,CAOZ;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,OAAO,CAAC,CAAC,GAAG,GAAG,EACnC,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE,GAAG,EACV,MAAM,CAAC,EAAE,kBAAkB,GAC1B,OAAO,CAAC,CAAC,CAAC,CAOZ;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,SAAS,CAAC,CAAC,GAAG,GAAG,EACrC,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE,GAAG,EACV,MAAM,CAAC,EAAE,kBAAkB,GAC1B,OAAO,CAAC,CAAC,CAAC,CAOZ;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,UAAU,CAAC,CAAC,GAAG,GAAG,EACtC,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,kBAAkB,GAC1B,OAAO,CAAC,CAAC,CAAC,CAOZ;AAED;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,KAAK,EAAE,CAAC;AAEjB;;GAEG;AACH,YAAY,EACV,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,UAAU,GACX,CAAC"}
@@ -0,0 +1,161 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.axios = exports.http = void 0;
7
+ exports.httpGet = httpGet;
8
+ exports.httpPost = httpPost;
9
+ exports.httpPut = httpPut;
10
+ exports.httpPatch = httpPatch;
11
+ exports.httpDelete = httpDelete;
12
+ const axios_1 = __importDefault(require("axios"));
13
+ exports.axios = axios_1.default;
14
+ /**
15
+ * Pre-configured axios instance with sensible defaults for agent tools
16
+ *
17
+ * @example
18
+ * ```typescript
19
+ * import { http } from '@runflow-ai/sdk/http';
20
+ *
21
+ * const response = await http.get('https://api.example.com/data');
22
+ * console.log(response.data);
23
+ * ```
24
+ */
25
+ exports.http = axios_1.default.create({
26
+ timeout: 30000, // 30 seconds
27
+ headers: {
28
+ 'User-Agent': 'Runflow-Agent/1.0',
29
+ 'Accept': 'application/json',
30
+ },
31
+ });
32
+ // Add request interceptor for logging (optional)
33
+ exports.http.interceptors.request.use((config) => {
34
+ // You can add request logging here if needed
35
+ return config;
36
+ }, (error) => {
37
+ return Promise.reject(error);
38
+ });
39
+ // Add response interceptor for error handling
40
+ exports.http.interceptors.response.use((response) => response, (error) => {
41
+ // Enhance error message
42
+ if (error.response) {
43
+ // Server responded with error status
44
+ error.message = `HTTP ${error.response.status}: ${error.response.statusText}`;
45
+ }
46
+ else if (error.request) {
47
+ // No response received
48
+ error.message = 'No response received from server';
49
+ }
50
+ return Promise.reject(error);
51
+ });
52
+ /**
53
+ * Utility function to make GET requests with automatic error handling
54
+ * Returns only the data payload for convenience
55
+ *
56
+ * @example
57
+ * ```typescript
58
+ * import { httpGet } from '@runflow-ai/sdk/http';
59
+ *
60
+ * const data = await httpGet('https://api.example.com/users/123');
61
+ * console.log(data.name);
62
+ * ```
63
+ */
64
+ async function httpGet(url, config) {
65
+ try {
66
+ const response = await exports.http.get(url, config);
67
+ return response.data;
68
+ }
69
+ catch (error) {
70
+ throw new Error(`HTTP GET failed: ${error.message}`);
71
+ }
72
+ }
73
+ /**
74
+ * Utility function to make POST requests with automatic error handling
75
+ * Returns only the data payload for convenience
76
+ *
77
+ * @example
78
+ * ```typescript
79
+ * import { httpPost } from '@runflow-ai/sdk/http';
80
+ *
81
+ * const data = await httpPost('https://api.example.com/users', {
82
+ * name: 'John Doe',
83
+ * email: 'john@example.com'
84
+ * });
85
+ * console.log(data.id);
86
+ * ```
87
+ */
88
+ async function httpPost(url, data, config) {
89
+ try {
90
+ const response = await exports.http.post(url, data, config);
91
+ return response.data;
92
+ }
93
+ catch (error) {
94
+ throw new Error(`HTTP POST failed: ${error.message}`);
95
+ }
96
+ }
97
+ /**
98
+ * Utility function to make PUT requests with automatic error handling
99
+ * Returns only the data payload for convenience
100
+ *
101
+ * @example
102
+ * ```typescript
103
+ * import { httpPut } from '@runflow-ai/sdk/http';
104
+ *
105
+ * const data = await httpPut('https://api.example.com/users/123', {
106
+ * name: 'Jane Doe'
107
+ * });
108
+ * ```
109
+ */
110
+ async function httpPut(url, data, config) {
111
+ try {
112
+ const response = await exports.http.put(url, data, config);
113
+ return response.data;
114
+ }
115
+ catch (error) {
116
+ throw new Error(`HTTP PUT failed: ${error.message}`);
117
+ }
118
+ }
119
+ /**
120
+ * Utility function to make PATCH requests with automatic error handling
121
+ * Returns only the data payload for convenience
122
+ *
123
+ * @example
124
+ * ```typescript
125
+ * import { httpPatch } from '@runflow-ai/sdk/http';
126
+ *
127
+ * const data = await httpPatch('https://api.example.com/users/123', {
128
+ * email: 'newemail@example.com'
129
+ * });
130
+ * ```
131
+ */
132
+ async function httpPatch(url, data, config) {
133
+ try {
134
+ const response = await exports.http.patch(url, data, config);
135
+ return response.data;
136
+ }
137
+ catch (error) {
138
+ throw new Error(`HTTP PATCH failed: ${error.message}`);
139
+ }
140
+ }
141
+ /**
142
+ * Utility function to make DELETE requests with automatic error handling
143
+ * Returns only the data payload for convenience
144
+ *
145
+ * @example
146
+ * ```typescript
147
+ * import { httpDelete } from '@runflow-ai/sdk/http';
148
+ *
149
+ * await httpDelete('https://api.example.com/users/123');
150
+ * ```
151
+ */
152
+ async function httpDelete(url, config) {
153
+ try {
154
+ const response = await exports.http.delete(url, config);
155
+ return response.data;
156
+ }
157
+ catch (error) {
158
+ throw new Error(`HTTP DELETE failed: ${error.message}`);
159
+ }
160
+ }
161
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/http/index.ts"],"names":[],"mappings":";;;;;;AA4DA,0BAUC;AAiBD,4BAWC;AAeD,0BAWC;AAeD,8BAWC;AAaD,gCAUC;AA7KD,kDAA4F;AA4LnF,gBA5LF,eAAK,CA4LE;AA1Ld;;;;;;;;;;GAUG;AACU,QAAA,IAAI,GAAkB,eAAK,CAAC,MAAM,CAAC;IAC9C,OAAO,EAAE,KAAK,EAAE,aAAa;IAC7B,OAAO,EAAE;QACP,YAAY,EAAE,mBAAmB;QACjC,QAAQ,EAAE,kBAAkB;KAC7B;CACF,CAAC,CAAC;AAEH,iDAAiD;AACjD,YAAI,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAC3B,CAAC,MAAM,EAAE,EAAE;IACT,6CAA6C;IAC7C,OAAO,MAAM,CAAC;AAChB,CAAC,EACD,CAAC,KAAK,EAAE,EAAE;IACR,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC/B,C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"mappings":"AAAA;;;;;;;GAOG;AASH,MAAM,WAAW,OAAO;IACtB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,QAAQ,CAAC,EAAE,GAAG,CAAC;CAChB;AA+DD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,IAAI,CAuDlD;AAED;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,CAE1D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM,GAAG,IAAI,CAiClE"}
1
+ {"version":3,"file":"logging.d.ts","sourceRoot":"","sources":["../../src/observability/logging.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AASH,MAAM,WAAW,OAAO;IACtB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,QAAQ,CAAC,EAAE,GAAG,CAAC;CAChB;AA+DD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,IAAI,CA6DlD;AAED;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,CAE1D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM,GAAG,IAAI,CAsClE"}
@@ -97,8 +97,14 @@ function log(name, data) {
97
97
  custom: {
98
98
  customLog: true
99
99
  },
100
- // โœ… Nรฃo espalha todo o state para evitar conflito de threadId
101
- // O TraceCollector jรก tem o contexto correto via setContext()
100
+ // โœ… Passar campos do state como fallback
101
+ // Se TraceCollector tiver context setado via setContext(), ele sobrescreve
102
+ // Se nรฃo tiver (auto-init), usa esses valores
103
+ threadId: state.threadId,
104
+ userId: state.userId,
105
+ sessionId: state.sessionId,
106
+ entityType: state.entityType,
107
+ entityValue: state.entityValue,
102
108
  }, parentTraceId // โœ… Conecta na hierarquia se houver parent ativo
103
109
  );
104
110
  if (typeof data === 'object' && data !== null) {
@@ -164,7 +170,12 @@ function logError(name, error) {
164
170
  errorType: error instanceof Error ? error.name : 'Error',
165
171
  errorMessage: error instanceof Error ? error.message : String(error)
166
172
  },
167
- // โœ… Nรฃo espalha todo o state para evitar conflito de threadId
173
+ // โœ… Passar campos do state como fallback
174
+ threadId: state.threadId,
175
+ userId: state.userId,
176
+ sessionId: state.sessionId,
177
+ entityType: state.entityType,
178
+ entityValue: state.entityValue,
168
179
  }, parentTraceId // โœ… Conecta na hierarquia se houver parent ativo
169
180
  );
170
181
  span?.setError(error);
@@ -1 +1 @@
1
- {"version":3,"file":"logging.js","sourceRoot":"","sources":["../../src/observability/logging.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;AA0FH,kBAuDC;AAYD,4BAEC;AAaD,4BAiCC;AA3MD,6CAA0C;AAa1C,+EAA+E;AAC/E,UAAU;AACV,+EAA+E;AAE/E,SAAS,iBAAiB;IACxB,yBAAyB;IACzB,IAAK,MAAc,CAAC,uBAAuB,EAAE,CAAC;QAC5C,OAAQ,MAAc,CAAC,uBAAuB,CAAC;IACjD,CAAC;IAED,oDAAoD;IACpD,IAAI,CAAC;QACH,MAAM,EAAE,oBAAoB,EAAE,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;QAC9D,MAAM,EAAE,sBAAsB,EAAE,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;QAEjE,MAAM,SAAS,GAAG,sBAAsB,EAAE,CAAC;QAC3C,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,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IAAI,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEtB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,iBAAiB,EAAE,CAAC;AACtB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runflow-ai/sdk",
3
- "version": "1.0.55",
3
+ "version": "1.0.58",
4
4
  "description": "Runflow SDK - Multi-agent AI framework",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -65,6 +65,11 @@
65
65
  "import": "./dist/providers/index.js",
66
66
  "require": "./dist/providers/index.js",
67
67
  "types": "./dist/providers/index.d.ts"
68
+ },
69
+ "./http": {
70
+ "import": "./dist/http/index.js",
71
+ "require": "./dist/http/index.js",
72
+ "types": "./dist/http/index.d.ts"
68
73
  }
69
74
  },
70
75
  "scripts": {
@@ -76,11 +81,16 @@
76
81
  "publish:safe": "npm run validate && npm publish"
77
82
  },
78
83
  "dependencies": {
84
+ "axios": "^1.7.0",
85
+ "cheerio": "^1.0.0-rc.12",
86
+ "date-fns": "^3.0.0",
87
+ "lodash": "^4.17.21",
79
88
  "pino": "^8.19.0",
80
89
  "pino-pretty": "^10.3.1",
81
90
  "zod": "^3.22.0"
82
91
  },
83
92
  "devDependencies": {
93
+ "@types/lodash": "^4.14.202",
84
94
  "@types/node": "^20.0.0",
85
95
  "@types/jest": "^30.0.0",
86
96
  "jest": "^30.0.5",