@runflow-ai/sdk 1.0.60 → 1.0.61
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 +147 -6
- package/dist/connectors/connector-creator.d.ts +0 -15
- package/dist/connectors/connector-creator.d.ts.map +1 -1
- package/dist/connectors/connector-creator.js +0 -52
- package/dist/connectors/connector-creator.js.map +1 -1
- package/dist/connectors/connector-helper.d.ts +49 -0
- package/dist/connectors/connector-helper.d.ts.map +1 -0
- package/dist/connectors/connector-helper.js +55 -0
- package/dist/connectors/connector-helper.js.map +1 -0
- package/dist/connectors/index.d.ts +3 -1
- package/dist/connectors/index.d.ts.map +1 -1
- package/dist/connectors/index.js +8 -6
- package/dist/connectors/index.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1032,7 +1032,10 @@ const result = await agent.process({
|
|
|
1032
1032
|
|
|
1033
1033
|
### Connectors
|
|
1034
1034
|
|
|
1035
|
-
**Connectors** are dynamic integrations with external services defined in the Runflow backend.
|
|
1035
|
+
**Connectors** are dynamic integrations with external services defined in the Runflow backend. They support two modes of usage:
|
|
1036
|
+
|
|
1037
|
+
1. **As Tools** - For agent execution (LLM decides when to call)
|
|
1038
|
+
2. **Direct Invocation** - For programmatic execution (you control when to call)
|
|
1036
1039
|
|
|
1037
1040
|
#### Key Features
|
|
1038
1041
|
|
|
@@ -1041,9 +1044,14 @@ const result = await agent.process({
|
|
|
1041
1044
|
- 🛣️ **Path Parameter Resolution** - Automatic extraction and URL building
|
|
1042
1045
|
- ⚡ **Lazy Initialization** - Schemas loaded only when needed, cached globally
|
|
1043
1046
|
- 🔐 **Flexible Authentication** - Supports API Key, Bearer Token, Basic Auth, OAuth2
|
|
1047
|
+
- 🔄 **Multiple Credentials** - Override credentials per execution (multi-tenant support)
|
|
1044
1048
|
- ✅ **Type-Safe** - Automatic JSON Schema → Zod → LLM Parameters conversion
|
|
1045
1049
|
|
|
1046
|
-
|
|
1050
|
+
---
|
|
1051
|
+
|
|
1052
|
+
#### Usage Mode 1: As Agent Tool
|
|
1053
|
+
|
|
1054
|
+
Use connectors as tools that the LLM can call automatically
|
|
1047
1055
|
|
|
1048
1056
|
```typescript
|
|
1049
1057
|
import { createConnectorTool, Agent, openai } from '@runflow-ai/sdk';
|
|
@@ -1080,6 +1088,99 @@ const result = await agent.process({
|
|
|
1080
1088
|
});
|
|
1081
1089
|
```
|
|
1082
1090
|
|
|
1091
|
+
---
|
|
1092
|
+
|
|
1093
|
+
#### Usage Mode 2: Direct Invocation
|
|
1094
|
+
|
|
1095
|
+
Invoke connectors directly without agent involvement:
|
|
1096
|
+
|
|
1097
|
+
```typescript
|
|
1098
|
+
import { connector } from '@runflow-ai/sdk/connectors';
|
|
1099
|
+
import type { ConnectorExecutionOptions } from '@runflow-ai/sdk';
|
|
1100
|
+
|
|
1101
|
+
// Direct connector call
|
|
1102
|
+
const result = await connector(
|
|
1103
|
+
'hubspot', // connector name
|
|
1104
|
+
'contacts', // resource
|
|
1105
|
+
'create', // action
|
|
1106
|
+
{ // data
|
|
1107
|
+
email: 'john@example.com',
|
|
1108
|
+
firstname: 'John',
|
|
1109
|
+
lastname: 'Doe'
|
|
1110
|
+
}
|
|
1111
|
+
);
|
|
1112
|
+
|
|
1113
|
+
console.log('Contact created:', result);
|
|
1114
|
+
```
|
|
1115
|
+
|
|
1116
|
+
**With execution options:**
|
|
1117
|
+
|
|
1118
|
+
```typescript
|
|
1119
|
+
const options: ConnectorExecutionOptions = {
|
|
1120
|
+
credentialId: 'cred-prod-123', // Override credential
|
|
1121
|
+
timeout: 10000, // 10 seconds timeout
|
|
1122
|
+
retries: 3, // Retry 3 times on failure
|
|
1123
|
+
useMock: false, // Use real API
|
|
1124
|
+
};
|
|
1125
|
+
|
|
1126
|
+
const result = await connector(
|
|
1127
|
+
'api-contabil',
|
|
1128
|
+
'clientes',
|
|
1129
|
+
'get',
|
|
1130
|
+
{ id: 123 },
|
|
1131
|
+
options
|
|
1132
|
+
);
|
|
1133
|
+
```
|
|
1134
|
+
|
|
1135
|
+
**Multi-tenant example:**
|
|
1136
|
+
|
|
1137
|
+
```typescript
|
|
1138
|
+
// Different credentials per customer
|
|
1139
|
+
async function createContactForCustomer(customerId: string, contactData: any) {
|
|
1140
|
+
// Get customer's HubSpot credential
|
|
1141
|
+
const credentialId = await getCustomerCredential(customerId, 'hubspot');
|
|
1142
|
+
|
|
1143
|
+
return await connector(
|
|
1144
|
+
'hubspot',
|
|
1145
|
+
'contacts',
|
|
1146
|
+
'create',
|
|
1147
|
+
contactData,
|
|
1148
|
+
{ credentialId }
|
|
1149
|
+
);
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
// Usage
|
|
1153
|
+
await createContactForCustomer('customer-1', { email: 'john@acme.com' });
|
|
1154
|
+
await createContactForCustomer('customer-2', { email: 'jane@techcorp.com' });
|
|
1155
|
+
```
|
|
1156
|
+
|
|
1157
|
+
**Custom headers (override everything):**
|
|
1158
|
+
|
|
1159
|
+
```typescript
|
|
1160
|
+
// Custom headers have HIGHEST priority
|
|
1161
|
+
const result = await connector(
|
|
1162
|
+
'hubspot',
|
|
1163
|
+
'contacts',
|
|
1164
|
+
'create',
|
|
1165
|
+
{ email: 'test@example.com' },
|
|
1166
|
+
{
|
|
1167
|
+
headers: {
|
|
1168
|
+
'Authorization': 'Bearer temp-test-token',
|
|
1169
|
+
'X-Request-ID': generateId(),
|
|
1170
|
+
}
|
|
1171
|
+
}
|
|
1172
|
+
);
|
|
1173
|
+
```
|
|
1174
|
+
|
|
1175
|
+
**Authentication Priority:**
|
|
1176
|
+
|
|
1177
|
+
1. **Custom headers** (highest - overrides everything)
|
|
1178
|
+
2. **credentialId override** (runtime override)
|
|
1179
|
+
3. **Instance credential** (default from connector instance)
|
|
1180
|
+
4. **No authentication**
|
|
1181
|
+
|
|
1182
|
+
---
|
|
1183
|
+
|
|
1083
1184
|
#### Connector Tool Configuration
|
|
1084
1185
|
|
|
1085
1186
|
```typescript
|
|
@@ -1200,13 +1301,54 @@ const result = await agent.process({
|
|
|
1200
1301
|
});
|
|
1201
1302
|
```
|
|
1202
1303
|
|
|
1304
|
+
#### Complete Example: Both Modes
|
|
1305
|
+
|
|
1306
|
+
```typescript
|
|
1307
|
+
import { Agent, openai, createConnectorTool, connector } from '@runflow-ai/sdk';
|
|
1308
|
+
|
|
1309
|
+
// 1. Create tool for agent use
|
|
1310
|
+
const createContactTool = createConnectorTool({
|
|
1311
|
+
connector: 'hubspot',
|
|
1312
|
+
resource: 'contacts',
|
|
1313
|
+
action: 'create',
|
|
1314
|
+
description: 'Create contact in HubSpot',
|
|
1315
|
+
});
|
|
1316
|
+
|
|
1317
|
+
const agent = new Agent({
|
|
1318
|
+
name: 'CRM Agent',
|
|
1319
|
+
instructions: 'You manage contacts in HubSpot.',
|
|
1320
|
+
model: openai('gpt-4o'),
|
|
1321
|
+
tools: { createContact: createContactTool },
|
|
1322
|
+
});
|
|
1323
|
+
|
|
1324
|
+
// 2. Agent decides when to use tool (Mode 1)
|
|
1325
|
+
await agent.process({
|
|
1326
|
+
message: 'Create contact for Alice, alice@example.com',
|
|
1327
|
+
sessionId: 'session-1',
|
|
1328
|
+
});
|
|
1329
|
+
|
|
1330
|
+
// 3. Direct invocation (Mode 2 - you control)
|
|
1331
|
+
await connector(
|
|
1332
|
+
'hubspot',
|
|
1333
|
+
'contacts',
|
|
1334
|
+
'update',
|
|
1335
|
+
{
|
|
1336
|
+
contactId: '123',
|
|
1337
|
+
status: 'customer'
|
|
1338
|
+
},
|
|
1339
|
+
{ credentialId: 'cred-prod' }
|
|
1340
|
+
);
|
|
1341
|
+
```
|
|
1342
|
+
|
|
1343
|
+
---
|
|
1344
|
+
|
|
1203
1345
|
#### How It Works
|
|
1204
1346
|
|
|
1205
1347
|
1. **Tool Creation**: `createConnectorTool` creates a tool with a temporary schema
|
|
1206
1348
|
2. **Lazy Loading**: On first agent execution, schemas are fetched from the backend in parallel
|
|
1207
1349
|
3. **Schema Conversion**: JSON Schema → Zod → LLM Parameters (automatic)
|
|
1208
1350
|
4. **Caching**: Schemas are cached globally to avoid repeated API calls
|
|
1209
|
-
5. **Execution**: Tool executes with
|
|
1351
|
+
5. **Execution**: Tool/API executes with authentication, path resolution, and error handling
|
|
1210
1352
|
|
|
1211
1353
|
#### Automatic Setup
|
|
1212
1354
|
|
|
@@ -3016,8 +3158,7 @@ agent._setAPIClient(apiClient);
|
|
|
3016
3158
|
import { Agent, Runflow, openai, anthropic, bedrock } from '@runflow-ai/sdk';
|
|
3017
3159
|
|
|
3018
3160
|
// Tools & Connectors
|
|
3019
|
-
import { createTool, createConnectorTool } from '@runflow-ai/sdk';
|
|
3020
|
-
import { hubspot, twilio, email, slack } from '@runflow-ai/sdk';
|
|
3161
|
+
import { createTool, createConnectorTool, connector } from '@runflow-ai/sdk';
|
|
3021
3162
|
|
|
3022
3163
|
// Workflows
|
|
3023
3164
|
import {
|
|
@@ -3065,7 +3206,7 @@ import { openai, anthropic, bedrock } from '@runflow-ai/sdk/core';
|
|
|
3065
3206
|
import { createTool } from '@runflow-ai/sdk/tools';
|
|
3066
3207
|
|
|
3067
3208
|
// Connectors
|
|
3068
|
-
import {
|
|
3209
|
+
import { connector, createConnectorTool, loadConnector } from '@runflow-ai/sdk/connectors';
|
|
3069
3210
|
|
|
3070
3211
|
// Workflows
|
|
3071
3212
|
import { createWorkflow, WorkflowBuilder } from '@runflow-ai/sdk/workflows';
|
|
@@ -21,19 +21,4 @@ export interface ConnectorToolOptions {
|
|
|
21
21
|
description?: string;
|
|
22
22
|
outputSchema?: z.ZodSchema;
|
|
23
23
|
}
|
|
24
|
-
export declare const hubspot: {
|
|
25
|
-
createContact: () => RunflowTool;
|
|
26
|
-
getContact: () => RunflowTool;
|
|
27
|
-
createTicket: () => RunflowTool;
|
|
28
|
-
};
|
|
29
|
-
export declare const twilio: {
|
|
30
|
-
sendWhatsApp: () => RunflowTool;
|
|
31
|
-
sendSMS: () => RunflowTool;
|
|
32
|
-
};
|
|
33
|
-
export declare const email: {
|
|
34
|
-
send: () => RunflowTool;
|
|
35
|
-
};
|
|
36
|
-
export declare const slack: {
|
|
37
|
-
sendMessage: () => RunflowTool;
|
|
38
|
-
};
|
|
39
24
|
//# sourceMappingURL=connector-creator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connector-creator.d.ts","sourceRoot":"","sources":["../../src/connectors/connector-creator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAiBvC,wBAAgB,mBAAmB,CAAC,MAAM,EAAE;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,GAAG,WAAW,CA+Fd;AAkMD,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM;mBAGvB,MAAM,UAAU,MAAM;EASxC;AAMD,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;AAErE,MAAM,MAAM,kBAAkB,GAC1B,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,SAAS,GACT,SAAS,GACT,UAAU,GACV,OAAO,GACP,QAAQ,GACR,KAAK,GACL,MAAM,GACN,MAAM,GACN,OAAO,GACP;IAAE,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,GAClB;IAAE,KAAK,EAAE,kBAAkB,CAAA;CAAE,CAAC;AAElC,MAAM,WAAW,oBAAoB;IACnC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC;CAC5B
|
|
1
|
+
{"version":3,"file":"connector-creator.d.ts","sourceRoot":"","sources":["../../src/connectors/connector-creator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAiBvC,wBAAgB,mBAAmB,CAAC,MAAM,EAAE;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,GAAG,WAAW,CA+Fd;AAkMD,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM;mBAGvB,MAAM,UAAU,MAAM;EASxC;AAMD,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;AAErE,MAAM,MAAM,kBAAkB,GAC1B,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,SAAS,GACT,SAAS,GACT,UAAU,GACV,OAAO,GACP,QAAQ,GACR,KAAK,GACL,MAAM,GACN,MAAM,GACN,OAAO,GACP;IAAE,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,GAClB;IAAE,KAAK,EAAE,kBAAkB,CAAA;CAAE,CAAC;AAElC,MAAM,WAAW,oBAAoB;IACnC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC;CAC5B"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.slack = exports.email = exports.twilio = exports.hubspot = void 0;
|
|
4
3
|
exports.createConnectorTool = createConnectorTool;
|
|
5
4
|
exports.loadConnector = loadConnector;
|
|
6
5
|
const zod_1 = require("zod");
|
|
@@ -254,55 +253,4 @@ function loadConnector(name) {
|
|
|
254
253
|
},
|
|
255
254
|
};
|
|
256
255
|
}
|
|
257
|
-
// Legacy built-in shortcuts (kept for backwards compatibility)
|
|
258
|
-
exports.hubspot = {
|
|
259
|
-
createContact: () => createConnectorTool({
|
|
260
|
-
connector: 'hubspot',
|
|
261
|
-
resource: 'contacts',
|
|
262
|
-
action: 'create',
|
|
263
|
-
enableMock: true,
|
|
264
|
-
}),
|
|
265
|
-
getContact: () => createConnectorTool({
|
|
266
|
-
connector: 'hubspot',
|
|
267
|
-
resource: 'contacts',
|
|
268
|
-
action: 'get',
|
|
269
|
-
enableMock: true,
|
|
270
|
-
}),
|
|
271
|
-
createTicket: () => createConnectorTool({
|
|
272
|
-
connector: 'hubspot',
|
|
273
|
-
resource: 'tickets',
|
|
274
|
-
action: 'create',
|
|
275
|
-
enableMock: true,
|
|
276
|
-
}),
|
|
277
|
-
};
|
|
278
|
-
exports.twilio = {
|
|
279
|
-
sendWhatsApp: () => createConnectorTool({
|
|
280
|
-
connector: 'twilio',
|
|
281
|
-
resource: 'messages',
|
|
282
|
-
action: 'send-whatsapp',
|
|
283
|
-
enableMock: true,
|
|
284
|
-
}),
|
|
285
|
-
sendSMS: () => createConnectorTool({
|
|
286
|
-
connector: 'twilio',
|
|
287
|
-
resource: 'messages',
|
|
288
|
-
action: 'send-sms',
|
|
289
|
-
enableMock: true,
|
|
290
|
-
}),
|
|
291
|
-
};
|
|
292
|
-
exports.email = {
|
|
293
|
-
send: () => createConnectorTool({
|
|
294
|
-
connector: 'email',
|
|
295
|
-
resource: 'messages',
|
|
296
|
-
action: 'send',
|
|
297
|
-
enableMock: true,
|
|
298
|
-
}),
|
|
299
|
-
};
|
|
300
|
-
exports.slack = {
|
|
301
|
-
sendMessage: () => createConnectorTool({
|
|
302
|
-
connector: 'slack',
|
|
303
|
-
resource: 'messages',
|
|
304
|
-
action: 'send',
|
|
305
|
-
enableMock: true,
|
|
306
|
-
}),
|
|
307
|
-
};
|
|
308
256
|
//# sourceMappingURL=connector-creator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connector-creator.js","sourceRoot":"","sources":["../../src/connectors/connector-creator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"connector-creator.js","sourceRoot":"","sources":["../../src/connectors/connector-creator.ts"],"names":[],"mappings":";;AAmBA,kDAqGC;AAkMD,sCAYC;AAtUD,6BAAwB;AACxB,wDAAmD;AAGnD,+EAA+E;AAC/E,0BAA0B;AAC1B,+EAA+E;AAE/E,MAAM,WAAW,GAAG,IAAI,GAAG,EAKvB,CAAC;AAEL,+EAA+E;AAC/E,uCAAuC;AACvC,+EAA+E;AAE/E,SAAgB,mBAAmB,CAAC,MAMnC;IACC,MAAM,WAAW,GAAG,GAAG,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;IAE9E,oCAAoC;IACpC,MAAM,IAAI,GAAG,IAAA,yBAAU,EAAC;QACtB,EAAE,EAAE,WAAW;QACf,WAAW,EAAE,MAAM,CAAC,WAAW,IAAI,WAAW,MAAM,CAAC,MAAM,OAAO,MAAM,CAAC,QAAQ,EAAE;QAEnF,kDAAkD;QAClD,WAAW,EAAE,OAAC,CAAC,GAAG,EAAE;QAEpB,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;YAC7B,oBAAoB;YACpB,MAAM,EAAE,sBAAsB,EAAE,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;YACjE,MAAM,GAAG,GAAG,sBAAsB,EAAE,CAAC;YAErC,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,EAAE,GAAG,OAAc,CAAC;YAE9C,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,SAAS,CAChC,MAAM,CAAC,SAAS,EAChB,MAAM,CAAC,QAAQ,EACf,MAAM,CAAC,MAAM,EACb,MAAM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,QAAQ,CAAC;QAChB,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC;IACtC,CAAC;IAED,MAAM,KAAK,GAAQ;QACjB,IAAI;QACJ,WAAW;QACX,QAAQ;KACT,CAAC;IAEF,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;QAC/B,KAAK,CAAC,OAAO,GAAG,YAAY,CAAC;IAC/B,CAAC;IAED,IAAI,UAAU,EAAE,CAAC;QACf,KAAK,CAAC,IAAI,GAAG,UAAU,CAAC;IAC1B,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED,+EAA+E;AAC/E,mDAAmD;AACnD,+EAA+E;AAE/E,SAAgB,aAAa,CAAC,IAAY;IACxC,OAAO;QACL,6CAA6C;QAC7C,IAAI,CAAC,QAAgB,EAAE,MAAc;YACnC,OAAO,mBAAmB,CAAC;gBACzB,SAAS,EAAE,IAAI;gBACf,QAAQ;gBACR,MAAM;gBACN,UAAU,EAAE,IAAI;aACjB,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { ConnectorExecutionOptions } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Execute connector directly (programmatic invocation)
|
|
4
|
+
*
|
|
5
|
+
* Use this when you want to invoke a connector programmatically,
|
|
6
|
+
* without agent involvement. For agent tools, use createConnectorTool.
|
|
7
|
+
*
|
|
8
|
+
* @param connectorName - Connector instance name (e.g., 'hubspot', 'api-contabil')
|
|
9
|
+
* @param resource - Resource name (e.g., 'contacts', 'clientes')
|
|
10
|
+
* @param action - Action name (e.g., 'get', 'list', 'create', 'update')
|
|
11
|
+
* @param data - Data to send to the connector
|
|
12
|
+
* @param options - Optional execution options (credentialId, timeout, headers, etc.)
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* import { connector } from '@runflow-ai/sdk/connectors';
|
|
17
|
+
*
|
|
18
|
+
* // Basic usage
|
|
19
|
+
* const result = await connector(
|
|
20
|
+
* 'hubspot',
|
|
21
|
+
* 'contacts',
|
|
22
|
+
* 'create',
|
|
23
|
+
* { email: 'john@example.com', firstname: 'John' }
|
|
24
|
+
* );
|
|
25
|
+
*
|
|
26
|
+
* // With credential override (multi-tenant)
|
|
27
|
+
* const result = await connector(
|
|
28
|
+
* 'hubspot',
|
|
29
|
+
* 'contacts',
|
|
30
|
+
* 'create',
|
|
31
|
+
* { email: 'jane@example.com' },
|
|
32
|
+
* { credentialId: 'cred-customerB' }
|
|
33
|
+
* );
|
|
34
|
+
*
|
|
35
|
+
* // With custom headers
|
|
36
|
+
* const result = await connector(
|
|
37
|
+
* 'api-contabil',
|
|
38
|
+
* 'clientes',
|
|
39
|
+
* 'get',
|
|
40
|
+
* { id: 123 },
|
|
41
|
+
* {
|
|
42
|
+
* headers: { 'X-API-Key': 'temp-key' },
|
|
43
|
+
* timeout: 5000
|
|
44
|
+
* }
|
|
45
|
+
* );
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
export declare function connector(connectorName: string, resource: string, action: string, data: any, options?: ConnectorExecutionOptions): Promise<any>;
|
|
49
|
+
//# sourceMappingURL=connector-helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connector-helper.d.ts","sourceRoot":"","sources":["../../src/connectors/connector-helper.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,wBAAsB,SAAS,CAC7B,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,GAAG,EACT,OAAO,CAAC,EAAE,yBAAyB,GAClC,OAAO,CAAC,GAAG,CAAC,CAGd"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.connector = connector;
|
|
4
|
+
const api_client_1 = require("../core/api-client");
|
|
5
|
+
/**
|
|
6
|
+
* Execute connector directly (programmatic invocation)
|
|
7
|
+
*
|
|
8
|
+
* Use this when you want to invoke a connector programmatically,
|
|
9
|
+
* without agent involvement. For agent tools, use createConnectorTool.
|
|
10
|
+
*
|
|
11
|
+
* @param connectorName - Connector instance name (e.g., 'hubspot', 'api-contabil')
|
|
12
|
+
* @param resource - Resource name (e.g., 'contacts', 'clientes')
|
|
13
|
+
* @param action - Action name (e.g., 'get', 'list', 'create', 'update')
|
|
14
|
+
* @param data - Data to send to the connector
|
|
15
|
+
* @param options - Optional execution options (credentialId, timeout, headers, etc.)
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```typescript
|
|
19
|
+
* import { connector } from '@runflow-ai/sdk/connectors';
|
|
20
|
+
*
|
|
21
|
+
* // Basic usage
|
|
22
|
+
* const result = await connector(
|
|
23
|
+
* 'hubspot',
|
|
24
|
+
* 'contacts',
|
|
25
|
+
* 'create',
|
|
26
|
+
* { email: 'john@example.com', firstname: 'John' }
|
|
27
|
+
* );
|
|
28
|
+
*
|
|
29
|
+
* // With credential override (multi-tenant)
|
|
30
|
+
* const result = await connector(
|
|
31
|
+
* 'hubspot',
|
|
32
|
+
* 'contacts',
|
|
33
|
+
* 'create',
|
|
34
|
+
* { email: 'jane@example.com' },
|
|
35
|
+
* { credentialId: 'cred-customerB' }
|
|
36
|
+
* );
|
|
37
|
+
*
|
|
38
|
+
* // With custom headers
|
|
39
|
+
* const result = await connector(
|
|
40
|
+
* 'api-contabil',
|
|
41
|
+
* 'clientes',
|
|
42
|
+
* 'get',
|
|
43
|
+
* { id: 123 },
|
|
44
|
+
* {
|
|
45
|
+
* headers: { 'X-API-Key': 'temp-key' },
|
|
46
|
+
* timeout: 5000
|
|
47
|
+
* }
|
|
48
|
+
* );
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
async function connector(connectorName, resource, action, data, options) {
|
|
52
|
+
const api = (0, api_client_1.createRunflowAPIClient)();
|
|
53
|
+
return api.connector(connectorName, resource, action, data, options);
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=connector-helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connector-helper.js","sourceRoot":"","sources":["../../src/connectors/connector-helper.ts"],"names":[],"mappings":";;AAiDA,8BASC;AA1DD,mDAA4D;AAG5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACI,KAAK,UAAU,SAAS,CAC7B,aAAqB,EACrB,QAAgB,EAChB,MAAc,EACd,IAAS,EACT,OAAmC;IAEnC,MAAM,GAAG,GAAG,IAAA,mCAAsB,GAAE,CAAC;IACrC,OAAO,GAAG,CAAC,SAAS,CAAC,aAAa,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;AACvE,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { connector } from './connector-helper';
|
|
2
|
+
export { createConnectorTool, loadConnector } from './connector-creator';
|
|
2
3
|
export type { ConnectorParameters, ConnectorParameter, ConnectorToolOptions } from './connector-creator';
|
|
4
|
+
export type { ConnectorExecutionOptions } from '../types';
|
|
3
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/connectors/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/connectors/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGzE,YAAY,EACV,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,qBAAqB,CAAC;AAG7B,YAAY,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC"}
|
package/dist/connectors/index.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
// ============================================================================
|
|
3
|
+
// CONNECTORS API - Public Exports
|
|
4
|
+
// ============================================================================
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
//
|
|
6
|
+
exports.loadConnector = exports.createConnectorTool = exports.connector = void 0;
|
|
7
|
+
// Direct connector invocation (programmatic)
|
|
8
|
+
var connector_helper_1 = require("./connector-helper");
|
|
9
|
+
Object.defineProperty(exports, "connector", { enumerable: true, get: function () { return connector_helper_1.connector; } });
|
|
10
|
+
// Connector Tool Creation (for use in Agents)
|
|
5
11
|
var connector_creator_1 = require("./connector-creator");
|
|
6
12
|
Object.defineProperty(exports, "createConnectorTool", { enumerable: true, get: function () { return connector_creator_1.createConnectorTool; } });
|
|
7
13
|
Object.defineProperty(exports, "loadConnector", { enumerable: true, get: function () { return connector_creator_1.loadConnector; } });
|
|
8
|
-
Object.defineProperty(exports, "hubspot", { enumerable: true, get: function () { return connector_creator_1.hubspot; } });
|
|
9
|
-
Object.defineProperty(exports, "twilio", { enumerable: true, get: function () { return connector_creator_1.twilio; } });
|
|
10
|
-
Object.defineProperty(exports, "email", { enumerable: true, get: function () { return connector_creator_1.email; } });
|
|
11
|
-
Object.defineProperty(exports, "slack", { enumerable: true, get: function () { return connector_creator_1.slack; } });
|
|
12
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/connectors/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/connectors/index.ts"],"names":[],"mappings":";AAAA,+EAA+E;AAC/E,kCAAkC;AAClC,+EAA+E;;;AAE/E,6CAA6C;AAC7C,uDAA+C;AAAtC,6GAAA,SAAS,OAAA;AAElB,8CAA8C;AAC9C,yDAAyE;AAAhE,wHAAA,mBAAmB,OAAA;AAAE,kHAAA,aAAa,OAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { Agent, openai, anthropic, bedrock, createRunflowAPIClient, RunflowAPIClientImpl, Runflow, } from './core';
|
|
2
2
|
export { createTool, } from './tools';
|
|
3
|
-
export { createConnectorTool, loadConnector,
|
|
3
|
+
export { connector, createConnectorTool, loadConnector, } from './connectors';
|
|
4
|
+
export type { ConnectorParameters, ConnectorParameter, ConnectorToolOptions, ConnectorExecutionOptions, } from './connectors';
|
|
4
5
|
export { Workflow, WorkflowBuilder, createWorkflow, createStep, createAgentStep, createFunctionStep, createConnectorStep, } from './workflows';
|
|
5
6
|
export { identify, detectIdentityType, startExecution, log, logEvent, logError, createSpan, withSpan, } from './observability';
|
|
6
7
|
export type { IdentifyConfig, ExecutionConfig, ExecutionController, LogData, } from './observability';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,KAAK,EACL,MAAM,EACN,SAAS,EACT,OAAO,EACP,sBAAsB,EACtB,oBAAoB,EACpB,OAAO,GACR,MAAM,QAAQ,CAAC;AAGhB,OAAO,EACL,UAAU,GACX,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,mBAAmB,EACnB,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,KAAK,EACL,MAAM,EACN,SAAS,EACT,OAAO,EACP,sBAAsB,EACtB,oBAAoB,EACpB,OAAO,GACR,MAAM,QAAQ,CAAC;AAGhB,OAAO,EACL,UAAU,GACX,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,SAAS,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EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAGxD,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAOnD,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGxF,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAG5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// ============================================================================
|
|
3
3
|
// RUNFLOW SDK V2 - MAIN EXPORTS
|
|
4
|
-
// Version: 1.0.
|
|
4
|
+
// Version: 1.0.61 - added connector() helper for direct invocation + removed legacy shortcuts
|
|
5
5
|
// ============================================================================
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.FileMemoryProvider = exports.RunflowMemoryProvider = exports.LLM = exports.Prompts = exports.RAG = exports.Knowledge = exports.Memory = exports.traced = exports.createTraceCollector = exports.RunflowTraceSpan = exports.RunflowTraceCollector = exports.withSpan = exports.createSpan = exports.logError = exports.logEvent = exports.log = exports.startExecution = exports.detectIdentityType = exports.identify = exports.createConnectorStep = exports.createFunctionStep = exports.createAgentStep = exports.createStep = exports.createWorkflow = exports.WorkflowBuilder = exports.Workflow = exports.
|
|
7
|
+
exports.FileMemoryProvider = exports.RunflowMemoryProvider = exports.LLM = exports.Prompts = exports.RAG = exports.Knowledge = exports.Memory = exports.traced = exports.createTraceCollector = exports.RunflowTraceSpan = exports.RunflowTraceCollector = exports.withSpan = exports.createSpan = exports.logError = exports.logEvent = exports.log = exports.startExecution = exports.detectIdentityType = exports.identify = exports.createConnectorStep = exports.createFunctionStep = exports.createAgentStep = exports.createStep = exports.createWorkflow = exports.WorkflowBuilder = exports.Workflow = exports.loadConnector = exports.createConnectorTool = exports.connector = exports.createTool = exports.Runflow = exports.RunflowAPIClientImpl = exports.createRunflowAPIClient = exports.bedrock = exports.anthropic = exports.openai = exports.Agent = void 0;
|
|
8
8
|
// Core (Agent + Models + API Client + Context)
|
|
9
9
|
var core_1 = require("./core");
|
|
10
10
|
Object.defineProperty(exports, "Agent", { enumerable: true, get: function () { return core_1.Agent; } });
|
|
@@ -19,12 +19,9 @@ var tools_1 = require("./tools");
|
|
|
19
19
|
Object.defineProperty(exports, "createTool", { enumerable: true, get: function () { return tools_1.createTool; } });
|
|
20
20
|
// Connectors
|
|
21
21
|
var connectors_1 = require("./connectors");
|
|
22
|
+
Object.defineProperty(exports, "connector", { enumerable: true, get: function () { return connectors_1.connector; } });
|
|
22
23
|
Object.defineProperty(exports, "createConnectorTool", { enumerable: true, get: function () { return connectors_1.createConnectorTool; } });
|
|
23
24
|
Object.defineProperty(exports, "loadConnector", { enumerable: true, get: function () { return connectors_1.loadConnector; } });
|
|
24
|
-
Object.defineProperty(exports, "hubspot", { enumerable: true, get: function () { return connectors_1.hubspot; } });
|
|
25
|
-
Object.defineProperty(exports, "twilio", { enumerable: true, get: function () { return connectors_1.twilio; } });
|
|
26
|
-
Object.defineProperty(exports, "email", { enumerable: true, get: function () { return connectors_1.email; } });
|
|
27
|
-
Object.defineProperty(exports, "slack", { enumerable: true, get: function () { return connectors_1.slack; } });
|
|
28
25
|
// Workflows
|
|
29
26
|
var workflows_1 = require("./workflows");
|
|
30
27
|
Object.defineProperty(exports, "Workflow", { enumerable: true, get: function () { return workflows_1.Workflow; } });
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,+EAA+E;AAC/E,gCAAgC;AAChC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts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