import { n as TSchema, r as Kind } from "../../schema-LN4kiIw1.mjs"; import { a as TObject, i as TAdditionalProperties, o as Static, r as Evaluate, s as TString, t as Assert } from "../../helpers-DutyHbVD.mjs"; import { t as TUnsafe } from "../../unsafe-C_mX8nG4.mjs"; import { t as TBoolean } from "../../boolean-m0GDZxcD.mjs"; import { t as TNumber } from "../../number-BDPWg_Sz.mjs"; import { t as TOptional } from "../../optional-Bis1WTKK.mjs"; import { t as TArray } from "../../array-DYdcEI3W.mjs"; //#region node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/cjs/type/record/record.d.ts type RecordStatic = (Evaluate<{ [_ in Assert, PropertyKey>]: Static }>); interface TRecord extends TSchema { [Kind]: 'Record'; static: RecordStatic; type: 'object'; patternProperties: { [pattern: string]: Type; }; additionalProperties: TAdditionalProperties; } //#endregion //#region node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/cjs/type/unknown/unknown.d.ts interface TUnknown extends TSchema { [Kind]: 'Unknown'; static: unknown; } //#endregion //#region extensions/crypto/src/tools/compound-action.d.ts /** * Compound Action Tool — the user-facing entry point for multi-step operations. * * This is the tool the LLM calls to create, validate, schedule, and manage * compound operations. It sits on top of the plan engine (compiler, validator, * scheduler, executor) and exposes a clean action-based API. * * ─── Actions ──────────────────────────────────────────────────────────── * * create — Compile an intent into a plan, validate it, return for review * execute — Run a validated plan immediately * schedule — Schedule a plan for future execution (time/condition/interval) * list — List all plans for the current user * status — Get status of a specific plan * cancel — Cancel a scheduled/running plan * pause — Pause a scheduled plan * resume — Resume a paused plan * history — Get execution history for a plan * * ─── Usage Flow ───────────────────────────────────────────────────────── * * 1. User says "when ETH hits $4000, sell half for USDC then bridge to Arbitrum" * 2. LLM calls compound_action with action="create" and an intent object * 3. Tool compiles → validates → returns the plan with any issues * 4. LLM reviews validation, presents plan to user * 5. User confirms → LLM calls compound_action with action="schedule" and the plan ID * 6. Scheduler watches the condition, fires when ETH >= $4000 * 7. Executor runs the steps, reports results */ declare function createCompoundActionTool(): { name: string; label: string; ownerOnly: boolean; description: string; parameters: TObject<{ action: TUnsafe<"list" | "status" | "dead_letter" | "update" | "history" | "execute" | "create" | "cancel" | "pause" | "resume" | "schedule" | "save_template" | "from_template" | "list_templates">; intent: TOptional; natural_language: TString; trigger: TOptional; time: TOptional; interval: TOptional; max_runs: TOptional; token: TOptional; op: TOptional>; value: TOptional; logic: TOptional>; conditions: TOptional; value: TNumber; }>>>; expires: TOptional; }>>; steps: TArray>; action: TOptional>; token_in: TOptional; token_out: TOptional; amount: TOptional; amount_pct: TOptional; slippage_bps: TOptional; chain_id: TOptional; to: TOptional; token: TOptional; to_chain: TOptional; from_chain: TOptional; order_type: TOptional; trigger_price: TOptional; tool: TOptional; params: TOptional>; condition: TOptional; field: TOptional>; op: TUnsafe; value: TNumber; }>>; confirm: TOptional; on_failure: TOptional>; retry_count: TOptional; label: TOptional; output_ref: TOptional; input_refs: TOptional>; steps: TOptional>>; allow_partial_failure: TOptional; duration: TOptional; until_time: TOptional; until: TOptional; field: TOptional>; op: TUnsafe; value: TNumber; }>>; max_wait: TOptional; poll_interval: TOptional; exit_when: TOptional; field: TOptional>; op: TUnsafe; value: TNumber; }>>; max_iterations: TOptional; delay_between: TOptional; }>>; tags: TOptional>; }>>; plan_id: TOptional; template_id: TOptional; template_name: TOptional; template_description: TOptional; template_params: TOptional>; update_steps: TOptional>>; update_trigger: TOptional>; }>; execute(_toolCallId: string, rawArgs: unknown, ctx?: Record): Promise<{ content: Array<{ type: "text"; text: string; }>; details: unknown; }>; }; //#endregion export { createCompoundActionTool }; //# sourceMappingURL=compound-action.d.mts.map