import AcpClient, { IDeliverable, AcpGraduationStatus, AcpOnlineStatus } from '@virtuals-protocol/acp-node'; import { GameFunction, GameWorker } from '@virtuals-protocol/game'; import { TwitterApi } from '@virtuals-protocol/game-twitter-node'; declare enum AcpJobPhasesDesc { REQUEST = "request", NEGOTIATION = "pending_payment", TRANSACTION = "in_progress", EVALUATION = "evaluation", COMPLETED = "completed", REJECTED = "rejected", EXPIRED = "expired" } interface AcpRequestMemo { id: number; } interface ITweet { type: "buyer" | "seller"; tweetId: string; content: string; createdAt: number; } interface IAcpJob { jobId: number; clientName?: string; providerName?: string; desc: string; price: string; providerAddress?: string; phase: AcpJobPhasesDesc; memo: AcpRequestMemo[]; tweetHistory?: ITweet[]; } interface IInventory extends IDeliverable { jobId: number; clientName?: string; providerName?: string; } interface AcpState { inventory: { acquired: IInventory[]; produced: IInventory[]; }; jobs: { active: { asABuyer: IAcpJob[]; asASeller: IAcpJob[]; }; completed: IAcpJob[]; cancelled: IAcpJob[]; }; } interface IAcpPluginOptions { apiKey: string; acpClient: AcpClient; twitterClient?: TwitterApi; cluster?: string; evaluatorCluster?: string; agentRepoUrl?: string; graduationStatus?: AcpGraduationStatus; onlineStatus?: AcpOnlineStatus; jobExpiryDurationMins?: number; keepCompletedJobs?: number; keepCancelledJobs?: number; keepProducedInventory?: number; } declare class AcpPlugin { private id; private name; private description; private acpClient; private producedInventory; private cluster?; private evaluatorCluster?; private graduationStatus?; private onlineStatus?; private twitterClient?; private jobExpiryDurationMins; private keepCompletedJobs; private keepCancelledJobs; private keepProducedInventory; constructor(options: IAcpPluginOptions); addProduceItem(item: IInventory): IInventory; getAcpState(): Promise; getWorker(data?: { functions?: GameFunction[]; getEnvironment?: () => Promise>; }): GameWorker; get agentDescription(): string; get searchAgentsFunctions(): GameFunction<[{ readonly name: "reasoning"; readonly type: "string"; readonly description: "Explain why you need to find trading partners at this time"; }, { readonly name: "keyword"; readonly type: "string"; readonly description: "Search for agents by name or description. Use this to find specific trading partners or products."; }]>; get initiateJob(): GameFunction<[{ readonly name: "sellerWalletAddress"; readonly type: "string"; readonly description: "The seller's agent wallet address you want to buy from"; }, { readonly name: "price"; readonly type: "string"; readonly description: "Offered price for service"; }, { readonly name: "reasoning"; readonly type: "string"; readonly description: "Why you are making this purchase request"; }, { readonly name: "serviceRequirements"; readonly type: "string"; readonly description: "Detailed specifications for service-based items, only needed if the seller's catalog specifies service requirements. For marketing materials, provide a clear image generation prompt describing the exact visual elements, composition, and style. Come up with your own creative prompt that matches your needs - don't copy the example (e.g. '3 lemons cut in half arranged around a tall glass filled with golden lemonade, soft natural lighting, white background'). Can be left empty for items that don't require specifications."; }, { readonly name: "tweetContent"; readonly type: "string"; readonly description: "Tweet content that will be posted about this job. Must include the seller's Twitter handle (with @ symbol) to notify them"; }, { readonly name: "requireEvaluator"; readonly type: "boolean"; readonly description: "Decide if your job request is complex enough to spend money for evaluator agent to assess the relevancy of the output. For simple job request like generate image, insights, facts does not require evaluation. For complex and high level job like generating a promotion video, a marketing narrative, a trading signal should require evaluator to assess result relevancy."; }, { readonly name: "evaluatorKeyword"; readonly type: "string"; readonly description: "Keyword to search for a evaluator."; }]>; get respondJob(): GameFunction<[{ readonly name: "jobId"; readonly type: "string"; readonly description: "The job ID you are responding to"; }, { readonly name: "decision"; readonly type: "string"; readonly description: "Your response: 'ACCEPT' or 'REJECT'"; }, { readonly name: "reasoning"; readonly type: "string"; readonly description: "Why you made this decision"; }, { readonly name: "tweetContent"; readonly type: "string"; readonly description: "Tweet content that will be posted about this job as a reply to the previous tweet (do not use @ symbol)"; }]>; get payJob(): GameFunction<[{ readonly name: "jobId"; readonly type: "number"; readonly description: "The job ID you are paying for"; }, { readonly name: "amount"; readonly type: "number"; readonly description: "The total amount to pay"; }, { readonly name: "reasoning"; readonly type: "string"; readonly description: "Why you are making this payment"; }, { readonly name: "tweetContent"; readonly type: "string"; readonly description: "Tweet content that will be posted about this job as a reply to the previous tweet (do not use @ symbol)"; }]>; get deliverJob(): GameFunction<[{ readonly name: "jobId"; readonly type: "string"; readonly description: "The job ID you are delivering for"; }, { readonly name: "reasoning"; readonly type: "string"; readonly description: "Why you are making this delivery"; }, { readonly name: "tweetContent"; readonly type: "string"; readonly description: "Tweet content that will be posted about this job as a reply to the previous tweet (do not use @ symbol)"; }]>; private tweetJob; } export { AcpJobPhasesDesc, type AcpState, type IAcpJob, AcpPlugin as default };