import Response from "../util/Response"; import { AxiosPromise, AxiosProgressEvent } from "axios"; export interface AgentRunRequest { run_type?: string; trigger_source?: string; background?: boolean; inline?: boolean; live_mode?: boolean; initial_message?: string | null; attachment_ids?: string[]; agent_run_id?: string | null; [key: string]: any; } export interface AgentStreamAnswerRequest { prompt: string; [key: string]: any; } export interface AgentFetchOptions { params?: Record; signal?: AbortSignal; headers?: Record; fetcher?: typeof fetch; } export interface AgentStreamAnswerOptions extends AgentFetchOptions { } declare class Agents { private static fetchWithAuth; /** * List game titles that can be managed in the Agents section. */ static listTitles(params?: Record): AxiosPromise>; /** * List title-agent subscriptions linked to titles in a community. */ static listCommunitySubscriptions(community_id: string, params?: Record): AxiosPromise>; /** * Cancel a title-agent subscription linked to a community title. */ static cancelCommunitySubscription(community_id: string, stripe_subscription_id: string, params?: Record): AxiosPromise>; /** * Return the full Laravel API route catalog agents use for route-aware planning. */ static routeCatalog(params?: Record): AxiosPromise>; /** * Get a title-scoped agent workspace with setup, billing, counts, and route summary. */ static workspace(title_id: string, params?: Record): AxiosPromise>; /** * List agents for a title. */ static listAgents(title_id: string, params?: Record): AxiosPromise>; /** * Create an agent before payment. Runs/results remain gated until subscription or prepaid credits. */ static createAgent(title_id: string, data?: object, params?: Record): AxiosPromise>; /** * View one agent. */ static viewAgent(title_id: string, agent_id: string, params?: Record): AxiosPromise>; /** * Update an agent's setup, policies, and guidance stop rules. */ static updateAgent(title_id: string, agent_id: string, data?: object, params?: Record): AxiosPromise>; /** * Archive an agent. */ static deleteAgent(title_id: string, agent_id: string, params?: Record): AxiosPromise>; /** * Run an agent planning cycle. Returns 402 when subscription or prepaid credits are required. */ static runAgent(title_id: string, agent_id: string, data?: AgentRunRequest, params?: Record): AxiosPromise>; /** * Stream a quick advisory answer for the agent workspace. * * This returns the native Fetch API Response so callers can consume the * ReadableStream body incrementally. A 409 response means streaming is * disabled server-side and the caller should fall back to the normal run * flow. */ static streamAnswer(title_id: string, agent_id: string, data: AgentStreamAnswerRequest | string, options?: AgentStreamAnswerOptions): Promise; /** * Upload one file for an agent run. data can include { agent_run_id }. */ static uploadAgentFile(title_id: string, agent_id: string, file: File | Blob, data?: object, params?: Record, onUploadProgress?: (progressEvent: AxiosProgressEvent) => void): AxiosPromise>; /** * Alias for callers that use plural naming while uploading one file at a time. */ static uploadAgentFiles(title_id: string, agent_id: string, file: File | Blob, data?: object, params?: Record, onUploadProgress?: (progressEvent: AxiosProgressEvent) => void): AxiosPromise>; /** * List Google Drive files/folders available to attach to a title agent. */ static listGoogleDriveFiles(title_id: string, params?: Record): AxiosPromise>; /** * Attach a Google Drive file as a reference file for an agent. */ static attachGoogleDriveFile(title_id: string, agent_id: string, data?: object, params?: Record): AxiosPromise>; /** * Download a protected agent file through the authenticated API route. * * Returns the native Fetch API Response so callers can inspect headers such * as Content-Disposition before creating a browser download or preview blob. */ static downloadAgentFile(title_id: string, file_id: string, options?: AgentFetchOptions): Promise; /** * Export a generated agent artifact to Google Drive. */ static exportAgentFileToGoogleDrive(title_id: string, file_id: string, data?: object, params?: Record): AxiosPromise>; /** * List agent runs for a title. */ static listRuns(title_id: string, params?: Record): AxiosPromise>; /** * View one durable agent run, including events, files, actions, and guidance when loaded by the API. */ static viewRun(title_id: string, run_id: string, params?: Record): AxiosPromise>; /** * List real-time user-visible events for an agent run. */ static listRunEvents(title_id: string, run_id: string, params?: Record): AxiosPromise>; /** * Mark a queued or running agent run as being watched live so the UI can stream the loop * and the backend can avoid sending delayed background summaries to active viewers. */ static heartbeatRun(title_id: string, run_id: string, data?: object, params?: Record): AxiosPromise>; /** * Request cancellation for a queued or running agent run. */ static cancelRun(title_id: string, run_id: string, data?: object, params?: Record): AxiosPromise>; /** * Send a course correction to a queued or running agent run. */ static interjectRun(title_id: string, run_id: string, data?: object, params?: Record): AxiosPromise>; /** * List agent actions/approval queue for a title. */ static listActions(title_id: string, params?: Record): AxiosPromise>; /** * Approve an agent action. */ static approveAction(title_id: string, action_id: string, data?: object, params?: Record): AxiosPromise>; /** * Reject an agent action. */ static rejectAction(title_id: string, action_id: string, data?: object, params?: Record): AxiosPromise>; /** * Execute an approved safe action. */ static executeAction(title_id: string, action_id: string, data?: object, params?: Record): AxiosPromise>; /** * List guidance requests where agents have stopped for developer direction. */ static listGuidance(title_id: string, params?: Record): AxiosPromise>; /** * Answer a guidance request and write structured agent memory. */ static answerGuidance(title_id: string, guidance_id: string, data?: object, params?: Record): AxiosPromise>; /** * Rewrite an editable agent draft for review without executing the parent action. */ static rewriteAgentDraft(title_id: string, data?: object, params?: Record): AxiosPromise>; /** * Agent workflow convenience wrapper for creator invite context. */ static creatorInviteContext(campaign_id: string, params?: Record): AxiosPromise>; /** * Agent workflow convenience wrapper for sending a reviewed creator invite. */ static sendCreatorInvite(campaign_id: string, data?: object, params?: Record): AxiosPromise>; /** * Agent workflow convenience wrapper for updating a drafted social post. */ static updateSocialPost(post_id: string, data?: object, params?: Record): AxiosPromise>; /** * Agent workflow convenience wrapper for updating campaign settings. */ static updateCampaign(campaign_id: string, data?: object, params?: Record): AxiosPromise>; /** * Agent workflow convenience wrapper for saving manual access keys. */ static createAccessKeys(title_id: string, data: { platform: string; codes: string; }, params?: Record): AxiosPromise>; /** * List structured agent memories for a title. */ static listMemories(title_id: string, params?: Record): AxiosPromise>; /** * Update one structured agent memory. */ static updateMemory(title_id: string, memory_id: string, data?: object, params?: Record): AxiosPromise>; /** * Deactivate one structured agent memory. */ static deactivateMemory(title_id: string, memory_id: string, params?: Record): AxiosPromise>; /** * Get results and outcome summary for title agents. Returns 402 until subscription or prepaid credits are active. */ static results(title_id: string, params?: Record): AxiosPromise>; /** * Get this title's agent usage against plan limits (agents used/included, monthly runs, and * AI dollars spent vs the configured monthly AI budget). Powers usage meters and limit warnings. */ static usage(title_id: string, params?: Record): AxiosPromise>; /** * Get the prepaid agent credit balance and ledger (Pay-As-You-Go plan). */ static credits(title_id: string, params?: Record): AxiosPromise>; /** * Buy prepaid agent credits (Pay-As-You-Go). Charges the card up front; the agent draws down * credits per run and stops when they run out. data: { paymentMethod, amount_usd }. */ static purchaseCredits(title_id: string, data?: object, params?: Record): AxiosPromise>; /** * Start a Stripe-backed agent subscription after setup. */ static startTrial(title_id: string, data?: object, params?: Record): AxiosPromise>; /** * List social/ad schedulers. Useful when agent setup needs to attach to an existing workflow. */ static listSchedulers(params?: Record): AxiosPromise>; /** * Create a scheduler inline from an agent setup flow. */ static createScheduler(data?: object, params?: Record): AxiosPromise>; /** * Cross-title agency cockpit: per-title agent status, billing/credits, and portfolio totals. */ static agencyOverview(params?: Record): AxiosPromise>; /** * Unified cross-title "needs you" inbox (open guidance + pending approvals across all titles). */ static agencyInbox(params?: Record): AxiosPromise>; } export default Agents;