@dopame/acde-linux-x64 0.0.0-stage → 0.0.10
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/LICENSE +8 -0
- package/bin/acde +66 -0
- package/bin/acde.cmd +45 -0
- package/bin/acdebin-dbg +4 -0
- package/bin/app/brand/art.mjs +53 -0
- package/bin/app/brand/brand.css +39 -0
- package/bin/app/brand/lockup.mjs +17 -0
- package/bin/app/brand/mark.mjs +124 -0
- package/bin/app/dist/broker.js +1 -0
- package/bin/app/dist/web.js +1 -0
- package/bin/app/greet/index.html +177 -0
- package/bin/app/greet/package.json +16 -0
- package/bin/app/package.json +35 -0
- package/lib/acde/LICENSE +8 -0
- package/lib/acde/dist/chunk-0n69bv5q.js +1 -0
- package/lib/acde/dist/chunk-1cw92x19.js +1 -0
- package/lib/acde/dist/chunk-458e14zb.js +1 -0
- package/lib/acde/dist/chunk-88mxgp54.js +1 -0
- package/lib/acde/dist/chunk-8dv09ven.js +1 -0
- package/lib/acde/dist/chunk-8fxsj5h6.js +1 -0
- package/lib/acde/dist/chunk-8pf3kk8v.js +1 -0
- package/lib/acde/dist/chunk-8r65bz1e.js +1 -0
- package/lib/acde/dist/chunk-9hpnkmxn.js +1 -0
- package/lib/acde/dist/chunk-a7w41xr9.js +1 -0
- package/lib/acde/dist/chunk-db7qqt8a.js +1 -0
- package/lib/acde/dist/chunk-e3rzr5fj.js +1 -0
- package/lib/acde/dist/chunk-ehms6xjp.js +1 -0
- package/lib/acde/dist/chunk-ggykhab6.js +1 -0
- package/lib/acde/dist/chunk-gt70e8h2.js +1 -0
- package/lib/acde/dist/chunk-hcf0xd5c.js +1 -0
- package/lib/acde/dist/chunk-hdrvz9sa.js +1 -0
- package/lib/acde/dist/chunk-jjq2mn94.js +1 -0
- package/lib/acde/dist/chunk-k8f4m94e.js +7 -0
- package/lib/acde/dist/chunk-mtgy1bm0.js +1 -0
- package/lib/acde/dist/chunk-mtw6p7kv.js +1 -0
- package/lib/acde/dist/chunk-nwkq7cpp.js +1 -0
- package/lib/acde/dist/chunk-nyr54266.js +1 -0
- package/lib/acde/dist/chunk-p0h5kspx.js +1 -0
- package/lib/acde/dist/chunk-pdj3h86e.js +1 -0
- package/lib/acde/dist/chunk-q9dbzac5.js +1 -0
- package/lib/acde/dist/chunk-qrhbrjzk.js +1 -0
- package/lib/acde/dist/chunk-s8p0y5ap.js +1 -0
- package/lib/acde/dist/chunk-t0xqxe00.js +1 -0
- package/lib/acde/dist/chunk-tgn5c2mw.js +1 -0
- package/lib/acde/dist/chunk-wmj6zwvn.js +1 -0
- package/lib/acde/dist/chunk-wnk81fkc.js +1 -0
- package/lib/acde/dist/chunk-x208z38w.js +1 -0
- package/lib/acde/dist/chunk-xq76vbg6.js +1 -0
- package/lib/acde/dist/chunk-xr9gh5x2.js +1 -0
- package/lib/acde/dist/chunk-yytnhz6e.js +1 -0
- package/lib/acde/dist/chunk-z0ts25s1.js +1 -0
- package/lib/acde/dist/chunk-zdyw1ckt.js +1 -0
- package/lib/acde/dist/cli.js +1 -0
- package/lib/acde/dist/driver/index.js +1 -0
- package/lib/acde/dist/e2e/index.js +1 -0
- package/lib/acde/dist/types/configs.d.ts +1 -0
- package/lib/acde/dist/types/driver/acde.d.ts +106 -0
- package/lib/acde/dist/types/driver/clock.d.ts +32 -0
- package/lib/acde/dist/types/driver/expect.d.ts +60 -0
- package/lib/acde/dist/types/driver/format.d.ts +16 -0
- package/lib/acde/dist/types/driver/index.d.ts +13 -0
- package/lib/acde/dist/types/driver/input.d.ts +75 -0
- package/lib/acde/dist/types/driver/locator.d.ts +151 -0
- package/lib/acde/dist/types/driver/logs.d.ts +26 -0
- package/lib/acde/dist/types/driver/png.d.ts +31 -0
- package/lib/acde/dist/types/driver/poll.d.ts +4 -0
- package/lib/acde/dist/types/driver/screenshot.d.ts +37 -0
- package/lib/acde/dist/types/driver/trace.d.ts +26 -0
- package/lib/acde/dist/types/driver/types.d.ts +213 -0
- package/lib/acde/dist/types/driver/video.d.ts +14 -0
- package/lib/acde/dist/types/driver/window.d.ts +77 -0
- package/lib/acde/dist/types/e2e/index.d.ts +78 -0
- package/lib/acde/dist/types/e2e/settings.d.ts +39 -0
- package/lib/acde/dist/types/ipc.d.ts +24 -0
- package/lib/acde/dist/types/paths.d.ts +5 -0
- package/lib/acde/dist/types/pm.d.ts +20 -0
- package/lib/acde/dist/types/runtime.d.ts +49 -0
- package/lib/acde/dist/types/sessions.d.ts +80 -0
- package/lib/acde/dist/types/sockets.d.ts +4 -0
- package/lib/acde/launcher.d.mts +25 -0
- package/lib/acde/launcher.mjs +1 -0
- package/lib/acde/package.json +31 -0
- package/lib/acde/skills/acde/SKILL.md +114 -0
- package/lib/acde/skills/acde/references/guide/agents.md +50 -0
- package/lib/acde/skills/acde/references/guide/assets.md +40 -0
- package/lib/acde/skills/acde/references/guide/backend.md +94 -0
- package/lib/acde/skills/acde/references/guide/capabilities.md +157 -0
- package/lib/acde/skills/acde/references/guide/config.md +73 -0
- package/lib/acde/skills/acde/references/guide/desktop.md +165 -0
- package/lib/acde/skills/acde/references/guide/dev.md +66 -0
- package/lib/acde/skills/acde/references/guide/doctor.md +144 -0
- package/lib/acde/skills/acde/references/guide/files.md +181 -0
- package/lib/acde/skills/acde/references/guide/frameworks.md +74 -0
- package/lib/acde/skills/acde/references/guide/install.md +34 -0
- package/lib/acde/skills/acde/references/guide/mcp.md +64 -0
- package/lib/acde/skills/acde/references/guide/open.md +107 -0
- package/lib/acde/skills/acde/references/guide/services.md +147 -0
- package/lib/acde/skills/acde/references/guide/testing.md +378 -0
- package/lib/acde/skills/acde/references/guide/tools.md +291 -0
- package/lib/acde/skills/acde/references/guide/window.md +167 -0
- package/lib/acde/skills/acde/references/reference/cli.md +221 -0
- package/lib/acde/skills/acde/references/reference/config.md +51 -0
- package/lib/acde/skills/acde/references/reference/env.md +44 -0
- package/lib/acde/skills/acde/references/reference/manifest.md +92 -0
- package/lib/acde/skills/acde/references/reference/modules.md +586 -0
- package/lib/acde/skills/acde/references/reference/platforms.md +23 -0
- package/lib/acde/skills/acde/references/reference/service.md +47 -0
- package/lib/acde/skills/acde/references/reference/testing.md +265 -0
- package/lib/acde/skills/acde/references/reference/web.md +94 -0
- package/lib/acde/skills/acde/references/start/first-app.md +87 -0
- package/lib/acde/skills/acde/references/start/install.md +232 -0
- package/lib/acde/skills/acde/references/start/project.md +77 -0
- package/lib/acde/templates/app/acde.config.jsonc +27 -0
- package/lib/acde/templates/app/gitignore +2 -0
- package/lib/acde/templates/app/index.html +22 -0
- package/lib/acde/templates/app/package.json +5 -0
- package/lib/acde/templates/app/src/i18n.js +26 -0
- package/lib/acde/templates/app/src/locales/en.js +4 -0
- package/lib/acde/templates/app/src/locales/zh.js +4 -0
- package/lib/acde/templates/app/src/main.js +5 -0
- package/lib/acde/templates/backend/server.ts +7 -0
- package/lib/acde/templates/backend/src/main.js +6 -0
- package/lib/acde/templates/desktop/acde.config.jsonc +17 -0
- package/lib/acde/templates/desktop/gitignore +2 -0
- package/lib/acde/templates/desktop/index.html +19 -0
- package/lib/acde/templates/desktop/package.json +5 -0
- package/lib/acde/templates/desktop/src/desktop.js +16 -0
- package/lib/acde/templates/desktop/src/i18n.js +26 -0
- package/lib/acde/templates/desktop/src/locales/en.js +4 -0
- package/lib/acde/templates/desktop/src/locales/zh.js +4 -0
- package/lib/acde/templates/framework/acde.config.jsonc +26 -0
- package/lib/acde-api/LICENSE +5 -0
- package/lib/acde-api/config.schema.json +563 -0
- package/lib/acde-api/package.json +51 -0
- package/lib/acde-api/src/app.d.ts +36 -0
- package/lib/acde-api/src/frame.d.ts +15 -0
- package/lib/acde-api/src/frame.js +1 -0
- package/lib/acde-api/src/index.d.ts +11 -0
- package/lib/acde-api/src/index.js +1 -0
- package/lib/acde-api/src/modules/app-modules.d.ts +81 -0
- package/lib/acde-api/src/modules/modules.d.ts +113 -0
- package/lib/acde-api/src/modules/shell-modules.d.ts +32 -0
- package/lib/acde-api/src/runtime/level.d.ts +1 -0
- package/lib/acde-api/src/runtime/level.js +1 -0
- package/lib/acde-api/src/runtime/load.d.ts +8 -0
- package/lib/acde-api/src/runtime/load.js +1 -0
- package/lib/acde-api/src/runtime/places.d.ts +3 -0
- package/lib/acde-api/src/runtime/places.js +1 -0
- package/lib/acde-api/src/runtime/platforms.d.ts +5 -0
- package/lib/acde-api/src/runtime/platforms.js +1 -0
- package/lib/acde-api/src/shell.d.ts +14 -0
- package/lib/acde-api/src/types/capabilities.d.ts +34 -0
- package/lib/acde-api/src/types/config.d.ts +55 -0
- package/lib/acde-api/src/types/events.d.ts +151 -0
- package/lib/acde-api/src/types/manifest.d.ts +83 -0
- package/lib/acde-api/src/types/office.d.ts +118 -0
- package/lib/acde-api/src/types/page.d.ts +1090 -0
- package/lib/acde-api/src/types/permissions.d.ts +50 -0
- package/lib/acde-api/src/types/service.d.ts +35 -0
- package/lib/acde-api/src/validate.d.ts +64 -0
- package/lib/acde-api/src/validate.js +1 -0
- package/lib/acde-api/src/vite.d.ts +3 -0
- package/lib/acde-api/src/vite.js +9 -0
- package/package.json +11 -4
- package/README.md +0 -3
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
# CLI
|
|
2
|
+
|
|
3
|
+
```text
|
|
4
|
+
acde <command> [args]
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
On error, acde prints one line, `acde: <reason>`, and exits with code 1. A wrong argument (an action `act` does not know, a level `console` does not know, …) is answered with one line that names what is wrong and the `acde <command> --help` to read, such as `acde: console: --level loud: one of log, info, warn, error, debug, errors (acde console --help)`; a wrong option value always reads `acde: <command>: --<option> <value>: <what it takes> (acde <command> --help)`. The full usage is printed only by `acde --help`.
|
|
8
|
+
|
|
9
|
+
After 0.0.9, exit codes are the same for every command:
|
|
10
|
+
|
|
11
|
+
| Exit code | Meaning |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
| 0 | Done (also an empty list, such as `acde console` with no entries) |
|
|
14
|
+
| 1 | An error: a wrong argument, something that failed, or something that stops it (a package in use) |
|
|
15
|
+
| 2 | Nothing done, but not an error: nothing matched (`acde query`, `acde inspect --find`) or nothing to remove (`acde uninstall`) |
|
|
16
|
+
| 3 | Cancelled or not confirmed: Ctrl+C in a question of `acde new` or during `acde sdk update`, a declined `acde uninstall`, or no terminal to ask in and no `--yes` |
|
|
17
|
+
|
|
18
|
+
What a command found goes to stdout; "nothing found", errors and notes go to stderr with the `acde:` prefix. In 0.0.9 some commands differ: `acde query` prints "nothing in …" on stdout, and `acde uninstall` exits 1 when the package is not installed and 2 when it is in use.
|
|
19
|
+
|
|
20
|
+
`acde --version` (or `-v`, or `acde version`) prints the version of acde on the first line, then the SDK version and contract level it was built with, and the acdert it finds (`ACDERT`, the one installed next to acde, then PATH) with that runtime's version and contract level. `acde --help` (or `-h`, or `acde help`) prints the usage of every command; `acde <command> --help` and `acde help <command>` print that command only. `acde` with no arguments prints only its version, the three commands that start a project, and a pointer to `acde --help`. An unknown command or argument prints one line that says what is wrong and which `--help` to read, and exits with code 1. Output is colored when it goes to a terminal; `NO_COLOR` (set and not empty) turns color off, and `FORCE_COLOR` (set and not `0` or `false`) turns it on. Only labels are colored: `acde:`, `error:`, `warning:`, the statuses of `acde doctor` and the headings of the help. An error is one line, `acde: <what went wrong>`; with `ACDE_DEBUG=1` its stack trace follows (after 0.0.9).
|
|
21
|
+
|
|
22
|
+
## Setup
|
|
23
|
+
|
|
24
|
+
### acde doctor
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
acde doctor [dir] [--json] [--online] [--fix [--yes]]
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Checks what `acde dev` and `acde test` need on this machine: acde on PATH, Bun and Node.js, acdert (found, runs, runs the contract level this acde builds, is the release this acde pairs with), the runtime's own checks (`acdert doctor`: its host files, the GPU, and on Linux the display), running `acde dev` sessions and the approvals they wait for, the project in `dir` (default: the current directory; `acde check`, this platform, its dependencies, `.acde/` in `.gitignore`), and the acde skill for coding agents. See [Check the setup](../guide/doctor.md).
|
|
31
|
+
|
|
32
|
+
| Option | Description |
|
|
33
|
+
| --- | --- |
|
|
34
|
+
| `--json` | One JSON object instead of lines: `{"ok": …, "checks": [{"id", "title", "status", "summary", "fix", "repair"}]}`; with `--fix` also `"fixed"` |
|
|
35
|
+
| `--online` | Also ask the acde download site (`ACDE_DIST`) whether a newer acde is out |
|
|
36
|
+
| `--fix` | After the checks, fix what acde can: some fixes right away, the others after asking; then check again. See [Fix what it can](../guide/doctor.md#fix-what-it-can) |
|
|
37
|
+
| `--yes` | With `--fix`: do the fixes that ask first without asking |
|
|
38
|
+
|
|
39
|
+
It prints one line per check, `<status> <check>: <what it found>`, with `fix: …` on the next line for a problem, and a last line that counts errors and warnings. The status is `ok`, `warn`, `error` or `skip` (not checked: no project here, or an earlier check failed). It exits with code 1 when a check is an error, else 0. A `dir` that holds no acde project is an error.
|
|
40
|
+
|
|
41
|
+
With `--fix`, after the report it prints `fixing: <what>`, the output of what it runs, and `fixed: <what>` or `failed: <what>: <why>` for each fix, `skipped: <what>` for one that was not allowed, and then `acde doctor: after fixing:` and the checks again; the exit code follows the second run. When nothing can be fixed it says `acde doctor: nothing here it can fix; the fix lines say what to do`. `--yes` without `--fix` is an error.
|
|
42
|
+
|
|
43
|
+
## Projects
|
|
44
|
+
|
|
45
|
+
### acde new
|
|
46
|
+
|
|
47
|
+
```text
|
|
48
|
+
acde new [dir] [--template T] [--id ID] [--label NAME] [--backend] [--install|--no-install] [--git] [--pm PM] [--yes]
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Creates a project. In a terminal, it asks for whatever is missing; with `--yes`, or outside a terminal, it asks nothing (then `dir` is required, the template defaults to `html`, the dependencies are installed unless `--no-install` is given, and no repository is created unless `--git` is given).
|
|
52
|
+
|
|
53
|
+
| Option | Description |
|
|
54
|
+
| --- | --- |
|
|
55
|
+
| `--template` | `html` `desktop` `react` `vue` `svelte` `solid` `preact` `vanilla` `next` `nuxt` `sveltekit` `astro` |
|
|
56
|
+
| `--id` / `--label` | App id and display name |
|
|
57
|
+
| `--backend` | Add `server.ts`, a backend. In 0.0.9, `html` only (the other templates ignore it); after 0.0.9, `html` and the Vite templates, and `next`, `nuxt`, `sveltekit`, `astro` (which have their own server) and `desktop` (which has none) refuse it |
|
|
58
|
+
| `--install` / `--no-install` | Install the dependencies, the SDK included, with the package manager, or do not; without either, `acde new` asks in a terminal and installs them otherwise |
|
|
59
|
+
| `--git` | `git init` and make the first commit (if a git user name and email are configured) |
|
|
60
|
+
| `--pm` | `bun` `npm` `pnpm` `yarn`; decides whether the project runs on Bun or Node.js (default: `bun` when acde runs on Bun, else `npm`; in a terminal with both installed, it asks) |
|
|
61
|
+
|
|
62
|
+
### acde check
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
acde check [dir] [--platform windows|macos|linux]
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Checks the config (id, entry, icon, service modules, framework) and the manifest rules of the SDK, or the manifest and entry files of a handwritten package, and the `acde:` imports against the manifest. It prints `error:`, `warning:` and `note:` lines on stderr and exits with code 1 only when there is an error. A `note:` marks an import that the check lets pass but cannot verify, the namespace of a [desktop service](../guide/services.md#call-it) that is not the service's own name: `note: src/main.js:1: app "notes": acde:timer resolves only if the service Notes lists ("clock") provides the "timer" namespace`.
|
|
69
|
+
|
|
70
|
+
It also checks the app's declared capabilities against what a platform has, once for each way of running an app there (`desktop` and `standalone`, on Linux also `session`). That platform is the one `acde check` runs on, or the one `--platform` names:
|
|
71
|
+
|
|
72
|
+
- A required capability that the platform lacks is an error: `error: windows (desktop): app "notes" requires network, which this mode lacks`, followed by a hint on making it optional.
|
|
73
|
+
- An optional capability that it lacks is a note, and no error: `note: windows (desktop): app "notes" runs without optional camera, which this mode lacks`.
|
|
74
|
+
- When no required capability is missing, the last line is `ok: linux (session, desktop, standalone): every required capability is there`.
|
|
75
|
+
|
|
76
|
+
### acde build
|
|
77
|
+
|
|
78
|
+
```text
|
|
79
|
+
acde build [dir] [--out DIR]
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Builds into `DIR` (default `.acde`). A relative `--out` is resolved against the project being built. The `acde:` imports are checked first, as in `acde check` (an error stops the build, a `note:` is printed), and the manifest of the output is checked again.
|
|
83
|
+
|
|
84
|
+
### acde install
|
|
85
|
+
|
|
86
|
+
```text
|
|
87
|
+
acde install [dir] [--out DIR]
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Builds, then installs into `$XDG_DATA_HOME/acde/packages/<id>`; without `XDG_DATA_HOME`, `~/.local/share/acde/packages/<id>` (on Windows `%USERPROFILE%\.local\share\acde\packages\<id>`). See [Local install](../guide/install.md).
|
|
91
|
+
|
|
92
|
+
### acde uninstall
|
|
93
|
+
|
|
94
|
+
```text
|
|
95
|
+
acde uninstall [id|dir] [--yes] [--data | --keep-data]
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Removes a package that `acde install` put into the packages directory, found by its id (its directory name there) or by the project directory it was installed from. For a handwritten package, installed as a link, it removes only the link; the project it points at stays. Before removing, it prints what it removes (`acde: removes <id>: <path> ...`) and, in a terminal, asks; `--yes` removes without asking, and outside a terminal nothing is removed without `--yes`. When an `acde dev` session runs the package's desktop or one of its apps, or runs a desktop while the package has apps, it removes nothing and names the session to stop first (`acde stop --session <pid>`). With no argument it lists the installed packages, one per line: the id and the path (for a link, `-> <project>`).
|
|
99
|
+
|
|
100
|
+
The data of the package's apps and desktops (`storage/app-<id>/`, `storage/desktop-<id>/` and `apps/<id>/` under `$XDG_DATA_HOME/acde`, or under `ACDE_STORAGE` for the storage) is removed with `--data` and kept with `--keep-data` (after 0.0.9; 0.0.9 keeps it); with neither, a terminal is asked and `--yes` keeps it, printing `acde: kept its data (…): <paths>`. Both together is a wrong argument (exit code 1).
|
|
101
|
+
|
|
102
|
+
| Exit code | Meaning |
|
|
103
|
+
| --- | --- |
|
|
104
|
+
| 0 | Removed, or listed |
|
|
105
|
+
| 1 | In use by an `acde dev` session, or a wrong argument |
|
|
106
|
+
| 2 | Not installed |
|
|
107
|
+
| 3 | Not confirmed (the question was declined, or no terminal and no `--yes`) |
|
|
108
|
+
|
|
109
|
+
### acde sdk
|
|
110
|
+
|
|
111
|
+
```text
|
|
112
|
+
acde sdk [update] [dir]
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Shows the project's `@dopame/acde-api` and the SDK version this acde pairs with. `acde sdk update` points the dependency at that version's tarball on `https://pkgs.dopame.ai/acdert/<version>/` and reinstalls with the project's package manager (from its lock file or `packageManager`). With npm 12 or later it also adds `allow-remote=root` to `.npmrc` (in the workspace root for a workspace member, where npm reads it; npm 12 refuses URL dependencies without it; projects `acde new` makes with npm 12 have it already). npm 11 does not need it and gets no `.npmrc`, so a project made with npm 11 needs one `acde sdk update` before npm 12 installs it. If the package manager is not on PATH it changes nothing. If the install fails or is interrupted (Ctrl+C), it puts `package.json`, the lock file and `.npmrc` back as they were and says so, naming any file it could not put back; run the install again to bring `node_modules` back in line. `acde check` also warns when `node_modules` holds another SDK version than `package.json` names. `acde check` and `acde dev` warn when the two differ, for example after upgrading acde.
|
|
116
|
+
|
|
117
|
+
### acde dev
|
|
118
|
+
|
|
119
|
+
```text
|
|
120
|
+
acde dev [dir...] [--out DIR] [--app ID] [--desktop ID|DIR] [--headless] [--verbose] [--force]
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Builds, starts acdert, and rebuilds and reloads on changes. `--headless` opens no window; use it on a machine without a display. `--verbose` (after 0.0.9) also prints the runtime's own info log; by default the terminal shows what the pages and backends print, what happens to each app, and the runtime's warnings and errors. On Linux without `WAYLAND_DISPLAY` or `DISPLAY`, `acde dev` without `--headless` stops with `acde: no display here (no WAYLAND_DISPLAY or DISPLAY): run acde dev --headless` and exits with code 1. After 0.0.9, only one `acde dev` runs a project at a time, even when two start at the same moment: a second one exits with code 1 before it builds and names the running one (`acde: acde dev <pid> already runs <dir>; stop it first (acde stop --session <pid>), or pass --force to start another`); `--force` starts it anyway. Ctrl+C, SIGINT and SIGTERM end the session and its runtime, and remove its files (in 0.0.9, a SIGINT sent to `acde dev` alone, not through the terminal, is ignored); after 0.0.9, files left by a session that was killed are removed by the next `acde dev` or session command. See [acde dev](../guide/dev.md) and [Without a display](../guide/tools.md#without-a-display).
|
|
124
|
+
|
|
125
|
+
## Running sessions
|
|
126
|
+
|
|
127
|
+
These work with a running `acde dev` session, and all of them accept `--session <pid>`. A `<web>` is one page: a web name from `acde webs`, an app id, or `desktop`; a `<ref>` is an element id from `acde inspect` or `acde query`, such as `w1.12`, a window, such as `w1`, or (after 0.0.9) a menu on a window's title bar, such as `w1.m1`, or an item of it, `w1.m1.2`. See [Debugging](../guide/tools.md).
|
|
128
|
+
|
|
129
|
+
| Command | Description |
|
|
130
|
+
| --- | --- |
|
|
131
|
+
| `acde webs` | Lists pages |
|
|
132
|
+
| `acde eval <web> <code\|->` | Runs code in a page and prints JSON |
|
|
133
|
+
| `acde shot <web> [-o, --output FILE]` | Window screenshot, default `./<web>.png` |
|
|
134
|
+
| `acde screen [-o, --output FILE]` | Full-screen screenshot, default `./screen.png` |
|
|
135
|
+
| `acde pointer <x> <y>` | Moves the pointer to screen coordinates, as a real move |
|
|
136
|
+
| `acde inspect [--window W] [--find TEXT] [--all] [--offscreen]` | The screen as text |
|
|
137
|
+
| `acde query <selector> [--window W] [--ref REF] [--limit N]` | The elements a CSS selector matches, each with a ref |
|
|
138
|
+
| `acde act <ref> <action> [arg]` | Performs an action on a ref |
|
|
139
|
+
| `acde input <web> <events\|->` | Sends a JSON array of raw mouse and keyboard events to a page, in its CSS pixels: `move` / `down` / `up` (`x`, `y`, `button`), `wheel` (`x`, `y`, `dx`, `dy`), `keydown` / `keyup` (`key`), `text` (`text`), `wait` (`ms`, up to 10000). Moves are a frame apart, so moves with the button down draw a path; `keydown`, `wait`, `keyup` holds a key (after 0.0.9). In 0.0.9, `down`, `up` and `wheel` happen where the pointer is, whatever their `x` and `y`: send a `move` there first; after 0.0.9 they move the pointer to their `x` and `y` |
|
|
140
|
+
| `acde console [--web W] [--level L] [--since S] [--follow]` | Page logs and errors; `--since reload` or `--since N` |
|
|
141
|
+
| `acde network [--web W] [--failed] [--since S] [--follow]` | Page requests; `--since reload` or `--since N`. With nothing to show, `console` and `network` print `acde: no console entries` / `acde: no requests` on stderr and exit 0 (after 0.0.9) |
|
|
142
|
+
| `acde choose <folder\|open\|save> [path...] [--cancel]` | (after 0.0.9) Answers the next folder, file or save picker the page opens: one folder, one or more files, or the file to write; `--cancel` answers it as cancelled. Prints `the next folder picker answers <path>`. A headless session shows no picker, so answer it before the action that opens it |
|
|
143
|
+
| `acde drop <web> <file...> [--at X,Y]` | (after 0.0.9) Drops files onto a page as a drag from the system would (`dragenter`, `dragover`, `drop` with the files), at `X,Y` in its CSS pixels or in the middle. Prints `dropped N files onto <web>` |
|
|
144
|
+
| `acde permissions` | The camera and microphone prompts that wait and the decisions made |
|
|
145
|
+
| `acde allow [<prompt id> \| <app> <capability>] [--all]` | Allows a waiting camera or microphone prompt |
|
|
146
|
+
| `acde deny [<prompt id> \| <app> <capability>] [--all]` | Denies a waiting camera or microphone prompt |
|
|
147
|
+
| `acde revoke <app> <capability>` | Takes back a decision |
|
|
148
|
+
| `acde stop` | Ends the session and its acdert; see [Stopping](../guide/dev.md#stopping) |
|
|
149
|
+
| `acde devtools [web]` | Opens the DevTools of Chrome or Edge on a page of the session (a web name, an app id, `desktop`, a window title, or `services` or a service name for the services; default: the focused page) and prints the DevTools address. It looks for Edge, then Chrome on Windows; the Chrome app, then the Edge app on macOS; `google-chrome`, `chrome`, `chromium`, `microsoft-edge` on `PATH` on Linux. The browser runs with a profile of its own in acde's cache directory (`acde/devtools/` under `%LOCALAPPDATA%`, `~/Library/Caches` or `~/.cache`), never your everyday one; it opens no window of its own and no sync prompt, only the DevTools window, and stays running for the next `acde devtools`. `ACDE_BROWSER` names another browser; `ACDE_BROWSER=none` opens nothing. Without a browser, or when it cannot be started or reached, it prints the address and why, to paste into the address bar of Chrome or Edge, and exits 0. Asked again for a page whose DevTools are open, it brings them to the front. F12 in a window of `acde dev` (fn+F12 on a Mac keyboard) does the same for the page in that window, and the page never sees that F12; F12 with a modifier still reaches the page (after 0.0.9) |
|
|
150
|
+
| `acde mcp [--session PID]` | MCP server over stdio; see [MCP](../guide/mcp.md) |
|
|
151
|
+
|
|
152
|
+
| Option | Description |
|
|
153
|
+
| --- | --- |
|
|
154
|
+
| `--window` | `inspect`, `query`: this window (`w1`) instead of the focused one |
|
|
155
|
+
| `--ref` | `query`: search only under this element (`w1.12`) |
|
|
156
|
+
| `--limit` | `query`: list at most this many elements (1 to 3000, default 600) |
|
|
157
|
+
| `--all` | `inspect`: every window that is not marked `[minimized]`, and elements hidden by `opacity: 0` or `visibility`. `allow`, `deny`: every waiting prompt |
|
|
158
|
+
| `--cancel` | `choose`: answer the picker as cancelled |
|
|
159
|
+
| `--at` | `drop`: where to drop, `X,Y` in the page's CSS pixels |
|
|
160
|
+
|
|
161
|
+
`acde query` prints `N in <window>:` and one line per element (exit code 0), or `acde: nothing in <window> matches "<selector>"` on stderr (exit code 2; in 0.0.9 on stdout, without `acde: `). `acde inspect --find TEXT` exits with code 2 when no element's name or value contains TEXT. Exit code 2 always means the command worked and found nothing; 1 means an error, such as a window or element that does not exist. `acde act` prints what it did and what changed; when the action was not done it prints the reason on stderr (`acde: act <ref>: <reason>`) and exits with code 1. A ref that no longer exists says `there is no such element (any more); acde inspect --find TEXT gives the current refs`.
|
|
162
|
+
|
|
163
|
+
`acde permissions` prints two blocks and exits with code 0:
|
|
164
|
+
|
|
165
|
+
```text
|
|
166
|
+
pending:
|
|
167
|
+
2 recorder microphone (request)
|
|
168
|
+
decisions:
|
|
169
|
+
recorder camera granted
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
A pending line is `<prompt id> <app> <capability> (<reason>)`; the reason is always `request` (the running app asked: its `getUserMedia()` or `request()` waits for the answer); a decision line is `<app> <capability> <granted|denied>`. An empty block is `pending: none` or `decisions: none`.
|
|
173
|
+
|
|
174
|
+
`acde allow` and `acde deny` answer prompts that wait now. Without arguments they answer the only waiting prompt; when several wait they answer none, list them, and exit with code 1. `<prompt id>` names one prompt, `<app> <capability>` the prompt of that app for that capability, and `--all` every waiting prompt. Each answered prompt prints `allowed <app> <capability> (prompt <id>)` or `denied <app> <capability> (prompt <id>)`. When nothing waits, or nothing matches, they print one line that says so (`acde: no approval prompt is waiting`, `acde: no approval prompt 5 is waiting (waiting: 2)`) and exit with code 1.
|
|
175
|
+
|
|
176
|
+
`acde revoke <app> <capability>` prints `revoked <app> <capability>`; when there is no such decision it says so and exits with code 1.
|
|
177
|
+
|
|
178
|
+
While a camera or microphone prompt waits, `acde webs` prints one line per prompt after the table (the app's window is open; its `getUserMedia()` waits): `<app> waits for approval of <capability>: acde allow (or acde deny)`. See [Camera and microphone](../guide/tools.md#camera-and-microphone).
|
|
179
|
+
|
|
180
|
+
## Coding agents
|
|
181
|
+
|
|
182
|
+
```text
|
|
183
|
+
acde skills [install|remove|path] [--agent ID,...] [--dir DIR] [--copy]
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
| Command | Description |
|
|
187
|
+
| --- | --- |
|
|
188
|
+
| `acde skills` | Where the acde skill is installed, and whether each place is current |
|
|
189
|
+
| `acde skills install` | Links the skill into `~/.agents/skills` and the skills directory of every agent found |
|
|
190
|
+
| `acde skills remove` | Removes it from those places, and the directories `install` created that are now empty |
|
|
191
|
+
| `acde skills path` | Prints the skill's directory inside the acde install |
|
|
192
|
+
|
|
193
|
+
| Option | Description |
|
|
194
|
+
| --- | --- |
|
|
195
|
+
| `--agent` | These agents (comma-separated ids such as `claude-code`, `codex`, `cursor`) instead of the ones found |
|
|
196
|
+
| `--dir` | This skills directory instead; the skill goes into `DIR/acde` |
|
|
197
|
+
| `--copy` | Copy instead of link (`install` only) |
|
|
198
|
+
|
|
199
|
+
See [Coding agents](../guide/agents.md).
|
|
200
|
+
|
|
201
|
+
## Testing
|
|
202
|
+
|
|
203
|
+
```text
|
|
204
|
+
acde test [dir|file...] [--headed] [-t PATTERN] [--desktop ID|DIR] [--timeout MS] [--bail] [--trace] [-u]
|
|
205
|
+
[--workers N] [--retries N] [--video[=on|failed|off]]
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
| Option | Description |
|
|
209
|
+
| --- | --- |
|
|
210
|
+
| `--headed` | Open windows (headless by default) |
|
|
211
|
+
| `-t`, `--test-name-pattern` | Run only tests whose names match |
|
|
212
|
+
| `--desktop` | Run the app in this desktop |
|
|
213
|
+
| `--timeout` | Timeout per test, including the start of its session (milliseconds, default 60000) |
|
|
214
|
+
| `--bail` | Stop at the first failure |
|
|
215
|
+
| `--trace` | Leave a `trace.html` for every test |
|
|
216
|
+
| `-u`, `--update-screenshots` | Rewrite screenshot baselines |
|
|
217
|
+
| `--workers` | How many test files run at once (default: half the cores, at most 4; 1 with `--headed` or `--bail`) |
|
|
218
|
+
| `--retries` | Run a failing test again this many times, each on a fresh session; a test that passes later is reported as flaky (default 0) |
|
|
219
|
+
| `--video` | Keep `video.png`, an animated PNG of the screen, for failing tests (the same as `--video=failed`); `--video=on` keeps it for every test, `--video=off` for none (the default) |
|
|
220
|
+
|
|
221
|
+
The run ends with one line that counts tests and files and names the failing files (after 0.0.9; 0.0.9 prints a line for tests and one for files) (`acde test: 5 tests in 2 files: 4 passed, 1 failed; failed: e2e/notes.e2e.ts`); see [Testing](../guide/testing.md#commands).
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# acde.config.jsonc
|
|
2
|
+
|
|
3
|
+
The project configuration. The JSON Schema is at `@dopame/acde-api/config.schema.json`, and the TypeScript type is `AcdeConfig`:
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type AcdeConfig = AppConfig | DesktopConfig
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Common fields
|
|
10
|
+
|
|
11
|
+
| Field | Type | Default | Description |
|
|
12
|
+
| --- | --- | --- | --- |
|
|
13
|
+
| `$schema` | string | | Path to the JSON Schema |
|
|
14
|
+
| `type` | `"app"` \| `"desktop"` | | Required |
|
|
15
|
+
| `name` | string | `name` from `package.json` | Package name |
|
|
16
|
+
| `version` | string | `version` from `package.json` | |
|
|
17
|
+
| `apiLevel` | integer ≥ 1 | The SDK's `API_LEVEL` (1) | The contract level; `acde build` writes it into the manifest. Leave it out |
|
|
18
|
+
| `public` | string | `"public"` | Directory of static files copied as is |
|
|
19
|
+
|
|
20
|
+
## AppConfig
|
|
21
|
+
|
|
22
|
+
| Field | Type | Default | Description |
|
|
23
|
+
| --- | --- | --- | --- |
|
|
24
|
+
| `id` | string | Derived from the package name | `[a-z0-9][a-z0-9-]*` |
|
|
25
|
+
| `label` | string | | Display name |
|
|
26
|
+
| `icon` | icon name \| path | `"app"` | See [Icons](../guide/assets.md#icons) |
|
|
27
|
+
| `entry` | string | `"index.html"` | HTML, or a module whose default export is a `WindowApp`; omit when using a framework |
|
|
28
|
+
| `framework` | `Framework` | `"auto"` | See below |
|
|
29
|
+
| `capabilities` | `Capabilities` | `{}` | System capabilities; see [Manifest](manifest.md#capabilities). A desktop service's name here is an error |
|
|
30
|
+
| `optional` | string[] | `[]` | Names that are also in `capabilities`: the app runs without them and reaches them with `load()` |
|
|
31
|
+
| `services` | string[] | `[]` | Desktop services the app uses, imported as `acde:<name>`; not the name of a system module |
|
|
32
|
+
| `size` | `[number, number]` | `[800, 600]` | Content area in logical pixels, positive integers. When `acde dev` runs the app alone, the size the host window opens at (the app fills it); not applied with `--headless` |
|
|
33
|
+
| `frame` | boolean | `true` | System title bar |
|
|
34
|
+
| `multiple` | boolean | `false` | Allow multiple windows |
|
|
35
|
+
| `mimeTypes` | string[] | `[]` | `type/subtype` or `type/*` |
|
|
36
|
+
| `schemes` | string[] | `[]` | URL schemes of links the app opens: `[a-z][a-z0-9+.-]*`, no colon, not `file` |
|
|
37
|
+
| `requests` | string[] | `[]` | Request kinds the app accepts from `open()`: `[a-z][a-z0-9-]*`, not `open-file` or `open-link` |
|
|
38
|
+
| `heapMb` | number | 256 | JS heap limit per window, ≥ 32 |
|
|
39
|
+
| `backend` | `false` \| `{entry?, port?}` | Detected automatically | See [Backend](../guide/backend.md) |
|
|
40
|
+
|
|
41
|
+
`Framework`: `auto` `none` `next` `nuxt` `sveltekit` `astro` `react-router` `remix` `angular` `vite` `cra` `script`.
|
|
42
|
+
|
|
43
|
+
## DesktopConfig
|
|
44
|
+
|
|
45
|
+
| Field | Type | Default | Description |
|
|
46
|
+
| --- | --- | --- | --- |
|
|
47
|
+
| `id` / `label` / `description` | string | | |
|
|
48
|
+
| `entry` | string | `"index.html"` | The desktop page |
|
|
49
|
+
| `heapMb` | number | 1024 | |
|
|
50
|
+
| `services` | `Record<string, string \| ServiceConfig>` | | Service name → module path, or `{ module, modules? }`: the module path and the shell modules the service gets from `ctx.import()`; see [Services](../guide/services.md#shell-modules-in-a-service) |
|
|
51
|
+
| `apps` | `WindowAppConfig[]` | | Bundled apps (system apps): the `AppConfig` fields except `framework`; `id` and `entry` are required, and `capabilities` may name shell modules |
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Environment variables
|
|
2
|
+
|
|
3
|
+
## acde
|
|
4
|
+
|
|
5
|
+
| Variable | Effect |
|
|
6
|
+
| --- | --- |
|
|
7
|
+
| `ACDE_INSTALL` | Install directory, default `~/.acde` |
|
|
8
|
+
| `ACDE_DIST` | Where the installers download acde and its runtime from, where `acde new` and `acde sdk update` point the SDK dependency, and where `acde doctor --online` looks for a newer one; default `https://pkgs.dopame.ai/acde` |
|
|
9
|
+
| `ACDERT` | The acdert binary `acde dev` and `acde test` run: a path, or a name on PATH. Unset: the acdert the installer put next to acde, then `acdert` on PATH |
|
|
10
|
+
| `ACDE_BUNDLER=vite` | Bundle with Vite on Bun too |
|
|
11
|
+
| `ACDE_DEBUG=1` | An error also prints its stack trace (normally only the one-line message) (after 0.0.9) |
|
|
12
|
+
| `ACDE_BROWSER` | The browser `acde devtools` and F12 in `acde dev` open DevTools in: a path, or `none` to open nothing and only print the address. Unset: Edge, then Chrome on Windows; Chrome, then Edge on macOS; Chrome, Chromium or Edge on `PATH` on Linux (after 0.0.9) |
|
|
13
|
+
| `CI` | When set, `toHaveScreenshot` does not write new baselines; a missing baseline fails right away |
|
|
14
|
+
| `NO_COLOR` | Set and not empty: no color in acde's output |
|
|
15
|
+
| `FORCE_COLOR` | Set and not `0` or `false`: color even when the output is not a terminal |
|
|
16
|
+
|
|
17
|
+
## Runtime (acdert)
|
|
18
|
+
|
|
19
|
+
`acde dev` and `acde test` set what is needed for you. To adjust things by hand:
|
|
20
|
+
|
|
21
|
+
| Variable | Effect |
|
|
22
|
+
| --- | --- |
|
|
23
|
+
| `ACDE_PATH` | Extra package directories (separated by `;` on Windows) |
|
|
24
|
+
| `ACDE_DESKTOP` | Default desktop |
|
|
25
|
+
| `ACDE_HEADLESS=1` | Don't open a window |
|
|
26
|
+
| `ACDE_SIZE` | Screen size, such as `1280x800` |
|
|
27
|
+
| `ACDE_SCALE` | Scale factor when headless (0.5–4) |
|
|
28
|
+
| `ACDE_COLOR_SCHEME` | `light` / `dark` |
|
|
29
|
+
| `ACDE_STORAGE` | Root directory for web storage; set it to empty to keep storage in memory only |
|
|
30
|
+
| `ACDE_AUTOSTART` | Autostart items run by default only in a Dopame OS session: `1` runs them in the host window too, `0` skips them |
|
|
31
|
+
| `ACDE_AUDIO=null` | No sound |
|
|
32
|
+
| `ACDE_CAPTURE=fake` | A fake camera and microphone (`Fake camera`, `Fake microphone`) in place of the system's devices, for `getUserMedia()` |
|
|
33
|
+
| `ACDE_FRAME_STYLE` | Title bar style: `mac` (traffic lights) or `windows` (Windows buttons). Unset: `windows` in the host window on Windows, else `mac` |
|
|
34
|
+
|
|
35
|
+
## App backends
|
|
36
|
+
|
|
37
|
+
| Variable | What it is |
|
|
38
|
+
| --- | --- |
|
|
39
|
+
| `ACDE_APP_ID` | The app id |
|
|
40
|
+
| `ACDE_APP_DATA` | The app's data directory (also its working directory) |
|
|
41
|
+
| `ACDE_APP_SOCKETS` | The app's socket directory. Not set for a Node.js backend on Windows, which gets `ACDE_APP_CHANNEL=fd` instead; see [Backend](../guide/backend.md#on-windows) |
|
|
42
|
+
| `PORT` | The configured port |
|
|
43
|
+
| `NODE_ENV` | `production` |
|
|
44
|
+
| `http_proxy`, `https_proxy`, `all_proxy`, `no_proxy` | The session's proxy variables, or else the system's manual proxy (Windows, macOS) with its exceptions plus `localhost,127.0.0.1,::1` in `no_proxy`; upper-case names on Windows, both cases elsewhere. See [Backends](../guide/backend.md#running) |
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Manifest
|
|
2
|
+
|
|
3
|
+
The runtime only understands **packages**: a directory whose `package.json` has an `acde` field holding the manifest. `acde build` generates it from your config; you can also write it by hand.
|
|
4
|
+
|
|
5
|
+
```json
|
|
6
|
+
{
|
|
7
|
+
"name": "my-pkg",
|
|
8
|
+
"acde": {
|
|
9
|
+
"apiLevel": 1,
|
|
10
|
+
"desktops": [{ "id": "dopame", "name": "Dopame", "entry": "desktop/index.html", "services": ["assistant"] }],
|
|
11
|
+
"apps": [{ "id": "term", "label": "Terminal", "icon": "term", "entry": "/app/term/index.html", "capabilities": { "terminal": true } }],
|
|
12
|
+
"assets": { "/app/term/": ["apps/term/web"], "/desktop/dopame/": ["desktop"] },
|
|
13
|
+
"services": [{ "name": "assistant", "module": "services/assistant.js" }]
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
There is a single manifest validator: the runtime and `acde check` / `acde build` run the same code (`@dopame/acde-api/manifest`). `acde check <dir>` checks a handwritten package.
|
|
19
|
+
|
|
20
|
+
## PackageManifest
|
|
21
|
+
|
|
22
|
+
| Field | Description |
|
|
23
|
+
| --- | --- |
|
|
24
|
+
| `apiLevel` | The contract level the package is built for, a positive integer; required. See [Contract level](#contract-level) |
|
|
25
|
+
| `desktops` | List of desktops |
|
|
26
|
+
| `apps` | List of apps. In a package that has a desktop they are system apps |
|
|
27
|
+
| `assets` | Same-origin URL prefix (`/…/`) → list of directories in the package |
|
|
28
|
+
| `services` | `{name, module}`: service name and module file. A name cannot be that of a system module or capability |
|
|
29
|
+
|
|
30
|
+
## Contract level
|
|
31
|
+
|
|
32
|
+
`apiLevel` says which version of the contract between packages and the runtime a package follows. The current level is 1 (`API_LEVEL` in `@dopame/acde-api`; `acde --version` and `acdert --version` print theirs). The runtime loads only packages of its own level:
|
|
33
|
+
|
|
34
|
+
| Package | What the runtime and `acde check` say |
|
|
35
|
+
| --- | --- |
|
|
36
|
+
| No `apiLevel` (built before contract levels) | `no acde.apiLevel: a package built before contract levels; rebuild it with the current acde (level 1)` |
|
|
37
|
+
| Another level | `acde.apiLevel 2: needs level 2, runtime is level 1` |
|
|
38
|
+
|
|
39
|
+
A package the runtime refuses is not in the app list or the desktop list. Rebuild it with the current `acde`.
|
|
40
|
+
|
|
41
|
+
## DesktopManifest
|
|
42
|
+
|
|
43
|
+
| Field | Description |
|
|
44
|
+
| --- | --- |
|
|
45
|
+
| `id` / `name` / `description` | |
|
|
46
|
+
| `entry` | The desktop page: the path of an HTML file in the package (`desktop/index.html`), not a URL |
|
|
47
|
+
| `services` | The services it uses: a name, or `{name, modules}` where `modules` lists the shell modules the service may get from `ctx.import()` (see [Service API](service.md)) |
|
|
48
|
+
| `heapMb` | Defaults to 1024, minimum 32 |
|
|
49
|
+
|
|
50
|
+
## AppManifest
|
|
51
|
+
|
|
52
|
+
| Field | Description |
|
|
53
|
+
| --- | --- |
|
|
54
|
+
| `id` | `[\w-]+`, required. The runtime accepts this; a config only allows `[a-z0-9][a-z0-9-]*` (see [acde.config.jsonc](config.md#appconfig)), so the looser rule matters only for a handwritten package |
|
|
55
|
+
| `label` | Required |
|
|
56
|
+
| `icon` | An icon name, or a URL under assets ending in `.svg` / `.png`; required |
|
|
57
|
+
| `entry` | A URL starting with `/`, required. HTML or a module; a trailing `/` means the page is rendered by the backend (requires `backend`) |
|
|
58
|
+
| `capabilities` | System capabilities; see below |
|
|
59
|
+
| `optional` | Names from `capabilities` the app can run without |
|
|
60
|
+
| `services` | Names of the desktop services the app uses |
|
|
61
|
+
| `heapMb` | Defaults to 256, minimum 32 |
|
|
62
|
+
| `size` | `[width, height]`, defaults to 800 × 600 |
|
|
63
|
+
| `multiple` | Defaults to `false` |
|
|
64
|
+
| `frame` | Defaults to `true` |
|
|
65
|
+
| `mimeTypes` | File types the app can open: `type/subtype` or `type/*` |
|
|
66
|
+
| `schemes` | URL schemes of the links the app can open: lowercase, without the colon, not `file` |
|
|
67
|
+
| `requests` | Request kinds the app accepts from other apps: lowercase words, not `open-file` or `open-link` |
|
|
68
|
+
| `backend` | `{entry, port?}`: `entry` is a `.js` / `.mjs` URL under assets; `port` defaults to 3000 |
|
|
69
|
+
|
|
70
|
+
## Capabilities
|
|
71
|
+
|
|
72
|
+
| Key | Value | Grants | Asks the user |
|
|
73
|
+
| --- | --- | --- | --- |
|
|
74
|
+
| `fs` | `true` \| `{roots: string[]}` | `acde:fs`: the private folder and picked folders; `roots` names shared places (`desktop`, `documents`, `downloads`, `music`, `pictures`, `videos`) | |
|
|
75
|
+
| `terminal` | `true` | `acde:terminal` | |
|
|
76
|
+
| `network` | `true` | `acde:network` | |
|
|
77
|
+
| `office` | `true` | `acde:office` | |
|
|
78
|
+
| `launch` | `true` | `start` in `acde:launch` | |
|
|
79
|
+
| `slots` | `true` | `embed` in `acde:launch`: native programs embedded in the app's window | |
|
|
80
|
+
| `open` | `true` \| `string[]` | Opening (these) apps with `acde:open` | |
|
|
81
|
+
| `openFiles` | `true` | `acde:openPath`, `acde:handlers`, and `open(request)` without a target app | |
|
|
82
|
+
| `camera` / `microphone` | `true` | `getUserMedia()` video / audio | Yes. In 0.0.9, a required one when the app starts, an optional one on first use; after 0.0.9, both on first use |
|
|
83
|
+
| `windows` `packages` `session` `desktops` `inspect` `desktop` `setDefault` `permissions` | `true` | The shell module of that name. System apps only: an error in any other package | |
|
|
84
|
+
|
|
85
|
+
Any other key is an error: desktop services go in `services`. System apps are never asked for approval.
|
|
86
|
+
|
|
87
|
+
Everything in `capabilities` and `services` is required unless `optional` lists it (`optional` takes names from `capabilities` only). An app with a required item that is missing here (unsupported on the platform, service not running) is left out of the app list and refuses to start: `Notes needs "network" (not available on macOS host windows); list it in "optional" to run without it` (404 `unsupported_app`; the place is `Windows host windows`, `Linux host windows` or `Linux sessions`), or `Notes needs "clock" (service not running)` (503 `service_not_running`). Declaring a capability grants it; only the camera and the microphone ask the user (see [Capabilities](../guide/capabilities.md#camera-and-microphone)).
|
|
88
|
+
|
|
89
|
+
## URLs
|
|
90
|
+
|
|
91
|
+
- Pages have the origin `http://acde.local`.
|
|
92
|
+
- An app's files are served at `/app/<id>/` and also mounted at `/`; a desktop is at `/desktop/<id>/`.
|