@songsid/agend 2.3.2-beta.11 → 2.3.2-beta.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -130,6 +130,8 @@ agend start # 3. Launch your fleet 🎉 (skip if quickstart
130
130
 
131
131
  Open Telegram or Discord, send a message to your bot, and start working from your phone. Or open the web dashboard at `http://localhost:19280/`. To sign in, run `agend web --code` on this machine, or send `/web` to your bot.
132
132
 
133
+ Or in Docker: give [AgEnD in Docker](docs/docker.md) to an agent (General, or Claude Code on your machine). It is a runbook: the agent sets AgEnD up in a container for you and maintains it.
134
+
133
135
  > **Discord?** `agend quickstart` supports Discord too — it's built in, no extra install needed. See [Discord setup guide](docs/features.md#discord-adapter).
134
136
 
135
137
  ## How It Works
@@ -199,6 +201,8 @@ graph LR
199
201
  - [Features](docs/features.md) — detailed feature documentation
200
202
  - [CLI Reference](docs/cli.md) — all commands and options
201
203
  - [Configuration](docs/configuration.md) — fleet.yaml complete reference
204
+ - [Office guide](docs/office.md) — the pixel Office view: offices, skin packs, layouts, share links
205
+ - [AgEnD in Docker](docs/docker.md) — a runbook an agent follows to set up and maintain AgEnD in Docker
202
206
  - [Security](docs/SECURITY.md) — trust model and hardening
203
207
  - [Development Setup](docs/development.md) — working on AgEnD itself
204
208
 
package/README.zh-TW.md CHANGED
@@ -130,6 +130,8 @@ agend start # 3. 啟動 fleet 🎉(quickstart 已安裝成
130
130
 
131
131
  打開 Telegram 或 Discord,傳訊息給你的 bot,就能用手機開始工作。也可以打開網頁儀表板 `http://localhost:19280/`。要登入,在這台機器上執行 `agend web --code`,或傳 `/web` 給你的 bot。
132
132
 
133
+ 或用 Docker:把 [在 Docker 中執行 AgEnD](docs/docker.zh-TW.md) 交給 agent(General,或你機器上的 Claude Code)。這是一份操作手冊,agent 會依它替你在容器裡架設 AgEnD 並持續維護。
134
+
133
135
  > **用 Discord?** `agend quickstart` 也支援 Discord,已內建,不用另外安裝。詳見 [Discord 設定說明](docs/features.zh-TW.md#discord-adapter)。
134
136
 
135
137
  ## 運作原理
@@ -199,6 +201,8 @@ graph LR
199
201
  - [功能](docs/features.zh-TW.md) — 功能詳細說明
200
202
  - [CLI 參考](docs/cli.zh-TW.md) — 所有指令與選項
201
203
  - [Configuration](docs/configuration.zh-TW.md) — fleet.yaml 完整設定參考
204
+ - [辦公室指南](docs/office.zh-TW.md) — 像素辦公室畫面:辦公室、外觀包、配置、分享連結
205
+ - [在 Docker 中執行 AgEnD](docs/docker.zh-TW.md) — 讓 agent 架設並維護 Docker 版 AgEnD 的操作手冊
202
206
  - [Security](docs/SECURITY.zh-TW.md) — 信任模型與安全強化
203
207
  - [開發環境設定](docs/development.md) — 開發 AgEnD 本身
204
208
 
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: docker-install
3
+ description: Set up AgEnD in Docker for a person, or maintain one — follow the Docker runbook step by step
4
+ roles: [general]
5
+ ---
6
+
7
+ ## AgEnD in Docker
8
+
9
+ When a person wants AgEnD in Docker (a trial, a demo, a machine without Node.js), or asks you to maintain an existing
10
+ Docker install, follow the runbook exactly. It has the Dockerfile, entrypoint, compose file, CLI installs, first
11
+ fleet.yaml, verification, updates, backups and troubleshooting:
12
+
13
+ - English: https://github.com/songsid/AgEnD/blob/main/docs/docker.md
14
+ - 繁體中文: https://github.com/songsid/AgEnD/blob/main/docs/docker.zh-TW.md
15
+
16
+ Read the raw file (`https://raw.githubusercontent.com/songsid/AgEnD/main/docs/docker.md`) before you start, and run
17
+ every check it gives.
18
+
19
+ **Rules that hold even without the runbook at hand:**
20
+ - Never run `agend update`, `agend restart`, `agend stop` or `agend install` inside the container, and never `/update`
21
+ in that fleet's chat. Update by rebuilding the image (`docker compose build --pull --no-cache && docker compose up -d`);
22
+ restart with `docker compose restart`.
23
+ - Tokens and API keys go in the compose folder's `.env`, never in fleet.yaml or a chat.
24
+ - The dashboard stays published on `127.0.0.1` unless the person asks otherwise.
25
+ - AgEnD's data, the CLIs and their logins live in the `agend-home` volume: back it up before anything destructive.
@@ -313,6 +313,9 @@ tools are not in your list), you can publish them yourself instead of asking a p
313
313
  - Every change is logged with each picture's sha256 and told to the fleet's admins. At most **20 batches and 200 MiB an
314
314
  hour**: one call is one batch (up to 16 packs), so send a whole set of fixes in one `packs: [...]`.
315
315
 
316
+ The skin-pack manifest format — every key, its ranges, a minimal example — and the limits are in the Office guide:
317
+ [docs/office.md → Make a skin pack](https://github.com/songsid/AgEnD/blob/main/docs/office.md#make-a-skin-pack). Point people there too when they ask how the Office works.
318
+
316
319
  ## Limits
317
320
 
318
321
  - At least **30 s** between changes, at most **10 changes an hour** — refused with `rate_limited` and
@@ -321,6 +321,9 @@ tools are not in your list), you can publish them yourself instead of asking a p
321
321
  - Every change is logged with each picture's sha256 and told to the fleet's admins. At most **20 batches and 200 MiB an
322
322
  hour**: one call is one batch (up to 16 packs), so send a whole set of fixes in one `packs: [...]`.
323
323
 
324
+ The skin-pack manifest format — every key, its ranges, a minimal example — and the limits are in the Office guide:
325
+ [docs/office.md → Make a skin pack](https://github.com/songsid/AgEnD/blob/main/docs/office.md#make-a-skin-pack). Point people there too when they ask how the Office works.
326
+
324
327
  ## Mods
325
328
 
326
329
  A mod is one file, `<name>-<version>.agendmod.json`, that carries a look: a theme with its pictures, card text,
@@ -253,6 +253,10 @@ Click a team header to fold it. **Find** dims everything that doesn't match. A c
253
253
  and backend; clicking it opens the chat. List mode adds the description, model, a link to the Discord thread or
254
254
  Telegram topic, and **Open chat**.
255
255
 
256
+ **The Office guide** (`docs/office.md` in the AgEnD repository; `docs/office.zh-TW.md` in Traditional Chinese) is the one page for people: setting up offices, the
257
+ skin-pack manifest format and its limits, Edit layout and seat reservations, bedtime, share links, agents' office and
258
+ pack tools, and rolling back. Point people there for more than the summary below; it marks what is not released yet.
259
+
256
260
  **Office** (the third view, remembered per device) draws the same fleet as a pixel office: a room per team, a desk
257
261
  per instance with a name tag, General and "Not in a team" in the **Lobby**. Each little person is its state: typing
258
262
  with the lamp on (working), tea break (idle), asleep behind a **Closed** sign (paused/stopped), a hand up under a
@@ -324,6 +328,10 @@ A pack may add a `foreground` (a 16:9 PNG over the whole scene, zones packs only
324
328
  and items in the air, below name tags, bubbles and "+N" — door frames, pillars, table fronts that hide whoever walks
325
329
  behind them. A furniture item's `depth` may be `"y"`: drawn among the people by base y (whoever stands lower is in
326
330
  front). Numeric depths keep their meaning (under 1000 under the people, 1000 and up over them).
331
+ An item with `activeWhen` may wait for its person (#2698): `"activeOn": "seated"` turns it active only once one of its
332
+ `activeFor` people in that state has arrived at their seat, and back as they walk off (default `"state"`: as the state
333
+ changes); `"hides": true` (needs `activeFor`) stops drawing those people while it is active (walking, they are drawn),
334
+ puts their name tags (one row at the item's tag point) and bubbles on it, and makes hovering or clicking it hit them.
327
335
  A pack may set `"straight": true` (#2634): each diagonal leg of a walk becomes an L (across, then up or down), so the
328
336
  three walking strips always fit; lay its graph out with horizontal and vertical edges and the corners land on the aisles.
329
337
 
@@ -264,6 +264,10 @@ Click a team header to fold it. **Find** dims everything that doesn't match. A c
264
264
  and backend; clicking it opens the chat. List mode adds the description, model, a link to the Discord thread or
265
265
  Telegram topic, and **Open chat**.
266
266
 
267
+ **The Office guide** (`docs/office.md` in the AgEnD repository; `docs/office.zh-TW.md` in Traditional Chinese) is the one page for people: setting up offices, the
268
+ skin-pack manifest format and its limits, Edit layout and seat reservations, bedtime, share links, agents' office and
269
+ pack tools, and rolling back. Point people there for more than the summary below; it marks what is not released yet.
270
+
267
271
  **Office** (the third view, remembered per device) draws the same fleet as a pixel office: a room per team, a desk
268
272
  per instance with a name tag, General and "Not in a team" in the **Lobby**. Each little person is its state: typing
269
273
  with the lamp on (working), tea break (idle), asleep behind a **Closed** sign (paused/stopped), a hand up under a
@@ -339,6 +343,10 @@ A pack may add a `foreground` (a 16:9 PNG over the whole scene, zones packs only
339
343
  and items in the air, below name tags, bubbles and "+N" — door frames, pillars, table fronts that hide whoever walks
340
344
  behind them. A furniture item's `depth` may be `"y"`: drawn among the people by base y (whoever stands lower is in
341
345
  front). Numeric depths keep their meaning (under 1000 under the people, 1000 and up over them).
346
+ An item with `activeWhen` may wait for its person (#2698): `"activeOn": "seated"` turns it active only once one of its
347
+ `activeFor` people in that state has arrived at their seat, and back as they walk off (default `"state"`: as the state
348
+ changes); `"hides": true` (needs `activeFor`) stops drawing those people while it is active (walking, they are drawn),
349
+ puts their name tags (one row at the item's tag point) and bubbles on it, and makes hovering or clicking it hit them.
342
350
  A pack may set `"straight": true` (#2634): each diagonal leg of a walk becomes an L (across, then up or down), so the
343
351
  three walking strips always fit; lay its graph out with horizontal and vertical edges and the corners land on the aisles.
344
352
 
@@ -6,8 +6,9 @@ export interface PackPoint { x: number; y: number }
6
6
  /** #2691: a seat reserved for `for` (lent while they are all elsewhere when `lend`); a plain seat has neither. */
7
7
  export interface PackSeat extends PackPoint { for?: string[]; lend?: boolean }
8
8
  export interface PackArea { name: string; rect: { x: number; y: number; w: number; h: number }; seats: PackSeat[] }
9
- /** `label` (#2574): its name tag, or null. */
10
- export interface PackFurniture { id: string; sprite: PackStrip; x: number; y: number; depth: number | "y"; activeWhen: string[] | null; activeSprite: PackStrip | null; label: string | null }
9
+ /** `label` (#2574): its name tag, or null. `activeOn`/`hides` (#2698): when it turns active, and whether it hides its people then. */
10
+ export interface PackFurniture { id: string; sprite: PackStrip; x: number; y: number; depth: number | "y"; activeWhen: string[] | null; activeSprite: PackStrip | null;
11
+ activeFor?: string[] | null; loop?: boolean; activeOn?: "state" | "seated"; hides?: boolean; label: string | null }
11
12
  export interface CheckedPack {
12
13
  format: 1; id: string; scale: number; background?: string; foreground?: string; matte?: string;
13
14
  areas: Record<string, PackArea>; stateZones: Record<string, string> | null; door: PackPoint;
@@ -42,7 +42,7 @@
42
42
  // always fit (graph edges laid out across and up/down put the
43
43
  // corners on the aisles); default false
44
44
  // "furniture": [ { "id": "rack", "sprite": STRIP, "x": 1020, "y": 140, "depth": 2,
45
- // "activeWhen": "crashed", "activeSprite": STRIP, "activeFor": "atlas", "loop": true, "label": "Rack",
45
+ // "activeWhen": "crashed", "activeSprite": STRIP, "activeFor": "atlas", "loop": true, "activeOn": "seated", "hides": true, "label": "Rack",
46
46
  // "night": { "sprite": STRIP, "x": 300, "y": 420 },
47
47
  // "walk": { "walk": STRIP, "walkDown": STRIP, "walkUp": STRIP, "walkSide": STRIP } } ],
48
48
  // "label" (#2574): a name tag under it, like a person's
@@ -62,7 +62,14 @@
62
62
  // strip (or `activeSprite`); otherwise it holds the first frame —
63
63
  // or, with "loop": true (#2570), plays its strip all along.
64
64
  // "activeFor" (an instance's name, or a list): only their state
65
- // counts, not anyone's (a room several people take turns in)
65
+ // counts, not anyone's (a room several people take turns in).
66
+ // "activeOn" (#2698): "state" (the default) turns it active as the
67
+ // state changes; "seated" only once one of them in that state is
68
+ // at the seat zones gave them, not walking — back as they walk off.
69
+ // "hides": true (#2698, only with activeFor): while active, the
70
+ // people it is active for are not drawn (walking, they always
71
+ // are); their name tags and bubbles are drawn on it, in one row at
72
+ // its tag point, and hovering or clicking it hits them
66
73
  // "characters": { "default": { "working": STRIP, "idle": STRIP, "paused": STRIP, "needs": STRIP, "walk": STRIP,
67
74
  // "walkDown": STRIP, "walkUp": STRIP, "walkSide": STRIP },
68
75
  // "fox": { … } }, "default" with at least "idle" is required; a missing pose is idle.
@@ -288,17 +295,22 @@ export function checkSkinPack(x, { kept = false } = {}) {
288
295
  const fids = new Set();
289
296
  const furniture = list(x.furniture ?? [], LIMIT.furniture, "furniture").map((f, i) => {
290
297
  const at = `furniture[${i}]`;
291
- obj(f, at); keys(f, ["id", "sprite", "x", "y", "depth", "activeWhen", "activeSprite", "activeFor", "loop", "label", "night", "walk"], at);
298
+ obj(f, at); keys(f, ["id", "sprite", "x", "y", "depth", "activeWhen", "activeSprite", "activeFor", "loop", "activeOn", "hides", "label", "night", "walk"], at);
292
299
  if (!nameOk(f.id) || fids.has(f.id)) throw new Refused(`${at}.id`, "a new name of letters, digits, _ or - (not an inherited one)");
293
300
  fids.add(f.id);
294
301
  if (f.activeSprite !== undefined && f.activeWhen === undefined) throw new Refused(`${at}.activeSprite`, "only with activeWhen");
295
302
  if (f.activeFor !== undefined && f.activeWhen === undefined) throw new Refused(`${at}.activeFor`, "only with activeWhen");
296
303
  if (f.loop !== undefined && typeof f.loop !== "boolean") throw new Refused(`${at}.loop`, "true or false");
304
+ if (f.activeOn !== undefined && f.activeOn !== "state" && f.activeOn !== "seated") throw new Refused(`${at}.activeOn`, '"state" or "seated"');
305
+ if (f.activeOn !== undefined && f.activeWhen === undefined) throw new Refused(`${at}.activeOn`, "only with activeWhen");
306
+ if (f.hides !== undefined && typeof f.hides !== "boolean") throw new Refused(`${at}.hides`, "true or false");
307
+ if (f.hides !== undefined && f.activeFor === undefined) throw new Refused(`${at}.hides`, "only with activeFor");
297
308
  if (f.label !== undefined && (typeof f.label !== "string" || !f.label.trim() || [...f.label].length > LIMIT.line || /[\u0000-\u001f\u007f]/.test(f.label))) throw new Refused(`${at}.label`, `1–${LIMIT.line} characters`);
298
309
  return { id: f.id, sprite: checkStrip(f.sprite, `${at}.sprite`, scale), x: num(f.x, 0, LOGICAL.w, `${at}.x`), y: num(f.y, 0, LOGICAL.h, `${at}.y`),
299
310
  depth: f.depth === "y" ? "y" : depth(f.depth ?? 0, `${at}.depth`), activeWhen: f.activeWhen === undefined ? null : states(f.activeWhen, `${at}.activeWhen`),
300
311
  activeSprite: f.activeSprite === undefined ? null : checkStrip(f.activeSprite, `${at}.activeSprite`, scale),
301
- activeFor: f.activeFor === undefined ? null : names(f.activeFor, `${at}.activeFor`), loop: f.loop === true, label: f.label === undefined ? null : f.label.trim(), night: nightOf(f.night, `${at}.night`, scale),
312
+ activeFor: f.activeFor === undefined ? null : names(f.activeFor, `${at}.activeFor`), loop: f.loop === true,
313
+ activeOn: f.activeOn === "seated" ? "seated" : "state", hides: f.hides === true, label: f.label === undefined ? null : f.label.trim(), night: nightOf(f.night, `${at}.night`, scale),
302
314
  walk: walkOf(f.walk, `${at}.walk`, scale) };
303
315
  }).sort((a, b) => order(a) - order(b));
304
316
  const sets = obj(x.characters, "characters");
@@ -437,14 +437,38 @@ export function linesFor(state, lang, pack, defaults) {
437
437
 
438
438
  // ── Furniture ──
439
439
 
440
- /** The furniture active now: an item whose `activeWhen` names a state someone shown is in. */
441
- export function activeFurniture(pack, states, byName = new Map()) {
440
+ /**
441
+ * The people an item with `activeFor` is active for now (#2570): those of them shown in an `activeWhen` state — with
442
+ * "activeOn": "seated" (#2698), only those `posture(name)` says are "seated" (at the seat zones gave them, not walking).
443
+ * `posture` null: no walkers, everyone at their seat.
444
+ */
445
+ function activeForNow(f, byName, posture) {
446
+ const seated = (n) => f.activeOn !== "seated" || !posture || posture(n) === "seated";
447
+ return (f.activeFor || [...byName.keys()]).filter((n) => byName.has(n) && f.activeWhen.includes(byName.get(n)) && seated(n));
448
+ }
449
+ /**
450
+ * The furniture active now: an item whose `activeWhen` names a state someone shown is in. With activeFor (#2570),
451
+ * only those people's states count; with "activeOn": "seated" (#2698), only once one of them is seated (`posture`,
452
+ * name → "walking" | "seated" | "standing"; null: everyone seated) — it turns back as they walk off.
453
+ */
454
+ export function activeFurniture(pack, states, byName = new Map(), posture = null) {
442
455
  const on = new Set();
443
456
  for (const f of (pack && pack.furniture) || []) {
444
457
  if (!f.activeWhen) continue;
445
- // activeFor (#2570): only those people's states count; else anyone's shown.
446
- const hit = f.activeFor ? f.activeFor.some((n) => byName.has(n) && f.activeWhen.includes(byName.get(n))) : f.activeWhen.some((s) => states.has(s));
458
+ const hit = f.activeFor || f.activeOn === "seated" ? activeForNow(f, byName, posture).length > 0 : f.activeWhen.some((s) => states.has(s));
447
459
  if (hit) on.add(f.id);
448
460
  }
449
461
  return on;
450
462
  }
463
+ /**
464
+ * #2698: who is drawn on an item instead of themselves (name → the item's id): for each `active` item with "hides",
465
+ * the people it is active for (activeFor's order) who are not walking — someone walking is always drawn. One item each.
466
+ */
467
+ export function hiddenBy(pack, active, byName = new Map(), posture = null) {
468
+ const out = new Map();
469
+ for (const f of (pack && pack.furniture) || []) {
470
+ if (!f.hides || !f.activeWhen || !active.has(f.id)) continue;
471
+ for (const n of activeForNow(f, byName, posture)) if (!out.has(n) && (!posture || posture(n) !== "walking")) out.set(n, f.id);
472
+ }
473
+ return out;
474
+ }
@@ -15,7 +15,8 @@
15
15
  // goes through the same view transform.
16
16
  // - Speech bubbles: now and then a short line for its state (typed out; at once with reduced motion) — the page's own
17
17
  // lines or the skin's, never anything an agent said. Furniture can react: an item with `activeWhen` animates while
18
- // anyone shown is in that state.
18
+ // anyone shown is in that state — or (#2698, "activeOn": "seated") once its person sits down; one that "hides" its
19
+ // people carries their name tags and bubbles while it is active, and hovering it hits them (furnitureAt).
19
20
  // - Each occupant is a little pixel person in a pose that loops a few frames: working (typing, the lamp on), idle (tea),
20
21
  // paused or stopped (asleep, a closed sign), needs you / crashed / looks stuck (a hand up, a blinking light).
21
22
  // - Traffic: each new message, delegation or report is an item carried from the sender's desk to the receiver's along
@@ -64,13 +65,13 @@ import { hits, needle } from "./fleet-canvas-layout.js";
64
65
  import { AUTO_ID, LOBBY, autoLayout, backingScale, coatOf, createFlights, customLayout, deskAt, desksOf, filterOk, lampOf, layoutOk, lightOf, membersOf,
65
66
  officePose, officeRooms, signOf, workOn } from "./fleet-office-model.js";
66
67
  import { BUILT_IN_SKINS, CHAR_DEPTH, DEFAULT_PAL, bubbleBox, loadCozySkin, loadPackSkin, modeOf, skinFor, tagBox } from "./fleet-office-skin.js";
67
- import { CALLING, activeFurniture, bubbleAt, bubbleRank, NIGHT, WANDER, createMail, createWalkers, isNight, linesFor, npcKey, personAt, placeBubbles, thinBubbles, walkTargets, zonesLayout } from "./fleet-office-zones.js";
68
+ import { CALLING, activeFurniture, bubbleAt, hiddenBy, bubbleRank, NIGHT, WANDER, createMail, createWalkers, isNight, linesFor, npcKey, personAt, placeBubbles, thinBubbles, walkTargets, zonesLayout } from "./fleet-office-zones.js";
68
69
  import { actsOk, createOfficeStore } from "./fleet-office-store.js";
69
70
  import { POLL_MS } from "./fleet-traffic.js";
70
71
  import { OfficeEditor, officeForSave } from "./fleet-office-editor.js";
71
72
  import { LayoutEditor, handlesOf } from "./fleet-office-layout.js";
72
73
  import { ShareButton } from "./office-share-dialog.js";
73
- import { applyOverrides, fitNight, fitSeatFor } from "./fleet-office-pack.js";
74
+ import { applyOverrides, fitNight, fitSeatFor, stripBox } from "./fleet-office-pack.js";
74
75
  import { ALL_ID, LOBBY_TILE, OV, createCrossFlights, cropToRooms, fromTile, inTile, labelAt, lobbyNodes, overviewOk, tileAt, tileBox, tileLayout, visibleTiles } from "./fleet-office-overview.js";
75
76
  import { centreOn, gestureState, gestures, miniPoint, toScreen, toWorld, wheelFactor, zoomKey, zoomTo } from "./fleet-canvas-view.js";
76
77
  import { OK_MAX, OK_MIN, clampPan, desksK, edgeMatte, edgeStrips, fitScene, layerScale, miniBox, miniFrame, openingView, pinchOffice, savedOf, stepK, viewFromSaved,
@@ -203,7 +204,7 @@ function officeScene(office, nodes, skin, zones, deskW, prevSeats, night = false
203
204
  return lay ? customLayout({ ...office, layout: lay }, nodes) : autoLayout([{ key: office.id, name: office.name, lobby: !!office.lobby, nodes }], { width: deskW });
204
205
  }
205
206
  /** What drawPart needs of a scene; its layers are painted on first draw (and again at another resolution). */
206
- function partOf(L, looks, skin, zones, walkers, flights) {
207
+ export function partOf(L, looks, skin, zones, walkers, flights) {
207
208
  const all = L.rooms.flatMap((r) => r.desks);
208
209
  const shown = new Set([...looks.values()].map((l) => l.state)), byName = new Map([...looks.values()].filter((l) => l.name).map((l) => [l.name, l.state]));
209
210
  return { L, looks, skin, zones, walkers, flights, all, desks: all.filter((d) => d.node), layers: null,
@@ -214,6 +215,43 @@ function partOf(L, looks, skin, zones, walkers, flights) {
214
215
  * (Edit layout, #2665: applyOverrides puts it on `night`), else the pack's night x/y, else its (moved) day place.
215
216
  */
216
217
  export const nightFurniture = (list) => list.map((f) => (f.night ? { ...f, sprite: f.night.sprite, activeSprite: null, x: f.night.x ?? f.x, y: f.night.y ?? f.y, asleep: true } : f));
218
+ /** #2698: where someone is at `t` against their seat: "walking"; "seated" (still, at the seat zones gave them — or no
219
+ * walker yet: drawn there); "standing" (still elsewhere: a stroll's spot, an act's point, the seat left before a walk). */
220
+ const postureAt = (p, t) => {
221
+ const seats = new Map(p.all.filter((d) => d.node).map((d) => [d.node.name, d.seat]));
222
+ return (name) => {
223
+ const at = p.walkers && p.walkers.at(name, t), s = seats.get(name);
224
+ if (!at) return "seated";
225
+ if (at.walking) return "walking";
226
+ return s && Math.abs(at.x - s.x) < 1 && Math.abs(at.y - s.y) < 1 ? "seated" : "standing";
227
+ };
228
+ };
229
+ /**
230
+ * The furniture active at `t` and who is drawn on an item instead of themselves (`hidden`: name → item id). A pack
231
+ * with no "activeOn": "seated" nor "hides" (#2698): the scene's `active`, as before, and nobody hidden; else worked out
232
+ * from where everyone is at `t` (their walkers). An item asleep at bedtime (a `night`) hides nobody.
233
+ */
234
+ export function furnitureAt(p, t) {
235
+ const pk = p.zones && p.skin && p.skin.pack, list = (pk && pk.furniture) || [];
236
+ if (!list.some((f) => f.activeOn === "seated" || f.hides)) return { active: p.active || new Set(), hidden: new Map() };
237
+ const looks = [...p.looks.values()], byName = new Map(looks.filter((l) => l.name).map((l) => [l.name, l.state]));
238
+ const posture = postureAt(p, t), active = activeFurniture(pk, new Set(looks.map((l) => l.state)), byName, posture);
239
+ const hidden = hiddenBy(pk, active, byName, posture);
240
+ if (p.night) for (const [n, id] of [...hidden]) if (list.some((f) => f.id === id && f.night)) hidden.delete(n);
241
+ return { active, hidden };
242
+ }
243
+ /** #2698: the box an item hiding its people is hit in — its active picture, down to its name tags' row. */
244
+ const hidingBox = (f) => {
245
+ const b = stripBox(f.activeSprite || f.sprite, f.x, f.y);
246
+ return { ...b, h: Math.max(b.h, f.y + 17 - b.y) };
247
+ };
248
+ /** #2698: name tags in one row centred on (x, y) — each { look, x } (its centre), TAG_GAP apart. */
249
+ const TAG_GAP = 4;
250
+ export function tagRow(ctx, x, y, looks) {
251
+ const ws = looks.map((l) => tagBox(ctx, x, y, l.label).w), total = ws.reduce((a, w) => a + w, 0) + TAG_GAP * Math.max(0, ws.length - 1);
252
+ let left = x - total / 2;
253
+ return looks.map((look, i) => { const cx = Math.round(left + ws[i] / 2); left += ws[i] + TAG_GAP; return { look, x: cx }; });
254
+ }
217
255
  /** #2596: each NPC with a `walk` where its walker is now (`at(key)`): moved there — its tag and depth with it — and, while
218
256
  * it walks, `walking` and its `heading` (its walk strip: walkStrip); asleep, or with no walker (not strolling), where it is. */
219
257
  export const strollFurniture = (list, at) => list.map((f) => {
@@ -309,7 +347,7 @@ function paintLayers(p, env, ls, tagsOff = false) {
309
347
  * hovered (its name tag shows even in a crowd); `tagsOff` (#2554: a tile too small to read them): the name tags show
310
348
  * only for the one hovered and the Find box's matches. Whether anything in it is moving (in the air, or someone walking).
311
349
  */
312
- function drawPart(ctx, p, a, ox, oy, ms, still, hot, env, tagsOff = false, defer = null) {
350
+ export function drawPart(ctx, p, a, ox, oy, ms, still, hot, env, tagsOff = false, defer = null) {
313
351
  const sk = p.skin;
314
352
  const ls = layerScale(a, p.L.width, p.L.height);
315
353
  if (!p.layers || p.layers.ls !== ls || p.layers.tagsOff !== tagsOff) p.layers = paintLayers(p, env, ls, tagsOff);
@@ -326,7 +364,7 @@ function drawPart(ctx, p, a, ox, oy, ms, still, hot, env, tagsOff = false, defer
326
364
  // Furniture under the people; the people (nearest last) with the furniture whose depth is "y" among them, by base
327
365
  // y (a tie: the item first, the person in front); furniture over them; things in the air; the pack's foreground
328
366
  // (door frames, pillars, table fronts); then what must stay readable: crowd counts and name tags (bubbles below).
329
- const t = ms > 0 ? ms : now();
367
+ const t = ms > 0 ? ms : now(), live = furnitureAt(p, t);
330
368
  const people = p.desks.map((d) => {
331
369
  const at = p.walkers.at(d.node.name, t) || { ...d.seat, walking: false };
332
370
  if (at.walking) walking = true;
@@ -339,12 +377,13 @@ function drawPart(ctx, p, a, ox, oy, ms, still, hot, env, tagsOff = false, defer
339
377
  // #2665: by day, each item's night place too (at night the items are there already).
340
378
  ...(p.ghosts && !p.night ? nightGhostsOf(sk.pack).map((n) => ({ y: n.y, k: 1, n })) : [])]
341
379
  .sort((x, y) => x.y - y.y || x.k - y.k);
342
- for (const f of furniture) if (f.depth !== "y" && f.depth < CHAR_DEPTH) sk.drawFurniture(ctx, f, f.asleep || p.active.has(f.id), ms, env);
380
+ for (const f of furniture) if (f.depth !== "y" && f.depth < CHAR_DEPTH) sk.drawFurniture(ctx, f, f.asleep || live.active.has(f.id), ms, env);
343
381
  for (const it of post) if (it.t === 0) sk.drawProp(ctx, it, ms, env); // a letter on the floor: under the people
344
382
  for (const { f, p: q, g, n } of band) {
345
- if (f) { sk.drawFurniture(ctx, f, f.asleep || p.active.has(f.id), ms, env); continue; }
383
+ if (f) { sk.drawFurniture(ctx, f, f.asleep || live.active.has(f.id), ms, env); continue; }
346
384
  if (n) { ctx.save(); ctx.globalAlpha = GHOST_ALPHA; sk.drawFurniture(ctx, n, true, 0, env); ctx.restore(); continue; }
347
385
  if (g) { ctx.save(); ctx.globalAlpha = GHOST_ALPHA; sk.drawCharacter(ctx, { x: g.x - 44, y: g.y - 53, w: 88, h: 53, seat: g }, g.look, 0, env); ctx.restore(); continue; }
386
+ if (live.hidden.has(q.look.name)) continue; // #2698: drawn as the item (never while walking)
348
387
  const box = { ...q.d, x: q.at.x - 44, y: q.at.y - 53, w: 88, h: 53, seat: { x: q.at.x, y: q.at.y } };
349
388
  // An agent's own pose (office_set, #2578) while its act lasts and nothing calls it; walking is walking.
350
389
  const posed = actPosed(p, q.look);
@@ -352,7 +391,7 @@ function drawPart(ctx, p, a, ox, oy, ms, still, hot, env, tagsOff = false, defer
352
391
  sk.drawCharacter(ctx, box, look, ms, env);
353
392
  if (!q.at.walking) speakers.push({ look: q.look, ...speakerAt(sk, look, q.at), area: q.d.area });
354
393
  }
355
- for (const f of furniture) if (f.depth !== "y" && f.depth >= CHAR_DEPTH) sk.drawFurniture(ctx, f, f.asleep || p.active.has(f.id), ms, env);
394
+ for (const f of furniture) if (f.depth !== "y" && f.depth >= CHAR_DEPTH) sk.drawFurniture(ctx, f, f.asleep || live.active.has(f.id), ms, env);
356
395
  for (const it of up) sk.drawProp(ctx, it, ms, env);
357
396
  for (const it of post) if (it.t > 0) sk.drawProp(ctx, it, ms, env);
358
397
  if (sk.drawForeground) sk.drawForeground(ctx, p.L, env);
@@ -360,13 +399,38 @@ function drawPart(ctx, p, a, ox, oy, ms, still, hot, env, tagsOff = false, defer
360
399
  for (const [ar, n] of p.L.crowd || []) if (p.L.areas[ar] && sk.drawCrowd) sk.drawCrowd(ctx, p.L.areas[ar], n, env);
361
400
  // In an area over capacity the name tags show on hover or focus only (#2513: a crowd's tags covered each other).
362
401
  const over = p.L.over || new Set();
402
+ const tagged = (q) => !((tagsOff || over.has(q.d.area)) && q.d.key !== hot && !q.look.match);
363
403
  for (const q of people) {
364
- if ((tagsOff || over.has(q.d.area)) && q.d.key !== hot && !q.look.match) continue;
404
+ if (live.hidden.has(q.look.name) || !tagged(q)) continue;
365
405
  sk.drawTag(ctx, q.at.x, q.at.y, q.look, env);
366
406
  tags.push(tagBox(ctx, q.at.x, q.at.y, q.look.label));
367
407
  }
368
408
  // A furniture item's own name (#2574: an NPC drawn as furniture), tagged like a person; none on a tile too small to read.
369
- if (!tagsOff) for (const f of furniture) if (f.label) { sk.drawTag(ctx, f.x, f.y, { label: f.label }, env); tags.push(tagBox(ctx, f.x, f.y, f.label)); }
409
+ // #2698: an item hiding its people carries their tags too, in one row at its tag point (its own first; each keeps
410
+ // its place in the row while another's tag is left out), and their bubbles, over its picture. The tags drawn are
411
+ // kept on the scene (`heldTags`): hitPart hits each person on theirs, past the picture's edge too (#2699 review).
412
+ const held = [];
413
+ for (const f of furniture) {
414
+ const on = people.filter((q) => live.hidden.get(q.look.name) === f.id);
415
+ if (!on.length) {
416
+ if (!tagsOff && f.label) { sk.drawTag(ctx, f.x, f.y, { label: f.label }, env); tags.push(tagBox(ctx, f.x, f.y, f.label)); }
417
+ continue;
418
+ }
419
+ const order = new Map((f.activeFor || []).map((n, i) => [n, i]));
420
+ on.sort((x, y) => (order.get(x.look.name) ?? 0) - (order.get(y.look.name) ?? 0));
421
+ const row = tagRow(ctx, f.x, f.y, [...(f.label ? [{ label: f.label }] : []), ...on.map((q) => q.look)]);
422
+ const top = f.sprite ? Math.min(f.y - 50, stripBox(f.activeSprite || f.sprite, f.x, f.y).y + 2) : f.y - 50;
423
+ for (const [i, r] of row.entries()) {
424
+ const q = f.label ? on[i - 1] : on[i];
425
+ if (q) speakers.push({ look: q.look, x: r.x + 10, y: top, area: q.d.area });
426
+ if (q ? !tagged(q) : tagsOff) continue;
427
+ sk.drawTag(ctx, r.x, f.y, r.look, env);
428
+ const box = tagBox(ctx, r.x, f.y, r.look.label);
429
+ tags.push(box);
430
+ if (q) held.push({ name: q.look.name, id: f.id, box });
431
+ }
432
+ }
433
+ p.heldTags = held;
370
434
  } else {
371
435
  for (const d of p.desks) { const look = p.looks.get(d.key); sk.drawCharacter(ctx, d, actPosed(p, look), ms, env); speakers.push({ look, x: d.x + 58, y: d.y + 12 }); }
372
436
  blit(p.layers.front);
@@ -398,10 +462,30 @@ function drawPart(ctx, p, a, ox, oy, ms, still, hot, env, tagsOff = false, defer
398
462
  * The person at (x, y) in a scene's units, as it draws them: on zones where they walk, in the box the skin draws them
399
463
  * in (an uploaded character's strip, anchor and size: #2513 review), nearest first; on desks, the desk.
400
464
  */
401
- function hitPart(p, x, y, t) {
465
+ export function hitPart(p, x, y, t) {
402
466
  if (!p.zones) return deskAt(p.L, x, y);
403
- return personAt(p.all, x, y, (d) => p.walkers.at(d.node.name, t),
404
- (d, at) => (p.skin.charBox && p.looks.get(d.key) ? p.skin.charBox(p.looks.get(d.key), at) : null));
467
+ // #2698: someone an item hides is hit on it, after everyone drawn as themselves: on their tag as drawPart last drew
468
+ // it (the row can run past the picture: a long label, long names), else on its picture and the tag row under it
469
+ // (several share its width, left to right in the row's order).
470
+ const { hidden } = furnitureAt(p, t);
471
+ const d = personAt(hidden.size ? p.all.filter((dk) => !dk.node || !hidden.has(dk.node.name)) : p.all, x, y, (dk) => p.walkers.at(dk.node.name, t),
472
+ (dk, at) => (p.skin.charBox && p.looks.get(dk.key) ? p.skin.charBox(p.looks.get(dk.key), at) : null));
473
+ if (d || !hidden.size) return d;
474
+ for (const h of [...(p.heldTags || [])].reverse()) {
475
+ const b = h.box;
476
+ if (hidden.get(h.name) !== h.id || x < b.x || x >= b.x + b.w || y < b.y || y >= b.y + b.h) continue;
477
+ return p.all.find((dk) => dk.node && dk.node.name === h.name) || null;
478
+ }
479
+ const sk = p.skin.pack, drawn = strollFurniture(p.night ? nightFurniture(sk.furniture) : sk.furniture, (k) => p.walkers.at(k, t));
480
+ for (const f of [...drawn].reverse()) {
481
+ if (!f.sprite || ![...hidden.values()].includes(f.id)) continue;
482
+ const b = hidingBox(f);
483
+ if (x < b.x || x >= b.x + b.w || y < b.y || y >= b.y + b.h) continue;
484
+ const order = new Map((f.activeFor || []).map((n, i) => [n, i]));
485
+ const on = p.all.filter((dk) => dk.node && hidden.get(dk.node.name) === f.id).sort((m, n) => (order.get(m.node.name) ?? 0) - (order.get(n.node.name) ?? 0));
486
+ return on[Math.min(on.length - 1, Math.floor(((x - b.x) / b.w) * on.length))] || null;
487
+ }
488
+ return null;
405
489
  }
406
490
 
407
491
  function People({ nodes, pinned, onChange }) {
@@ -58,6 +58,21 @@ export type OfficeWrite = {
58
58
  };
59
59
  /** A whole list of offices, as a person sends it: every rule, or a refusal naming where it broke. */
60
60
  export declare function checkOffices(raw: unknown, packOf?: OverridePack): OfficeCheck;
61
+ /** The overrides parts kept beside the offices on disk, apart from the rest (#2665 night places, #2691 seat reservations). */
62
+ declare const BESIDE: readonly ["furnitureNight", "seatFor"];
63
+ type Beside = (typeof BESIDE)[number];
64
+ type OnDisk = {
65
+ offices: Office[];
66
+ overrides?: Record<string, LayoutOverrides>;
67
+ } & {
68
+ [K in Beside]?: Record<string, NonNullable<LayoutOverrides[K]>>;
69
+ };
70
+ /**
71
+ * #2665/#2706: what goes on disk — the offices without their overrides; beside them, by office id, each office's
72
+ * overrides without those parts, and each part on its own (none: no key). The maps have no prototype (#2708 review), so
73
+ * an id is always an own key; exported for tests.
74
+ */
75
+ export declare function officesOnDisk(offices: Office[]): OnDisk;
61
76
  export declare class OfficeStore {
62
77
  private readonly packOf?;
63
78
  private state;
@@ -111,3 +126,4 @@ export declare class OfficeWriteLimiter {
111
126
  /** Count an accepted save. */
112
127
  record(person: string): void;
113
128
  }
129
+ export {};
@@ -32,6 +32,17 @@
32
32
  * { version: 1, rev, offices: [ … ], furnitureNight: { … }, seatFor: { "<office id>": { "<area>": { "<slot>": { for, lend } } } } }
33
33
  *
34
34
  * — each read back on its own: reservations that no longer check leave the night places (and the office) in.
35
+ *
36
+ * #2706: the rest of an office's overrides are kept beside it too, by office id, never in its entry — 2.3.1 refuses an
37
+ * entry with an `overrides` key, drops that office on read, and its next save deletes it. So 2.3.1 (and a host before
38
+ * #2513) keeps every office, only without its layout —
39
+ *
40
+ * { version: 1, rev, offices: [ { id, name, skin, members } … ], overrides: { "<office id>": { pack, seats, … } }, furnitureNight: { … }, seatFor: { … } }
41
+ *
42
+ * — and a 2.3.2 beta before #2706 reads every office the same way (it looks for overrides in the entry only). Read
43
+ * here, an office's overrides come from beside it, else (a file a beta before #2706 wrote) from its entry, and the next
44
+ * write moves them beside it. Overrides that do not check leave the office in, without them (and so without its night
45
+ * places and reservations, which go on them).
35
46
  */
36
47
  import { readFileSync } from "node:fs";
37
48
  import { join } from "node:path";
@@ -44,6 +55,8 @@ export const OFFICE_LIMITS = {
44
55
  /** The page's own office (fleet-office-model.js AUTO_ID): never a stored one's id. */
45
56
  export const AUTO_OFFICE_ID = "auto";
46
57
  const ID = /^[A-Za-z0-9_-]{1,40}$/;
58
+ /** #2708 review: ids an object already has a meaning for — never an office's (its overrides are kept in maps by office id). */
59
+ const INHERITED_IDS = new Set(["__proto__", "constructor", "prototype"]);
47
60
  const POINT_ID = /^[A-Za-z0-9_.:-]{1,64}$/;
48
61
  const CONTROL = /[\u0000-\u001f\u007f]/;
49
62
  class Refused extends Error {
@@ -145,6 +158,8 @@ function office(v, at, packOf) {
145
158
  throw new Refused(`${at}.id`, "1–40 letters, digits, _ or -");
146
159
  if (v.id === AUTO_OFFICE_ID)
147
160
  throw new Refused(`${at}.id`, `"${AUTO_OFFICE_ID}" is the page's own office`);
161
+ if (INHERITED_IDS.has(v.id))
162
+ throw new Refused(`${at}.id`, "not __proto__, constructor or prototype");
148
163
  const skin = v.skin === undefined ? "pixel" : typeof v.skin === "string" && ID.test(v.skin) ? v.skin : null;
149
164
  if (skin === null)
150
165
  throw new Refused(`${at}.skin`, "1–40 letters, digits, _ or -");
@@ -175,28 +190,34 @@ export function checkOffices(raw, packOf) {
175
190
  throw err;
176
191
  }
177
192
  }
178
- /** The overrides kept beside the offices on disk, never inside them (#2665 night places, #2691 seat reservations). */
193
+ /** The overrides parts kept beside the offices on disk, apart from the rest (#2665 night places, #2691 seat reservations). */
179
194
  const BESIDE = ["furnitureNight", "seatFor"];
180
- /** #2665: what goes on disk — the offices without those overrides, and each beside them by office id (none: no key). */
181
- function onDisk(offices) {
195
+ /**
196
+ * #2665/#2706: what goes on disk — the offices without their overrides; beside them, by office id, each office's
197
+ * overrides without those parts, and each part on its own (none: no key). The maps have no prototype (#2708 review), so
198
+ * an id is always an own key; exported for tests.
199
+ */
200
+ export function officesOnDisk(offices) {
182
201
  const out = { offices: [] };
183
202
  out.offices = offices.map(o => {
184
- if (!o.overrides || !BESIDE.some(k => o.overrides[k] !== undefined))
203
+ if (!o.overrides)
185
204
  return o;
186
- const rest = { ...o.overrides };
205
+ const { overrides, ...entry } = o, rest = { ...overrides };
187
206
  for (const k of BESIDE) {
188
207
  if (rest[k] === undefined)
189
208
  continue;
190
- (out[k] ??= {})[o.id] = rest[k];
209
+ (out[k] ??= Object.create(null))[o.id] = rest[k];
191
210
  delete rest[k];
192
211
  }
193
- return { ...o, overrides: rest };
212
+ (out.overrides ??= Object.create(null))[o.id] = rest;
213
+ return entry;
194
214
  });
195
215
  return out;
196
216
  }
217
+ const own = (side, id) => isObj(side) && Object.prototype.hasOwnProperty.call(side, id);
197
218
  /** #2665: a stored office with its `key` overrides (kept beside it on disk, in `side`) back on its overrides. */
198
219
  function withBeside(raw, key, side) {
199
- if (!isObj(raw) || !isObj(side) || typeof raw.id !== "string" || !Object.prototype.hasOwnProperty.call(side, raw.id) || !isObj(raw.overrides))
220
+ if (!isObj(raw) || typeof raw.id !== "string" || !own(side, raw.id) || !isObj(raw.overrides))
200
221
  return raw;
201
222
  return { ...raw, overrides: { ...raw.overrides, [key]: side[raw.id] } };
202
223
  }
@@ -236,8 +257,21 @@ export class OfficeStore {
236
257
  }
237
258
  };
238
259
  for (const raw of doc.offices.slice(0, OFFICE_LIMITS.offices)) {
260
+ // #2706: the office first, without overrides; then its overrides (beside it, else in its entry: a beta before
261
+ // #2706 wrote them there), left out when they do not check, the office kept.
262
+ if (!isObj(raw))
263
+ continue;
264
+ const { overrides: inEntry, ...entry } = raw;
265
+ let cur = entry, o = read(entry);
266
+ const ov = typeof raw.id === "string" && own(doc.overrides, raw.id) ? doc.overrides[raw.id] : inEntry;
267
+ if (o && ov !== undefined) {
268
+ const next = { ...entry, overrides: ov }, r = read(next);
269
+ if (r) {
270
+ cur = next;
271
+ o = r;
272
+ }
273
+ }
239
274
  // Each kept beside put back in turn: one that does not check is left out, the office and the rest kept.
240
- let cur = raw, o = read(raw);
241
275
  for (const k of BESIDE) {
242
276
  const next = o ? withBeside(cur, k, doc[k]) : cur;
243
277
  if (next === cur)
@@ -282,7 +316,7 @@ export class OfficeStore {
282
316
  return checked;
283
317
  const rev = s.rev + 1;
284
318
  try {
285
- atomicWriteFileSync(this.path, JSON.stringify({ version: 1, rev, ...onDisk(checked.offices) }, null, 2) + "\n", { mode: 0o600 });
319
+ atomicWriteFileSync(this.path, JSON.stringify({ version: 1, rev, ...officesOnDisk(checked.offices) }, null, 2) + "\n", { mode: 0o600 });
286
320
  }
287
321
  catch (err) {
288
322
  return { ok: false, status: 503, error: "offices_write_failed", detail: err.message };
@@ -1 +1 @@
1
- {"version":3,"file":"web-office-store.js","sourceRoot":"","sources":["../src/web-office-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAA0C,MAAM,2BAA2B,CAAC;AAEzH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI;IACnE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,GAAG,GAAG,IAAI;CAC/D,CAAC;AACX,sFAAsF;AACtF,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC;AAYrC,MAAM,EAAE,GAAG,uBAAuB,CAAC;AACnC,MAAM,QAAQ,GAAG,yBAAyB,CAAC;AAC3C,MAAM,OAAO,GAAG,uBAAuB,CAAC;AAExC,MAAM,OAAQ,SAAQ,KAAK;IAAwB,EAAE;IAAmB,GAAG;IAA7C,YAAqB,EAAU,EAAW,GAAW;QAAI,KAAK,CAAC,GAAG,EAAE,KAAK,GAAG,EAAE,CAAC,CAAC;kBAA3D,EAAE;mBAAmB,GAAG;IAAoC,CAAC;CAAE;AAClH,MAAM,KAAK,GA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AAE,IAAI,CAAC,CAAC;;YAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC9E,OAAO,IAAI,CAAC;IACd,CAAC;IACD,iHAAiH;IACjH,KAAK,CAAC,MAAc;QAClB,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,EAAE,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QACxD,OAAO,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC,CAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC;IACrK,CAAC;IACD,8BAA8B;IAC9B,MAAM,CAAC,MAAc,IAAU,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;CACrH"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@songsid/agend",
3
- "version": "2.3.2-beta.11",
3
+ "version": "2.3.2-beta.12",
4
4
  "description": "Multi-agent fleet daemon — run coding CLIs (Claude, Muse, Codex, OpenCode) from Discord or Telegram",
5
5
  "type": "module",
6
6
  "bin": {
@@ -4,26 +4,27 @@
4
4
 
5
5
  $WSL_COMMAND_FN = @'
6
6
  function Invoke-BoundedWsl {
7
- param([string[]]$Arguments, [int]$TimeoutSeconds = 30)
8
- $sep = [array]::IndexOf($Arguments, '--')
7
+ param([string[]]$Arguments, [int]$TimeoutSeconds=30)
8
+ $sep=[array]::IndexOf($Arguments, '--')
9
9
  if ($sep -ge 0 -and $Arguments.Length -gt ($sep + 1) -and $Arguments[$sep + 1] -eq 'bash') {
10
- $Arguments = @($Arguments[0..$sep]) + @('timeout', '--signal=TERM', '--kill-after=2s', [string]([Math]::Max(1, $TimeoutSeconds - 5))) + @($Arguments[($sep + 1)..($Arguments.Length - 1)])
11
- }
12
- $p = New-Object Diagnostics.Process
13
- $p.StartInfo.FileName = 'wsl.exe'
14
- $p.StartInfo.Arguments = (@($Arguments | ForEach-Object { if ($_ -match '[\s"]') { '"' + ($_ -replace '"', '\"') + '"' } else { $_ } }) -join ' ')
15
- $p.StartInfo.UseShellExecute = $false; $p.StartInfo.CreateNoWindow = $true
16
- $p.StartInfo.StandardOutputEncoding = [Text.Encoding]::UTF8; $p.StartInfo.StandardErrorEncoding = [Text.Encoding]::UTF8
17
- $p.StartInfo.RedirectStandardOutput = $true; $p.StartInfo.RedirectStandardError = $true; $p.StartInfo.RedirectStandardInput = $true
10
+ $Arguments=@($Arguments[0..$sep]) + @('timeout', '--signal=TERM', '--kill-after=2s', [string]([Math]::Max(1, $TimeoutSeconds - 5))) + @($Arguments[($sep + 1)..($Arguments.Length - 1)])
11
+ }
12
+ $p=New-Object Diagnostics.Process
13
+ $p.StartInfo.FileName='wsl.exe'
14
+ $p.StartInfo.Arguments=(@($Arguments | ForEach-Object { if ($_ -match '[\s"]') { '"' + ($_ -replace '"', '\"') + '"' } else { $_ } }) -join ' ')
15
+ $p.StartInfo.UseShellExecute=$false;$p.StartInfo.CreateNoWindow=$true
16
+ $p.StartInfo.EnvironmentVariables['WSL_UTF8']='1'
17
+ $p.StartInfo.StandardOutputEncoding=[Text.Encoding]::UTF8;$p.StartInfo.StandardErrorEncoding=[Text.Encoding]::UTF8
18
+ $p.StartInfo.RedirectStandardOutput=$true;$p.StartInfo.RedirectStandardError=$true;$p.StartInfo.RedirectStandardInput=$true
18
19
  try {
19
- $null = $p.Start(); $p.StandardInput.Close()
20
- $out = $p.StandardOutput.ReadToEndAsync(); $err = $p.StandardError.ReadToEndAsync()
20
+ $null=$p.Start();$p.StandardInput.Close()
21
+ $out=$p.StandardOutput.ReadToEndAsync();$err=$p.StandardError.ReadToEndAsync()
21
22
  if (-not $p.WaitForExit($TimeoutSeconds * 1000)) {
22
- $p.Kill(); $null = $p.WaitForExit(10000)
23
- return @{Code=124;Text='WSL timed out; check it before retrying.'}
23
+ $p.Kill();$null=$p.WaitForExit(10000)
24
+ return @{Code=124;Text='WSL timed out;check it before retrying.'}
24
25
  }
25
26
  if (-not $out.Wait(1000) -or -not $err.Wait(1000)) { return @{Code=1;Text='WSL output did not close.'} }
26
- $text = $out.Result + $err.Result
27
+ $text=$out.Result + $err.Result
27
28
  if ($text.Length -gt 1MB) { return @{Code=1;Text='WSL output exceeded its limit.'} }
28
29
  return @{Code=$p.ExitCode;Text=$text}
29
30
  } catch { return @{Code=-1;Text=[string]$_} }