lumiverse-spindle-types 0.6.31 → 0.6.33

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
@@ -205,6 +205,8 @@ export interface MacroDefinitionDTO {
205
205
  export interface MacroInvocationContextDTO {
206
206
  /** False when the host is performing a dry / non-committing resolve. */
207
207
  commit: boolean;
208
+ /** Host-trusted chat id for this invocation when a chat-scoped macro environment exists. */
209
+ chatId?: string;
208
210
  [key: string]: unknown;
209
211
  }
210
212
  export interface MacroResolveOptionsDTO {
@@ -1480,6 +1482,12 @@ export interface RegexScriptDTO {
1480
1482
  sort_order: number;
1481
1483
  description: string;
1482
1484
  folder: string;
1485
+ /**
1486
+ * Preset this row is bound to for the host's delete cascade, or null when
1487
+ * unbound. Host-authored: set at creation through `preset_id`, never re-pointed
1488
+ * by an update, so treat it as read-only here.
1489
+ */
1490
+ readonly preset_id?: string | null;
1483
1491
  /** Host-validated version badge for this Spindle-owned folder, or null when unversioned/unfiled. */
1484
1492
  readonly folder_version?: string | null;
1485
1493
  metadata: Record<string, unknown>;
@@ -1525,10 +1533,29 @@ export interface RegexScriptCreateDTO {
1525
1533
  * to clear an existing label.
1526
1534
  */
1527
1535
  folder_version?: string | null;
1536
+ /**
1537
+ * Bind the created script to one of the calling user's presets. Create-only:
1538
+ * the host validates the id against that user's presets and rejects unknown,
1539
+ * foreign, or malformed ids instead of storing an orphan link, and `update`
1540
+ * never re-points or clears the binding.
1541
+ *
1542
+ * The link is a lifecycle binding: deleting the preset deletes the script with
1543
+ * it, and preset activation does not change the script's `disabled` state, so
1544
+ * the extension keeps control of its own rule's enablement. `null` and an empty
1545
+ * string leave the script unbound.
1546
+ */
1547
+ preset_id?: string | null;
1528
1548
  metadata?: Record<string, unknown>;
1529
1549
  script_id?: string;
1530
1550
  }
1531
- export type RegexScriptUpdateDTO = Partial<RegexScriptCreateDTO>;
1551
+ /**
1552
+ * Every `RegexScriptCreateDTO` field is optional on update, except `preset_id`.
1553
+ * The preset link is create-only: the host strips it from extension input, so it
1554
+ * is excluded from the update DTO instead of accepting a field that would be
1555
+ * ignored. Deleting and recreating the script is how an owner moves it to
1556
+ * another preset.
1557
+ */
1558
+ export type RegexScriptUpdateDTO = Partial<Omit<RegexScriptCreateDTO, "preset_id">>;
1532
1559
  /**
1533
1560
  * One world info entry exposed to a `registerWorldInfoInterceptor` handler.
1534
1561
  * Subset of `WorldBookEntryDTO` covering the fields the interceptor needs to
@@ -1571,6 +1598,8 @@ export interface WorldInfoInterceptorEntryDTO {
1571
1598
  readonly delay: number;
1572
1599
  /** Latest prompt-local chat placement supplied by an earlier handler. */
1573
1600
  readonly placement?: WorldInfoInterceptorPlacementDTO;
1601
+ /** Active output-order request from an earlier handler; omission means selection order. */
1602
+ readonly outputOrder?: "selection" | "insertion";
1574
1603
  /** Attachment scope that contributed the entry's book to this chat. */
1575
1604
  readonly book_source?: WorldBookSourceDTO;
1576
1605
  }
@@ -1636,8 +1665,8 @@ export interface WorldInfoInterceptorCtxDTO {
1636
1665
  readonly activationSettings: WorldInfoActivationSettingsDTO;
1637
1666
  }
1638
1667
  /**
1639
- * Per-entry content overrides emitted by a `registerWorldInfoInterceptor`
1640
- * handler. Both values are prompt-local and never persist to the world book.
1668
+ * Per-entry overrides emitted by a `registerWorldInfoInterceptor` handler.
1669
+ * Overrides are prompt-local and never persist to the world book.
1641
1670
  */
1642
1671
  export interface WorldInfoInterceptorMutationDTO {
1643
1672
  readonly id: string;
@@ -1654,6 +1683,18 @@ export interface WorldInfoInterceptorMutationDTO {
1654
1683
  * Omit it to retain the stored native position, depth, and role.
1655
1684
  */
1656
1685
  readonly placement?: WorldInfoInterceptorPlacementDTO;
1686
+ /**
1687
+ * "insertion" orders selected entries by order_value ascending, reversing
1688
+ * equal-order ties relative to selection order, as chat-depth placement does.
1689
+ * Entries requested by the same extension exchange only their own output
1690
+ * slots; other entries and other extensions' groups retain their slots.
1691
+ * This runs after selection and budget filtering and applies to native
1692
+ * position buckets and named outlets. Explicit chat-depth placement takes
1693
+ * precedence and keeps its existing ordering.
1694
+ * "selection" clears an earlier request; omission leaves it unchanged.
1695
+ * The last valid request for an entry determines its extension group.
1696
+ */
1697
+ readonly outputOrder?: "selection" | "insertion";
1657
1698
  }
1658
1699
  /**
1659
1700
  * Return value of a `registerWorldInfoInterceptor` handler. Each list is
@@ -1349,6 +1349,9 @@ export interface SpindleAPI {
1349
1349
  * `preAssemblyGenerationContext >= 1`: generation contexts carry
1350
1350
  * `dryRun`/`userId` and `cancelGeneration` is honored.
1351
1351
  * `worldInfoActivationCapture >= 1`: world info activation capture is supported.
1352
+ * `worldInfoOutputOrdering >= 1`: world info mutations accept prompt-local
1353
+ * `outputOrder`, applied after selection without changing budget priority.
1354
+ *
1352
1355
  * `worldInfoRuntimePlacement >= 1`: world info mutations accept prompt-local
1353
1356
  * chat-depth placement.
1354
1357
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lumiverse-spindle-types",
3
- "version": "0.6.31",
3
+ "version": "0.6.33",
4
4
  "type": "module",
5
5
  "types": "./dist/index.d.ts",
6
6
  "keywords": [