@aomi-labs/react 0.3.19 → 0.3.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +349 -115
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +65 -31
- package/dist/index.d.ts +65 -31
- package/dist/index.js +356 -119
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AomiClientOptions, AomiClient, SessionOptions, Session, UserState, WalletRequest, WalletRequestResult, AomiSimulateResponse } from '@aomi-labs/client';
|
|
2
|
-
export { AomiChatResponse, AomiClient, AomiClientOptions, AomiCreateThreadResponse, AomiInterruptResponse, AomiMessage, AomiSSEEvent, AomiStateResponse, AomiSystemEvent, AomiSystemResponse, AomiThread, DISABLED_PROVIDER_STATE, MAX_AUTO_FEE_WEI, NativeWalletExecutionPolicy, NativeWalletSponsorship, SponsorshipPaymasterServiceContext, UserState, WalletCapabilities, WalletEip712Payload, WalletRequest, WalletRequestKind, WalletRequestResult, WalletSolanaSignPayload, WalletTxPayload, aaModeFromExecutionKind, appendFeeCallToPayload, buildFeeAAWalletCall, executeWalletCalls, hydrateTxPayloadFromUserState, normalizeSimulatedFee, parseChainId, toAAWalletCall, toAAWalletCalls, toViemSignTypedDataArgs } from '@aomi-labs/client';
|
|
1
|
+
import { AomiClientOptions, AomiClient, SessionOptions, Session, UserState, WalletRequest, WalletRequestResult, AomiSimulateResponse, ChainInfo, AomiAppDescriptor } from '@aomi-labs/client';
|
|
2
|
+
export { AomiAppDescriptor, AomiChatResponse, AomiClient, AomiClientOptions, AomiCreateThreadResponse, AomiInterruptResponse, AomiMessage, AomiSSEEvent, AomiSecretSlot, AomiStateResponse, AomiSystemEvent, AomiSystemResponse, AomiThread, ChainInfo, DISABLED_PROVIDER_STATE, MAX_AUTO_FEE_WEI, NativeWalletExecutionPolicy, NativeWalletSponsorship, SponsorshipPaymasterServiceContext, UserState, WalletCapabilities, WalletEip712Payload, WalletRequest, WalletRequestKind, WalletRequestResult, WalletSolanaSignPayload, WalletTxPayload, aaModeFromExecutionKind, appendFeeCallToPayload, buildFeeAAWalletCall, executeWalletCalls, hydrateTxPayloadFromUserState, normalizeSimulatedFee, parseChainId, toAAWalletCall, toAAWalletCalls, toViemSignTypedDataArgs } from '@aomi-labs/client';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import { ReactNode, SetStateAction } from 'react';
|
|
5
5
|
import { ThreadMessageLike } from '@assistant-ui/react';
|
|
@@ -29,9 +29,10 @@ type RuntimeUserStateProviderProps = {
|
|
|
29
29
|
children: ReactNode;
|
|
30
30
|
sessionManager: SessionManager;
|
|
31
31
|
getUserState: () => UserState;
|
|
32
|
+
setUser: (data: Partial<UserState>) => void;
|
|
32
33
|
onUserStateChange: (callback: (user: UserState) => void) => () => void;
|
|
33
34
|
};
|
|
34
|
-
declare function RuntimeUserStateProvider({ children, sessionManager, getUserState, onUserStateChange, }: RuntimeUserStateProviderProps): react_jsx_runtime.JSX.Element;
|
|
35
|
+
declare function RuntimeUserStateProvider({ children, sessionManager, getUserState, setUser, onUserStateChange, }: RuntimeUserStateProviderProps): react_jsx_runtime.JSX.Element;
|
|
35
36
|
|
|
36
37
|
type ThreadContext = {
|
|
37
38
|
currentThreadId: string;
|
|
@@ -123,6 +124,15 @@ type NotificationType = "notice" | "success" | "error" | "wallet";
|
|
|
123
124
|
type Notification$1 = {
|
|
124
125
|
id: string;
|
|
125
126
|
type: NotificationType;
|
|
127
|
+
/**
|
|
128
|
+
* Optional discriminator for notifications that have a bespoke UI consumer.
|
|
129
|
+
*
|
|
130
|
+
* - `payment_required` is consumed by `PaymentRequiredGate` (apps/registry)
|
|
131
|
+
* as a blocking modal. The toaster skips this kind. As a result, `type`,
|
|
132
|
+
* `message`, and `duration` are NOT rendered for this kind — only `kind`
|
|
133
|
+
* matters for routing. Don't bother passing those fields when firing it.
|
|
134
|
+
*/
|
|
135
|
+
kind?: "payment_required";
|
|
126
136
|
title: string;
|
|
127
137
|
message?: string;
|
|
128
138
|
duration?: number;
|
|
@@ -315,7 +325,21 @@ declare function useUser(): {
|
|
|
315
325
|
getUserState: () => UserState;
|
|
316
326
|
onUserStateChange: (callback: (user: UserState) => void) => () => void;
|
|
317
327
|
};
|
|
318
|
-
|
|
328
|
+
/**
|
|
329
|
+
* Idempotent provider: if a parent already provided `UserContext`, render
|
|
330
|
+
* children straight through. Otherwise mount a fresh store.
|
|
331
|
+
*
|
|
332
|
+
* The widget layers (`AomiFrame.Root` / `AomiRuntime`) and the auth-adapter
|
|
333
|
+
* layers (`AomiParaProvider` / `AomiBaseAccountProvider`) both want to be
|
|
334
|
+
* usable standalone. Each historically wrapped with `<ExtUserProvider>` —
|
|
335
|
+
* but when they nest, the inner provider created a *second* store that
|
|
336
|
+
* shadowed the outer. The chat composer would read from one store while
|
|
337
|
+
* `AomiAuthAdapterSync` wrote to another, so wallet connects never
|
|
338
|
+
* propagated to the chat's `user_state`. Collapsing nested mounts to the
|
|
339
|
+
* outermost store fixes that without forcing host apps to wire the
|
|
340
|
+
* provider themselves.
|
|
341
|
+
*/
|
|
342
|
+
declare function ExtUserProvider({ children }: {
|
|
319
343
|
children: ReactNode;
|
|
320
344
|
}): react_jsx_runtime.JSX.Element;
|
|
321
345
|
|
|
@@ -334,26 +358,21 @@ type UserConfig = {
|
|
|
334
358
|
};
|
|
335
359
|
declare const getNetworkName: (chainId: number | string | undefined) => string;
|
|
336
360
|
declare const formatAddress: (addr?: string) => string;
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
id: number;
|
|
340
|
-
name: string;
|
|
341
|
-
ticker: string;
|
|
342
|
-
};
|
|
343
|
-
/** All chains supported by the application. Single source of truth. */
|
|
361
|
+
|
|
362
|
+
/** All chains supported by the application. Sourced from @aomi-labs/client. */
|
|
344
363
|
declare const SUPPORTED_CHAINS: ChainInfo[];
|
|
345
364
|
/** Look up ChainInfo by chain ID. Returns undefined for unknown chains. */
|
|
346
365
|
declare const getChainInfo: (chainId: number | undefined) => ChainInfo | undefined;
|
|
347
366
|
|
|
348
367
|
/**
|
|
349
368
|
* Resolve the actual backend model for auto mode.
|
|
350
|
-
* Prefers
|
|
351
|
-
* backend order.
|
|
369
|
+
* Prefers the current auto model before falling back to older balanced defaults
|
|
370
|
+
* and then backend order.
|
|
352
371
|
*/
|
|
353
372
|
declare function resolveAutoModel(models: string[]): string | null;
|
|
354
373
|
|
|
355
|
-
/** A stored
|
|
356
|
-
type
|
|
374
|
+
/** A stored BYOK entry for an LLM provider */
|
|
375
|
+
type StoredByokKey = {
|
|
357
376
|
apiKey: string;
|
|
358
377
|
keyPrefix: string;
|
|
359
378
|
label?: string;
|
|
@@ -370,32 +389,47 @@ type ControlState = {
|
|
|
370
389
|
clientId: string | null;
|
|
371
390
|
/** Available models fetched from backend */
|
|
372
391
|
availableModels: string[];
|
|
373
|
-
/** Authorized apps fetched from backend
|
|
392
|
+
/** Authorized apps fetched from backend — names only, derived from
|
|
393
|
+
* `appDescriptors`. Kept as a separate field so existing
|
|
394
|
+
* `authorizedApps.includes(app)` consumers keep working. */
|
|
374
395
|
authorizedApps: string[];
|
|
396
|
+
/** Full per-app descriptors from `/api/control/apps`, including each
|
|
397
|
+
* app's declared secret slots. Used by the Secrets settings page to
|
|
398
|
+
* render slot inputs and by the chat shell to gate app load. */
|
|
399
|
+
appDescriptors: AomiAppDescriptor[];
|
|
375
400
|
/** Default model (first from availableModels) */
|
|
376
401
|
defaultModel: string | null;
|
|
377
402
|
/** Default app (from authorizedApps) */
|
|
378
403
|
defaultApp: string | null;
|
|
379
|
-
/**
|
|
380
|
-
|
|
404
|
+
/** BYOK entries stored locally — keyed by LLM provider name */
|
|
405
|
+
byokKeys: Record<string, StoredByokKey>;
|
|
381
406
|
};
|
|
382
407
|
type ControlContextApi = {
|
|
383
408
|
/** Global state (apiKey, clientId, available models/apps) */
|
|
384
409
|
state: ControlState;
|
|
385
410
|
/** Update global state (apiKey only) */
|
|
386
411
|
setApiKey: (apiKey: string | null) => void;
|
|
387
|
-
/** Ingest secrets into the backend vault, returns opaque handles
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
/**
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
/**
|
|
398
|
-
|
|
412
|
+
/** Ingest secrets into the backend vault, returns opaque handles. Pass
|
|
413
|
+
* `app` to scope to the per-app store; omit for the flat client store
|
|
414
|
+
* (BYOK / STREAM / legacy). */
|
|
415
|
+
ingestSecrets: (secrets: Record<string, string>, app?: string) => Promise<Record<string, string>>;
|
|
416
|
+
/** Clear secrets from the backend vault. With `app`, clears only that
|
|
417
|
+
* app's per-app slots; without, wipes the entire client (flat + app). */
|
|
418
|
+
clearSecrets: (app?: string) => Promise<void>;
|
|
419
|
+
/** Remove a single secret. With `app`, targets the per-app store under
|
|
420
|
+
* that scope; without, targets the flat store. */
|
|
421
|
+
deleteSecret: (name: string, app?: string) => Promise<void>;
|
|
422
|
+
/** Return the names of slots filled per app for this client. Source of
|
|
423
|
+
* truth for the Secrets settings page (no values are returned). */
|
|
424
|
+
listSecrets: () => Promise<Record<string, string[]>>;
|
|
425
|
+
/** Store a BYOK entry for an LLM provider in localStorage and ingest into backend vault */
|
|
426
|
+
setByok: (provider: string, apiKey: string, label?: string) => Promise<void>;
|
|
427
|
+
/** Remove a BYOK entry from localStorage and backend vault */
|
|
428
|
+
removeByok: (provider: string) => Promise<void>;
|
|
429
|
+
/** Get all stored BYOK entries (metadata only — keys are in state.byokKeys) */
|
|
430
|
+
getByokKeys: () => Record<string, StoredByokKey>;
|
|
431
|
+
/** Check if a BYOK entry is stored */
|
|
432
|
+
hasByok: (provider?: string) => boolean;
|
|
399
433
|
/** Fetch available models from backend */
|
|
400
434
|
getAvailableModels: () => Promise<string[]>;
|
|
401
435
|
/** Fetch authorized apps from backend */
|
|
@@ -441,4 +475,4 @@ type ControlContextProviderProps = {
|
|
|
441
475
|
};
|
|
442
476
|
declare function ControlContextProvider({ children, aomiClient, sessionId, publicKey, getThreadMetadata, updateThreadMetadata, }: ControlContextProviderProps): react_jsx_runtime.JSX.Element;
|
|
443
477
|
|
|
444
|
-
export { type AomiRuntimeApi, AomiRuntimeProvider, type AomiRuntimeProviderProps, type
|
|
478
|
+
export { type AomiRuntimeApi, AomiRuntimeProvider, type AomiRuntimeProviderProps, type ControlContextApi, ControlContextProvider, type ControlContextProviderProps, type ControlState, type EventContext, EventContextProvider, type EventContextProviderProps, type EventSubscriber, ExtUserProvider, type InboundEvent, type ModelSelectionMode, type Notification$1 as Notification, type NotificationApi, NotificationContextProvider, type NotificationContextProviderProps, type NotificationContextApi as NotificationContextValue, type NotificationHandlerConfig, type NotificationType, RuntimeUserStateProvider, type SSEStatus, SUPPORTED_CHAINS, type NotificationData as ShowNotificationParams, type StoredByokKey, type StoredModelPreference, type ThreadContext, ThreadContextProvider, type ThreadControlState, type ThreadMetadata, type UserConfig, type WalletHandlerApi, type WalletHandlerConfig, type WalletRequestStatus, cn, formatAddress, getChainInfo, getNetworkName, initThreadControl, resolveAutoModel, useAomiRuntime, useControl, useCurrentThreadMessages, useCurrentThreadMetadata, useEventContext, useNotification, useNotificationHandler, useThreadContext, useUser, useWalletHandler };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AomiClientOptions, AomiClient, SessionOptions, Session, UserState, WalletRequest, WalletRequestResult, AomiSimulateResponse } from '@aomi-labs/client';
|
|
2
|
-
export { AomiChatResponse, AomiClient, AomiClientOptions, AomiCreateThreadResponse, AomiInterruptResponse, AomiMessage, AomiSSEEvent, AomiStateResponse, AomiSystemEvent, AomiSystemResponse, AomiThread, DISABLED_PROVIDER_STATE, MAX_AUTO_FEE_WEI, NativeWalletExecutionPolicy, NativeWalletSponsorship, SponsorshipPaymasterServiceContext, UserState, WalletCapabilities, WalletEip712Payload, WalletRequest, WalletRequestKind, WalletRequestResult, WalletSolanaSignPayload, WalletTxPayload, aaModeFromExecutionKind, appendFeeCallToPayload, buildFeeAAWalletCall, executeWalletCalls, hydrateTxPayloadFromUserState, normalizeSimulatedFee, parseChainId, toAAWalletCall, toAAWalletCalls, toViemSignTypedDataArgs } from '@aomi-labs/client';
|
|
1
|
+
import { AomiClientOptions, AomiClient, SessionOptions, Session, UserState, WalletRequest, WalletRequestResult, AomiSimulateResponse, ChainInfo, AomiAppDescriptor } from '@aomi-labs/client';
|
|
2
|
+
export { AomiAppDescriptor, AomiChatResponse, AomiClient, AomiClientOptions, AomiCreateThreadResponse, AomiInterruptResponse, AomiMessage, AomiSSEEvent, AomiSecretSlot, AomiStateResponse, AomiSystemEvent, AomiSystemResponse, AomiThread, ChainInfo, DISABLED_PROVIDER_STATE, MAX_AUTO_FEE_WEI, NativeWalletExecutionPolicy, NativeWalletSponsorship, SponsorshipPaymasterServiceContext, UserState, WalletCapabilities, WalletEip712Payload, WalletRequest, WalletRequestKind, WalletRequestResult, WalletSolanaSignPayload, WalletTxPayload, aaModeFromExecutionKind, appendFeeCallToPayload, buildFeeAAWalletCall, executeWalletCalls, hydrateTxPayloadFromUserState, normalizeSimulatedFee, parseChainId, toAAWalletCall, toAAWalletCalls, toViemSignTypedDataArgs } from '@aomi-labs/client';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import { ReactNode, SetStateAction } from 'react';
|
|
5
5
|
import { ThreadMessageLike } from '@assistant-ui/react';
|
|
@@ -29,9 +29,10 @@ type RuntimeUserStateProviderProps = {
|
|
|
29
29
|
children: ReactNode;
|
|
30
30
|
sessionManager: SessionManager;
|
|
31
31
|
getUserState: () => UserState;
|
|
32
|
+
setUser: (data: Partial<UserState>) => void;
|
|
32
33
|
onUserStateChange: (callback: (user: UserState) => void) => () => void;
|
|
33
34
|
};
|
|
34
|
-
declare function RuntimeUserStateProvider({ children, sessionManager, getUserState, onUserStateChange, }: RuntimeUserStateProviderProps): react_jsx_runtime.JSX.Element;
|
|
35
|
+
declare function RuntimeUserStateProvider({ children, sessionManager, getUserState, setUser, onUserStateChange, }: RuntimeUserStateProviderProps): react_jsx_runtime.JSX.Element;
|
|
35
36
|
|
|
36
37
|
type ThreadContext = {
|
|
37
38
|
currentThreadId: string;
|
|
@@ -123,6 +124,15 @@ type NotificationType = "notice" | "success" | "error" | "wallet";
|
|
|
123
124
|
type Notification$1 = {
|
|
124
125
|
id: string;
|
|
125
126
|
type: NotificationType;
|
|
127
|
+
/**
|
|
128
|
+
* Optional discriminator for notifications that have a bespoke UI consumer.
|
|
129
|
+
*
|
|
130
|
+
* - `payment_required` is consumed by `PaymentRequiredGate` (apps/registry)
|
|
131
|
+
* as a blocking modal. The toaster skips this kind. As a result, `type`,
|
|
132
|
+
* `message`, and `duration` are NOT rendered for this kind — only `kind`
|
|
133
|
+
* matters for routing. Don't bother passing those fields when firing it.
|
|
134
|
+
*/
|
|
135
|
+
kind?: "payment_required";
|
|
126
136
|
title: string;
|
|
127
137
|
message?: string;
|
|
128
138
|
duration?: number;
|
|
@@ -315,7 +325,21 @@ declare function useUser(): {
|
|
|
315
325
|
getUserState: () => UserState;
|
|
316
326
|
onUserStateChange: (callback: (user: UserState) => void) => () => void;
|
|
317
327
|
};
|
|
318
|
-
|
|
328
|
+
/**
|
|
329
|
+
* Idempotent provider: if a parent already provided `UserContext`, render
|
|
330
|
+
* children straight through. Otherwise mount a fresh store.
|
|
331
|
+
*
|
|
332
|
+
* The widget layers (`AomiFrame.Root` / `AomiRuntime`) and the auth-adapter
|
|
333
|
+
* layers (`AomiParaProvider` / `AomiBaseAccountProvider`) both want to be
|
|
334
|
+
* usable standalone. Each historically wrapped with `<ExtUserProvider>` —
|
|
335
|
+
* but when they nest, the inner provider created a *second* store that
|
|
336
|
+
* shadowed the outer. The chat composer would read from one store while
|
|
337
|
+
* `AomiAuthAdapterSync` wrote to another, so wallet connects never
|
|
338
|
+
* propagated to the chat's `user_state`. Collapsing nested mounts to the
|
|
339
|
+
* outermost store fixes that without forcing host apps to wire the
|
|
340
|
+
* provider themselves.
|
|
341
|
+
*/
|
|
342
|
+
declare function ExtUserProvider({ children }: {
|
|
319
343
|
children: ReactNode;
|
|
320
344
|
}): react_jsx_runtime.JSX.Element;
|
|
321
345
|
|
|
@@ -334,26 +358,21 @@ type UserConfig = {
|
|
|
334
358
|
};
|
|
335
359
|
declare const getNetworkName: (chainId: number | string | undefined) => string;
|
|
336
360
|
declare const formatAddress: (addr?: string) => string;
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
id: number;
|
|
340
|
-
name: string;
|
|
341
|
-
ticker: string;
|
|
342
|
-
};
|
|
343
|
-
/** All chains supported by the application. Single source of truth. */
|
|
361
|
+
|
|
362
|
+
/** All chains supported by the application. Sourced from @aomi-labs/client. */
|
|
344
363
|
declare const SUPPORTED_CHAINS: ChainInfo[];
|
|
345
364
|
/** Look up ChainInfo by chain ID. Returns undefined for unknown chains. */
|
|
346
365
|
declare const getChainInfo: (chainId: number | undefined) => ChainInfo | undefined;
|
|
347
366
|
|
|
348
367
|
/**
|
|
349
368
|
* Resolve the actual backend model for auto mode.
|
|
350
|
-
* Prefers
|
|
351
|
-
* backend order.
|
|
369
|
+
* Prefers the current auto model before falling back to older balanced defaults
|
|
370
|
+
* and then backend order.
|
|
352
371
|
*/
|
|
353
372
|
declare function resolveAutoModel(models: string[]): string | null;
|
|
354
373
|
|
|
355
|
-
/** A stored
|
|
356
|
-
type
|
|
374
|
+
/** A stored BYOK entry for an LLM provider */
|
|
375
|
+
type StoredByokKey = {
|
|
357
376
|
apiKey: string;
|
|
358
377
|
keyPrefix: string;
|
|
359
378
|
label?: string;
|
|
@@ -370,32 +389,47 @@ type ControlState = {
|
|
|
370
389
|
clientId: string | null;
|
|
371
390
|
/** Available models fetched from backend */
|
|
372
391
|
availableModels: string[];
|
|
373
|
-
/** Authorized apps fetched from backend
|
|
392
|
+
/** Authorized apps fetched from backend — names only, derived from
|
|
393
|
+
* `appDescriptors`. Kept as a separate field so existing
|
|
394
|
+
* `authorizedApps.includes(app)` consumers keep working. */
|
|
374
395
|
authorizedApps: string[];
|
|
396
|
+
/** Full per-app descriptors from `/api/control/apps`, including each
|
|
397
|
+
* app's declared secret slots. Used by the Secrets settings page to
|
|
398
|
+
* render slot inputs and by the chat shell to gate app load. */
|
|
399
|
+
appDescriptors: AomiAppDescriptor[];
|
|
375
400
|
/** Default model (first from availableModels) */
|
|
376
401
|
defaultModel: string | null;
|
|
377
402
|
/** Default app (from authorizedApps) */
|
|
378
403
|
defaultApp: string | null;
|
|
379
|
-
/**
|
|
380
|
-
|
|
404
|
+
/** BYOK entries stored locally — keyed by LLM provider name */
|
|
405
|
+
byokKeys: Record<string, StoredByokKey>;
|
|
381
406
|
};
|
|
382
407
|
type ControlContextApi = {
|
|
383
408
|
/** Global state (apiKey, clientId, available models/apps) */
|
|
384
409
|
state: ControlState;
|
|
385
410
|
/** Update global state (apiKey only) */
|
|
386
411
|
setApiKey: (apiKey: string | null) => void;
|
|
387
|
-
/** Ingest secrets into the backend vault, returns opaque handles
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
/**
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
/**
|
|
398
|
-
|
|
412
|
+
/** Ingest secrets into the backend vault, returns opaque handles. Pass
|
|
413
|
+
* `app` to scope to the per-app store; omit for the flat client store
|
|
414
|
+
* (BYOK / STREAM / legacy). */
|
|
415
|
+
ingestSecrets: (secrets: Record<string, string>, app?: string) => Promise<Record<string, string>>;
|
|
416
|
+
/** Clear secrets from the backend vault. With `app`, clears only that
|
|
417
|
+
* app's per-app slots; without, wipes the entire client (flat + app). */
|
|
418
|
+
clearSecrets: (app?: string) => Promise<void>;
|
|
419
|
+
/** Remove a single secret. With `app`, targets the per-app store under
|
|
420
|
+
* that scope; without, targets the flat store. */
|
|
421
|
+
deleteSecret: (name: string, app?: string) => Promise<void>;
|
|
422
|
+
/** Return the names of slots filled per app for this client. Source of
|
|
423
|
+
* truth for the Secrets settings page (no values are returned). */
|
|
424
|
+
listSecrets: () => Promise<Record<string, string[]>>;
|
|
425
|
+
/** Store a BYOK entry for an LLM provider in localStorage and ingest into backend vault */
|
|
426
|
+
setByok: (provider: string, apiKey: string, label?: string) => Promise<void>;
|
|
427
|
+
/** Remove a BYOK entry from localStorage and backend vault */
|
|
428
|
+
removeByok: (provider: string) => Promise<void>;
|
|
429
|
+
/** Get all stored BYOK entries (metadata only — keys are in state.byokKeys) */
|
|
430
|
+
getByokKeys: () => Record<string, StoredByokKey>;
|
|
431
|
+
/** Check if a BYOK entry is stored */
|
|
432
|
+
hasByok: (provider?: string) => boolean;
|
|
399
433
|
/** Fetch available models from backend */
|
|
400
434
|
getAvailableModels: () => Promise<string[]>;
|
|
401
435
|
/** Fetch authorized apps from backend */
|
|
@@ -441,4 +475,4 @@ type ControlContextProviderProps = {
|
|
|
441
475
|
};
|
|
442
476
|
declare function ControlContextProvider({ children, aomiClient, sessionId, publicKey, getThreadMetadata, updateThreadMetadata, }: ControlContextProviderProps): react_jsx_runtime.JSX.Element;
|
|
443
477
|
|
|
444
|
-
export { type AomiRuntimeApi, AomiRuntimeProvider, type AomiRuntimeProviderProps, type
|
|
478
|
+
export { type AomiRuntimeApi, AomiRuntimeProvider, type AomiRuntimeProviderProps, type ControlContextApi, ControlContextProvider, type ControlContextProviderProps, type ControlState, type EventContext, EventContextProvider, type EventContextProviderProps, type EventSubscriber, ExtUserProvider, type InboundEvent, type ModelSelectionMode, type Notification$1 as Notification, type NotificationApi, NotificationContextProvider, type NotificationContextProviderProps, type NotificationContextApi as NotificationContextValue, type NotificationHandlerConfig, type NotificationType, RuntimeUserStateProvider, type SSEStatus, SUPPORTED_CHAINS, type NotificationData as ShowNotificationParams, type StoredByokKey, type StoredModelPreference, type ThreadContext, ThreadContextProvider, type ThreadControlState, type ThreadMetadata, type UserConfig, type WalletHandlerApi, type WalletHandlerConfig, type WalletRequestStatus, cn, formatAddress, getChainInfo, getNetworkName, initThreadControl, resolveAutoModel, useAomiRuntime, useControl, useCurrentThreadMessages, useCurrentThreadMetadata, useEventContext, useNotification, useNotificationHandler, useThreadContext, useUser, useWalletHandler };
|