lumiverse-spindle-types 0.6.14 → 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.14",
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;
@@ -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
  */