@adelie/server 0.4.2 → 0.5.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/README.md +2 -2
- package/dist/install.ps1 +2 -2
- package/dist/install.sh +2 -2
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ The Adelie Web backend — the Web implementation of the SDK's Human boundary. H
|
|
|
11
11
|
- **Usage**: `token_usage` events are persisted row by row; costs are computed at query time from current per-model pricing.
|
|
12
12
|
- **Terminals**: `src/terminal/` runs pty sessions server-side (node-pty) and feeds every byte into a headless xterm, so the daemon — not the browser — owns the screen. Control is JSON over HTTP (`/api/terminals`: list / create / capture / keys / kill; create accepts `cwd`, `name`, `cols`/`rows` and a `shell` override); the byte stream is a binary WebSocket at `/api/terminals/:id/stream` (`[opcode, slot, payload]`, output coalesced into ~5ms windows with an immediate leading flush). On attach the server renders the current grid back into an ANSI restore stream, so a reload or a second device rebuilds the exact screen — scrollback, colours, cursor and DEC input modes — while the shell keeps running the whole time. The web app surfaces this twice: an in-app dock (Ctrl+` , Codex-style) and the standalone `/terminal` page (`?id=` attaches an existing terminal — the dock's detach handoff — `?cwd=`/`?name=` parameterize a new one). Sessions run in-process (no forked terminal worker); this module is the only thing touching node-pty, which is where that split would go if load ever demands it.
|
|
13
13
|
|
|
14
|
-
The full route tables and the SSE protocol are documented in the [Server API reference](https://
|
|
14
|
+
The full route tables and the SSE protocol are documented in the [Server API reference](https://lmliheng.github.io/Adelie/docs/server-api). DTO types are exported for type-only import via `@adelie/server/api`.
|
|
15
15
|
|
|
16
16
|
## Environment
|
|
17
17
|
|
|
@@ -51,4 +51,4 @@ pnpm --filter @adelie/server start # node dist/index.js
|
|
|
51
51
|
- **Terminals are a shell as the OS account running the server**, i.e. the most privileged thing the API hands out — they are not Project-scoped. A terminal is only visible to the account that created it (someone else's id answers 404, not 403), and the stream WebSocket checks `Origin` on top of the session cookie because a WebSocket handshake is not subject to CORS. Do not expose a deployment with terminals enabled to accounts you would not give SSH.
|
|
52
52
|
- Behind a reverse proxy, disable response buffering for SSE paths (the server already sends `X-Accel-Buffering: no`), and set `ADELIE_TRUST_PROXY=1` with `x-forwarded-proto` forwarded so session cookies are marked `Secure` — the header alone is not trusted, so without the opt-in an HTTPS deployment issues its cookies without the flag.
|
|
53
53
|
|
|
54
|
-
Part of [Adelie](https://github.com/
|
|
54
|
+
Part of [Adelie](https://github.com/lmliheng/Adelie) · Apache-2.0
|
package/dist/install.ps1
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
# reinstall/upgrade (which only replace bin/lib/web/node/git). Upgrading = re-running this installer.
|
|
30
30
|
# The launcher exports the root it lives under, so an install made before the rename keeps its data.
|
|
31
31
|
#
|
|
32
|
-
# Docs: https://
|
|
32
|
+
# Docs: https://lmliheng.github.io/Adelie/docs/quickstart-cli
|
|
33
33
|
param(
|
|
34
34
|
[string]$Version = "",
|
|
35
35
|
[string]$InstallDir = "",
|
|
@@ -47,7 +47,7 @@ $Asset = "penguin-win32-x64.zip"
|
|
|
47
47
|
$PayloadName = "payload.zip"
|
|
48
48
|
# The release workflow replaces this token with the immutable tag before publishing both the
|
|
49
49
|
# standalone installer and the copy sealed inside the Windows bundle.
|
|
50
|
-
$EmbeddedReleaseVersion = "
|
|
50
|
+
$EmbeddedReleaseVersion = "v0.5.1"
|
|
51
51
|
|
|
52
52
|
function Fail([string]$Message) {
|
|
53
53
|
# `throw` rather than `exit`: a caller that runs this installer as an in-memory script block
|
package/dist/install.sh
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
#
|
|
27
27
|
# The data dir (~/.adelie/data by default) sits under the install home but is never touched by reinstall/upgrade (which only replace bin/lib/web/node). The launcher exports the root it lives under, so an install made before the rename (at ~/.penguin) keeps reading its own data there.
|
|
28
28
|
#
|
|
29
|
-
# Docs: https://
|
|
29
|
+
# Docs: https://lmliheng.github.io/Adelie/docs/quickstart-cli
|
|
30
30
|
set -eu
|
|
31
31
|
|
|
32
32
|
REPO="https://github.com/lmliheng/Adelie"
|
|
@@ -44,7 +44,7 @@ DOWNLOAD_FALLBACK_BASE_URL="${PENGUIN_DOWNLOAD_FALLBACK_BASE_URL:-}"
|
|
|
44
44
|
PAYLOAD_NAME="payload.tar.gz"
|
|
45
45
|
# The release workflow replaces this token with the immutable tag before publishing both the
|
|
46
46
|
# standalone installer and the copies sealed inside the Linux, macOS and universal bundles.
|
|
47
|
-
EMBEDDED_RELEASE_VERSION="
|
|
47
|
+
EMBEDDED_RELEASE_VERSION="v0.5.1"
|
|
48
48
|
|
|
49
49
|
fail() {
|
|
50
50
|
echo "error: $1" >&2
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adelie/server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Adelie web server: multi-user authentication and authorization, Session execution with SSE streaming, and usage accounting, built on @adelie/core.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/
|
|
9
|
+
"url": "git+https://github.com/lmliheng/Adelie.git",
|
|
10
10
|
"directory": "packages/server"
|
|
11
11
|
},
|
|
12
12
|
"exports": {
|
|
@@ -77,8 +77,8 @@
|
|
|
77
77
|
"unified": "^11.0.5",
|
|
78
78
|
"ws": "^8.18.3",
|
|
79
79
|
"yaml": "^2.5.0",
|
|
80
|
-
"@adelie/amsp": "0.
|
|
81
|
-
"@adelie/core": "0.
|
|
80
|
+
"@adelie/amsp": "0.5.1",
|
|
81
|
+
"@adelie/core": "0.5.1"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
84
|
"@types/mdast": "^4.0.4",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"tsup": "^8.3.0",
|
|
89
89
|
"tsx": "^4.20.0",
|
|
90
90
|
"vitest": "^3.2.6",
|
|
91
|
-
"@adelie/hmr": "0.
|
|
91
|
+
"@adelie/hmr": "0.5.1"
|
|
92
92
|
},
|
|
93
93
|
"files": [
|
|
94
94
|
"dist",
|