lumiverse-spindle-types 0.6.13 → 0.6.15

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lumiverse-spindle-types",
3
- "version": "0.6.13",
3
+ "version": "0.6.15",
4
4
  "types": "./src/index.ts",
5
5
  "keywords": [
6
6
  "lumiverse",
package/src/api.ts CHANGED
@@ -1536,6 +1536,8 @@ export type RegexMacroModeDTO = "none" | "find" | "raw" | "escaped" | "after";
1536
1536
 
1537
1537
  export interface RegexScriptDTO {
1538
1538
  id: string;
1539
+ /** True when the calling extension may update or delete this script. */
1540
+ readonly can_mutate: boolean;
1539
1541
  name: string;
1540
1542
  script_id: string;
1541
1543
  find_regex: string;
package/src/dom.ts CHANGED
@@ -120,6 +120,23 @@ export type SpindleMountPoint =
120
120
 
121
121
  // ── Drawer Tab ──
122
122
 
123
+ /**
124
+ * Contextual documentation displayed by Lumiverse using its native
125
+ * guide viewer.
126
+ *
127
+ * Guide Markdown is rendered and sanitized by the host application.
128
+ */
129
+ export interface SpindleGuideDefinition {
130
+ /** Markdown content for the guide. */
131
+ markdown: string;
132
+
133
+ /**
134
+ * Optional title shown by the guide viewer.
135
+ * Falls back to the title of the owning tab.
136
+ */
137
+ title?: string;
138
+ }
139
+
123
140
  export interface SpindleDrawerTabOptions {
124
141
  /** Unique tab identifier. Used internally for routing and state. */
125
142
  id: string;
@@ -133,6 +150,8 @@ export interface SpindleDrawerTabOptions {
133
150
  keywords?: string[];
134
151
  /** Title shown in the panel header navbar. Falls back to `title` if omitted. Useful when the header needs a shorter label than the command palette entry. */
135
152
  headerTitle?: string;
153
+ /** Optional contextual documentation for this tab. */
154
+ guide?: SpindleGuideDefinition;
136
155
  /** URL to a 16x16 or 24x24 icon image. Mutually exclusive with `iconSvg`. */
137
156
  iconUrl?: string;
138
157
  /** Inline SVG string for the tab icon. Mutually exclusive with `iconUrl`. */
@@ -159,6 +178,8 @@ export interface SpindleCharacterEditorTabOptions {
159
178
  id: string;
160
179
  /** Label shown in the character editor tab bar. */
161
180
  title: string;
181
+ /** Optional contextual documentation for this tab. */
182
+ guide?: SpindleGuideDefinition;
162
183
  }
163
184
 
164
185
  export interface SpindleCharacterEditorTabHandle {
@@ -210,6 +231,8 @@ export interface SpindlePresetEditorTabOptions {
210
231
  id: string;
211
232
  /** Label shown in the Loom preset editor tab bar. */
212
233
  title: string;
234
+ /** Optional contextual documentation for this tab. */
235
+ guide?: SpindleGuideDefinition;
213
236
  }
214
237
 
215
238
  export interface SpindlePresetEditorTabHandle {
package/src/index.ts CHANGED
@@ -269,6 +269,7 @@ export type {
269
269
  SpindleFrontendContext,
270
270
  SpindleFrontendModule,
271
271
  SpindleFrontendTeardown,
272
+ SpindleGuideDefinition,
272
273
  SpindleDrawerTabOptions,
273
274
  SpindleDrawerTabHandle,
274
275
  SpindleCharacterEditorTabOptions,
@@ -312,9 +312,14 @@ export interface SpindleAPI {
312
312
  /** Subscribe to a Lumiverse event. Multi-user extensions should use the optional `userId` to keep per-user state and notifications isolated. */
313
313
  on(event: string, handler: (payload: unknown, userId?: string) => void): () => void;
314
314
 
315
- /** Register a macro. Handler contexts expose `commit === false` during dry resolves. */
315
+ /**
316
+ * Register a macro owned by this extension. Registrations cannot replace
317
+ * system macros or macros owned by another extension. Preset/request dynamic
318
+ * macros take precedence over extension macros with the same name.
319
+ * Handler contexts expose `commit === false` during dry resolves.
320
+ */
316
321
  registerMacro(def: MacroDefinitionDTO): void;
317
- /** Unregister a macro */
322
+ /** Unregister a macro owned by this extension. */
318
323
  unregisterMacro(name: string): void;
319
324
  /**
320
325
  * Push the latest value for a registered macro.
@@ -1012,10 +1017,14 @@ export interface SpindleAPI {
1012
1017
  };
1013
1018
 
1014
1019
  /**
1015
- * Regex Scripts CRUD (permission: "regex_scripts").
1016
- * Full access to regex scripts attached to the user's account, including
1017
- * global, character-scoped, and chat-scoped rules. Same shape Lumiverse uses
1018
- * internally during prompt assembly, response baking, and display rendering.
1020
+ * Regex Scripts API (permission: "regex_scripts").
1021
+ * Read access to regex scripts attached to the user's account and write
1022
+ * access to unbound scripts created by the calling extension. Legacy or
1023
+ * unattributed scripts, preset-bound scripts, and scripts owned by another
1024
+ * extension remain readable and executable but cannot be updated or deleted.
1025
+ * Check `RegexScriptDTO.can_mutate` before presenting mutation controls.
1026
+ * Uses the same shape Lumiverse applies internally during prompt assembly,
1027
+ * response baking, and display rendering.
1019
1028
  * For user-scoped extensions, userId is inferred from the extension owner.
1020
1029
  * For operator-scoped extensions, pass userId to scope to a specific user.
1021
1030
  */