@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.
Files changed (165) hide show
  1. package/LICENSE +8 -0
  2. package/bin/acde +66 -0
  3. package/bin/acde.cmd +45 -0
  4. package/bin/acdebin-dbg +4 -0
  5. package/bin/app/brand/art.mjs +53 -0
  6. package/bin/app/brand/brand.css +39 -0
  7. package/bin/app/brand/lockup.mjs +17 -0
  8. package/bin/app/brand/mark.mjs +124 -0
  9. package/bin/app/dist/broker.js +1 -0
  10. package/bin/app/dist/web.js +1 -0
  11. package/bin/app/greet/index.html +177 -0
  12. package/bin/app/greet/package.json +16 -0
  13. package/bin/app/package.json +35 -0
  14. package/lib/acde/LICENSE +8 -0
  15. package/lib/acde/dist/chunk-0n69bv5q.js +1 -0
  16. package/lib/acde/dist/chunk-1cw92x19.js +1 -0
  17. package/lib/acde/dist/chunk-458e14zb.js +1 -0
  18. package/lib/acde/dist/chunk-88mxgp54.js +1 -0
  19. package/lib/acde/dist/chunk-8dv09ven.js +1 -0
  20. package/lib/acde/dist/chunk-8fxsj5h6.js +1 -0
  21. package/lib/acde/dist/chunk-8pf3kk8v.js +1 -0
  22. package/lib/acde/dist/chunk-8r65bz1e.js +1 -0
  23. package/lib/acde/dist/chunk-9hpnkmxn.js +1 -0
  24. package/lib/acde/dist/chunk-a7w41xr9.js +1 -0
  25. package/lib/acde/dist/chunk-db7qqt8a.js +1 -0
  26. package/lib/acde/dist/chunk-e3rzr5fj.js +1 -0
  27. package/lib/acde/dist/chunk-ehms6xjp.js +1 -0
  28. package/lib/acde/dist/chunk-ggykhab6.js +1 -0
  29. package/lib/acde/dist/chunk-gt70e8h2.js +1 -0
  30. package/lib/acde/dist/chunk-hcf0xd5c.js +1 -0
  31. package/lib/acde/dist/chunk-hdrvz9sa.js +1 -0
  32. package/lib/acde/dist/chunk-jjq2mn94.js +1 -0
  33. package/lib/acde/dist/chunk-k8f4m94e.js +7 -0
  34. package/lib/acde/dist/chunk-mtgy1bm0.js +1 -0
  35. package/lib/acde/dist/chunk-mtw6p7kv.js +1 -0
  36. package/lib/acde/dist/chunk-nwkq7cpp.js +1 -0
  37. package/lib/acde/dist/chunk-nyr54266.js +1 -0
  38. package/lib/acde/dist/chunk-p0h5kspx.js +1 -0
  39. package/lib/acde/dist/chunk-pdj3h86e.js +1 -0
  40. package/lib/acde/dist/chunk-q9dbzac5.js +1 -0
  41. package/lib/acde/dist/chunk-qrhbrjzk.js +1 -0
  42. package/lib/acde/dist/chunk-s8p0y5ap.js +1 -0
  43. package/lib/acde/dist/chunk-t0xqxe00.js +1 -0
  44. package/lib/acde/dist/chunk-tgn5c2mw.js +1 -0
  45. package/lib/acde/dist/chunk-wmj6zwvn.js +1 -0
  46. package/lib/acde/dist/chunk-wnk81fkc.js +1 -0
  47. package/lib/acde/dist/chunk-x208z38w.js +1 -0
  48. package/lib/acde/dist/chunk-xq76vbg6.js +1 -0
  49. package/lib/acde/dist/chunk-xr9gh5x2.js +1 -0
  50. package/lib/acde/dist/chunk-yytnhz6e.js +1 -0
  51. package/lib/acde/dist/chunk-z0ts25s1.js +1 -0
  52. package/lib/acde/dist/chunk-zdyw1ckt.js +1 -0
  53. package/lib/acde/dist/cli.js +1 -0
  54. package/lib/acde/dist/driver/index.js +1 -0
  55. package/lib/acde/dist/e2e/index.js +1 -0
  56. package/lib/acde/dist/types/configs.d.ts +1 -0
  57. package/lib/acde/dist/types/driver/acde.d.ts +106 -0
  58. package/lib/acde/dist/types/driver/clock.d.ts +32 -0
  59. package/lib/acde/dist/types/driver/expect.d.ts +60 -0
  60. package/lib/acde/dist/types/driver/format.d.ts +16 -0
  61. package/lib/acde/dist/types/driver/index.d.ts +13 -0
  62. package/lib/acde/dist/types/driver/input.d.ts +75 -0
  63. package/lib/acde/dist/types/driver/locator.d.ts +151 -0
  64. package/lib/acde/dist/types/driver/logs.d.ts +26 -0
  65. package/lib/acde/dist/types/driver/png.d.ts +31 -0
  66. package/lib/acde/dist/types/driver/poll.d.ts +4 -0
  67. package/lib/acde/dist/types/driver/screenshot.d.ts +37 -0
  68. package/lib/acde/dist/types/driver/trace.d.ts +26 -0
  69. package/lib/acde/dist/types/driver/types.d.ts +213 -0
  70. package/lib/acde/dist/types/driver/video.d.ts +14 -0
  71. package/lib/acde/dist/types/driver/window.d.ts +77 -0
  72. package/lib/acde/dist/types/e2e/index.d.ts +78 -0
  73. package/lib/acde/dist/types/e2e/settings.d.ts +39 -0
  74. package/lib/acde/dist/types/ipc.d.ts +24 -0
  75. package/lib/acde/dist/types/paths.d.ts +5 -0
  76. package/lib/acde/dist/types/pm.d.ts +20 -0
  77. package/lib/acde/dist/types/runtime.d.ts +49 -0
  78. package/lib/acde/dist/types/sessions.d.ts +80 -0
  79. package/lib/acde/dist/types/sockets.d.ts +4 -0
  80. package/lib/acde/launcher.d.mts +25 -0
  81. package/lib/acde/launcher.mjs +1 -0
  82. package/lib/acde/package.json +31 -0
  83. package/lib/acde/skills/acde/SKILL.md +114 -0
  84. package/lib/acde/skills/acde/references/guide/agents.md +50 -0
  85. package/lib/acde/skills/acde/references/guide/assets.md +40 -0
  86. package/lib/acde/skills/acde/references/guide/backend.md +94 -0
  87. package/lib/acde/skills/acde/references/guide/capabilities.md +157 -0
  88. package/lib/acde/skills/acde/references/guide/config.md +73 -0
  89. package/lib/acde/skills/acde/references/guide/desktop.md +165 -0
  90. package/lib/acde/skills/acde/references/guide/dev.md +66 -0
  91. package/lib/acde/skills/acde/references/guide/doctor.md +144 -0
  92. package/lib/acde/skills/acde/references/guide/files.md +181 -0
  93. package/lib/acde/skills/acde/references/guide/frameworks.md +74 -0
  94. package/lib/acde/skills/acde/references/guide/install.md +34 -0
  95. package/lib/acde/skills/acde/references/guide/mcp.md +64 -0
  96. package/lib/acde/skills/acde/references/guide/open.md +107 -0
  97. package/lib/acde/skills/acde/references/guide/services.md +147 -0
  98. package/lib/acde/skills/acde/references/guide/testing.md +378 -0
  99. package/lib/acde/skills/acde/references/guide/tools.md +291 -0
  100. package/lib/acde/skills/acde/references/guide/window.md +167 -0
  101. package/lib/acde/skills/acde/references/reference/cli.md +221 -0
  102. package/lib/acde/skills/acde/references/reference/config.md +51 -0
  103. package/lib/acde/skills/acde/references/reference/env.md +44 -0
  104. package/lib/acde/skills/acde/references/reference/manifest.md +92 -0
  105. package/lib/acde/skills/acde/references/reference/modules.md +586 -0
  106. package/lib/acde/skills/acde/references/reference/platforms.md +23 -0
  107. package/lib/acde/skills/acde/references/reference/service.md +47 -0
  108. package/lib/acde/skills/acde/references/reference/testing.md +265 -0
  109. package/lib/acde/skills/acde/references/reference/web.md +94 -0
  110. package/lib/acde/skills/acde/references/start/first-app.md +87 -0
  111. package/lib/acde/skills/acde/references/start/install.md +232 -0
  112. package/lib/acde/skills/acde/references/start/project.md +77 -0
  113. package/lib/acde/templates/app/acde.config.jsonc +27 -0
  114. package/lib/acde/templates/app/gitignore +2 -0
  115. package/lib/acde/templates/app/index.html +22 -0
  116. package/lib/acde/templates/app/package.json +5 -0
  117. package/lib/acde/templates/app/src/i18n.js +26 -0
  118. package/lib/acde/templates/app/src/locales/en.js +4 -0
  119. package/lib/acde/templates/app/src/locales/zh.js +4 -0
  120. package/lib/acde/templates/app/src/main.js +5 -0
  121. package/lib/acde/templates/backend/server.ts +7 -0
  122. package/lib/acde/templates/backend/src/main.js +6 -0
  123. package/lib/acde/templates/desktop/acde.config.jsonc +17 -0
  124. package/lib/acde/templates/desktop/gitignore +2 -0
  125. package/lib/acde/templates/desktop/index.html +19 -0
  126. package/lib/acde/templates/desktop/package.json +5 -0
  127. package/lib/acde/templates/desktop/src/desktop.js +16 -0
  128. package/lib/acde/templates/desktop/src/i18n.js +26 -0
  129. package/lib/acde/templates/desktop/src/locales/en.js +4 -0
  130. package/lib/acde/templates/desktop/src/locales/zh.js +4 -0
  131. package/lib/acde/templates/framework/acde.config.jsonc +26 -0
  132. package/lib/acde-api/LICENSE +5 -0
  133. package/lib/acde-api/config.schema.json +563 -0
  134. package/lib/acde-api/package.json +51 -0
  135. package/lib/acde-api/src/app.d.ts +36 -0
  136. package/lib/acde-api/src/frame.d.ts +15 -0
  137. package/lib/acde-api/src/frame.js +1 -0
  138. package/lib/acde-api/src/index.d.ts +11 -0
  139. package/lib/acde-api/src/index.js +1 -0
  140. package/lib/acde-api/src/modules/app-modules.d.ts +81 -0
  141. package/lib/acde-api/src/modules/modules.d.ts +113 -0
  142. package/lib/acde-api/src/modules/shell-modules.d.ts +32 -0
  143. package/lib/acde-api/src/runtime/level.d.ts +1 -0
  144. package/lib/acde-api/src/runtime/level.js +1 -0
  145. package/lib/acde-api/src/runtime/load.d.ts +8 -0
  146. package/lib/acde-api/src/runtime/load.js +1 -0
  147. package/lib/acde-api/src/runtime/places.d.ts +3 -0
  148. package/lib/acde-api/src/runtime/places.js +1 -0
  149. package/lib/acde-api/src/runtime/platforms.d.ts +5 -0
  150. package/lib/acde-api/src/runtime/platforms.js +1 -0
  151. package/lib/acde-api/src/shell.d.ts +14 -0
  152. package/lib/acde-api/src/types/capabilities.d.ts +34 -0
  153. package/lib/acde-api/src/types/config.d.ts +55 -0
  154. package/lib/acde-api/src/types/events.d.ts +151 -0
  155. package/lib/acde-api/src/types/manifest.d.ts +83 -0
  156. package/lib/acde-api/src/types/office.d.ts +118 -0
  157. package/lib/acde-api/src/types/page.d.ts +1090 -0
  158. package/lib/acde-api/src/types/permissions.d.ts +50 -0
  159. package/lib/acde-api/src/types/service.d.ts +35 -0
  160. package/lib/acde-api/src/validate.d.ts +64 -0
  161. package/lib/acde-api/src/validate.js +1 -0
  162. package/lib/acde-api/src/vite.d.ts +3 -0
  163. package/lib/acde-api/src/vite.js +9 -0
  164. package/package.json +11 -4
  165. package/README.md +0 -3
@@ -0,0 +1,232 @@
1
+ # Install
2
+
3
+ The installer sets up acde (the CLI, the project templates, and the SDK) together with the runtime it pairs with, acdert, which runs your apps. No npm, no root. See [The runtime](#the-runtime).
4
+
5
+ ## With a coding agent
6
+
7
+ Give your agent this prompt:
8
+
9
+ ```text
10
+ Read https://pkgs.dopame.ai/acde/install.md and follow it to set up acde on this machine.
11
+ ```
12
+
13
+ The page it reads tells it to check for Bun or Node.js, run the installer below, install the acde skill for itself, and report what is ready. See [Coding agents](../guide/agents.md).
14
+
15
+ ## Requirements
16
+
17
+ acde runs on a JavaScript runtime you already have. Either one works:
18
+
19
+ - [Bun](https://bun.sh) 1.4 or later
20
+ - [Node.js](https://nodejs.org) 22.3 or later
21
+
22
+ If you have both, acde uses Bun. The install script doesn't install either of them for you.
23
+
24
+ `acde test` (end-to-end tests) runs on Bun only. With only Node.js, every other command works.
25
+
26
+ ## Supported platforms
27
+
28
+ | System | CPU |
29
+ | --- | --- |
30
+ | macOS | Apple silicon (arm64), Intel (x86_64) |
31
+ | Linux | x86_64 |
32
+ | Windows | x64 |
33
+
34
+ acde itself is JavaScript; these are the platforms the runtime is built for (`aarch64-apple-darwin`, `x86_64-apple-darwin`, `x86_64-unknown-linux-gnu`, `x86_64-pc-windows-msvc`), and the installer stops with this list on any other. The Windows installer is x64 only. What the runtime can do differs somewhat between them; see [Platform support](../reference/platforms.md).
35
+
36
+ ## macOS / Linux
37
+
38
+ ```sh
39
+ curl -fsSL https://pkgs.dopame.ai/acde/install.sh | sh
40
+ ```
41
+
42
+ This installs into `~/.acde` (change it with `ACDE_INSTALL`) and adds `~/.acde/bin` to PATH in the startup files of every shell on the machine, once each, and lists them: `~/.profile` (sh, dash, ksh and login shells), `~/.bashrc` and an existing `~/.bash_profile` or `~/.bash_login` (bash), `~/.zshrc` and `~/.zprofile` (zsh), `~/.config/fish/conf.d/acde.fish` (fish), `~/.cshrc` and an existing `~/.tcshrc` (csh, tcsh), and nushell's `env.nu`. In the sh-family files the line adds `~/.acde/bin` only when PATH doesn't have it yet, so a shell that reads several of them (a login zsh reads `.zprofile` and `.zshrc`) has it once; an unguarded line from an earlier install is replaced in place. Before each download it prints the file's name and size; in a terminal it shows a progress bar; after each one, and also when its output is captured (a coding agent, CI), it prints the file's size and that its SHA-256 matches. A download that stalls (under 1 KB/s for 30 seconds) is retried twice, then the installer stops and installs nothing.
43
+
44
+ To leave your startup files alone:
45
+
46
+ ```sh
47
+ curl -fsSL https://pkgs.dopame.ai/acde/install.sh | sh -s -- --no-modify-path
48
+ ```
49
+
50
+ To install a specific version: `sh -s -- --version 0.0.9`. The oldest version on the download site is 0.0.9.
51
+
52
+ ## Windows
53
+
54
+ In PowerShell:
55
+
56
+ ```powershell
57
+ irm https://pkgs.dopame.ai/acde/install.ps1 | iex
58
+ ```
59
+
60
+ This installs into `%USERPROFILE%\.acde` and adds it to your user `Path`. Like the macOS / Linux installer, it shows each download's progress (size, speed, time left) in a terminal, prints the size and SHA-256 check of each file, and gives up on a download that receives nothing for 30 seconds after three tries. If you turned progress off (`$ProgressPreference = 'SilentlyContinue'`), it stays off.
61
+
62
+ After 0.0.9, in the classic Windows console (powershell.exe or cmd.exe started on their own), the boxes and frames that `acde new` and other prompts draw use ASCII characters (`+`, `-`, `|`); Windows Terminal and the VS Code terminal show line-drawing ones. Both work the same; Windows Terminal is recommended.
63
+
64
+ `irm | iex` cannot pass parameters. Set environment variables before it, or run the script as a script block to pass its parameters `-Version` and `-NoModifyPath`:
65
+
66
+ ```powershell
67
+ $env:ACDE_VERSION = '0.0.9'; $env:ACDE_NO_MODIFY_PATH = '1'
68
+ irm https://pkgs.dopame.ai/acde/install.ps1 | iex
69
+
70
+ & ([scriptblock]::Create((irm https://pkgs.dopame.ai/acde/install.ps1))) -Version 0.0.9 -NoModifyPath
71
+ ```
72
+
73
+ ## Installer options
74
+
75
+ Both installers take the same options, each in its own form:
76
+
77
+ | Option | `install.sh` | `install.ps1` |
78
+ | --- | --- | --- |
79
+ | Install a specific version (and its runtime) | `--version X.Y.Z` | `-Version X.Y.Z` or `ACDE_VERSION` |
80
+ | Leave startup files / the user `Path` alone | `--no-modify-path` | `-NoModifyPath` or `ACDE_NO_MODIFY_PATH` set to any value |
81
+ | Install somewhere else than `~/.acde` | `ACDE_INSTALL` | `ACDE_INSTALL` |
82
+
83
+ In PowerShell, environment variables set this way stay set in that terminal; remove them afterwards (`Remove-Item Env:ACDE_VERSION`) if a later install should take the defaults.
84
+
85
+ ## Verify
86
+
87
+ > **Open a new terminal first.** The installer changes `PATH` only for terminals opened after it, so in the terminal you installed from, `acde` is `command not found`. To use that terminal anyway, run the last line the installer printed (`export PATH=…`, or `$env:Path = …` in PowerShell).
88
+
89
+ In the new terminal, run:
90
+
91
+ ```sh
92
+ acde doctor
93
+ ```
94
+
95
+ It checks what `acde dev` and `acde test` need: acde on PATH, Bun and Node.js, the runtime (found, runs, pairs with this acde, and its own check of its files and the GPU, on which it draws a test frame), and more. Each line begins `ok`, `warn`, `error` or `skip`, a line beginning `fix:` follows each problem, and the last line says whether everything is there. See [Check the setup](../guide/doctor.md).
96
+
97
+ `acde --version` prints just the versions: acde, the SDK and contract level it was built with, and the runtime it found with its version and contract level.
98
+
99
+ ## The runtime
100
+
101
+ `acde dev` and `acde test` run your app in the runtime, acdert. The installer puts the acdert release that this acde pairs with next to it: the binary as `bin/acdert` (`acdert.exe` on Windows) and its host files as `bin/app/`, both checked against the release's `SHA256SUMS`. The pairing is recorded with each acde release, so installing a specific version of acde (the installer's `--version X.Y.Z`, or `-Version X.Y.Z` on Windows) installs the runtime that version pairs with. If the runtime cannot be installed (no build for your platform, a failed download or checksum), the installer installs nothing and keeps what you had. Inside the Dopame virtual machine, `acdert` is already on PATH.
102
+
103
+ acde looks for the runtime in this order:
104
+
105
+ 1. `ACDERT`: the path of an acdert binary, or the name of one on PATH;
106
+ 2. the acdert the installer put next to acde;
107
+ 3. `acdert` on PATH.
108
+
109
+ There is no other place: acde does not look for a runtime built in a source checkout next to it, even when acde itself runs from source; set `ACDERT` to use one.
110
+
111
+ When none is there, `acde dev` stops and says so, and `acde doctor` says where it looked and what to do.
112
+
113
+ The runtime renders pages only on the GPU, so it needs a working GPU (Metal on macOS, DirectX 12 on Windows, Vulkan on Linux). On Linux that means the hardware Vulkan driver of the machine's GPU (Mesa: `vulkan-intel` or `vulkan-radeon` on Arch, `mesa-vulkan-drivers` on Debian, Ubuntu and Fedora; NVIDIA: the vendor's driver); a software renderer is not accepted. Without it `acde dev` fails at startup with a log line that begins `web layer unavailable:` and says `no usable Vulkan driver was found: install the GPU's Vulkan driver …`: install the driver and check that `vulkaninfo --summary` lists the GPU. `acde doctor` shows the same line as an error of its `gpu` check before you start anything.
114
+
115
+ ### Install the runtime by hand
116
+
117
+ Use this only when the installer cannot set up the runtime, for example without access to `https://pkgs.dopame.ai/` from the machine. The result is an `acdebin-dbg` binary with its `app/` directory next to it; set `ACDERT` to the path of that binary (`~/.acdebin-dbg/acdebin-dbg` in the commands below). The runtime is released together with acde, in `https://pkgs.dopame.ai/acde/<version>/`, and `https://pkgs.dopame.ai/acde/latest` names the latest version. A release has:
118
+
119
+ | File | What it is |
120
+ | --- | --- |
121
+ | `acdebin-dbg-aarch64-apple-darwin.tar.xz` | The runtime for macOS on Apple silicon |
122
+ | `acdebin-dbg-x86_64-apple-darwin.tar.xz` | The runtime for macOS on Intel |
123
+ | `acdebin-dbg-x86_64-unknown-linux-gnu.tar.xz` | The runtime for Linux x86_64 |
124
+ | `acdebin-dbg-x86_64-pc-windows-msvc.tar.gz` | The runtime for Windows x64 |
125
+ | `acde-host-<version>.tar.gz` | The runtime's own scripts (an `app/` directory) and its license, the same on every platform |
126
+ | `acde-<version>.tar.gz` | acde itself (what the installer puts in `~/.acde`) |
127
+ | `acde-api-<version>.tar.gz` | The SDK, `@dopame/acde-api`, that projects install as a dev dependency (see [Project layout](project.md#sdk)); not needed to run the runtime |
128
+ | `SHA256SUMS` | Checksums of the files above |
129
+
130
+ Each runtime archive holds only the binary, `acdebin-dbg` (`acdebin-dbg.exe` on Windows).
131
+
132
+ Download the archive for your platform, the host archive, and `SHA256SUMS`, and check them. Extract both into the same directory: the runtime looks for `app/` next to itself and does not start without it. On Linux, extracting a `.tar.xz` needs `xz` (the `xz` or `xz-utils` package).
133
+
134
+ On macOS or Linux, paste the lines below, with `target` set for your platform (the parentheses keep your terminal in its current directory): `aarch64-apple-darwin` on Apple silicon, `x86_64-apple-darwin` on an Intel Mac, `x86_64-unknown-linux-gnu` on Linux.
135
+
136
+ ```sh
137
+ (
138
+ target=aarch64-apple-darwin
139
+ base=https://pkgs.dopame.ai/acde
140
+ version=$(curl -fsSL "$base/latest" | tr -d ' \r\n')
141
+ mkdir -p ~/.acdebin-dbg && cd ~/.acdebin-dbg
142
+ curl -fsSLO "$base/$version/acdebin-dbg-$target.tar.xz" -O "$base/$version/acde-host-$version.tar.gz" -O "$base/$version/SHA256SUMS"
143
+ grep -E " (acdebin-dbg-$target\.tar\.xz|acde-host-$version\.tar\.gz)\$" SHA256SUMS | sha256sum -c - &&
144
+ rm -rf app && tar -xzf "acde-host-$version.tar.gz" && tar -xJf "acdebin-dbg-$target.tar.xz"
145
+ )
146
+ ```
147
+
148
+ `sha256sum` prints `OK` for both files; if it doesn't, nothing is extracted. Then point acde at it: add this line to your shell's startup file, and run it in the current terminal too:
149
+
150
+ ```sh
151
+ export ACDERT="$HOME/.acdebin-dbg/acdebin-dbg"
152
+ ```
153
+
154
+ Adding `~/.acdebin-dbg` to `PATH` works as well.
155
+
156
+ On Windows, in PowerShell:
157
+
158
+ ```powershell
159
+ & {
160
+ $ProgressPreference = 'SilentlyContinue'
161
+ $base = 'https://pkgs.dopame.ai/acde'
162
+ $version = (Invoke-RestMethod "$base/latest").Trim()
163
+ $dir = "$env:USERPROFILE\.acdebin-dbg"
164
+ New-Item -ItemType Directory -Force $dir | Out-Null
165
+ $files = 'acdebin-dbg-x86_64-pc-windows-msvc.tar.gz', "acde-host-$version.tar.gz"
166
+ foreach ($f in $files + 'SHA256SUMS') { Invoke-WebRequest "$base/$version/$f" -OutFile "$dir\$f" }
167
+ $sums = Get-Content "$dir\SHA256SUMS"
168
+ foreach ($f in $files) {
169
+ $want = (($sums | Where-Object { $_ -like "* $f" }) -split ' ')[0]
170
+ if ((Get-FileHash "$dir\$f").Hash -ne $want) { throw "checksum mismatch: $f" }
171
+ }
172
+ Remove-Item -Recurse -Force "$dir\app" -ErrorAction SilentlyContinue
173
+ tar -xzf "$dir\acde-host-$version.tar.gz" -C $dir
174
+ tar -xzf "$dir\acdebin-dbg-x86_64-pc-windows-msvc.tar.gz" -C $dir
175
+ [Environment]::SetEnvironmentVariable('ACDERT', "$dir\acdebin-dbg.exe", 'User')
176
+ $env:ACDERT = "$dir\acdebin-dbg.exe"
177
+ }
178
+ ```
179
+
180
+ This sets `ACDERT` for your user and for the current terminal.
181
+
182
+ To upgrade the runtime, run the same commands again. Check that it works with a new project:
183
+
184
+ ```sh
185
+ acde new hello --template html --yes
186
+ cd hello
187
+ acde dev
188
+ ```
189
+
190
+ ### Install the Dopame desktop
191
+
192
+ On its own, `acde dev` runs only your app. To run it inside Dopame's desktop (`acde dev --desktop dopame`, `acde test --desktop dopame`), install the `dopame` desktop package too. It is published apart from acde and the runtime, on `pkgs.dopame.ai`: `https://pkgs.dopame.ai/acde-dopame/latest.json` gives the latest build: its `base` is the directory with `dopame.tar.gz` and `SHA256SUMS`. The archive holds one package directory, `dopame/`; extract it into the package directory `$XDG_DATA_HOME/acde/packages` (by default `~/.local/share/acde/packages`):
193
+
194
+ ```sh
195
+ (
196
+ base=$(curl -fsSL https://pkgs.dopame.ai/acde-dopame/latest.json | sed -n 's/.*"base": *"\([^"]*\)".*/\1/p')
197
+ packages="${XDG_DATA_HOME:-$HOME/.local/share}/acde/packages"
198
+ mkdir -p "$packages" && cd "$(mktemp -d)"
199
+ curl -fsSLO "${base}dopame.tar.gz" -O "${base}SHA256SUMS"
200
+ sha256sum -c SHA256SUMS &&
201
+ rm -rf "$packages/dopame" && tar -xzf dopame.tar.gz -C "$packages"
202
+ )
203
+ ```
204
+
205
+ On Windows the package directory is `%USERPROFILE%\.local\share\acde\packages`; extract the same archive there with `tar -xzf dopame.tar.gz -C <that directory>`.
206
+
207
+ Then, in your project:
208
+
209
+ ```sh
210
+ acde dev --desktop dopame
211
+ ```
212
+
213
+ Your app is in the desktop's app list; open it from there. The desktop's assistant needs a program that is not part of this download, so the output has a warning about it (`no assistant`); everything else works. For where the runtime looks for packages, see [Local install](../guide/install.md#package-lookup).
214
+
215
+ ## Upgrade and uninstall
216
+
217
+ To upgrade, run the install command again; it upgrades the runtime too. Each version is installed in `~/.acde/versions/<version>`, with its runtime in its `bin`, and `~/.acde/current` points to the one in use. After 0.0.9, the installer keeps the version it installs and the one it replaces, and removes older ones (about 100 MB each); a version a running program still uses (an `acde dev` started from it) stays until the next install.
218
+
219
+ `acde uninstall` removes installed apps and desktops, not acde itself (see [Local install](../guide/install.md#uninstall)). To uninstall acde, run `acde skills remove` if you installed the skill, delete `~/.acde`, and remove the `# acde` lines the installer added to your shells' startup files (it listed them); on Windows remove `%USERPROFILE%\.acde\current\bin` from your user `Path` and the user variable `ACDE_INSTALL`. If you installed the runtime by hand or the desktop as above, also delete `~/.acdert` and remove the `ACDERT` line.
220
+
221
+ acde and the runtime keep data outside the install directory. Delete these too to remove everything; otherwise a later install finds the old apps, desktops and their data again. The same paths are used on macOS; on Windows, without `XDG_*` variables, they are under `%USERPROFILE%` with the same names (`%USERPROFILE%\.local\share\acde` and so on):
222
+
223
+ | Directory | What is in it |
224
+ | --- | --- |
225
+ | `$XDG_DATA_HOME/acde` (`~/.local/share/acde`) | Installed apps and desktops (`packages/`), the apps' backend data (`apps/<id>/`), storage (`storage/app-<id>/`, `storage/desktop-<id>/`) and private files (`files/<id>/`), the skill install record (`skills.json`) |
226
+ | `$XDG_STATE_HOME/acde` (`~/.local/state/acde`) | Window positions, folder grants (`grants/<id>.json`), the last desktop, and other session state |
227
+ | `$XDG_CONFIG_HOME/acde` (`~/.config/acde`) | Approval decisions (`permissions.json`) |
228
+ | `$XDG_CONFIG_HOME/acde-mimeapps.list` and `$XDG_CONFIG_HOME/acde-extensions.list` (`~/.config/…`) | The default app chosen for a file type or extension |
229
+ | `$XDG_CACHE_HOME/acde` (`~/.cache/acde`) | Caches (only when `XDG_RUNTIME_DIR` is not set) |
230
+ | `acde/devtools` under `~/Library/Caches` (macOS), `%LOCALAPPDATA%` (Windows) or `$XDG_CACHE_HOME` (`~/.cache`, Linux) | The browser profile that `acde devtools` and F12 open DevTools in (after 0.0.9) |
231
+
232
+ On Windows, reinstalling the same version while `acde dev` runs moves the files in use aside (`versions/<version>.old-…`); the installer says so, and removes them the next time it runs.
@@ -0,0 +1,77 @@
1
+ # Project layout
2
+
3
+ A project created with `acde new my-app --backend`:
4
+
5
+ ```text
6
+ my-app/
7
+ ├── acde.config.jsonc app config: id, name, icon, entry, capabilities
8
+ ├── package.json
9
+ ├── index.html entry page
10
+ ├── src/main.js
11
+ ├── src/i18n.js picks the language and fills in interface text
12
+ ├── src/locales/ one message table per language: en.js, zh.js
13
+ ├── server.ts backend (optional)
14
+ ├── public/ static files copied as is (optional)
15
+ └── .acde/ build output, kept out of git
16
+ ```
17
+
18
+ ## Interface languages
19
+
20
+ The `html` and `desktop` templates keep interface text out of the markup, in one table per language under `src/locales/` (`en.js`, `zh.js`, each `export default { key: 'text' }`). `src/i18n.js` uses only the platform, no library:
21
+
22
+ - `locale` is chosen from `navigator.language`: the exact tag if there is a table for it (`zh-TW.js`), else its base language (`zh`, via `Intl.Locale`), else `en`. A key a table lacks falls back to its English text.
23
+ - `t(key, values)` returns the text with `{name}` placeholders filled in.
24
+ - `translate()` sets `<html lang>` to `locale` and fills every element with a `data-i18n="key"` attribute; `index.html` ships with `lang="en"` until then.
25
+
26
+ To add a language, add `src/locales/<tag>.js` with the same keys as `en.js` and import it in `i18n.js`. Format dates and numbers with `Intl` and `locale` (`new Intl.DateTimeFormat(locale)`). Framework templates keep the UI their own scaffolder writes.
27
+
28
+ ## Config and manifest
29
+
30
+ - **`acde.config.jsonc`** is the config you write. It's only read at build time. `"type"` is `"app"` (a windowed app) or `"desktop"` (a desktop).
31
+ - The **manifest** is the `acde` field of `package.json` in the build output, `.acde/`. That directory is a **package**: what the runtime runs. The manifest is the only thing the runtime reads.
32
+
33
+ `acde build` turns the former into the latter. Most of the time you only need to care about the config; for the manifest format, see [Manifest](../reference/manifest.md).
34
+
35
+ A directory without `acde.config.jsonc` can still be built:
36
+
37
+ - If the `acde` field in `package.json` has `apps`, it's treated as a **handwritten package** and used as is (only checked).
38
+ - Otherwise it's treated as a default app: the entry is `index.html`, the id is derived from `name` in `package.json`, and the display name comes from `displayName` or `productName`.
39
+
40
+ ## Build output
41
+
42
+ After building the app `my-app`:
43
+
44
+ ```text
45
+ .acde/
46
+ ├── package.json manifest
47
+ ├── web/ web pages, served at /app/my-app/ in the runtime
48
+ └── backend/
49
+ ├── server.js bundled backend
50
+ ├── package.json {"type": "module"}
51
+ └── acde-listen.js preload that turns the backend's listen into a unix socket
52
+ ```
53
+
54
+ A desktop project produces `desktop/` (served at `/desktop/<id>/`), `services/<name>.js`, and `apps/<id>/{web,backend}` for the apps it bundles.
55
+
56
+ ## JavaScript runtime and package manager
57
+
58
+ Whether a project runs on Bun or Node.js is decided by its package manager: `bun` → Bun; `npm` / `pnpm` / `yarn` → Node.js. For an existing project, acde looks at the lockfile, then at the `packageManager` field in `package.json`; with neither, the project runs on the runtime acde itself runs on. `acde new` writes `packageManager` for you.
59
+
60
+ On Node.js, acde bundles with the project's own Vite (which is why the built-in templates add `vite` as a dev dependency under npm / pnpm / yarn); on Bun it uses `Bun.build`. The bundling rules are the same on both.
61
+
62
+ ## SDK
63
+
64
+ The project's dev dependencies include `@dopame/acde-api`, the SDK version this acde was built with, as a tarball from `https://pkgs.dopame.ai/acdert/<version>/` (so the project installs on any machine and in CI; the SDK is not on npm). `acde new` installs it. After upgrading acde, `acde check` and `acde dev` say when the project's SDK is older; `acde sdk update` brings it to the version this acde pairs with. It provides:
65
+
66
+ - The JSON Schema for `acde.config.jsonc` (editor completion)
67
+ - TypeScript types for all `acde:` modules and the manifest
68
+ - `load()`: load an `acde:` module optionally
69
+ - The Vite plugin `@dopame/acde-api/vite`
70
+
71
+ To reference the types in a JS file:
72
+
73
+ ```js
74
+ /// <reference types="@dopame/acde-api/app" />
75
+ ```
76
+
77
+ In a TypeScript project, add `"@dopame/acde-api/app"` to `compilerOptions.types` in `tsconfig.json`. A desktop's pages use `@dopame/acde-api/shell` instead, which adds the modules only a desktop gets; `@dopame/acde-api` declares all of them.
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "./node_modules/@dopame/acde-api/config.schema.json",
3
+ // A window app: a plain web page (index.html), with an optional backend in server.ts. System features come from
4
+ // acde:* modules (import { fs } from 'acde:fs'), granted by capabilities. For editor types write
5
+ // /// <reference types="@dopame/acde-api/app" /> (the app modules; shell modules are only for desktops and their own apps).
6
+ "type": "app",
7
+ "id": "{{id}}",
8
+ "label": "{{label}}",
9
+ // icon: an icon name (app, timer, chart … see @dopame/acde-api) or an .svg / .png in the project (like "icon.svg"),
10
+ // copied into the package at build time.
11
+ "icon": "app",
12
+ "entry": "index.html",
13
+ // capabilities: the system features the app uses. "fs": true gives the app's private folder and the folders the user
14
+ // picks for it; name public places in fs.roots, and declaring one is what gives the app access to it:
15
+ // "fs": { "roots": ["documents"] }
16
+ // (desktop, documents, downloads, music, pictures, videos).
17
+ "capabilities": {},
18
+ // optional: capabilities the app can run without; they are not imported statically but taken with
19
+ // load('<name>') from @dopame/acde-api.
20
+ "optional": [],
21
+ // services: desktop services the app uses (import 'acde:<name>'); not the name of a system module.
22
+ "services": [],
23
+ // requests: the private requests the app accepts (another app calls open('{{id}}', { kind: '<name>' }));
24
+ // schemes: the URL schemes whose links it opens (lower case, without the colon).
25
+ "requests": [],
26
+ "schemes": []
27
+ }
@@ -0,0 +1,2 @@
1
+ node_modules/
2
+ .acde/
@@ -0,0 +1,22 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="color-scheme" content="light dark" />
6
+ <title>{{label}}</title>
7
+ <style>
8
+ :root { color-scheme: light dark }
9
+ body { margin: 0; padding: 32px; font: 15px/1.5 system-ui, sans-serif; color: #1f1d26; background: #f6f5fa }
10
+ h1 { margin: 0 0 8px; font-size: 22px }
11
+ @media (prefers-color-scheme: dark) {
12
+ body { color: #e8e6f0; background: #1f1d26 }
13
+ }
14
+ </style>
15
+ </head>
16
+ <body>
17
+ <h1>{{label}}</h1>
18
+ <p data-i18n="intro"></p>
19
+ <p id="status"></p>
20
+ <script type="module" src="./src/main.js"></script>
21
+ </body>
22
+ </html>
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "{{id}}",
3
+ "private": true,
4
+ "type": "module"
5
+ }
@@ -0,0 +1,26 @@
1
+ import en from './locales/en.js'
2
+ import zh from './locales/zh.js'
3
+
4
+ const catalogs = { en, zh }
5
+
6
+ function pick(tag) {
7
+ if (tag in catalogs) return tag
8
+ try {
9
+ const { language } = new Intl.Locale(tag)
10
+ if (language in catalogs) return language
11
+ } catch {}
12
+ return 'en'
13
+ }
14
+
15
+ export const locale = pick(navigator.language)
16
+ const messages = { ...en, ...catalogs[locale] }
17
+
18
+ export function t(key, values = {}) {
19
+ const text = messages[key] ?? key
20
+ return text.replace(/\{(\w+)\}/g, (all, name) => (name in values ? String(values[name]) : all))
21
+ }
22
+
23
+ export function translate(root = document) {
24
+ document.documentElement.lang = locale
25
+ for (const element of root.querySelectorAll('[data-i18n]')) element.textContent = t(element.dataset.i18n)
26
+ }
@@ -0,0 +1,4 @@
1
+ export default {
2
+ intro: 'Edit index.html and src/main.js; acde dev reloads the page.',
3
+ status: 'Language {language} · {time}',
4
+ }
@@ -0,0 +1,4 @@
1
+ export default {
2
+ intro: '编辑 index.html 和 src/main.js,acde dev 会自动刷新页面。',
3
+ status: '语言 {language} · {time}',
4
+ }
@@ -0,0 +1,5 @@
1
+ import { locale, t, translate } from './i18n.js'
2
+
3
+ translate()
4
+ const time = new Intl.DateTimeFormat(locale, { dateStyle: 'medium', timeStyle: 'short' }).format(new Date())
5
+ document.querySelector('#status').textContent = t('status', { language: navigator.language, time })
@@ -0,0 +1,7 @@
1
+ export default {
2
+ fetch(request: Request): Response {
3
+ const url = new URL(request.url)
4
+ if (url.pathname === '/api/hello') return Response.json({ hello: '{{label}}', at: new Date().toISOString() })
5
+ return new Response('not found', { status: 404 })
6
+ },
7
+ }
@@ -0,0 +1,6 @@
1
+ import { locale, t, translate } from './i18n.js'
2
+
3
+ translate()
4
+ const answer = await (await fetch('/api/hello')).json()
5
+ const time = new Intl.DateTimeFormat(locale, { dateStyle: 'medium', timeStyle: 'medium' }).format(new Date(answer.at))
6
+ document.querySelector('#status').textContent = t('status', { language: navigator.language, time })
@@ -0,0 +1,17 @@
1
+ {
2
+ "$schema": "./node_modules/@dopame/acde-api/config.schema.json",
3
+ // A desktop: one full-screen web page behind all windows. System features come from acde:* modules, both the app and
4
+ // the shell modules. For editor types write /// <reference types="@dopame/acde-api/shell" />.
5
+ "type": "desktop",
6
+ "id": "{{id}}",
7
+ "label": "{{label}}",
8
+ "entry": "index.html",
9
+ // services: desktop services that run in acde: name → module file, like "clock": "services/clock.ts". A service
10
+ // name is not the name of a system module. A service works with its context (ctx.log, ctx.spawn, ctx.state,
11
+ // ctx.inspect) and cannot import acde:* modules; ctx.import('acde:<name>') gives it the shell modules its entry
12
+ // lists: "clock": { "module": "services/clock.ts", "modules": ["windows"] }.
13
+ "services": {},
14
+ // apps: the window apps this desktop brings along (system apps). Each declares capabilities, optional, services,
15
+ // requests and schemes like a "type": "app" project, and may also declare shell modules (like "windows": true).
16
+ "apps": []
17
+ }
@@ -0,0 +1,2 @@
1
+ node_modules/
2
+ .acde/
@@ -0,0 +1,19 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="color-scheme" content="dark" />
6
+ <title>{{label}}</title>
7
+ <style>
8
+ html, body { height: 100%; margin: 0 }
9
+ body { display: flex; flex-direction: column; justify-content: flex-end; font: 14px/1.4 system-ui, sans-serif; color: #f4f2fa; background: linear-gradient(160deg, #2b2440, #12101a) }
10
+ nav { display: flex; gap: 8px; margin: 0 auto 16px; padding: 8px; border-radius: 16px; background: #ffffff1f }
11
+ button { padding: 8px 14px; border: 0; border-radius: 10px; color: inherit; background: #ffffff14; font: inherit; cursor: pointer }
12
+ button:hover { background: #ffffff33 }
13
+ </style>
14
+ </head>
15
+ <body>
16
+ <nav id="dock"></nav>
17
+ <script type="module" src="./src/desktop.js"></script>
18
+ </body>
19
+ </html>
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "{{id}}",
3
+ "private": true,
4
+ "type": "module"
5
+ }
@@ -0,0 +1,16 @@
1
+ /// <reference types="@dopame/acde-api/shell" />
2
+ import { apps } from 'acde:apps'
3
+ import { t, translate } from './i18n.js'
4
+
5
+ translate()
6
+ const dock = /** @type {HTMLElement} */ (document.querySelector('#dock'))
7
+ dock.setAttribute('aria-label', t('dock'))
8
+ const list = await apps.list()
9
+ if (list.length === 0) dock.textContent = t('empty')
10
+ for (const app of list) {
11
+ const button = document.createElement('button')
12
+ button.type = 'button'
13
+ button.textContent = app.label
14
+ button.addEventListener('click', () => void apps.open(app.id))
15
+ dock.append(button)
16
+ }
@@ -0,0 +1,26 @@
1
+ import en from './locales/en.js'
2
+ import zh from './locales/zh.js'
3
+
4
+ const catalogs = { en, zh }
5
+
6
+ function pick(tag) {
7
+ if (tag in catalogs) return tag
8
+ try {
9
+ const { language } = new Intl.Locale(tag)
10
+ if (language in catalogs) return language
11
+ } catch {}
12
+ return 'en'
13
+ }
14
+
15
+ export const locale = pick(navigator.language)
16
+ const messages = { ...en, ...catalogs[locale] }
17
+
18
+ export function t(key, values = {}) {
19
+ const text = messages[key] ?? key
20
+ return text.replace(/\{(\w+)\}/g, (all, name) => (name in values ? String(values[name]) : all))
21
+ }
22
+
23
+ export function translate(root = document) {
24
+ document.documentElement.lang = locale
25
+ for (const element of root.querySelectorAll('[data-i18n]')) element.textContent = t(element.dataset.i18n)
26
+ }
@@ -0,0 +1,4 @@
1
+ export default {
2
+ dock: 'Apps',
3
+ empty: 'No apps installed yet',
4
+ }
@@ -0,0 +1,4 @@
1
+ export default {
2
+ dock: '应用',
3
+ empty: '还没有安装应用',
4
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "$schema": "./node_modules/@dopame/acde-api/config.schema.json",
3
+ // A window app: a {{framework}} project; acde build uses its own build. System features come from
4
+ // acde:* modules (import { fs } from 'acde:fs'), granted by capabilities. For editor types write
5
+ // /// <reference types="@dopame/acde-api/app" /> (the app modules; shell modules are only for desktops and their own apps).
6
+ "type": "app",
7
+ "id": "{{id}}",
8
+ "label": "{{label}}",
9
+ // icon: an icon name (app, timer, chart … see @dopame/acde-api) or an .svg / .png in the project (like "icon.svg"),
10
+ // copied into the package at build time.
11
+ "icon": "app",
12
+ // capabilities: the system features the app uses. "fs": true gives the app's private folder and the folders the user
13
+ // picks for it; name public places in fs.roots, and declaring one is what gives the app access to it:
14
+ // "fs": { "roots": ["documents"] }
15
+ // (desktop, documents, downloads, music, pictures, videos).
16
+ "capabilities": {},
17
+ // optional: capabilities the app can run without; they are not imported statically but taken with
18
+ // load('<name>') from @dopame/acde-api.
19
+ "optional": [],
20
+ // services: desktop services the app uses (import 'acde:<name>'); not the name of a system module.
21
+ "services": [],
22
+ // requests: the private requests the app accepts (another app calls open('{{id}}', { kind: '<name>' }));
23
+ // schemes: the URL schemes whose links it opens (lower case, without the colon).
24
+ "requests": [],
25
+ "schemes": []
26
+ }
@@ -0,0 +1,5 @@
1
+ Copyright (c) 2026 Dopame. All rights reserved.
2
+
3
+ This software is proprietary and confidential. No part of it may be
4
+ copied, modified, distributed or used without prior written permission
5
+ from Dopame.