lumiverse-spindle-types 0.6.49 → 0.6.50
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/client.d.ts +31 -0
- package/dist/client.js +4 -0
- package/dist/dom.d.ts +3 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** Frontend-only metadata; does not describe the backend server's platform. */
|
|
2
|
+
export declare const SPINDLE_CLIENT_HOST_CAPABILITIES: Readonly<{
|
|
3
|
+
readonly "client-info-v1": 1;
|
|
4
|
+
}>;
|
|
5
|
+
export type SpindleClientKind = "browser" | "pwa" | "desktop" | "mobile";
|
|
6
|
+
export type SpindleClientPlatform = "ios" | "android" | "macos" | "windows" | "linux" | "unknown";
|
|
7
|
+
/** A frozen snapshot of the document running this extension. */
|
|
8
|
+
export interface SpindleClientInfo {
|
|
9
|
+
/** Native shells take precedence over PWA display modes. */
|
|
10
|
+
readonly kind: SpindleClientKind;
|
|
11
|
+
/** Native identity when available, otherwise best-effort browser OS detection. */
|
|
12
|
+
readonly platform: SpindleClientPlatform;
|
|
13
|
+
/** Mobile OS/device identity, independent of viewport width; true for mobile apps too. */
|
|
14
|
+
readonly isMobile: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Callable native transports present in this document. These flags do not grant
|
|
17
|
+
* permissions or guarantee any particular command; also check the feature's
|
|
18
|
+
* host capability and availability API (for example, systemAudio.isAvailable()).
|
|
19
|
+
* Browser tabs and PWAs report false for every bridge.
|
|
20
|
+
*/
|
|
21
|
+
readonly bridges: {
|
|
22
|
+
readonly desktop: boolean;
|
|
23
|
+
readonly ios: boolean;
|
|
24
|
+
readonly android: boolean;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
/** Permission-free client detection, available with client-info-v1. */
|
|
28
|
+
export interface SpindleClientAPI {
|
|
29
|
+
/** Read current signals on each call without prompting or invoking native commands. */
|
|
30
|
+
getInfo(): SpindleClientInfo;
|
|
31
|
+
}
|
package/dist/client.js
ADDED
package/dist/dom.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { SpindleSTTAPI } from "./speech-to-text.js";
|
|
2
2
|
import type { SpindleSystemAudioAPI } from "./system-audio.js";
|
|
3
|
+
import type { SpindleClientAPI } from "./client.js";
|
|
3
4
|
import type { SpindleFileDownloadAPI } from "./file-transfers.js";
|
|
4
5
|
import type { ChatDTO, ChatMessageDTO, ChatUpdateDTO, ConnectionProfileDTO, LlmMessageDTO, PromptBlockDTO, PromptVariableValuesDTO, RequestInitDTO, TokenCountOptionsDTO, TokenCountResultDTO, WorldBookCreateDTO, WorldBookDTO, WorldBookEntryCreateDTO, WorldBookEntryDTO, WorldBookEntryUpdateDTO, WorldBookUpdateDTO } from "./api.js";
|
|
5
6
|
import type { SpindleComponentsHelper } from "./components.js";
|
|
@@ -1044,6 +1045,8 @@ export interface SpindleRecentChatsPage<TRow = SpindleRecentChat> {
|
|
|
1044
1045
|
}
|
|
1045
1046
|
/** Context object provided to frontend extension modules */
|
|
1046
1047
|
export interface SpindleFrontendContext {
|
|
1048
|
+
/** Current frontend client identity and native bridge discovery. Feature-detect client-info-v1. */
|
|
1049
|
+
readonly client?: SpindleClientAPI;
|
|
1047
1050
|
/** Native downloads of completed backend files. Available with file-transfers-v1. */
|
|
1048
1051
|
readonly files: SpindleFileDownloadAPI;
|
|
1049
1052
|
/** Host-managed STT. Feature-detect speech-to-text-v1; unavailable on older hosts. */
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ export type { DecisionJsonValue, DecisionDescription, DecisionState, DecisionQue
|
|
|
2
2
|
export type { SpindleManifest, SpindlePermission, SpindleCapability, } from "./manifest.js";
|
|
3
3
|
export { IDENTIFIER_PATTERN, validateIdentifier, } from "./manifest.js";
|
|
4
4
|
export type { LumiverseVersionInfo, SpindleHostDescriptorV1, SpindleHostLocale, SpindleHostLocaleAPI, } from "./host.js";
|
|
5
|
+
export type { SpindleClientKind, SpindleClientPlatform, SpindleClientInfo, SpindleClientAPI } from "./client.js";
|
|
6
|
+
export { SPINDLE_CLIENT_HOST_CAPABILITIES } from "./client.js";
|
|
5
7
|
export type { SpindleFileRef, SpindleFileSource, FileOperationOptions, FileFetchOptions, SpindleFileCreateInput, SpindleFileChunk, SpindleArchiveEntry, ArchiveCreateOptions, ArchiveExtractOptions, SpindleArchiveExtractedEntry, SpindleFilesAPI, SpindleArchivesAPI, SpindleFileDownloadAPI, FileTransferWorkerMessage, } from "./file-transfers.js";
|
|
6
8
|
export { SPINDLE_FILE_CHUNK_BYTES, SPINDLE_FILE_MAX_BYTES, SPINDLE_FILE_DEFAULT_MAX_BYTES, SPINDLE_FILE_TTL_MS, SPINDLE_FILE_MAX_COUNT, } from "./file-transfers.js";
|
|
7
9
|
export { SPINDLE_HOST_CAPABILITIES, SPINDLE_COMPATIBILITY_ERROR_CODE, } from "./host.js";
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { IDENTIFIER_PATTERN, validateIdentifier, } from "./manifest.js";
|
|
2
|
+
export { SPINDLE_CLIENT_HOST_CAPABILITIES } from "./client.js";
|
|
2
3
|
export { SPINDLE_FILE_CHUNK_BYTES, SPINDLE_FILE_MAX_BYTES, SPINDLE_FILE_DEFAULT_MAX_BYTES, SPINDLE_FILE_TTL_MS, SPINDLE_FILE_MAX_COUNT, } from "./file-transfers.js";
|
|
3
4
|
export { SPINDLE_HOST_CAPABILITIES, SPINDLE_COMPATIBILITY_ERROR_CODE, } from "./host.js";
|
|
4
5
|
export { SPINDLE_THEME_AUTHORING_HOST_CAPABILITIES } from "./theme.js";
|