A local-first multi-agent app development platform, built on PenguinHarness
feat(fork): 控制面环境变量改成 Adelie 自己的写法(2.2b:25 个名字 / 77 个文件)
lmlihengeace12ddc969
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.ymlindex 4fda04f1..e6f73baa 100644--- a/.github/workflows/docker.yml+++ b/.github/workflows/docker.yml@@ -97,7 +97,7 @@ jobs:- name: Start the containerrun: |docker run -d --name penguin -p 127.0.0.1:7364:7364 \- -e PENGUIN_SEED_ADMIN_PASSWORD=ci-password-123 \+ -e ADELIE_SEED_ADMIN_PASSWORD=ci-password-123 \-v penguin-data:/data \penguin-harness:prdiff --git a/FORK-PROGRESS.md b/FORK-PROGRESS.mdindex 0e278ac7..8b3f042a 100644--- a/FORK-PROGRESS.md+++ b/FORK-PROGRESS.md@@ -63,18 +63,31 @@「`PENGUIN_` / `ADELIE_` 两前缀」(不扩的话 `ADELIE_HOME` 会漏进 Agent 跑的命令,而它指的正是服务端自己在用的那个根 —— 启动脚本会把它导出来)。CLI 文案 / 注释、`packages/core` 里的端口表、示例`examples/self-improving-agent/*` 里写死的 `~/.penguin/data` 一并改。-- [ ] 2.2b **剩下的 `PENGUIN_*` 变量名**(约 38 个名字、全仓 ~4400 处):`PENGUIN_PROFILE` /- `PENGUIN_WEB_DB` / `PENGUIN_LANG` / `PENGUIN_API_TOKEN` / `PENGUIN_INSTALL_DIR` … 本轮**没动** ——- 纯改名、零功能收益,而 200 来个测试用例都在设 `PENGUIN_HOME`(它们顺带钉住了兼容别名,改一遍等于- 把这份覆盖也换掉),一次做完更省事:建议与 4.1 的 scope 改名并作一批。这一批里还剩三处「本机也带- `~/.penguin`」的,各有原因:**桌面壳的 dev 根** `~/.penguin/dev-data`- (`packages/desktop/src/app-identity.ts`,被 `desktop` 的脚本与 `cli/test/dev-entry-isolation.test.ts`- 一起钉住 —— desktop 本机不可构建,按纪律没碰);**远程机器布局**- (`server/src/machines/layout.ts`:`~/.penguin` / `~/.penguin-dev`,探针 + 安装 + 数据根 + 启动命令- 自洽,改名要连探针一起,属迁移动作);**dev 数据根** `~/.penguin/dev-data*`(`ports.ts` 表里那几行)。- 文档面同样的道理:`packages/docs/`(2.5 定的「留作内部参考、不发布不改品牌」)、- `plugins/*/skills/*/SKILL.md` 里「全局根是 `~/.penguin/data`」那几句、`CONTRIBUTING.md`、- ui-gallery 的演示路径、web 的 `path-capsules.ts` 注释 —— 全是纯文案,等一次「全量换字」一起做。+- [x] 2.2b **控制面变量改名**(2026-10-05):把 Adelie 自己产、自己消的那批 `PENGUIN_*` 环境变量改成+ `ADELIE_*` —— 25 个名字 / 77 个文件:`AGENT_ID`、`SESSION_ID`、`PROJECT_ID`、`ORG_ID`、`API_URL`、+ `API_TOKEN`、`API_PROXY`、`LANG`、`SHELL`、`TERMINAL`、`SUPERVISED`、`SERVE_CHILD`、`TRUST_PROXY`、+ `PREVIEW_ORIGIN`、`UPDATE_CHECK`、`PASSWORD`、`SEED_ADMIN_PASSWORD`、`ADMIN_PASSWORD`,加上测试脚手架+ (`E2E`、`TEST_HELPER`、`TEST_CHROMIUM`、`RUNNER_MARK`、`VAULT_ADDED`、`VAULT_TEST_KEY`、+ `SOME_FUTURE_SETTING`)。源码注释、zh/en 文案、`plugins/*/skills/*/SKILL.md` 里的契约说明、+ `docker/compose.yaml` 的示例环境一并跟上。+ **旧名不再生效**(2.2a 的 `PENGUIN_HOME` 除外):这批变量的两端都是本仓库自己的代码,没有外部所有者,+ 因此不设兼容别名 —— 升级后 shell rc / systemd 里请改用新名。`core` 的子进程剥离规则**仍保留两个前缀**:+ 边界面那批(见 2.2c)今天仍写作 `PENGUIN_*`,且既有部署的单元文件还在设它们。+- [ ] 2.2c **边界面变量名**(本轮没动,每一个的另一端都在本仓库之外):+ - **桌面壳 / 启动器 / 既有部署**:`PROFILE`、`WEB_DIST`、`WEB_DB`、`CLI_ENTRY`、`PORT_FILE`、+ `DESKTOP_TOKEN`、`BUNDLED_SHELL`、`DESKTOP_SMOKE`、`DESKTOP_SMOKE_SHOT`、`NO_LOGIN_SHELL_ENV`、+ `UPDATE_FEED_URL`、`UPDATE_SOURCE`、`UPDATE_SPEED_PROBE`、`BB_SMOKE_BUNDLE` —— `packages/desktop`+ 本机按纪律没碰(3.5 才决定桌面壳取哪个),而且 `adelie-app.service` 这类既有单元现在仍设+ `PENGUIN_HOME` / `PENGUIN_WEB_DIST` / `PENGUIN_CLI_ENTRY`。要做就得与桌面壳同一批改,或在+ 服务端 / CLI 的读侧同时认两个名字。+ - **安装器与发布协议**:`VERSION` / `INSTALL_DIR` / `ARCHIVE` / `DOWNLOAD_BASE_URL` /+ `DOWNLOAD_FALLBACK_BASE_URL` / `DOWNLOAD_SOURCE` / `DOWNLOAD_SPEED_PROBE` / `COMMAND`,+ 以及 build 戳 `__PENGUIN_RELEASE_VERSION__` / `__PENGUIN_BUILD_GIT__` —— `install.sh` 是运行中的 CLI+ 从 Releases 现下的脚本,旧 CLI × 新脚本要各说各话,属 4.x 的发布链路。+ - **上游服务**:`PENGUIN_GO*`(`token.penguin.ooo` 的 provider id 与环境键),不是我们的服务,不动。+ - 顺带记录:`PENGUIN_HINT` / `PENGUIN_KEEP_ATTRS` 是注入页脚本里的局部变量、`PENGUIN_FAMILY` 是 HMR+ family 常量,都不是环境变量,未动;`packages/docs/`、`.agents/`(= `.claude/` 软链)、`changelog/`+ 三个文档面按 2.5 的口径不动 —— `.agents/` 是上游自己的开发技能文档,那里的 `PENGUIN_*` 对上游而言是对的。- [ ] 2.3 **端口与 profile 默认值**:服务器默认端口、CLI 默认端口(现在是 7369)与旧 Adelie 的4000 / 7370 对齐,避免两个产品抢端口。- [x] 2.4 **README 与包元数据**(2026-10-05):根 `README.md` 与 `README.zh.md` 重写成 Adelie 自己的@@ -657,3 +670,4 @@ v0.2.2」——它只加台账里 v0.2.2 那一节与两行表格,**跟本轮| 2026-10-05 | 2.2a | 数据根与安装目录改成 Adelie 自己的:默认 `~/.adelie/data` 与 `~/.adelie`、变量 `ADELIE_HOME`(旧名 `PENGUIN_HOME` 仍读,弹夹在 `resolveRoot()`)、两个启动脚本导出 `ADELIE_HOME=<程序目录>/data`(保住旧装的数据所在)、子进程剥离规则扩到两个前缀;CLI 文案/注释/示例跟上 | 六个包 typecheck 全过;`pnpm lint` 0 警告;`pnpm format:check` 干净;core 1350 / server 2563 / cli 505 / ui 1000 / web 2887 全绿;`test-installer.sh` 通过;启动脚本与「隔离 HOME 离线装进 `~/.adelie`」真跑过;新旧两种数据根各起服务 + 浏览器看过(唯一 4xx 是登录前 401) | 见本行提交 || 2026-10-05 | 第五轮 | 初始 Project 名补成 `default`(core 常量 + `ensureDisplayName` + 启动扫描 + 三条测试);zh 字典 68 处 `Project` → 「项目」;`PrefRow` 手机宽度改为可换行、导入 Trace 不再压住;草稿行删除按钮在触摸屏上常显 | `pnpm typecheck` 八包过、`pnpm lint` 0 警告、`pnpm format:check` 干净;`pnpm -r test` **8840 通过 / 14 跳过 / 0 失败**(docs 62 · core 1346 · ui 1000 · server 2559 · cli 505 · web 2887 · desktop 279 · ui-gallery 131 · 四个沙箱插件 71);浏览器实测四项(含**老数据根升级**、390px 触摸屏) | `e960d0b1` || 2026-10-05 | 第五轮 | 升级 **v0.2.2**:tag + GitHub Release(无资产)+ 重打三件安装包放 3003 `/downloads/v0.2.2/`(`BUILD_COMMIT=2d6abe83`),打包脚本改「边做边清」把峰值从 1.5G 压到 ~0.3G | 见「v0.2.2:默认项目名 default、中文文案、手机上的导入 Trace 与草稿」一节 | tag `v0.2.2` = `2d6abe83` |+| 2026-10-05 | 2.2b | 控制面环境变量改名:25 个名字 / 77 个文件 / 388 处 `PENGUIN_*` → `ADELIE_*`(会话、API、语言、终端、审批与测试脚手架那批;注释、zh/en 文案、插件技能契约、`docker/compose.yaml` 一起改);`core` 的剥离规则注释补写「为什么仍留两个前缀」 | 六包 typecheck 过;`pnpm lint` 0 警告;`pnpm format:check` 干净(两处超宽行交给 prettier);core **1350 / 5 跳过**、ui **1000**、web **2887 / 2 跳过**、cli **505**、server **2563 / 2 跳过**(首跑 1 条红是 `dist/install.ps1` 副本过期,重建 server 后转绿)—— 0 失败;运行时实测:`ADELIE_LANG=zh` 出中文帮助、旧名 `PENGUIN_LANG=zh` 不再生效、`ADELIE_SEED_ADMIN_PASSWORD` 起服务不再打印 claim 链接;浏览器(7431,数据根 `/root/adelie-fork-data`)标题 `Sign in · Adelie`、console 唯一 error 是登录前 `/api/me` 401 | 见本行提交 |diff --git a/docker/compose.yaml b/docker/compose.yamlindex 91171701..b3a3902f 100644--- a/docker/compose.yaml+++ b/docker/compose.yaml@@ -20,12 +20,12 @@ services:# # Pins the built-in admin's password INSTEAD of printing a first-login link. It# # applies only on the very first boot, while no user exists, and must be at least# # 8 characters. Adding it to an already-claimed data root does nothing.- # PENGUIN_SEED_ADMIN_PASSWORD: "choose-something-long"+ # ADELIE_SEED_ADMIN_PASSWORD: "choose-something-long"# # Behind a reverse proxy that terminates TLS and sets or strips x-forwarded-proto# # itself, so session cookies are marked Secure.- # PENGUIN_TRUST_PROXY: "1"+ # ADELIE_TRUST_PROXY: "1"# # Disables the server's only outbound non-model request, the new-release check.- # PENGUIN_UPDATE_CHECK: "off"+ # ADELIE_UPDATE_CHECK: "off"volumes:penguin-data:diff --git a/packages/cli/src/client.ts b/packages/cli/src/client.tsindex 8023df36..6b1eb6ab 100644--- a/packages/cli/src/client.ts+++ b/packages/cli/src/client.ts@@ -5,10 +5,10 @@** Connection resolution order (first hit wins):* 1. `--server <url>` — an explicit target. A non-loopback URL requires- * PENGUIN_API_TOKEN: the on-disk token file belongs to the LOCAL data root and must+ * ADELIE_API_TOKEN: the on-disk token file belongs to the LOCAL data root and must* never be sent to a remote host.- * 2. `PENGUIN_API_URL` — the same, from the environment. Server-driven sessions inject- * it (with PENGUIN_API_TOKEN) into tool subprocesses, which is how an agent's own+ * 2. `ADELIE_API_URL` — the same, from the environment. Server-driven sessions inject+ * it (with ADELIE_API_TOKEN) into tool subprocesses, which is how an agent's own* `penguin` calls find the server that runs them.* 3. A live `server.lock` at the data root (ADELIE_HOME or ~/.adelie/data): attach to* the running local server on `http://localhost:<port>`.@@ -16,7 +16,7 @@* lock, attach. The loser of a two-CLI spawn race exits with code 3 ("already* running"), which the lock poll absorbs — it finds the winner's lock either way.*- * Token resolution: PENGUIN_API_TOKEN, else `<root>/api-token` (written by the server+ * Token resolution: ADELIE_API_TOKEN, else `<root>/api-token` (written by the server* each boot). A 401 with a file-sourced token re-reads the file once and retries — the* server may have restarted (and rotated the token) since the first read.*/@@ -156,11 +156,11 @@ export async function resolveConnection(t: Messages,): Promise<Connection> {const root = resolveRoot();- const explicit = opts.server?.trim() || process.env.PENGUIN_API_URL?.trim() || "";+ const explicit = opts.server?.trim() || process.env.ADELIE_API_URL?.trim() || "";if (explicit !== "") {const url = normalizeServerUrl(explicit, t);const loopback = isLoopbackUrl(url);- if (!loopback && !process.env.PENGUIN_API_TOKEN?.trim()) {+ if (!loopback && !process.env.ADELIE_API_TOKEN?.trim()) {throw new Error(t.client.remoteNeedsToken(url.origin));}return { baseUrl: url.origin, root, autoStarted: false, loopback };@@ -212,7 +212,7 @@ export class ServerClient {readonly conn: Connection,private readonly t: Messages,) {- const envToken = process.env.PENGUIN_API_TOKEN?.trim();+ const envToken = process.env.ADELIE_API_TOKEN?.trim();if (envToken) {this.token = envToken;this.tokenSource = "env";@@ -432,12 +432,12 @@ export async function resolveSessionRef(// Shared option defaults// ----------------------------------------------------------------------------/** `--project-id` default chain: flag > PENGUIN_PROJECT_ID > default_project. */+/** `--project-id` default chain: flag > ADELIE_PROJECT_ID > default_project. */export function resolveProjectId(flag: string | undefined): string {- return flag?.trim() || process.env.PENGUIN_PROJECT_ID?.trim() || "default_project";+ return flag?.trim() || process.env.ADELIE_PROJECT_ID?.trim() || "default_project";}-/** `--agent-id` default chain: flag > PENGUIN_AGENT_ID > default_agent. */+/** `--agent-id` default chain: flag > ADELIE_AGENT_ID > default_agent. */export function resolveAgentId(flag: string | undefined): string {- return flag?.trim() || process.env.PENGUIN_AGENT_ID?.trim() || "default_agent";+ return flag?.trim() || process.env.ADELIE_AGENT_ID?.trim() || "default_agent";}diff --git a/packages/cli/src/commands/auth.ts b/packages/cli/src/commands/auth.tsindex c948beac..70767013 100644--- a/packages/cli/src/commands/auth.ts+++ b/packages/cli/src/commands/auth.ts@@ -116,7 +116,7 @@ export function registerAuthCommand(program: Command, t: Messages): void {if (server === null) return fail(t.auth.noServer(root));// A script cannot answer a prompt, so a non-interactive password suppresses both// questions; the account is only asked for when the password will be too.- const given = opts.password ?? process.env.PENGUIN_PASSWORD;+ const given = opts.password ?? process.env.ADELIE_PASSWORD;const userId =opts.userId ??(given === undefined && process.stdin.isTTY === truediff --git a/packages/cli/src/commands/browser.ts b/packages/cli/src/commands/browser.tsindex ca030d88..560b0c2e 100644--- a/packages/cli/src/commands/browser.ts+++ b/packages/cli/src/commands/browser.ts@@ -17,7 +17,7 @@** Every command takes `--json` (the response DTO as one line) and `--server`; the commands that* act on a page take `--tab <id|active>`, `active` by default. Inside a session,- * PENGUIN_SESSION_ID travels as `sessionId`, so the app can show which conversation is driving+ * ADELIE_SESSION_ID travels as `sessionId`, so the app can show which conversation is driving* the browser. What is printed is browser-output.ts; an error is one line on stderr,* `error: <code>: <message>`, with exit code 1.*@@ -175,9 +175,9 @@ function normalizeUrl(raw: string): string {return raw.trim();}-/** The calling session (PENGUIN_SESSION_ID), for the bodies that accept one. */+/** The calling session (ADELIE_SESSION_ID), for the bodies that accept one. */function session(): { sessionId?: string } {- const id = process.env.PENGUIN_SESSION_ID?.trim();+ const id = process.env.ADELIE_SESSION_ID?.trim();return id ? { sessionId: id } : {};}diff --git a/packages/cli/src/commands/config.ts b/packages/cli/src/commands/config.tsindex e1fbeef5..5c01b442 100644--- a/packages/cli/src/commands/config.ts+++ b/packages/cli/src/commands/config.ts@@ -29,7 +29,7 @@* found in models; `model remove` reports the same condition itself, since removal is* idempotent in core, and clears the default / vision pointers that named the removed entry.* `--root` specifies the data root directory (priority: option >- * ADELIE_HOME > ~/.adelie/data). The UI language is controlled by the PENGUIN_LANG+ * ADELIE_HOME > ~/.adelie/data). The UI language is controlled by the ADELIE_LANG* environment variable; `config lang` writes it into the shell startup file and restarts* the shell to take effect.* Docs: /docs/cli § "penguin config".diff --git a/packages/cli/src/commands/input.ts b/packages/cli/src/commands/input.tsindex d572b289..a348b8ac 100644--- a/packages/cli/src/commands/input.ts+++ b/packages/cli/src/commands/input.ts@@ -23,7 +23,7 @@* before the snapshot is taken; still running at expiry prints the current latest text* plus the still-running note, exit 0 (`--timeout 0` snapshots immediately).*- * The fragment search scopes to the project (PENGUIN_PROJECT_ID / default_project);+ * The fragment search scopes to the project (ADELIE_PROJECT_ID / default_project);* a full session id needs no scope.* Docs: /docs/cli § "penguin input".*/diff --git a/packages/cli/src/commands/org.ts b/packages/cli/src/commands/org.tsindex 329d88d1..3d42ff67 100644--- a/packages/cli/src/commands/org.ts+++ b/packages/cli/src/commands/org.ts@@ -27,14 +27,14 @@* penguin org handbook list | show [path] | write <path> (-m <text> | --file <f>) | rm <path>* penguin org finance [--period <yyyy-mm>]*- * Every subcommand takes `--org-id` (default: PENGUIN_ORG_ID, the variable company mode+ * Every subcommand takes `--org-id` (default: ADELIE_ORG_ID, the variable company mode* adds to the control environment of desk and ticket sessions; there is no default* organization), `--project-id`, `--json` and `--server`. The same environment* identifies the caller: `--agent-id` on the calendar commands and the desk positional- * default to PENGUIN_AGENT_ID; `ticket start` sends it as the employee the ticket+ * default to ADELIE_AGENT_ID; `ticket start` sends it as the employee the ticket* session runs as (its own `--agent-id` enlists a colleague on the caller's own ticket,* and outside a session the server picks the ticket owner); the ticket writes and- * the channel writes carry PENGUIN_SESSION_ID in their body so the file records the+ * the channel writes carry ADELIE_SESSION_ID in their body so the file records the* employee rather than the token's user, and `ticket attach` attaches that session by* default. The reads that depend on who is asking — `channel ls`, `channel show`,* `channel tail` — and the member DELETE behind `leave` / `remove` carry the same@@ -137,14 +137,14 @@ function refuseDotSegments(value: string, t: Messages): boolean {/*** Resolves the organization's coordinates and connects. `--org-id` defaults to- * PENGUIN_ORG_ID and to nothing else; it is read before the connection so a missing one+ * ADELIE_ORG_ID and to nothing else; it is read before the connection so a missing one* never auto-starts a server. Null after the error.*/async function orgScope(opts: { orgId?: string; projectId?: string; server?: string },t: Messages,): Promise<OrgScope | null> {- const orgId = opts.orgId?.trim() || process.env.PENGUIN_ORG_ID?.trim() || "";+ const orgId = opts.orgId?.trim() || process.env.ADELIE_ORG_ID?.trim() || "";if (orgId === "") {fail(t, t.org.orgIdMissing());return null;@@ -168,9 +168,9 @@ function scoped(cmd: Command, t: Messages): Command {.option("--server <url>", t.common.server);}-/** The calling session (the control environment's PENGUIN_SESSION_ID), when the CLI runs inside one. */+/** The calling session (the control environment's ADELIE_SESSION_ID), when the CLI runs inside one. */function callerSessionId(): string | undefined {- return process.env.PENGUIN_SESSION_ID?.trim() || undefined;+ return process.env.ADELIE_SESSION_ID?.trim() || undefined;}/**@@ -182,7 +182,7 @@ function callerSessionId(): string | undefined {*/function actorFields(): { sessionId?: string; agentId?: string } {const sessionId = callerSessionId();- const agentId = process.env.PENGUIN_AGENT_ID?.trim() || undefined;+ const agentId = process.env.ADELIE_AGENT_ID?.trim() || undefined;return {...(sessionId !== undefined ? { sessionId } : {}),...(agentId !== undefined ? { agentId } : {}),@@ -1198,7 +1198,7 @@ export function registerOrgCommand(program: Command, t: Messages): void {// employee may start a session only on a ticket it owns, and anyone else's is a 403.const agentId =(typeof opts.agentId === "string" ? opts.agentId.trim() : "") ||- process.env.PENGUIN_AGENT_ID?.trim() ||+ process.env.ADELIE_AGENT_ID?.trim() ||undefined;const res = await scope.client.request<OrgTicketStartResponse>("POST",diff --git a/packages/cli/src/commands/run.ts b/packages/cli/src/commands/run.tsindex 92a7bdd5..19baf41f 100644--- a/packages/cli/src/commands/run.ts+++ b/packages/cli/src/commands/run.ts@@ -11,7 +11,7 @@* ends, then prints the stats line. Exit 0 on completed; a goal run exits 0 only when* the goal outcome is `complete`.*- * - Defaults: project/agent from PENGUIN_PROJECT_ID / PENGUIN_AGENT_ID (else+ * - Defaults: project/agent from ADELIE_PROJECT_ID / ADELIE_AGENT_ID (else* default_project / default_agent); Workspace = the CLI's cwd (resolved locally —* server and CLI share the machine in the default flow); model = the Project default;* approval mode allow-all (the historical run default).diff --git a/packages/cli/src/commands/serve.ts b/packages/cli/src/commands/serve.tsindex 839ad16d..99477fd6 100644--- a/packages/cli/src/commands/serve.ts+++ b/packages/cli/src/commands/serve.ts@@ -15,12 +15,12 @@* this entry) so the server's admin self-update endpoint can invoke `penguin update`.** Supervision: when plain node can re-run this entry, the service runs as a CHILD process- * (`node <entry> server …`, marked PENGUIN_SERVE_CHILD=1) and this process stays behind+ * (`node <entry> server …`, marked ADELIE_SERVE_CHILD=1) and this process stays behind* as its supervisor — it forwards the terminal's signals, exits with the child's code, and* relaunches the child when it exits with core's SERVER_RESTART_EXIT_CODE. That exit is* what the Web App's "restart to update" asks for once `penguin update` has replaced the* install: the relaunch re-resolves the same entry path, which now holds the new release.- * The child is told a supervisor is there (PENGUIN_SUPERVISED=1); a dev run through tsx+ * The child is told a supervisor is there (ADELIE_SUPERVISED=1); a dev run through tsx* cannot be re-spawned by node and runs in-process as before, where the server reports* that a restart must be done by hand.* Docs: /docs/cli § "penguin server / penguin web".@@ -135,7 +135,7 @@ async function existingInstanceUrl(): Promise<string | null> {}/** Marks the service child a supervising `penguin server|web` spawned: it runs the server in-process. */-export const SERVE_CHILD_ENV = "PENGUIN_SERVE_CHILD";+export const SERVE_CHILD_ENV = "ADELIE_SERVE_CHILD";/** What the supervisor does when its child exits (pure; exported for unit tests). */export function supervisorDecision(@@ -160,7 +160,7 @@ function supervise(cliEntry: string, host: string, port: number, t: Messages): vconst spawnChild = (): void => {child = spawn(process.execPath, [cliEntry, "server", "--port", String(port), "--host", host], {stdio: "inherit",- env: { ...process.env, [SERVE_CHILD_ENV]: "1", PENGUIN_SUPERVISED: "1" },+ env: { ...process.env, [SERVE_CHILD_ENV]: "1", ADELIE_SUPERVISED: "1" },});child.on("exit", (code, signal) => {const decision = supervisorDecision({ code, signal }, stopping);diff --git a/packages/cli/src/i18n.ts b/packages/cli/src/i18n.tsindex f006eb23..5644eb9e 100644--- a/packages/cli/src/i18n.ts+++ b/packages/cli/src/i18n.ts@@ -3,7 +3,7 @@ import type { OrgChannelNoticeKind } from "@prismshadow/penguin-server/api";/*** CLI text internationalization (i18n).*- * Language comes from the `PENGUIN_LANG` env var (`en` / `zh`), defaulting to English (en) —+ * Language comes from the `ADELIE_LANG` env var (`en` / `zh`), defaulting to English (en) —* independent of Project config or CLI options. This module centralizes all user-visible text:* command/option help descriptions and runtime output, one implementation per language.*/@@ -20,7 +20,7 @@ export type WebProbeFailureKind =/** Resolve the language from the env var; `zh` matches exactly, everything else falls back to English (see comment #2). */export function resolveLanguage(): Language {- const v = (process.env.PENGUIN_LANG ?? "").trim().toLowerCase();+ const v = (process.env.ADELIE_LANG ?? "").trim().toLowerCase();return v === "zh" ? "zh" : "en";}@@ -42,7 +42,7 @@ export interface Messages {thinking: string;/** Machine-readable output (raw JSON instead of the rendered/tabular form). */json: string;- /** --server: explicit server URL (overrides PENGUIN_API_URL, the local lock and auto-start). */+ /** --server: explicit server URL (overrides ADELIE_API_URL, the local lock and auto-start). */server: string;/** --timeout: soft-yield wait budget on run/input/logs -f (30s / 5m / 2h / bare seconds). */timeout: string;@@ -297,7 +297,7 @@ export interface Messages {handbookWriteDesc: string;handbookRmDesc: string;financeDesc: string;- /** --org-id: the organization (defaults to PENGUIN_ORG_ID, the control environment of desk and ticket sessions). */+ /** --org-id: the organization (defaults to ADELIE_ORG_ID, the control environment of desk and ticket sessions). */orgId: string;/** create's --org-id: the id to create (never taken from the environment). */newOrgId: string;@@ -324,7 +324,7 @@ export interface Messages {/** create's --ceo-budget: the CEO's monthly USD, which is the whole company's. */ceoBudget: string;duties: string;- /** calendar's --agent-id: the employee the event belongs to (defaults to PENGUIN_AGENT_ID); a filter on `ls`. */+ /** calendar's --agent-id: the employee the event belongs to (defaults to ADELIE_AGENT_ID); a filter on `ls`. */calendarAgentId: string;calendarTitle: string;/** ticket ls filters. */@@ -377,7 +377,7 @@ export interface Messages {refSession: string;/** finance's --period: yyyy-mm (default: the current month). */period: string;- /** No --org-id and no PENGUIN_ORG_ID: there is no default organization. */+ /** No --org-id and no ADELIE_ORG_ID: there is no default organization. */orgIdMissing(): string;/** hire: --agent-id XOR --new-agent. */hireTargetConflict(): string;@@ -657,7 +657,7 @@ export interface Messages {/** Server-connection layer: resolution, auto-start, tokens, streams. */client: {invalidServerUrl(value: string): string;- /** --server names a non-loopback URL and no PENGUIN_API_TOKEN is set (the local token file must not travel). */+ /** --server names a non-loopback URL and no ADELIE_API_TOKEN is set (the local token file must not travel). */remoteNeedsToken(url: string): string;/** No server reachable and auto-start was disabled by the caller. */noServer(): string;@@ -681,7 +681,7 @@ export interface Messages {timeoutInvalid(value: string): string;/** Soft-yield detach: the wait budget expired, the task keeps running server-side. */stillRunning(shortId: string): string;- /** Caller-context lookup failed (PENGUIN_SESSION_ID names a session this server cannot answer for): plain defaults apply. */+ /** Caller-context lookup failed (ADELIE_SESSION_ID names a session this server cannot answer for): plain defaults apply. */callerDefaultsFailed(sessionId: string): string;/** Dim stderr note naming the session a bare `logs` / `input` resolved to (the agent's most recent). */latestSession(sessionId: string): string;@@ -1024,7 +1024,7 @@ const en: Messages = {"Thinking level for this session: low, medium, high, xhigh, or max (defaults to the Agent's configured level)",json: "Print raw JSON instead of the rendered output",server:- "Server URL to connect to (defaults to PENGUIN_API_URL, then the local running server, then auto-start)",+ "Server URL to connect to (defaults to ADELIE_API_URL, then the local running server, then auto-start)",timeout:"Wait at most this long (30s / 5m / 2h, or bare seconds), then detach and leave the task running (exit 0)",latestAgentId: "Agent whose most recent session is used when no session id is given",@@ -1071,8 +1071,7 @@ const en: Messages = {refProvider: "Provider group of the referenced entry (see `penguin config model list`)",listDesc: "List the Project's models (API keys hidden)",removeDesc: "Remove a model from the Project (clears the default / vision pointers naming it)",- langDesc:- "Set the interface language (en|zh); persists PENGUIN_LANG to your shell startup file",+ langDesc: "Set the interface language (en|zh); persists ADELIE_LANG to your shell startup file",langArg: "Language: en or zh",vaultDesc: "Manage an Agent's vault (environment variables injected into its shell commands)",vaultSetDesc: "Set a vault environment variable (added or overwritten)",@@ -1267,7 +1266,7 @@ const en: Messages = {handbookRmDesc: "Delete a handbook document (the index cannot be deleted)",financeDesc: "Spend per employee (along the reporting line) and per ticket, against budgets",orgId:- "Organization id (defaults to PENGUIN_ORG_ID, set inside desk and ticket sessions; no other default)",+ "Organization id (defaults to ADELIE_ORG_ID, set inside desk and ticket sessions; no other default)",newOrgId:"Id of the organization to create (letters, digits, underscores; also its directory name)",mission: "The organization's mission",@@ -1291,7 +1290,7 @@ const en: Messages = {"The CEO's monthly budget in USD, which is the whole company's (budgets accumulate along the reporting line)",duties: "Duties, in prose",calendarAgentId:- "Employee the event belongs to (defaults to PENGUIN_AGENT_ID); on ls, list only this employee's events",+ "Employee the event belongs to (defaults to ADELIE_AGENT_ID); on ls, list only this employee's events",calendarTitle: "Event title",statusFilter: "Only this column: proposed, in_progress, review, done or rejected",ownerFilter: "Only tickets owned by this principal (agent:<id> / user:<id>)",@@ -1317,7 +1316,7 @@ const en: Messages = {startAgentId:"Which employee the session runs as: a colleague you enlist on your own ticket (defaults to you inside a session, otherwise the ticket's owner)",attachSession:- "The session to attach, full id or unique fragment (defaults to PENGUIN_SESSION_ID)",+ "The session to attach, full id or unique fragment (defaults to ADELIE_SESSION_ID)",channelOpt: "Channel to read or write in (default: default_channel, the all-hands channel)",channelName: "Display name (defaults to the id)",channelPurpose: "What the channel is for",@@ -1333,7 +1332,7 @@ const en: Messages = {refSession: "Session the message refers to",period: "Month to report (yyyy-mm; defaults to the current month)",orgIdMissing: () =>- "No organization given: pass --org-id <id>, or set PENGUIN_ORG_ID (desk and ticket sessions carry it in their environment).",+ "No organization given: pass --org-id <id>, or set ADELIE_ORG_ID (desk and ticket sessions carry it in their environment).",hireTargetConflict: () =>"Pass exactly one of --agent-id (an existing Agent) and --new-agent (create one).",newAgentFieldsOnly: () => "--name, --description and --skills describe --new-agent only.",@@ -1351,7 +1350,7 @@ const en: Messages = {pathSegmentInvalid: (value) =>`Invalid name "${value}": "." and ".." are neither an id nor a handbook path.`,attachSessionMissing: () =>- "No session to attach: pass --session <id>, or run inside a session (PENGUIN_SESSION_ID).",+ "No session to attach: pass --session <id>, or run inside a session (ADELIE_SESSION_ID).",created: (orgId, ceoDeskSessionId) =>`Organization ${orgId} created${ceoDeskSessionId !== undefined ? ` (CEO desk session ${ceoDeskSessionId})` : ""}.`,hired: (agentId, title, reportsTo) =>@@ -1613,7 +1612,7 @@ const en: Messages = {client: {invalidServerUrl: (value) => `Invalid server URL "${value}": expected http(s)://host[:port].`,remoteNeedsToken: (url) =>- `${url} is not this machine: set PENGUIN_API_TOKEN to authenticate against a remote server (the local api-token file never leaves its own data root).`,+ `${url} is not this machine: set ADELIE_API_TOKEN to authenticate against a remote server (the local api-token file never leaves its own data root).`,noServer: () => "No running server found for this data root.",autoStartUnavailable: () =>"No running server found, and this CLI entry cannot auto-start one (development run). Start it yourself with `penguin server`.",@@ -1621,9 +1620,9 @@ const en: Messages = {`The auto-started server did not come up. Its output is in ${logPath}.`,autoStarted: (url, logPath) => `Started a local server at ${url} (log: ${logPath}).`,noToken: (url, tokenPath) =>- `${url} rejected the request (401) and no API token is available: set PENGUIN_API_TOKEN, or make sure the server's token file is readable at ${tokenPath}.`,+ `${url} rejected the request (401) and no API token is available: set ADELIE_API_TOKEN, or make sure the server's token file is readable at ${tokenPath}.`,authFailed: (url) =>- `${url} rejected the API token (401). If the server restarted, its token rotated — check PENGUIN_API_TOKEN, or let the CLI read the current api-token file.`,+ `${url} rejected the API token (401). If the server restarted, its token rotated — check ADELIE_API_TOKEN, or let the CLI read the current api-token file.`,httpError: (status, code, message) =>`Server error ${status} (${code})${message ? `: ${message}` : ""}`,sessionNotFound: (ref, projectId) =>@@ -1661,7 +1660,7 @@ const en: Messages = {logoutDesc: "Revoke the remembered session and forget it",server: "Server URL (default: the server running on this data root)",userId: "Account to sign in as (asked for when omitted; default admin)",- password: "Password (also read from PENGUIN_PASSWORD; prompted when neither is given)",+ password: "Password (also read from ADELIE_PASSWORD; prompted when neither is given)",print: "Also print the session token to stdout",accountPrompt: (fallback) => `Account [${fallback}]: `,prompt: (userId) => `Password for ${userId}: `,@@ -1907,8 +1906,8 @@ const en: Messages = {langInvalid: (value) => `Invalid language "${value}". Use en or zh.`,langWindowsUnsupported: (lang) =>`penguin config lang persists via POSIX shell startup files, which Windows does not have.\n` +- `Set the user environment variable instead: setx PENGUIN_LANG ${lang} (new terminals pick it up).`,- langSet: (lang, rcPath) => `Language set to ${lang}; wrote PENGUIN_LANG to ${rcPath}.`,+ `Set the user environment variable instead: setx ADELIE_LANG ${lang} (new terminals pick it up).`,+ langSet: (lang, rcPath) => `Language set to ${lang}; wrote ADELIE_LANG to ${rcPath}.`,langRestartConfirm: () => "Open a new shell now to apply? [y/N] ",langRestart: () => "Opening a new shell with the new language (type exit to return)…",langRestartHint: (rcPath) => `Open a new terminal, or run: source ${rcPath}`,@@ -1974,7 +1973,7 @@ const zh: Messages = {"审批模式:allow-all(全部放行,缺省)、deny-all(全部拒绝)、read-only(自动放行只读工具,其余仍逐个询问)、always-ask(逐个询问)",thinking: "本会话的思考等级:low、medium、high、xhigh 或 max(缺省用 Agent 配置的等级)",json: "输出原始 JSON,不做渲染",- server: "要连接的服务器地址(缺省依次取 PENGUIN_API_URL、本机运行中的服务器、自动拉起)",+ server: "要连接的服务器地址(缺省依次取 ADELIE_API_URL、本机运行中的服务器、自动拉起)",timeout:"最长等待时长(30s / 5m / 2h,或纯数字秒数);到时脱开、任务继续在服务端运行(退出码 0)",latestAgentId: "省略 session id 时,取哪个 Agent 的最近一次会话",@@ -2017,7 +2016,7 @@ const zh: Messages = {refProvider: "引用条目的 provider 分组(见 `penguin config model list`)",listDesc: "列出当前 Project 的模型(API key 隐藏)",removeDesc: "从当前 Project 删除一个模型(指向它的默认模型 / 视觉模型设置一并清空)",- langDesc: "设置界面语言(en|zh);将 PENGUIN_LANG 写入 shell 启动文件并持久化",+ langDesc: "设置界面语言(en|zh);将 ADELIE_LANG 写入 shell 启动文件并持久化",langArg: "语言:en 或 zh",vaultDesc: "管理 Agent vault(注入该 Agent shell 命令的环境变量)",vaultSetDesc: "写入一个 vault 环境变量(不存在则新增,存在则覆盖)",@@ -2193,7 +2192,7 @@ const zh: Messages = {handbookWriteDesc: "用 -m 或 --file 的内容创建或替换一份手册文档",handbookRmDesc: "删除一份手册文档(索引不可删)",financeDesc: "支出:按员工(沿汇报线累计)与按工单,对照预算",- orgId: "组织 id(缺省取 PENGUIN_ORG_ID,工位会话与工单会话内自带;此外没有缺省值)",+ orgId: "组织 id(缺省取 ADELIE_ORG_ID,工位会话与工单会话内自带;此外没有缺省值)",newOrgId: "要创建的组织 id(字母、数字、下划线;同时是目录名)",mission: "组织的使命",orgName: "显示名(缺省同 id)",@@ -2211,7 +2210,7 @@ const zh: Messages = {budget: "月预算(美元),含该员工及其全部下属",ceoBudget: "CEO 的月预算(美元);预算沿汇报线累计,CEO 的预算就是整家公司的",duties: "职责描述",- calendarAgentId: "日程项所属员工(缺省 PENGUIN_AGENT_ID);ls 上只列该员工的日程项",+ calendarAgentId: "日程项所属员工(缺省 ADELIE_AGENT_ID);ls 上只列该员工的日程项",calendarTitle: "日程项标题",statusFilter: "只看这一列:proposed、in_progress、review、done 或 rejected",ownerFilter: "只看该负责人的工单(agent:<id> / user:<id>)",@@ -2235,7 +2234,7 @@ const zh: Messages = {startWorkspace: "公共工作区内的另一个目录(缺省为该员工工位的 Workspace)",startAgentId:"会话以哪名员工的身份运行:可以拉同事来做自己名下的工单(会话内缺省为你自己,否则为工单负责人)",- attachSession: "要挂接的会话,完整 id 或唯一片段(缺省 PENGUIN_SESSION_ID)",+ attachSession: "要挂接的会话,完整 id 或唯一片段(缺省 ADELIE_SESSION_ID)",channelOpt: "要读取或写入的频道(缺省 default_channel,即全员频道)",channelName: "显示名(缺省同 id)",channelPurpose: "频道用途",@@ -2250,7 +2249,7 @@ const zh: Messages = {refSession: "消息关联的会话",period: "统计月份(yyyy-mm;缺省当月)",orgIdMissing: () =>- "未指定组织:请传 --org-id <id>,或设置 PENGUIN_ORG_ID(工位会话与工单会话的环境里自带)。",+ "未指定组织:请传 --org-id <id>,或设置 ADELIE_ORG_ID(工位会话与工单会话的环境里自带)。",hireTargetConflict: () =>"--agent-id(既有 Agent)与 --new-agent(新建)二选一,且必须给一个。",newAgentFieldsOnly: () => "--name、--description 与 --skills 只用于描述 --new-agent。",@@ -2266,7 +2265,7 @@ const zh: Messages = {countInvalid: (value) => `-n 值「${value}」无效:应为正整数。`,pathSegmentInvalid: (value) => `名称「${value}」无效:「.」与「..」既不是 id,也不是手册路径。`,attachSessionMissing: () =>- "没有可挂接的会话:请传 --session <id>,或在会话内运行(PENGUIN_SESSION_ID)。",+ "没有可挂接的会话:请传 --session <id>,或在会话内运行(ADELIE_SESSION_ID)。",created: (orgId, ceoDeskSessionId) =>`已创建组织 ${orgId}${ceoDeskSessionId !== undefined ? `(CEO 工位会话 ${ceoDeskSessionId})` : ""}。`,hired: (agentId, title, reportsTo) =>@@ -2520,16 +2519,16 @@ const zh: Messages = {client: {invalidServerUrl: (value) => `服务器地址「${value}」无效:应为 http(s)://host[:port]。`,remoteNeedsToken: (url) =>- `${url} 不是本机:连接远端服务器须设置 PENGUIN_API_TOKEN(本机的 api-token 文件不会发往其它主机)。`,+ `${url} 不是本机:连接远端服务器须设置 ADELIE_API_TOKEN(本机的 api-token 文件不会发往其它主机)。`,noServer: () => "该数据根目录没有正在运行的服务器。",autoStartUnavailable: () =>"没有正在运行的服务器,且当前 CLI 入口无法自动拉起(开发态运行)。请自行执行 `penguin server`。",autoStartFailed: (logPath) => `自动启动的服务器未能就绪,输出见 ${logPath}。`,autoStarted: (url, logPath) => `已在本机启动服务器 ${url}(日志:${logPath})。`,noToken: (url, tokenPath) =>- `${url} 拒绝了请求(401),且没有可用的 API token:请设置 PENGUIN_API_TOKEN,或确认服务器的 token 文件可读(${tokenPath})。`,+ `${url} 拒绝了请求(401),且没有可用的 API token:请设置 ADELIE_API_TOKEN,或确认服务器的 token 文件可读(${tokenPath})。`,authFailed: (url) =>- `${url} 拒绝了 API token(401)。服务器重启会轮换 token——检查 PENGUIN_API_TOKEN,或让 CLI 读取最新的 api-token 文件。`,+ `${url} 拒绝了 API token(401)。服务器重启会轮换 token——检查 ADELIE_API_TOKEN,或让 CLI 读取最新的 api-token 文件。`,httpError: (status, code, message) =>`服务器错误 ${status}(${code})${message ? `:${message}` : ""}`,sessionNotFound: (ref, projectId) =>@@ -2566,7 +2565,7 @@ const zh: Messages = {logoutDesc: "吊销并忘记已记住的会话",server: "服务地址(默认:该数据根上正在运行的服务)",userId: "登录的账号(不给时会询问;默认 admin)",- password: "密码(也可用 PENGUIN_PASSWORD;都没给时会提示输入)",+ password: "密码(也可用 ADELIE_PASSWORD;都没给时会提示输入)",print: "同时把会话令牌打印到 stdout",accountPrompt: (fallback) => `账号 [${fallback}]:`,prompt: (userId) => `${userId} 的密码:`,@@ -2796,8 +2795,8 @@ const zh: Messages = {langInvalid: (value) => `无效的语言 "${value}"。请使用 en 或 zh。`,langWindowsUnsupported: (lang) =>`penguin config lang 通过 POSIX shell 启动文件持久化语言,Windows 上没有对应机制。\n` +- `请改为设置用户环境变量:setx PENGUIN_LANG ${lang}(新终端生效)。`,- langSet: (lang, rcPath) => `语言已设为 ${lang};已将 PENGUIN_LANG 写入 ${rcPath}。`,+ `请改为设置用户环境变量:setx ADELIE_LANG ${lang}(新终端生效)。`,+ langSet: (lang, rcPath) => `语言已设为 ${lang};已将 ADELIE_LANG 写入 ${rcPath}。`,langRestartConfirm: () => "现在打开新 shell 使其生效?[y/N] ",langRestart: () => "正在打开使用新语言的新 shell(输入 exit 可返回)……",langRestartHint: (rcPath) => `请打开新终端,或执行:source ${rcPath}`,diff --git a/packages/cli/src/lang-config.ts b/packages/cli/src/lang-config.tsindex de6d7404..b2455de7 100644--- a/packages/cli/src/lang-config.ts+++ b/packages/cli/src/lang-config.ts@@ -1,10 +1,10 @@/**- * Language persistence: write `PENGUIN_LANG` into the user's shell startup file, then restart+ * Language persistence: write `ADELIE_LANG` into the user's shell startup file, then restart* the shell so it takes effect.** A child process can't modify its parent shell's environment variables directly, so* `penguin config lang` uses a "write the startup file + restart the shell" approach: write- * `export PENGUIN_LANG=<lang>` into the shell startup file inside a marked block (idempotent,+ * `export ADELIE_LANG=<lang>` into the shell startup file inside a marked block (idempotent,* updates in place), then open an interactive shell carrying the new language env var. New* terminals will read the variable from the startup file, so it persists.*/@@ -14,8 +14,8 @@ import { dirname, join } from "node:path";import { atomicWriteFile } from "@prismshadow/penguin-core";import type { Language } from "./i18n.js";-const BEGIN = "# >>> Adelie PENGUIN_LANG >>>";-const END = "# <<< Adelie PENGUIN_LANG <<<";+const BEGIN = "# >>> Adelie ADELIE_LANG >>>";+const END = "# <<< Adelie ADELIE_LANG <<<";export type ShellKind = "zsh" | "bash" | "fish" | "unknown";@@ -34,27 +34,27 @@ export function resolveShellRc(shell: string | undefined, home: string): ShellRcreturn {kind: "fish",rcPath: join(home, ".config", "fish", "config.fish"),- body: (lang) => `set -gx PENGUIN_LANG ${lang}`,+ body: (lang) => `set -gx ADELIE_LANG ${lang}`,};}if (base.includes("zsh")) {return {kind: "zsh",rcPath: join(home, ".zshrc"),- body: (lang) => `export PENGUIN_LANG=${lang}`,+ body: (lang) => `export ADELIE_LANG=${lang}`,};}if (base.includes("bash")) {return {kind: "bash",rcPath: join(home, ".bashrc"),- body: (lang) => `export PENGUIN_LANG=${lang}`,+ body: (lang) => `export ADELIE_LANG=${lang}`,};}return {kind: "unknown",rcPath: join(home, ".profile"),- body: (lang) => `export PENGUIN_LANG=${lang}`,+ body: (lang) => `export ADELIE_LANG=${lang}`,};}@@ -98,7 +98,7 @@ export function restartShell(lang: Language): void {const shell = process.env.SHELL || "/bin/zsh";const child = spawn(shell, ["-i"], {stdio: "inherit",- env: { ...process.env, PENGUIN_LANG: lang },+ env: { ...process.env, ADELIE_LANG: lang },});child.on("exit", (code) => process.exit(code ?? 0));child.on("error", () => process.exit(1));diff --git a/packages/cli/src/server-session.ts b/packages/cli/src/server-session.tsindex c7a9cf09..552fd8cc 100644--- a/packages/cli/src/server-session.ts+++ b/packages/cli/src/server-session.ts@@ -32,7 +32,7 @@ export function resolveWorkspace(flag: string | undefined, fallback = process.cw/*** The calling session's live values, when this CLI runs inside a harness agent- * (server-driven sessions inject PENGUIN_SESSION_ID into tool subprocesses): a session+ * (server-driven sessions inject ADELIE_SESSION_ID into tool subprocesses): a session* created here defaults each UNSPECIFIED field to the caller's — workspace, the model* pair, approval mode and thinking level — the same inheritance `run_subagent` applies* to spawned children, so the two surfaces read as one convention. Per field the@@ -43,7 +43,7 @@ export async function callerSessionContext(client: ServerClient,t: Messages,): Promise<SessionInfo | null> {- const sessionId = process.env.PENGUIN_SESSION_ID?.trim();+ const sessionId = process.env.ADELIE_SESSION_ID?.trim();if (!sessionId) return null;try {return await getSessionInfo(client, sessionId);diff --git a/packages/cli/test/browser-commands.test.ts b/packages/cli/test/browser-commands.test.tsindex 6e7d7b2d..911bb59f 100644--- a/packages/cli/test/browser-commands.test.ts+++ b/packages/cli/test/browser-commands.test.ts@@ -1,6 +1,6 @@/*** `penguin browser`, driven through `cli()` in-process against the fake server's built-in- * browser handler: each command's request (method, path, body — PENGUIN_SESSION_ID included+ * browser handler: each command's request (method, path, body — ADELIE_SESSION_ID included* where the API takes it), the three sources of an exec script (argument, --file, stdin),* --save, the output contract of scan / exec / click / import / history, and the one-line* errors with exit code 1, API errors and argument errors alike.@@ -187,7 +187,7 @@ describe("status and tabs", () => {describe("open, switch, close", () => {it("open navigates the active tab, a bare host as typed (the server picks its scheme)", async () => {- process.env.PENGUIN_SESSION_ID = SESSION;+ process.env.ADELIE_SESSION_ID = SESSION;routes["POST /tabs/active/navigate"] = () => ({ body: { tab: ORDERS } });expect(await cli(["browser", "open", " amazon.com/your-orders/orders "])).toBe(0);expect(lastBody()).toEqual({ url: "amazon.com/your-orders/orders", sessionId: SESSION });@@ -263,7 +263,7 @@ describe("scan", () => {describe("exec", () => {it("sends the script with its options and prints the labelled lines", async () => {- process.env.PENGUIN_SESSION_ID = SESSION;+ process.env.ADELIE_SESSION_ID = SESSION;routes["POST /tabs/active/exec"] = () => ({body: execResult({value: { added: true },@@ -469,7 +469,7 @@ describe("click, type, screenshot, cdp", () => {});it("type sends the text, the selector and submit", async () => {- process.env.PENGUIN_SESSION_ID = SESSION;+ process.env.ADELIE_SESSION_ID = SESSION;routes["POST /tabs/12/type"] = () => ({ body: execResult({ diff: { changed: 1 } }) });expect(await cli([@@ -717,7 +717,7 @@ describe("errors", () => {});it("no server running means the desktop app is not running; nothing is auto-started", async () => {- delete process.env.PENGUIN_API_URL;+ delete process.env.ADELIE_API_URL;expect(await cli(["browser", "tabs"])).toBe(1);expect(err()).toBe(`error: browser_unavailable: ${t.browser.unavailableHint(undefined)}\n`);expect(server.requests).toEqual([]);diff --git a/packages/cli/test/chat-thinking.test.ts b/packages/cli/test/chat-thinking.test.tsindex a8c5545a..12a9a71d 100644--- a/packages/cli/test/chat-thinking.test.ts+++ b/packages/cli/test/chat-thinking.test.ts@@ -199,7 +199,7 @@ describe("chat /verbose (tool-output collapsing)", () => {});});-describe("chat caller-context defaults (PENGUIN_SESSION_ID inheritance)", () => {+describe("chat caller-context defaults (ADELIE_SESSION_ID inheritance)", () => {it("a new chat inside an agent inherits workspace/model/approve and pins the caller's thinking", async () => {const caller = server.addSession({sessionId: "session-2026-08-25-10-00-00-ca11c0de",@@ -209,7 +209,7 @@ describe("chat caller-context defaults (PENGUIN_SESSION_ID inheritance)", () =>approvalMode: "read-only",thinkingLevel: "xhigh",});- process.env.PENGUIN_SESSION_ID = caller.sessionId;+ process.env.ADELIE_SESSION_ID = caller.sessionId;const out = await driveChat(["/thinking", "/exit"]);const created = [...server.sessions.values()].find((x) => x.sessionId !== caller.sessionId)!;expect(created.workspace).toBe("/callers/dir");diff --git a/packages/cli/test/client.test.ts b/packages/cli/test/client.test.tsindex e531d029..f37979dc 100644--- a/packages/cli/test/client.test.ts+++ b/packages/cli/test/client.test.ts@@ -1,5 +1,5 @@/**- * Server-client plumbing: connection resolution order (--server > PENGUIN_API_URL >+ * Server-client plumbing: connection resolution order (--server > ADELIE_API_URL >* live server.lock > auto-start), the remote-token gate, the SSE parser, and session* reference resolution (full id / unique fragment / ambiguity).*/@@ -25,11 +25,11 @@ import { FakeServer } from "./fake-server.js";const t = getMessages("en");const ENV_KEYS = [- "PENGUIN_API_URL",- "PENGUIN_API_TOKEN",+ "ADELIE_API_URL",+ "ADELIE_API_TOKEN","PENGUIN_HOME",- "PENGUIN_PROJECT_ID",- "PENGUIN_AGENT_ID",+ "ADELIE_PROJECT_ID",+ "ADELIE_AGENT_ID",];const saved = new Map<string, string | undefined>();@@ -47,25 +47,25 @@ afterEach(() => {});describe("connection resolution", () => {- it("--server wins over PENGUIN_API_URL; trailing slashes are stripped", async () => {- process.env.PENGUIN_API_URL = "http://127.0.0.1:7001";+ it("--server wins over ADELIE_API_URL; trailing slashes are stripped", async () => {+ process.env.ADELIE_API_URL = "http://127.0.0.1:7001";const conn = await resolveConnection({ server: "http://localhost:7002/" }, t);expect(conn.baseUrl).toBe("http://localhost:7002");expect(conn.loopback).toBe(true);expect(conn.autoStarted).toBe(false);});- it("PENGUIN_API_URL is used when --server is absent", async () => {- process.env.PENGUIN_API_URL = "http://127.0.0.1:7001";+ it("ADELIE_API_URL is used when --server is absent", async () => {+ process.env.ADELIE_API_URL = "http://127.0.0.1:7001";const conn = await resolveConnection({}, t);expect(conn.baseUrl).toBe("http://127.0.0.1:7001");});- it("a remote URL without PENGUIN_API_TOKEN is refused with the token hint", async () => {+ it("a remote URL without ADELIE_API_TOKEN is refused with the token hint", async () => {await expect(resolveConnection({ server: "https://box.example.com" }, t)).rejects.toThrow(- /PENGUIN_API_TOKEN/,+ /ADELIE_API_TOKEN/,);- process.env.PENGUIN_API_TOKEN = "remote-token";+ process.env.ADELIE_API_TOKEN = "remote-token";const conn = await resolveConnection({ server: "https://box.example.com" }, t);expect(conn.baseUrl).toBe("https://box.example.com");expect(conn.loopback).toBe(false);@@ -195,8 +195,8 @@ describe("option defaults", () => {it("project/agent ids: flag > env > built-in default", () => {expect(resolveProjectId(undefined)).toBe("default_project");expect(resolveAgentId(undefined)).toBe("default_agent");- process.env.PENGUIN_PROJECT_ID = "env-project";- process.env.PENGUIN_AGENT_ID = "env-agent";+ process.env.ADELIE_PROJECT_ID = "env-project";+ process.env.ADELIE_AGENT_ID = "env-agent";expect(resolveProjectId(undefined)).toBe("env-project");expect(resolveAgentId(undefined)).toBe("env-agent");expect(resolveProjectId("flag-project")).toBe("flag-project");diff --git a/packages/cli/test/fake-server.ts b/packages/cli/test/fake-server.tsindex 2eb58d71..4f073041 100644--- a/packages/cli/test/fake-server.ts+++ b/packages/cli/test/fake-server.ts@@ -3,7 +3,7 @@* handler covering exactly the endpoints the server-backed commands touch (the current* user, session create/get/patch, tasks/steer/compact/switch-model/abort, SSE stream,* messages, agents, projects, usage, schedules, organizations and their channels, and — through- * the `builtinBrowser` handler a test sets — the built-in browser). Connection resolution is pinned via PENGUIN_API_URL+ * the `builtinBrowser` handler a test sets — the built-in browser). Connection resolution is pinned via ADELIE_API_URL* (a loopback URL, so no token gate) and PENGUIN_HOME points at a scratch directory so* nothing of the developer's real data root is read.*@@ -296,24 +296,24 @@ export class FakeServer {install(): () => void {this.savedFetch = globalThis.fetch;for (const key of [- "PENGUIN_API_URL",- "PENGUIN_API_TOKEN",+ "ADELIE_API_URL",+ "ADELIE_API_TOKEN","PENGUIN_HOME",- "PENGUIN_SESSION_ID",- "PENGUIN_PROJECT_ID",- "PENGUIN_AGENT_ID",- "PENGUIN_ORG_ID",+ "ADELIE_SESSION_ID",+ "ADELIE_PROJECT_ID",+ "ADELIE_AGENT_ID",+ "ADELIE_ORG_ID",]) {this.savedEnv.set(key, process.env[key]);}this.scratch = fs.mkdtempSync(path.join(os.tmpdir(), "penguin-cli-test-"));process.env.PENGUIN_HOME = this.scratch;- process.env.PENGUIN_API_URL = "http://127.0.0.1:7399";- delete process.env.PENGUIN_API_TOKEN;- delete process.env.PENGUIN_SESSION_ID;- delete process.env.PENGUIN_PROJECT_ID;- delete process.env.PENGUIN_AGENT_ID;- delete process.env.PENGUIN_ORG_ID;+ process.env.ADELIE_API_URL = "http://127.0.0.1:7399";+ delete process.env.ADELIE_API_TOKEN;+ delete process.env.ADELIE_SESSION_ID;+ delete process.env.ADELIE_PROJECT_ID;+ delete process.env.ADELIE_AGENT_ID;+ delete process.env.ADELIE_ORG_ID;globalThis.fetch = ((input: string | URL | Request, init?: RequestInit) =>this.handle(input, init)) as typeof globalThis.fetch;return () => this.uninstall();diff --git a/packages/cli/test/i18n.test.ts b/packages/cli/test/i18n.test.tsindex 8802699c..6fbb6264 100644--- a/packages/cli/test/i18n.test.ts+++ b/packages/cli/test/i18n.test.ts@@ -1,32 +1,32 @@import { afterEach, beforeEach, describe, expect, it } from "vitest";import { getMessages, maskApiKey, resolveLanguage } from "../src/i18n.js";-describe("resolveLanguage (env PENGUIN_LANG, default en)", () => {+describe("resolveLanguage (env ADELIE_LANG, default en)", () => {let prev: string | undefined;beforeEach(() => {- prev = process.env.PENGUIN_LANG;+ prev = process.env.ADELIE_LANG;});afterEach(() => {- if (prev === undefined) delete process.env.PENGUIN_LANG;- else process.env.PENGUIN_LANG = prev;+ if (prev === undefined) delete process.env.ADELIE_LANG;+ else process.env.ADELIE_LANG = prev;});it("defaults to en when unset", () => {- delete process.env.PENGUIN_LANG;+ delete process.env.ADELIE_LANG;expect(resolveLanguage()).toBe("en");});it("matches zh exactly (case-insensitive, trimmed)", () => {- process.env.PENGUIN_LANG = "zh";+ process.env.ADELIE_LANG = "zh";expect(resolveLanguage()).toBe("zh");- process.env.PENGUIN_LANG = " ZH ";+ process.env.ADELIE_LANG = " ZH ";expect(resolveLanguage()).toBe("zh");});it("falls back to en for non-exact zh prefixes and anything else", () => {- process.env.PENGUIN_LANG = "zh-CN"; // no longer prefix-matched -> en+ process.env.ADELIE_LANG = "zh-CN"; // no longer prefix-matched -> enexpect(resolveLanguage()).toBe("en");- process.env.PENGUIN_LANG = "fr";+ process.env.ADELIE_LANG = "fr";expect(resolveLanguage()).toBe("en");- process.env.PENGUIN_LANG = "en";+ process.env.ADELIE_LANG = "en";expect(resolveLanguage()).toBe("en");});});@@ -108,7 +108,7 @@ describe("getMessages", () => {expect(m.ls.empty("proj-x")).toContain("proj-x");expect(m.agent.created("helper", "proj-x")).toContain("helper");expect(m.client.autoStarted("http://localhost:1", "/log")).toContain("http://localhost:1");- expect(m.client.remoteNeedsToken("https://r")).toContain("PENGUIN_API_TOKEN");+ expect(m.client.remoteNeedsToken("https://r")).toContain("ADELIE_API_TOKEN");expect(m.client.noToken("http://l", "/root/api-token")).toContain("/root/api-token");expect(m.client.httpError(500, "boom", "detail")).toContain("500");expect(m.client.sessionAmbiguous("ab", ["s1", "s2"])).toContain("s1");@@ -152,8 +152,8 @@ describe("getMessages", () => {// The company-mode family: descriptions, the control-environment default, confirmations.expect(m.org.lsDesc.length).toBeGreaterThan(0);expect(m.org.ticketCreateDesc.length).toBeGreaterThan(0);- expect(m.org.orgId).toContain("PENGUIN_ORG_ID");- expect(m.org.orgIdMissing()).toContain("PENGUIN_ORG_ID");+ expect(m.org.orgId).toContain("ADELIE_ORG_ID");+ expect(m.org.orgIdMissing()).toContain("ADELIE_ORG_ID");expect(m.org.hireTargetConflict()).toContain("--new-agent");expect(m.org.statusInvalid("bogus")).toContain("bogus");expect(m.org.created("acme", "session-x")).toContain("session-x");diff --git a/packages/cli/test/lang-config.test.ts b/packages/cli/test/lang-config.test.tsindex de1babb2..27ee8696 100644--- a/packages/cli/test/lang-config.test.ts+++ b/packages/cli/test/lang-config.test.ts@@ -12,7 +12,7 @@ describe("resolveShellRc", () => {const zsh = resolveShellRc("/bin/zsh", "/home/u");expect(zsh.kind).toBe("zsh");expect(zsh.rcPath).toBe(join("/home/u", ".zshrc"));- expect(zsh.body("zh")).toBe("export PENGUIN_LANG=zh");+ expect(zsh.body("zh")).toBe("export ADELIE_LANG=zh");const bash = resolveShellRc("/usr/bin/bash", "/home/u");expect(bash.kind).toBe("bash");@@ -21,7 +21,7 @@ describe("resolveShellRc", () => {const fish = resolveShellRc("/usr/local/bin/fish", "/home/u");expect(fish.kind).toBe("fish");expect(fish.rcPath).toBe(join("/home/u", ".config", "fish", "config.fish"));- expect(fish.body("en")).toBe("set -gx PENGUIN_LANG en");+ expect(fish.body("en")).toBe("set -gx ADELIE_LANG en");});it("falls back to ~/.profile for an unknown shell", () => {@@ -33,31 +33,31 @@ describe("resolveShellRc", () => {describe("upsertBlock", () => {it("appends a marked block when none exists", () => {- const out = upsertBlock("export PATH=/x\n", "export PENGUIN_LANG=zh");+ const out = upsertBlock("export PATH=/x\n", "export ADELIE_LANG=zh");expect(out).toContain("export PATH=/x");- expect(out).toContain("# >>> Adelie PENGUIN_LANG >>>");- expect(out).toContain("export PENGUIN_LANG=zh");- expect(out).toContain("# <<< Adelie PENGUIN_LANG <<<");+ expect(out).toContain("# >>> Adelie ADELIE_LANG >>>");+ expect(out).toContain("export ADELIE_LANG=zh");+ expect(out).toContain("# <<< Adelie ADELIE_LANG <<<");});it("replaces the block in place and is idempotent", () => {- const first = upsertBlock("", "export PENGUIN_LANG=zh");- const second = upsertBlock(first, "export PENGUIN_LANG=en");+ const first = upsertBlock("", "export ADELIE_LANG=zh");+ const second = upsertBlock(first, "export ADELIE_LANG=en");// Only one block remains, with its content replaced by the latest value.- expect(second.match(/Adelie PENGUIN_LANG/g)?.length).toBe(2); // begin + end markers- expect(second).toContain("export PENGUIN_LANG=en");- expect(second).not.toContain("export PENGUIN_LANG=zh");+ expect(second.match(/Adelie ADELIE_LANG/g)?.length).toBe(2); // begin + end markers+ expect(second).toContain("export ADELIE_LANG=en");+ expect(second).not.toContain("export ADELIE_LANG=zh");// Writing the same value again is stable (the block does not keep growing).- const third = upsertBlock(second, "export PENGUIN_LANG=en");+ const third = upsertBlock(second, "export ADELIE_LANG=en");expect(third).toBe(second);});it("preserves surrounding content when replacing", () => {- const base = "line1\n" + upsertBlock("", "export PENGUIN_LANG=zh") + "line2\n";- const out = upsertBlock(base, "export PENGUIN_LANG=en");+ const base = "line1\n" + upsertBlock("", "export ADELIE_LANG=zh") + "line2\n";+ const out = upsertBlock(base, "export ADELIE_LANG=en");expect(out.startsWith("line1\n")).toBe(true);expect(out.endsWith("line2\n")).toBe(true);- expect(out).toContain("export PENGUIN_LANG=en");+ expect(out).toContain("export ADELIE_LANG=en");});});@@ -73,13 +73,13 @@ describe("applyLanguageToRc", () => {expect(kind).toBe("zsh");expect(rcPath).toBe(join(home, ".zshrc"));const content = await readFile(rcPath, "utf8");- expect(content).toContain("export PENGUIN_LANG=zh");+ expect(content).toContain("export ADELIE_LANG=zh");// Switching the language again updates the file in place instead of appending.await applyLanguageToRc("en", { shell: "/bin/zsh", home });const updated = await readFile(rcPath, "utf8");- expect(updated).toContain("export PENGUIN_LANG=en");- expect(updated).not.toContain("export PENGUIN_LANG=zh");+ expect(updated).toContain("export ADELIE_LANG=en");+ expect(updated).not.toContain("export ADELIE_LANG=zh");expect(updated.match(/# >>> Adelie/g)?.length).toBe(1);});@@ -88,6 +88,6 @@ describe("applyLanguageToRc", () => {const { rcPath } = await applyLanguageToRc("en", { shell: "/usr/bin/fish", home });expect(rcPath).toBe(join(home, ".config", "fish", "config.fish"));const content = await readFile(rcPath, "utf8");- expect(content).toContain("set -gx PENGUIN_LANG en");+ expect(content).toContain("set -gx ADELIE_LANG en");});});diff --git a/packages/cli/test/org-commands.test.ts b/packages/cli/test/org-commands.test.tsindex c88b48f2..84aba8be 100644--- a/packages/cli/test/org-commands.test.ts+++ b/packages/cli/test/org-commands.test.ts@@ -16,10 +16,10 @@ import { FakeServer } from "./fake-server.js";const t = getMessages("en");/** The control environment a desk or ticket session carries: every test starts without it and restores what was there. */-const ENV_KEYS = ["PENGUIN_ORG_ID", "PENGUIN_AGENT_ID", "PENGUIN_SESSION_ID", "PENGUIN_PROJECT_ID"];+const ENV_KEYS = ["ADELIE_ORG_ID", "ADELIE_AGENT_ID", "ADELIE_SESSION_ID", "ADELIE_PROJECT_ID"];const saved = new Map<string, string | undefined>();-/** The desk session the CLI is assumed to run inside when PENGUIN_SESSION_ID is set below. */+/** The desk session the CLI is assumed to run inside when ADELIE_SESSION_ID is set below. */const DESK_SESSION = "session-2026-09-02-10-00-00-de5c0001";let server: FakeServer;@@ -37,7 +37,7 @@ beforeEach(() => {server = new FakeServer();uninstall = server.install();server.addOrg({ orgId: "acme", name: "Acme", mission: "Ship the site" });- process.env.PENGUIN_ORG_ID = "acme";+ process.env.ADELIE_ORG_ID = "acme";stdout = [];stderr = [];outSpy = vi.spyOn(process.stdout, "write").mockImplementation((chunk) => {@@ -230,7 +230,7 @@ describe("penguin org create", () => {expect(server.orgs.has("delta")).toBe(false);});- it("create's --org-id names the organization to create; PENGUIN_ORG_ID never fills it in", async () => {+ it("create's --org-id names the organization to create; ADELIE_ORG_ID never fills it in", async () => {expect(await cli(["org", "create", "--mission", "m"])).toBe(1);expect(err()).toContain("--org-id");expect(server.requests.some((r) => r.method === "POST")).toBe(false);@@ -360,9 +360,9 @@ describe("penguin org hire / employee set / leave", () => {});describe("penguin org desk", () => {- it("show defaults the employee to PENGUIN_AGENT_ID and opens the desk when there is none; renew POSTs a fresh one", async () => {+ it("show defaults the employee to ADELIE_AGENT_ID and opens the desk when there is none; renew POSTs a fresh one", async () => {server.addEmployee("acme", { agentId: "dev1" });- process.env.PENGUIN_AGENT_ID = "dev1";+ process.env.ADELIE_AGENT_ID = "dev1";expect(await cli(["org", "desk", "show"])).toBe(0);expect(lastRequest("GET", "/employees/dev1/desk")).toBeDefined();const first = String(org().desks.get("dev1")!.sessionId);@@ -380,7 +380,7 @@ describe("penguin org desk", () => {describe("penguin org calendar", () => {beforeEach(() => {server.addEmployee("acme", { agentId: "dev1" });- process.env.PENGUIN_AGENT_ID = "dev1";+ process.env.ADELIE_AGENT_ID = "dev1";});it("add posts the event under the calling employee, enabled, with --start-at now resolved to the current instant", async () => {@@ -525,8 +525,8 @@ describe("penguin org ticket (writes carry the calling session)", () => {server.addEmployee("acme", { agentId: "dev1", title: "Developer" });// The CLI runs inside dev1's desk session: the control environment names it.server.addSession({ sessionId: DESK_SESSION, agentId: "dev1" });- process.env.PENGUIN_SESSION_ID = DESK_SESSION;- process.env.PENGUIN_AGENT_ID = "dev1";+ process.env.ADELIE_SESSION_ID = DESK_SESSION;+ process.env.ADELIE_AGENT_ID = "dev1";});it("create posts goal, criteria, owner, parent, notify list, priority and due, attributed to the session", async () => {@@ -694,8 +694,8 @@ describe("penguin org ticket (writes carry the calling session)", () => {});it("outside a session and outside an Agent the writes carry no identity", async () => {- delete process.env.PENGUIN_SESSION_ID;- delete process.env.PENGUIN_AGENT_ID;+ delete process.env.ADELIE_SESSION_ID;+ delete process.env.ADELIE_AGENT_ID;server.addTicket("acme", { ticketId: "2026-09-02-site", title: "Site" });expect(await cli(["org", "ticket", "progress", "2026-09-02-site", "-m", "note"])).toBe(0);expect(lastRequest("POST", "/tickets/2026-09-02-site/progress")?.body).toEqual({@@ -705,7 +705,7 @@ describe("penguin org ticket (writes carry the calling session)", () => {expect(lastRequest("POST", "/tickets/2026-09-02-site/unblock")?.body).toEqual({});});- it("start runs the ticket session as PENGUIN_AGENT_ID, carries the calling session, and prints the bare session id (--json: {sessionId})", async () => {+ it("start runs the ticket session as ADELIE_AGENT_ID, carries the calling session, and prints the bare session id (--json: {sessionId})", async () => {server.addTicket("acme", { ticketId: "2026-09-02-site", title: "Site", owner: "agent:ceo" });expect(await cli([@@ -741,8 +741,8 @@ describe("penguin org ticket (writes carry the calling session)", () => {});// Outside a session the body names neither employee nor session: the server picks the owner.- delete process.env.PENGUIN_AGENT_ID;- delete process.env.PENGUIN_SESSION_ID;+ delete process.env.ADELIE_AGENT_ID;+ delete process.env.ADELIE_SESSION_ID;stdout.length = 0;expect(await cli(["org", "ticket", "start", "2026-09-02-site", "--json"])).toBe(0);expect(lastRequest("POST", "/tickets/2026-09-02-site/start")?.body).toEqual({});@@ -774,7 +774,7 @@ describe("penguin org ticket (writes carry the calling session)", () => {"session-2026-09-02-10-00-00-abcd0002",]);- delete process.env.PENGUIN_SESSION_ID;+ delete process.env.ADELIE_SESSION_ID;expect(await cli(["org", "ticket", "attach", "2026-09-02-site"])).toBe(1);expect(err()).toContain("--session");});@@ -930,7 +930,7 @@ describe("penguin org channel", () => {const employeeInSession = (agentId: string) => {server.addEmployee("acme", { agentId });server.addSession({ sessionId: DESK_SESSION, agentId });- process.env.PENGUIN_SESSION_ID = DESK_SESSION;+ process.env.ADELIE_SESSION_ID = DESK_SESSION;};it("ls lists the channels — the all-hands label, member counts, unread and @me; --json passes the response", async () => {@@ -970,7 +970,7 @@ describe("penguin org channel", () => {// answer the employee as the signed-in person and list every channel.expect(lastRequest("GET", "/channels")?.search).toBe(`?sessionId=${DESK_SESSION}`);- delete process.env.PENGUIN_SESSION_ID;+ delete process.env.ADELIE_SESSION_ID;stdout.length = 0;expect(await cli(["org", "channel", "ls", "--json"])).toBe(0);const asPerson = JSON.parse(out()) as { channels: Array<{ channelId: string }> };@@ -1096,7 +1096,7 @@ describe("penguin org channel", () => {expect(org().channels.get("site")!.members).toEqual(["user:admin"]);expect(out()).toBe(`${t.org.channelLeft("site")}\n`);- delete process.env.PENGUIN_SESSION_ID;+ delete process.env.ADELIE_SESSION_ID;stdout.length = 0;expect(await cli(["org", "channel", "leave", "site"])).toBe(0);expect(lastRequest("DELETE", `/members/${encodeURIComponent("user:admin")}`)?.search).toBe("");@@ -1116,7 +1116,7 @@ describe("penguin org channel", () => {expect(org().channels.get("site")!.members).toEqual(["user:admin"]);server.addChannel("acme", "marketing", { members: ["user:admin", "agent:dev1"] });- process.env.PENGUIN_SESSION_ID = DESK_SESSION;+ process.env.ADELIE_SESSION_ID = DESK_SESSION;expect(await cli(["org", "channel", "remove", "marketing", "user:admin"])).toBe(1);expect(err()).toContain("An employee removes only itself from a channel.");expect(org().channels.get("marketing")!.members).toEqual(["user:admin", "agent:dev1"]);@@ -1282,7 +1282,7 @@ describe("penguin org channel", () => {expect(org().channels.get("site")!.messages).toHaveLength(1);expect(org().channels.get(DEFAULT)!.messages).toHaveLength(1);- delete process.env.PENGUIN_SESSION_ID;+ delete process.env.ADELIE_SESSION_ID;expect(await cli(["org", "channel", "send", "-m", "plain"])).toBe(0);expect(lastRequest("POST", `/channels/${DEFAULT}/messages`)?.body).toEqual({ text: "plain" });});@@ -1300,14 +1300,14 @@ describe("penguin org channel", () => {expect(org().channels.get("site")!.messages).toEqual([]);// An employee reads and posts only in the channels it belongs to.- process.env.PENGUIN_SESSION_ID = DESK_SESSION;+ process.env.ADELIE_SESSION_ID = DESK_SESSION;expect(await cli(["org", "channel", "tail", "--channel", "site"])).toBe(1);expect(err()).toContain("not_a_member");expect(await cli(["org", "channel", "show", "site"])).toBe(1);expect(err()).toContain("not_a_member");expect(await cli(["org", "channel", "send", "--channel", "site", "-m", "hi"])).toBe(1);expect(err()).toContain("not_a_member");- delete process.env.PENGUIN_SESSION_ID;+ delete process.env.ADELIE_SESSION_ID;// An unknown channel is a 404, and so is an id no channel could carry.expect(await cli(["org", "channel", "show", "nope"])).toBe(1);@@ -1359,10 +1359,10 @@ describe("penguin org finance", () => {});describe("--org-id resolution", () => {- it("defaults to PENGUIN_ORG_ID; with neither, the command fails before any request", async () => {- delete process.env.PENGUIN_ORG_ID;+ it("defaults to ADELIE_ORG_ID; with neither, the command fails before any request", async () => {+ delete process.env.ADELIE_ORG_ID;expect(await cli(["org", "show"])).toBe(1);- expect(err()).toContain("PENGUIN_ORG_ID");+ expect(err()).toContain("ADELIE_ORG_ID");expect(server.requests).toHaveLength(0);expect(await cli(["org", "show", "--org-id", "acme"])).toBe(0);diff --git a/packages/cli/test/server-commands.test.ts b/packages/cli/test/server-commands.test.tsindex ddfb6254..41a63da0 100644--- a/packages/cli/test/server-commands.test.ts+++ b/packages/cli/test/server-commands.test.ts@@ -318,7 +318,7 @@ describe("penguin schedule ls", () => {});});-describe("caller-context defaults (PENGUIN_SESSION_ID inheritance)", () => {+describe("caller-context defaults (ADELIE_SESSION_ID inheritance)", () => {it("run inherits workspace/model/approve from the calling session and pins its thinking level on the new session", async () => {const caller = server.addSession({sessionId: "session-2026-08-25-10-00-00-ca11e001",@@ -328,7 +328,7 @@ describe("caller-context defaults (PENGUIN_SESSION_ID inheritance)", () => {approvalMode: "always-ask",thinkingLevel: "high",});- process.env.PENGUIN_SESSION_ID = caller.sessionId;+ process.env.ADELIE_SESSION_ID = caller.sessionId;const code = await cli(["run", "-m", "child job"]);expect(code).toBe(0);const create = server.requests.find((r) => r.method === "POST" && r.path.endsWith("/sessions"));@@ -352,7 +352,7 @@ describe("caller-context defaults (PENGUIN_SESSION_ID inheritance)", () => {approvalMode: "always-ask",thinkingLevel: "high",});- process.env.PENGUIN_SESSION_ID = caller.sessionId;+ process.env.ADELIE_SESSION_ID = caller.sessionId;const code = await cli(["run", "-m", "x", "--workspace", "/elsewhere", "--thinking", "low"]);expect(code).toBe(0);const create = server.requests.find((r) => r.method === "POST" && r.path.endsWith("/sessions"));@@ -369,7 +369,7 @@ describe("caller-context defaults (PENGUIN_SESSION_ID inheritance)", () => {});it("a failed caller lookup warns (dim, stderr) and falls back to the plain defaults", async () => {- process.env.PENGUIN_SESSION_ID = "session-2026-08-25-10-00-00-deadc0de"; // unknown to the server+ process.env.ADELIE_SESSION_ID = "session-2026-08-25-10-00-00-deadc0de"; // unknown to the serverconst code = await cli(["run", "-m", "x"]);expect(code).toBe(0);expect(stderr.join("")).toContain("session-2026-08-25-10-00-00-deadc0de");@@ -379,7 +379,7 @@ describe("caller-context defaults (PENGUIN_SESSION_ID inheritance)", () => {expect(create?.body?.approvalMode).toBeUndefined();});- it("outside an agent (no PENGUIN_SESSION_ID) nothing changes", async () => {+ it("outside an agent (no ADELIE_SESSION_ID) nothing changes", async () => {await cli(["run", "-m", "x"]);const create = server.requests.find((r) => r.method === "POST" && r.path.endsWith("/sessions"));expect(create?.body?.workspace).toBe(process.cwd());diff --git a/packages/cli/test/usage-error.test.ts b/packages/cli/test/usage-error.test.tsindex a1c0d3d2..2bf4aff7 100644--- a/packages/cli/test/usage-error.test.ts+++ b/packages/cli/test/usage-error.test.ts@@ -19,7 +19,7 @@ let priorLang: string | undefined;beforeEach(() => {stdout = [];stderr = [];- priorLang = process.env.PENGUIN_LANG;+ priorLang = process.env.ADELIE_LANG;outSpy = vi.spyOn(process.stdout, "write").mockImplementation((chunk) => {stdout.push(String(chunk));return true;@@ -32,8 +32,8 @@ beforeEach(() => {afterEach(() => {outSpy.mockRestore();errSpy.mockRestore();- if (priorLang === undefined) delete process.env.PENGUIN_LANG;- else process.env.PENGUIN_LANG = priorLang;+ if (priorLang === undefined) delete process.env.ADELIE_LANG;+ else process.env.ADELIE_LANG = priorLang;});const err = () => stderr.join("");@@ -41,7 +41,7 @@ const err = () => stderr.join("");describe("missing positional argument", () => {it("names the argument and the command's usage, in each language", async () => {for (const lang of ["en", "zh"] as const) {- process.env.PENGUIN_LANG = lang;+ process.env.ADELIE_LANG = lang;stderr.length = 0;const t = getMessages(lang);const code = await cli(["schedule", "rm"]);@@ -55,8 +55,8 @@ describe("missing positional argument", () => {});describe("missing required option", () => {- it("PENGUIN_LANG=zh explains `schedule add` in Chinese", async () => {- process.env.PENGUIN_LANG = "zh";+ it("ADELIE_LANG=zh explains `schedule add` in Chinese", async () => {+ process.env.ADELIE_LANG = "zh";const t = getMessages("zh");const code = await cli(["schedule", "add", "daily"]);expect(code).toBe(1);@@ -68,7 +68,7 @@ describe("missing required option", () => {});it("says the same thing in English", async () => {- process.env.PENGUIN_LANG = "en";+ process.env.ADELIE_LANG = "en";const t = getMessages("en");const code = await cli(["schedule", "add", "daily"]);expect(code).toBe(1);@@ -80,7 +80,7 @@ describe("missing required option", () => {describe("unknown option and unknown command", () => {it("both are localized and carry a usage line", async () => {for (const lang of ["en", "zh"] as const) {- process.env.PENGUIN_LANG = lang;+ process.env.ADELIE_LANG = lang;const t = getMessages(lang);stderr.length = 0;diff --git a/packages/core/package.json b/packages/core/package.jsonindex 280c2e74..92f1c54d 100644--- a/packages/core/package.json+++ b/packages/core/package.json@@ -52,7 +52,7 @@"scripts": {"typecheck": "tsc --noEmit -p tsconfig.json","test": "vitest run --passWithNoTests",- "test:e2e": "node ../../scripts/run-with-env.mjs PENGUIN_E2E=1 -- vitest run test/llm.e2e.test.ts",+ "test:e2e": "node ../../scripts/run-with-env.mjs ADELIE_E2E=1 -- vitest run test/llm.e2e.test.ts","build": "tsup"},"dependencies": {diff --git a/packages/core/src/environment/tools/command/path-prepend.ts b/packages/core/src/environment/tools/command/path-prepend.tsindex 2ec5fc2e..6864738e 100644--- a/packages/core/src/environment/tools/command/path-prepend.ts+++ b/packages/core/src/environment/tools/command/path-prepend.ts@@ -59,7 +59,7 @@ function powerShellQuote(value: string): string {* — untouched, and still the one whose exit status the shell reports.** `""` for an empty list, and for any shell whose PATH syntax is not one of the three- * below — `fish`, and whatever basename `PENGUIN_SHELL` names. A prefix in the wrong+ * below — `fish`, and whatever basename `ADELIE_SHELL` names. A prefix in the wrong* dialect would not misconfigure PATH, it would fail every command, so an unrecognized* shell keeps the child-environment prepend and nothing more.*/diff --git a/packages/core/src/environment/tools/command/session-manager.ts b/packages/core/src/environment/tools/command/session-manager.tsindex d366142d..46082a99 100644--- a/packages/core/src/environment/tools/command/session-manager.ts+++ b/packages/core/src/environment/tools/command/session-manager.ts@@ -94,7 +94,7 @@ const STRIPPED_ENV_KEYS = new Set(["PENGUIN_DESKTOP_TOKEN","PENGUIN_PORT_FILE",// Pinned seed password (tests/e2e): a credential, not a data-selection setting.- "PENGUIN_SEED_ADMIN_PASSWORD",+ "ADELIE_SEED_ADMIN_PASSWORD",]);/**@@ -108,12 +108,15 @@ const STRIPPED_ENV_KEYS = new Set([* Two prefixes because the installation carries two spellings of the same settings today:* `ADELIE_*` is Adelie's own — the installed launcher exports `ADELIE_HOME` — and `PENGUIN_*` is* the pre-rename spelling that existing deployments, systemd units and scripts still set, with- * the data root read from either. Covering one and not the other would let the *other* through,- * and the name that leaks would be the one naming the root this process is serving from.+ * the data root read from either. It is not only history: the settings whose *other* end is a+ * program Adelie does not build in this repository (the desktop shell's launch environment, the+ * installer a running CLI downloads) are deliberately still spelled `PENGUIN_*`, so those names+ * are read as well as written today. Covering one and not the other would let the *other*+ * through, and the name that leaks would be the one naming the root this process is serving from.** Outbound proxy settings are the deliberate exception to "the harness's environment stays out of* the child", and they are not `PENGUIN_*` — they are HTTP_PROXY and friends, governed by- * {@link PROXY_ENV_KEYS} and the host's policy just below. `PENGUIN_TRUST_PROXY` only looks like+ * {@link PROXY_ENV_KEYS} and the host's policy just below. `ADELIE_TRUST_PROXY` only looks like* one: it decides whether the server trusts an inbound `x-forwarded-proto`, and means nothing to* a child.*@@ -213,7 +216,7 @@ export class CommandSessionManager {*/private readonly proxyEnv: (() => ProxyEnvPolicy | null) | undefined;/**- * Harness-control variables (PENGUIN_API_URL / PENGUIN_API_TOKEN / the Session+ * Harness-control variables (ADELIE_API_URL / ADELIE_API_TOKEN / the Session* coordinates, see {@link EnvironmentConfig.controlEnv}): injected on every spawn AFTER* the vault, so the host's sanctioned wiring wins over a vault entry of the same name.* A getter like `proxyEnv`, re-read at every spawn. Absent = nothing injected.diff --git a/packages/core/src/environment/tools/command/shell.ts b/packages/core/src/environment/tools/command/shell.tsindex a4a2ea59..a5b3e1ce 100644--- a/packages/core/src/environment/tools/command/shell.ts+++ b/packages/core/src/environment/tools/command/shell.ts@@ -5,7 +5,7 @@* — Windows has none by default, and a POSIX box can be launched with a PATH that has none —* so the resolver picks the best available shell once per process:*- * 1. `PENGUIN_SHELL` (explicit executable name or path) always wins, on every platform;+ * 1. `ADELIE_SHELL` (explicit executable name or path) always wins, on every platform;* the argument shape is inferred from its basename (see below).* 2. Otherwise, non-Windows uses `bash -lc` — but only after confirming a `bash` exists.* A GUI-launched app inherits the desktop session's PATH, not a login shell's, and a@@ -28,7 +28,7 @@* 5. Only then `pwsh` (PowerShell 7+), and finally `powershell` (Windows PowerShell 5.1,* always present). These remain reachable for npm installs, which ship no bundle.*- * Argument shapes by basename (also applied to `PENGUIN_SHELL` values):+ * Argument shapes by basename (also applied to `ADELIE_SHELL` values):* - `pwsh` / `powershell` -> `-NoLogo -NoProfile -Command <cmd>`* - `cmd` -> `/d /s /c <cmd>`* - anything else -> `-lc <cmd>` (bash/zsh/sh-style login shell)@@ -70,7 +70,7 @@ export interface ResolveShellOptions {/** Basename without a trailing .exe/.cmd/.bat/.ps1 extension, lowercased ("C:\...\pwsh.EXE" -> "pwsh"). */function shellBasename(command: string): string {- // path.win32 handles both separators, so PENGUIN_SHELL=/usr/bin/zsh still yields "zsh".+ // path.win32 handles both separators, so ADELIE_SHELL=/usr/bin/zsh still yields "zsh".return path.win32.basename(command).replace(/\.(exe|cmd|bat|ps1)$/i, "")@@ -190,7 +190,7 @@ export function resolveShell(opts: ResolveShellOptions = {}): ShellInvocation {const platform = opts.platform ?? process.platform;const env = opts.env ?? process.env;- const explicit = env.PENGUIN_SHELL?.trim();+ const explicit = env.ADELIE_SHELL?.trim();if (explicit) {const name = shellBasename(explicit);return { command: explicit, args: argsForShell(name), name };diff --git a/packages/core/test/environment.test.ts b/packages/core/test/environment.test.tsindex 23a9234b..ba66e770 100644--- a/packages/core/test/environment.test.ts+++ b/packages/core/test/environment.test.ts@@ -251,11 +251,11 @@ describe("Environment.executeTool — vault env injection", () => {workspaceDir: tmp,toolConfig: makeToolConfig(),// PAGER is a hardened entry (HARDENED_ENV); a same-named vault entry must not override it.- vault: { PENGUIN_VAULT_TEST_KEY: "vault-secret-value", PAGER: "less" },+ vault: { ADELIE_VAULT_TEST_KEY: "vault-secret-value", PAGER: "less" },});const call = toolCall({name: "exec_command",- arguments: JSON.stringify({ cmd: 'echo "k=$PENGUIN_VAULT_TEST_KEY pager=$PAGER"' }),+ arguments: JSON.stringify({ cmd: 'echo "k=$ADELIE_VAULT_TEST_KEY pager=$PAGER"' }),toolCallId: "call_vault",});@@ -272,7 +272,7 @@ describe("Environment.executeTool — vault env injection", () => {const env = new Environment({workspaceDir: tmp,toolConfig: makeToolConfig(),- vault: { PENGUIN_VAULT_TEST_KEY: "old-value" },+ vault: { ADELIE_VAULT_TEST_KEY: "old-value" },});try {expect((await env.listTools()).map((t) => t.name)).toEqual(["exec_command"]);@@ -298,7 +298,7 @@ describe("Environment.executeTool — vault env injection", () => {// values (and only those — the replaced entry is gone, not merged).env.reconfigure({toolConfig: makeToolConfig(),- vault: { PENGUIN_VAULT_TEST_KEY: "new-value", PENGUIN_VAULT_ADDED: "added" },+ vault: { ADELIE_VAULT_TEST_KEY: "new-value", ADELIE_VAULT_ADDED: "added" },});expect(env.toolPermission("exec_command")).toBe("rw");const messages = await collect(@@ -306,7 +306,7 @@ describe("Environment.executeTool — vault env injection", () => {toolCall: toolCall({name: "exec_command",arguments: JSON.stringify({- cmd: 'echo "k=$PENGUIN_VAULT_TEST_KEY added=$PENGUIN_VAULT_ADDED"',+ cmd: 'echo "k=$ADELIE_VAULT_TEST_KEY added=$ADELIE_VAULT_ADDED"',}),toolCallId: "call_revault",}),@@ -321,7 +321,7 @@ describe("Environment.executeTool — vault env injection", () => {env.executeTool({toolCall: toolCall({name: "exec_command",- arguments: JSON.stringify({ cmd: 'echo "k=[$PENGUIN_VAULT_TEST_KEY]"' }),+ arguments: JSON.stringify({ cmd: 'echo "k=[$ADELIE_VAULT_TEST_KEY]"' }),toolCallId: "call_cleared",}),}),@@ -341,7 +341,7 @@ describe("Environment.executeTool — vault env injection", () => {});const call = toolCall({name: "exec_command",- arguments: JSON.stringify({ cmd: 'echo "k=[$PENGUIN_VAULT_TEST_KEY]"' }),+ arguments: JSON.stringify({ cmd: 'echo "k=[$ADELIE_VAULT_TEST_KEY]"' }),toolCallId: "call_no_vault",});diff --git a/packages/core/test/exec-session.test.ts b/packages/core/test/exec-session.test.tsindex fadad292..f589242f 100644--- a/packages/core/test/exec-session.test.ts+++ b/packages/core/test/exec-session.test.ts@@ -306,7 +306,7 @@ describe("harness environment variables never reach a spawned command", () => {"PENGUIN_WEB_DIST","PENGUIN_DESKTOP_TOKEN","PENGUIN_PORT_FILE",- "PENGUIN_SEED_ADMIN_PASSWORD",+ "ADELIE_SEED_ADMIN_PASSWORD","PENGUIN_HOME","PENGUIN_WEB_DB",// The post-rename spelling of the same setting, exported by the installed launcher: both@@ -316,9 +316,9 @@ describe("harness environment variables never reach a spawned command", () => {// resolved shell, the release feed, the UI language and the install location. Whether these// specific ones are set at run time is beside the point — the rule is the prefix, and a new// variable added next release has to be covered without anyone remembering this file.- "PENGUIN_SHELL",+ "ADELIE_SHELL","PENGUIN_UPDATE_FEED_URL",- "PENGUIN_LANG",+ "ADELIE_LANG","PENGUIN_INSTALL_DIR",] as const;const saved: Partial<Record<(typeof KEYS)[number], string | undefined>> = {};@@ -335,15 +335,15 @@ describe("harness environment variables never reach a spawned command", () => {// would let an Agent-run command call the server's shutdown endpoint.process.env.PENGUIN_DESKTOP_TOKEN = "secret-desktop-token";process.env.PENGUIN_PORT_FILE = "/tmp/port-file";- process.env.PENGUIN_SEED_ADMIN_PASSWORD = "penguin-0000";+ process.env.ADELIE_SEED_ADMIN_PASSWORD = "penguin-0000";// The data roots this very process is serving from. Inherited, they aim an Agent-started// harness at the running one's data — where the lock is already held, so it cannot start.process.env.PENGUIN_HOME = "/home/someone/.penguin/data";process.env.PENGUIN_WEB_DB = "/home/someone/.penguin/data/web.db";process.env.ADELIE_HOME = "/home/someone/.adelie/data";- process.env.PENGUIN_SHELL = "/opt/penguin/bin/bash";+ process.env.ADELIE_SHELL = "/opt/penguin/bin/bash";process.env.PENGUIN_UPDATE_FEED_URL = "https://example.invalid/feed";- process.env.PENGUIN_LANG = "zh";+ process.env.ADELIE_LANG = "zh";process.env.PENGUIN_INSTALL_DIR = "/opt/penguin";});afterEach(() => {@@ -439,14 +439,14 @@ describe("harness environment variables never reach a spawned command", () => {it("a PENGUIN_* nobody has invented yet is stripped, because the rule is the prefix", async () => {// The point of matching on the prefix: this variable exists in no list, and a feature that// adds one next release inherits the protection without anyone editing this file.- process.env.PENGUIN_SOME_FUTURE_SETTING = "leaked";+ process.env.ADELIE_SOME_FUTURE_SETTING = "leaked";try {const res = await runTool(env, "exec_command", {- cmd: `node -e "console.log('X=[' + (process.env.PENGUIN_SOME_FUTURE_SETTING ?? '') + ']')"`,+ cmd: `node -e "console.log('X=[' + (process.env.ADELIE_SOME_FUTURE_SETTING ?? '') + ']')"`,});expect(res.output).toContain("X=[]");} finally {- delete process.env.PENGUIN_SOME_FUTURE_SETTING;+ delete process.env.ADELIE_SOME_FUTURE_SETTING;}});@@ -494,22 +494,22 @@ describe("harness environment variables never reach a spawned command", () => {// relies on (the vault stands in for all of them here): the host's copy of the name is// set to a different value to prove the child's value came from the injection, not// through inheritance.- const savedInherited = process.env.PENGUIN_API_URL;- process.env.PENGUIN_API_URL = "http://inherited.invalid";+ const savedInherited = process.env.ADELIE_API_URL;+ process.env.ADELIE_API_URL = "http://inherited.invalid";const vaultEnv = new Environment({workspaceDir: tmp,toolConfig: sessionConfig(),- vault: { PENGUIN_API_URL: "http://injected.example" },+ vault: { ADELIE_API_URL: "http://injected.example" },});try {const res = await runTool(vaultEnv, "exec_command", {- cmd: `node -e "console.log('A=[' + (process.env.PENGUIN_API_URL ?? '') + ']')"`,+ cmd: `node -e "console.log('A=[' + (process.env.ADELIE_API_URL ?? '') + ']')"`,});expect(res.output).toContain("A=[http://injected.example]");} finally {vaultEnv.dispose();- if (savedInherited === undefined) delete process.env.PENGUIN_API_URL;- else process.env.PENGUIN_API_URL = savedInherited;+ if (savedInherited === undefined) delete process.env.ADELIE_API_URL;+ else process.env.ADELIE_API_URL = savedInherited;}});});@@ -611,9 +611,9 @@ describe("confineSpawn seam rewrites the exact argv a command spawns", () => {argv: [process.execPath,"-e",- "console.log('RUNNER=' + process.env.PENGUIN_RUNNER_MARK + ' PATH=' + (process.env.PATH ?? '').length)",+ "console.log('RUNNER=' + process.env.ADELIE_RUNNER_MARK + ' PATH=' + (process.env.PATH ?? '').length)",],- env: { PENGUIN_RUNNER_MARK: "set-by-confiner" },+ env: { ADELIE_RUNNER_MARK: "set-by-confiner" },});const res = await runTool(confinedEnv, "exec_command", { cmd: "echo original" });expect(res.output).toContain("RUNNER=set-by-confiner");@@ -744,28 +744,28 @@ describe("proxyEnv policy governs the proxy variables commands inherit", () => {describe("controlEnv injects the host's harness-control variables into commands", () => {// The hosting server threads a controlEnv getter through Environment ->// CommandSessionManager so commands the Agent runs can drive the harness back through- // the CLI/API (PENGUIN_API_URL / PENGUIN_API_TOKEN / the Session coordinates).+ // the CLI/API (ADELIE_API_URL / ADELIE_API_TOKEN / the Session coordinates).it("injected PENGUIN_* variables reach the child even though inherited ones are stripped", async () => {- // The host process's own PENGUIN_API_URL must NOT leak through inheritance; the same+ // The host process's own ADELIE_API_URL must NOT leak through inheritance; the same// name from controlEnv must arrive — injection happens after the prefix strip.- process.env.PENGUIN_API_URL = "http://inherited.example:1";+ process.env.ADELIE_API_URL = "http://inherited.example:1";const controlled = new Environment({workspaceDir: tmp,toolConfig: sessionConfig(),controlEnv: () => ({- PENGUIN_API_URL: "http://localhost:7364",- PENGUIN_SESSION_ID: "session-x",+ ADELIE_API_URL: "http://localhost:7364",+ ADELIE_SESSION_ID: "session-x",}),});try {const res = await runTool(controlled, "exec_command", {- cmd: `node -e "console.log('U=[' + (process.env.PENGUIN_API_URL ?? '') + '] S=[' + (process.env.PENGUIN_SESSION_ID ?? '') + ']')"`,+ cmd: `node -e "console.log('U=[' + (process.env.ADELIE_API_URL ?? '') + '] S=[' + (process.env.ADELIE_SESSION_ID ?? '') + ']')"`,});expect(res.output).toContain("U=[http://localhost:7364] S=[session-x]");} finally {controlled.dispose();- delete process.env.PENGUIN_API_URL;+ delete process.env.ADELIE_API_URL;}});@@ -773,12 +773,12 @@ describe("controlEnv injects the host's harness-control variables into commands"const controlled = new Environment({workspaceDir: tmp,toolConfig: sessionConfig(),- vault: { PENGUIN_API_TOKEN: "vault-token", KEEP_ME: "vault-kept" },- controlEnv: () => ({ PENGUIN_API_TOKEN: "boot-token" }),+ vault: { ADELIE_API_TOKEN: "vault-token", KEEP_ME: "vault-kept" },+ controlEnv: () => ({ ADELIE_API_TOKEN: "boot-token" }),});try {const res = await runTool(controlled, "exec_command", {- cmd: `node -e "console.log('T=[' + (process.env.PENGUIN_API_TOKEN ?? '') + '] K=[' + (process.env.KEEP_ME ?? '') + ']')"`,+ cmd: `node -e "console.log('T=[' + (process.env.ADELIE_API_TOKEN ?? '') + '] K=[' + (process.env.KEEP_ME ?? '') + ']')"`,});expect(res.output).toContain("T=[boot-token] K=[vault-kept]");} finally {@@ -791,10 +791,10 @@ describe("controlEnv injects the host's harness-control variables into commands"const controlled = new Environment({workspaceDir: tmp,toolConfig: sessionConfig(),- controlEnv: () => ({ PENGUIN_API_TOKEN: token }),+ controlEnv: () => ({ ADELIE_API_TOKEN: token }),});try {- const read = `node -e "console.log('T=[' + (process.env.PENGUIN_API_TOKEN ?? '') + ']')"`;+ const read = `node -e "console.log('T=[' + (process.env.ADELIE_API_TOKEN ?? '') + ']')"`;expect((await runTool(controlled, "exec_command", { cmd: read })).output).toContain("T=[first]",);diff --git a/packages/core/test/llm.e2e.test.ts b/packages/core/test/llm.e2e.test.tsindex d56e15ee..442f04da 100644--- a/packages/core/test/llm.e2e.test.ts+++ b/packages/core/test/llm.e2e.test.ts@@ -2,7 +2,7 @@* GenerativeModel live e2e. The whole suite is it.skip by default and stays offline;* requires an explicit opt-in to run against a real endpoint (this avoids ordinary unit* test runs firing real network requests just because an API key happens to be present):- * PENGUIN_E2E=1 pnpm test # or pnpm test:e2e+ * ADELIE_E2E=1 pnpm test # or pnpm test:e2e* The key comes from .env (gitignored) or an environment variable; the provider is picked* by whichever key is available (CI uses DeepSeek).*/@@ -19,7 +19,7 @@ const PROVIDERS = [{ key: "DEEPSEEK_API_KEY", modelId: "deepseek-v4-flash" },] as const;const provider = PROVIDERS.find((p) => process.env[p.key]);-const runLive = process.env.PENGUIN_E2E === "1" && provider !== undefined;+const runLive = process.env.ADELIE_E2E === "1" && provider !== undefined;const maybe = runLive ? it : it.skip;describe(`GenerativeModel live e2e (${provider?.modelId ?? "skipped"})`, () => {@@ -71,7 +71,7 @@ describe(`GenerativeModel live e2e (${provider?.modelId ?? "skipped"})`, () => {// verifies EventTranslator's in-Session uniqueness (#n suffix) and outbound restoration// (functionResponse paired by function name) round-trip on the real API. Runs only when explicitly// opted in with GEMINI_API_KEY set.-const runGemini = process.env.PENGUIN_E2E === "1" && process.env.GEMINI_API_KEY !== undefined;+const runGemini = process.env.ADELIE_E2E === "1" && process.env.GEMINI_API_KEY !== undefined;const maybeGemini = runGemini ? it : it.skip;describe(`GenerativeModel live e2e (gemini-3.5-flash: tool_call_id uniquification${runGemini ? "" : ", skipped"})`, () => {diff --git a/packages/core/test/path-prepend.test.ts b/packages/core/test/path-prepend.test.tsindex a03338b7..ee989a9a 100644--- a/packages/core/test/path-prepend.test.ts+++ b/packages/core/test/path-prepend.test.ts@@ -80,7 +80,7 @@ describe("pathPrependPrefix", () => {});it("a shell whose PATH syntax is not one of those gets nothing at all", () => {- // fish has no `export`; an unrecognized PENGUIN_SHELL basename is anyone's guess. A+ // fish has no `export`; an unrecognized ADELIE_SHELL basename is anyone's guess. A// prefix in the wrong dialect would fail every command, so neither gets one — the// child-environment prepend still applies to both.expect(pathPrependPrefix("fish", ["/a"])).toBe("");diff --git a/packages/core/test/sandbox-fs-helper.test.ts b/packages/core/test/sandbox-fs-helper.test.tsindex 01ed4034..70815b19 100644--- a/packages/core/test/sandbox-fs-helper.test.ts+++ b/packages/core/test/sandbox-fs-helper.test.ts@@ -48,7 +48,7 @@ afterEach(async () => {});/** A confiner's answer that names the helper as it is, with a runner entry so it reads as confined. */-const marked = (): ConfinedSpawn => ({ argv: fsWorkerArgv(), env: { PENGUIN_TEST_HELPER: "1" } });+const marked = (): ConfinedSpawn => ({ argv: fsWorkerArgv(), env: { ADELIE_TEST_HELPER: "1" } });describe("the helper's port", () => {let host: SandboxedFsHost;@@ -165,10 +165,10 @@ describe("one helper per Session", () => {// The same answer again: the same helper. Another answer: a fresh one.await host.portFor(marked()).stat(tmp);expect(starts).toHaveLength(1);- const b = host.portFor({ argv: fsWorkerArgv(), env: { PENGUIN_TEST_HELPER: "2" } });+ const b = host.portFor({ argv: fsWorkerArgv(), env: { ADELIE_TEST_HELPER: "2" } });await b.stat(tmp);expect(starts).toHaveLength(2);- expect(starts[1]!.env).toEqual({ PENGUIN_TEST_HELPER: "2" });+ expect(starts[1]!.env).toEqual({ ADELIE_TEST_HELPER: "2" });} finally {host.dispose();}@@ -229,7 +229,7 @@ describe("the file tools through the helper", () => {/** A confiner that names the helper as it is, plus a runner entry — enough for the Environment to route through it. */const confining: SpawnConfiner = (argv) => ({argv: [...argv],- env: { PENGUIN_TEST_HELPER: "1" },+ env: { ADELIE_TEST_HELPER: "1" },});async function execute(env: Environment, name: string, args: Record<string, unknown>) {diff --git a/packages/core/test/shell-resolver.test.ts b/packages/core/test/shell-resolver.test.tsindex 7d96e27f..aba7d63b 100644--- a/packages/core/test/shell-resolver.test.ts+++ b/packages/core/test/shell-resolver.test.ts@@ -121,10 +121,10 @@ describe("resolveShell — POSIX", () => {expect(shell).toEqual({ command: "bash", args: ["-lc"], name: "bash" });});- it("PENGUIN_SHELL still wins over the whole POSIX chain", () => {+ it("ADELIE_SHELL still wins over the whole POSIX chain", () => {const shell = resolveShell({platform: "linux",- env: { PENGUIN_SHELL: "/usr/bin/fish", PATH: "/bin" },+ env: { ADELIE_SHELL: "/usr/bin/fish", PATH: "/bin" },exists: has("/bin/bash"),});expect(shell).toEqual({ command: "/usr/bin/fish", args: ["-lc"], name: "fish" });@@ -203,11 +203,11 @@ describe("resolveShell — win32 probing", () => {});});-describe("resolveShell — PENGUIN_SHELL override", () => {+describe("resolveShell — ADELIE_SHELL override", () => {it("wins on every platform and keeps POSIX-style args for a POSIX shell path", () => {const shell = resolveShell({platform: "linux",- env: { PENGUIN_SHELL: "/usr/bin/zsh" },+ env: { ADELIE_SHELL: "/usr/bin/zsh" },});expect(shell).toEqual({ command: "/usr/bin/zsh", args: ["-lc"], name: "zsh" });});@@ -215,7 +215,7 @@ describe("resolveShell — PENGUIN_SHELL override", () => {it("uses PowerShell-style args when the basename is pwsh (case/extension-insensitive)", () => {const shell = resolveShell({platform: "win32",- env: { PENGUIN_SHELL: "C:\\Program Files\\PowerShell\\7\\pwsh.EXE" },+ env: { ADELIE_SHELL: "C:\\Program Files\\PowerShell\\7\\pwsh.EXE" },whichAll: which({ bash: ["C:\\Program Files\\Git\\bin\\bash.exe"] }),});expect(shell).toEqual({@@ -226,19 +226,19 @@ describe("resolveShell — PENGUIN_SHELL override", () => {});it("uses PowerShell-style args for a bare powershell name", () => {- const shell = resolveShell({ platform: "win32", env: { PENGUIN_SHELL: "powershell" } });+ const shell = resolveShell({ platform: "win32", env: { ADELIE_SHELL: "powershell" } });expect(shell).toEqual({ command: "powershell", args: POWERSHELL_ARGS, name: "powershell" });});it("uses cmd-style args when the basename is cmd", () => {- const shell = resolveShell({ platform: "win32", env: { PENGUIN_SHELL: "cmd" } });+ const shell = resolveShell({ platform: "win32", env: { ADELIE_SHELL: "cmd" } });expect(shell).toEqual({ command: "cmd", args: ["/d", "/s", "/c"], name: "cmd" });});- it("ignores a blank PENGUIN_SHELL", () => {+ it("ignores a blank ADELIE_SHELL", () => {const shell = resolveShell({platform: "linux",- env: { PENGUIN_SHELL: " ", PATH: "/usr/bin:/bin" },+ env: { ADELIE_SHELL: " ", PATH: "/usr/bin:/bin" },exists: has("/bin/bash"),});expect(shell).toEqual({ command: "bash", args: ["-lc"], name: "bash" });@@ -282,10 +282,10 @@ describe("resolveShell — the bundled MinGit bash (PENGUIN_BUNDLED_SHELL)", ()expect(shell.command).toBe(BUNDLED);});- it("still loses to an explicit PENGUIN_SHELL", () => {+ it("still loses to an explicit ADELIE_SHELL", () => {const shell = resolveShell({platform: "win32",- env: { PENGUIN_SHELL: "pwsh", PENGUIN_BUNDLED_SHELL: BUNDLED },+ env: { ADELIE_SHELL: "pwsh", PENGUIN_BUNDLED_SHELL: BUNDLED },exists: bundledExists,});expect(shell).toEqual({ command: "pwsh", args: POWERSHELL_ARGS, name: "pwsh" });diff --git a/packages/core/vitest.config.ts b/packages/core/vitest.config.tsindex b5345ae2..52e40339 100644--- a/packages/core/vitest.config.ts+++ b/packages/core/vitest.config.ts@@ -12,7 +12,7 @@* before and after finished the failing test in ~1.4s. The slowdown tracked OS work* only — pure-JS test files stayed at normal speed in the same run — so the flow* terminates and merely waits on the OS. Amplification confirms it: injecting spawn- * latency into the same test (a PENGUIN_SHELL shim sleeping before bash) reproduces the+ * latency into the same test (a ADELIE_SHELL shim sleeping before bash) reproduces the* failure exactly at 30s injected vs the old 30s deadline, with the flow completing* ~70ms after the spawn at every magnitude tried — tool latency flows through 1:1, the* loop adds no waits of its own (pinned platform-neutrally by the "slow tool delays thediff --git a/packages/server/README.md b/packages/server/README.mdindex 2840cc7c..f037d02f 100644--- a/packages/server/README.md+++ b/packages/server/README.md@@ -21,7 +21,7 @@ The full route tables and the SSE protocol are documented in the [Server API ref| `PENGUIN_HOME` | Data root (shared with SDK/CLI) | `~/.penguin/data` || `PENGUIN_WEB_DB` | SQLite file path | `<root>/web.db` || `PENGUIN_WEB_DIST` | Front-end build dir (static hosting + SPA fallback when present) | `../web/dist`, or the bundled `web-dist/` in the npm package |-| `PENGUIN_TRUST_PROXY` | Trust `x-forwarded-proto` (`1` to enable): it opens the hot-update network gate over proxied HTTPS and marks session cookies `Secure` — only behind a reverse proxy that sets/strips the header itself | unset (untrusted) |+| `ADELIE_TRUST_PROXY` | Trust `x-forwarded-proto` (`1` to enable): it opens the hot-update network gate over proxied HTTPS and marks session cookies `Secure` — only behind a reverse proxy that sets/strips the header itself | unset (untrusted) || `PENGUIN_CLI_ENTRY` | CLI entry script offered to the Agents this server runs: it is written into `<root>/bin/penguin` and put at the front of every command's PATH | `penguin server\|web` and the desktop shell set it; otherwise the entry of the checkout this server was started from, when it has one |`.env` in the process cwd is loaded automatically.@@ -40,10 +40,10 @@ pnpm --filter @prismshadow/penguin-server start # node dist/index.js- **CSRF**: session cookie is `SameSite=Lax` and writes accept only `Content-Type: application/json`; no CSRF token yet.- **Login throttling**: per-username exponential backoff after 5 consecutive failures (1s doubling to a 60s cap, `429 too_many_attempts` inside the window, reset on success; in-memory, so a restart clears it). Unknown usernames are throttled identically, so it is not an account-existence oracle. A reverse proxy can still add IP-level limits for public deployments.-- **Built-in admin `admin` is seeded with a random password that is hashed and discarded unseen** (`PENGUIN_SEED_ADMIN_PASSWORD` pins it for tests/e2e). Until a password is set, every start prints a first-login link that signs the browser in to choose one; a banner keeps reminding until the initial flag clears.+- **Built-in admin `admin` is seeded with a random password that is hashed and discarded unseen** (`ADELIE_SEED_ADMIN_PASSWORD` pins it for tests/e2e). Until a password is set, every start prints a first-login link that signs the browser in to choose one; a banner keeps reminding until the initial flag clears.- Passwords use `node:crypto` scrypt (`scrypt$N$r$p$salt$hash`, timingSafeEqual). A session is a row in `auth_sessions` (the cookie holds a random token, the row its sha256); it survives a restart, renews the expiry in place, and logout deletes the row. Sessions run 30 days with sliding renewal.- Model credentials live in the Project's hidden 0600 config file; the API always masks them.- **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.-- Behind a reverse proxy, disable response buffering for SSE paths (the server already sends `X-Accel-Buffering: no`), and set `PENGUIN_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.+- 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.Part of [Adelie](https://github.com/Prism-Shadow/penguin-harness) · Apache-2.0diff --git a/packages/server/src/api/types.ts b/packages/server/src/api/types.tsindex f678bf91..c068f995 100644--- a/packages/server/src/api/types.ts+++ b/packages/server/src/api/types.ts@@ -112,10 +112,10 @@ export interface MeResponse {user: UserInfo;/*** Whether Workspace HTML previews open on a separate origin (the loopback- * counterpart of the App host, or PENGUIN_PREVIEW_ORIGIN when set). False means this+ * counterpart of the App host, or ADELIE_PREVIEW_ORIGIN when set). False means this* deployment has no usable preview origin —* the App is reached on something other than a loopback name and- * PENGUIN_PREVIEW_ORIGIN is unset — so previews fall back to the same-origin sandbox,+ * ADELIE_PREVIEW_ORIGIN is unset — so previews fall back to the same-origin sandbox,* where `localStorage`, cookies and third-party embeds do not work. Computed per* request, since it depends on the host the caller is using.*/@@ -4033,7 +4033,7 @@ export interface UpdateCheckResponse {publishedAt: string | null;/** When this result was produced (ISO 8601) — a cached result keeps its original timestamp. */checkedAt: string;- /** Present (true) when update checks are turned off via PENGUIN_UPDATE_CHECK=off; no network call was made. */+ /** Present (true) when update checks are turned off via ADELIE_UPDATE_CHECK=off; no network call was made. */disabled?: true;/** Why the lookup failed: unreachable network / GitHub rate limit / unusable response. */error?: "network" | "rate_limited" | "bad_response";@@ -5137,14 +5137,14 @@ export interface OrgTicketBlockRequest {export interface OrgTicketProgressRequest {text: string;/**- * The calling session (CLI: PENGUIN_SESSION_ID); the session is booked as a contributing+ * The calling session (CLI: ADELIE_SESSION_ID); the session is booked as a contributing* session and the history entry is attributed to its employee. Honoured only for a request* carrying the local API token — the control environment's credential; a signed-in user's* write is attributed to the user.*/sessionId?: string;/**- * The calling employee's Agent id (CLI: PENGUIN_AGENT_ID from the control environment), the+ * The calling employee's Agent id (CLI: ADELIE_AGENT_ID from the control environment), the* identity a write is recorded under; it wins over the session's employee, is honoured only* with the local API token, like sessionId, and is ignored — the write falls back to the* session's employee, then to the person — when it names no employee.@@ -5153,7 +5153,7 @@ export interface OrgTicketProgressRequest {}export interface OrgTicketStartRequest {- /** The employee the ticket session runs as (CLI: PENGUIN_AGENT_ID); defaults to the ticket owner. */+ /** The employee the ticket session runs as (CLI: ADELIE_AGENT_ID); defaults to the ticket owner. */agentId?: string;message?: string;/** Another directory inside the shared workspace; defaults to the employee's desk workspace. */@@ -5172,7 +5172,7 @@ export interface OrgChannelMessageSendRequest {text: string;refs?: { ticket?: string; session?: string; replyTo?: string };/**- * The calling session (CLI: PENGUIN_SESSION_ID): the message is sent as its Agent and+ * The calling session (CLI: ADELIE_SESSION_ID): the message is sent as its Agent and* inherits its hop. Honoured only for a request carrying the local API token — the control* environment's credential; a signed-in user's message is sent as the user, at hop 0.*/diff --git a/packages/server/src/app.ts b/packages/server/src/app.tsindex ae6460b0..d5ef64f8 100644--- a/packages/server/src/app.ts+++ b/packages/server/src/app.ts@@ -403,7 +403,7 @@ export function createApp(boot: ServerBoot): Hono<AppEnv> {// cookie had ever been set on that host — act as the user. So the preview host serves ONLY// /preview/*: /api answers 401 (it never sets or honors a cookie there, closing both the// login and the stale-cookie paths), and everything else 302s to the canonical App host.- // Off when PENGUIN_PREVIEW_ORIGIN is set: previews then+ // Off when ADELIE_PREVIEW_ORIGIN is set: previews then// use that origin rather than the loopback counterpart, so 127.0.0.1 is an ordinary App// access point and must not be locked down — deployments enforce the equivalent at the// reverse proxy (route only /preview/* to the App on the preview origin).diff --git a/packages/server/src/auth/api-token.ts b/packages/server/src/auth/api-token.tsindex c8825940..8435265e 100644--- a/packages/server/src/auth/api-token.ts+++ b/packages/server/src/auth/api-token.ts@@ -9,7 +9,7 @@* `penguin server reset-admin-password` stands on (whoever can run it owns web.db* anyway) — and agents driving their own harness through the CLI is the product feature* this token exists for (server-driven Sessions hand it to tool subprocesses as- * PENGUIN_API_TOKEN). Rotation per boot bounds the life of any leaked copy to the+ * ADELIE_API_TOKEN). Rotation per boot bounds the life of any leaked copy to the* process that minted it.*/import { createHash, randomBytes, timingSafeEqual } from "node:crypto";@@ -29,7 +29,7 @@ export function mintApiToken(): string {* Persists the boot token (owner-only file, tmp + rename so a concurrent reader never* sees a partial write). Best-effort like the initial-password file: an exotic read-only* root must not stop the server — local CLI callers then fall back to- * PENGUIN_API_TOKEN.+ * ADELIE_API_TOKEN.*/export function storeApiToken(root: string, token: string): void {try {diff --git a/packages/server/src/auth/service.ts b/packages/server/src/auth/service.tsindex ce49aa19..3d27ea41 100644--- a/packages/server/src/auth/service.ts+++ b/packages/server/src/auth/service.ts@@ -138,7 +138,7 @@ export class AuthService implements Auth {// any insert, so a configuration typo cannot create a trivially weak privileged account.if (password.length < MIN_PASSWORD_LENGTH) {throw new Error(- `PENGUIN_SEED_ADMIN_PASSWORD must be at least ${MIN_PASSWORD_LENGTH} characters.`,+ `ADELIE_SEED_ADMIN_PASSWORD must be at least ${MIN_PASSWORD_LENGTH} characters.`,);}const user: UserRow = {diff --git a/packages/server/src/builtin-browser/routes.ts b/packages/server/src/builtin-browser/routes.tsindex b807f122..4addc0b9 100644--- a/packages/server/src/builtin-browser/routes.ts+++ b/packages/server/src/builtin-browser/routes.ts@@ -96,7 +96,7 @@ function optNumber(body: Body, key: string): number | undefined {return value;}-/** The session an Agent's CLI names (PENGUIN_SESSION_ID), so the window can follow its work. */+/** The session an Agent's CLI names (ADELIE_SESSION_ID), so the window can follow its work. */function sessionIdOf(body: Body): string | undefined {const id = optString(body, "sessionId");return id === undefined || id === "" ? undefined : id.slice(0, 200);diff --git a/packages/server/src/config.ts b/packages/server/src/config.tsindex 56412f54..f19e5c9f 100644--- a/packages/server/src/config.ts+++ b/packages/server/src/config.ts@@ -37,7 +37,7 @@ export interface ServerConfig {/** Frontend static assets directory; whether it's enabled is decided by checking existence when the app is assembled. */webDist: string;/**- * Origin that serves Workspace HTML previews (PENGUIN_PREVIEW_ORIGIN), e.g.+ * Origin that serves Workspace HTML previews (ADELIE_PREVIEW_ORIGIN), e.g.* `https://preview.example.com`. It must differ from the App origin by **hostname** —* cookies ignore ports, so a second port would still share the session cookie. Unset* is the norm locally: the loopback counterpart (`127.0.0.1` <-> `localhost`) is@@ -55,7 +55,7 @@ export interface ServerConfig {*/modelscopeBridgeUrl: string;/**- * Fixed initial password for the seeded built-in admin (PENGUIN_SEED_ADMIN_PASSWORD),+ * Fixed initial password for the seeded built-in admin (ADELIE_SEED_ADMIN_PASSWORD),* used by automated tests and e2e. Null is the norm: the seed then generates a random* password that is hashed and discarded unseen, and the account is claimed through the* first-login link instead.@@ -78,7 +78,7 @@ export interface ServerConfig {*/desktopToken: string | null;/**- * Whether `penguin server|web` supervises this process (PENGUIN_SUPERVISED=1) and relaunches+ * Whether `penguin server|web` supervises this process (ADELIE_SUPERVISED=1) and relaunches* it when it exits with core's SERVER_RESTART_EXIT_CODE — what makes the web UI's "restart* to update" possible. False under a direct server start, a dev run, or the desktop shell.*@@ -94,7 +94,7 @@ export interface ServerConfig {*/portFile: string | null;/**- * Trust `x-forwarded-proto` from the request (PENGUIN_TRUST_PROXY=1). Off by default:+ * Trust `x-forwarded-proto` from the request (ADELIE_TRUST_PROXY=1). Off by default:* the header is caller-supplied, so on a non-loopback bind an untrusted caller could* set it to `https` to walk through the hot-update network gate (hmr/routes.ts) while* actually speaking plaintext — or get session cookies stamped `Secure` over plain HTTP,@@ -150,7 +150,7 @@ function defaultCliEntry(): string | null {}/**- * Validates PENGUIN_PREVIEW_ORIGIN into a bare origin, or throws. An unparseable value+ * Validates ADELIE_PREVIEW_ORIGIN into a bare origin, or throws. An unparseable value* is a hard failure rather than a silent fallback: falling back would quietly serve* previews same-origin, which is the configuration this variable exists to avoid.*/@@ -160,10 +160,10 @@ function normalizePreviewOrigin(raw: string | undefined): string | null {try {url = new URL(raw.trim());} catch {- throw new Error(`Invalid PENGUIN_PREVIEW_ORIGIN=${raw} (expected an absolute origin)`);+ throw new Error(`Invalid ADELIE_PREVIEW_ORIGIN=${raw} (expected an absolute origin)`);}if (url.protocol !== "http:" && url.protocol !== "https:") {- throw new Error(`Invalid PENGUIN_PREVIEW_ORIGIN=${raw} (only http/https are supported)`);+ throw new Error(`Invalid ADELIE_PREVIEW_ORIGIN=${raw} (only http/https are supported)`);}return url.origin;}@@ -226,7 +226,7 @@ export function normalizeModelScopeBridgeUrl(raw: string | undefined): string {return `${url.origin}${url.pathname.replace(/\/+$/, "")}`;}-/** Parses server config from environment variables (PORT / HOST / ADELIE_HOME / PENGUIN_WEB_DIST / PENGUIN_WEB_DB / PENGUIN_PREVIEW_ORIGIN / PENGUIN_GO_ORIGIN / MODELSCOPE_BRIDGE_URL / PENGUIN_SEED_ADMIN_PASSWORD / PENGUIN_DESKTOP_TOKEN / PENGUIN_PORT_FILE / PENGUIN_TRUST_PROXY / PENGUIN_CLI_ENTRY). */+/** Parses server config from environment variables (PORT / HOST / ADELIE_HOME / PENGUIN_WEB_DIST / PENGUIN_WEB_DB / ADELIE_PREVIEW_ORIGIN / PENGUIN_GO_ORIGIN / MODELSCOPE_BRIDGE_URL / ADELIE_SEED_ADMIN_PASSWORD / PENGUIN_DESKTOP_TOKEN / PENGUIN_PORT_FILE / ADELIE_TRUST_PROXY / PENGUIN_CLI_ENTRY). */export function resolveServerConfig(env: NodeJS.ProcessEnv = process.env): ServerConfig {// The root is read off the passed environment rather than `process.env` (this function takes// one so tests can hand it a fabricated environment), so the two names are spelled here as@@ -251,17 +251,17 @@ export function resolveServerConfig(env: NodeJS.ProcessEnv = process.env): Serveport,dbPath: env.PENGUIN_WEB_DB ?? path.join(root, "web.db"),webDist: env.PENGUIN_WEB_DIST ?? defaultWebDist(),- previewOrigin: normalizePreviewOrigin(env.PENGUIN_PREVIEW_ORIGIN),+ previewOrigin: normalizePreviewOrigin(env.ADELIE_PREVIEW_ORIGIN),penguinGoOrigin: normalizePenguinGoOrigin(env.PENGUIN_GO_ORIGIN),modelscopeBridgeUrl: normalizeModelScopeBridgeUrl(env.MODELSCOPE_BRIDGE_URL),// An empty/whitespace value is treated as unset, which leaves the seed to generate one.- seedAdminPassword: env.PENGUIN_SEED_ADMIN_PASSWORD?.trim() || null,+ seedAdminPassword: env.ADELIE_SEED_ADMIN_PASSWORD?.trim() || null,authSessionTtlMs: 30 * DAY_MS,authSessionRenewMs: 29 * DAY_MS,desktopToken,portFile: env.PENGUIN_PORT_FILE?.trim() || null,- trustProxy: env.PENGUIN_TRUST_PROXY === "1",- supervised: env.PENGUIN_SUPERVISED === "1",+ trustProxy: env.ADELIE_TRUST_PROXY === "1",+ supervised: env.ADELIE_SUPERVISED === "1",cliEntry: env.PENGUIN_CLI_ENTRY?.trim() || defaultCliEntry(),};}diff --git a/packages/server/src/hmr/routes.ts b/packages/server/src/hmr/routes.tsindex 0512653a..f1f5d60a 100644--- a/packages/server/src/hmr/routes.ts+++ b/packages/server/src/hmr/routes.ts@@ -47,7 +47,7 @@ export function hmrRoutes(deps: HmrRouteDeps): Hono<AppEnv> {// where the caller is not a trusted party). Only a request's own URL scheme (real// TLS terminated by this process) counts unless the deployment explicitly says a// reverse proxy is in front and strips/overwrites the header itself- // (PENGUIN_TRUST_PROXY=1 / config.trustProxy) — the same opt-in a real proxy setup+ // (ADELIE_TRUST_PROXY=1 / config.trustProxy) — the same opt-in a real proxy setup// requires anyway.const proto = deps.config.trustProxy? (c.req.header("x-forwarded-proto") ?? new URL(c.req.url).protocol.replace(":", ""))diff --git a/packages/server/src/http/routes/model-oauth.ts b/packages/server/src/http/routes/model-oauth.tsindex 71562693..7d593aed 100644--- a/packages/server/src/http/routes/model-oauth.ts+++ b/packages/server/src/http/routes/model-oauth.ts@@ -54,7 +54,7 @@ const CODE_RE = /^[A-Za-z0-9._~-]{1,512}$/;* all work without configuration.** `x-forwarded-proto` / `x-forwarded-host` are caller-supplied and are honoured only when- * the deployment says a reverse proxy sets them (PENGUIN_TRUST_PROXY=1) — the same opt-in+ * the deployment says a reverse proxy sets them (ADELIE_TRUST_PROXY=1) — the same opt-in* the hot-update network gate requires, and for the same reason: without it anyone who can* reach the bind could choose where the authorization lands.*/diff --git a/packages/server/src/http/routes/organizations.ts b/packages/server/src/http/routes/organizations.tsindex 2c148df2..9a6f787d 100644--- a/packages/server/src/http/routes/organizations.ts+++ b/packages/server/src/http/routes/organizations.ts@@ -96,7 +96,7 @@ function nullableString(/*** The body's `sessionId` is an identity claim — "this write comes from inside that Session" —* and the only credential that backs it is the boot's local API token: `controlEnv` (app.ts)- * hands it to a Session's subprocesses together with PENGUIN_SESSION_ID, and holding it is+ * hands it to a Session's subprocesses together with ADELIE_SESSION_ID, and holding it is* already admin authority. A cookie proves a person, not a session, so a cookie-authenticated* claim is dropped and the write is attributed to that person; otherwise any Project member* could quote the CEO desk session id `GET /:orgId` returns and write as `agent:<org>_ceo`.@@ -113,7 +113,7 @@ function callerSessionId(/*** Who performs this write. `agentId` is the same kind of identity claim as `sessionId` — the- * `PENGUIN_AGENT_ID` a Session hands its command subprocesses — and is backed by the same+ * `ADELIE_AGENT_ID` a Session hands its command subprocesses — and is backed by the same* credential, so a cookie-authenticated body's `agentId` is dropped. It names the operator* more precisely than the session does, so the service prefers it.*diff --git a/packages/server/src/http/routes/sessions.ts b/packages/server/src/http/routes/sessions.tsindex 4e1c063b..6b68c25e 100644--- a/packages/server/src/http/routes/sessions.ts+++ b/packages/server/src/http/routes/sessions.ts@@ -1416,7 +1416,7 @@ export function sessionsRoutes(deps: SessionsRouteDeps): Hono<AppEnv> {// what it would grant is a preview of the victim's own file.//// With no usable preview origin (the App is reached on something other than a loopback- // name and PENGUIN_PREVIEW_ORIGIN is unset), this falls back to the sandboxed+ // name and ADELIE_PREVIEW_ORIGIN is unset), this falls back to the sandboxed// same-origin preview: the page still renders, but storage and third-party embeds do// not. The UI flags that ahead of time via `previewIsolated` on /api/me.app.get("/:sessionId/files/preview-redirect", async (c) => {diff --git a/packages/server/src/index.ts b/packages/server/src/index.tsindex 424876e4..d454308d 100644--- a/packages/server/src/index.ts+++ b/packages/server/src/index.ts@@ -246,7 +246,7 @@ class PenguinServer {** Nothing is printed in desktop mode: the shell's own window signs in through its one-shot* token, so a link in a log would be a credential nobody needs. Nothing is printed either- * when the pinned PENGUIN_SEED_ADMIN_PASSWORD is still the admin's actual password — the+ * when the pinned ADELIE_SEED_ADMIN_PASSWORD is still the admin's actual password — the* operator knows it. The pin alone is not enough: an offline reset-admin-password replaces* the password with an unknowable one while the pin stays configured, and the rescue flow* IS this link, so the gate verifies the pin against the hash rather than trusting it.diff --git a/packages/server/src/runtime/organization/service.ts b/packages/server/src/runtime/organization/service.tsindex 23498b82..468d405e 100644--- a/packages/server/src/runtime/organization/service.ts+++ b/packages/server/src/runtime/organization/service.ts@@ -142,7 +142,7 @@ const CEO_WORKSPACE = "ceo";/*** Who performs a write: a person (route user) or, through the control-env token from the* control environment of a session, that session's employee. `agentId` is the employee the- * command subprocess was handed (`PENGUIN_AGENT_ID`) and it wins over the session, so a+ * command subprocess was handed (`ADELIE_AGENT_ID`) and it wins over the session, so a* command run from a subagent or a nested session of an employee is still recorded as that* employee; `sessionId` answers when there is no Agent id to go by.*/@@ -209,7 +209,7 @@ export class OrganizationService {return this.deps.now?.() ?? Date.now();}- /** The organization a session belongs to, for the `PENGUIN_ORG_ID` control variable. */+ /** The organization a session belongs to, for the `ADELIE_ORG_ID` control variable. */orgIdOfSession(sessionId: string): string | null {return this.deps.cache.ownerOfSession(sessionId)?.orgId ?? null;}@@ -270,7 +270,7 @@ export class OrganizationService {* The principal a write is recorded under: the Agent id the caller carries when it names an* employee of this organization, else the employee of the calling session, else the person.* The Agent id comes first because it is the narrower fact — the session may be a desk that- * spawned the command, while `PENGUIN_AGENT_ID` names exactly who ran it.+ * spawned the command, while `ADELIE_AGENT_ID` names exactly who ran it.*/private actorPrincipal(org: LoadedOrg, actor: Actor): string {if (actor.agentId !== undefined && org.byId.has(actor.agentId)) {diff --git a/packages/server/src/runtime/session-manager.ts b/packages/server/src/runtime/session-manager.tsindex 0d624d50..6edac563 100644--- a/packages/server/src/runtime/session-manager.ts+++ b/packages/server/src/runtime/session-manager.ts@@ -2614,15 +2614,15 @@ export class SessionsModule {const token = authState.apiToken;const orgId = orgCache.ownerOfSession(ctx.sessionId)?.orgId ?? null;return {- PENGUIN_API_URL: `http://${host}:${config.port}`,- ...(token !== null ? { PENGUIN_API_TOKEN: token } : {}),- PENGUIN_PROJECT_ID: ctx.projectId,- PENGUIN_AGENT_ID: ctx.agentId,- PENGUIN_SESSION_ID: ctx.sessionId,+ ADELIE_API_URL: `http://${host}:${config.port}`,+ ...(token !== null ? { ADELIE_API_TOKEN: token } : {}),+ ADELIE_PROJECT_ID: ctx.projectId,+ ADELIE_AGENT_ID: ctx.agentId,+ ADELIE_SESSION_ID: ctx.sessionId,// A desk or ticket session also learns its organization, so `penguin org` needs no// --org-id inside it. Looked up per spawn from the cache the ledger and the tickets// project into.- ...(orgId !== null ? { PENGUIN_ORG_ID: orgId } : {}),+ ...(orgId !== null ? { ADELIE_ORG_ID: orgId } : {}),};},// The directory core puts at the FRONT of PATH for every command an Agent runs (and fordiff --git a/packages/server/src/services/lifecycle-service.ts b/packages/server/src/services/lifecycle-service.tsindex 1cfc79d1..6652e7ee 100644--- a/packages/server/src/services/lifecycle-service.ts+++ b/packages/server/src/services/lifecycle-service.ts@@ -5,7 +5,7 @@** The supervisor is `penguin server|web`, which runs the service as a child process and* respawns it on SERVER_RESTART_EXIT_CODE (core); it announces itself with- * PENGUIN_SUPERVISED=1. Under anything else — the server entry started directly, a dev+ * ADELIE_SUPERVISED=1. Under anything else — the server entry started directly, a dev* run, the desktop shell (which updates the whole app, not the server) — a restart request* is refused rather than honored: exiting would stop the service with nobody to bring it* back, and the page tells the user to restart by hand instead.@@ -18,7 +18,7 @@ export class LifecycleService {constructor(private readonly supervisedFlag: boolean) {}- /** Whether a supervisor relaunches this process on the restart exit code (PENGUIN_SUPERVISED=1). */+ /** Whether a supervisor relaunches this process on the restart exit code (ADELIE_SUPERVISED=1). */supervised(): boolean {return this.supervisedFlag;}diff --git a/packages/server/src/services/preview-token.ts b/packages/server/src/services/preview-token.tsindex 29d5771a..32c3fb13 100644--- a/packages/server/src/services/preview-token.ts+++ b/packages/server/src/services/preview-token.ts@@ -96,7 +96,7 @@ export function hostOnly(hostHeader: string): string {* `localhost` are distinct hosts for cookie purposes, so serving previews from the* other one isolates them with no extra port, no DNS, and nothing to configure.* Returns null for any other host (LAN IP, real domain) — those need an explicit- * PENGUIN_PREVIEW_ORIGIN, and the caller degrades to the same-origin sandbox.+ * ADELIE_PREVIEW_ORIGIN, and the caller degrades to the same-origin sandbox.*/export function loopbackCounterpart(host: string): string | null {const h = host.toLowerCase();@@ -120,7 +120,7 @@ export function loopbackCounterpart(host: string): string | null {** Null for non-loopback binds (wildcard, LAN IP, a bare `::1`): they can't offer a loopback* preview the IPv6 companion listener actually serves, so they must set- * PENGUIN_PREVIEW_ORIGIN and otherwise fall back to the same-origin sandbox.+ * ADELIE_PREVIEW_ORIGIN and otherwise fall back to the same-origin sandbox.*/export function loopbackHostRoles(bindHost: string): { app: string; preview: string } | null {const h = bindHost.trim().toLowerCase();@@ -149,7 +149,7 @@ export function requestAuthority(requestUrl: string, hostHeader: string | undefi/*** Where previews for this request should be served from: the configured origin when- * PENGUIN_PREVIEW_ORIGIN is set, otherwise the loopback counterpart of the host the+ * ADELIE_PREVIEW_ORIGIN is set, otherwise the loopback counterpart of the host the* caller is using. Null when neither applies — or when the configured origin's host is* the request's own host (no boundary) — and the caller degrades to the same-origin* sandbox rather than silently serving unisolated content.diff --git a/packages/server/src/services/update-check-service.ts b/packages/server/src/services/update-check-service.tsindex e4a80d63..c9314e63 100644--- a/packages/server/src/services/update-check-service.ts+++ b/packages/server/src/services/update-check-service.ts@@ -8,7 +8,7 @@* a normal response with `error` set and `latestVersion` null. Outcomes are cached* in-memory (success for 1 hour, failure for 10 minutes) so a sidebar that opens on every* page load cannot hammer GitHub's unauthenticated rate limit; concurrent requests share- * one in-flight lookup. `PENGUIN_UPDATE_CHECK=off` disables the lookup entirely (no+ * one in-flight lookup. `ADELIE_UPDATE_CHECK=off` disables the lookup entirely (no* network call), for air-gapped or privacy-sensitive deployments.** The request mirrors the CLI's fetchLatestVersion (packages/cli/src/commands/update.ts):@@ -61,7 +61,7 @@ export class GlobalFetch implements HttpFetch {export class UpdateCheckService implements UpdateCheck {@Use() private readonly http!: HttpFetch;@Use() private readonly clock!: Clock;- /** Environment to read PENGUIN_UPDATE_CHECK from; a test wires its own. */+ /** Environment to read ADELIE_UPDATE_CHECK from; a test wires its own. */private env: Record<string, string | undefined> = process.env;private cached: { response: UpdateCheckResponse; expiresAt: number } | null = null;private inflight: Promise<UpdateCheckResponse> | null = null;@@ -73,12 +73,12 @@ export class UpdateCheckService implements UpdateCheck {* exists to shield GitHub's unauthenticated rate limit from *passive* checks fired* by every sidebar open, and an explicit user click is rare enough to press through* it. Everything else is unchanged: the opt-out stays authoritative (force never- * dials out under PENGUIN_UPDATE_CHECK=off), the outcome lands in the same cache+ * dials out under ADELIE_UPDATE_CHECK=off), the outcome lands in the same cache* (subsequent passive checks reuse it), and concurrent callers — forced or not —* still share one in-flight lookup.*/async check(force = false): Promise<UpdateCheckResponse> {- if (this.env["PENGUIN_UPDATE_CHECK"] === "off") {+ if (this.env["ADELIE_UPDATE_CHECK"] === "off") {return {currentVersion: VERSION,buildDate: BUILD_DATE,diff --git a/packages/server/src/services/update-job.ts b/packages/server/src/services/update-job.tsindex 10af8482..41878267 100644--- a/packages/server/src/services/update-job.ts+++ b/packages/server/src/services/update-job.ts@@ -24,7 +24,7 @@* Interpreting the CLI's outcome: `penguin update` exits non-zero only when an upgrade was* attempted and failed; refusals (source checkout, unrecognized layout, Windows) print a* message and exit 0. Exit codes alone therefore cannot separate "updated" from- * "unsupported", so the spawn forces PENGUIN_LANG=en and classifies by the refusal+ * "unsupported", so the spawn forces ADELIE_LANG=en and classifies by the refusal* messages' stable English fragments (packages/cli/src/i18n.ts, `update` section). That* matching is reliable here because the spawned CLI and this server ship in lockstep from* the same install — the strings can never be from a different release than this code.@@ -125,10 +125,10 @@ export type UpdateRunner = (export const spawnUpdateRunner: UpdateRunner = (cliEntry, onOutput) =>new Promise((resolve) => {- // PENGUIN_LANG=en pins the CLI's output language so classifyUpdateRun's markers match+ // ADELIE_LANG=en pins the CLI's output language so classifyUpdateRun's markers match// regardless of the deployment's configured CLI language.const child = spawn(process.execPath, [cliEntry, "update", "--yes"], {- env: { ...process.env, PENGUIN_LANG: "en" },+ env: { ...process.env, ADELIE_LANG: "en" },stdio: ["ignore", "pipe", "pipe"],});const forward = (chunk: Buffer) => onOutput(chunk.toString("utf8"));diff --git a/packages/server/src/terminal/session.ts b/packages/server/src/terminal/session.tsindex 937c4e37..0114935b 100644--- a/packages/server/src/terminal/session.ts+++ b/packages/server/src/terminal/session.ts@@ -118,7 +118,7 @@ function buildTerminalEnv(Object.assign(env, extra ?? {});env.TERM = "xterm-256color";env.COLORTERM = "truecolor";- env.PENGUIN_TERMINAL = "1";+ env.ADELIE_TERMINAL = "1";env.PWD = cwd;// Inherited from the server process; a pty is not that server and these would point the// shell (and anything it starts) at the wrong runtime.diff --git a/packages/server/src/terminal/shell.ts b/packages/server/src/terminal/shell.tsindex 2189a5ed..ab59fd6b 100644--- a/packages/server/src/terminal/shell.ts+++ b/packages/server/src/terminal/shell.ts@@ -8,7 +8,7 @@* expects the shell their OS gives them, with their own profile in effect — the prompt,* the aliases, the PATH edits. So the two resolvers stay separate on purpose.*- * `PENGUIN_SHELL` is honoured first on every platform, so a user who has already told the+ * `ADELIE_SHELL` is honoured first on every platform, so a user who has already told the* harness which shell to use is not asked twice.*/import { spawnSync } from "node:child_process";@@ -57,7 +57,7 @@ export function resolveDefaultShell(platform: NodeJS.Platform = process.platform,opts: ResolveTerminalShellOptions = {},): string {- const explicit = env.PENGUIN_SHELL?.trim();+ const explicit = env.ADELIE_SHELL?.trim();if (explicit) return explicit;if (platform !== "win32") return env.SHELL || "/bin/sh";diff --git a/packages/server/test/builtin-browser/page-scripts.test.ts b/packages/server/test/builtin-browser/page-scripts.test.tsindex d5bd6b42..b0a15128 100644--- a/packages/server/test/builtin-browser/page-scripts.test.ts+++ b/packages/server/test/builtin-browser/page-scripts.test.ts@@ -4,7 +4,7 @@* - Every script parses as the driver wraps it, always; exec's rules that need no page run in* Node: the outcome as JSON text, the explicit return or else the last expression, a last* line that returns after a statement, a return inside a callback, a string or a comment.- * - Given a Chromium (a Playwright download, or PENGUIN_TEST_CHROMIUM) they run for real, over+ * - Given a Chromium (a Playwright download, or ADELIE_TEST_CHROMIUM) they run for real, over* its DevTools socket through the same link, driver and actions the routes use, a small fake* shell forwarding `cdp` to the page: a scan keeps the visible page, folds the long list to a* `[FAKE ELEMENT]` hint (keeping the items that match the instruction), drops what is hidden,@@ -113,7 +113,7 @@ describe("exec's rules, run in Node (the parts that need no page)", () => {// --- a real Chromium -------------------------------------------------------function findChromium(): string | null {- const fromEnv = process.env.PENGUIN_TEST_CHROMIUM;+ const fromEnv = process.env.ADELIE_TEST_CHROMIUM;if (fromEnv !== undefined && fromEnv !== "" && fs.existsSync(fromEnv)) return fromEnv;const cache =process.platform === "darwin"diff --git a/packages/server/test/config.test.ts b/packages/server/test/config.test.tsindex 29362ce2..2439a887 100644--- a/packages/server/test/config.test.ts+++ b/packages/server/test/config.test.ts@@ -4,7 +4,7 @@* - An empty PORT (the common `PORT=` line in `.env`) reads as unset, never as port 0; an* explicit value takes effect and an explicit "0" is kept (bind a random free port); a* non-integer or out-of-range value throws. This matches the CLI's resolvePort.- * - PENGUIN_SEED_ADMIN_PASSWORD: unset, empty or blank leaves the seed unpinned (null, so the+ * - ADELIE_SEED_ADMIN_PASSWORD: unset, empty or blank leaves the seed unpinned (null, so the* seed generates its own); a value is kept trimmed; desktop mode changes neither.* - PENGUIN_CLI_ENTRY: a value is kept trimmed; a blank one falls through to the checkout* lookup like an unset one.@@ -69,11 +69,11 @@ describe("resolveServerConfig: seed password", () => {expect(resolveServerConfig({ ...base }).seedAdminPassword).toBeNull();for (const blank of ["", " "]) {expect(- resolveServerConfig({ ...base, PENGUIN_SEED_ADMIN_PASSWORD: blank }).seedAdminPassword,+ resolveServerConfig({ ...base, ADELIE_SEED_ADMIN_PASSWORD: blank }).seedAdminPassword,).toBeNull();}expect(- resolveServerConfig({ ...base, PENGUIN_SEED_ADMIN_PASSWORD: " penguin-9999 " })+ resolveServerConfig({ ...base, ADELIE_SEED_ADMIN_PASSWORD: " penguin-9999 " }).seedAdminPassword,).toBe("penguin-9999");});@@ -84,7 +84,7 @@ describe("resolveServerConfig: seed password", () => {const desktop = { ...base, PENGUIN_DESKTOP_TOKEN: "tok" };expect(resolveServerConfig(desktop).seedAdminPassword).toBeNull();expect(- resolveServerConfig({ ...desktop, PENGUIN_SEED_ADMIN_PASSWORD: "penguin-2026" })+ resolveServerConfig({ ...desktop, ADELIE_SEED_ADMIN_PASSWORD: "penguin-2026" }).seedAdminPassword,).toBe("penguin-2026");});diff --git a/packages/server/test/first-login.test.ts b/packages/server/test/first-login.test.tsindex 1831511e..c00f53ba 100644--- a/packages/server/test/first-login.test.ts+++ b/packages/server/test/first-login.test.ts@@ -113,7 +113,7 @@ describe("the first-login link", () => {/*** The one reachable way to set a password WITHOUT going through setInitialPassword's- * revocation: a pinned seed (PENGUIN_SEED_ADMIN_PASSWORD, which every test app has) makes+ * revocation: a pinned seed (ADELIE_SEED_ADMIN_PASSWORD, which every test app has) makes* the current password knowable, so the ordinary change-password door opens. The link must* die there too — the invariant is "any password set on the admin ends the link", not "the* door we expected ends it".diff --git a/packages/server/test/hmr-network-gate.test.ts b/packages/server/test/hmr-network-gate.test.tsindex 721815ff..d2e29e45 100644--- a/packages/server/test/hmr-network-gate.test.ts+++ b/packages/server/test/hmr-network-gate.test.ts@@ -3,7 +3,7 @@* real HTTPS. `x-forwarded-proto` is caller-supplied — trusting it unconditionally would* let ANY client walk through the gate over plaintext just by setting a header, which is* exactly the case the gate exists to block. It is honored only when the deployment- * explicitly opts in (`trustProxy` / PENGUIN_TRUST_PROXY=1), same as a real reverse-proxy+ * explicitly opts in (`trustProxy` / ADELIE_TRUST_PROXY=1), same as a real reverse-proxy* setup requires.** - On a non-loopback bind a spoofed `x-forwarded-proto` is refused by default, while realdiff --git a/packages/server/test/organization-runtime.test.ts b/packages/server/test/organization-runtime.test.tsindex 4b9afb10..ec170fba 100644--- a/packages/server/test/organization-runtime.test.ts+++ b/packages/server/test/organization-runtime.test.ts@@ -1887,7 +1887,7 @@ describe("organization runtime", () => {{ userId: "alice" },);const ceoDesk = await service.desk(P, ORG, CEO, {});- // The CEO's desk ran the command, but PENGUIN_AGENT_ID says HR: the narrower fact wins.+ // The CEO's desk ran the command, but ADELIE_AGENT_ID says HR: the narrower fact wins.const withProgress = await service.progressTicket(P, ORG, t.ticketId, "looked at it", {userId: "alice",sessionId: ceoDesk.sessionId,diff --git a/packages/server/test/terminal-shell.test.ts b/packages/server/test/terminal-shell.test.tsindex f665db5f..753a3beb 100644--- a/packages/server/test/terminal-shell.test.ts+++ b/packages/server/test/terminal-shell.test.ts@@ -26,15 +26,15 @@ describe("resolveDefaultShell", () => {expect(resolveDefaultShell({}, "win32", NO_PATH)).toBe("C:\\Windows\\System32\\cmd.exe");});- it("honours PENGUIN_SHELL on every platform, without probing", () => {- const env = { PENGUIN_SHELL: "C:\\Program Files\\Git\\bin\\bash.exe", SHELL: "/bin/zsh" };+ it("honours ADELIE_SHELL on every platform, without probing", () => {+ const env = { ADELIE_SHELL: "C:\\Program Files\\Git\\bin\\bash.exe", SHELL: "/bin/zsh" };const explode = {onPath: (): boolean => {throw new Error("must not probe");},};- expect(resolveDefaultShell(env, "win32", explode)).toBe(env.PENGUIN_SHELL);- expect(resolveDefaultShell(env, "linux", explode)).toBe(env.PENGUIN_SHELL);+ expect(resolveDefaultShell(env, "win32", explode)).toBe(env.ADELIE_SHELL);+ expect(resolveDefaultShell(env, "linux", explode)).toBe(env.ADELIE_SHELL);});});diff --git a/packages/server/test/version.test.ts b/packages/server/test/version.test.tsindex 1f49b61c..fa222889 100644--- a/packages/server/test/version.test.ts+++ b/packages/server/test/version.test.ts@@ -9,7 +9,7 @@* the fresh outcome is what later plain checks see.* - A rate-limit answer reads as rate_limited, any other bad status or body as bad_response;* a latest release that is not newer is no update.- * - PENGUIN_UPDATE_CHECK=off answers disabled and never dials out, forced or not.+ * - ADELIE_UPDATE_CHECK=off answers disabled and never dials out, forced or not.* - A success is cached for an hour and a failure for ten minutes.* - The update job is admin-only; before any run it is idle, and a server not launched through* the CLI finishes it at once as unsupported, readable afterwards.@@ -210,8 +210,8 @@ describe("UpdateCheckService", () => {expect(result.updateAvailable).toBe(false);});- it("never dials out under PENGUIN_UPDATE_CHECK=off, forced or not", async () => {- const check = updateCheck(() => releaseResponse("v99.0.0"), { PENGUIN_UPDATE_CHECK: "off" });+ it("never dials out under ADELIE_UPDATE_CHECK=off, forced or not", async () => {+ const check = updateCheck(() => releaseResponse("v99.0.0"), { ADELIE_UPDATE_CHECK: "off" });for (const force of [false, true]) {const result = await check.service.check(force);expect(result.disabled).toBe(true);@@ -312,7 +312,7 @@ describe("POST /api/version/update", () => {describe("POST /api/version/restart", () => {it("is admin-only, and refuses when nothing supervises the process", async () => {- // Tests boot unsupervised (PENGUIN_SUPERVISED unset): exiting would stop a service nobody+ // Tests boot unsupervised (ADELIE_SUPERVISED unset): exiting would stop a service nobody// brings back, so the route says so instead of leaving.const t = await createTestApp();try {diff --git a/packages/server/test/workspace-preview.test.ts b/packages/server/test/workspace-preview.test.tsindex 2fb5e753..adb72089 100644--- a/packages/server/test/workspace-preview.test.ts+++ b/packages/server/test/workspace-preview.test.ts@@ -126,7 +126,7 @@ describe("preview origin derivation", () => {// A wildcard bind (0.0.0.0 / ::) no longer qualifies: localhost may resolve to ::1,// which 0.0.0.0 never serves, so the preview URL would refuse the connection while// /api/me claimed isolation. Only a loopback-name bind offers a loopback preview; the- // rest fall back and must set PENGUIN_PREVIEW_ORIGIN.+ // rest fall back and must set ADELIE_PREVIEW_ORIGIN.expect(resolvePreviewTarget("http://localhost:7364/x", "localhost:7364", null, {host: "0.0.0.0",@@ -150,7 +150,7 @@ describe("preview origin derivation", () => {});it("refuses a configured origin that matches the App request's host", () => {- // PENGUIN_PREVIEW_ORIGIN pointing back at the host the App is being used on is no+ // ADELIE_PREVIEW_ORIGIN pointing back at the host the App is being used on is no// boundary: "isolated" previews would be same-origin with the App (and the UI would// mount an allow-same-origin iframe onto them). Must degrade to null so// previewIsolated reports false and the safe same-origin sandbox engages.@@ -310,7 +310,7 @@ describe("preview route", () => {expect(me.previewIsolated).toBe(true);});- it("leaves the loopback guard off when PENGUIN_PREVIEW_ORIGIN is set", async () => {+ it("leaves the loopback guard off when ADELIE_PREVIEW_ORIGIN is set", async () => {// With a configured preview origin, previews no longer use 127.0.0.1, so it is an// ordinary App host and must not be redirected/refused (deployments enforce the// equivalent at their reverse proxy). A guarded app would 302 this to localhost.diff --git a/packages/web/README.md b/packages/web/README.mdindex de205bae..b0b8ada3 100644--- a/packages/web/README.md+++ b/packages/web/README.md@@ -27,7 +27,7 @@ pnpm dev:server # backend at 127.0.0.1:7368 (dev port, not the installed servepnpm dev:web # Vite dev server at 127.0.0.1:7365; /api proxied (SSE passes through)```-The proxy target defaults to `http://127.0.0.1:7368` — the development backend, kept off the installed server's 7364 so the two can run at once (`PORT` moves both, `PENGUIN_API_PROXY` overrides the target outright). Auth is a same-origin HttpOnly cookie, so the proxy keeps everything same-origin.+The proxy target defaults to `http://127.0.0.1:7368` — the development backend, kept off the installed server's 7364 so the two can run at once (`PORT` moves both, `ADELIE_API_PROXY` overrides the target outright). Auth is a same-origin HttpOnly cookie, so the proxy keeps everything same-origin.```bashpnpm --filter @prismshadow/penguin-web typecheckdiff --git a/packages/web/e2e/auth.mjs b/packages/web/e2e/auth.mjsindex 9f4adbb7..d34a9837 100644--- a/packages/web/e2e/auth.mjs+++ b/packages/web/e2e/auth.mjs@@ -2,7 +2,7 @@* e2e auth helper: with signup disabled, test users are always provisioned via* the built-in admin account, then logged in. The seeded admin password is* random in production; run.sh starts the e2e server with- * PENGUIN_SEED_ADMIN_PASSWORD=penguin-2026 to pin it to the constant below.+ * ADELIE_SEED_ADMIN_PASSWORD=penguin-2026 to pin it to the constant below.* A single e2e run shares one data root, and provisioning is idempotent* (reuses the user if it already exists) so a single spec can be rerun on its* own.diff --git a/packages/web/e2e/run.sh b/packages/web/e2e/run.shindex 2c6557be..874e8262 100644--- a/packages/web/e2e/run.sh+++ b/packages/web/e2e/run.sh@@ -32,11 +32,11 @@ MOCK_PORT=$MOCK_PORT node "$HERE/mock-llm.mjs" &MOCK_PID=$!echo "== start server =="-# PENGUIN_SEED_ADMIN_PASSWORD pins the otherwise-random seeded admin password to the+# ADELIE_SEED_ADMIN_PASSWORD pins the otherwise-random seeded admin password to the# constant the specs use (ADMIN_PASSWORD in auth.mjs).PENGUIN_HOME="$DATA" PORT=$SRV_PORT HOST=127.0.0.1 PENGUIN_WEB_DB="$DATA/web.db" \PENGUIN_WEB_DIST="$ROOT/packages/web/dist" \- PENGUIN_SEED_ADMIN_PASSWORD=penguin-2026 \+ ADELIE_SEED_ADMIN_PASSWORD=penguin-2026 \node "$ROOT/packages/server/dist/index.js" &SRV_PID=$!diff --git a/packages/web/scripts/theme-shots.mjs b/packages/web/scripts/theme-shots.mjsindex bd8bb261..7dd422da 100644--- a/packages/web/scripts/theme-shots.mjs+++ b/packages/web/scripts/theme-shots.mjs@@ -482,7 +482,7 @@ async function capture(args) {PENGUIN_WEB_DIST: variants[0].dist,PORT: String(SRV_PORT),HOST: "127.0.0.1",- PENGUIN_SEED_ADMIN_PASSWORD: ADMIN_PASSWORD,+ ADELIE_SEED_ADMIN_PASSWORD: ADMIN_PASSWORD,},stdio: ["ignore", "pipe", "pipe"],});diff --git a/packages/web/src/lib/strings-en.ts b/packages/web/src/lib/strings-en.tsindex 4c2f511e..cd62a3e8 100644--- a/packages/web/src/lib/strings-en.ts+++ b/packages/web/src/lib/strings-en.ts@@ -658,7 +658,7 @@ export const en: Strings = {checkingBody: "Checking for updates…",upToDate: "You're on the latest version",checkFailed: "Update check failed — try again later",- checkDisabled: "Update checks are disabled (PENGUIN_UPDATE_CHECK=off)",+ checkDisabled: "Update checks are disabled (ADELIE_UPDATE_CHECK=off)",releaseNotes: "Release notes",openReleases: "Open the Releases page",/** What "download and update" does, per backend. */@@ -1970,7 +1970,7 @@ export const en: Strings = {* Instruction tail of the settings tab's dialog: the task is created for one agent, in a* new Session unless the user names one. The CLI form spells every flag, `--agent-id`* above all: the prompt runs in a conversation with the Project's default agent, so the- * server injects THAT agent into PENGUIN_AGENT_ID, and an `add` without the flag writes+ * server injects THAT agent into ADELIE_AGENT_ID, and an `add` without the flag writes* the task into the wrong agent's schedule directory. The TOML keys are named only in* the file branch, so they are never read as flags of the command beside them.*/@@ -3574,7 +3574,7 @@ Scenarios:uploadHere: "Upload here",openInNewTab: "Open in new tab",previewNotIsolatedHint:- "This address has no separate preview origin, so the page opens sandboxed: localStorage, cookies and third-party embeds will not work. Reach the app over 127.0.0.1 or localhost, or set PENGUIN_PREVIEW_ORIGIN.",+ "This address has no separate preview origin, so the page opens sandboxed: localStorage, cookies and third-party embeds will not work. Reach the app over 127.0.0.1 or localhost, or set ADELIE_PREVIEW_ORIGIN.",refresh: "Refresh",/** The Workspace root, as the breadcrumbs and the drop overlay name it. "." is what a* shell calls the working directory, so it needs no translation. */diff --git a/packages/web/src/lib/strings.ts b/packages/web/src/lib/strings.tsindex a5b31abf..e822d622 100644--- a/packages/web/src/lib/strings.ts+++ b/packages/web/src/lib/strings.ts@@ -720,7 +720,7 @@ export const zh = {checkingBody: "正在检查更新…",upToDate: "已是最新版本",checkFailed: "检查更新失败,请稍后重试",- checkDisabled: "更新检查已关闭(PENGUIN_UPDATE_CHECK=off)",+ checkDisabled: "更新检查已关闭(ADELIE_UPDATE_CHECK=off)",releaseNotes: "更新说明",openReleases: "打开 Releases 页面",/** What "download and update" does, per backend. */@@ -2020,7 +2020,7 @@ export const zh = {* Instruction tail of the settings tab's dialog: the task is created for one agent, in a* new Session unless the user names one. The CLI form spells every flag, `--agent-id`* above all: the prompt runs in a conversation with the Project's default agent, so the- * server injects THAT agent into PENGUIN_AGENT_ID, and an `add` without the flag writes+ * server injects THAT agent into ADELIE_AGENT_ID, and an `add` without the flag writes* the task into the wrong agent's schedule directory. The TOML keys are named only in* the file branch, so they are never read as flags of the command beside them.*/@@ -3622,7 +3622,7 @@ Benchmark:uploadHere: "上传到此文件夹",openInNewTab: "新页面打开",previewNotIsolatedHint:- "当前访问地址无法提供独立预览源,页面将以沙箱模式打开:localStorage、Cookie 与第三方 embed 不可用。经 127.0.0.1 或 localhost 访问,或配置 PENGUIN_PREVIEW_ORIGIN 即可解除。",+ "当前访问地址无法提供独立预览源,页面将以沙箱模式打开:localStorage、Cookie 与第三方 embed 不可用。经 127.0.0.1 或 localhost 访问,或配置 ADELIE_PREVIEW_ORIGIN 即可解除。",refresh: "刷新",/** The Workspace root, as the breadcrumbs and the drop overlay name it. "." is what a* shell calls the working directory, so it needs no translation. */diff --git a/packages/web/src/lib/update-flow.ts b/packages/web/src/lib/update-flow.tsindex 3a79e671..0a30057a 100644--- a/packages/web/src/lib/update-flow.ts+++ b/packages/web/src/lib/update-flow.ts@@ -48,7 +48,7 @@ export type UpdateFlow =/** No check has answered yet. */| { kind: "unknown" }| { kind: "checking" }- /** Checks are turned off (PENGUIN_UPDATE_CHECK=off); the Releases page is the only way to look. */+ /** Checks are turned off (ADELIE_UPDATE_CHECK=off); the Releases page is the only way to look. */| { kind: "disabled" }| { kind: "up-to-date"; version: string | null }/** A newer release is offered; nothing has been fetched. `canInstall` is false for a non-admin on a server. */diff --git a/packages/web/src/lib/use-version-info.ts b/packages/web/src/lib/use-version-info.tsindex a9554f59..807bf25a 100644--- a/packages/web/src/lib/use-version-info.ts+++ b/packages/web/src/lib/use-version-info.ts@@ -10,7 +10,7 @@* retries; nothing is surfaced as an error (the footer simply shows nothing, and "no update* known" hides the reminder and every badge). The server caches its own lookup for an hour* and shares one in-flight call, so an app load costs no outbound request of its own, and- * `PENGUIN_UPDATE_CHECK=off` still answers without dialing out at all. forceUpdateCheck is+ * `ADELIE_UPDATE_CHECK=off` still answers without dialing out at all. forceUpdateCheck is* the user asking directly: it refetches past the server's TTL and broadcasts the result to* every mounted hook.*/diff --git a/packages/web/test/vite-config.test.ts b/packages/web/test/vite-config.test.tsindex f5e515e2..a3d6ee32 100644--- a/packages/web/test/vite-config.test.ts+++ b/packages/web/test/vite-config.test.ts@@ -3,7 +3,7 @@** - The dev server's `/api` proxy defaults to the development backend (7368, not the installed* server's 7364), follows PORT, treats an empty PORT as unset rather than as port 80, and is- * replaced outright by PENGUIN_API_PROXY unless that is empty.+ * replaced outright by ADELIE_API_PROXY unless that is empty.* - KaTeX's stylesheet ships woff2 only: the woff and truetype fallbacks are dropped, and a* stylesheet without them is left untouched.*/@@ -23,14 +23,14 @@ describe("apiProxyTarget", () => {expect(apiProxyTarget({ PORT: "9999" })).toBe("http://127.0.0.1:9999");});- it("PENGUIN_API_PROXY replaces the whole target, PORT and all", () => {- expect(apiProxyTarget({ PORT: "9999", PENGUIN_API_PROXY: "http://10.0.0.2:8080" })).toBe(+ it("ADELIE_API_PROXY replaces the whole target, PORT and all", () => {+ expect(apiProxyTarget({ PORT: "9999", ADELIE_API_PROXY: "http://10.0.0.2:8080" })).toBe("http://10.0.0.2:8080",);});- it("an empty PENGUIN_API_PROXY falls back instead of proxying to nowhere", () => {- expect(apiProxyTarget({ PENGUIN_API_PROXY: "" })).toBe("http://127.0.0.1:7368");+ it("an empty ADELIE_API_PROXY falls back instead of proxying to nowhere", () => {+ expect(apiProxyTarget({ ADELIE_API_PROXY: "" })).toBe("http://127.0.0.1:7368");});});diff --git a/packages/web/vite.config.ts b/packages/web/vite.config.tsindex 6db7b86b..bfc6adb6 100644--- a/packages/web/vite.config.ts+++ b/packages/web/vite.config.ts@@ -4,7 +4,7 @@* Dev server listens on 7365; `/api` is proxied to the **development** backend (127.0.0.1:7368 --* `pnpm dev:server`, deliberately not the installed server's 7364, which is routinely running at the* same time). Honors PORT so overriding the backend port moves the proxy with it, and- * PENGUIN_API_PROXY overrides the whole target. SSE (text/event-stream) passes through http-proxy+ * ADELIE_API_PROXY overrides the whole target. SSE (text/event-stream) passes through http-proxy* transparently, no special config needed.* The vitest config is kept separate in vitest.config.ts (its embedded vite 5 types conflict with this* package's vite 7 plugin types, hence the separate file to avoid the clash).@@ -19,7 +19,7 @@ import type { Plugin } from "vite";import { penguinUi } from "../ui/src/vite-plugin";/**- * Resolves the `/api` proxy target: PENGUIN_API_PROXY replaces it outright, otherwise the+ * Resolves the `/api` proxy target: ADELIE_API_PROXY replaces it outright, otherwise the* development backend on PORT — the same variable `pnpm dev:server` binds — defaulting to 7368.** Empty counts as unset, as everywhere else PORT is read in this repo (server/src/config.ts,@@ -32,7 +32,7 @@ import { penguinUi } from "../ui/src/vite-plugin";* `server.proxy` cannot be exercised without starting a dev server).*/export function apiProxyTarget(env: Record<string, string | undefined> = process.env): string {- return env.PENGUIN_API_PROXY || `http://127.0.0.1:${env.PORT || "7368"}`;+ return env.ADELIE_API_PROXY || `http://127.0.0.1:${env.PORT || "7368"}`;}/**diff --git a/plugins/agent-company/skills/company-employee/SKILL.md b/plugins/agent-company/skills/company-employee/SKILL.mdindex d00f4eca..feb0a2c6 100644--- a/plugins/agent-company/skills/company-employee/SKILL.md+++ b/plugins/agent-company/skills/company-employee/SKILL.md@@ -191,7 +191,7 @@ The `budget:` line of every trigger block is your period-to-date spend (yours pl## Command reference-Inside a desk or ticket session `PENGUIN_ORG_ID` is injected beside the usual control variables, so `--org-id` is never needed. `--agent-id` on `calendar` and the positional `<agent_id>` of `desk` default to you (`PENGUIN_AGENT_ID`); `ticket start` runs the ticket session as you unless its own `--agent-id` enlists a colleague on your ticket; `ticket progress` and `ticket attach` take the current session from `PENGUIN_SESSION_ID`.+Inside a desk or ticket session `ADELIE_ORG_ID` is injected beside the usual control variables, so `--org-id` is never needed. `--agent-id` on `calendar` and the positional `<agent_id>` of `desk` default to you (`ADELIE_AGENT_ID`); `ticket start` runs the ticket session as you unless its own `--agent-id` enlists a colleague on your ticket; `ticket progress` and `ticket attach` take the current session from `ADELIE_SESSION_ID`.```bashpenguin org ls [--project-id <id>] [--json]diff --git a/plugins/agent-company/skills/company-setup/SKILL.md b/plugins/agent-company/skills/company-setup/SKILL.mdindex aa7c3cc2..c8407a4b 100644--- a/plugins/agent-company/skills/company-setup/SKILL.md+++ b/plugins/agent-company/skills/company-setup/SKILL.md@@ -23,10 +23,10 @@ If that call answers `404`, company mode is off for this server (System settings## Which Project the organization lands in-Inside a harness agent session every command subprocess carries `PENGUIN_API_URL`, `PENGUIN_API_TOKEN` and `PENGUIN_PROJECT_ID`, and `penguin org create` reads that last one as its `--project-id` — so you normally pass no flag and the organization is created in the Project you are running in. Check which one that is before you create anything:+Inside a harness agent session every command subprocess carries `ADELIE_API_URL`, `ADELIE_API_TOKEN` and `ADELIE_PROJECT_ID`, and `penguin org create` reads that last one as its `--project-id` — so you normally pass no flag and the organization is created in the Project you are running in. Check which one that is before you create anything:```bash-echo "${PENGUIN_PROJECT_ID:-default_project}"+echo "${ADELIE_PROJECT_ID:-default_project}"```Name the Project in the summary. Pass `--project-id <id>` only when the user explicitly wants a different one.@@ -81,7 +81,7 @@ penguin org create --org-id co_plugin_marketplace \--ceo-budget 100```-- `--org-id` is the id to create; unlike every other `penguin org` command it never comes from `PENGUIN_ORG_ID`.+- `--org-id` is the id to create; unlike every other `penguin org` command it never comes from `ADELIE_ORG_ID`.- Omit `--name`, `--workspace` and the model pair when the user took the defaults. `--ceo-budget` defaults to 100, so it may be omitted too — but pass it whenever the user named a number, including `0`. Omit `--language` unless the user asked for a working language other than the mission's own.- The command prints the new organization's id and the CEO's desk session id. Errors surface verbatim: `409 org_exists` (the id, or the CEO's Agent id `<org_id>_ceo`, is taken), `400` with the reason for a bad id, an empty mission, a missing workspace directory or an unconfigured model. Fix the one field and run it again — creation is all-or-nothing and leaves nothing behind when it fails.diff --git a/plugins/agent-development/skills/penguin-config/SKILL.md b/plugins/agent-development/skills/penguin-config/SKILL.mdindex f50abed4..9b06e24f 100644--- a/plugins/agent-development/skills/penguin-config/SKILL.md+++ b/plugins/agent-development/skills/penguin-config/SKILL.md@@ -57,7 +57,7 @@ penguin config vault remove --key <NAME> [--project-id <id>] [--agent-id <id>] [## Language```bash-penguin config lang <en|zh> # persist the CLI language via PENGUIN_LANG in your shell rc+penguin config lang <en|zh> # persist the CLI language via ADELIE_LANG in your shell rc```## Running agentsdiff --git a/plugins/agent-development/skills/penguin-orchestration/SKILL.md b/plugins/agent-development/skills/penguin-orchestration/SKILL.mdindex 30a60954..5d9a0368 100644--- a/plugins/agent-development/skills/penguin-orchestration/SKILL.md+++ b/plugins/agent-development/skills/penguin-orchestration/SKILL.md@@ -13,7 +13,7 @@ If the user's message only invokes this skill (e.g. "use penguin-orchestration s## How the connection works-- **Inside a harness agent session** (you, now): every command subprocess has `PENGUIN_API_URL`, `PENGUIN_API_TOKEN`, `PENGUIN_PROJECT_ID`, `PENGUIN_AGENT_ID` and `PENGUIN_SESSION_ID` injected, so `penguin` commands automatically reach your own server with your project and agent as the defaults — no login step.+- **Inside a harness agent session** (you, now): every command subprocess has `ADELIE_API_URL`, `ADELIE_API_TOKEN`, `ADELIE_PROJECT_ID`, `ADELIE_AGENT_ID` and `ADELIE_SESSION_ID` injected, so `penguin` commands automatically reach your own server with your project and agent as the defaults — no login step.- **Outside an agent** (a human shell): the CLI attaches to the running local server via its lock file, or auto-starts one; the local `<data-root>/api-token` file (0600) authenticates it.- You are operating the same server that runs you: sessions and agents you create appear live in the web UI, where the user sees and owns everything you spawn.- The injected token is admin-equivalent. Act accordingly: stick to what the task requires, and prefer read-only commands until a mutation is clearly needed.@@ -118,7 +118,7 @@ penguin run -m "Summarize this per-agent cost report and flag anomalies: <the JS```bashpenguin schedule add build-watch --prompt "Check the build results and report the failures" \- --start-at now --period 12h --session-id "$PENGUIN_SESSION_ID" \+ --start-at now --period 12h --session-id "$ADELIE_SESSION_ID" \--end-at <ISO instant> # only when the request has a horizonpenguin schedule add daily-report --prompt "Summarize yesterday's conversations" \--start-at now --period 1d # no target: a fresh session per firing@@ -127,7 +127,7 @@ penguin schedule update daily-report --period 12h # adjust; --enable/--disablpenguin schedule rm daily-report # remove — no confirmation prompt```-- `--agent-id` defaults to yourself from the caller env, so this schedules the current agent. `--start-at` takes ISO 8601 or `now`; `--period` is at least 5m (`30m`/`12h`/`1d`/`7d`), omit it for a one-shot; `--end-at` bounds recurrence. Target the session you are in — `--session-id "$PENGUIN_SESSION_ID"` — unless the user asked for somewhere else: the prompt then arrives in this conversation, with its context. Leave the target off when the user wants a separate session, or when the task is better off starting clean (a nightly report that should not inherit this conversation); each firing then opens a new session, which `--workspace <path>` and the `--model-id` + `--provider` pair configure.+- `--agent-id` defaults to yourself from the caller env, so this schedules the current agent. `--start-at` takes ISO 8601 or `now`; `--period` is at least 5m (`30m`/`12h`/`1d`/`7d`), omit it for a one-shot; `--end-at` bounds recurrence. Target the session you are in — `--session-id "$ADELIE_SESSION_ID"` — unless the user asked for somewhere else: the prompt then arrives in this conversation, with its context. Leave the target off when the user wants a separate session, or when the task is better off starting clean (a nightly report that should not inherit this conversation); each firing then opens a new session, which `--workspace <path>` and the `--model-id` + `--provider` pair configure.- `add` creates the schedule **enabled** (`--disabled` stages it off) — deliberately diverging from the raw file, where `enabled` defaults to false. `update` is read-modify-write: unspecified fields keep their stored values, and switching the target form clears the other one.- In `schedule ls`, read: the AGENT column (without `--agent-id` the listing spans agents), `enabled` (a disabled entry never fires), `startAt` (first firing), `period` (absent means one-shot), the target — an existing session versus a new session per firing — and `lastFiredAt`.- The CLI writes through the schedules API, so mistakes are rejected synchronously. The TOML file stays the single source of truth — `<app_data_dir>/agents/<agent_id>/agent_state/schedule/<name>.toml`, fields mirroring the flags (`prompt`, `enabled` — false by default in the file, `start_at`, `period`, `end_at`, `session_id` / `workspace`+`provider`+`model_id`) — and remains editable with file tools; your system prompt's schedule roster lists yours. A hand edit is only validated by the periodic reconcile (roughly every 30s), with errors landing in error records rather than your terminal — prefer the CLI.diff --git a/scripts/deploy-target-safety.mjs b/scripts/deploy-target-safety.mjsindex d5579984..a970be83 100644--- a/scripts/deploy-target-safety.mjs+++ b/scripts/deploy-target-safety.mjs@@ -9,7 +9,7 @@const LOOPBACK_HOSTNAMES = new Set(["127.0.0.1", "localhost", "::1", "[::1]"]);/**- * Refuses a target that would send PENGUIN_ADMIN_PASSWORD in the clear: deploy.mjs's+ * Refuses a target that would send ADELIE_ADMIN_PASSWORD in the clear: deploy.mjs's* login() posts it as a JSON body, and `http://` to anything off this machine puts it* on the wire readable by anyone on the path. `https://` is always fine; plain* `http://` is only fine to a loopback hostname (the documented `ssh -L` tunnel case —@@ -21,7 +21,7 @@ export function unsafePlaintextTarget(urlStr) {if (url.protocol === "https:") return null;if (LOOPBACK_HOSTNAMES.has(url.hostname.toLowerCase())) return null;return (- `refusing to send PENGUIN_ADMIN_PASSWORD in plaintext to ${url.protocol}//${url.hostname} — ` ++ `refusing to send ADELIE_ADMIN_PASSWORD in plaintext to ${url.protocol}//${url.hostname} — ` +"serve over https:// instead, or reach the target through an `ssh -L` tunnel to 127.0.0.1.");}diff --git a/scripts/deploy.mjs b/scripts/deploy.mjsindex 483d9e60..d3a292b6 100644--- a/scripts/deploy.mjs+++ b/scripts/deploy.mjs@@ -6,15 +6,15 @@** Builds the web dist, compiles the platform and cli entries, and pushes all three as ONE* atomic version to POST /api/hmr/upgrade. Authentication is an admin session established- * per run: PENGUIN_ADMIN_PASSWORD is read from the environment and exchanged for a cookie,+ * per run: ADELIE_ADMIN_PASSWORD is read from the environment and exchanged for a cookie,* so no credential of any kind is written to disk — a file holding an admin-equivalent* secret is readable by everything running as this user, agent shells included, which makes* the file itself the vulnerability.** Usage:- * PENGUIN_ADMIN_PASSWORD=… node scripts/deploy.mjs 53531- * PENGUIN_ADMIN_PASSWORD=… node scripts/deploy.mjs 53531 --skip-web-build- * PENGUIN_ADMIN_PASSWORD=… node scripts/deploy.mjs https://box.example.com+ * ADELIE_ADMIN_PASSWORD=… node scripts/deploy.mjs 53531+ * ADELIE_ADMIN_PASSWORD=… node scripts/deploy.mjs 53531 --skip-web-build+ * ADELIE_ADMIN_PASSWORD=… node scripts/deploy.mjs https://box.example.com*/import { createRequire } from "node:module";import { execFileSync } from "node:child_process";@@ -65,8 +65,8 @@ function pushSource() {function usage(problem) {console.error(`${problem}\n\n` +- "Usage: PENGUIN_ADMIN_PASSWORD=… node scripts/deploy.mjs <port|url> [--skip-web-build]\n" +- " PENGUIN_API_TOKEN=$(cat <root>/api-token) node scripts/deploy.mjs <port|url>\n" ++ "Usage: ADELIE_ADMIN_PASSWORD=… node scripts/deploy.mjs <port|url> [--skip-web-build]\n" ++ " ADELIE_API_TOKEN=$(cat <root>/api-token) node scripts/deploy.mjs <port|url>\n" +" <port> a port on this machine (an ssh -L tunnel to the target runtime, or a local server)\n" +" <url> a full origin, when the target is not reached over loopback\n",);@@ -80,12 +80,10 @@ if (target === undefined) usage("[deploy] no target given.");// Two credentials, either one: the admin password (exchanged for a cookie), or the// runtime's own local API token (`<root>/api-token`, admin-equivalent — see// server/src/auth/api-token.ts), sent as a Bearer. A local push needs no password.-const ADMIN_PASSWORD = process.env.PENGUIN_ADMIN_PASSWORD;-const API_TOKEN = process.env.PENGUIN_API_TOKEN;+const ADMIN_PASSWORD = process.env.ADELIE_ADMIN_PASSWORD;+const API_TOKEN = process.env.ADELIE_API_TOKEN;if (!ADMIN_PASSWORD && !API_TOKEN)- usage(- "[deploy] set PENGUIN_ADMIN_PASSWORD or PENGUIN_API_TOKEN (the runtime's <root>/api-token).",- );+ usage("[deploy] set ADELIE_ADMIN_PASSWORD or ADELIE_API_TOKEN (the runtime's <root>/api-token).");/** A bare port means this machine's loopback (typically an ssh -L tunnel to the real target). */const baseUrl = /^\d+$/.test(target) ? `http://127.0.0.1:${target}` : target.replace(/\/+$/, "");