@retion-miniapp/react-native 0.23.1 → 0.24.0
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.d.mts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +9 -9
- package/dist/index.mjs +11 -11
- package/docs/MINIAPP_README.md +46 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -370,6 +370,11 @@ interface MiniAppAgentProvider {
|
|
|
370
370
|
text: string;
|
|
371
371
|
payload_meta: Record<string, unknown>;
|
|
372
372
|
}) => Promise<MiniAppAgentSendResult> | MiniAppAgentSendResult;
|
|
373
|
+
/** Mini app báo tác vụ agent giao đã xong (reportAgentTaskDone) → app kết thúc lượt. Không gửi lên agent. */
|
|
374
|
+
taskDone?: (args: {
|
|
375
|
+
app_id: string;
|
|
376
|
+
agent_id?: string;
|
|
377
|
+
}) => void;
|
|
373
378
|
/**
|
|
374
379
|
* Nghe chat: gọi emit.message với MỌI gói socket của hội thoại agent (nguyên vẹn), emit.stopped khi người dùng
|
|
375
380
|
* dừng lượt (bỏ qua dừng nội bộ). Trả hàm huỷ.
|
|
@@ -1158,7 +1163,10 @@ declare const AGENT_MESSAGE_EVENT = "retion.ai.message";
|
|
|
1158
1163
|
declare const AGENT_STOPPED_EVENT = "retion.ai.stopped";
|
|
1159
1164
|
declare const AGENT_PAYLOAD_META_EVENT = "retion.ai.payload_meta";
|
|
1160
1165
|
declare const AGENT_PAYLOAD_META_RESULT_EVENT = "retion.ai.payload_meta_result";
|
|
1166
|
+
declare const AGENT_TASK_DONE_EVENT = "retion.ai.task_done";
|
|
1167
|
+
/** Mini app của agent có cam kết báo tác vụ xong (setAgent({ report_task_done: true })) không. */
|
|
1168
|
+
declare const agentReportsTaskDone: (agent_id: string) => boolean;
|
|
1161
1169
|
/** App nào đang dùng agent (theo retion.ai.agent web đã báo). */
|
|
1162
1170
|
declare const getMiniAppIdByAgentId: (agent_id: string) => string | null;
|
|
1163
1171
|
|
|
1164
|
-
export { AGENT_BRIDGE_VERSION, AGENT_MESSAGE_EVENT, AGENT_PAYLOAD_META_EVENT, AGENT_PAYLOAD_META_RESULT_EVENT, AGENT_STOPPED_EVENT, CodeType, DEFAULT_MINIAPP_UPDATES_LABELS, DefaultMiniAppChangelogHistoryModal, DefaultMiniAppChangelogPrompt, DefaultMiniAppSplash, DefaultMiniAppUpdatePrompt, type InlineToken, type LocationOptions, type LocationResult, MINIAPP_CHANGELOG_KINDS, MINIAPP_PLATFORM_URL, type MiniAppAgentProvider, type MiniAppAgentSendResult, type MiniAppBiometricAvailability, type MiniAppBiometricRequest, type MiniAppBiometricResult, type MiniAppBiometrics, type MiniAppBiometryType, type MiniAppBridgeOptions, type MiniAppCatalogEntry, type MiniAppCatalogItem, type MiniAppChangelog, type MiniAppChangelogActionsProps, MiniAppChangelogGroups, MiniAppChangelogHistory, type MiniAppChangelogHistoryRequest, type MiniAppChangelogKindStyle, type MiniAppChangelogPromptProps, type MiniAppChangelogRequest, type MiniAppChangelogState, MiniAppChangelogText, type MiniAppChangelogVersion, type MiniAppChannel, type MiniAppConfig, type MiniAppContainerProps, type MiniAppContext, type MiniAppDownloadState, type MiniAppDownloadStatus, type MiniAppDownloadTask, type MiniAppEvent, type MiniAppFileSystem, type MiniAppHandlerContext, type MiniAppHapticType, type MiniAppHistoryHeaderProps, _default$1 as MiniAppHost, type MiniAppHostData, BridgeError as MiniAppHostError, type MiniAppHostProps, type MiniAppKeepAlive, type MiniAppKeyboardMode, type MiniAppLaunch, type MiniAppLocalBundle, type MiniAppManifest, type MiniAppNativeHandlers, type MiniAppPaymentRequest, type MiniAppPaymentResult, type MiniAppPendingChangelog, type MiniAppPermission, type MiniAppPickedFile, type MiniAppSpeechProvider, type MiniAppSpeechStartContext, type MiniAppSplashProps, type MiniAppStorage, type MiniAppSyncResult, type MiniAppUpdate, type MiniAppUpdateActionProps, type MiniAppUpdatePromptProps, _default as MiniAppUpdates, type MiniAppUpdatesLabels, type MiniAppUpdatesProps, type MiniAppUpdatesTheme, MiniAppUpdatesThemeProvider, type MiniAppUploadCaller, type MiniAppUploadOptions, type MiniAppUploadProcessOptions, type MiniAppUploadProcessor, type MiniAppUploadRequest, type MiniAppUploadSource, type MiniAppUploadSourceRequest, type MiniAppUploadTarget, type MiniAppUploader, type MiniAppUrlUploadTarget, type OpenMiniAppArgs, type ReactNativeBiometricsLike, ScannerEndReason, ScannerEvent, ScannerLayout, ScannerMethod, type ScannerOptions, type ScannerResult, type SpeechOptions, ToastType, type UploadCapabilities, type UploadFileType, type UploadFilesResult, type UploadedFile, closeMiniApp, closeMiniAppChangelogHistory, configureMiniApp, createMmkvStorage, createReactNativeBiometrics, createRnfsFileSystem, dismissMiniAppChangelog, ensureMiniApp, fetchMiniAppChangelog, getLocalMiniApp, getMiniAppCatalog, getMiniAppCatalogEntry, getMiniAppChangelogSeen, getMiniAppIdByAgentId, getMiniAppStatuses, getMiniAppUpdate, getPendingChangelog, installBundledMiniApp, markMiniAppChangelogSeen, mergeMiniAppChangelog, onMiniAppEvent, openMiniApp, parseInlineMarkdown, pauseMiniApp, pauseMiniAppDownloads, preloadMiniApp, releaseSpeechFor, resolveMiniAppUpdatesTheme, restoreMiniApp, resumeMiniApp, resumeMiniAppDownloads, sendEventToWeb, showMiniAppChangelog, showMiniAppChangelogHistory, stripInlineMarkdown, syncMiniAppCatalog, uninstallMiniApp, updateMiniApp, uploadToUrl, useMiniAppChangelog, useMiniAppChangelogHistoryRequest, useMiniAppChangelogRequest, useMiniAppDownload, useMiniAppDownloadsPaused, useMiniAppUpdatesTheme };
|
|
1172
|
+
export { AGENT_BRIDGE_VERSION, AGENT_MESSAGE_EVENT, AGENT_PAYLOAD_META_EVENT, AGENT_PAYLOAD_META_RESULT_EVENT, AGENT_STOPPED_EVENT, AGENT_TASK_DONE_EVENT, CodeType, DEFAULT_MINIAPP_UPDATES_LABELS, DefaultMiniAppChangelogHistoryModal, DefaultMiniAppChangelogPrompt, DefaultMiniAppSplash, DefaultMiniAppUpdatePrompt, type InlineToken, type LocationOptions, type LocationResult, MINIAPP_CHANGELOG_KINDS, MINIAPP_PLATFORM_URL, type MiniAppAgentProvider, type MiniAppAgentSendResult, type MiniAppBiometricAvailability, type MiniAppBiometricRequest, type MiniAppBiometricResult, type MiniAppBiometrics, type MiniAppBiometryType, type MiniAppBridgeOptions, type MiniAppCatalogEntry, type MiniAppCatalogItem, type MiniAppChangelog, type MiniAppChangelogActionsProps, MiniAppChangelogGroups, MiniAppChangelogHistory, type MiniAppChangelogHistoryRequest, type MiniAppChangelogKindStyle, type MiniAppChangelogPromptProps, type MiniAppChangelogRequest, type MiniAppChangelogState, MiniAppChangelogText, type MiniAppChangelogVersion, type MiniAppChannel, type MiniAppConfig, type MiniAppContainerProps, type MiniAppContext, type MiniAppDownloadState, type MiniAppDownloadStatus, type MiniAppDownloadTask, type MiniAppEvent, type MiniAppFileSystem, type MiniAppHandlerContext, type MiniAppHapticType, type MiniAppHistoryHeaderProps, _default$1 as MiniAppHost, type MiniAppHostData, BridgeError as MiniAppHostError, type MiniAppHostProps, type MiniAppKeepAlive, type MiniAppKeyboardMode, type MiniAppLaunch, type MiniAppLocalBundle, type MiniAppManifest, type MiniAppNativeHandlers, type MiniAppPaymentRequest, type MiniAppPaymentResult, type MiniAppPendingChangelog, type MiniAppPermission, type MiniAppPickedFile, type MiniAppSpeechProvider, type MiniAppSpeechStartContext, type MiniAppSplashProps, type MiniAppStorage, type MiniAppSyncResult, type MiniAppUpdate, type MiniAppUpdateActionProps, type MiniAppUpdatePromptProps, _default as MiniAppUpdates, type MiniAppUpdatesLabels, type MiniAppUpdatesProps, type MiniAppUpdatesTheme, MiniAppUpdatesThemeProvider, type MiniAppUploadCaller, type MiniAppUploadOptions, type MiniAppUploadProcessOptions, type MiniAppUploadProcessor, type MiniAppUploadRequest, type MiniAppUploadSource, type MiniAppUploadSourceRequest, type MiniAppUploadTarget, type MiniAppUploader, type MiniAppUrlUploadTarget, type OpenMiniAppArgs, type ReactNativeBiometricsLike, ScannerEndReason, ScannerEvent, ScannerLayout, ScannerMethod, type ScannerOptions, type ScannerResult, type SpeechOptions, ToastType, type UploadCapabilities, type UploadFileType, type UploadFilesResult, type UploadedFile, agentReportsTaskDone, closeMiniApp, closeMiniAppChangelogHistory, configureMiniApp, createMmkvStorage, createReactNativeBiometrics, createRnfsFileSystem, dismissMiniAppChangelog, ensureMiniApp, fetchMiniAppChangelog, getLocalMiniApp, getMiniAppCatalog, getMiniAppCatalogEntry, getMiniAppChangelogSeen, getMiniAppIdByAgentId, getMiniAppStatuses, getMiniAppUpdate, getPendingChangelog, installBundledMiniApp, markMiniAppChangelogSeen, mergeMiniAppChangelog, onMiniAppEvent, openMiniApp, parseInlineMarkdown, pauseMiniApp, pauseMiniAppDownloads, preloadMiniApp, releaseSpeechFor, resolveMiniAppUpdatesTheme, restoreMiniApp, resumeMiniApp, resumeMiniAppDownloads, sendEventToWeb, showMiniAppChangelog, showMiniAppChangelogHistory, stripInlineMarkdown, syncMiniAppCatalog, uninstallMiniApp, updateMiniApp, uploadToUrl, useMiniAppChangelog, useMiniAppChangelogHistoryRequest, useMiniAppChangelogRequest, useMiniAppDownload, useMiniAppDownloadsPaused, useMiniAppUpdatesTheme };
|
package/dist/index.d.ts
CHANGED
|
@@ -370,6 +370,11 @@ interface MiniAppAgentProvider {
|
|
|
370
370
|
text: string;
|
|
371
371
|
payload_meta: Record<string, unknown>;
|
|
372
372
|
}) => Promise<MiniAppAgentSendResult> | MiniAppAgentSendResult;
|
|
373
|
+
/** Mini app báo tác vụ agent giao đã xong (reportAgentTaskDone) → app kết thúc lượt. Không gửi lên agent. */
|
|
374
|
+
taskDone?: (args: {
|
|
375
|
+
app_id: string;
|
|
376
|
+
agent_id?: string;
|
|
377
|
+
}) => void;
|
|
373
378
|
/**
|
|
374
379
|
* Nghe chat: gọi emit.message với MỌI gói socket của hội thoại agent (nguyên vẹn), emit.stopped khi người dùng
|
|
375
380
|
* dừng lượt (bỏ qua dừng nội bộ). Trả hàm huỷ.
|
|
@@ -1158,7 +1163,10 @@ declare const AGENT_MESSAGE_EVENT = "retion.ai.message";
|
|
|
1158
1163
|
declare const AGENT_STOPPED_EVENT = "retion.ai.stopped";
|
|
1159
1164
|
declare const AGENT_PAYLOAD_META_EVENT = "retion.ai.payload_meta";
|
|
1160
1165
|
declare const AGENT_PAYLOAD_META_RESULT_EVENT = "retion.ai.payload_meta_result";
|
|
1166
|
+
declare const AGENT_TASK_DONE_EVENT = "retion.ai.task_done";
|
|
1167
|
+
/** Mini app của agent có cam kết báo tác vụ xong (setAgent({ report_task_done: true })) không. */
|
|
1168
|
+
declare const agentReportsTaskDone: (agent_id: string) => boolean;
|
|
1161
1169
|
/** App nào đang dùng agent (theo retion.ai.agent web đã báo). */
|
|
1162
1170
|
declare const getMiniAppIdByAgentId: (agent_id: string) => string | null;
|
|
1163
1171
|
|
|
1164
|
-
export { AGENT_BRIDGE_VERSION, AGENT_MESSAGE_EVENT, AGENT_PAYLOAD_META_EVENT, AGENT_PAYLOAD_META_RESULT_EVENT, AGENT_STOPPED_EVENT, CodeType, DEFAULT_MINIAPP_UPDATES_LABELS, DefaultMiniAppChangelogHistoryModal, DefaultMiniAppChangelogPrompt, DefaultMiniAppSplash, DefaultMiniAppUpdatePrompt, type InlineToken, type LocationOptions, type LocationResult, MINIAPP_CHANGELOG_KINDS, MINIAPP_PLATFORM_URL, type MiniAppAgentProvider, type MiniAppAgentSendResult, type MiniAppBiometricAvailability, type MiniAppBiometricRequest, type MiniAppBiometricResult, type MiniAppBiometrics, type MiniAppBiometryType, type MiniAppBridgeOptions, type MiniAppCatalogEntry, type MiniAppCatalogItem, type MiniAppChangelog, type MiniAppChangelogActionsProps, MiniAppChangelogGroups, MiniAppChangelogHistory, type MiniAppChangelogHistoryRequest, type MiniAppChangelogKindStyle, type MiniAppChangelogPromptProps, type MiniAppChangelogRequest, type MiniAppChangelogState, MiniAppChangelogText, type MiniAppChangelogVersion, type MiniAppChannel, type MiniAppConfig, type MiniAppContainerProps, type MiniAppContext, type MiniAppDownloadState, type MiniAppDownloadStatus, type MiniAppDownloadTask, type MiniAppEvent, type MiniAppFileSystem, type MiniAppHandlerContext, type MiniAppHapticType, type MiniAppHistoryHeaderProps, _default$1 as MiniAppHost, type MiniAppHostData, BridgeError as MiniAppHostError, type MiniAppHostProps, type MiniAppKeepAlive, type MiniAppKeyboardMode, type MiniAppLaunch, type MiniAppLocalBundle, type MiniAppManifest, type MiniAppNativeHandlers, type MiniAppPaymentRequest, type MiniAppPaymentResult, type MiniAppPendingChangelog, type MiniAppPermission, type MiniAppPickedFile, type MiniAppSpeechProvider, type MiniAppSpeechStartContext, type MiniAppSplashProps, type MiniAppStorage, type MiniAppSyncResult, type MiniAppUpdate, type MiniAppUpdateActionProps, type MiniAppUpdatePromptProps, _default as MiniAppUpdates, type MiniAppUpdatesLabels, type MiniAppUpdatesProps, type MiniAppUpdatesTheme, MiniAppUpdatesThemeProvider, type MiniAppUploadCaller, type MiniAppUploadOptions, type MiniAppUploadProcessOptions, type MiniAppUploadProcessor, type MiniAppUploadRequest, type MiniAppUploadSource, type MiniAppUploadSourceRequest, type MiniAppUploadTarget, type MiniAppUploader, type MiniAppUrlUploadTarget, type OpenMiniAppArgs, type ReactNativeBiometricsLike, ScannerEndReason, ScannerEvent, ScannerLayout, ScannerMethod, type ScannerOptions, type ScannerResult, type SpeechOptions, ToastType, type UploadCapabilities, type UploadFileType, type UploadFilesResult, type UploadedFile, closeMiniApp, closeMiniAppChangelogHistory, configureMiniApp, createMmkvStorage, createReactNativeBiometrics, createRnfsFileSystem, dismissMiniAppChangelog, ensureMiniApp, fetchMiniAppChangelog, getLocalMiniApp, getMiniAppCatalog, getMiniAppCatalogEntry, getMiniAppChangelogSeen, getMiniAppIdByAgentId, getMiniAppStatuses, getMiniAppUpdate, getPendingChangelog, installBundledMiniApp, markMiniAppChangelogSeen, mergeMiniAppChangelog, onMiniAppEvent, openMiniApp, parseInlineMarkdown, pauseMiniApp, pauseMiniAppDownloads, preloadMiniApp, releaseSpeechFor, resolveMiniAppUpdatesTheme, restoreMiniApp, resumeMiniApp, resumeMiniAppDownloads, sendEventToWeb, showMiniAppChangelog, showMiniAppChangelogHistory, stripInlineMarkdown, syncMiniAppCatalog, uninstallMiniApp, updateMiniApp, uploadToUrl, useMiniAppChangelog, useMiniAppChangelogHistoryRequest, useMiniAppChangelogRequest, useMiniAppDownload, useMiniAppDownloadsPaused, useMiniAppUpdatesTheme };
|
|
1172
|
+
export { AGENT_BRIDGE_VERSION, AGENT_MESSAGE_EVENT, AGENT_PAYLOAD_META_EVENT, AGENT_PAYLOAD_META_RESULT_EVENT, AGENT_STOPPED_EVENT, AGENT_TASK_DONE_EVENT, CodeType, DEFAULT_MINIAPP_UPDATES_LABELS, DefaultMiniAppChangelogHistoryModal, DefaultMiniAppChangelogPrompt, DefaultMiniAppSplash, DefaultMiniAppUpdatePrompt, type InlineToken, type LocationOptions, type LocationResult, MINIAPP_CHANGELOG_KINDS, MINIAPP_PLATFORM_URL, type MiniAppAgentProvider, type MiniAppAgentSendResult, type MiniAppBiometricAvailability, type MiniAppBiometricRequest, type MiniAppBiometricResult, type MiniAppBiometrics, type MiniAppBiometryType, type MiniAppBridgeOptions, type MiniAppCatalogEntry, type MiniAppCatalogItem, type MiniAppChangelog, type MiniAppChangelogActionsProps, MiniAppChangelogGroups, MiniAppChangelogHistory, type MiniAppChangelogHistoryRequest, type MiniAppChangelogKindStyle, type MiniAppChangelogPromptProps, type MiniAppChangelogRequest, type MiniAppChangelogState, MiniAppChangelogText, type MiniAppChangelogVersion, type MiniAppChannel, type MiniAppConfig, type MiniAppContainerProps, type MiniAppContext, type MiniAppDownloadState, type MiniAppDownloadStatus, type MiniAppDownloadTask, type MiniAppEvent, type MiniAppFileSystem, type MiniAppHandlerContext, type MiniAppHapticType, type MiniAppHistoryHeaderProps, _default$1 as MiniAppHost, type MiniAppHostData, BridgeError as MiniAppHostError, type MiniAppHostProps, type MiniAppKeepAlive, type MiniAppKeyboardMode, type MiniAppLaunch, type MiniAppLocalBundle, type MiniAppManifest, type MiniAppNativeHandlers, type MiniAppPaymentRequest, type MiniAppPaymentResult, type MiniAppPendingChangelog, type MiniAppPermission, type MiniAppPickedFile, type MiniAppSpeechProvider, type MiniAppSpeechStartContext, type MiniAppSplashProps, type MiniAppStorage, type MiniAppSyncResult, type MiniAppUpdate, type MiniAppUpdateActionProps, type MiniAppUpdatePromptProps, _default as MiniAppUpdates, type MiniAppUpdatesLabels, type MiniAppUpdatesProps, type MiniAppUpdatesTheme, MiniAppUpdatesThemeProvider, type MiniAppUploadCaller, type MiniAppUploadOptions, type MiniAppUploadProcessOptions, type MiniAppUploadProcessor, type MiniAppUploadRequest, type MiniAppUploadSource, type MiniAppUploadSourceRequest, type MiniAppUploadTarget, type MiniAppUploader, type MiniAppUrlUploadTarget, type OpenMiniAppArgs, type ReactNativeBiometricsLike, ScannerEndReason, ScannerEvent, ScannerLayout, ScannerMethod, type ScannerOptions, type ScannerResult, type SpeechOptions, ToastType, type UploadCapabilities, type UploadFileType, type UploadFilesResult, type UploadedFile, agentReportsTaskDone, closeMiniApp, closeMiniAppChangelogHistory, configureMiniApp, createMmkvStorage, createReactNativeBiometrics, createRnfsFileSystem, dismissMiniAppChangelog, ensureMiniApp, fetchMiniAppChangelog, getLocalMiniApp, getMiniAppCatalog, getMiniAppCatalogEntry, getMiniAppChangelogSeen, getMiniAppIdByAgentId, getMiniAppStatuses, getMiniAppUpdate, getPendingChangelog, installBundledMiniApp, markMiniAppChangelogSeen, mergeMiniAppChangelog, onMiniAppEvent, openMiniApp, parseInlineMarkdown, pauseMiniApp, pauseMiniAppDownloads, preloadMiniApp, releaseSpeechFor, resolveMiniAppUpdatesTheme, restoreMiniApp, resumeMiniApp, resumeMiniAppDownloads, sendEventToWeb, showMiniAppChangelog, showMiniAppChangelogHistory, stripInlineMarkdown, syncMiniAppCatalog, uninstallMiniApp, updateMiniApp, uploadToUrl, useMiniAppChangelog, useMiniAppChangelogHistoryRequest, useMiniAppChangelogRequest, useMiniAppDownload, useMiniAppDownloadsPaused, useMiniAppUpdatesTheme };
|