import { PriceAlert } from "../../alerts/v1/price_alerts_pb.js"; import { DepositAddress } from "../../chain/deposit/v1/deposit_pb.js"; import { AssetBalance, GetBalanceHistoryResponse, GetEquityHistorySeriesResponse, TransferRow } from "../../ledger/read/v1/ledger_read_pb.js"; import { Candle, Timeframe } from "../../marketdata/v1/marketdata_pb.js"; import { Side, TimeInForce, TriggerPriceSource } from "../../orders/v1/orders_pb.js"; import { Order } from "../../orders/v1/orders_read_pb.js"; import { Trigger, TriggerStatus, TriggerType } from "../../triggers/v1/triggers_pb.js"; import { JsonObject, Message as Message$1 } from "@bufbuild/protobuf"; import { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; import { Timestamp } from "@bufbuild/protobuf/wkt"; declare namespace assistant_pb_d_exports { export { ApprovalDecision, ApprovalDecisionSchema, ApprovalParameter, ApprovalParameterSchema, ApprovalRequested, ApprovalRequestedSchema, ApprovalResolved, ApprovalResolvedSchema, ApprovalStatus, ApprovalStatusSchema, AssistantKey, AssistantKeyAccount, AssistantKeyAccountSchema, AssistantKeySchema, AssistantKeyState, AssistantKeyStateSchema, AssistantService, AttachedExit, AttachedExitSchema, AttachedExits, AttachedExitsSchema, AttachedTrailingStop, AttachedTrailingStopSchema, BalanceHistoryChart, BalanceHistoryChartSchema, BalancesTable, BalancesTableSchema, CancelOrdersPreview, CancelOrdersPreviewSchema, CancelRunRequest, CancelRunRequestSchema, CancelRunResponse, CancelRunResponseSchema, CancelTriggerPreview, CancelTriggerPreviewSchema, CompleteAssistantKeysRequest, CompleteAssistantKeysRequestSchema, CompleteAssistantKeysResponse, CompleteAssistantKeysResponseSchema, Conversation, ConversationSchema, DecideApprovalRequest, DecideApprovalRequestSchema, DecideApprovalResponse, DecideApprovalResponseSchema, DeleteMemoryRequest, DeleteMemoryRequestSchema, DeleteMemoryResponse, DeleteMemoryResponseSchema, DepositAddressCard, DepositAddressCardSchema, Destination, DestinationSchema, DestinationsSuggested, DestinationsSuggestedSchema, DiscardPartial, DiscardPartialSchema, EquityHistoryChart, EquityHistoryChartSchema, ErrorCode, ErrorCodeSchema, ErrorDetail, ErrorDetailSchema, FailureCategory, FailureCategorySchema, LadderLevel, LadderLevelSchema, LadderPreview, LadderPreviewSchema, LimitOrderPreview, LimitOrderPreviewSchema, ListAssistantKeysRequest, ListAssistantKeysRequestSchema, ListAssistantKeysResponse, ListAssistantKeysResponseSchema, ListConversationsRequest, ListConversationsRequestSchema, ListConversationsResponse, ListConversationsResponseSchema, ListMemoriesRequest, ListMemoriesRequestSchema, ListMemoriesResponse, ListMemoriesResponseSchema, ListMessagesRequest, ListMessagesRequestSchema, ListMessagesResponse, ListMessagesResponseSchema, MarkdownTable, MarkdownTableRow, MarkdownTableRowSchema, MarkdownTableSchema, MarketOrderPreview, MarketOrderPreviewSchema, MemoriesRecalled, MemoriesRecalledSchema, Memory, MemoryKind, MemoryKindSchema, MemorySchema, Message, MessageRole, MessageRoleSchema, MessageSchema, OrderChange, OrderChangePreview, OrderChangePreviewSchema, OrderChangeSchema, OrderPreview, OrderPreviewSchema, OrderPriceField, OrderPriceFieldSchema, OrderToCancel, OrderToCancelSchema, OrdersTable, OrdersTableSchema, PlaceOrdersPreview, PlaceOrdersPreviewSchema, PrepareAssistantKeysRequest, PrepareAssistantKeysRequestSchema, PrepareAssistantKeysResponse, PrepareAssistantKeysResponseSchema, PreparedAssistantKey, PreparedAssistantKeySchema, PriceChart, PriceChartSchema, PriceOffsetDirection, PriceOffsetDirectionSchema, PriceRounding, PriceRoundingSchema, QuoteValue, QuoteValueSchema, RecalledMemory, RecalledMemorySchema, ReferencePrice, ReferencePriceSchema, ReferencePriceSource, ReferencePriceSourceSchema, RelativePrice, RelativePriceSchema, RunCompleted, RunCompletedSchema, RunEvent, RunEventSchema, RunFailed, RunFailedSchema, SendMessageRequest, SendMessageRequestSchema, SendMessageResponse, SendMessageResponseSchema, SkillLoaded, SkillLoadedSchema, StopOrderPreview, StopOrderPreviewSchema, SubagentFinished, SubagentFinishedSchema, SubagentStarted, SubagentStartedSchema, SwapLegPreview, SwapLegPreviewSchema, SwapPreview, SwapPreviewSchema, TextDelta, TextDeltaSchema, ToolFinished, ToolFinishedSchema, ToolStarted, ToolStartedSchema, TrailingStopPreview, TrailingStopPreviewSchema, TransfersTable, TransfersTableSchema, TriggerChangeAction, TriggerChangeActionSchema, TriggerChangePreview, TriggerChangePreviewSchema, TriggerDirection, TriggerDirectionSchema, TriggerSettings, TriggerSettingsSchema, TriggersTable, TriggersTableSchema, TwapPreview, TwapPreviewSchema, UnfilledSlicePolicy, UnfilledSlicePolicySchema, Usage, UsageSchema, View, ViewSchema, WatchRunRequest, WatchRunRequestSchema, WatchRunResponse, WatchRunResponseSchema, file_ai_v1_assistant }; } /** * Describes the file ai/v1/assistant.proto. */ declare const file_ai_v1_assistant: GenFile; /** * ErrorDetail is attached to Assistant API errors as an error detail of type * ai.v1.ErrorDetail. * * @generated from message ai.v1.ErrorDetail */ type ErrorDetail = Message$1<"ai.v1.ErrorDetail"> & { /** * Stable error code. * * @generated from field: ai.v1.ErrorCode code = 1; */ code: ErrorCode; }; /** * Describes the message ai.v1.ErrorDetail. * Use `create(ErrorDetailSchema)` to create a new message. */ declare const ErrorDetailSchema: GenMessage; /** * Conversation is one conversation of the caller with the assistant. * * @generated from message ai.v1.Conversation */ type Conversation = Message$1<"ai.v1.Conversation"> & { /** * Public conversation ID. * * @generated from field: fixed64 conversation_id = 1; */ conversationId: bigint; /** * Short title, derived from the conversation's first messages. Empty until * one is available. * * @generated from field: string title = 2; */ title: string; /** * When the conversation was started. * * @generated from field: google.protobuf.Timestamp created_at = 3; */ createdAt?: Timestamp | undefined; /** * When the latest message of the conversation was recorded. * * @generated from field: google.protobuf.Timestamp updated_at = 4; */ updatedAt?: Timestamp | undefined; }; /** * Describes the message ai.v1.Conversation. * Use `create(ConversationSchema)` to create a new message. */ declare const ConversationSchema: GenMessage; /** * Message is one message of a conversation. * * @generated from message ai.v1.Message */ type Message = Message$1<"ai.v1.Message"> & { /** * Public message ID. * * @generated from field: fixed64 message_id = 1; */ messageId: bigint; /** * Author of the message. * * @generated from field: ai.v1.MessageRole role = 2; */ role: MessageRole; /** * Message text in Markdown. For an assistant message, the final text of its * run; tool activity and views are not part of it. * * @generated from field: string text = 3; */ text: string; /** * When the message was recorded. * * @generated from field: google.protobuf.Timestamp created_at = 4; */ createdAt?: Timestamp | undefined; /** * The run the message started (user) or the run that wrote it (assistant). * Replay that run with WatchRun from after_seq 0 to show its tool activity * and views. * * @generated from field: fixed64 run_id = 5; */ runId: bigint; }; /** * Describes the message ai.v1.Message. * Use `create(MessageSchema)` to create a new message. */ declare const MessageSchema: GenMessage; /** * Memory is one fact the assistant remembers about the caller across * conversations, such as a stated preference. A corrected fact replaces the * earlier one, which is no longer listed. * * @generated from message ai.v1.Memory */ type Memory = Message$1<"ai.v1.Memory"> & { /** * Public memory ID. * * @generated from field: fixed64 memory_id = 1; */ memoryId: bigint; /** * The remembered fact, in plain text. * * @generated from field: string text = 2; */ text: string; /** * When the fact was remembered. * * @generated from field: google.protobuf.Timestamp created_at = 3; */ createdAt?: Timestamp | undefined; /** * The conversation the fact was learned in. Omitted when that conversation * is unknown. * * @generated from field: optional fixed64 conversation_id = 4; */ conversationId?: bigint | undefined; /** * What kind of fact the memory holds. * * @generated from field: ai.v1.MemoryKind kind = 5; */ kind: MemoryKind; }; /** * Describes the message ai.v1.Memory. * Use `create(MemorySchema)` to create a new message. */ declare const MemorySchema: GenMessage; /** * Usage is the language-model usage of one run, subagents included. * * @generated from message ai.v1.Usage */ type Usage = Message$1<"ai.v1.Usage"> & { /** * Input tokens processed, cached input included. * * @generated from field: uint64 input_tokens = 1; */ inputTokens: bigint; /** * Output tokens generated. * * @generated from field: uint64 output_tokens = 2; */ outputTokens: bigint; /** * Input tokens served from the prompt cache; a subset of input_tokens. * * @generated from field: uint64 cached_input_tokens = 3; */ cachedInputTokens: bigint; }; /** * Describes the message ai.v1.Usage. * Use `create(UsageSchema)` to create a new message. */ declare const UsageSchema: GenMessage; /** * OrdersTable shows the caller's orders. * * @generated from message ai.v1.OrdersTable */ type OrdersTable = Message$1<"ai.v1.OrdersTable"> & { /** * Orders in the order the assistant fetched them, usually newest first. * * @generated from field: repeated orders.v1.Order orders = 1; */ orders: Order[]; /** * True when more orders matched than the table shows. * * @generated from field: bool truncated = 2; */ truncated: boolean; /** * Trading account (subaccount) the orders were read from: the run's account, as * SendMessageRequest.subaccount_id named it. * * @generated from field: fixed64 account_id = 3; */ accountId: bigint; }; /** * Describes the message ai.v1.OrdersTable. * Use `create(OrdersTableSchema)` to create a new message. */ declare const OrdersTableSchema: GenMessage; /** * TriggersTable shows the caller's triggers: stop-losses, take-profits and * trailing stops (standalone or attached to an order), TWAPs and ladders, * with their configuration, status and progress. * * @generated from message ai.v1.TriggersTable */ type TriggersTable = Message$1<"ai.v1.TriggersTable"> & { /** * Triggers in the order the assistant fetched them, usually newest first. * Each carries the fields the assistant read: its configuration, status, * terminal reason, progress and times. subaccount_id, fee_asset, * self_trade_prevention_mode, updated_at, armed_at and version are not * set. * * @generated from field: repeated triggers.v1.Trigger triggers = 1; */ triggers: Trigger[]; /** * True when more triggers matched than the table shows. * * @generated from field: bool truncated = 2; */ truncated: boolean; /** * Trading account (subaccount) the triggers were read from: the run's account, as * SendMessageRequest.subaccount_id named it. * * @generated from field: fixed64 account_id = 3; */ accountId: bigint; }; /** * Describes the message ai.v1.TriggersTable. * Use `create(TriggersTableSchema)` to create a new message. */ declare const TriggersTableSchema: GenMessage; /** * BalancesTable shows the caller's balances. * * @generated from message ai.v1.BalancesTable */ type BalancesTable = Message$1<"ai.v1.BalancesTable"> & { /** * Balances, one per asset, highest available trading amount first. * * @generated from field: repeated ledger.read.v1.AssetBalance balances = 1; */ balances: AssetBalance[]; /** * Trading account (subaccount) the balances were read from: the run's account, as * SendMessageRequest.subaccount_id named it. * * @generated from field: fixed64 account_id = 2; */ accountId: bigint; }; /** * Describes the message ai.v1.BalancesTable. * Use `create(BalancesTableSchema)` to create a new message. */ declare const BalancesTableSchema: GenMessage; /** * PriceChart shows candles of one spot market. * * @generated from message ai.v1.PriceChart */ type PriceChart = Message$1<"ai.v1.PriceChart"> & { /** * Numeric spot market identifier; resolve its symbol with GetSpotConfig. * * @generated from field: uint32 symbol_id = 1; */ symbolId: number; /** * Timeframe of every candle. * * @generated from field: marketdata.v1.Timeframe timeframe = 2; */ timeframe: Timeframe; /** * Candles oldest first. * * @generated from field: repeated marketdata.v1.Candle candles = 3; */ candles: Candle[]; }; /** * Describes the message ai.v1.PriceChart. * Use `create(PriceChartSchema)` to create a new message. */ declare const PriceChartSchema: GenMessage; /** * MarkdownTableRow is one row of a MarkdownTable. * * @generated from message ai.v1.MarkdownTableRow */ type MarkdownTableRow = Message$1<"ai.v1.MarkdownTableRow"> & { /** * Cells in column order, each inline Markdown. * * @generated from field: repeated string cells = 1; */ cells: string[]; }; /** * Describes the message ai.v1.MarkdownTableRow. * Use `create(MarkdownTableRowSchema)` to create a new message. */ declare const MarkdownTableRowSchema: GenMessage; /** * MarkdownTable is a generic table, for example a comparison of markets. * * @generated from message ai.v1.MarkdownTable */ type MarkdownTable = Message$1<"ai.v1.MarkdownTable"> & { /** * Column headings, each inline Markdown. * * @generated from field: repeated string columns = 1; */ columns: string[]; /** * Rows in display order. A row has at most as many cells as there are * columns; missing cells are empty. * * @generated from field: repeated ai.v1.MarkdownTableRow rows = 2; */ rows: MarkdownTableRow[]; /** * True when the source had more rows than the table shows. * * @generated from field: bool truncated = 3; */ truncated: boolean; }; /** * Describes the message ai.v1.MarkdownTable. * Use `create(MarkdownTableSchema)` to create a new message. */ declare const MarkdownTableSchema: GenMessage; /** * DepositAddressCard shows one of the caller's deposit addresses, to copy. An * address takes deposits only on its own chain: show that chain's name next to * the address, and warn that sending another asset, or using another chain, * can lose the funds. * * @generated from message ai.v1.DepositAddressCard */ type DepositAddressCard = Message$1<"ai.v1.DepositAddressCard"> & { /** * The address and the chain it is assigned on. Resolve the chain's name, and * the assets it carries, with GetDepositWithdrawConfig. * * @generated from field: chain.deposit.v1.DepositAddress deposit_address = 1; */ depositAddress?: DepositAddress | undefined; /** * Public unified asset ID (AssetConfig.ledger_id) the caller asked to * deposit to this address. Omitted when the card shows the address without * one asset, for example in a list of the caller's addresses. * * @generated from field: optional uint32 asset_id = 2; */ assetId?: number | undefined; /** * Trading account (subaccount) the address belongs to: the run's account, as * SendMessageRequest.subaccount_id named it. * * @generated from field: fixed64 account_id = 3; */ accountId: bigint; }; /** * Describes the message ai.v1.DepositAddressCard. * Use `create(DepositAddressCardSchema)` to create a new message. */ declare const DepositAddressCardSchema: GenMessage; /** * BalanceHistoryChart shows how the caller's balance of each asset changed * over a window ending at the time of the run. * * @generated from message ai.v1.BalanceHistoryChart */ type BalanceHistoryChart = Message$1<"ai.v1.BalanceHistoryChart"> & { /** * The window and its series, as GetBalanceHistory returns them for the * caller's trading account. A series whose every point is zero is left out, * so an account that held nothing in the window has no series. * * @generated from field: ledger.read.v1.GetBalanceHistoryResponse history = 1; */ history?: GetBalanceHistoryResponse | undefined; /** * Trading account (subaccount) the history was read from: the run's account, as * SendMessageRequest.subaccount_id named it. * * @generated from field: fixed64 account_id = 2; */ accountId: bigint; }; /** * Describes the message ai.v1.BalanceHistoryChart. * Use `create(BalanceHistoryChartSchema)` to create a new message. */ declare const BalanceHistoryChartSchema: GenMessage; /** * EquityHistoryChart shows the value of the caller's holdings over a window * ending at the time of the run. * * @generated from message ai.v1.EquityHistoryChart */ type EquityHistoryChart = Message$1<"ai.v1.EquityHistoryChart"> & { /** * The window and its series, as GetEquityHistorySeries returns them for the * caller's trading account, grouped by account bucket or by asset. * btc_prices_q is not set. The account's total equity at a point is the sum * of every series at that point. * * @generated from field: ledger.read.v1.GetEquityHistorySeriesResponse history = 1; */ history?: GetEquityHistorySeriesResponse | undefined; /** * Trading account (subaccount) the history was read from: the run's account, as * SendMessageRequest.subaccount_id named it. * * @generated from field: fixed64 account_id = 2; */ accountId: bigint; }; /** * Describes the message ai.v1.EquityHistoryChart. * Use `create(EquityHistoryChartSchema)` to create a new message. */ declare const EquityHistoryChartSchema: GenMessage; /** * TransfersTable shows the caller's settled transfers, one row per leg. * * @generated from message ai.v1.TransfersTable */ type TransfersTable = Message$1<"ai.v1.TransfersTable"> & { /** * Transfer legs newest first, as ListTransfers returns them for the * caller's trading account. ts_us has millisecond precision. * * @generated from field: repeated ledger.read.v1.TransferRow transfers = 1; */ transfers: TransferRow[]; /** * True when more transfers matched than the table shows. * * @generated from field: bool truncated = 2; */ truncated: boolean; /** * Trading account (subaccount) the transfers were read from: the run's account, as * SendMessageRequest.subaccount_id named it. * * @generated from field: fixed64 account_id = 3; */ accountId: bigint; }; /** * Describes the message ai.v1.TransfersTable. * Use `create(TransfersTableSchema)` to create a new message. */ declare const TransfersTableSchema: GenMessage; /** * View is structured content to render in the conversation, built from the * result of a tool the assistant called, never from model-written text. * * @generated from message ai.v1.View */ type View = Message$1<"ai.v1.View"> & { /** * Exactly one kind of view. A client that does not recognize the kind, for * example one added after it was built, skips the view. * * @generated from oneof ai.v1.View.kind */ kind: { /** * The caller's orders. * * @generated from field: ai.v1.OrdersTable orders_table = 1; */ value: OrdersTable; case: "ordersTable"; } | { /** * The caller's balances. * * @generated from field: ai.v1.BalancesTable balances_table = 2; */ value: BalancesTable; case: "balancesTable"; } | { /** * Candles of one spot market. * * @generated from field: ai.v1.PriceChart price_chart = 3; */ value: PriceChart; case: "priceChart"; } | { /** * A generic table. * * @generated from field: ai.v1.MarkdownTable markdown_table = 5; */ value: MarkdownTable; case: "markdownTable"; } | { /** * One price alert of the caller, as the Price Alert API returns it. * * @generated from field: alerts.v1.PriceAlert price_alert = 6; */ value: PriceAlert; case: "priceAlert"; } | { /** * The caller's triggers. * * @generated from field: ai.v1.TriggersTable triggers_table = 7; */ value: TriggersTable; case: "triggersTable"; } | { /** * One deposit address of the caller. * * @generated from field: ai.v1.DepositAddressCard deposit_address = 8; */ value: DepositAddressCard; case: "depositAddress"; } | { /** * How the caller's balances changed over a window. * * @generated from field: ai.v1.BalanceHistoryChart balance_history_chart = 9; */ value: BalanceHistoryChart; case: "balanceHistoryChart"; } | { /** * The value of the caller's holdings over a window. * * @generated from field: ai.v1.EquityHistoryChart equity_history_chart = 10; */ value: EquityHistoryChart; case: "equityHistoryChart"; } | { /** * The caller's settled transfers. * * @generated from field: ai.v1.TransfersTable transfers_table = 11; */ value: TransfersTable; case: "transfersTable"; } | { case: undefined; value?: undefined; }; }; /** * Describes the message ai.v1.View. * Use `create(ViewSchema)` to create a new message. */ declare const ViewSchema: GenMessage; /** * TextDelta appends text to the assistant's answer. * * @generated from message ai.v1.TextDelta */ type TextDelta = Message$1<"ai.v1.TextDelta"> & { /** * Markdown text to append, in order, to the text received so far. * * @generated from field: string text = 1; */ text: string; }; /** * Describes the message ai.v1.TextDelta. * Use `create(TextDeltaSchema)` to create a new message. */ declare const TextDeltaSchema: GenMessage; /** * DiscardPartial withdraws answer text that is about to be written again. The * assistant was interrupted while writing and regenerates its answer from an * earlier point; the regenerated text follows in later TextDelta events. * * @generated from message ai.v1.DiscardPartial */ type DiscardPartial = Message$1<"ai.v1.DiscardPartial"> & { /** * Drop the text of every TextDelta of this run whose seq is equal to or * greater than this value, and received before this event. Tool, view and * other events stay. * * @generated from field: uint64 from_seq = 1; */ fromSeq: bigint; }; /** * Describes the message ai.v1.DiscardPartial. * Use `create(DiscardPartialSchema)` to create a new message. */ declare const DiscardPartialSchema: GenMessage; /** * ToolStarted reports that the assistant started a tool call. * * @generated from message ai.v1.ToolStarted */ type ToolStarted = Message$1<"ai.v1.ToolStarted"> & { /** * Identifier of the call, unique within the run. * * @generated from field: string tool_call_id = 1; */ toolCallId: string; /** * Tool name, for example "get_candles". * * @generated from field: string name = 2; */ name: string; /** * Arguments the tool was called with. * * @generated from field: google.protobuf.Struct input = 3; */ input?: JsonObject | undefined; }; /** * Describes the message ai.v1.ToolStarted. * Use `create(ToolStartedSchema)` to create a new message. */ declare const ToolStartedSchema: GenMessage; /** * ToolFinished reports the end of a tool call. Results to show arrive as View * and MemoriesRecalled events. * * @generated from message ai.v1.ToolFinished */ type ToolFinished = Message$1<"ai.v1.ToolFinished"> & { /** * Identifier of the call, as in its ToolStarted event. * * @generated from field: string tool_call_id = 1; */ toolCallId: string; /** * Tool name. * * @generated from field: string name = 2; */ name: string; /** * True when the tool succeeded. * * @generated from field: bool ok = 3; */ ok: boolean; /** * Short explanation of the failure. Omitted when ok is true. * * @generated from field: optional string error_message = 4; */ errorMessage?: string | undefined; }; /** * Describes the message ai.v1.ToolFinished. * Use `create(ToolFinishedSchema)` to create a new message. */ declare const ToolFinishedSchema: GenMessage; /** * RecalledMemory is one memory the assistant recalled during a run. * * @generated from message ai.v1.RecalledMemory */ type RecalledMemory = Message$1<"ai.v1.RecalledMemory"> & { /** * Public memory ID, as ListMemories returns it and DeleteMemory accepts it. * * @generated from field: fixed64 memory_id = 1; */ memoryId: bigint; /** * The remembered fact, in plain text. * * @generated from field: string text = 2; */ text: string; /** * What kind of fact the memory holds. * * @generated from field: ai.v1.MemoryKind kind = 3; */ kind: MemoryKind; }; /** * Describes the message ai.v1.RecalledMemory. * Use `create(RecalledMemorySchema)` to create a new message. */ declare const RecalledMemorySchema: GenMessage; /** * MemoriesRecalled reports the memories one memory search of the run * returned. The assistant searches the user's memories for their message * before it answers, and may search again while answering, each time as a * recall_memories tool call. A search returns only the memories relevant to * what it searched for, so a message unrelated to every saved memory recalls * none. Profile memories are never searched: the assistant applies them to * every answer, and they are not reported here. The event follows that call's * ToolFinished event with ok true; a failed search has a ToolFinished event * with ok false and no MemoriesRecalled event. * * @generated from message ai.v1.MemoriesRecalled */ type MemoriesRecalled = Message$1<"ai.v1.MemoriesRecalled"> & { /** * Identifier of the search's tool call, as in its ToolStarted and * ToolFinished events. * * @generated from field: string tool_call_id = 1; */ toolCallId: string; /** * The relevant memories found, at most 8, most relevant first; never a * profile memory. Empty when none is relevant. * * @generated from field: repeated ai.v1.RecalledMemory memories = 2; */ memories: RecalledMemory[]; }; /** * Describes the message ai.v1.MemoriesRecalled. * Use `create(MemoriesRecalledSchema)` to create a new message. */ declare const MemoriesRecalledSchema: GenMessage; /** * DestinationsSuggested reports the places in the client the assistant * offers the user to go to, for example to create a subaccount or change a * setting: show each as a button. The ids are those the run's SendMessage * declared in destinations; the client maps each to its own page or dialog. * The event follows the ToolFinished event, with ok true, of the * suggest_destinations call that chose them. * * @generated from message ai.v1.DestinationsSuggested */ type DestinationsSuggested = Message$1<"ai.v1.DestinationsSuggested"> & { /** * Identifier of the tool call, as in its ToolStarted and ToolFinished * events. * * @generated from field: string tool_call_id = 1; */ toolCallId: string; /** * 1 to 3 destination ids, most relevant first, each declared in the run's * SendMessage destinations. A client that no longer knows an id skips it. * * @generated from field: repeated string destination_ids = 2; */ destinationIds: string[]; }; /** * Describes the message ai.v1.DestinationsSuggested. * Use `create(DestinationsSuggestedSchema)` to create a new message. */ declare const DestinationsSuggestedSchema: GenMessage; /** * SkillLoaded reports that the assistant loaded a skill: instructions for one * kind of task. A skill grants no extra tools or permissions. * * @generated from message ai.v1.SkillLoaded */ type SkillLoaded = Message$1<"ai.v1.SkillLoaded"> & { /** * Skill name, for example "market-analysis". * * @generated from field: string name = 1; */ name: string; }; /** * Describes the message ai.v1.SkillLoaded. * Use `create(SkillLoadedSchema)` to create a new message. */ declare const SkillLoadedSchema: GenMessage; /** * SubagentStarted reports that the assistant delegated a task to a subagent, * a helper with its own instructions, tools and budget. * * @generated from message ai.v1.SubagentStarted */ type SubagentStarted = Message$1<"ai.v1.SubagentStarted"> & { /** * Identifier of the delegation, unique within the run. * * @generated from field: string subagent_id = 1; */ subagentId: string; /** * Subagent name, for example "strategy-researcher". * * @generated from field: string name = 2; */ name: string; }; /** * Describes the message ai.v1.SubagentStarted. * Use `create(SubagentStartedSchema)` to create a new message. */ declare const SubagentStartedSchema: GenMessage; /** * SubagentFinished reports the end of a delegated task. * * @generated from message ai.v1.SubagentFinished */ type SubagentFinished = Message$1<"ai.v1.SubagentFinished"> & { /** * Identifier of the delegation, as in its SubagentStarted event. * * @generated from field: string subagent_id = 1; */ subagentId: string; /** * Subagent name. * * @generated from field: string name = 2; */ name: string; /** * True when the subagent completed its task. * * @generated from field: bool ok = 3; */ ok: boolean; /** * Short summary of the subagent's result. Omitted when it has none. * * @generated from field: optional string summary = 4; */ summary?: string | undefined; }; /** * Describes the message ai.v1.SubagentFinished. * Use `create(SubagentFinishedSchema)` to create a new message. */ declare const SubagentFinishedSchema: GenMessage; /** * ApprovalParameter is one key parameter of the action an approval approves, * for example "Slice interval" and "5 s". * * @generated from message ai.v1.ApprovalParameter */ type ApprovalParameter = Message$1<"ai.v1.ApprovalParameter"> & { /** * Short label, in plain words. * * @generated from field: string label = 1; */ label: string; /** * The value, in plain words, with its unit or asset when it has one. * * @generated from field: string value = 2; */ value: string; }; /** * Describes the message ai.v1.ApprovalParameter. * Use `create(ApprovalParameterSchema)` to create a new message. */ declare const ApprovalParameterSchema: GenMessage; /** * ReferencePrice is one current market price the order preview read, to * draw the order against. * * @generated from message ai.v1.ReferencePrice */ type ReferencePrice = Message$1<"ai.v1.ReferencePrice"> & { /** * The price, an exact decimal string in the quote asset. * * @generated from field: string price = 1; */ price: string; /** * Which market price it is. * * @generated from field: ai.v1.ReferencePriceSource source = 2; */ source: ReferencePriceSource; /** * When the price was set: for LAST_PRICE the time of the market's last * trade, for the others when the assistant read it. * * @generated from field: google.protobuf.Timestamp observed_at = 3; */ observedAt?: Timestamp | undefined; }; /** * Describes the message ai.v1.ReferencePrice. * Use `create(ReferencePriceSchema)` to create a new message. */ declare const ReferencePriceSchema: GenMessage; /** * RelativePrice is a price of the order that the user gave relative to * another price, for example "10% below the current price", and that the * assistant resolved to the absolute price the order carries. The order is * placed at that absolute price, as approved, even when the reference moves * afterwards. * * @generated from message ai.v1.RelativePrice */ type RelativePrice = Message$1<"ai.v1.RelativePrice"> & { /** * Which price of the order it is. * * @generated from field: ai.v1.OrderPriceField field = 1; */ field: OrderPriceField; /** * The resolved price, an exact decimal string in the quote asset, as the * order carries it: the reference moved by offset_bps, then rounded onto * the market's tick size in the direction never worse for the order that * trades at it: down for a buy, up for a sell. An attached exit trades * the other way from its order. * * @generated from field: string price = 2; */ price: string; /** * Whether the price is above or below the reference. * * @generated from field: ai.v1.PriceOffsetDirection direction = 3; */ direction: PriceOffsetDirection; /** * The offset from the reference in basis points: 1000 is 10%. From 0 to * 10000 above the reference, from 0 to 9999 below it. Zero is the * reference itself, rounded onto the tick size as price says. A positive * offset always resolves strictly above or below the reference, as * direction says: one smaller than one tick size step is refused, never * resolved to the reference or past it. * * @generated from field: uint32 offset_bps = 4; */ offsetBps: number; /** * The price it is relative to. * * @generated from oneof ai.v1.RelativePrice.reference */ reference: { /** * A market price the assistant read: for a stop-loss, take-profit or * trailing stop the price it watches (last or index), for the others the * best ask for a buy or the best bid for a sell; for an attached exit of * a market order, that order's best ask or best bid. A reference set more * than the approval's 10-minute lifetime before the approval was * requested (a last price by its last trade) is refused. * * @generated from field: ai.v1.ReferencePrice market = 5; */ value: ReferencePrice; case: "market"; } | { /** * The order's own limit price, an exact decimal string in the quote * asset: the reference of an attached exit of a limit order. * * @generated from field: string limit_price = 6; */ value: string; case: "limitPrice"; } | { case: undefined; value?: undefined; }; /** * Which way the moved reference was rounded onto tick_size: DOWN for a * price a buy trades at, UP for a sell. * * @generated from field: ai.v1.PriceRounding rounding = 7; */ rounding: PriceRounding; /** * The market's tick size the price was rounded onto, an exact decimal * string in the quote asset. * * @generated from field: string tick_size = 8; */ tickSize: string; }; /** * Describes the message ai.v1.RelativePrice. * Use `create(RelativePriceSchema)` to create a new message. */ declare const RelativePriceSchema: GenMessage; /** * AttachedExit is an attached take-profit or stop-loss. * * @generated from message ai.v1.AttachedExit */ type AttachedExit = Message$1<"ai.v1.AttachedExit"> & { /** * The price that fires the exit, an exact decimal string in the quote * asset. * * @generated from field: string trigger_price = 1; */ triggerPrice: string; /** * The exit's limit price, an exact decimal string in the quote asset. * Omitted when the exit is a market order. * * @generated from field: optional string limit_price = 2; */ limitPrice?: string | undefined; }; /** * Describes the message ai.v1.AttachedExit. * Use `create(AttachedExitSchema)` to create a new message. */ declare const AttachedExitSchema: GenMessage; /** * AttachedTrailingStop is an attached trailing stop. * * @generated from message ai.v1.AttachedTrailingStop */ type AttachedTrailingStop = Message$1<"ai.v1.AttachedTrailingStop"> & { /** * How far the stop trails the price. * * @generated from oneof ai.v1.AttachedTrailingStop.trailing_distance */ trailingDistance: { /** * A price distance, an exact decimal string in the quote asset. * * @generated from field: string distance = 1; */ value: string; case: "distance"; } | { /** * A distance in basis points of the price: 50 is 0.5%. * * @generated from field: uint32 distance_bps = 2; */ value: number; case: "distanceBps"; } | { case: undefined; value?: undefined; }; /** * Tracking starts once the price reaches it, an exact decimal string in * the quote asset. Omitted when tracking starts at once. * * @generated from field: optional string activation_price = 3; */ activationPrice?: string | undefined; /** * The most the buy-back pays, an exact decimal string in the quote asset. * Set only when the order sells. * * @generated from field: optional string limit_price = 4; */ limitPrice?: string | undefined; }; /** * Describes the message ai.v1.AttachedTrailingStop. * Use `create(AttachedTrailingStopSchema)` to create a new message. */ declare const AttachedTrailingStopSchema: GenMessage; /** * AttachedExits are exits that protect what a market or limit order fills, * armed as it fills. They close the order's position: they sell what a buy * order bought, so a take-profit fires above and a stop-loss below the entry, * and they buy back what a sell order sold, the other way round. * * @generated from message ai.v1.AttachedExits */ type AttachedExits = Message$1<"ai.v1.AttachedExits"> & { /** * The take-profit. Omitted when there is none. * * @generated from field: ai.v1.AttachedExit take_profit = 1; */ takeProfit?: AttachedExit | undefined; /** * The stop-loss. Omitted when there is none. Never set together with * trailing_stop. * * @generated from field: ai.v1.AttachedExit stop_loss = 2; */ stopLoss?: AttachedExit | undefined; /** * The trailing stop. Omitted when there is none. * * @generated from field: ai.v1.AttachedTrailingStop trailing_stop = 3; */ trailingStop?: AttachedTrailingStop | undefined; /** * True when cancelling one exit ends the other. * * @generated from field: bool oco = 4; */ oco: boolean; }; /** * Describes the message ai.v1.AttachedExits. * Use `create(AttachedExitsSchema)` to create a new message. */ declare const AttachedExitsSchema: GenMessage; /** * MarketOrderPreview is a market order: it fills at once against the book. * * @generated from message ai.v1.MarketOrderPreview */ type MarketOrderPreview = Message$1<"ai.v1.MarketOrderPreview"> & { /** * The most the price may move against the order, in basis points: 50 is * 0.5%. Omitted when the market's default cap applies. * * @generated from field: optional uint32 max_slippage_bps = 1; */ maxSlippageBps?: number | undefined; /** * Exits attached to the order. Omitted when it has none. * * @generated from field: ai.v1.AttachedExits attached = 2; */ attached?: AttachedExits | undefined; }; /** * Describes the message ai.v1.MarketOrderPreview. * Use `create(MarketOrderPreviewSchema)` to create a new message. */ declare const MarketOrderPreviewSchema: GenMessage; /** * LimitOrderPreview is a limit order: it trades at its price or better. * * @generated from message ai.v1.LimitOrderPreview */ type LimitOrderPreview = Message$1<"ai.v1.LimitOrderPreview"> & { /** * The limit price, an exact decimal string in the quote asset. * * @generated from field: string price = 1; */ price: string; /** * GTC, GTD, IOC or FOK. * * @generated from field: orders.v1.TimeInForce time_in_force = 2; */ timeInForce: TimeInForce; /** * When a GTD order expires. Omitted for other times in force. * * @generated from field: google.protobuf.Timestamp expire_at = 3; */ expireAt?: Timestamp | undefined; /** * True when the order is refused instead of trading at once. * * @generated from field: bool post_only = 4; */ postOnly: boolean; /** * Exits attached to the order. Omitted when it has none. * * @generated from field: ai.v1.AttachedExits attached = 5; */ attached?: AttachedExits | undefined; }; /** * Describes the message ai.v1.LimitOrderPreview. * Use `create(LimitOrderPreviewSchema)` to create a new message. */ declare const LimitOrderPreviewSchema: GenMessage; /** * StopOrderPreview is a stop-loss or take-profit: it places a market or limit * order once the watched price reaches the trigger price. * * @generated from message ai.v1.StopOrderPreview */ type StopOrderPreview = Message$1<"ai.v1.StopOrderPreview"> & { /** * The price that fires it, an exact decimal string in the quote asset. * * @generated from field: string trigger_price = 1; */ triggerPrice: string; /** * The price it watches: LAST_PRICE or INDEX_PRICE. * * @generated from field: orders.v1.TriggerPriceSource trigger_price_source = 2; */ triggerPriceSource: TriggerPriceSource; /** * Which way the watched price must move to reach trigger_price. * * @generated from field: ai.v1.TriggerDirection direction = 3; */ direction: TriggerDirection; /** * The limit price of the order it places, an exact decimal string in the * quote asset. Omitted when it places a market order. * * @generated from field: optional string limit_price = 4; */ limitPrice?: string | undefined; /** * GTC, IOC or FOK for a limit order. Unspecified for a market order. * * @generated from field: orders.v1.TimeInForce time_in_force = 5; */ timeInForce: TimeInForce; /** * True when its limit order is refused instead of trading at once. * * @generated from field: bool post_only = 6; */ postOnly: boolean; /** * For a market order: the most the price may move against it, in basis * points. Omitted for a limit order, or when the market's default cap * applies. * * @generated from field: optional uint32 max_slippage_bps = 7; */ maxSlippageBps?: number | undefined; /** * True when the exchange reserves its funds when it creates it, before it * fires. OrderPreview.reserved_amount states the amount when it is set. * * @generated from field: bool funds_reserved = 8; */ fundsReserved: boolean; }; /** * Describes the message ai.v1.StopOrderPreview. * Use `create(StopOrderPreviewSchema)` to create a new message. */ declare const StopOrderPreviewSchema: GenMessage; /** * TrailingStopPreview is a trailing stop: it follows the watched price by a * distance and fires when the price reverses by that distance. A sell * tracks the highest price and sells at market; a buy tracks the lowest * price and buys with an immediate-or-cancel limit order. * * @generated from message ai.v1.TrailingStopPreview */ type TrailingStopPreview = Message$1<"ai.v1.TrailingStopPreview"> & { /** * How far the stop trails the price. * * @generated from oneof ai.v1.TrailingStopPreview.trailing_distance */ trailingDistance: { /** * A price distance, an exact decimal string in the quote asset. * * @generated from field: string distance = 1; */ value: string; case: "distance"; } | { /** * A distance in basis points of the price: 50 is 0.5%. * * @generated from field: uint32 distance_bps = 2; */ value: number; case: "distanceBps"; } | { case: undefined; value?: undefined; }; /** * Tracking starts once the price reaches it, an exact decimal string in * the quote asset. Omitted when tracking starts at once. * * @generated from field: optional string activation_price = 3; */ activationPrice?: string | undefined; /** * The price it watches: LAST_PRICE or INDEX_PRICE. * * @generated from field: orders.v1.TriggerPriceSource trigger_price_source = 4; */ triggerPriceSource: TriggerPriceSource; /** * The most a buy pays, an exact decimal string in the quote asset. Set only * for a buy. * * @generated from field: optional string limit_price = 5; */ limitPrice?: string | undefined; /** * For a sell: the most the price may move against its market order, in * basis points. Omitted when the market's default cap applies. * * @generated from field: optional uint32 max_slippage_bps = 6; */ maxSlippageBps?: number | undefined; /** * True when the exchange reserves its funds when it creates it, before it * fires. OrderPreview.reserved_amount states the amount when it is set. * * @generated from field: bool funds_reserved = 7; */ fundsReserved: boolean; }; /** * Describes the message ai.v1.TrailingStopPreview. * Use `create(TrailingStopPreviewSchema)` to create a new message. */ declare const TrailingStopPreviewSchema: GenMessage; /** * TwapPreview is a TWAP: the quantity split into slices placed at a fixed * interval. The first slice is placed at once, slice i (from 0) at * i × slice_interval_ms after it. * * @generated from message ai.v1.TwapPreview */ type TwapPreview = Message$1<"ai.v1.TwapPreview"> & { /** * Total duration in milliseconds. * * @generated from field: uint64 duration_ms = 1; */ durationMs: bigint; /** * Milliseconds between two slices. * * @generated from field: uint64 slice_interval_ms = 2; */ sliceIntervalMs: bigint; /** * Number of slices. * * @generated from field: uint32 slice_count = 3; */ sliceCount: number; /** * The first slice's quantity, an exact decimal string in the base asset: * quantity divided by slice_count, rounded down to the step size. Each * later slice is the remaining quantity divided by the remaining slices, * rounded down to the step size, so later slices may be slightly larger * and the slices add up to quantity. * * @generated from field: string slice_quantity = 4; */ sliceQuantity: string; /** * Every slice's limit price, an exact decimal string in the quote asset. * Omitted when slices are market orders. * * @generated from field: optional string limit_price = 5; */ limitPrice?: string | undefined; /** * For market slices: the most the price may move against each slice, in * basis points. Omitted for limit slices, or when the market's default cap * applies. * * @generated from field: optional uint32 max_slippage_bps = 6; */ maxSlippageBps?: number | undefined; /** * What happens to a limit slice that has not filled when the next slice is * due: CANCEL_BEFORE_NEXT. Unspecified for market slices. * * @generated from field: ai.v1.UnfilledSlicePolicy unfilled_slice_policy = 7; */ unfilledSlicePolicy: UnfilledSlicePolicy; /** * True when the first slice is placed at once, when the TWAP is created; * the later slices follow every slice_interval_ms. * * @generated from field: bool first_slice_immediate = 8; */ firstSliceImmediate: boolean; }; /** * Describes the message ai.v1.TwapPreview. * Use `create(TwapPreviewSchema)` to create a new message. */ declare const TwapPreviewSchema: GenMessage; /** * LadderLevel is one limit order of a ladder. * * @generated from message ai.v1.LadderLevel */ type LadderLevel = Message$1<"ai.v1.LadderLevel"> & { /** * Its price, an exact decimal string in the quote asset. * * @generated from field: string price = 1; */ price: string; /** * Its quantity, an exact decimal string in the base asset. * * @generated from field: string quantity = 2; */ quantity: string; }; /** * Describes the message ai.v1.LadderLevel. * Use `create(LadderLevelSchema)` to create a new message. */ declare const LadderLevelSchema: GenMessage; /** * LadderPreview is a ladder: good-till-canceled limit orders spread evenly * across a price range, all placed at once. * * @generated from message ai.v1.LadderPreview */ type LadderPreview = Message$1<"ai.v1.LadderPreview"> & { /** * The lowest level's price, an exact decimal string in the quote asset. * * @generated from field: string low_price = 1; */ lowPrice: string; /** * The highest level's price, an exact decimal string in the quote asset. * * @generated from field: string high_price = 2; */ highPrice: string; /** * Every level, lowest price first: 2 to 100. The quantity is split * equally, rounded down to the step size; the highest level gets the rest. * * @generated from field: repeated ai.v1.LadderLevel levels = 3; */ levels: LadderLevel[]; /** * True when every level is refused instead of trading at once. * * @generated from field: bool post_only = 4; */ postOnly: boolean; /** * Every level's time in force: GTC. * * @generated from field: orders.v1.TimeInForce time_in_force = 5; */ timeInForce: TimeInForce; /** * True when every level is placed at once, when the ladder is created. * * @generated from field: bool all_levels_at_once = 6; */ allLevelsAtOnce: boolean; }; /** * Describes the message ai.v1.LadderPreview. * Use `create(LadderPreviewSchema)` to create a new message. */ declare const LadderPreviewSchema: GenMessage; /** * OrderPreview is the exact order an approval places, as typed values to * draw it: a TWAP's slices on a timeline, a ladder's levels on a price axis, * a stop's trigger price against the current price. It is computed from the * exact order by the assistant's order checks, never written by the model, * and states the same order as the approval's summary and parameters. * Prices are exact decimal strings in the quote asset, quantities in the * base asset. * * @generated from message ai.v1.OrderPreview */ type OrderPreview = Message$1<"ai.v1.OrderPreview"> & { /** * Numeric spot market identifier. * * @generated from field: uint32 symbol_id = 1; */ symbolId: number; /** * Market symbol, for example "SOL-USDT". * * @generated from field: string symbol = 2; */ symbol: string; /** * Base asset, for example "SOL". * * @generated from field: string base_asset = 3; */ baseAsset: string; /** * Quote asset, for example "USDT". * * @generated from field: string quote_asset = 4; */ quoteAsset: string; /** * BUY or SELL. * * @generated from field: orders.v1.Side side = 5; */ side: Side; /** * Total quantity, an exact decimal string in the base asset. Omitted only * for a buy sized by quote_amount. * * @generated from field: optional string quantity = 6; */ quantity?: string | undefined; /** * A buy market order, or buy immediate-or-cancel limit order, sized by * spend: the most quote asset it spends, an exact decimal string. Omitted * when quantity is set. * * @generated from field: optional string quote_amount = 7; */ quoteAmount?: string | undefined; /** * Estimated order value in the quote asset, a decimal string rounded to at * most 2 decimals. Valued at: quote_amount when set; a market order or TWAP * of market slices at reference_price; a limit order, ladder level or limit * slice at its price; a stop at its limit price, else its trigger price; a * trailing stop at its limit price, else its activation price, else the last * price. Omitted when it cannot be estimated. * * @generated from field: optional string estimated_value = 8; */ estimatedValue?: string | undefined; /** * What the exchange reserves on the trading account when it creates a * stop-loss, take-profit, trailing stop or ladder: an exact decimal string, * in the base asset for a sell, in the quote asset (fee reserve included) * for a buy. Omitted for market and limit orders, which reserve as they * are placed, and for a TWAP, whose slices each use what is available when * they are due. * * @generated from field: optional string reserved_amount = 9; */ reservedAmount?: string | undefined; /** * The current market price to draw the order against: for a stop-loss, * take-profit or trailing stop the price it watches (last or index), for * the others the best ask for a buy or the best bid for a sell. Omitted * when the market has no such price. * * @generated from field: ai.v1.ReferencePrice reference_price = 10; */ referencePrice?: ReferencePrice | undefined; /** * The order type and its own values. A client that does not recognize the * kind, for example one added after it was built, shows the approval's * summary and parameters only. * * @generated from oneof ai.v1.OrderPreview.kind */ kind: { /** * A market order. * * @generated from field: ai.v1.MarketOrderPreview market = 11; */ value: MarketOrderPreview; case: "market"; } | { /** * A limit order. * * @generated from field: ai.v1.LimitOrderPreview limit = 12; */ value: LimitOrderPreview; case: "limit"; } | { /** * A stop-loss. * * @generated from field: ai.v1.StopOrderPreview stop_loss = 13; */ value: StopOrderPreview; case: "stopLoss"; } | { /** * A take-profit. * * @generated from field: ai.v1.StopOrderPreview take_profit = 14; */ value: StopOrderPreview; case: "takeProfit"; } | { /** * A trailing stop. * * @generated from field: ai.v1.TrailingStopPreview trailing_stop = 15; */ value: TrailingStopPreview; case: "trailingStop"; } | { /** * A TWAP. * * @generated from field: ai.v1.TwapPreview twap = 16; */ value: TwapPreview; case: "twap"; } | { /** * A ladder. * * @generated from field: ai.v1.LadderPreview ladder = 17; */ value: LadderPreview; case: "ladder"; } | { case: undefined; value?: undefined; }; /** * The prices the user gave relative to another price, as resolved, in the * order they appear in the order. Empty when every price was given as an * absolute price. * * @generated from field: repeated ai.v1.RelativePrice relative_prices = 18; */ relativePrices: RelativePrice[]; }; /** * Describes the message ai.v1.OrderPreview. * Use `create(OrderPreviewSchema)` to create a new message. */ declare const OrderPreviewSchema: GenMessage; /** * QuoteValue is a value in one quote asset. * * @generated from message ai.v1.QuoteValue */ type QuoteValue = Message$1<"ai.v1.QuoteValue"> & { /** * Quote asset, for example "USDT". * * @generated from field: string quote_asset = 1; */ quoteAsset: string; /** * The value, a decimal string in quote_asset rounded to at most 2 * decimals. * * @generated from field: string value = 2; */ value: string; }; /** * Describes the message ai.v1.QuoteValue. * Use `create(QuoteValueSchema)` to create a new message. */ declare const QuoteValueSchema: GenMessage; /** * PlaceOrdersPreview is the exact set of limit orders an approval places * together. The exchange may refuse some of them and accept the others. * * @generated from message ai.v1.PlaceOrdersPreview */ type PlaceOrdersPreview = Message$1<"ai.v1.PlaceOrdersPreview"> & { /** * Every order, in the order the user gave them, each as typed values with * its own estimated value and reference price. * * @generated from field: repeated ai.v1.OrderPreview orders = 1; */ orders: OrderPreview[]; /** * The estimated value of the whole set, one per quote asset, in the order * the assets first appear in orders: the exact sum of its orders' values in * that asset, then rounded. * * @generated from field: repeated ai.v1.QuoteValue total_values = 2; */ totalValues: QuoteValue[]; }; /** * Describes the message ai.v1.PlaceOrdersPreview. * Use `create(PlaceOrdersPreviewSchema)` to create a new message. */ declare const PlaceOrdersPreviewSchema: GenMessage; /** * SwapLegPreview is one spot market a swap's quote trades on. * * @generated from message ai.v1.SwapLegPreview */ type SwapLegPreview = Message$1<"ai.v1.SwapLegPreview"> & { /** * Market symbol, for example "BTC-USDT". * * @generated from field: string symbol = 1; */ symbol: string; /** * BUY or SELL: the side of the swap's order on the market. * * @generated from field: orders.v1.Side side = 2; */ side: Side; /** * Estimated average fill price, in the quote asset per base asset, as a * decimal string. Indicative: it comes from the quote's order-book depth. * * @generated from field: string average_price = 3; */ averagePrice: string; /** * Distance of average_price from the best price of the book, in basis * points: the cost of the order's size against the depth. * * @generated from field: uint32 price_impact_bps = 4; */ priceImpactBps: number; /** * The account's spot taker fee rate on the market, in percent (for example * "0.1" for 0.1%), as a decimal string. * * @generated from field: string taker_fee_rate_percent = 5; */ takerFeeRatePercent: string; /** * Estimated fee, an exact decimal string in fee_asset. * * @generated from field: string fee = 6; */ fee: string; /** * Asset the fee is charged in: the asset the leg receives. * * @generated from field: string fee_asset = 7; */ feeAsset: string; }; /** * Describes the message ai.v1.SwapLegPreview. * Use `create(SwapLegPreviewSchema)` to create a new message. */ declare const SwapLegPreviewSchema: GenMessage; /** * SwapPreview is the swap an approval executes: spend amount of source_asset * from the trading account's Trading balance and receive destination_asset * there, through the spot order books at the account's taker fee. Nothing * leaves the account. Only min_amount_out binds: what cannot trade at that * rate, and any rest smaller than one order step, stays on the account. * * @generated from message ai.v1.SwapPreview */ type SwapPreview = Message$1<"ai.v1.SwapPreview"> & { /** * Asset spent, for example "USDT". * * @generated from field: string source_asset = 1; */ sourceAsset: string; /** * Asset received, for example "BTC". * * @generated from field: string destination_asset = 2; */ destinationAsset: string; /** * Amount spent, an exact decimal string in source_asset. * * @generated from field: string amount = 3; */ amount: string; /** * Estimated amount received after fees at the quote's order-book depth, an * exact decimal string in destination_asset. Indicative. * * @generated from field: string expected_amount_out = 4; */ expectedAmountOut: string; /** * The least the swap receives after fees for the whole amount, an exact * decimal string in destination_asset. Every traded part nets at least * this rate. * * @generated from field: string min_amount_out = 5; */ minAmountOut: string; /** * The accepted shortfall of min_amount_out from expected_amount_out, in * basis points. * * @generated from field: uint32 max_slippage_bps = 6; */ maxSlippageBps: number; /** * The markets the swap trades on, in order. A direct swap has one. * * @generated from field: repeated ai.v1.SwapLegPreview legs = 7; */ legs: SwapLegPreview[]; /** * When the quote was priced. * * @generated from field: google.protobuf.Timestamp quoted_at = 8; */ quotedAt?: Timestamp | undefined; /** * The quote's expiry, 30 seconds after quoted_at. Approving after it * executes nothing: the swap is requested again for a new quote. * * @generated from field: google.protobuf.Timestamp expires_at = 9; */ expiresAt?: Timestamp | undefined; }; /** * Describes the message ai.v1.SwapPreview. * Use `create(SwapPreviewSchema)` to create a new message. */ declare const SwapPreviewSchema: GenMessage; /** * OrderToCancel is one open order a cancellation cancels, as it was when the * cancellation was requested. * * @generated from message ai.v1.OrderToCancel */ type OrderToCancel = Message$1<"ai.v1.OrderToCancel"> & { /** * Order ID. * * @generated from field: fixed64 order_id = 1; */ orderId: bigint; /** * Market symbol, for example "BTC-USDT". * * @generated from field: string symbol = 2; */ symbol: string; /** * BUY or SELL. * * @generated from field: orders.v1.Side side = 3; */ side: Side; /** * The limit price, an exact decimal string in the quote asset. Omitted for * a market order. * * @generated from field: optional string price = 4; */ price?: string | undefined; /** * Total quantity, an exact decimal string in the base asset. * * @generated from field: string quantity = 5; */ quantity: string; /** * Quantity filled so far, an exact decimal string in the base asset. * * @generated from field: string filled_quantity = 6; */ filledQuantity: string; }; /** * Describes the message ai.v1.OrderToCancel. * Use `create(OrderToCancelSchema)` to create a new message. */ declare const OrderToCancelSchema: GenMessage; /** * CancelOrdersPreview is the exact set of open orders an approval cancels: * orders named one by one, or every open order a cancel-all matches. It * cancels orders only; triggers stay active. * * @generated from message ai.v1.CancelOrdersPreview */ type CancelOrdersPreview = Message$1<"ai.v1.CancelOrdersPreview"> & { /** * Every order it cancels: a cancel-all's oldest first, otherwise in the * order the user named them. Approving cancels exactly these; an order that * matches a cancel-all after the approval is not cancelled under it. * * @generated from field: repeated ai.v1.OrderToCancel orders = 1; */ orders: OrderToCancel[]; /** * True for a cancel-all: every open order on symbols and side. * * @generated from field: bool cancel_all = 2; */ cancelAll: boolean; /** * A cancel-all's markets, for example "BTC-USDT". Empty for every market, * and for orders named one by one. * * @generated from field: repeated string symbols = 3; */ symbols: string[]; /** * A cancel-all's side, BUY or SELL. Unspecified for both sides, and for * orders named one by one. * * @generated from field: orders.v1.Side side = 4; */ side: Side; /** * A cancel-all's live triggers on its markets that stay active, as * counted when it was requested. A lower bound when * live_triggers_kept_lower_bound is true. * * @generated from field: uint32 live_triggers_kept = 5; */ liveTriggersKept: number; /** * True when live_triggers_kept counts only the live triggers read, and * more may stay active. * * @generated from field: bool live_triggers_kept_lower_bound = 6; */ liveTriggersKeptLowerBound: boolean; }; /** * Describes the message ai.v1.CancelOrdersPreview. * Use `create(CancelOrdersPreviewSchema)` to create a new message. */ declare const CancelOrdersPreviewSchema: GenMessage; /** * CancelTriggerPreview is the exact trigger an approval cancels, as it was * when the cancellation was requested. * * @generated from message ai.v1.CancelTriggerPreview */ type CancelTriggerPreview = Message$1<"ai.v1.CancelTriggerPreview"> & { /** * Trigger ID. * * @generated from field: fixed64 trigger_id = 1; */ triggerId: bigint; /** * Numeric spot market identifier. * * @generated from field: uint32 symbol_id = 2; */ symbolId: number; /** * Market symbol, for example "BTC-USDT". * * @generated from field: string symbol = 3; */ symbol: string; /** * STOP_LOSS, TAKE_PROFIT, TRAILING_STOP, TWAP or LADDER. * * @generated from field: triggers.v1.TriggerType type = 4; */ type: TriggerType; /** * BUY or SELL. * * @generated from field: orders.v1.Side side = 5; */ side: Side; /** * Its total quantity, an exact decimal string in the base asset. * * @generated from field: string quantity = 6; */ quantity: string; /** * A stop-loss's or take-profit's trigger price, or a trailing stop's * current trigger price, an exact decimal string in the quote asset. * Omitted for a TWAP or ladder, and when it has none yet. * * @generated from field: optional string trigger_price = 7; */ triggerPrice?: string | undefined; /** * A TWAP's or ladder's quantity filled so far, an exact decimal string in * the base asset. Omitted for other types. * * @generated from field: optional string filled_quantity = 8; */ filledQuantity?: string | undefined; /** * A TWAP's slices done so far. Omitted for other types. * * @generated from field: optional uint32 slices_done = 9; */ slicesDone?: number | undefined; /** * A TWAP's number of slices. Omitted for other types. * * @generated from field: optional uint32 slice_count = 10; */ sliceCount?: number | undefined; /** * A ladder's levels with at least one fill. Omitted for other types. * * @generated from field: optional uint32 levels_filled = 11; */ levelsFilled?: number | undefined; /** * A ladder's number of levels. Omitted for other types. * * @generated from field: optional uint32 level_count = 12; */ levelCount?: number | undefined; /** * True when cancelling it also cancels its open orders: a TWAP's or a * ladder's. * * @generated from field: bool cancels_open_orders = 13; */ cancelsOpenOrders: boolean; }; /** * Describes the message ai.v1.CancelTriggerPreview. * Use `create(CancelTriggerPreviewSchema)` to create a new message. */ declare const CancelTriggerPreviewSchema: GenMessage; /** * OrderChange is one open limit order a modification changes, before and * after. * * @generated from message ai.v1.OrderChange */ type OrderChange = Message$1<"ai.v1.OrderChange"> & { /** * Order ID. * * @generated from field: fixed64 order_id = 1; */ orderId: bigint; /** * BUY or SELL. * * @generated from field: orders.v1.Side side = 2; */ side: Side; /** * The limit price now, an exact decimal string in the quote asset. * * @generated from field: string price = 3; */ price: string; /** * The new limit price, an exact decimal string in the quote asset. Omitted * when the price does not change. * * @generated from field: optional string new_price = 4; */ newPrice?: string | undefined; /** * The total quantity now, filled part included, an exact decimal string in * the base asset. * * @generated from field: string quantity = 5; */ quantity: string; /** * The new total quantity, filled part included, an exact decimal string in * the base asset. Omitted when the quantity does not change. * * @generated from field: optional string new_quantity = 6; */ newQuantity?: string | undefined; /** * Quantity filled so far, an exact decimal string in the base asset. * * @generated from field: string filled_quantity = 7; */ filledQuantity: string; /** * True when the change replaces the order with a new order under a new * order ID, at the back of the queue: a new price or a larger quantity. * False when it amends the order in place, keeping its queue position. * * @generated from field: bool replaced = 8; */ replaced: boolean; }; /** * Describes the message ai.v1.OrderChange. * Use `create(OrderChangeSchema)` to create a new message. */ declare const OrderChangeSchema: GenMessage; /** * OrderChangePreview is the exact change an approval makes to open limit * orders of one market: their price or total quantity, before and after. * * @generated from message ai.v1.OrderChangePreview */ type OrderChangePreview = Message$1<"ai.v1.OrderChangePreview"> & { /** * Numeric spot market identifier. * * @generated from field: uint32 symbol_id = 1; */ symbolId: number; /** * Market symbol, for example "BTC-USDT". * * @generated from field: string symbol = 2; */ symbol: string; /** * Base asset, for example "BTC". * * @generated from field: string base_asset = 3; */ baseAsset: string; /** * Quote asset, for example "USDT". * * @generated from field: string quote_asset = 4; */ quoteAsset: string; /** * Every order it changes, in the order the user named them. * * @generated from field: repeated ai.v1.OrderChange orders = 5; */ orders: OrderChange[]; }; /** * Describes the message ai.v1.OrderChangePreview. * Use `create(OrderChangePreviewSchema)` to create a new message. */ declare const OrderChangePreviewSchema: GenMessage; /** * TriggerSettings are the settings of a stop-loss, take-profit or trailing * stop that a change can touch, with its status. * * @generated from message ai.v1.TriggerSettings */ type TriggerSettings = Message$1<"ai.v1.TriggerSettings"> & { /** * The trigger's status: PAUSED after a pause; ARMED after a resume. * * @generated from field: triggers.v1.TriggerStatus status = 1; */ status: TriggerStatus; /** * A stop-loss's or take-profit's trigger price, an exact decimal string in * the quote asset. Omitted for a trailing stop. * * @generated from field: optional string trigger_price = 2; */ triggerPrice?: string | undefined; /** * A trailing stop's distance. Unset for a stop-loss or take-profit. * * @generated from oneof ai.v1.TriggerSettings.trailing_distance */ trailingDistance: { /** * A price distance, an exact decimal string in the quote asset. * * @generated from field: string trailing_distance_price = 3; */ value: string; case: "trailingDistancePrice"; } | { /** * A distance in basis points of the price: 50 is 0.5%. * * @generated from field: uint32 trailing_distance_bps = 4; */ value: number; case: "trailingDistanceBps"; } | { case: undefined; value?: undefined; }; /** * A trailing stop's activation price, an exact decimal string in the quote * asset. Omitted when tracking starts at once. * * @generated from field: optional string activation_price = 5; */ activationPrice?: string | undefined; /** * The slippage cap of the market order it places. Unset when the market's * default cap applies, or for a limit order. * * @generated from oneof ai.v1.TriggerSettings.max_slippage */ maxSlippage: { /** * In basis points of the price: 50 is 0.5%. * * @generated from field: uint32 max_slippage_bps = 6; */ value: number; case: "maxSlippageBps"; } | { /** * A price distance, an exact decimal string in the quote asset. * * @generated from field: string max_slippage_price = 8; */ value: string; case: "maxSlippagePrice"; } | { case: undefined; value?: undefined; }; /** * The limit price of the order it places, or a buy trailing stop's most it * pays, an exact decimal string in the quote asset. Never changes. Omitted * when it places a market order. * * @generated from field: optional string limit_price = 7; */ limitPrice?: string | undefined; }; /** * Describes the message ai.v1.TriggerSettings. * Use `create(TriggerSettingsSchema)` to create a new message. */ declare const TriggerSettingsSchema: GenMessage; /** * TriggerChangePreview is the exact change an approval makes to one * stop-loss, take-profit or trailing stop: its settings before and after. * * @generated from message ai.v1.TriggerChangePreview */ type TriggerChangePreview = Message$1<"ai.v1.TriggerChangePreview"> & { /** * Trigger ID. * * @generated from field: fixed64 trigger_id = 1; */ triggerId: bigint; /** * Numeric spot market identifier. * * @generated from field: uint32 symbol_id = 2; */ symbolId: number; /** * Market symbol, for example "BTC-USDT". * * @generated from field: string symbol = 3; */ symbol: string; /** * Base asset, for example "BTC". * * @generated from field: string base_asset = 4; */ baseAsset: string; /** * Quote asset, for example "USDT". * * @generated from field: string quote_asset = 5; */ quoteAsset: string; /** * STOP_LOSS, TAKE_PROFIT or TRAILING_STOP. * * @generated from field: triggers.v1.TriggerType type = 6; */ type: TriggerType; /** * BUY or SELL. * * @generated from field: orders.v1.Side side = 7; */ side: Side; /** * Its quantity, an exact decimal string in the base asset. Never changes. * * @generated from field: string quantity = 8; */ quantity: string; /** * MODIFY, PAUSE or RESUME. * * @generated from field: ai.v1.TriggerChangeAction action = 9; */ action: TriggerChangeAction; /** * The settings now. * * @generated from field: ai.v1.TriggerSettings before = 10; */ before?: TriggerSettings | undefined; /** * The settings once the change applies. * * @generated from field: ai.v1.TriggerSettings after = 11; */ after?: TriggerSettings | undefined; /** * The price it watches, to draw its trigger price against. Omitted for a * pause, and when the market has no such price. * * @generated from field: ai.v1.ReferencePrice reference_price = 12; */ referencePrice?: ReferencePrice | undefined; /** * Which way the watched price must move to reach the trigger price. * Unspecified for a trailing stop. * * @generated from field: ai.v1.TriggerDirection direction = 13; */ direction: TriggerDirection; /** * How the change moves what the trigger reserves, an exact decimal string * in the quote asset, fee reserve included. Only a buy that places a * market order reserves at its trigger price and slippage cap, so only its * modification can move it. Unset when the reserve does not change. * * @generated from oneof ai.v1.TriggerChangePreview.reserve_change */ reserveChange: { /** * What the change reserves in addition. * * @generated from field: string reserve_increase = 14; */ value: string; case: "reserveIncrease"; } | { /** * What the change releases. * * @generated from field: string reserve_release = 15; */ value: string; case: "reserveRelease"; } | { case: undefined; value?: undefined; }; /** * True for a resume when the watched price is already past the trigger * price: the trigger fires as soon as it resumes. * * @generated from field: bool fires_on_resume = 16; */ firesOnResume: boolean; }; /** * Describes the message ai.v1.TriggerChangePreview. * Use `create(TriggerChangePreviewSchema)` to create a new message. */ declare const TriggerChangePreviewSchema: GenMessage; /** * ApprovalRequested reports that the run waits for the user to approve an * action, such as placing an order. The run continues once DecideApproval * answers it, or the approval expires. Nothing runs without an approval. * * @generated from message ai.v1.ApprovalRequested */ type ApprovalRequested = Message$1<"ai.v1.ApprovalRequested"> & { /** * Public approval ID, the argument of DecideApproval. * * @generated from field: fixed64 approval_id = 1; */ approvalId: bigint; /** * What approving does, written from the exact action, never by the model. * * @generated from field: string summary = 2; */ summary: string; /** * When the approval expires if undecided. * * @generated from field: google.protobuf.Timestamp expires_at = 3; */ expiresAt?: Timestamp | undefined; /** * The action's key parameters in display order, such as the market, side, * quantity, prices, a TWAP's duration and slices or a ladder's range, * written from the same exact action as the summary. Show them with the * summary. * * @generated from field: repeated ai.v1.ApprovalParameter parameters = 4; */ parameters: ApprovalParameter[]; /** * Trading account (subaccount) the action acts on: the run's account, as * SendMessageRequest.subaccount_id named it. * * @generated from field: fixed64 account_id = 11; */ accountId: bigint; /** * The action as typed values to draw it, from the same exact action as the * summary; approving approves exactly it. At most one is set. Omitted when * the action has no typed preview; a client that does not recognize the * preview, for example one added after it was built, shows the summary and * parameters only. * * @generated from oneof ai.v1.ApprovalRequested.preview */ preview: { /** * The order the approval places. * * @generated from field: ai.v1.OrderPreview order_preview = 5; */ value: OrderPreview; case: "orderPreview"; } | { /** * The open orders the approval cancels. * * @generated from field: ai.v1.CancelOrdersPreview cancel_orders = 6; */ value: CancelOrdersPreview; case: "cancelOrders"; } | { /** * The change the approval makes to open limit orders. * * @generated from field: ai.v1.OrderChangePreview order_change = 7; */ value: OrderChangePreview; case: "orderChange"; } | { /** * The change the approval makes to a trigger. * * @generated from field: ai.v1.TriggerChangePreview trigger_change = 8; */ value: TriggerChangePreview; case: "triggerChange"; } | { /** * The limit orders the approval places together. * * @generated from field: ai.v1.PlaceOrdersPreview place_orders = 9; */ value: PlaceOrdersPreview; case: "placeOrders"; } | { /** * The swap the approval executes within the trading account. * * @generated from field: ai.v1.SwapPreview swap = 10; */ value: SwapPreview; case: "swap"; } | { /** * The trigger the approval cancels. * * @generated from field: ai.v1.CancelTriggerPreview cancel_trigger = 12; */ value: CancelTriggerPreview; case: "cancelTrigger"; } | { case: undefined; value?: undefined; }; }; /** * Describes the message ai.v1.ApprovalRequested. * Use `create(ApprovalRequestedSchema)` to create a new message. */ declare const ApprovalRequestedSchema: GenMessage; /** * ApprovalResolved reports the final state of an approval request. * * @generated from message ai.v1.ApprovalResolved */ type ApprovalResolved = Message$1<"ai.v1.ApprovalResolved"> & { /** * Public approval ID, as in its ApprovalRequested event. * * @generated from field: fixed64 approval_id = 1; */ approvalId: bigint; /** * APPROVED, REJECTED or EXPIRED. * * @generated from field: ai.v1.ApprovalStatus status = 2; */ status: ApprovalStatus; }; /** * Describes the message ai.v1.ApprovalResolved. * Use `create(ApprovalResolvedSchema)` to create a new message. */ declare const ApprovalResolvedSchema: GenMessage; /** * RunCompleted is the last event of a run that finished its answer. * * @generated from message ai.v1.RunCompleted */ type RunCompleted = Message$1<"ai.v1.RunCompleted"> & { /** * Language-model usage of the run. * * @generated from field: ai.v1.Usage usage = 1; */ usage?: Usage | undefined; }; /** * Describes the message ai.v1.RunCompleted. * Use `create(RunCompletedSchema)` to create a new message. */ declare const RunCompletedSchema: GenMessage; /** * RunFailed is the last event of a run that ended without finishing its * answer. * * @generated from message ai.v1.RunFailed */ type RunFailed = Message$1<"ai.v1.RunFailed"> & { /** * Why the run failed. * * @generated from field: ai.v1.FailureCategory category = 1; */ category: FailureCategory; /** * Short explanation to show the user. * * @generated from field: string message = 2; */ message: string; /** * Language-model usage of the run until it failed. * * @generated from field: ai.v1.Usage usage = 3; */ usage?: Usage | undefined; }; /** * Describes the message ai.v1.RunFailed. * Use `create(RunFailedSchema)` to create a new message. */ declare const RunFailedSchema: GenMessage; /** * RunEvent is one recorded event of a run. Events are recorded before they are * sent, so a stream resumed from the last seq a client received misses and * repeats nothing. * * @generated from message ai.v1.RunEvent */ type RunEvent = Message$1<"ai.v1.RunEvent"> & { /** * Position of the event in its run: 1 for the first event, then increasing * by exactly one. * * @generated from field: uint64 seq = 1; */ seq: bigint; /** * When the event was recorded. * * @generated from field: google.protobuf.Timestamp created_at = 2; */ createdAt?: Timestamp | undefined; /** * Exactly one event. A client that does not recognize the event, for example * one added after it was built, skips it. * * @generated from oneof ai.v1.RunEvent.event */ event: { /** * Answer text to append. * * @generated from field: ai.v1.TextDelta text_delta = 3; */ value: TextDelta; case: "textDelta"; } | { /** * Answer text to withdraw before it is written again. * * @generated from field: ai.v1.DiscardPartial discard_partial = 4; */ value: DiscardPartial; case: "discardPartial"; } | { /** * A tool call started. * * @generated from field: ai.v1.ToolStarted tool_started = 5; */ value: ToolStarted; case: "toolStarted"; } | { /** * A tool call finished. * * @generated from field: ai.v1.ToolFinished tool_finished = 6; */ value: ToolFinished; case: "toolFinished"; } | { /** * A skill was loaded. * * @generated from field: ai.v1.SkillLoaded skill_loaded = 7; */ value: SkillLoaded; case: "skillLoaded"; } | { /** * A subagent started a delegated task. * * @generated from field: ai.v1.SubagentStarted subagent_started = 8; */ value: SubagentStarted; case: "subagentStarted"; } | { /** * A subagent finished its task. * * @generated from field: ai.v1.SubagentFinished subagent_finished = 9; */ value: SubagentFinished; case: "subagentFinished"; } | { /** * The run waits for an approval. * * @generated from field: ai.v1.ApprovalRequested approval_requested = 10; */ value: ApprovalRequested; case: "approvalRequested"; } | { /** * An approval was decided or expired. * * @generated from field: ai.v1.ApprovalResolved approval_resolved = 11; */ value: ApprovalResolved; case: "approvalResolved"; } | { /** * Structured content to render. * * @generated from field: ai.v1.View view = 12; */ value: View; case: "view"; } | { /** * The run finished its answer. Last event of the run. * * @generated from field: ai.v1.RunCompleted run_completed = 13; */ value: RunCompleted; case: "runCompleted"; } | { /** * The run ended without finishing its answer. Last event of the run. * * @generated from field: ai.v1.RunFailed run_failed = 14; */ value: RunFailed; case: "runFailed"; } | { /** * The memories a memory search returned. * * @generated from field: ai.v1.MemoriesRecalled memories_recalled = 15; */ value: MemoriesRecalled; case: "memoriesRecalled"; } | { /** * Places in the client the assistant offers the user to go to. * * @generated from field: ai.v1.DestinationsSuggested destinations_suggested = 16; */ value: DestinationsSuggested; case: "destinationsSuggested"; } | { case: undefined; value?: undefined; }; }; /** * Describes the message ai.v1.RunEvent. * Use `create(RunEventSchema)` to create a new message. */ declare const RunEventSchema: GenMessage; /** * AssistantKey is the assistant's key for one of the caller's accounts. The * assistant holds its private key; the API key it belongs to is listed and * revoked with the caller's other API keys. * * @generated from message ai.v1.AssistantKey */ type AssistantKey = Message$1<"ai.v1.AssistantKey"> & { /** * Subaccount the key acts on. Omitted for the main account. * * @generated from field: optional fixed64 subaccount_id = 1; */ subaccountId?: bigint | undefined; /** * Opaque identifier of the API key. * * @generated from field: string key_id = 2; */ keyId: string; /** * Ed25519 public key, 32 bytes. * * @generated from field: bytes public_key_ed25519 = 3; */ publicKeyEd25519: Uint8Array; /** * ACTIVE or DISABLED. * * @generated from field: ai.v1.AssistantKeyState state = 4; */ state: AssistantKeyState; }; /** * Describes the message ai.v1.AssistantKey. * Use `create(AssistantKeySchema)` to create a new message. */ declare const AssistantKeySchema: GenMessage; /** * AssistantKeyAccount names one account to give the assistant a key for. * * @generated from message ai.v1.AssistantKeyAccount */ type AssistantKeyAccount = Message$1<"ai.v1.AssistantKeyAccount"> & { /** * Subaccount. Omit for the main account. * * @generated from field: optional fixed64 subaccount_id = 1; */ subaccountId?: bigint | undefined; }; /** * Describes the message ai.v1.AssistantKeyAccount. * Use `create(AssistantKeyAccountSchema)` to create a new message. */ declare const AssistantKeyAccountSchema: GenMessage; /** * PreparedAssistantKey is a key pair the assistant generated for one account. * * @generated from message ai.v1.PreparedAssistantKey */ type PreparedAssistantKey = Message$1<"ai.v1.PreparedAssistantKey"> & { /** * Subaccount the key is for. Omitted for the main account. * * @generated from field: optional fixed64 subaccount_id = 1; */ subaccountId?: bigint | undefined; /** * Ed25519 public key, 32 bytes. Register it as the account's assistant key * with SetAssistantKeys. * * @generated from field: bytes public_key_ed25519 = 2; */ publicKeyEd25519: Uint8Array; /** * The key's registration proof (64 bytes). Pass it unchanged as the key's * registration_proof in SetAssistantKeys. * * @generated from field: bytes registration_proof = 3; */ registrationProof: Uint8Array; /** * The key's registration deadline. Pass it unchanged as the key's * registration_deadline in SetAssistantKeys; the key cannot be registered * after it. * * @generated from field: google.protobuf.Timestamp registration_deadline = 4; */ registrationDeadline?: Timestamp | undefined; }; /** * Describes the message ai.v1.PreparedAssistantKey. * Use `create(PreparedAssistantKeySchema)` to create a new message. */ declare const PreparedAssistantKeySchema: GenMessage; /** * Destination is one place in the client the assistant may offer the user to * go to: a page, or a dialog such as deposit or transfer. The client declares * the destinations it has with each message; the assistant suggests them by * id, and the client maps each id to its own page or dialog. * * @generated from message ai.v1.Destination */ type Destination = Message$1<"ai.v1.Destination"> & { /** * The client's id of the destination, for example "page-subaccounts": * lowercase letters, digits and hyphens, 1 to 64 characters. * * @generated from field: string id = 1; */ id: string; /** * Its name as the client shows it, for example "Subaccounts", 1 to 80 * characters. * * @generated from field: string title = 2; */ title: string; /** * What the user does there, in a few words or keywords, at most 200 * characters, for example "sub accounts, account management". The assistant * reads it to choose a destination. * * @generated from field: string description = 3; */ description: string; }; /** * Describes the message ai.v1.Destination. * Use `create(DestinationSchema)` to create a new message. */ declare const DestinationSchema: GenMessage; /** * SendMessageRequest sends the caller's message and starts a run that answers * it. * * @generated from message ai.v1.SendMessageRequest */ type SendMessageRequest = Message$1<"ai.v1.SendMessageRequest"> & { /** * Conversation to continue. Omit to start a new conversation. * * @generated from field: optional fixed64 conversation_id = 1; */ conversationId?: bigint | undefined; /** * Message text, plain text or Markdown, 1 to 16000 characters. * * @generated from field: string text = 2; */ text: string; /** * Client-chosen key, unique per caller, that makes sending idempotent: the * same key and request return the same run and conversation, also for a new * conversation; another request with the same key is IDEMPOTENCY_CONFLICT. * * @generated from field: string idempotency_key = 3; */ idempotencyKey: string; /** * Trading account (subaccount) the run reads and acts on. It must be one * the caller's account owns; any other value, also one that does not * exist, is INVALID_ARGUMENT. Omit it to answer without account data: the * run then has no account tools. It is part of the request the idempotency * key covers. * * @generated from field: optional fixed64 subaccount_id = 4; */ subaccountId?: bigint | undefined; /** * The places in the client the run may suggest to the user, at most 100, * each id at most once; their order does not matter. Omit them for a client * that cannot take the user anywhere: the run then suggests nothing. They * are part of the request the idempotency key covers. * * @generated from field: repeated ai.v1.Destination destinations = 5; */ destinations: Destination[]; }; /** * Describes the message ai.v1.SendMessageRequest. * Use `create(SendMessageRequestSchema)` to create a new message. */ declare const SendMessageRequestSchema: GenMessage; /** * SendMessageResponse identifies the started run. * * @generated from message ai.v1.SendMessageResponse */ type SendMessageResponse = Message$1<"ai.v1.SendMessageResponse"> & { /** * The run that answers the message. Follow it with WatchRun. * * @generated from field: fixed64 run_id = 1; */ runId: bigint; /** * The conversation of the message: the requested one, or the new one. * * @generated from field: fixed64 conversation_id = 2; */ conversationId: bigint; }; /** * Describes the message ai.v1.SendMessageResponse. * Use `create(SendMessageResponseSchema)` to create a new message. */ declare const SendMessageResponseSchema: GenMessage; /** * WatchRunRequest selects a run and where to resume its events. * * @generated from message ai.v1.WatchRunRequest */ type WatchRunRequest = Message$1<"ai.v1.WatchRunRequest"> & { /** * Run to watch. * * @generated from field: fixed64 run_id = 1; */ runId: bigint; /** * Return events with seq greater than this value. 0 replays the run from * its first event; to resume, pass the seq of the last event received. * * @generated from field: uint64 after_seq = 2; */ afterSeq: bigint; }; /** * Describes the message ai.v1.WatchRunRequest. * Use `create(WatchRunRequestSchema)` to create a new message. */ declare const WatchRunRequestSchema: GenMessage; /** * WatchRunResponse carries one run event. * * @generated from message ai.v1.WatchRunResponse */ type WatchRunResponse = Message$1<"ai.v1.WatchRunResponse"> & { /** * The event. * * @generated from field: ai.v1.RunEvent event = 1; */ event?: RunEvent | undefined; }; /** * Describes the message ai.v1.WatchRunResponse. * Use `create(WatchRunResponseSchema)` to create a new message. */ declare const WatchRunResponseSchema: GenMessage; /** * CancelRunRequest selects the run to cancel. * * @generated from message ai.v1.CancelRunRequest */ type CancelRunRequest = Message$1<"ai.v1.CancelRunRequest"> & { /** * Run to cancel. * * @generated from field: fixed64 run_id = 1; */ runId: bigint; }; /** * Describes the message ai.v1.CancelRunRequest. * Use `create(CancelRunRequestSchema)` to create a new message. */ declare const CancelRunRequestSchema: GenMessage; /** * CancelRunResponse confirms that the cancellation was recorded. * * @generated from message ai.v1.CancelRunResponse */ type CancelRunResponse = Message$1<"ai.v1.CancelRunResponse"> & {}; /** * Describes the message ai.v1.CancelRunResponse. * Use `create(CancelRunResponseSchema)` to create a new message. */ declare const CancelRunResponseSchema: GenMessage; /** * DecideApprovalRequest answers one approval request. * * @generated from message ai.v1.DecideApprovalRequest */ type DecideApprovalRequest = Message$1<"ai.v1.DecideApprovalRequest"> & { /** * Approval to decide, from an ApprovalRequested event. * * @generated from field: fixed64 approval_id = 1; */ approvalId: bigint; /** * The decision. * * @generated from field: ai.v1.ApprovalDecision decision = 2; */ decision: ApprovalDecision; }; /** * Describes the message ai.v1.DecideApprovalRequest. * Use `create(DecideApprovalRequestSchema)` to create a new message. */ declare const DecideApprovalRequestSchema: GenMessage; /** * DecideApprovalResponse returns the recorded state of the approval. * * @generated from message ai.v1.DecideApprovalResponse */ type DecideApprovalResponse = Message$1<"ai.v1.DecideApprovalResponse"> & { /** * APPROVED or REJECTED. * * @generated from field: ai.v1.ApprovalStatus status = 1; */ status: ApprovalStatus; }; /** * Describes the message ai.v1.DecideApprovalResponse. * Use `create(DecideApprovalResponseSchema)` to create a new message. */ declare const DecideApprovalResponseSchema: GenMessage; /** * ListConversationsRequest pages through the caller's conversations, most * recently updated first. * * @generated from message ai.v1.ListConversationsRequest */ type ListConversationsRequest = Message$1<"ai.v1.ListConversationsRequest"> & { /** * Maximum conversations to return. 0 means the default of 20; maximum 100. * * @generated from field: uint32 limit = 1; */ limit: number; /** * Opaque, keyset-backed, exclusive cursor from a previous response. Bound to * the caller, updated_at and conversation_id. * * @generated from field: string page_token = 2; */ pageToken: string; }; /** * Describes the message ai.v1.ListConversationsRequest. * Use `create(ListConversationsRequestSchema)` to create a new message. */ declare const ListConversationsRequestSchema: GenMessage; /** * ListConversationsResponse returns conversations. * * @generated from message ai.v1.ListConversationsResponse */ type ListConversationsResponse = Message$1<"ai.v1.ListConversationsResponse"> & { /** * Conversations ordered by updated_at descending, then conversation_id * descending. A conversation updated while paging moves to the front, so a * chain of pages started earlier does not return it again. * * @generated from field: repeated ai.v1.Conversation conversations = 1; */ conversations: Conversation[]; /** * Cursor for the next page. Empty when no more results exist. * * @generated from field: string next_page_token = 2; */ nextPageToken: string; }; /** * Describes the message ai.v1.ListConversationsResponse. * Use `create(ListConversationsResponseSchema)` to create a new message. */ declare const ListConversationsResponseSchema: GenMessage; /** * ListMessagesRequest pages through one conversation's messages, newest first. * * @generated from message ai.v1.ListMessagesRequest */ type ListMessagesRequest = Message$1<"ai.v1.ListMessagesRequest"> & { /** * Conversation to read. * * @generated from field: fixed64 conversation_id = 1; */ conversationId: bigint; /** * Maximum messages to return. 0 means the default of 50; maximum 200. * * @generated from field: uint32 limit = 2; */ limit: number; /** * Opaque, keyset-backed, exclusive cursor from a previous response. Bound to * the caller, the conversation, created_at and message_id. * * @generated from field: string page_token = 3; */ pageToken: string; }; /** * Describes the message ai.v1.ListMessagesRequest. * Use `create(ListMessagesRequestSchema)` to create a new message. */ declare const ListMessagesRequestSchema: GenMessage; /** * ListMessagesResponse returns messages. * * @generated from message ai.v1.ListMessagesResponse */ type ListMessagesResponse = Message$1<"ai.v1.ListMessagesResponse"> & { /** * Messages ordered by created_at descending, then message_id descending. * * @generated from field: repeated ai.v1.Message messages = 1; */ messages: Message[]; /** * Cursor for the next page. Empty when no more results exist. * * @generated from field: string next_page_token = 2; */ nextPageToken: string; }; /** * Describes the message ai.v1.ListMessagesResponse. * Use `create(ListMessagesResponseSchema)` to create a new message. */ declare const ListMessagesResponseSchema: GenMessage; /** * ListMemoriesRequest pages through the caller's memories, newest first. * * @generated from message ai.v1.ListMemoriesRequest */ type ListMemoriesRequest = Message$1<"ai.v1.ListMemoriesRequest"> & { /** * Maximum memories to return. 0 means the default of 50; maximum 200. * * @generated from field: uint32 limit = 1; */ limit: number; /** * Opaque, keyset-backed, exclusive cursor from a previous response. Bound to * the caller, created_at and memory_id. * * @generated from field: string page_token = 2; */ pageToken: string; }; /** * Describes the message ai.v1.ListMemoriesRequest. * Use `create(ListMemoriesRequestSchema)` to create a new message. */ declare const ListMemoriesRequestSchema: GenMessage; /** * ListMemoriesResponse returns memories. * * @generated from message ai.v1.ListMemoriesResponse */ type ListMemoriesResponse = Message$1<"ai.v1.ListMemoriesResponse"> & { /** * Memories ordered by created_at descending, then memory_id descending. * * @generated from field: repeated ai.v1.Memory memories = 1; */ memories: Memory[]; /** * Cursor for the next page. Empty when no more results exist. * * @generated from field: string next_page_token = 2; */ nextPageToken: string; }; /** * Describes the message ai.v1.ListMemoriesResponse. * Use `create(ListMemoriesResponseSchema)` to create a new message. */ declare const ListMemoriesResponseSchema: GenMessage; /** * DeleteMemoryRequest selects the memory to forget. * * @generated from message ai.v1.DeleteMemoryRequest */ type DeleteMemoryRequest = Message$1<"ai.v1.DeleteMemoryRequest"> & { /** * Memory to delete. * * @generated from field: fixed64 memory_id = 1; */ memoryId: bigint; }; /** * Describes the message ai.v1.DeleteMemoryRequest. * Use `create(DeleteMemoryRequestSchema)` to create a new message. */ declare const DeleteMemoryRequestSchema: GenMessage; /** * DeleteMemoryResponse confirms the deletion. * * @generated from message ai.v1.DeleteMemoryResponse */ type DeleteMemoryResponse = Message$1<"ai.v1.DeleteMemoryResponse"> & {}; /** * Describes the message ai.v1.DeleteMemoryResponse. * Use `create(DeleteMemoryResponseSchema)` to create a new message. */ declare const DeleteMemoryResponseSchema: GenMessage; /** * PrepareAssistantKeysRequest names the accounts to give the assistant keys * for. * * @generated from message ai.v1.PrepareAssistantKeysRequest */ type PrepareAssistantKeysRequest = Message$1<"ai.v1.PrepareAssistantKeysRequest"> & { /** * 1 to 64 accounts, each at most once. * * @generated from field: repeated ai.v1.AssistantKeyAccount accounts = 1; */ accounts: AssistantKeyAccount[]; }; /** * Describes the message ai.v1.PrepareAssistantKeysRequest. * Use `create(PrepareAssistantKeysRequestSchema)` to create a new message. */ declare const PrepareAssistantKeysRequestSchema: GenMessage; /** * PrepareAssistantKeysResponse returns the public keys to register. * * @generated from message ai.v1.PrepareAssistantKeysResponse */ type PrepareAssistantKeysResponse = Message$1<"ai.v1.PrepareAssistantKeysResponse"> & { /** * The setup, the argument of CompleteAssistantKeys. * * @generated from field: fixed64 setup_id = 1; */ setupId: bigint; /** * One key per requested account, in request order. * * @generated from field: repeated ai.v1.PreparedAssistantKey keys = 2; */ keys: PreparedAssistantKey[]; /** * The keys' registration deadline: register them with SetAssistantKeys * before this time. After it, they cannot be registered. * * @generated from field: google.protobuf.Timestamp expires_at = 3; */ expiresAt?: Timestamp | undefined; }; /** * Describes the message ai.v1.PrepareAssistantKeysResponse. * Use `create(PrepareAssistantKeysResponseSchema)` to create a new message. */ declare const PrepareAssistantKeysResponseSchema: GenMessage; /** * CompleteAssistantKeysRequest selects the setup whose keys were registered. * * @generated from message ai.v1.CompleteAssistantKeysRequest */ type CompleteAssistantKeysRequest = Message$1<"ai.v1.CompleteAssistantKeysRequest"> & { /** * Setup from PrepareAssistantKeysResponse. * * @generated from field: fixed64 setup_id = 1; */ setupId: bigint; }; /** * Describes the message ai.v1.CompleteAssistantKeysRequest. * Use `create(CompleteAssistantKeysRequestSchema)` to create a new message. */ declare const CompleteAssistantKeysRequestSchema: GenMessage; /** * CompleteAssistantKeysResponse returns the keys the assistant now uses. * * @generated from message ai.v1.CompleteAssistantKeysResponse */ type CompleteAssistantKeysResponse = Message$1<"ai.v1.CompleteAssistantKeysResponse"> & { /** * The caller's assistant keys the assistant holds, oldest first. * * @generated from field: repeated ai.v1.AssistantKey keys = 1; */ keys: AssistantKey[]; }; /** * Describes the message ai.v1.CompleteAssistantKeysResponse. * Use `create(CompleteAssistantKeysResponseSchema)` to create a new message. */ declare const CompleteAssistantKeysResponseSchema: GenMessage; /** * ListAssistantKeysRequest lists the assistant keys the assistant holds. * * @generated from message ai.v1.ListAssistantKeysRequest */ type ListAssistantKeysRequest = Message$1<"ai.v1.ListAssistantKeysRequest"> & {}; /** * Describes the message ai.v1.ListAssistantKeysRequest. * Use `create(ListAssistantKeysRequestSchema)` to create a new message. */ declare const ListAssistantKeysRequestSchema: GenMessage; /** * ListAssistantKeysResponse returns the assistant keys the assistant holds. * * @generated from message ai.v1.ListAssistantKeysResponse */ type ListAssistantKeysResponse = Message$1<"ai.v1.ListAssistantKeysResponse"> & { /** * The caller's assistant keys the assistant holds, oldest first, at most * one per account. * * @generated from field: repeated ai.v1.AssistantKey keys = 1; */ keys: AssistantKey[]; }; /** * Describes the message ai.v1.ListAssistantKeysResponse. * Use `create(ListAssistantKeysResponseSchema)` to create a new message. */ declare const ListAssistantKeysResponseSchema: GenMessage; /** * ErrorCode identifies an Assistant API error. * * @generated from enum ai.v1.ErrorCode */ declare enum ErrorCode { /** * No code. * * @generated from enum value: ERROR_UNSPECIFIED = 0; */ ERROR_UNSPECIFIED = 0, /** * No conversation of the caller has this ID. * * @generated from enum value: CONVERSATION_NOT_FOUND = 1; */ CONVERSATION_NOT_FOUND = 1, /** * No run of the caller has this ID. * * @generated from enum value: RUN_NOT_FOUND = 2; */ RUN_NOT_FOUND = 2, /** * No approval of the caller has this ID. * * @generated from enum value: APPROVAL_NOT_FOUND = 3; */ APPROVAL_NOT_FOUND = 3, /** * No memory of the caller has this ID. * * @generated from enum value: MEMORY_NOT_FOUND = 4; */ MEMORY_NOT_FOUND = 4, /** * The conversation already has an active run. Wait for it to end, or cancel * it, before sending another message. * * @generated from enum value: RUN_ACTIVE = 5; */ RUN_ACTIVE = 5, /** * The idempotency key was already used with a different request. The * original run stands. * * @generated from enum value: IDEMPOTENCY_CONFLICT = 6; */ IDEMPOTENCY_CONFLICT = 6, /** * The approval was already decided the other way. The first decision * stands. * * @generated from enum value: APPROVAL_ALREADY_DECIDED = 7; */ APPROVAL_ALREADY_DECIDED = 7, /** * The approval expired before it was decided. Nothing was executed. * * @generated from enum value: APPROVAL_EXPIRED = 8; */ APPROVAL_EXPIRED = 8, /** * The caller sent too many messages or used up their assistant allowance; * retry later. * * @generated from enum value: USAGE_LIMIT_REACHED = 9; */ USAGE_LIMIT_REACHED = 9, /** * A required service is temporarily unavailable; retry the same request. * * @generated from enum value: SERVICE_UNAVAILABLE = 10; */ SERVICE_UNAVAILABLE = 10, /** * No pending key setup of the caller has this ID: it was never prepared, * it expired without being registered, or a later setup replaced it. * Prepare the keys again. * * @generated from enum value: KEY_SETUP_NOT_FOUND = 11; */ KEY_SETUP_NOT_FOUND = 11, /** * The setup's public keys are not registered as the caller's assistant * keys: they were not submitted yet, or their registration was refused. * Nothing changed. * * @generated from enum value: KEY_SETUP_NOT_REGISTERED = 12; */ KEY_SETUP_NOT_REGISTERED = 12 } /** * Describes the enum ai.v1.ErrorCode. */ declare const ErrorCodeSchema: GenEnum; /** * MessageRole is the author of a conversation message. * * @generated from enum ai.v1.MessageRole */ declare enum MessageRole { /** * Not set. Never returned. * * @generated from enum value: ROLE_UNSPECIFIED = 0; */ ROLE_UNSPECIFIED = 0, /** * The user. * * @generated from enum value: USER = 1; */ USER = 1, /** * The assistant. * * @generated from enum value: ASSISTANT = 2; */ ASSISTANT = 2 } /** * Describes the enum ai.v1.MessageRole. */ declare const MessageRoleSchema: GenEnum; /** * FailureCategory classifies why a run failed. * * @generated from enum ai.v1.FailureCategory */ declare enum FailureCategory { /** * Not set. Never returned. * * @generated from enum value: FAILURE_UNSPECIFIED = 0; */ FAILURE_UNSPECIFIED = 0, /** * The run was cancelled with CancelRun. * * @generated from enum value: CANCELLED = 1; */ CANCELLED = 1, /** * The run reached its step or usage budget before it could finish. * * @generated from enum value: BUDGET_EXCEEDED = 2; */ BUDGET_EXCEEDED = 2, /** * The run needed an action the caller is not permitted to take. * * @generated from enum value: PERMISSION_DENIED = 3; */ PERMISSION_DENIED = 3, /** * The language model was unavailable and the run could not continue; send * the message again later. * * @generated from enum value: MODEL_UNAVAILABLE = 4; */ MODEL_UNAVAILABLE = 4, /** * The run could not continue because of an unexpected error. * * @generated from enum value: UNEXPECTED_ERROR = 5; */ UNEXPECTED_ERROR = 5 } /** * Describes the enum ai.v1.FailureCategory. */ declare const FailureCategorySchema: GenEnum; /** * ApprovalDecision is the user's answer to an approval request. * * @generated from enum ai.v1.ApprovalDecision */ declare enum ApprovalDecision { /** * Not set. Rejected in requests. * * @generated from enum value: DECISION_UNSPECIFIED = 0; */ DECISION_UNSPECIFIED = 0, /** * Approve: the action runs exactly as summarized. * * @generated from enum value: APPROVE = 1; */ APPROVE = 1, /** * Reject: the action does not run. * * @generated from enum value: REJECT = 2; */ REJECT = 2 } /** * Describes the enum ai.v1.ApprovalDecision. */ declare const ApprovalDecisionSchema: GenEnum; /** * ApprovalStatus is the state of an approval request. * * @generated from enum ai.v1.ApprovalStatus */ declare enum ApprovalStatus { /** * Not set. Never returned. * * @generated from enum value: APPROVAL_UNSPECIFIED = 0; */ APPROVAL_UNSPECIFIED = 0, /** * Waiting for a decision. * * @generated from enum value: PENDING = 1; */ PENDING = 1, /** * Approved by the user. * * @generated from enum value: APPROVED = 2; */ APPROVED = 2, /** * Rejected by the user. * * @generated from enum value: REJECTED = 3; */ REJECTED = 3, /** * Expired before a decision; the action did not run. * * @generated from enum value: EXPIRED = 4; */ EXPIRED = 4 } /** * Describes the enum ai.v1.ApprovalStatus. */ declare const ApprovalStatusSchema: GenEnum; /** * MemoryKind is what kind of fact a memory holds. * * @generated from enum ai.v1.MemoryKind */ declare enum MemoryKind { /** * Not set. Never returned. * * @generated from enum value: KIND_UNSPECIFIED = 0; */ KIND_UNSPECIFIED = 0, /** * A lasting fact or preference the user stated about themselves. * * @generated from enum value: FACT = 1; */ FACT = 1, /** * A figure the user stated for their own planning, such as the account size * they plan risk against. It is never a balance. * * @generated from enum value: PLANNING_FIGURE = 2; */ PLANNING_FIGURE = 2, /** * A standing preference for how the assistant addresses and talks to the * user, such as the name to use, the language, the tone and length of * answers, or how risks are explained. The assistant applies every profile * memory to every answer, so it is never searched and never appears in a * MemoriesRecalled event. A user holds at most 10 profile memories. * * @generated from enum value: PROFILE = 3; */ PROFILE = 3 } /** * Describes the enum ai.v1.MemoryKind. */ declare const MemoryKindSchema: GenEnum; /** * AssistantKeyState is the state of an assistant key the assistant holds. * * @generated from enum ai.v1.AssistantKeyState */ declare enum AssistantKeyState { /** * Not set. Never returned. * * @generated from enum value: KEY_STATE_UNSPECIFIED = 0; */ KEY_STATE_UNSPECIFIED = 0, /** * The assistant uses the key for its account. * * @generated from enum value: ACTIVE = 1; */ ACTIVE = 1, /** * The key was disabled when the assistant last checked it. The assistant * keeps it and uses it again once it is enabled. * * @generated from enum value: DISABLED = 2; */ DISABLED = 2 } /** * Describes the enum ai.v1.AssistantKeyState. */ declare const AssistantKeyStateSchema: GenEnum; /** * ReferencePriceSource names the market price a ReferencePrice is. * * @generated from enum ai.v1.ReferencePriceSource */ declare enum ReferencePriceSource { /** * Not set. Never returned. * * @generated from enum value: PRICE_SOURCE_UNSPECIFIED = 0; */ PRICE_SOURCE_UNSPECIFIED = 0, /** * The best bid: the highest price a resting buy order offers. * * @generated from enum value: BEST_BID = 1; */ BEST_BID = 1, /** * The best ask: the lowest price a resting sell order offers. * * @generated from enum value: BEST_ASK = 2; */ BEST_ASK = 2, /** * The price of the market's last trade. * * @generated from enum value: LAST_PRICE = 3; */ LAST_PRICE = 3, /** * The market's index price, aggregated from external exchanges. * * @generated from enum value: INDEX_PRICE = 4; */ INDEX_PRICE = 4 } /** * Describes the enum ai.v1.ReferencePriceSource. */ declare const ReferencePriceSourceSchema: GenEnum; /** * TriggerDirection is which way the watched price must move to fire a * trigger. * * @generated from enum ai.v1.TriggerDirection */ declare enum TriggerDirection { /** * Not set. Never returned. * * @generated from enum value: DIRECTION_UNSPECIFIED = 0; */ DIRECTION_UNSPECIFIED = 0, /** * Fires when the watched price rises to or above the trigger price. * * @generated from enum value: AT_OR_ABOVE = 1; */ AT_OR_ABOVE = 1, /** * Fires when the watched price falls to or below the trigger price. * * @generated from enum value: AT_OR_BELOW = 2; */ AT_OR_BELOW = 2 } /** * Describes the enum ai.v1.TriggerDirection. */ declare const TriggerDirectionSchema: GenEnum; /** * OrderPriceField names one price of an order. * * @generated from enum ai.v1.OrderPriceField */ declare enum OrderPriceField { /** * Not set. Never returned. * * @generated from enum value: PRICE_FIELD_UNSPECIFIED = 0; */ PRICE_FIELD_UNSPECIFIED = 0, /** * The limit price: of a limit order, of a stop-loss or take-profit's limit * order, of a TWAP's limit slices; the most a buying trailing stop pays. * * @generated from enum value: LIMIT_PRICE = 1; */ LIMIT_PRICE = 1, /** * A stop-loss or take-profit's trigger price. * * @generated from enum value: TRIGGER_PRICE = 2; */ TRIGGER_PRICE = 2, /** * A trailing stop's activation price. * * @generated from enum value: ACTIVATION_PRICE = 3; */ ACTIVATION_PRICE = 3, /** * A ladder's lowest level price. * * @generated from enum value: LADDER_LOW_PRICE = 4; */ LADDER_LOW_PRICE = 4, /** * A ladder's highest level price. * * @generated from enum value: LADDER_HIGH_PRICE = 5; */ LADDER_HIGH_PRICE = 5, /** * An attached take-profit's trigger price. * * @generated from enum value: TAKE_PROFIT_TRIGGER_PRICE = 6; */ TAKE_PROFIT_TRIGGER_PRICE = 6, /** * An attached take-profit's limit exit price. * * @generated from enum value: TAKE_PROFIT_LIMIT_PRICE = 7; */ TAKE_PROFIT_LIMIT_PRICE = 7, /** * An attached stop-loss's trigger price. * * @generated from enum value: STOP_LOSS_TRIGGER_PRICE = 8; */ STOP_LOSS_TRIGGER_PRICE = 8, /** * An attached stop-loss's limit exit price. * * @generated from enum value: STOP_LOSS_LIMIT_PRICE = 9; */ STOP_LOSS_LIMIT_PRICE = 9, /** * An attached trailing stop's activation price. * * @generated from enum value: TRAILING_STOP_ACTIVATION_PRICE = 10; */ TRAILING_STOP_ACTIVATION_PRICE = 10, /** * The most an attached trailing stop's buy-back pays. * * @generated from enum value: TRAILING_STOP_LIMIT_PRICE = 11; */ TRAILING_STOP_LIMIT_PRICE = 11 } /** * Describes the enum ai.v1.OrderPriceField. */ declare const OrderPriceFieldSchema: GenEnum; /** * PriceOffsetDirection is which side of its reference a relative price is. * * @generated from enum ai.v1.PriceOffsetDirection */ declare enum PriceOffsetDirection { /** * Not set. Never returned. * * @generated from enum value: OFFSET_DIRECTION_UNSPECIFIED = 0; */ OFFSET_DIRECTION_UNSPECIFIED = 0, /** * Above the reference. * * @generated from enum value: ABOVE = 1; */ ABOVE = 1, /** * Below the reference. * * @generated from enum value: BELOW = 2; */ BELOW = 2 } /** * Describes the enum ai.v1.PriceOffsetDirection. */ declare const PriceOffsetDirectionSchema: GenEnum; /** * PriceRounding is which way a resolved price was rounded onto the market's * tick size. * * @generated from enum ai.v1.PriceRounding */ declare enum PriceRounding { /** * Not set. Never returned. * * @generated from enum value: ROUNDING_UNSPECIFIED = 0; */ ROUNDING_UNSPECIFIED = 0, /** * Down to the tick below: a price a buy trades at. * * @generated from enum value: DOWN = 1; */ DOWN = 1, /** * Up to the tick above: a price a sell trades at. * * @generated from enum value: UP = 2; */ UP = 2 } /** * Describes the enum ai.v1.PriceRounding. */ declare const PriceRoundingSchema: GenEnum; /** * UnfilledSlicePolicy is what a TWAP does with a slice that has not filled * when the next slice is due. * * @generated from enum ai.v1.UnfilledSlicePolicy */ declare enum UnfilledSlicePolicy { /** * Not set: the slices are market orders, immediate or cancel. * * @generated from enum value: UNFILLED_SLICE_UNSPECIFIED = 0; */ UNFILLED_SLICE_UNSPECIFIED = 0, /** * What is left of the slice is canceled before the next slice is placed. * * @generated from enum value: CANCEL_BEFORE_NEXT = 1; */ CANCEL_BEFORE_NEXT = 1 } /** * Describes the enum ai.v1.UnfilledSlicePolicy. */ declare const UnfilledSlicePolicySchema: GenEnum; /** * TriggerChangeAction is what an approval does to a trigger. * * @generated from enum ai.v1.TriggerChangeAction */ declare enum TriggerChangeAction { /** * Not set. Never returned. * * @generated from enum value: TRIGGER_CHANGE_UNSPECIFIED = 0; */ TRIGGER_CHANGE_UNSPECIFIED = 0, /** * Changes its trigger price, trailing distance, activation price or * slippage cap. * * @generated from enum value: MODIFY = 1; */ MODIFY = 1, /** * Pauses it: it keeps its settings and reserve but does not fire. * * @generated from enum value: PAUSE = 2; */ PAUSE = 2, /** * Resumes a paused trigger. * * @generated from enum value: RESUME = 3; */ RESUME = 3 } /** * Describes the enum ai.v1.TriggerChangeAction. */ declare const TriggerChangeActionSchema: GenEnum; /** * AssistantService is the Polyester trading assistant. A user sends a * message, which starts a run: the assistant's answer, with the tools, * skills and subagents it uses. The run continues on the server when no * client watches it, and its events can be replayed and resumed with * WatchRun. * * Requests are authenticated with a session token. Every conversation, run, * approval and memory belongs to the authenticated user; another user's * resource is reported exactly as a missing one. The assistant reads the * user's account data with the user's own permissions, and an action that * changes the account, such as placing an order, runs only after the user * approves it with DecideApproval. * * @generated from service ai.v1.AssistantService */ declare const AssistantService: GenService<{ /** * SendMessage records the caller's message and starts a run that answers * it. It returns once the run is recorded; follow the run with WatchRun. A * conversation runs one run at a time. It is idempotent per caller and key: * repeat the request unchanged to resolve an unknown outcome. * * Errors: * - INVALID_ARGUMENT: malformed request. * - NOT_FOUND: CONVERSATION_NOT_FOUND. * - FAILED_PRECONDITION: RUN_ACTIVE; nothing is recorded. * - ALREADY_EXISTS: IDEMPOTENCY_CONFLICT; the original run stands. * - RESOURCE_EXHAUSTED: USAGE_LIMIT_REACHED; retry later. * - UNAVAILABLE, DEADLINE_EXCEEDED: SERVICE_UNAVAILABLE or an unknown * outcome; retry the same request. * - UNAUTHENTICATED: missing or invalid credentials. * * @generated from rpc ai.v1.AssistantService.SendMessage */ sendMessage: { methodKind: "unary"; input: typeof SendMessageRequestSchema; output: typeof SendMessageResponseSchema; }; /** * WatchRun streams a run's events in seq order: first the recorded events * after after_seq, then new events as they are recorded. The stream ends * after the run's last event, RunCompleted or RunFailed; watching an ended * run replays its events and ends. The server may also end the stream * early, for example during maintenance: reconnect with the seq of the last * event received to continue without gaps or repeats. Watching does not * keep a run alive, and a run continues when nobody watches it. * * Errors: * - INVALID_ARGUMENT: malformed request. * - NOT_FOUND: RUN_NOT_FOUND. * - UNAVAILABLE: SERVICE_UNAVAILABLE; reconnect with the last seq. * - UNAUTHENTICATED: missing or invalid credentials. * * @generated from rpc ai.v1.AssistantService.WatchRun */ watchRun: { methodKind: "server_streaming"; input: typeof WatchRunRequestSchema; output: typeof WatchRunResponseSchema; }; /** * CancelRun asks an active run to stop. It returns once the request is * recorded; the run then ends with RunFailed and category CANCELLED, and its * subagents stop too. A pending approval of the run expires. Cancelling a * run that already ended changes nothing and succeeds. * * Errors: * - INVALID_ARGUMENT: malformed request. * - NOT_FOUND: RUN_NOT_FOUND. * - UNAVAILABLE: SERVICE_UNAVAILABLE; retry the same request. * - UNAUTHENTICATED: missing or invalid credentials. * * @generated from rpc ai.v1.AssistantService.CancelRun */ cancelRun: { methodKind: "unary"; input: typeof CancelRunRequestSchema; output: typeof CancelRunResponseSchema; }; /** * DecideApproval approves or rejects a pending approval request of one of * the caller's runs. An approved action runs exactly as its summary says, * at most once. Repeating the same decision returns the recorded state. * * Errors: * - INVALID_ARGUMENT: malformed request. * - NOT_FOUND: APPROVAL_NOT_FOUND. * - FAILED_PRECONDITION: APPROVAL_ALREADY_DECIDED or APPROVAL_EXPIRED. * - UNAVAILABLE, DEADLINE_EXCEEDED: SERVICE_UNAVAILABLE or an unknown * outcome; retry the same request. * - UNAUTHENTICATED: missing or invalid credentials. * * @generated from rpc ai.v1.AssistantService.DecideApproval */ decideApproval: { methodKind: "unary"; input: typeof DecideApprovalRequestSchema; output: typeof DecideApprovalResponseSchema; }; /** * ListConversations lists the caller's conversations, most recently updated * first. * * Errors: * - INVALID_ARGUMENT: malformed request or page token. * - UNAVAILABLE: SERVICE_UNAVAILABLE; retry later. * - UNAUTHENTICATED: missing or invalid credentials. * * @generated from rpc ai.v1.AssistantService.ListConversations */ listConversations: { methodKind: "unary"; input: typeof ListConversationsRequestSchema; output: typeof ListConversationsResponseSchema; }; /** * ListMessages lists the messages of one of the caller's conversations, * newest first. * * Errors: * - INVALID_ARGUMENT: malformed request or page token. * - NOT_FOUND: CONVERSATION_NOT_FOUND. * - UNAVAILABLE: SERVICE_UNAVAILABLE; retry later. * - UNAUTHENTICATED: missing or invalid credentials. * * @generated from rpc ai.v1.AssistantService.ListMessages */ listMessages: { methodKind: "unary"; input: typeof ListMessagesRequestSchema; output: typeof ListMessagesResponseSchema; }; /** * ListMemories lists what the assistant remembers about the caller, newest * first. Each memory carries its kind: a PROFILE memory applies to every * answer, the others are used when relevant to a message. * * Errors: * - INVALID_ARGUMENT: malformed request or page token. * - UNAVAILABLE: SERVICE_UNAVAILABLE; retry later. * - UNAUTHENTICATED: missing or invalid credentials. * * @generated from rpc ai.v1.AssistantService.ListMemories */ listMemories: { methodKind: "unary"; input: typeof ListMemoriesRequestSchema; output: typeof ListMemoriesResponseSchema; }; /** * DeleteMemory makes the assistant forget one memory. Later runs no longer * use it. Deleting a memory that is already deleted succeeds. * * Errors: * - INVALID_ARGUMENT: malformed request. * - NOT_FOUND: MEMORY_NOT_FOUND. * - UNAVAILABLE: SERVICE_UNAVAILABLE; retry the same request. * - UNAUTHENTICATED: missing or invalid credentials. * * @generated from rpc ai.v1.AssistantService.DeleteMemory */ deleteMemory: { methodKind: "unary"; input: typeof DeleteMemoryRequestSchema; output: typeof DeleteMemoryResponseSchema; }; /** * PrepareAssistantKeys starts setting up the keys the assistant acts with: * it generates one Ed25519 key pair per account, keeps the private keys, * and returns the public keys with their registration proofs and deadline. * Then register them, with the policy of each account, in one * SetAssistantKeys request with a fresh step-up proof before the deadline, * and call CompleteAssistantKeys. The step-up proof goes to * SetAssistantKeys only, never to the assistant. A setup replaces no key * until it is registered. * * Errors: * - INVALID_ARGUMENT: malformed request, or an account named twice. * - RESOURCE_EXHAUSTED: USAGE_LIMIT_REACHED; too many setups are pending. * Complete one or wait until it expires. * - UNAVAILABLE: SERVICE_UNAVAILABLE; retry the request. * - UNAUTHENTICATED: missing or invalid credentials. * * @generated from rpc ai.v1.AssistantService.PrepareAssistantKeys */ prepareAssistantKeys: { methodKind: "unary"; input: typeof PrepareAssistantKeysRequestSchema; output: typeof PrepareAssistantKeysResponseSchema; }; /** * CompleteAssistantKeys finishes a setup once SetAssistantKeys registered * its public keys: the assistant starts using them, and drops the keys the * registration replaced or left out. Completing a completed setup returns * the keys again. * * Errors: * - INVALID_ARGUMENT: malformed request. * - NOT_FOUND: KEY_SETUP_NOT_FOUND. * - FAILED_PRECONDITION: KEY_SETUP_NOT_REGISTERED; nothing changed. * - UNAVAILABLE: SERVICE_UNAVAILABLE; retry the same request. * - UNAUTHENTICATED: missing or invalid credentials. * * @generated from rpc ai.v1.AssistantService.CompleteAssistantKeys */ completeAssistantKeys: { methodKind: "unary"; input: typeof CompleteAssistantKeysRequestSchema; output: typeof CompleteAssistantKeysResponseSchema; }; /** * ListAssistantKeys lists the assistant keys the assistant holds for the * caller, at most one per account. An account without one has no account * tools in a conversation. To turn the assistant's access off, revoke the * keys with DeleteAssistantKeys; the assistant then stops using them. * * Errors: * - UNAVAILABLE: SERVICE_UNAVAILABLE; retry later. * - UNAUTHENTICATED: missing or invalid credentials. * * @generated from rpc ai.v1.AssistantService.ListAssistantKeys */ listAssistantKeys: { methodKind: "unary"; input: typeof ListAssistantKeysRequestSchema; output: typeof ListAssistantKeysResponseSchema; }; }>; //#endregion export { ApprovalDecision, ApprovalDecisionSchema, ApprovalParameter, ApprovalParameterSchema, ApprovalRequested, ApprovalRequestedSchema, ApprovalResolved, ApprovalResolvedSchema, ApprovalStatus, ApprovalStatusSchema, AssistantKey, AssistantKeyAccount, AssistantKeyAccountSchema, AssistantKeySchema, AssistantKeyState, AssistantKeyStateSchema, AssistantService, AttachedExit, AttachedExitSchema, AttachedExits, AttachedExitsSchema, AttachedTrailingStop, AttachedTrailingStopSchema, BalanceHistoryChart, BalanceHistoryChartSchema, BalancesTable, BalancesTableSchema, CancelOrdersPreview, CancelOrdersPreviewSchema, CancelRunRequest, CancelRunRequestSchema, CancelRunResponse, CancelRunResponseSchema, CancelTriggerPreview, CancelTriggerPreviewSchema, CompleteAssistantKeysRequest, CompleteAssistantKeysRequestSchema, CompleteAssistantKeysResponse, CompleteAssistantKeysResponseSchema, Conversation, ConversationSchema, DecideApprovalRequest, DecideApprovalRequestSchema, DecideApprovalResponse, DecideApprovalResponseSchema, DeleteMemoryRequest, DeleteMemoryRequestSchema, DeleteMemoryResponse, DeleteMemoryResponseSchema, DepositAddressCard, DepositAddressCardSchema, Destination, DestinationSchema, DestinationsSuggested, DestinationsSuggestedSchema, DiscardPartial, DiscardPartialSchema, EquityHistoryChart, EquityHistoryChartSchema, ErrorCode, ErrorCodeSchema, ErrorDetail, ErrorDetailSchema, FailureCategory, FailureCategorySchema, LadderLevel, LadderLevelSchema, LadderPreview, LadderPreviewSchema, LimitOrderPreview, LimitOrderPreviewSchema, ListAssistantKeysRequest, ListAssistantKeysRequestSchema, ListAssistantKeysResponse, ListAssistantKeysResponseSchema, ListConversationsRequest, ListConversationsRequestSchema, ListConversationsResponse, ListConversationsResponseSchema, ListMemoriesRequest, ListMemoriesRequestSchema, ListMemoriesResponse, ListMemoriesResponseSchema, ListMessagesRequest, ListMessagesRequestSchema, ListMessagesResponse, ListMessagesResponseSchema, MarkdownTable, MarkdownTableRow, MarkdownTableRowSchema, MarkdownTableSchema, MarketOrderPreview, MarketOrderPreviewSchema, MemoriesRecalled, MemoriesRecalledSchema, Memory, MemoryKind, MemoryKindSchema, MemorySchema, Message, MessageRole, MessageRoleSchema, MessageSchema, OrderChange, OrderChangePreview, OrderChangePreviewSchema, OrderChangeSchema, OrderPreview, OrderPreviewSchema, OrderPriceField, OrderPriceFieldSchema, OrderToCancel, OrderToCancelSchema, OrdersTable, OrdersTableSchema, PlaceOrdersPreview, PlaceOrdersPreviewSchema, PrepareAssistantKeysRequest, PrepareAssistantKeysRequestSchema, PrepareAssistantKeysResponse, PrepareAssistantKeysResponseSchema, PreparedAssistantKey, PreparedAssistantKeySchema, PriceChart, PriceChartSchema, PriceOffsetDirection, PriceOffsetDirectionSchema, PriceRounding, PriceRoundingSchema, QuoteValue, QuoteValueSchema, RecalledMemory, RecalledMemorySchema, ReferencePrice, ReferencePriceSchema, ReferencePriceSource, ReferencePriceSourceSchema, RelativePrice, RelativePriceSchema, RunCompleted, RunCompletedSchema, RunEvent, RunEventSchema, RunFailed, RunFailedSchema, SendMessageRequest, SendMessageRequestSchema, SendMessageResponse, SendMessageResponseSchema, SkillLoaded, SkillLoadedSchema, StopOrderPreview, StopOrderPreviewSchema, SubagentFinished, SubagentFinishedSchema, SubagentStarted, SubagentStartedSchema, SwapLegPreview, SwapLegPreviewSchema, SwapPreview, SwapPreviewSchema, TextDelta, TextDeltaSchema, ToolFinished, ToolFinishedSchema, ToolStarted, ToolStartedSchema, TrailingStopPreview, TrailingStopPreviewSchema, TransfersTable, TransfersTableSchema, TriggerChangeAction, TriggerChangeActionSchema, TriggerChangePreview, TriggerChangePreviewSchema, TriggerDirection, TriggerDirectionSchema, TriggerSettings, TriggerSettingsSchema, TriggersTable, TriggersTableSchema, TwapPreview, TwapPreviewSchema, UnfilledSlicePolicy, UnfilledSlicePolicySchema, Usage, UsageSchema, View, ViewSchema, WatchRunRequest, WatchRunRequestSchema, WatchRunResponse, WatchRunResponseSchema, assistant_pb_d_exports, file_ai_v1_assistant }; //# sourceMappingURL=assistant_pb.d.ts.map