@edenapp/types 0.11.1 → 0.12.1
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 +2 -0
- package/CHANGELOG.md +22 -0
- package/EdenConfig.d.ts +19 -0
- package/GrantCatalog.d.ts +24 -0
- package/Process.d.ts +67 -0
- package/SettingsPanel.d.ts +280 -0
- package/commands.generated.d.ts +82 -8
- package/events.generated.d.ts +27 -1
- package/global.d.ts +1 -1
- package/index.d.ts +21 -46
- package/ipc/edenapi.d.ts +2 -2
- package/ipc/index.d.ts +1 -1
- package/package.json +1 -1
- package/worker.d.ts +1 -1
package/AppManifest.d.ts
CHANGED
|
@@ -326,6 +326,8 @@ export interface AppManifest {
|
|
|
326
326
|
command: string;
|
|
327
327
|
/** Working directory for build command (relative to app root) */
|
|
328
328
|
cwd?: string;
|
|
329
|
+
/** Whether this app may build alongside other apps (default: true) */
|
|
330
|
+
concurrent?: boolean;
|
|
329
331
|
};
|
|
330
332
|
|
|
331
333
|
/** Commands used when the app is mounted directly from source. */
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @edenapp/types
|
|
2
2
|
|
|
3
|
+
## 0.12.1
|
|
4
|
+
|
|
5
|
+
## 0.12.0
|
|
6
|
+
|
|
7
|
+
### Minor Changes
|
|
8
|
+
|
|
9
|
+
- 41fcd6f: Add system-owned, supervised backend daemons with persistent grant-controlled configuration, fixed Eden execution principals, session-independent lifecycle controls, and a grant-aware Settings management tab.
|
|
10
|
+
- a156ad0: Add safe file and recursive-directory transfers with explicit replacement, plus reusable multi-selection explorer controls and in-app destination browsing for Files copy, move, and batch delete workflows.
|
|
11
|
+
- 656844d: Add permission-aware native directory watching and live file explorer refreshes, including automatic recovery when an open directory becomes unavailable.
|
|
12
|
+
- 01e622b: Add live, grant-aware Settings panels with declarative operation dialogs, an administrative grant catalog, and stable main-process control-plane APIs for apps, daemons, users, sessions, appearance, and app associations.
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- c7c4e33: Build apps concurrently through Genesis while allowing apps with internally
|
|
17
|
+
parallel builds to opt out using `build.concurrent: false`. Show compact,
|
|
18
|
+
in-place build progress in interactive terminals.
|
|
19
|
+
- f2d7979: Refresh settings panel snapshots when daemon runtime state changes.
|
|
20
|
+
- 14a2705: Add a typed host power provider with permission-gated restart and power-off
|
|
21
|
+
commands, graceful managed-workload shutdown, and built-in eveshell and login
|
|
22
|
+
screen controls.
|
|
23
|
+
- c8075b0: Centralize dependency versions shared by multiple workspace packages in the pnpm catalog and update dependencies to their latest releases.
|
|
24
|
+
|
|
3
25
|
## 0.11.1
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
package/EdenConfig.d.ts
CHANGED
|
@@ -58,6 +58,23 @@ export interface EdenBrandingConfig {
|
|
|
58
58
|
iconPath?: string;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
+
/** Host power actions exposed by a configured power provider. */
|
|
62
|
+
export interface EdenPowerCapabilities {
|
|
63
|
+
poweroff: boolean;
|
|
64
|
+
reboot: boolean;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Main-process integration for host power management.
|
|
69
|
+
*
|
|
70
|
+
* Eden never executes configurable command strings. Consumers provide a typed
|
|
71
|
+
* implementation backed by the platform mechanism appropriate for their host.
|
|
72
|
+
*/
|
|
73
|
+
export interface EdenPowerProvider {
|
|
74
|
+
poweroff?: () => void | Promise<void>;
|
|
75
|
+
reboot?: () => void | Promise<void>;
|
|
76
|
+
}
|
|
77
|
+
|
|
61
78
|
export interface EdenConfig {
|
|
62
79
|
appsDirectory?: string;
|
|
63
80
|
/** Root directory backing Eden's managed virtual filesystem. */
|
|
@@ -68,6 +85,8 @@ export interface EdenConfig {
|
|
|
68
85
|
*/
|
|
69
86
|
seedPath?: string;
|
|
70
87
|
branding?: EdenBrandingConfig;
|
|
88
|
+
/** Optional host-side power integration. Power actions are unavailable when omitted. */
|
|
89
|
+
powerProvider?: EdenPowerProvider;
|
|
71
90
|
window?: {
|
|
72
91
|
width?: number;
|
|
73
92
|
height?: number;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { SettingsPanelLocalizedText } from "./SettingsPanel";
|
|
2
|
+
|
|
3
|
+
export type UserGrantOptionKind =
|
|
4
|
+
| "app-launch"
|
|
5
|
+
| "preset"
|
|
6
|
+
| "app-feature"
|
|
7
|
+
| "panel"
|
|
8
|
+
| "panel-action"
|
|
9
|
+
| "setting";
|
|
10
|
+
|
|
11
|
+
/** One exact grant that a vendor can assign to a user. */
|
|
12
|
+
export interface UserGrantOption {
|
|
13
|
+
grant: string;
|
|
14
|
+
kind: UserGrantOptionKind;
|
|
15
|
+
label: SettingsPanelLocalizedText;
|
|
16
|
+
description?: SettingsPanelLocalizedText;
|
|
17
|
+
ownerId?: string;
|
|
18
|
+
ownerLabel?: SettingsPanelLocalizedText;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface UserGrantOptionsResponse {
|
|
22
|
+
revision: number;
|
|
23
|
+
options: UserGrantOption[];
|
|
24
|
+
}
|
package/Process.d.ts
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { AppManifest } from "./AppManifest";
|
|
2
|
+
|
|
3
|
+
export type ProcessOwner =
|
|
4
|
+
| { kind: "system" }
|
|
5
|
+
| { kind: "session"; sessionId: string; username: string | null };
|
|
6
|
+
|
|
7
|
+
export type ExecutionPrincipal =
|
|
8
|
+
| { kind: "system" }
|
|
9
|
+
| { kind: "user"; username: string };
|
|
10
|
+
|
|
11
|
+
export interface AppInstance {
|
|
12
|
+
/** App manifest */
|
|
13
|
+
manifest: AppManifest;
|
|
14
|
+
|
|
15
|
+
/** Unique instance ID */
|
|
16
|
+
instanceId: string;
|
|
17
|
+
|
|
18
|
+
/** Runtime lifetime owner. */
|
|
19
|
+
owner: ProcessOwner;
|
|
20
|
+
|
|
21
|
+
/** Eden authorization principal used by this process. */
|
|
22
|
+
principal: ExecutionPrincipal;
|
|
23
|
+
|
|
24
|
+
/** Installation path on disk */
|
|
25
|
+
installPath: string;
|
|
26
|
+
|
|
27
|
+
/** WebContentsView ID */
|
|
28
|
+
viewId: number;
|
|
29
|
+
|
|
30
|
+
/** Current state */
|
|
31
|
+
state: "starting" | "running" | "paused" | "stopped" | "error";
|
|
32
|
+
|
|
33
|
+
/** Installation timestamp */
|
|
34
|
+
installedAt: Date;
|
|
35
|
+
|
|
36
|
+
/** Last launched timestamp */
|
|
37
|
+
lastLaunched?: Date;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export type DaemonRestartPolicy = "never" | "on-failure" | "always";
|
|
41
|
+
|
|
42
|
+
export interface DaemonDefinition {
|
|
43
|
+
appId: string;
|
|
44
|
+
enabled: boolean;
|
|
45
|
+
runAs: { kind: "user"; username: string } | null;
|
|
46
|
+
restart: DaemonRestartPolicy;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export type DaemonRuntimeState =
|
|
50
|
+
| "inactive"
|
|
51
|
+
| "starting"
|
|
52
|
+
| "active"
|
|
53
|
+
| "stopping"
|
|
54
|
+
| "backoff"
|
|
55
|
+
| "failed";
|
|
56
|
+
|
|
57
|
+
export interface DaemonStatus {
|
|
58
|
+
appId: string;
|
|
59
|
+
name: string | Record<string, string>;
|
|
60
|
+
definition: DaemonDefinition;
|
|
61
|
+
state: DaemonRuntimeState;
|
|
62
|
+
restartRequired: boolean;
|
|
63
|
+
instanceId?: string;
|
|
64
|
+
restartCount: number;
|
|
65
|
+
lastError?: string;
|
|
66
|
+
nextRestartAt?: number;
|
|
67
|
+
}
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
import type { UserProfile } from "./User";
|
|
2
|
+
|
|
3
|
+
/** Text that can be localized by the Settings renderer. */
|
|
4
|
+
export type SettingsPanelLocalizedText =
|
|
5
|
+
| string
|
|
6
|
+
| Readonly<Record<string, string>>;
|
|
7
|
+
|
|
8
|
+
/** JSON-compatible values accepted by panel state and action inputs. */
|
|
9
|
+
export type SettingsPanelValue =
|
|
10
|
+
| string
|
|
11
|
+
| number
|
|
12
|
+
| boolean
|
|
13
|
+
| null
|
|
14
|
+
| SettingsPanelValue[]
|
|
15
|
+
| { [key: string]: SettingsPanelValue };
|
|
16
|
+
|
|
17
|
+
export type SettingsPanelBadgeTone =
|
|
18
|
+
| "neutral"
|
|
19
|
+
| "info"
|
|
20
|
+
| "success"
|
|
21
|
+
| "warning"
|
|
22
|
+
| "danger";
|
|
23
|
+
|
|
24
|
+
/** Fully-qualified active-user grant required to discover a panel. */
|
|
25
|
+
export type SettingsPanelGrant = string;
|
|
26
|
+
|
|
27
|
+
/** Additional active-user grant required to invoke one panel action. */
|
|
28
|
+
export type SettingsPanelActionGrant = string;
|
|
29
|
+
|
|
30
|
+
export interface SettingsPanelBadge {
|
|
31
|
+
label: SettingsPanelLocalizedText;
|
|
32
|
+
tone?: SettingsPanelBadgeTone;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface SettingsPanelValidation {
|
|
36
|
+
required?: boolean;
|
|
37
|
+
minLength?: number;
|
|
38
|
+
maxLength?: number;
|
|
39
|
+
pattern?: string;
|
|
40
|
+
min?: number;
|
|
41
|
+
max?: number;
|
|
42
|
+
step?: number;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface SettingsPanelOption {
|
|
46
|
+
value: string;
|
|
47
|
+
label: SettingsPanelLocalizedText;
|
|
48
|
+
description?: SettingsPanelLocalizedText;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export type SettingsPanelInputType =
|
|
52
|
+
| "text"
|
|
53
|
+
| "password"
|
|
54
|
+
| "number"
|
|
55
|
+
| "checkbox"
|
|
56
|
+
| "radio"
|
|
57
|
+
| "select"
|
|
58
|
+
| "textarea"
|
|
59
|
+
| "color"
|
|
60
|
+
| "range";
|
|
61
|
+
|
|
62
|
+
export interface SettingsPanelFormField {
|
|
63
|
+
id: string;
|
|
64
|
+
label: SettingsPanelLocalizedText;
|
|
65
|
+
description?: SettingsPanelLocalizedText;
|
|
66
|
+
input: SettingsPanelInputType;
|
|
67
|
+
placeholder?: SettingsPanelLocalizedText;
|
|
68
|
+
options?: SettingsPanelOption[];
|
|
69
|
+
validation?: SettingsPanelValidation;
|
|
70
|
+
autocomplete?: string;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface SettingsPanelControlBase {
|
|
74
|
+
id: string;
|
|
75
|
+
label: SettingsPanelLocalizedText;
|
|
76
|
+
description?: SettingsPanelLocalizedText;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface SettingsPanelStatusRow extends SettingsPanelControlBase {
|
|
80
|
+
kind: "status";
|
|
81
|
+
stateKey: string;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface SettingsPanelToggle extends SettingsPanelControlBase {
|
|
85
|
+
kind: "toggle";
|
|
86
|
+
stateKey: string;
|
|
87
|
+
actionId: string;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface SettingsPanelButton extends SettingsPanelControlBase {
|
|
91
|
+
kind: "button";
|
|
92
|
+
actionId: string;
|
|
93
|
+
tone?: SettingsPanelBadgeTone;
|
|
94
|
+
confirmation?: SettingsPanelLocalizedText;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export interface SettingsPanelInput extends SettingsPanelControlBase {
|
|
98
|
+
kind: "input";
|
|
99
|
+
stateKey: string;
|
|
100
|
+
actionId: string;
|
|
101
|
+
input: SettingsPanelInputType;
|
|
102
|
+
placeholder?: SettingsPanelLocalizedText;
|
|
103
|
+
options?: SettingsPanelOption[];
|
|
104
|
+
validation?: SettingsPanelValidation;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export interface SettingsPanelDialogContent {
|
|
108
|
+
title: SettingsPanelLocalizedText;
|
|
109
|
+
description?: SettingsPanelLocalizedText;
|
|
110
|
+
fields: SettingsPanelFormField[];
|
|
111
|
+
submitLabel: SettingsPanelLocalizedText;
|
|
112
|
+
cancelLabel: SettingsPanelLocalizedText;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export interface SettingsPanelDialog extends SettingsPanelControlBase {
|
|
116
|
+
kind: "dialog";
|
|
117
|
+
actionId: string;
|
|
118
|
+
buttonLabel: SettingsPanelLocalizedText;
|
|
119
|
+
dialog: SettingsPanelDialogContent;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export type SettingsPanelControl =
|
|
123
|
+
| SettingsPanelStatusRow
|
|
124
|
+
| SettingsPanelToggle
|
|
125
|
+
| SettingsPanelButton
|
|
126
|
+
| SettingsPanelInput
|
|
127
|
+
| SettingsPanelDialog;
|
|
128
|
+
|
|
129
|
+
export interface SettingsPanelSection {
|
|
130
|
+
id: string;
|
|
131
|
+
title?: SettingsPanelLocalizedText;
|
|
132
|
+
description?: SettingsPanelLocalizedText;
|
|
133
|
+
controls: SettingsPanelControl[];
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export type SettingsPanelActionInputSchema =
|
|
137
|
+
| {
|
|
138
|
+
type: "string";
|
|
139
|
+
required?: boolean;
|
|
140
|
+
minLength?: number;
|
|
141
|
+
maxLength?: number;
|
|
142
|
+
pattern?: string;
|
|
143
|
+
enum?: string[];
|
|
144
|
+
}
|
|
145
|
+
| {
|
|
146
|
+
type: "number";
|
|
147
|
+
required?: boolean;
|
|
148
|
+
min?: number;
|
|
149
|
+
max?: number;
|
|
150
|
+
enum?: number[];
|
|
151
|
+
}
|
|
152
|
+
| { type: "boolean"; required?: boolean }
|
|
153
|
+
| {
|
|
154
|
+
type: "array";
|
|
155
|
+
required?: boolean;
|
|
156
|
+
items?: SettingsPanelActionInputSchema;
|
|
157
|
+
}
|
|
158
|
+
| {
|
|
159
|
+
type: "object";
|
|
160
|
+
required?: boolean;
|
|
161
|
+
properties?: Record<string, SettingsPanelActionInputSchema>;
|
|
162
|
+
additionalProperties?: boolean;
|
|
163
|
+
}
|
|
164
|
+
| { type: "any"; required?: boolean };
|
|
165
|
+
|
|
166
|
+
export interface SettingsPanelActionDefinition {
|
|
167
|
+
id: string;
|
|
168
|
+
label?: SettingsPanelLocalizedText;
|
|
169
|
+
description?: SettingsPanelLocalizedText;
|
|
170
|
+
/** An additional active-user grant required for this action. */
|
|
171
|
+
grant?: SettingsPanelActionGrant;
|
|
172
|
+
input?: SettingsPanelActionInputSchema;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Serializable panel declaration. Callbacks belong in the separate provider.
|
|
177
|
+
*
|
|
178
|
+
* IDs beginning with `eden.` and `app.` are reserved by Eden.
|
|
179
|
+
*/
|
|
180
|
+
export interface SettingsPanelDefinition {
|
|
181
|
+
id: string;
|
|
182
|
+
title: SettingsPanelLocalizedText;
|
|
183
|
+
description?: SettingsPanelLocalizedText;
|
|
184
|
+
icon?: string;
|
|
185
|
+
/** Active-user grant required before the panel can be discovered or loaded. */
|
|
186
|
+
grant: SettingsPanelGrant;
|
|
187
|
+
sections: SettingsPanelSection[];
|
|
188
|
+
actions?: SettingsPanelActionDefinition[];
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export interface SettingsPanelControlState {
|
|
192
|
+
value?: SettingsPanelValue;
|
|
193
|
+
detail?: SettingsPanelLocalizedText;
|
|
194
|
+
badge?: SettingsPanelBadge;
|
|
195
|
+
disabled?: boolean;
|
|
196
|
+
hidden?: boolean;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export interface SettingsPanelState {
|
|
200
|
+
controls?: Record<string, SettingsPanelControlState>;
|
|
201
|
+
/** Renderer-specific, JSON-compatible state for Eden-owned custom views. */
|
|
202
|
+
data?: SettingsPanelValue;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export interface SettingsPanelProviderContext {
|
|
206
|
+
panelId: string;
|
|
207
|
+
sessionId: string;
|
|
208
|
+
user: UserProfile;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export type SettingsPanelLoader = (
|
|
212
|
+
context: SettingsPanelProviderContext,
|
|
213
|
+
) => SettingsPanelState | Promise<SettingsPanelState>;
|
|
214
|
+
|
|
215
|
+
export type SettingsPanelActionHandler = (
|
|
216
|
+
input: SettingsPanelValue | undefined,
|
|
217
|
+
context: SettingsPanelProviderContext,
|
|
218
|
+
) => void | Promise<void>;
|
|
219
|
+
|
|
220
|
+
/** Trusted main-process callbacks for a registered panel. */
|
|
221
|
+
export interface SettingsPanelProvider {
|
|
222
|
+
load: SettingsPanelLoader;
|
|
223
|
+
actions?: Record<string, SettingsPanelActionHandler>;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export interface SettingsPanelRegistrationOptions {
|
|
227
|
+
/** Whether the panel is initially included in the Settings catalog. */
|
|
228
|
+
visible?: boolean;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export interface SettingsPanelRegistration {
|
|
232
|
+
readonly panelId: string;
|
|
233
|
+
setVisible(visible: boolean): void;
|
|
234
|
+
unregister(): void;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export type SettingsPanelSource = "eden" | "application" | "host";
|
|
238
|
+
|
|
239
|
+
export interface SettingsPanelSummary {
|
|
240
|
+
id: string;
|
|
241
|
+
title: SettingsPanelLocalizedText;
|
|
242
|
+
description?: SettingsPanelLocalizedText;
|
|
243
|
+
icon?: string;
|
|
244
|
+
source: SettingsPanelSource;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export interface SettingsPanelActionAuthorization {
|
|
248
|
+
id: string;
|
|
249
|
+
authorized: boolean;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
export interface SettingsPanelDeclaration extends SettingsPanelSummary {
|
|
253
|
+
sections: SettingsPanelSection[];
|
|
254
|
+
actions: SettingsPanelActionAuthorization[];
|
|
255
|
+
/** Eden-owned renderer ID. Third-party registrations always use `generic`. */
|
|
256
|
+
renderer: "generic" | "appearance" | "apps" | "daemons";
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export interface SettingsPanelError {
|
|
260
|
+
code:
|
|
261
|
+
| "authorization"
|
|
262
|
+
| "not_found"
|
|
263
|
+
| "validation"
|
|
264
|
+
| "load_failed"
|
|
265
|
+
| "action_failed"
|
|
266
|
+
| "session_changed";
|
|
267
|
+
message: string;
|
|
268
|
+
fields?: Record<string, string>;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
export interface SettingsPanelResponse {
|
|
272
|
+
panel?: SettingsPanelDeclaration;
|
|
273
|
+
state?: SettingsPanelState;
|
|
274
|
+
error?: SettingsPanelError;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
export interface SettingsPanelActionResponse {
|
|
278
|
+
success: boolean;
|
|
279
|
+
error?: SettingsPanelError;
|
|
280
|
+
}
|
package/commands.generated.d.ts
CHANGED
|
@@ -24,6 +24,14 @@ export interface SystemCommands {
|
|
|
24
24
|
args: Record<string, never>;
|
|
25
25
|
response: import("./index").EdenBrandingInfo;
|
|
26
26
|
};
|
|
27
|
+
"system/power-capabilities": {
|
|
28
|
+
args: Record<string, never>;
|
|
29
|
+
response: import("./index").EdenPowerCapabilities;
|
|
30
|
+
};
|
|
31
|
+
"system/power": {
|
|
32
|
+
args: { action: "poweroff" | "reboot" };
|
|
33
|
+
response: void;
|
|
34
|
+
};
|
|
27
35
|
}
|
|
28
36
|
|
|
29
37
|
/**
|
|
@@ -155,6 +163,41 @@ export interface ContextMenuCommands {
|
|
|
155
163
|
};
|
|
156
164
|
}
|
|
157
165
|
|
|
166
|
+
/**
|
|
167
|
+
* DaemonCommands - Commands for the "daemon" namespace
|
|
168
|
+
*/
|
|
169
|
+
export interface DaemonCommands {
|
|
170
|
+
"daemon/list": {
|
|
171
|
+
args: Record<string, never>;
|
|
172
|
+
response: import("./index").DaemonStatus[];
|
|
173
|
+
};
|
|
174
|
+
"daemon/update-definition": {
|
|
175
|
+
args: {
|
|
176
|
+
definition: import("./index").DaemonDefinition };
|
|
177
|
+
response: { success: true };
|
|
178
|
+
};
|
|
179
|
+
"daemon/enable": {
|
|
180
|
+
args: { appId: string };
|
|
181
|
+
response: { success: true };
|
|
182
|
+
};
|
|
183
|
+
"daemon/disable": {
|
|
184
|
+
args: { appId: string };
|
|
185
|
+
response: { success: true };
|
|
186
|
+
};
|
|
187
|
+
"daemon/start": {
|
|
188
|
+
args: { appId: string };
|
|
189
|
+
response: { success: true };
|
|
190
|
+
};
|
|
191
|
+
"daemon/stop": {
|
|
192
|
+
args: { appId: string };
|
|
193
|
+
response: { success: true };
|
|
194
|
+
};
|
|
195
|
+
"daemon/restart": {
|
|
196
|
+
args: { appId: string };
|
|
197
|
+
response: { success: true };
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
|
|
158
201
|
/**
|
|
159
202
|
* DbCommands - Commands for the "db" namespace
|
|
160
203
|
*/
|
|
@@ -399,6 +442,16 @@ export interface FsCommands {
|
|
|
399
442
|
args: { path: string };
|
|
400
443
|
response: import("./index").FileStats;
|
|
401
444
|
};
|
|
445
|
+
"fs/watch": {
|
|
446
|
+
args: {
|
|
447
|
+
path: string };
|
|
448
|
+
response: { watchId: string };
|
|
449
|
+
};
|
|
450
|
+
"fs/unwatch": {
|
|
451
|
+
args: {
|
|
452
|
+
watchId: string };
|
|
453
|
+
response: void;
|
|
454
|
+
};
|
|
402
455
|
/**
|
|
403
456
|
* Resolve an Eden path to the underlying OS path.
|
|
404
457
|
*/
|
|
@@ -427,16 +480,18 @@ export interface FsCommands {
|
|
|
427
480
|
/**
|
|
428
481
|
* Copy a file or directory.
|
|
429
482
|
* Directories are copied recursively.
|
|
483
|
+
* Existing destinations are replaced only when overwrite is true.
|
|
430
484
|
*/
|
|
431
485
|
"fs/cp": {
|
|
432
|
-
args:
|
|
486
|
+
args: import("./index").FilesystemTransferArgs;
|
|
433
487
|
response: void;
|
|
434
488
|
};
|
|
435
489
|
/**
|
|
436
490
|
* Move or rename a file or directory.
|
|
491
|
+
* Existing destinations are replaced only when overwrite is true.
|
|
437
492
|
*/
|
|
438
493
|
"fs/mv": {
|
|
439
|
-
args:
|
|
494
|
+
args: import("./index").FilesystemTransferArgs;
|
|
440
495
|
response: void;
|
|
441
496
|
};
|
|
442
497
|
}
|
|
@@ -762,13 +817,28 @@ export interface SettingsCommands {
|
|
|
762
817
|
response: { success: boolean };
|
|
763
818
|
};
|
|
764
819
|
/**
|
|
765
|
-
*
|
|
766
|
-
* @param showRestricted - If true, includes settings the current user cannot access (hidden by default)
|
|
820
|
+
* List the settings panels visible to the active user.
|
|
767
821
|
*/
|
|
768
|
-
"settings/
|
|
822
|
+
"settings/panels": {
|
|
823
|
+
args: Record<string, never>;
|
|
824
|
+
response: { panels: import("./index").SettingsPanelSummary[] };
|
|
825
|
+
};
|
|
826
|
+
/**
|
|
827
|
+
* Load one authorized panel declaration and its current state.
|
|
828
|
+
*/
|
|
829
|
+
"settings/panel": {
|
|
830
|
+
args: { panelId: string };
|
|
831
|
+
response: import("./index").SettingsPanelResponse;
|
|
832
|
+
};
|
|
833
|
+
/**
|
|
834
|
+
* Invoke one declared panel-private action.
|
|
835
|
+
*/
|
|
836
|
+
"settings/action": {
|
|
769
837
|
args: {
|
|
770
|
-
|
|
771
|
-
|
|
838
|
+
panelId: string;
|
|
839
|
+
actionId: string;
|
|
840
|
+
input?: import("./index").SettingsPanelValue };
|
|
841
|
+
response: import("./index").SettingsPanelActionResponse;
|
|
772
842
|
};
|
|
773
843
|
}
|
|
774
844
|
|
|
@@ -776,6 +846,10 @@ export interface SettingsCommands {
|
|
|
776
846
|
* UserCommands - Commands for the "user" namespace
|
|
777
847
|
*/
|
|
778
848
|
export interface UserCommands {
|
|
849
|
+
"user/grant-options": {
|
|
850
|
+
args: Record<string, never>;
|
|
851
|
+
response: import("./index").UserGrantOptionsResponse;
|
|
852
|
+
};
|
|
779
853
|
/**
|
|
780
854
|
* List all users.
|
|
781
855
|
*/
|
|
@@ -1010,4 +1084,4 @@ export interface ViewCommands {
|
|
|
1010
1084
|
/**
|
|
1011
1085
|
* Global command map - merge all command namespaces
|
|
1012
1086
|
*/
|
|
1013
|
-
export interface CommandMap extends SystemCommands, AssociationsCommands, AppbusCommands, AppearanceCommands, ContextMenuCommands, DbCommands, FileCommands, FilePickerCommands, FsCommands, I18nCommands, EventCommands, NotificationCommands, PackageCommands, ProcessCommands, SessionCommands, SettingsCommands, UserCommands, ViewCommands {}
|
|
1087
|
+
export interface CommandMap extends SystemCommands, AssociationsCommands, AppbusCommands, AppearanceCommands, ContextMenuCommands, DaemonCommands, DbCommands, FileCommands, FilePickerCommands, FsCommands, I18nCommands, EventCommands, NotificationCommands, PackageCommands, ProcessCommands, SessionCommands, SettingsCommands, UserCommands, ViewCommands {}
|
package/events.generated.d.ts
CHANGED
|
@@ -21,6 +21,13 @@ export interface ContextMenuEvents {
|
|
|
21
21
|
"context-menu/closed": import("./index").ContextMenuResult;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
/**
|
|
25
|
+
* DaemonEvents - Events for the "daemon" namespace
|
|
26
|
+
*/
|
|
27
|
+
export interface DaemonEvents {
|
|
28
|
+
"daemon/changed": { status: import("./index").DaemonStatus };
|
|
29
|
+
}
|
|
30
|
+
|
|
24
31
|
/**
|
|
25
32
|
* FileEvents - Events for the "file" namespace
|
|
26
33
|
*/
|
|
@@ -36,6 +43,13 @@ export interface FilePickerEvents {
|
|
|
36
43
|
"file-picker/closed": import("./index").FilePickerResult;
|
|
37
44
|
}
|
|
38
45
|
|
|
46
|
+
/**
|
|
47
|
+
* FsEvents - Events for the "fs" namespace
|
|
48
|
+
*/
|
|
49
|
+
export interface FsEvents {
|
|
50
|
+
"fs/changed": { watchId: string; kind: FilesystemChangeKind };
|
|
51
|
+
}
|
|
52
|
+
|
|
39
53
|
/**
|
|
40
54
|
* I18nEvents - Events for the "i18n" namespace
|
|
41
55
|
*/
|
|
@@ -69,6 +83,7 @@ export interface PackageEvents {
|
|
|
69
83
|
export interface ProcessEvents {
|
|
70
84
|
"process/launched": { instance: import("./index").AppInstance };
|
|
71
85
|
"process/stopped": { appId: string };
|
|
86
|
+
"process/reloading": { appId: string };
|
|
72
87
|
"process/error": { appId: string; error: unknown };
|
|
73
88
|
"process/exited": { appId: string; code: number };
|
|
74
89
|
}
|
|
@@ -89,12 +104,23 @@ export interface SessionEvents {
|
|
|
89
104
|
*/
|
|
90
105
|
export interface SettingsEvents {
|
|
91
106
|
"settings/changed": { appId: string; key: string; value: string };
|
|
107
|
+
"settings/panels-changed": {
|
|
108
|
+
reason: "catalog" | "grants" | "session" | "state" | "visibility";
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* UserEvents - Events for the "user" namespace
|
|
114
|
+
*/
|
|
115
|
+
export interface UserEvents {
|
|
116
|
+
"user/grant-options-changed": { revision: number };
|
|
92
117
|
}
|
|
93
118
|
|
|
94
119
|
/**
|
|
95
120
|
* ViewEvents - Events for the "view" namespace
|
|
96
121
|
*/
|
|
97
122
|
export interface ViewEvents {
|
|
123
|
+
"view/view-removed": { viewId: number; appId: string };
|
|
98
124
|
"view/bounds-updated": import("./index").ViewBounds;
|
|
99
125
|
"view/interface-scale-changed": { scale: number };
|
|
100
126
|
"view/view-loaded": { viewId: number; appId: string; overlay: boolean };
|
|
@@ -114,4 +140,4 @@ export interface ViewEvents {
|
|
|
114
140
|
/**
|
|
115
141
|
* Global event map - merge all event namespaces
|
|
116
142
|
*/
|
|
117
|
-
export interface AppEvents extends AppearanceEvents, ContextMenuEvents, FileEvents, FilePickerEvents, I18nEvents, NotificationEvents, PackageEvents, ProcessEvents, SessionEvents, SettingsEvents, ViewEvents {}
|
|
143
|
+
export interface AppEvents extends AppearanceEvents, ContextMenuEvents, DaemonEvents, FileEvents, FilePickerEvents, FsEvents, I18nEvents, NotificationEvents, PackageEvents, ProcessEvents, SessionEvents, SettingsEvents, UserEvents, ViewEvents {}
|
package/global.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// Ambient declarations for renderer globals
|
|
2
2
|
|
|
3
3
|
import type { AppFrameInjectionMode, CSSInjectionMode } from "./AppManifest";
|
|
4
|
+
import type { AppBusAPI, AppBusConnection, EdenAPI } from "./ipc";
|
|
4
5
|
import type { EdenKeyboardAPI } from "./keyboard";
|
|
5
|
-
import type { EdenAPI, AppBusAPI, AppBusConnection } from "./ipc";
|
|
6
6
|
|
|
7
7
|
export interface EdenFrame {
|
|
8
8
|
// Public API
|
package/index.d.ts
CHANGED
|
@@ -1,48 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export * from "./AppAssociation";
|
|
2
|
+
export * from "./AppManifest";
|
|
3
|
+
export * from "./Branding";
|
|
3
4
|
export * from "./EdenConfig";
|
|
4
5
|
export * from "./EdenSeedConfig";
|
|
5
|
-
export * from "./
|
|
6
|
-
export * from "./User";
|
|
7
|
-
|
|
8
|
-
export * from "./AppManifest";
|
|
9
|
-
export * from "./AppAssociation";
|
|
10
|
-
export * from "./ProcessMetrics";
|
|
11
|
-
|
|
6
|
+
export * from "./GrantCatalog";
|
|
12
7
|
export * from "./global";
|
|
13
|
-
|
|
14
|
-
export * from "./worker";
|
|
15
|
-
|
|
16
8
|
export * from "./ipc";
|
|
17
9
|
export * from "./keyboard";
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*/
|
|
24
|
-
export interface AppInstance {
|
|
25
|
-
/** App manifest */
|
|
26
|
-
manifest: AppManifest;
|
|
27
|
-
|
|
28
|
-
/** Unique instance ID */
|
|
29
|
-
instanceId: string;
|
|
30
|
-
|
|
31
|
-
/** Installation path on disk */
|
|
32
|
-
installPath: string;
|
|
33
|
-
|
|
34
|
-
/** WebContentsView ID */
|
|
35
|
-
viewId: number;
|
|
36
|
-
|
|
37
|
-
/** Current state */
|
|
38
|
-
state: "starting" | "running" | "paused" | "stopped" | "error";
|
|
39
|
-
|
|
40
|
-
/** Installation timestamp */
|
|
41
|
-
installedAt: Date;
|
|
42
|
-
|
|
43
|
-
/** Last launched timestamp */
|
|
44
|
-
lastLaunched?: Date;
|
|
45
|
-
}
|
|
10
|
+
export * from "./Process";
|
|
11
|
+
export * from "./ProcessMetrics";
|
|
12
|
+
export * from "./SettingsPanel";
|
|
13
|
+
export * from "./User";
|
|
14
|
+
export * from "./worker";
|
|
46
15
|
|
|
47
16
|
/**
|
|
48
17
|
* IPC Message Interface
|
|
@@ -83,20 +52,18 @@ export type RecursiveObject<T> = {
|
|
|
83
52
|
[key: string]: T | RecursiveObject<T>;
|
|
84
53
|
};
|
|
85
54
|
|
|
55
|
+
// Export channel/appbus types
|
|
56
|
+
export * from "./channels";
|
|
86
57
|
// Export new command types
|
|
87
58
|
export type {
|
|
88
|
-
CommandName,
|
|
89
59
|
CommandArgs,
|
|
90
|
-
CommandResult,
|
|
91
60
|
CommandMap,
|
|
61
|
+
CommandName,
|
|
62
|
+
CommandResult,
|
|
92
63
|
} from "./commands";
|
|
93
|
-
|
|
94
64
|
// Export event types
|
|
95
65
|
export * from "./events";
|
|
96
66
|
|
|
97
|
-
// Export channel/appbus types
|
|
98
|
-
export * from "./channels";
|
|
99
|
-
|
|
100
67
|
export interface SystemInfo {
|
|
101
68
|
platform: string;
|
|
102
69
|
arch: string;
|
|
@@ -146,6 +113,14 @@ export interface FileStats {
|
|
|
146
113
|
mtime: Date;
|
|
147
114
|
}
|
|
148
115
|
|
|
116
|
+
/** Arguments shared by the recursive filesystem copy and move commands. */
|
|
117
|
+
export interface FilesystemTransferArgs {
|
|
118
|
+
from: string;
|
|
119
|
+
to: string;
|
|
120
|
+
/** Replace the complete destination when it already exists. */
|
|
121
|
+
overwrite?: boolean;
|
|
122
|
+
}
|
|
123
|
+
|
|
149
124
|
/**
|
|
150
125
|
* Search result for filesystem queries
|
|
151
126
|
*/
|
package/ipc/edenapi.d.ts
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* Used by both frontend (window.edenAPI) and backend (worker.edenAPI).
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type {
|
|
9
|
-
import type {
|
|
8
|
+
import type { CommandArgs, CommandName, CommandResult } from "../commands";
|
|
9
|
+
import type { EventData, EventName } from "../events";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Eden API - shell commands and event subscriptions
|
package/ipc/index.d.ts
CHANGED
package/package.json
CHANGED
package/worker.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* This mirrors the frontend's `window.edenAPI` and `window.appBus` pattern.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type {
|
|
8
|
+
import type { AppBusAPI, AppBusConnection, EdenAPI } from "./ipc";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Worker global - backend runtime namespace
|