import { At as FasedAgentConfig, Bt as WalletProviderId, Rt as WalletChain, l as AgentDefaultsConfig, zt as WalletExecutionMode } from "./types.plugin-BcSBq42x.js"; import { M as LookupFn, P as SsrFPolicy } from "./types-jHuiH7-5.js"; //#region src/plugin-sdk/file-lock.d.ts type FileLockOptions = { retries: { retries: number; factor: number; minTimeout: number; maxTimeout: number; randomize?: boolean; }; stale: number; }; type FileLockHandle = { lockPath: string; release: () => Promise; }; declare function acquireFileLock(filePath: string, options: FileLockOptions): Promise; declare function withFileLock(filePath: string, options: FileLockOptions, fn: () => Promise): Promise; //#endregion //#region src/wallet/wallet-provider-adapter.d.ts type WalletProviderCustodyModel = "self-hosted" | "provider-managed"; type WalletProviderSigningLocation = "server" | "browser" | "unavailable"; type WalletProviderCapabilities = { custodyModel: WalletProviderCustodyModel; supportsCreateWallet: boolean; supportsPrepare: boolean; supportsSend: boolean; supportsRotateKeys: boolean; supportsResetKeys: boolean; supportsPasskeyGate: boolean; /** Where transaction signatures are produced. Browser signers never expose keys to Gateway. */ /** Omitted by legacy adapters; capability negotiation treats omission as unavailable. */ signingLocation?: WalletProviderSigningLocation; supportsSignTransaction?: boolean; supportsSignMessage?: boolean; supportedExecutionModes: WalletExecutionMode[]; supportedChains: WalletChain[]; }; type WalletProviderHealth = { ok: boolean; provider: WalletProviderId; configured: boolean; checkedAt: string; details?: string; nativeSignerApproval?: { configured: boolean; ready: boolean; credentialCount: number; credentialVersion: number; }; }; type WalletProviderAddressMap = { solana?: string; }; type WalletProviderRequestScope = { walletId?: string; }; type WalletProviderCreateWalletResult = { ok: boolean; walletId: string; addresses: WalletProviderAddressMap; metadata?: Record; }; type WalletProviderPrepareTxRequest = { chain: WalletChain; /** Stable caller-owned idempotency key. Required by providers that can broadcast. */ requestId?: string; to?: string; amount?: string; contract?: string; program?: string; tokenMint?: string; source?: string; destination?: string; allowSplInstructions?: string[]; memo?: string; preparedId?: string; }; type WalletProviderPrepareTxResult = { ok: boolean; chain: WalletChain; preparedId: string; signer?: string; unsignedTxBase64?: string; messageBase64?: string; intentDigest?: string; expiresAt?: string; metadata?: Record; }; type WalletProviderSendTxRequest = WalletProviderPrepareTxRequest & WalletProviderRequestScope & { preparedId?: string; }; type WalletProviderSendTxResult = { ok: boolean; chain: WalletChain; txHash: string; signer?: string; metadata?: Record; }; type WalletProviderJupiterIntentType = "solana.jupiter.swap" | "solana.jupiter.trigger.create" | "solana.jupiter.trigger.cancel"; type WalletProviderJupiterIntentV2 = { type: WalletProviderJupiterIntentType; jupiter: { owner: string; inputMint?: string; outputMint?: string; inputAmount?: string; maxInputAmount?: string; minimumOutputAmount?: string; maxFeeLamports: string; sourceTokenAccount?: string; destinationTokenAccount?: string; programs: string[]; trigger?: { operation: "create" | "cancel"; program: string; order?: string; triggerMint?: string; condition?: "above" | "below"; targetPriceUsd?: string; slippageBps?: number; expiresAt?: string; expectedOrderState: "new" | "open"; }; }; }; type WalletProviderJupiterTriggerOrderV2 = { orderId: string; orderState: string; orderType: "single"; inputMint: string; initialInputAmount: string; remainingInputAmount: string; outputMint: string; triggerMint: string; condition: "above" | "below"; targetPriceUsd: string; slippageBps: number; expiresAt: string; cancel?: { expectedOrderState: "open"; refundMint: string; refundAmount: string; destinationTokenAccount: string; program: string; }; }; type WalletProviderJupiterTriggerHistoryV2 = { orders: WalletProviderJupiterTriggerOrderV2[]; }; type WalletProviderTypedTransferIntentV2 = { type: "solana.nativeTransfer"; destination: string; lamports: string; memo?: string; } | { type: "solana.splTransferChecked"; tokenProgram: string; mint: string; destination: string; amount: string; memo?: string; }; type WalletProviderVaultBondIntentV2 = { type: "solana.vaultBondAction"; cluster: "local" | "devnet" | "mainnet-beta"; action: string; programId: string; dataBase64: string; keys: Array<{ pubkey: string; isSigner: boolean; isWritable: boolean; }>; context?: { targetAuthority?: string; disputeAuthority?: string; intervalStartCycleId?: string; registryPageIndex?: string; minerAuthorities?: string[]; frontCycleIds?: string[]; backCycleIds?: string[]; }; }; type WalletProviderFederationBondChallengeIntentV2 = { type: "federation.bondChallenge"; federation: { challengeId: string; federationOrigin: string; handle: string; nodeId: string; tokenId: string; bondId: string; tier: "none" | "basic-bond" | "operator-bond"; amountRaw?: string; expiresAt: string; payloadBase64: string; }; }; type WalletProviderSignerIntentV2 = WalletProviderJupiterIntentV2 | WalletProviderTypedTransferIntentV2 | WalletProviderVaultBondIntentV2 | WalletProviderFederationBondChallengeIntentV2; type WalletProviderSignerIntentType = WalletProviderSignerIntentV2["type"]; type WalletProviderJupiterReviewV2 = { requestId: string; walletId: string; intentType: WalletProviderSignerIntentType; intentDigest: string; policyHash: string; mode: "autonomous" | "reviewed"; nonce: string; semanticIntent: WalletProviderSignerIntentV2; walletPublicKey?: string; artifactKind: "solana-transaction" | "domain-separated-message" | "jupiter-trigger-state"; artifactDigest: string; transaction?: WalletProviderSignerTransactionEnvelopeV2; messageBase64?: string; stateDigest?: string; stateSlot?: number; asset: string; amount: string; reservations?: Array<{ asset: string; amount: string; usageBucket: string; }>; destination: string; policyOperation: string; requiredPrograms: string[]; requiredRole?: "agent" | "mining" | "vault"; issuedAt: string; state: "prepared" | "signed"; preparedAt: string; expiresAt: string; updatedAt: string; transactionDigest?: string; signature?: string; }; type WalletProviderSignerTransactionEnvelopeV2 = { serializedTxBase64: string; programs: string[]; writableAccounts: string[]; submission: "rpc"; }; type WalletProviderSignerReviewAuthorizationV2 = { type: "webauthn" | "control-ui"; proof: { proofId: string; }; }; type WalletProviderSignerReviewBindingV2 = { requestId: string; walletId: string; role: "agent" | "mining" | "vault"; intentType: WalletProviderSignerIntentType; intentDigest: string; semanticIntent: WalletProviderSignerIntentV2; walletPublicKey?: string; artifactKind: "solana-transaction" | "domain-separated-message" | "jupiter-trigger-state"; artifactDigest: string; transactionDigest?: string; stateDigest?: string; stateSlot?: number; asset: string; amount: string; destination: string; policyOperation: string; requiredPrograms: string[]; policyHash: string; nonce: string; issuedAt: string; expiresAt: string; }; type WalletProviderSignerReviewAuthorizationBeginV2 = { challengeId: string; expiresAt: string; binding: WalletProviderSignerReviewBindingV2; options: unknown; }; type WalletProviderSignerReviewAuthorizationFinishV2 = { authorization: WalletProviderSignerReviewAuthorizationV2; binding: WalletProviderSignerReviewBindingV2; credentialId: string; expiresAt: string; }; type WalletProviderSignerOperationV2 = { requestId: string; walletId: string; intentType: string; intentDigest: string; transactionDigest?: string; policyHash: string; asset: string; amount: string; reservations?: Array<{ asset: string; amount: string; usageBucket: string; }>; state: "reserved" | "broadcast" | "confirmed" | "failed" | "unknown"; signature?: string; error?: string; authorizationProof?: string; authorizedAt?: string; externalResult?: { provider: "jupiter-trigger-v2"; action: "create" | "cancel"; orderId: string; orderState: "open" | "cancelled"; }; }; type WalletProviderJupiterExecutionV2 = { review: WalletProviderJupiterReviewV2; operation: WalletProviderSignerOperationV2; signatureBase64?: string; signer: string; }; type WalletProviderBalanceResult = { ok: boolean; chain: WalletChain; address: string; balance: string; unit?: string; }; interface WalletProviderAdapter { readonly id: WalletProviderId; readonly displayName: string; readonly capabilities: WalletProviderCapabilities; supportsChain(chain: WalletChain): boolean; health(): Promise; createWallet?(): Promise; getAddresses(options?: WalletProviderRequestScope): Promise; getBalance(chain: WalletChain, options?: WalletProviderRequestScope): Promise; prepareTx?(request: WalletProviderPrepareTxRequest): Promise; sendTx(request: WalletProviderSendTxRequest): Promise; prepareJupiterReview?(request: { walletId: string; requestId: string; mode: "autonomous" | "reviewed"; intent: WalletProviderJupiterIntentV2; transaction?: WalletProviderSignerTransactionEnvelopeV2; }): Promise; getSignerReview?(request: { walletId: string; requestId: string; }): Promise; prepareSignerReview?(request: { walletId: string; requestId: string; mode: "autonomous" | "reviewed"; intent: WalletProviderSignerIntentV2; transaction?: WalletProviderSignerTransactionEnvelopeV2; }): Promise; prepareTypedTransferReview?(request: { walletId: string; requestId: string; destination: string; amount: string; mint?: string; tokenProgram?: string; memo?: string; }): Promise; executeSignerReview?(request: { walletId: string; requestId: string; authorization?: WalletProviderSignerReviewAuthorizationV2; }): Promise; executeJupiterReview?(request: { walletId: string; requestId: string; authorization?: WalletProviderSignerReviewAuthorizationV2; }): Promise; executeSignerIntent?(request: { walletId: string; requestId: string; intent: WalletProviderSignerIntentV2; }): Promise; listJupiterTriggerOrders?(request: { walletId: string; state?: "active" | "past"; }): Promise; getSignerOperation?(request: { walletId: string; requestId: string; }): Promise; reconcileSignerOperation?(request: { walletId: string; requestId: string; }): Promise; beginSignerReviewAuthorization?(request: { walletId: string; requestId: string; }): Promise; beginJupiterReviewAuthorization?(request: { walletId: string; requestId: string; }): Promise; finishSignerReviewAuthorization?(request: { walletId: string; challengeId: string; credential: unknown; }): Promise; finishJupiterReviewAuthorization?(request: { walletId: string; challengeId: string; credential: unknown; }): Promise; rotateKeys?(): Promise<{ ok: boolean; addresses?: WalletProviderAddressMap; metadata?: Record; }>; resetKeys?(): Promise<{ ok: boolean; addresses?: WalletProviderAddressMap; metadata?: Record; }>; } //#endregion //#region src/agents/agent-scope.d.ts type AgentEntry = NonNullable["list"]>[number]; type ResolvedAgentConfig = { name?: string; workspace?: string; agentDir?: string; activeModelProvider?: AgentEntry["activeModelProvider"]; modelProviders?: AgentEntry["modelProviders"]; model?: AgentEntry["model"]; taskModels?: AgentEntry["taskModels"]; thinkingDefault?: AgentEntry["thinkingDefault"]; verboseDefault?: AgentDefaultsConfig["verboseDefault"]; reasoningDefault?: AgentEntry["reasoningDefault"]; fastModeDefault?: AgentEntry["fastModeDefault"]; skills?: AgentEntry["skills"]; memorySearch?: AgentEntry["memorySearch"]; humanDelay?: AgentEntry["humanDelay"]; heartbeat?: AgentEntry["heartbeat"]; identity?: AgentEntry["identity"]; groupChat?: AgentEntry["groupChat"]; subagents?: AgentEntry["subagents"]; sandbox?: AgentEntry["sandbox"]; tools?: AgentEntry["tools"]; }; declare function listAgentIds(cfg: FasedAgentConfig): string[]; declare function resolveDefaultAgentId(cfg: FasedAgentConfig): string; declare function resolveAgentConfig(cfg: FasedAgentConfig, agentId: string): ResolvedAgentConfig | undefined; declare function resolveAgentEffectiveModelPrimary(cfg: FasedAgentConfig, agentId: string): string | undefined; declare function resolveAgentDir(cfg: FasedAgentConfig, agentId: string, env?: NodeJS.ProcessEnv): string; //#endregion //#region src/infra/net/fetch-guard.d.ts type FetchLike = (input: RequestInfo | URL, init?: RequestInit) => Promise; type GuardedFetchOptions = { url: string; fetchImpl?: FetchLike; init?: RequestInit; maxRedirects?: number; timeoutMs?: number; signal?: AbortSignal; policy?: SsrFPolicy; lookupFn?: LookupFn; pinDns?: boolean; proxy?: "env"; auditContext?: string; dispatcherPolicy?: unknown; }; type GuardedFetchResult = { response: Response; finalUrl: string; release: () => Promise; }; declare function fetchWithSsrFGuard(params: GuardedFetchOptions): Promise; //#endregion //#region src/infra/tmp-fased-dir.d.ts type ResolvePreferredFasedAgentTmpDirOptions = { accessSync?: (path: string, mode?: number) => void; chmodSync?: (path: string, mode: number) => void; lstatSync?: (path: string) => { isDirectory(): boolean; isSymbolicLink(): boolean; mode?: number; uid?: number; }; mkdirSync?: (path: string, opts: { recursive: boolean; mode?: number; }) => void; getuid?: () => number | undefined; tmpdir?: () => string; warn?: (message: string) => void; }; declare function resolvePreferredFasedAgentTmpDir(options?: ResolvePreferredFasedAgentTmpDirOptions): string; //#endregion export { resolveAgentDir as a, WalletProviderAdapter as c, FileLockHandle as d, FileLockOptions as f, resolveAgentConfig as i, WalletProviderJupiterReviewV2 as l, withFileLock as m, fetchWithSsrFGuard as n, resolveAgentEffectiveModelPrimary as o, acquireFileLock as p, listAgentIds as r, resolveDefaultAgentId as s, resolvePreferredFasedAgentTmpDir as t, WalletProviderSignerIntentV2 as u };