lumiverse-spindle-types 0.6.48 → 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/api.d.ts +9 -0
- package/dist/client.d.ts +31 -0
- package/dist/client.js +4 -0
- package/dist/dom.d.ts +3 -0
- package/dist/host.d.ts +18 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1 -0
- package/dist/permissions.d.ts +1 -1
- package/dist/spindle-api.d.ts +13 -2
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -4887,6 +4887,15 @@ export type WorkerToHost = import("./decisions.js").DecisionWorkerMessage | impo
|
|
|
4887
4887
|
} | {
|
|
4888
4888
|
type: "version_get_frontend";
|
|
4889
4889
|
requestId: string;
|
|
4890
|
+
} | {
|
|
4891
|
+
type: "version_get_commit";
|
|
4892
|
+
requestId: string;
|
|
4893
|
+
} | {
|
|
4894
|
+
type: "version_get_branch";
|
|
4895
|
+
requestId: string;
|
|
4896
|
+
} | {
|
|
4897
|
+
type: "version_get_info";
|
|
4898
|
+
requestId: string;
|
|
4890
4899
|
} | {
|
|
4891
4900
|
type: "tokens_count_text";
|
|
4892
4901
|
requestId: string;
|
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/host.d.ts
CHANGED
|
@@ -13,6 +13,24 @@ export interface SpindleHostDescriptorV1 {
|
|
|
13
13
|
readonly capabilities: Readonly<Record<string, number>>;
|
|
14
14
|
readonly extensionInstallationId: string;
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Version report for the running Lumiverse install, returned by
|
|
18
|
+
* `spindle.version.getInfo()` (free tier — no permission needed).
|
|
19
|
+
*/
|
|
20
|
+
export interface LumiverseVersionInfo {
|
|
21
|
+
/** Backend server semantic version (e.g. `"1.2.5"`). */
|
|
22
|
+
readonly backend: string;
|
|
23
|
+
/** Frontend bundle semantic version (e.g. `"1.2.5"`). */
|
|
24
|
+
readonly frontend: string;
|
|
25
|
+
/**
|
|
26
|
+
* Commit the running build was made from (e.g. `"26939aa5"`), or `null`
|
|
27
|
+
* when unavailable — Docker images, detached/non-git installs, and other
|
|
28
|
+
* builds without git metadata report `null` rather than guessing.
|
|
29
|
+
*/
|
|
30
|
+
readonly commit: string | null;
|
|
31
|
+
/** Branch the running build was made from, or `null` when unavailable or HEAD is detached. */
|
|
32
|
+
readonly branch: string | null;
|
|
33
|
+
}
|
|
16
34
|
/** Locale identifiers supplied by the host's active UI locale. */
|
|
17
35
|
export type SpindleHostLocale = "en" | "zh" | "zh-TW" | "ja" | "fr" | "it";
|
|
18
36
|
/** Synchronous host locale lookup with a removable live-change subscription. */
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export type { DecisionJsonValue, DecisionDescription, DecisionState, DecisionQuestion, DecisionAnswer, DecisionAnswerFor, DecisionAnswers, DecisionResult, DecisionEvaluationInput, DecisionConnectionProfileDTO, DecisionModelDTO, DecisionProviderDTO, SpindleDecisionsAPI, DecisionWorkerMessage } from "./decisions.js";
|
|
2
2
|
export type { SpindleManifest, SpindlePermission, SpindleCapability, } from "./manifest.js";
|
|
3
3
|
export { IDENTIFIER_PATTERN, validateIdentifier, } from "./manifest.js";
|
|
4
|
-
export type { SpindleHostDescriptorV1, SpindleHostLocale, SpindleHostLocaleAPI, } from "./host.js";
|
|
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";
|
package/dist/permissions.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Gated permissions that extensions must declare in spindle.json.
|
|
3
3
|
*
|
|
4
|
-
* Free tier (no declaration needed): events, storage, macros, dom, variables
|
|
4
|
+
* Free tier (no declaration needed): events, storage, macros, dom, variables, version
|
|
5
5
|
*
|
|
6
6
|
* Gated tier (must declare):
|
|
7
7
|
* - "decisions" — inspect and invoke saved Decision model connections
|
package/dist/spindle-api.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SpindleManifest } from "./manifest.js";
|
|
2
|
-
import type { SpindleHostDescriptorV1 } from "./host.js";
|
|
2
|
+
import type { LumiverseVersionInfo, SpindleHostDescriptorV1 } from "./host.js";
|
|
3
3
|
import type { SpindleDesktopAPI } from "./desktop-capture.js";
|
|
4
4
|
import type { SpindleFilesAPI, SpindleArchivesAPI } from "./file-transfers.js";
|
|
5
5
|
import type { SpindleTextEditorOptions, SpindleTextEditorResult } from "./dom.js";
|
|
@@ -2214,13 +2214,24 @@ export interface SpindleAPI {
|
|
|
2214
2214
|
/**
|
|
2215
2215
|
* Lumiverse version info (free tier — no permission needed).
|
|
2216
2216
|
* Returns the semantic version strings reported by the backend server
|
|
2217
|
-
* and frontend bundle
|
|
2217
|
+
* and frontend bundle, plus the commit and branch the build was made
|
|
2218
|
+
* from when available. Useful for feature gating or compatibility checks.
|
|
2218
2219
|
*/
|
|
2219
2220
|
version: {
|
|
2220
2221
|
/** Get the backend server's semantic version (e.g. `"0.8.7"`). */
|
|
2221
2222
|
getBackend(): Promise<string>;
|
|
2222
2223
|
/** Get the frontend's semantic version (e.g. `"0.8.7"`). */
|
|
2223
2224
|
getFrontend(): Promise<string>;
|
|
2225
|
+
/**
|
|
2226
|
+
* Get the commit the running build was made from (e.g. `"26939aa5"`),
|
|
2227
|
+
* or `null` when unavailable (Docker images and other builds without
|
|
2228
|
+
* git metadata report `null` rather than guessing).
|
|
2229
|
+
*/
|
|
2230
|
+
getCommit(): Promise<string | null>;
|
|
2231
|
+
/** Get the branch the running build was made from, or `null` when unavailable or HEAD is detached. */
|
|
2232
|
+
getBranch(): Promise<string | null>;
|
|
2233
|
+
/** Get the backend/frontend semver, commit, and branch as a single report. */
|
|
2234
|
+
getInfo(): Promise<LumiverseVersionInfo>;
|
|
2224
2235
|
};
|
|
2225
2236
|
/** This extension's manifest */
|
|
2226
2237
|
manifest: SpindleManifest;
|