lumiverse-spindle-types 0.4.46 → 0.4.48
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/package.json +1 -1
- package/src/api.ts +6 -0
- package/src/dom.ts +37 -0
- package/src/index.ts +7 -5
- package/src/tools.ts +2 -0
package/package.json
CHANGED
package/src/api.ts
CHANGED
|
@@ -179,6 +179,8 @@ export interface ToolRegistrationDTO {
|
|
|
179
179
|
description: string;
|
|
180
180
|
parameters: Record<string, unknown>; // JSON Schema
|
|
181
181
|
council_eligible?: boolean;
|
|
182
|
+
/** Whether the tool is available for inline function calling during generation */
|
|
183
|
+
inline_available?: boolean;
|
|
182
184
|
}
|
|
183
185
|
|
|
184
186
|
/** Tool/function schema passed to LLM for inline function calling. */
|
|
@@ -1276,6 +1278,8 @@ export interface GenerationStartedPayloadDTO {
|
|
|
1276
1278
|
characterId?: string;
|
|
1277
1279
|
characterName?: string;
|
|
1278
1280
|
breakdown?: AssemblyBreakdownEntryDTO[];
|
|
1281
|
+
/** The type of generation: normal, continue, regenerate, swipe, or impersonate. */
|
|
1282
|
+
generationType?: string;
|
|
1279
1283
|
}
|
|
1280
1284
|
|
|
1281
1285
|
/** Payload for `STREAM_TOKEN_RECEIVED` events. */
|
|
@@ -1300,6 +1304,8 @@ export interface GenerationEndedPayloadDTO {
|
|
|
1300
1304
|
content?: string;
|
|
1301
1305
|
/** Error message when the generation failed. */
|
|
1302
1306
|
error?: string;
|
|
1307
|
+
/** The type of generation: normal, continue, regenerate, swipe, or impersonate. */
|
|
1308
|
+
generationType?: string;
|
|
1303
1309
|
}
|
|
1304
1310
|
|
|
1305
1311
|
/** Payload for `GENERATION_STOPPED` events (user-initiated stop). */
|
package/src/dom.ts
CHANGED
|
@@ -16,6 +16,15 @@ export interface SpindleDOMHelper {
|
|
|
16
16
|
attrs?: Record<string, string>
|
|
17
17
|
): HTMLElementTagNameMap[K];
|
|
18
18
|
|
|
19
|
+
/**
|
|
20
|
+
* Create a host-managed sandboxed iframe for extension-owned HTML/CSS/JS.
|
|
21
|
+
*
|
|
22
|
+
* The host always applies `sandbox="allow-scripts"` without
|
|
23
|
+
* `allow-same-origin`, plus a strict child-document CSP and a narrow
|
|
24
|
+
* postMessage bridge. Use this instead of creating raw iframes.
|
|
25
|
+
*/
|
|
26
|
+
createSandboxFrame(options: SpindleSandboxFrameOptions): SpindleSandboxFrameHandle;
|
|
27
|
+
|
|
19
28
|
/** Query within this extension's own injected elements only */
|
|
20
29
|
query(selector: string): Element | null;
|
|
21
30
|
|
|
@@ -161,6 +170,34 @@ export interface SpindleInputBarActionHandle {
|
|
|
161
170
|
destroy(): void;
|
|
162
171
|
}
|
|
163
172
|
|
|
173
|
+
// ── Sandboxed Frame ──
|
|
174
|
+
|
|
175
|
+
export interface SpindleSandboxFrameOptions {
|
|
176
|
+
/** HTML document or fragment rendered inside the sandboxed iframe. */
|
|
177
|
+
html: string;
|
|
178
|
+
/** Automatically resize the host iframe to fit the child content. Default: `true`. */
|
|
179
|
+
autoResize?: boolean;
|
|
180
|
+
/** Initial host iframe height in CSS pixels. Default: `minHeight` or `40`. */
|
|
181
|
+
initialHeight?: number;
|
|
182
|
+
/** Minimum host iframe height in CSS pixels. Default: `40`. */
|
|
183
|
+
minHeight?: number;
|
|
184
|
+
/** Maximum host iframe height in CSS pixels. Default: `4000`. */
|
|
185
|
+
maxHeight?: number;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export interface SpindleSandboxFrameHandle {
|
|
189
|
+
/** The sandboxed iframe element. Extensions may place and style it like any other element. */
|
|
190
|
+
element: HTMLIFrameElement;
|
|
191
|
+
/** Replace the child document contents. */
|
|
192
|
+
setContent(html: string): void;
|
|
193
|
+
/** Send a message payload into the child sandbox runtime. */
|
|
194
|
+
postMessage(payload: unknown): void;
|
|
195
|
+
/** Receive payloads sent from the child sandbox runtime. */
|
|
196
|
+
onMessage(handler: (payload: unknown) => void): () => void;
|
|
197
|
+
/** Destroy the sandbox and remove the iframe from the DOM. */
|
|
198
|
+
destroy(): void;
|
|
199
|
+
}
|
|
200
|
+
|
|
164
201
|
export interface SpindleUploadFile {
|
|
165
202
|
name: string;
|
|
166
203
|
mimeType: string;
|
package/src/index.ts
CHANGED
|
@@ -137,11 +137,13 @@ export type {
|
|
|
137
137
|
SpindleDockPanelHandle,
|
|
138
138
|
SpindleAppMountOptions,
|
|
139
139
|
SpindleAppMountHandle,
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
140
|
+
SpindleInputBarActionOptions,
|
|
141
|
+
SpindleInputBarActionHandle,
|
|
142
|
+
SpindleSandboxFrameOptions,
|
|
143
|
+
SpindleSandboxFrameHandle,
|
|
144
|
+
SpindleContextMenuOptions,
|
|
145
|
+
SpindleContextMenuItemDef,
|
|
146
|
+
SpindleContextMenuResult,
|
|
145
147
|
SpindleModalOptions,
|
|
146
148
|
SpindleModalHandle,
|
|
147
149
|
SpindleConfirmVariant,
|
package/src/tools.ts
CHANGED
|
@@ -13,6 +13,8 @@ export interface ToolRegistration {
|
|
|
13
13
|
parameters: JSONSchema;
|
|
14
14
|
/** Whether council members can invoke this tool (future) */
|
|
15
15
|
council_eligible?: boolean;
|
|
16
|
+
/** Whether the tool is available for inline function calling during generation */
|
|
17
|
+
inline_available?: boolean;
|
|
16
18
|
/** Auto-set by host — the owning extension identifier */
|
|
17
19
|
extension_id: string;
|
|
18
20
|
}
|