import { APIResource } from "../../core/resource.mjs"; import * as Shared from "../shared.mjs"; import { APIPromise } from "../../core/api-promise.mjs"; import { CursorPagination, type CursorPaginationParams, PagePromise } from "../../core/pagination.mjs"; import { RequestOptions } from "../../internal/request-options.mjs"; export declare class ToolCalls extends APIResource { /** * Lists all tool calls for an objective */ list(objectiveID: string, query?: ToolCallListParams | null | undefined, options?: RequestOptions): PagePromise; /** * When an agent attempts to use a tool that requires approval, use this endpoint * to mark it as approved. */ approve(toolCallID: string, params: ToolCallApproveParams, options?: RequestOptions): APIPromise; /** * When an agent attempts to use a tool that requires approval, use this endpoint * to mark it as denied. Use a memo to steer the LLM to a different decision or * usage of the tool. */ deny(toolCallID: string, params: ToolCallDenyParams, options?: RequestOptions): APIPromise; } export type ObjectiveToolCallsCursorPagination = CursorPagination; /** * ObjectiveToolCall is a record of a tool call made during an objective's * execution. Tool calls are mutable — their status changes as they are approved, * denied, or executed. */ export interface ObjectiveToolCall { data: ObjectiveToolCallData; /** * Metadata for ephemeral operations and activities (e.g., objectives, executions, * runs) */ metadata: Shared.OperationMetadata; /** * Current status of the tool call */ status: 'TOOL_CALL_STATUS_UNSPECIFIED' | 'TOOL_CALL_STATUS_AUTO_APPROVED' | 'TOOL_CALL_STATUS_WAITING_FOR_APPROVAL' | 'TOOL_CALL_STATUS_APPROVED' | 'TOOL_CALL_STATUS_DENIED'; info?: ObjectiveToolCallInfo; } export interface ObjectiveToolCallData { /** * CallableTool is a union that represents a tool that can be called by an agent. * In Cadenya, a tool that is used within an agent objective might be a * user-defined tool (IE: MCP, HTTP), another Agent (useful to separate context), * or a Cadenya Tool (one Cadenya provides). */ callable: Shared.CallableTool; /** * The arguments passed to the tool */ arguments?: { [key: string]: unknown; }; /** * A memo supplied by the reviewer when denying the tool call */ memo?: string; /** * The result content returned by the tool after execution */ result?: string; /** * Profile represents a human user at the account level. Profiles are * account-scoped resources that can be associated with multiple workspaces through * the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS). */ statusChangedBy?: Shared.Profile; } export interface ObjectiveToolCallInfo { /** * Profile represents a human user at the account level. Profiles are * account-scoped resources that can be associated with multiple workspaces through * the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS). */ createdBy?: Shared.Profile; /** * Metadata for ephemeral operations and activities (e.g., objectives, executions, * runs) */ objective?: Shared.OperationMetadata; } export interface ToolCallListParams extends CursorPaginationParams { /** * When set to true you may use more of your alloted API rate-limit */ includeInfo?: boolean; /** * Filter by tool call status */ status?: 'TOOL_CALL_STATUS_UNSPECIFIED' | 'TOOL_CALL_STATUS_AUTO_APPROVED' | 'TOOL_CALL_STATUS_WAITING_FOR_APPROVAL' | 'TOOL_CALL_STATUS_APPROVED' | 'TOOL_CALL_STATUS_DENIED'; } export interface ToolCallApproveParams { /** * The ID of the objective. Supports "eid:" prefix for external IDs. */ objectiveId: string; } export interface ToolCallDenyParams { /** * Path param: The ID of the objective. Supports "eid:" prefix for external IDs. */ objectiveId: string; /** * Body param: A memo to associate to the tool call denial. Use a memo to steer the * LLM to a different decision or usage of the tool. */ memo?: string; } export declare namespace ToolCalls { export { type ObjectiveToolCall as ObjectiveToolCall, type ObjectiveToolCallData as ObjectiveToolCallData, type ObjectiveToolCallInfo as ObjectiveToolCallInfo, type ObjectiveToolCallsCursorPagination as ObjectiveToolCallsCursorPagination, type ToolCallListParams as ToolCallListParams, type ToolCallApproveParams as ToolCallApproveParams, type ToolCallDenyParams as ToolCallDenyParams, }; } //# sourceMappingURL=tool-calls.d.mts.map