@kakaopay-develop/agent-toolkit
Version:
KakaoPay Agent Toolkit
63 lines (56 loc) • 1.42 kB
TypeScript
import { z } from 'zod';
import * as axios from 'axios';
import { CoreTool } from 'ai';
type Context = {
cid?: string;
};
type Configuration = {
actions: {
[product: string]: {
[action: string]: boolean;
};
};
context?: Context;
};
declare class KakaoPayClient {
private client;
constructor(secretKey: string);
post<T>(url: string, data?: any): Promise<axios.AxiosResponse<T>>;
}
type Tool = {
method: string;
name: string;
description: string;
parameters: z.ZodObject<any, any, any, any>;
actions: {
[key: string]: {
[action: string]: boolean;
};
};
execute: (_client: KakaoPayClient, _context: Context, _params: any) => Promise<any>;
};
declare class KakaoPayAPI {
kakaoPayClient: KakaoPayClient;
context: Context;
tools: Tool[];
constructor(secretKey: string, context?: Context);
run(method: string, arg: any): Promise<string>;
}
declare class KakaoPayAgentToolkit {
private _kakaopay;
tools: {
[key: string]: CoreTool;
};
constructor({ secretKey, configuration, }: {
secretKey: string;
configuration: Configuration;
});
getTools(): {
[key: string]: CoreTool;
};
/**
* Get KakaoPay API instance for direct access
*/
getKakaoPayAPI(): KakaoPayAPI;
}
export { type Configuration, KakaoPayAgentToolkit };