@edenapp/types 0.12.0 → 0.13.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.
package/AppManifest.d.ts CHANGED
@@ -243,18 +243,13 @@ export interface ResolvedGrant {
243
243
  preset?: string;
244
244
  }
245
245
 
246
- /**
247
- * App Manifest Interface
248
- *
249
- * Defines the structure of an Eden app package.
250
- * Each app must include a manifest.json file with this structure.
251
- */
252
- export interface AppManifest {
253
- /** Unique identifier for the app (e.g., "com.example.myapp") */
246
+ /** Fields shared by every Eden package manifest. */
247
+ export interface PackageManifestBase {
248
+ /** Globally unique package identifier. */
254
249
  id: string;
255
250
 
256
251
  /**
257
- * Human-readable name.
252
+ * Human-readable package name.
258
253
  * Can be a simple string or a map of locales to names (e.g. { "en": "Files", "pl": "Pliki" })
259
254
  */
260
255
  name: string | Record<string, string>;
@@ -262,12 +257,24 @@ export interface AppManifest {
262
257
  /** Version string (semver recommended) */
263
258
  version: string;
264
259
 
265
- /** App description */
260
+ /** Package description. */
266
261
  description?: string;
267
262
 
268
- /** App author information */
263
+ /** Package author information. */
269
264
  author?: string;
270
265
 
266
+ /** Icon path relative to the package root. */
267
+ icon?: string;
268
+ }
269
+
270
+ /**
271
+ * Defines the structure of an executable Eden app package.
272
+ * Each app must include a manifest.json file with this structure.
273
+ */
274
+ export interface AppManifest extends PackageManifestBase {
275
+ /** Package kind. Omitted manifests are treated as apps for compatibility. */
276
+ kind?: "app";
277
+
271
278
  /** Entry point for the backend worker thread */
272
279
  backend?: {
273
280
  /** Path to the backend entry file (relative to app root) */
@@ -317,9 +324,6 @@ export interface AppManifest {
317
324
  /** Window configuration */
318
325
  window?: WindowConfig;
319
326
 
320
- /** App icon path (relative to app root) */
321
- icon?: string;
322
-
323
327
  /** Build configuration (for prebuilt apps) */
324
328
  build?: {
325
329
  /** Command to build the app (e.g., "npm run build") */
@@ -393,8 +397,52 @@ export interface AppManifest {
393
397
  * @example ["node_modules/@linuxcnc-node/core", "node_modules/better-sqlite3"]
394
398
  */
395
399
  include?: string[];
400
+
401
+ /** DLC extension points exposed by this app. */
402
+ dlc?: {
403
+ extensionPoints: DlcExtensionPoint[];
404
+ };
405
+ }
406
+
407
+ /** A named, strictly-versioned extension point exposed by an app. */
408
+ export interface DlcExtensionPoint {
409
+ id: string;
410
+ /** Strict SemVer version implemented by the host. */
411
+ version: string;
412
+ }
413
+
414
+ export type DlcMetadata =
415
+ | null
416
+ | boolean
417
+ | number
418
+ | string
419
+ | DlcMetadata[]
420
+ | { [key: string]: DlcMetadata };
421
+
422
+ /** A contribution made by a DLC to one host extension point. */
423
+ export interface DlcContribution {
424
+ extensionPoint: string;
425
+ /** SemVer range accepted by this contribution. */
426
+ requires: string;
427
+ /** Opaque host-defined JSON. Eden stores but never interprets this value. */
428
+ metadata?: DlcMetadata;
429
+ }
430
+
431
+ /**
432
+ * A data package bound to exactly one installed host app.
433
+ * DLC packages have no independent execution identity.
434
+ */
435
+ export interface DlcManifest extends PackageManifestBase {
436
+ kind: "dlc";
437
+ hostAppId: string;
438
+ contributions: DlcContribution[];
439
+ /** Additional file types opened by the host while this DLC is installed. */
440
+ fileHandlers?: FileHandlerConfig[];
396
441
  }
397
442
 
443
+ /** Any manifest supported by an .edenite package. */
444
+ export type PackageManifest = AppManifest | DlcManifest;
445
+
398
446
  /**
399
447
  * Runtime App Manifest
400
448
  *
@@ -402,6 +450,9 @@ export interface AppManifest {
402
450
  * This is what Eden uses internally after loading and processing an app.
403
451
  */
404
452
  export interface RuntimeAppManifest extends AppManifest {
453
+ /** Installed app manifests always carry an explicit package discriminator. */
454
+ kind: "app";
455
+
405
456
  /** Whether this is a prebuilt system app */
406
457
  isPrebuilt: boolean;
407
458
 
@@ -417,3 +468,12 @@ export interface RuntimeAppManifest extends AppManifest {
417
468
  /** Grants with presets resolved to full definitions */
418
469
  resolvedGrants: ResolvedGrant[];
419
470
  }
471
+
472
+ /** Installed DLC manifest with runtime package provenance. */
473
+ export interface RuntimeDlcManifest extends DlcManifest {
474
+ /** Whether this DLC is bundled with Eden rather than user-installed. */
475
+ isPrebuilt: boolean;
476
+ }
477
+
478
+ /** Manifest for an installed app or DLC package. */
479
+ export type InstalledPackageManifest = RuntimeAppManifest | RuntimeDlcManifest;
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @edenapp/types
2
2
 
3
+ ## 0.13.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 7ebd35d: Add app-bound DLC manifests, secure `.edenite` packaging and extraction, built-in DLC bundling, unified package installation and removal, transactional host-aware lifecycle handling, host-scoped JavaScript module resource URLs, trusted main-process inventory APIs with package-size details in Settings, optional host file-handler extensions, binary filesystem commands, editor-owned contracts for external language highlighters and custom document codecs, and a built-in HTTP request highlighter DLC.
8
+ - 9bd04f0: Open a compact spatial layout compass from tiled app titles when adjacent windows are available, with controls to swap positions or temporarily expand across compatible neighbors without persistent gutters or another renderer. Keep layout actions unavailable during an active expansion so they cannot implicitly restore or rearrange the covered split.
9
+
10
+ ### Patch Changes
11
+
12
+ - 6128a97: Resize floating app windows from their left, right, and bottom edges, including both bottom corners, with side handles beginning below the title bar so the full top frame remains available for window dragging.
13
+
14
+ ## 0.12.1
15
+
3
16
  ## 0.12.0
4
17
 
5
18
  ### Minor Changes
package/Package.d.ts ADDED
@@ -0,0 +1,36 @@
1
+ import type {
2
+ InstalledPackageManifest,
3
+ RuntimeAppManifest,
4
+ RuntimeDlcManifest,
5
+ } from "./AppManifest";
6
+
7
+ /** A host-scoped installed DLC and the root URL used to consume its payload. */
8
+ export interface DlcResource {
9
+ manifest: RuntimeDlcManifest;
10
+ /** Caller-scoped URL ending in `/`; resolve host-defined contribution paths against it. */
11
+ rootUrl: string;
12
+ }
13
+
14
+ /** Details for an installed package. DLC packages return an empty DLC list. */
15
+ export interface InstalledPackageInfo {
16
+ manifest: InstalledPackageManifest;
17
+ dlcs: DlcResource[];
18
+ }
19
+
20
+ /** Runtime installation preview returned when inspecting an .edenite package. */
21
+ export type PackageOperationPreview =
22
+ | {
23
+ kind: "app";
24
+ existingVersion?: string;
25
+ incompatibleDlcs: RuntimeDlcManifest[];
26
+ hostRunning: boolean;
27
+ replaceable: boolean;
28
+ }
29
+ | {
30
+ kind: "dlc";
31
+ existingVersion?: string;
32
+ host?: RuntimeAppManifest;
33
+ compatibilityErrors: string[];
34
+ hostRunning: boolean;
35
+ replaceable: boolean;
36
+ };
package/View.d.ts ADDED
@@ -0,0 +1,15 @@
1
+ /** A spatial edge around the caller's tiled window. */
2
+ export type TileLayoutDirection = "top" | "right" | "bottom" | "left";
3
+
4
+ /** A tiled window adjacent to one edge of the caller's window. */
5
+ export interface TileLayoutNeighbor {
6
+ name: string | Record<string, string>;
7
+ /** Whether the caller can temporarily cover this neighbor. */
8
+ canExpand: boolean;
9
+ }
10
+
11
+ /** Context used to render the caller-scoped tiled-window layout controls. */
12
+ export interface TileLayoutState {
13
+ mode: "floating" | "tiled";
14
+ neighbors: Partial<Record<TileLayoutDirection, TileLayoutNeighbor>>;
15
+ }
@@ -404,6 +404,13 @@ export interface FsCommands {
404
404
  encoding?: string };
405
405
  response: string;
406
406
  };
407
+ /**
408
+ * Read the raw contents of a file.
409
+ */
410
+ "fs/read-binary": {
411
+ args: { path: string };
412
+ response: Uint8Array;
413
+ };
407
414
  /**
408
415
  * Write content to a file, creating directories if needed.
409
416
  */
@@ -414,6 +421,15 @@ export interface FsCommands {
414
421
  encoding?: string };
415
422
  response: void;
416
423
  };
424
+ /**
425
+ * Write raw bytes to a file, creating directories if needed.
426
+ */
427
+ "fs/write-binary": {
428
+ args: {
429
+ path: string;
430
+ content: Uint8Array };
431
+ response: void;
432
+ };
417
433
  /**
418
434
  * Check if a file or directory exists.
419
435
  */
@@ -579,18 +595,19 @@ export interface NotificationCommands {
579
595
  */
580
596
  export interface PackageCommands {
581
597
  /**
582
- * Install an application from a local path.
598
+ * Install an application or DLC from a local path.
583
599
  */
584
600
  "package/install": {
585
601
  args: {
586
- sourcePath: string };
587
- response: import("./index").RuntimeAppManifest;
602
+ sourcePath: string;
603
+ replace?: boolean };
604
+ response: import("./index").InstalledPackageManifest;
588
605
  };
589
606
  /**
590
- * Uninstall an application by its ID.
607
+ * Uninstall an application or DLC by its package ID.
591
608
  */
592
609
  "package/uninstall": {
593
- args: { appId: string };
610
+ args: { packageId: string };
594
611
  response: boolean;
595
612
  };
596
613
  /**
@@ -604,12 +621,27 @@ export interface PackageCommands {
604
621
  showRestricted?: boolean };
605
622
  response: import("./index").RuntimeAppManifest[];
606
623
  };
624
+ /**
625
+ * Identify the authenticated app and return its extension resources.
626
+ */
627
+ "package/self": {
628
+ args: { };
629
+ response: import("./index").InstalledPackageInfo;
630
+ };
631
+ /**
632
+ * Get an installed package and any extension resources it owns.
633
+ */
634
+ "package/get": {
635
+ args: {
636
+ packageId: string };
637
+ response: import("./index").InstalledPackageInfo;
638
+ };
607
639
  /**
608
640
  * Toggle hot reload for an app
609
641
  */
610
642
  "package/toggle-hot-reload": {
611
643
  args: {
612
- appId: string };
644
+ packageId: string };
613
645
  response: { enabled: boolean };
614
646
  };
615
647
  /**
@@ -617,31 +649,35 @@ export interface PackageCommands {
617
649
  */
618
650
  "package/is-hot-reload-enabled": {
619
651
  args: {
620
- appId: string };
652
+ packageId: string };
621
653
  response: { enabled: boolean };
622
654
  };
623
655
  /**
624
- * Get the icon for an installed application as a data URL.
656
+ * Get the icon for an installed package as a data URL.
625
657
  */
626
658
  "package/get-icon": {
627
659
  args: {
628
- appId: string };
660
+ packageId: string };
629
661
  response: { icon: string | undefined };
630
662
  };
631
663
  /**
632
664
  * Get info about a package file without installing it
633
665
  */
634
666
  "package/get-info": {
635
- args: {
636
- path: string };
637
- response: { success: boolean; manifest?: import("./index").AppManifest; error?: string };
667
+ args: { path: string };
668
+ response: {
669
+ success: boolean;
670
+ manifest?: import("./index").PackageManifest;
671
+ preview?: import("./index").PackageOperationPreview;
672
+ error?: string;
673
+ };
638
674
  };
639
675
  /**
640
- * Get the installed size of an app in bytes
676
+ * Get the installed size of a package in bytes.
641
677
  */
642
678
  "package/get-size": {
643
679
  args: {
644
- appId: string };
680
+ packageId: string };
645
681
  response: { size: number | undefined };
646
682
  };
647
683
  }
@@ -1016,6 +1052,29 @@ export interface ViewCommands {
1016
1052
  mode?: "floating" | "tiled" };
1017
1053
  response: { success: boolean };
1018
1054
  };
1055
+ /**
1056
+ * Get adjacent tiled windows for the caller's app-frame layout controls.
1057
+ */
1058
+ "view/tile-layout-state": {
1059
+ args: { };
1060
+ response: import("./index").TileLayoutState;
1061
+ };
1062
+ /**
1063
+ * Swap the caller with the tiled window on one edge.
1064
+ */
1065
+ "view/swap-tile": {
1066
+ args: {
1067
+ direction: import("./index").TileLayoutDirection };
1068
+ response: import("./index").TileLayoutState;
1069
+ };
1070
+ /**
1071
+ * Temporarily cover the tiled window on one edge with the caller.
1072
+ */
1073
+ "view/expand-tile": {
1074
+ args: {
1075
+ direction: import("./index").TileLayoutDirection };
1076
+ response: import("./index").TileLayoutState;
1077
+ };
1019
1078
  /**
1020
1079
  * Start dragging caller's own view.
1021
1080
  */
@@ -1046,7 +1105,8 @@ export interface ViewCommands {
1046
1105
  "view/start-resize": {
1047
1106
  args: {
1048
1107
  startX: number;
1049
- startY: number };
1108
+ startY: number;
1109
+ direction?: "left" | "right" | "bottom" | "bottom-left" | "bottom-right" };
1050
1110
  response: { success: boolean };
1051
1111
  };
1052
1112
  /**
@@ -47,7 +47,7 @@ export interface FilePickerEvents {
47
47
  * FsEvents - Events for the "fs" namespace
48
48
  */
49
49
  export interface FsEvents {
50
- "fs/changed": { watchId: string; kind: FilesystemChangeKind };
50
+ "fs/changed": { watchId: string; kind: import("./index").FilesystemChangeKind };
51
51
  }
52
52
 
53
53
  /**
@@ -73,8 +73,9 @@ export interface NotificationEvents {
73
73
  * PackageEvents - Events for the "package" namespace
74
74
  */
75
75
  export interface PackageEvents {
76
- "package/installed": { manifest: import("./index").RuntimeAppManifest };
77
- "package/uninstalled": { appId: string };
76
+ "package/installed": { manifest: import("./index").InstalledPackageManifest };
77
+ "package/uninstalled": | { kind: "app"; packageId: string }
78
+ | { kind: "dlc"; packageId: string; hostAppId: string };
78
79
  }
79
80
 
80
81
  /**
@@ -120,7 +121,7 @@ export interface UserEvents {
120
121
  * ViewEvents - Events for the "view" namespace
121
122
  */
122
123
  export interface ViewEvents {
123
- "view/view-removed": { viewId: number; appId: string };
124
+ "view/view-removed": { viewId: number; appId: string; webContentsId: number };
124
125
  "view/bounds-updated": import("./index").ViewBounds;
125
126
  "view/interface-scale-changed": { scale: number };
126
127
  "view/view-loaded": { viewId: number; appId: string; overlay: boolean };
package/index.d.ts CHANGED
@@ -7,10 +7,12 @@ export * from "./GrantCatalog";
7
7
  export * from "./global";
8
8
  export * from "./ipc";
9
9
  export * from "./keyboard";
10
+ export * from "./Package";
10
11
  export * from "./Process";
11
12
  export * from "./ProcessMetrics";
12
13
  export * from "./SettingsPanel";
13
14
  export * from "./User";
15
+ export * from "./View";
14
16
  export * from "./worker";
15
17
 
16
18
  /**
@@ -113,6 +115,9 @@ export interface FileStats {
113
115
  mtime: Date;
114
116
  }
115
117
 
118
+ /** Kind of update delivered by a filesystem watch subscription. */
119
+ export type FilesystemChangeKind = "change" | "watch-error";
120
+
116
121
  /** Arguments shared by the recursive filesystem copy and move commands. */
117
122
  export interface FilesystemTransferArgs {
118
123
  from: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edenapp/types",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "description": "TypeScript type definitions for the Eden platform",
5
5
  "types": "index.d.ts",
6
6
  "author": "Dariusz Majnert",