wicked-crew-api-types 0.116.0 → 0.117.0

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.
Files changed (2) hide show
  1. package/index.d.ts +49 -1
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -10416,7 +10416,51 @@ export type EditorPermission =
10416
10416
  | 'network.media'
10417
10417
  /** Talk, through studio's host, to an MCP server the operator connected (DES-MCP-INSPECTOR-001).
10418
10418
  * No posture rule allows it: the editor's install consent writes its per-build grant. */
10419
- | 'mcp.session';
10419
+ | 'mcp.session'
10420
+ /** Protocol 2 `theme.set` (DES-EDITOR-PLUGIN-CONTRACT-001 §7.2): change this artifact's theme, as a new version. */
10421
+ | 'artifact.theme';
10422
+
10423
+ /**
10424
+ * A protocol-2 editor's surfaces (DES-EDITOR-PLUGIN-CONTRACT-001 §5.2), as the registry parsed them from its
10425
+ * manifest: defaults filled (`interactive:false`, `aspect:'16:9'`, `actions:[]`, `primary:false`, `maxChars:200`,
10426
+ * `full.default:'simple'`), `options`/`full` null when not declared. The host renders the card, the options tabs
10427
+ * and full screen from this copy (and requires the bundle's `plugin.ready` copy to be the same).
10428
+ */
10429
+ export interface EditorSurfaces {
10430
+ card: {
10431
+ /** The frame takes pointer and keys inside the card (a protocol-1 inline card never did). */
10432
+ interactive: boolean;
10433
+ /** `auto`: the plugin reports its height (`ui.height`, clamped to 120-560 px). */
10434
+ aspect: '16:9' | '4:3' | 'auto';
10435
+ /** At most 4, drawn by the HOST in the card footer. `plugin` → `host.action {id}`; the others are host verbs. */
10436
+ actions: Array<{ id: string; label: string; primary: boolean; verb: 'plugin' | 'host:export' | 'host:ask' }>;
10437
+ };
10438
+ /** At most 5 tabs, added to the host panel on Options; null = no Options button. */
10439
+ options: { tabs: EditorOptionsTab[] } | null;
10440
+ /** Null = no Full screen button. `modes` null = one mode (no Simple/Advanced toggle). */
10441
+ full: { modes: Array<'simple' | 'advanced'> | null; default: 'simple' | 'advanced' } | null;
10442
+ }
10443
+
10444
+ /** One options tab: a frame of the plugin's (`plugin`) or host-drawn controls (`controls`, at most 12). */
10445
+ export interface EditorOptionsTab {
10446
+ id: string;
10447
+ label: string;
10448
+ render: 'plugin' | 'controls';
10449
+ controls?: EditorControl[];
10450
+ }
10451
+
10452
+ /** A host-drawn control (§5.3, a closed vocabulary). `options` for select/segmented (2-8); `min`/`max`/`step`
10453
+ * for range; `maxChars` for text. */
10454
+ export interface EditorControl {
10455
+ id: string;
10456
+ label: string;
10457
+ type: 'toggle' | 'segmented' | 'select' | 'color' | 'text' | 'range';
10458
+ options?: Array<{ id: string; label: string }>;
10459
+ min?: number;
10460
+ max?: number;
10461
+ step?: number;
10462
+ maxChars?: number;
10463
+ }
10420
10464
 
10421
10465
  /**
10422
10466
  * One registered editor, as Settings → Editors renders it. No path is on the wire: the bundle is
@@ -10436,6 +10480,10 @@ export interface EditorView {
10436
10480
  kinds: string[];
10437
10481
  sizes: Array<'inline' | 'pane' | 'full'>;
10438
10482
  panels?: Array<'checks'>;
10483
+ /** Protocol 2 (an editor whose `protocol` lists 2): its declared surfaces, parsed. Absent for a protocol-1
10484
+ * editor, and from a daemon that predates the field (added with api-types 0.117.0; the host then reads
10485
+ * the bundle's `plugin.ready` copy). */
10486
+ surfaces?: EditorSurfaces;
10439
10487
  /** Each with the reason shown at install. The GRANTED set is `GET /editors/:id/grants`. */
10440
10488
  permissions: Array<{ id: EditorPermission; why: string }>;
10441
10489
  /** The full sha256 of the entry file, pinned when the registry read it. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wicked-crew-api-types",
3
- "version": "0.116.0",
3
+ "version": "0.117.0",
4
4
  "description": "The wire contract of the wicked-crew daemon's /api/v1 REST surface and /ws CoreEvent frames \u2014 types only, zero runtime",
5
5
  "type": "module",
6
6
  "types": "./index.d.ts",