lumiverse-spindle-types 0.6.52 → 0.6.53

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 CHANGED
@@ -3381,7 +3381,7 @@ export interface ProviderManager {
3381
3381
  key: ProviderKeyDTO;
3382
3382
  }) => void): () => void;
3383
3383
  }
3384
- export type WorkerToHost = import("./decisions.js").DecisionWorkerMessage | import("./file-transfers.js").FileTransferWorkerMessage | import("./desktop-capture.js").DesktopCaptureWorkerMessage | {
3384
+ export type WorkerToHost = import("./decisions.js").DecisionWorkerMessage | import("./embeddings.js").EmbeddingsWorkerMessage | import("./file-transfers.js").FileTransferWorkerMessage | import("./desktop-capture.js").DesktopCaptureWorkerMessage | {
3385
3385
  type: "subscribe_event";
3386
3386
  event: string;
3387
3387
  } | {
@@ -0,0 +1,51 @@
1
+ /** Embeddings with the user's embedding connections. Requires the embeddings permission and the embeddings-v1 host capability. */
2
+ /** A saved embedding connection (Settings > Embeddings). The API key never leaves the host. */
3
+ export interface EmbeddingConnectionDTO {
4
+ id: string;
5
+ name: string;
6
+ provider: string;
7
+ model: string;
8
+ /** Configured output size, or `null` when the provider's native size is used. */
9
+ dimensions: number | null;
10
+ enabled: boolean;
11
+ /** The user's main embedding connection; used when `connection_id` is omitted. */
12
+ is_primary: boolean;
13
+ has_api_key: boolean;
14
+ }
15
+ export interface EmbeddingsEmbedInput {
16
+ /** 1-256 non-empty texts, each at most 8192 characters. */
17
+ texts: string[];
18
+ /** A connection from `listConnections()`. Default: the user's primary embedding connection. Fallback connections are never used. */
19
+ connection_id?: string;
20
+ /** Asymmetric models (Cohere, NVIDIA NIM) embed search queries and stored passages differently. Default: `"passage"`. */
21
+ input_type?: "query" | "passage";
22
+ userId?: string;
23
+ }
24
+ export interface EmbeddingsEmbedResult {
25
+ /** One vector per input text, in input order. */
26
+ embeddings: number[][];
27
+ /** The connection that produced every vector in this result. */
28
+ connection_id: string;
29
+ model: string;
30
+ dimensions: number;
31
+ }
32
+ export interface SpindleEmbeddingsAPI {
33
+ listConnections(options?: {
34
+ userId?: string;
35
+ }): Promise<EmbeddingConnectionDTO[]>;
36
+ embed(input: EmbeddingsEmbedInput, options?: {
37
+ signal?: AbortSignal;
38
+ }): Promise<EmbeddingsEmbedResult>;
39
+ }
40
+ export type EmbeddingsWorkerMessage = {
41
+ type: "embeddings_connections_list";
42
+ requestId: string;
43
+ userId?: string;
44
+ } | {
45
+ type: "embeddings_embed";
46
+ requestId: string;
47
+ input: EmbeddingsEmbedInput;
48
+ } | {
49
+ type: "embeddings_cancel";
50
+ requestId: string;
51
+ };
@@ -0,0 +1 @@
1
+ export {};
package/dist/host.js CHANGED
@@ -13,6 +13,7 @@ export const SPINDLE_HOST_CAPABILITIES = Object.freeze({
13
13
  "mcp-servers-v1": 1,
14
14
  "decisions-v1": 1,
15
15
  "decision-images-v1": 1,
16
+ "embeddings-v1": 1,
16
17
  "file-transfers-v1": 1,
17
18
  });
18
19
  /** Structured error code returned when host compatibility validation fails. */
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export type { DecisionImageAsset, DecisionBox, DecisionJsonValue, DecisionDescription, DecisionState, DecisionQuestion, DecisionAnswer, DecisionAnswerFor, DecisionAnswers, DecisionResult, DecisionEvaluationInput, DecisionConnectionProfileDTO, DecisionModelDTO, DecisionProviderDTO, SpindleDecisionsAPI, DecisionWorkerMessage } from "./decisions.js";
2
+ export type { EmbeddingConnectionDTO, EmbeddingsEmbedInput, EmbeddingsEmbedResult, SpindleEmbeddingsAPI, EmbeddingsWorkerMessage } from "./embeddings.js";
2
3
  export type { SpindleManifest, SpindlePermission, SpindleCapability, } from "./manifest.js";
3
4
  export { IDENTIFIER_PATTERN, validateIdentifier, } from "./manifest.js";
4
5
  export type { LumiverseVersionInfo, SpindleHostDescriptorV1, SpindleHostLocale, SpindleHostLocaleAPI, } from "./host.js";
@@ -5,6 +5,7 @@
5
5
  *
6
6
  * Gated tier (must declare):
7
7
  * - "decisions" — inspect and invoke saved Decision model connections
8
+ * - "embeddings" — list the user's embedding connections and embed text with them
8
9
  * - "generation" — fire generations on behalf of user
9
10
  * - "interceptor" — pre-generation prompt modification
10
11
  * - "tools" — register LLM tools
@@ -42,6 +43,6 @@
42
43
  * device is playing (never samples), desktop client only. Privileged;
43
44
  * the host asks the user on every start.
44
45
  */
45
- export type SpindlePermission = "screen_capture" | "screen_recording" | "system_audio" | "generation" | "interceptor" | "tools" | "cors_proxy" | "context_handler" | "ephemeral_storage" | "chat_mutation" | "event_tracking" | "ui_panels" | "app_manipulation" | "oauth" | "characters" | "chats" | "presets" | "world_books" | "regex_scripts" | "regex_scripts_unrestricted" | "databanks" | "memories" | "media" | "personas" | "push_notification" | "decisions" | "image_gen" | "images" | "generation_parameters" | "macro_interceptor" | "web_search" | "unsafe_eval" | "final_response" | "providers.embedding.register" | "providers.tts.register" | "providers.stt.register" | "providers.sidecar.register" | "mcp_servers" | "mcp_servers.create";
46
+ export type SpindlePermission = "screen_capture" | "screen_recording" | "system_audio" | "generation" | "interceptor" | "tools" | "cors_proxy" | "context_handler" | "ephemeral_storage" | "chat_mutation" | "event_tracking" | "ui_panels" | "app_manipulation" | "oauth" | "characters" | "chats" | "presets" | "world_books" | "regex_scripts" | "regex_scripts_unrestricted" | "databanks" | "memories" | "media" | "personas" | "push_notification" | "decisions" | "embeddings" | "image_gen" | "images" | "generation_parameters" | "macro_interceptor" | "web_search" | "unsafe_eval" | "final_response" | "providers.embedding.register" | "providers.tts.register" | "providers.stt.register" | "providers.sidecar.register" | "mcp_servers" | "mcp_servers.create";
46
47
  export declare const ALL_PERMISSIONS: readonly SpindlePermission[];
47
48
  export declare function isValidPermission(p: string): p is SpindlePermission;
@@ -25,6 +25,7 @@ export const ALL_PERMISSIONS = [
25
25
  "personas",
26
26
  "push_notification",
27
27
  "decisions",
28
+ "embeddings",
28
29
  "image_gen",
29
30
  "images",
30
31
  "generation_parameters",
@@ -136,6 +136,8 @@ export interface SpindleConnectionsAPI {
136
136
  export interface SpindleAPI {
137
137
  /** Typed Decision models (permission: decisions; host capability: decisions-v1). */
138
138
  decisions: import("./decisions.js").SpindleDecisionsAPI;
139
+ /** Embed text with the user's embedding connections (permission: embeddings; host capability: embeddings-v1). */
140
+ embeddings: import("./embeddings.js").SpindleEmbeddingsAPI;
139
141
  /** Disk-backed downloads and bounded reads/writes. Available with file-transfers-v1. */
140
142
  readonly files: SpindleFilesAPI;
141
143
  /** Streaming ZIP64 creation and validated disk-backed extraction. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lumiverse-spindle-types",
3
- "version": "0.6.52",
3
+ "version": "0.6.53",
4
4
  "type": "module",
5
5
  "types": "./dist/index.d.ts",
6
6
  "keywords": [