@autenai/sdk 0.1.0 → 0.2.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.d.mts +34 -1
- package/dist/index.d.ts +34 -1
- package/dist/index.js +21 -0
- package/dist/index.mjs +21 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -53,9 +53,26 @@ interface ExecuteResult {
|
|
|
53
53
|
interface AIExecuteResult {
|
|
54
54
|
provider: string;
|
|
55
55
|
task: string;
|
|
56
|
+
plan?: string;
|
|
56
57
|
result: any;
|
|
58
|
+
callsMade?: number;
|
|
59
|
+
learned?: boolean;
|
|
60
|
+
cached?: boolean;
|
|
57
61
|
duration?: number;
|
|
58
62
|
}
|
|
63
|
+
interface AIChainStep {
|
|
64
|
+
provider: string;
|
|
65
|
+
task: string;
|
|
66
|
+
status: 'success' | 'failed' | 'skipped';
|
|
67
|
+
result?: any;
|
|
68
|
+
error?: string;
|
|
69
|
+
}
|
|
70
|
+
interface AIChainResult {
|
|
71
|
+
summary: string;
|
|
72
|
+
steps: AIChainStep[];
|
|
73
|
+
totalProviders: number;
|
|
74
|
+
duration: number;
|
|
75
|
+
}
|
|
59
76
|
interface Agent {
|
|
60
77
|
id: string;
|
|
61
78
|
name: string;
|
|
@@ -238,6 +255,22 @@ declare class AIClient {
|
|
|
238
255
|
* );
|
|
239
256
|
*/
|
|
240
257
|
execute(provider: string, task: string, context?: Record<string, any>): Promise<AIExecuteResult>;
|
|
258
|
+
/**
|
|
259
|
+
* Execute a cross-provider task using natural language.
|
|
260
|
+
* AI breaks the task into steps, executes each with the right provider,
|
|
261
|
+
* and transforms data between them automatically.
|
|
262
|
+
*
|
|
263
|
+
* @example
|
|
264
|
+
* const result = await auten.ai.chain(
|
|
265
|
+
* 'Paimk Shopify užsakymus ir sudėk į Google Sheets'
|
|
266
|
+
* );
|
|
267
|
+
*
|
|
268
|
+
* @example
|
|
269
|
+
* const result = await auten.ai.chain(
|
|
270
|
+
* 'Find Jira bugs from this week, group by severity, and post summary to Slack #dev'
|
|
271
|
+
* );
|
|
272
|
+
*/
|
|
273
|
+
chain(task: string, context?: Record<string, any>): Promise<AIChainResult>;
|
|
241
274
|
}
|
|
242
275
|
|
|
243
276
|
/**
|
|
@@ -305,4 +338,4 @@ declare class Auten {
|
|
|
305
338
|
constructor(config: AutenConfig);
|
|
306
339
|
}
|
|
307
340
|
|
|
308
|
-
export { type AIExecuteResult, type Agent, type AgentDetail, type AgentRunResult, type AgentSchedule, type AgentTool, Auten, AutenApiError, AutenAuthError, type AutenConfig, AutenError, AutenNotFoundError, AutenRateLimitError, type CreateAgentOptions, type CreateAgentResult, type DeployAgentOptions, type DeployResult, type ExecuteResult, type Provider, type ProviderCredentials };
|
|
341
|
+
export { type AIChainResult, type AIChainStep, type AIExecuteResult, type Agent, type AgentDetail, type AgentRunResult, type AgentSchedule, type AgentTool, Auten, AutenApiError, AutenAuthError, type AutenConfig, AutenError, AutenNotFoundError, AutenRateLimitError, type CreateAgentOptions, type CreateAgentResult, type DeployAgentOptions, type DeployResult, type ExecuteResult, type Provider, type ProviderCredentials };
|
package/dist/index.d.ts
CHANGED
|
@@ -53,9 +53,26 @@ interface ExecuteResult {
|
|
|
53
53
|
interface AIExecuteResult {
|
|
54
54
|
provider: string;
|
|
55
55
|
task: string;
|
|
56
|
+
plan?: string;
|
|
56
57
|
result: any;
|
|
58
|
+
callsMade?: number;
|
|
59
|
+
learned?: boolean;
|
|
60
|
+
cached?: boolean;
|
|
57
61
|
duration?: number;
|
|
58
62
|
}
|
|
63
|
+
interface AIChainStep {
|
|
64
|
+
provider: string;
|
|
65
|
+
task: string;
|
|
66
|
+
status: 'success' | 'failed' | 'skipped';
|
|
67
|
+
result?: any;
|
|
68
|
+
error?: string;
|
|
69
|
+
}
|
|
70
|
+
interface AIChainResult {
|
|
71
|
+
summary: string;
|
|
72
|
+
steps: AIChainStep[];
|
|
73
|
+
totalProviders: number;
|
|
74
|
+
duration: number;
|
|
75
|
+
}
|
|
59
76
|
interface Agent {
|
|
60
77
|
id: string;
|
|
61
78
|
name: string;
|
|
@@ -238,6 +255,22 @@ declare class AIClient {
|
|
|
238
255
|
* );
|
|
239
256
|
*/
|
|
240
257
|
execute(provider: string, task: string, context?: Record<string, any>): Promise<AIExecuteResult>;
|
|
258
|
+
/**
|
|
259
|
+
* Execute a cross-provider task using natural language.
|
|
260
|
+
* AI breaks the task into steps, executes each with the right provider,
|
|
261
|
+
* and transforms data between them automatically.
|
|
262
|
+
*
|
|
263
|
+
* @example
|
|
264
|
+
* const result = await auten.ai.chain(
|
|
265
|
+
* 'Paimk Shopify užsakymus ir sudėk į Google Sheets'
|
|
266
|
+
* );
|
|
267
|
+
*
|
|
268
|
+
* @example
|
|
269
|
+
* const result = await auten.ai.chain(
|
|
270
|
+
* 'Find Jira bugs from this week, group by severity, and post summary to Slack #dev'
|
|
271
|
+
* );
|
|
272
|
+
*/
|
|
273
|
+
chain(task: string, context?: Record<string, any>): Promise<AIChainResult>;
|
|
241
274
|
}
|
|
242
275
|
|
|
243
276
|
/**
|
|
@@ -305,4 +338,4 @@ declare class Auten {
|
|
|
305
338
|
constructor(config: AutenConfig);
|
|
306
339
|
}
|
|
307
340
|
|
|
308
|
-
export { type AIExecuteResult, type Agent, type AgentDetail, type AgentRunResult, type AgentSchedule, type AgentTool, Auten, AutenApiError, AutenAuthError, type AutenConfig, AutenError, AutenNotFoundError, AutenRateLimitError, type CreateAgentOptions, type CreateAgentResult, type DeployAgentOptions, type DeployResult, type ExecuteResult, type Provider, type ProviderCredentials };
|
|
341
|
+
export { type AIChainResult, type AIChainStep, type AIExecuteResult, type Agent, type AgentDetail, type AgentRunResult, type AgentSchedule, type AgentTool, Auten, AutenApiError, AutenAuthError, type AutenConfig, AutenError, AutenNotFoundError, AutenRateLimitError, type CreateAgentOptions, type CreateAgentResult, type DeployAgentOptions, type DeployResult, type ExecuteResult, type Provider, type ProviderCredentials };
|
package/dist/index.js
CHANGED
|
@@ -289,6 +289,27 @@ var AIClient = class {
|
|
|
289
289
|
context
|
|
290
290
|
});
|
|
291
291
|
}
|
|
292
|
+
/**
|
|
293
|
+
* Execute a cross-provider task using natural language.
|
|
294
|
+
* AI breaks the task into steps, executes each with the right provider,
|
|
295
|
+
* and transforms data between them automatically.
|
|
296
|
+
*
|
|
297
|
+
* @example
|
|
298
|
+
* const result = await auten.ai.chain(
|
|
299
|
+
* 'Paimk Shopify užsakymus ir sudėk į Google Sheets'
|
|
300
|
+
* );
|
|
301
|
+
*
|
|
302
|
+
* @example
|
|
303
|
+
* const result = await auten.ai.chain(
|
|
304
|
+
* 'Find Jira bugs from this week, group by severity, and post summary to Slack #dev'
|
|
305
|
+
* );
|
|
306
|
+
*/
|
|
307
|
+
async chain(task, context) {
|
|
308
|
+
return this.client.post("/api/v1/sdk/ai/chain", {
|
|
309
|
+
task,
|
|
310
|
+
context
|
|
311
|
+
});
|
|
312
|
+
}
|
|
292
313
|
};
|
|
293
314
|
|
|
294
315
|
// src/index.ts
|
package/dist/index.mjs
CHANGED
|
@@ -258,6 +258,27 @@ var AIClient = class {
|
|
|
258
258
|
context
|
|
259
259
|
});
|
|
260
260
|
}
|
|
261
|
+
/**
|
|
262
|
+
* Execute a cross-provider task using natural language.
|
|
263
|
+
* AI breaks the task into steps, executes each with the right provider,
|
|
264
|
+
* and transforms data between them automatically.
|
|
265
|
+
*
|
|
266
|
+
* @example
|
|
267
|
+
* const result = await auten.ai.chain(
|
|
268
|
+
* 'Paimk Shopify užsakymus ir sudėk į Google Sheets'
|
|
269
|
+
* );
|
|
270
|
+
*
|
|
271
|
+
* @example
|
|
272
|
+
* const result = await auten.ai.chain(
|
|
273
|
+
* 'Find Jira bugs from this week, group by severity, and post summary to Slack #dev'
|
|
274
|
+
* );
|
|
275
|
+
*/
|
|
276
|
+
async chain(task, context) {
|
|
277
|
+
return this.client.post("/api/v1/sdk/ai/chain", {
|
|
278
|
+
task,
|
|
279
|
+
context
|
|
280
|
+
});
|
|
281
|
+
}
|
|
261
282
|
};
|
|
262
283
|
|
|
263
284
|
// src/index.ts
|