@songsid/agend 2.3.2-beta.14 → 2.3.2-beta.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. package/dist/backend/codex-session-lookup.d.ts +15 -0
  2. package/dist/backend/codex-session-lookup.js +58 -0
  3. package/dist/backend/codex-session-lookup.js.map +1 -1
  4. package/dist/backend/codex.js +15 -4
  5. package/dist/backend/codex.js.map +1 -1
  6. package/dist/backend/kiro-classic-archive.d.ts +5 -0
  7. package/dist/backend/kiro-classic-archive.js +132 -7
  8. package/dist/backend/kiro-classic-archive.js.map +1 -1
  9. package/dist/backend/kiro-identity.d.ts +2 -0
  10. package/dist/backend/kiro-identity.js +4 -0
  11. package/dist/backend/kiro-identity.js.map +1 -1
  12. package/dist/backend/kiro-reconcile-store.d.ts +27 -0
  13. package/dist/backend/kiro-reconcile-store.js +344 -0
  14. package/dist/backend/kiro-reconcile-store.js.map +1 -0
  15. package/dist/backend/kiro-v2-store-worker.js +12 -3
  16. package/dist/backend/kiro-v2-store-worker.js.map +1 -1
  17. package/dist/backend/kiro-v2-store.d.ts +11 -0
  18. package/dist/backend/kiro-v2-store.js.map +1 -1
  19. package/dist/cache-service.d.ts +13 -1
  20. package/dist/cache-service.js +45 -2
  21. package/dist/cache-service.js.map +1 -1
  22. package/dist/channel/mcp-tools.js +5 -3
  23. package/dist/channel/mcp-tools.js.map +1 -1
  24. package/dist/cli.js +17 -4
  25. package/dist/cli.js.map +1 -1
  26. package/dist/config-validator.js +4 -1
  27. package/dist/config-validator.js.map +1 -1
  28. package/dist/fleet-manager.d.ts +23 -1
  29. package/dist/fleet-manager.js +127 -9
  30. package/dist/fleet-manager.js.map +1 -1
  31. package/dist/general-instance.d.ts +24 -0
  32. package/dist/general-instance.js +53 -0
  33. package/dist/general-instance.js.map +1 -1
  34. package/dist/general-knowledge/skills/web-appearance/SKILL.canvas-worker-off.md +2 -0
  35. package/dist/general-knowledge/skills/web-appearance/SKILL.md +2 -0
  36. package/dist/general-knowledge/skills/web-dashboard/SKILL.canvas-worker-off.md +16 -9
  37. package/dist/general-knowledge/skills/web-dashboard/SKILL.md +16 -9
  38. package/dist/instance-config-impact.js +1 -0
  39. package/dist/instance-config-impact.js.map +1 -1
  40. package/dist/kiro-reconcile.d.ts +21 -0
  41. package/dist/kiro-reconcile.js +80 -0
  42. package/dist/kiro-reconcile.js.map +1 -0
  43. package/dist/kiro-tui-forensic.d.ts +7 -0
  44. package/dist/kiro-tui-forensic.js +17 -3
  45. package/dist/kiro-tui-forensic.js.map +1 -1
  46. package/dist/locale.js +20 -0
  47. package/dist/locale.js.map +1 -1
  48. package/dist/log-service.js +1 -1
  49. package/dist/log-service.js.map +1 -1
  50. package/dist/office-levels.d.ts +64 -0
  51. package/dist/office-levels.js +66 -0
  52. package/dist/office-levels.js.map +1 -0
  53. package/dist/office-share-page.d.ts +3 -1
  54. package/dist/office-share-page.js +8 -3
  55. package/dist/office-share-page.js.map +1 -1
  56. package/dist/office-share-service.d.ts +4 -3
  57. package/dist/office-share-service.js +6 -6
  58. package/dist/office-share-service.js.map +1 -1
  59. package/dist/office-share.d.ts +35 -8
  60. package/dist/office-share.js +50 -15
  61. package/dist/office-share.js.map +1 -1
  62. package/dist/outbound-handlers.js +20 -1
  63. package/dist/outbound-handlers.js.map +1 -1
  64. package/dist/outbound-schemas.d.ts +6 -0
  65. package/dist/outbound-schemas.js +6 -0
  66. package/dist/outbound-schemas.js.map +1 -1
  67. package/dist/public-web-gateway.js +1 -1
  68. package/dist/public-web-gateway.js.map +1 -1
  69. package/dist/quickstart-api.d.ts +25 -1
  70. package/dist/quickstart-api.js +53 -6
  71. package/dist/quickstart-api.js.map +1 -1
  72. package/dist/scheduler/task-board.d.ts +28 -6
  73. package/dist/scheduler/task-board.js +66 -11
  74. package/dist/scheduler/task-board.js.map +1 -1
  75. package/dist/service-installer.d.ts +13 -0
  76. package/dist/service-installer.js +15 -0
  77. package/dist/service-installer.js.map +1 -1
  78. package/dist/service-owner.d.ts +25 -0
  79. package/dist/service-owner.js +43 -2
  80. package/dist/service-owner.js.map +1 -1
  81. package/dist/settings-api.js +4 -0
  82. package/dist/settings-api.js.map +1 -1
  83. package/dist/settings-change.js +2 -0
  84. package/dist/settings-change.js.map +1 -1
  85. package/dist/settings-effect.js +2 -0
  86. package/dist/settings-effect.js.map +1 -1
  87. package/dist/setup-form.js +17 -3
  88. package/dist/setup-form.js.map +1 -1
  89. package/dist/setup-i18n.js +2 -0
  90. package/dist/setup-i18n.js.map +1 -1
  91. package/dist/task-board-waker.js +7 -2
  92. package/dist/task-board-waker.js.map +1 -1
  93. package/dist/tool-permissions.js +1 -0
  94. package/dist/tool-permissions.js.map +1 -1
  95. package/dist/types.d.ts +5 -0
  96. package/dist/ui/fleet-office-card.js +114 -0
  97. package/dist/ui/fleet-office-editor.js +27 -7
  98. package/dist/ui/fleet-office-layout.js +14 -6
  99. package/dist/ui/fleet-office-levels.js +105 -0
  100. package/dist/ui/fleet-office-model.js +9 -1
  101. package/dist/ui/fleet-office-pack.d.ts +6 -0
  102. package/dist/ui/fleet-office-pack.js +62 -6
  103. package/dist/ui/fleet-office-skin.js +39 -3
  104. package/dist/ui/fleet-office-store.js +31 -3
  105. package/dist/ui/fleet-office-view.js +8 -0
  106. package/dist/ui/fleet-office-zones.js +10 -2
  107. package/dist/ui/fleet-office.js +208 -30
  108. package/dist/ui/fleet-org.js +2 -0
  109. package/dist/ui/fleet-task-card.js +2 -2
  110. package/dist/ui/fleet-task-common.js +30 -7
  111. package/dist/ui/fleet-task-work.js +2 -2
  112. package/dist/ui/fleet-tasks.js +10 -11
  113. package/dist/ui/office-share-dialog.js +31 -7
  114. package/dist/ui/office-share-page.js +1 -0
  115. package/dist/ui/panel-log.js +2 -2
  116. package/dist/ui/panel-settings.js +7 -1
  117. package/dist/ui/settings-registry.js +1 -0
  118. package/dist/ui/settings-strings.js +4 -0
  119. package/dist/ui/settings-wizard.js +15 -4
  120. package/dist/ui/shared/app.css +50 -0
  121. package/dist/ui/shared/setup-host-text.js +2 -0
  122. package/dist/usage-rollup.d.ts +34 -3
  123. package/dist/usage-rollup.js +56 -3
  124. package/dist/usage-rollup.js.map +1 -1
  125. package/dist/web-api.d.ts +5 -0
  126. package/dist/web-api.js +116 -14
  127. package/dist/web-api.js.map +1 -1
  128. package/dist/web-auth.js +1 -1
  129. package/dist/web-auth.js.map +1 -1
  130. package/dist/web-office-acts.d.ts +5 -2
  131. package/dist/web-office-acts.js +7 -2
  132. package/dist/web-office-acts.js.map +1 -1
  133. package/dist/web-office-pack-tools.d.ts +10 -1
  134. package/dist/web-office-pack-tools.js +36 -5
  135. package/dist/web-office-pack-tools.js.map +1 -1
  136. package/dist/web-office-skins.js +6 -0
  137. package/dist/web-office-skins.js.map +1 -1
  138. package/dist/web-office-store.d.ts +28 -4
  139. package/dist/web-office-store.js +49 -8
  140. package/dist/web-office-store.js.map +1 -1
  141. package/dist/web-settings-patch.d.ts +3 -1
  142. package/dist/web-settings-patch.js +4 -1
  143. package/dist/web-settings-patch.js.map +1 -1
  144. package/dist/workflow-templates/default.md +1 -1
  145. package/package.json +1 -1
@@ -7,3 +7,27 @@ export declare const GENERAL_PAUSE_ERROR = "General cannot be paused";
7
7
  * general_topic covers renamed and per-world General instances.
8
8
  */
9
9
  export declare function isGeneralInstance(config: FleetConfig | null | undefined, name: string): boolean;
10
+ /** M-2069: the name a fleet's General has by default (the auto-created one, and the setup's first agent). */
11
+ export declare const GENERAL_NAME = "general";
12
+ /**
13
+ * M-2069: the topic a General on this connection is bound to: the chat's own General — Telegram's built-in General
14
+ * topic (thread 1), the Discord connection's general channel — never a new forum topic. Null for a Discord connection
15
+ * without a valid general channel: a new General is then left unbound, as the fleet's own General is (autoCreateTopics),
16
+ * and an adopted one keeps the topic it has.
17
+ */
18
+ export declare function generalTopicFor(channel: Record<string, unknown>): number | string | null;
19
+ /**
20
+ * M-2069: an agent named "general" is the General to its daemon, its tool profile and the pause guard, but the fleet
21
+ * picks its dispatcher by general_topic. In a chat fleet with no General, the auto-General would be skipped (its name
22
+ * is taken) and the fleet would run with no dispatcher. So that agent is made the General — on the primary connection,
23
+ * in the chat's own General topic where it has one (Telegram's thread 1; Discord's general channel — without one, it
24
+ * keeps the topic it has). On Telegram a stray forum topic it was given is left behind, unrouted. Left alone: a
25
+ * "general" bound to another connection, a fleet that already has a General, and (#2744 review) a "general" working in
26
+ * a folder AgEnD does not own (`ownFolder`) — the General's instructions would land in a project of the user's; the
27
+ * fleet then adds its General under a free name (Phase 3). Returns whether the config changed.
28
+ */
29
+ export declare function adoptGeneralByName(fleet: FleetConfig, logger: {
30
+ warn(obj: unknown, msg?: string): void;
31
+ }, ownFolder: (dir: string) => boolean): boolean;
32
+ /** M-2069: the first free name for a General the fleet creates: `base`, else `base-2`, `base-3`, … */
33
+ export declare function freeGeneralName(instances: Record<string, unknown>, base: string): string;
@@ -1,3 +1,4 @@
1
+ import { discordGeneralChannelId } from "./discord-general.js";
1
2
  /** Stable user-facing error shared by every manual pause entry point. */
2
3
  export const GENERAL_PAUSE_ERROR = "General cannot be paused";
3
4
  /**
@@ -8,4 +9,56 @@ export const GENERAL_PAUSE_ERROR = "General cannot be paused";
8
9
  export function isGeneralInstance(config, name) {
9
10
  return name === "general" || config?.instances[name]?.general_topic === true;
10
11
  }
12
+ /** M-2069: the name a fleet's General has by default (the auto-created one, and the setup's first agent). */
13
+ export const GENERAL_NAME = "general";
14
+ /**
15
+ * M-2069: the topic a General on this connection is bound to: the chat's own General — Telegram's built-in General
16
+ * topic (thread 1), the Discord connection's general channel — never a new forum topic. Null for a Discord connection
17
+ * without a valid general channel: a new General is then left unbound, as the fleet's own General is (autoCreateTopics),
18
+ * and an adopted one keeps the topic it has.
19
+ */
20
+ export function generalTopicFor(channel) {
21
+ if (channel.type === "telegram")
22
+ return 1;
23
+ if (channel.type !== "discord")
24
+ return null;
25
+ const general = discordGeneralChannelId(channel);
26
+ return general != null && /^\d{17,}$/.test(general) ? general : null;
27
+ }
28
+ /**
29
+ * M-2069: an agent named "general" is the General to its daemon, its tool profile and the pause guard, but the fleet
30
+ * picks its dispatcher by general_topic. In a chat fleet with no General, the auto-General would be skipped (its name
31
+ * is taken) and the fleet would run with no dispatcher. So that agent is made the General — on the primary connection,
32
+ * in the chat's own General topic where it has one (Telegram's thread 1; Discord's general channel — without one, it
33
+ * keeps the topic it has). On Telegram a stray forum topic it was given is left behind, unrouted. Left alone: a
34
+ * "general" bound to another connection, a fleet that already has a General, and (#2744 review) a "general" working in
35
+ * a folder AgEnD does not own (`ownFolder`) — the General's instructions would land in a project of the user's; the
36
+ * fleet then adds its General under a free name (Phase 3). Returns whether the config changed.
37
+ */
38
+ export function adoptGeneralByName(fleet, logger, ownFolder) {
39
+ const channels = (fleet.channels ?? (fleet.channel ? [fleet.channel] : []));
40
+ if (!channels.length || !Object.hasOwn(fleet.instances, GENERAL_NAME))
41
+ return false;
42
+ const inst = fleet.instances[GENERAL_NAME];
43
+ if (inst.general_topic === true || Object.values(fleet.instances).some(cfg => cfg.general_topic === true))
44
+ return false;
45
+ const primary = channels[0], primaryId = String(primary.id ?? primary.type);
46
+ if (inst.channel_id != null && inst.channel_id !== primaryId)
47
+ return false;
48
+ if (!ownFolder(inst.working_directory))
49
+ return false;
50
+ const topic = generalTopicFor(primary), from = inst.topic_id ?? null;
51
+ inst.general_topic = true;
52
+ if (topic != null)
53
+ inst.topic_id = topic;
54
+ logger.warn({ name: GENERAL_NAME, topic_from: from, topic_to: inst.topic_id ?? null }, "An agent named general had no general_topic and the fleet had no General — made it the General (its chat's General topic)");
55
+ return true;
56
+ }
57
+ /** M-2069: the first free name for a General the fleet creates: `base`, else `base-2`, `base-3`, … */
58
+ export function freeGeneralName(instances, base) {
59
+ let name = base;
60
+ for (let n = 2; Object.hasOwn(instances, name); n++)
61
+ name = `${base}-${n}`;
62
+ return name;
63
+ }
11
64
  //# sourceMappingURL=general-instance.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"general-instance.js","sourceRoot":"","sources":["../src/general-instance.ts"],"names":[],"mappings":"AAEA,yEAAyE;AACzE,MAAM,CAAC,MAAM,mBAAmB,GAAG,0BAA0B,CAAC;AAE9D;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAsC,EAAE,IAAY;IACpF,OAAO,IAAI,KAAK,SAAS,IAAI,MAAM,EAAE,SAAS,CAAC,IAAI,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;AAC/E,CAAC"}
1
+ {"version":3,"file":"general-instance.js","sourceRoot":"","sources":["../src/general-instance.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,yEAAyE;AACzE,MAAM,CAAC,MAAM,mBAAmB,GAAG,0BAA0B,CAAC;AAE9D;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAsC,EAAE,IAAY;IACpF,OAAO,IAAI,KAAK,SAAS,IAAI,MAAM,EAAE,SAAS,CAAC,IAAI,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;AAC/E,CAAC;AAED,6GAA6G;AAC7G,MAAM,CAAC,MAAM,YAAY,GAAG,SAAS,CAAC;AAEtC;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,OAAgC;IAC9D,IAAI,OAAO,CAAC,IAAI,KAAK,UAAU;QAAE,OAAO,CAAC,CAAC;IAC1C,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IAC5C,MAAM,OAAO,GAAG,uBAAuB,CAAC,OAAO,CAAC,CAAC;IACjD,OAAO,OAAO,IAAI,IAAI,IAAI,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;AACvE,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAkB,EAAE,MAAkD,EAAE,SAAmC;IAC5I,MAAM,QAAQ,GAAG,C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,CAAC,CAAC;IAC/H,OAAO,IAAI,CAAC;AACd,CAAC;AAED,sGAAsG;AACtG,MAAM,UAAU,eAAe,CAAC,SAAkC,EAAE,IAAY;IAC9E,IAAI,IAAI,GAAG,IAAI,CAAC;IAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,EAAE,CAAC,EAAE;QAAE,IAAI,GAAG,GAAG,IAAI,IAAI,CAAC,EAAE,CAAC;IAC3E,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -312,6 +312,8 @@ tools are not in your list), you can publish them yourself instead of asking a p
312
312
  built-in style (pixel, studio, cozy).
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
+ - `office_pack_check` has its own allowance: at most **60 checks and 1 GiB (as sent) an hour**. Every check counts,
316
+ passed or refused, so fix what a refusal names before checking again. `office_pack_list` shows `check_left`.
315
317
 
316
318
  The skin-pack manifest format — every key, its ranges, a minimal example — and the limits are in the Office guide:
317
319
  [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.
@@ -320,6 +320,8 @@ tools are not in your list), you can publish them yourself instead of asking a p
320
320
  built-in style (pixel, studio, cozy).
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
+ - `office_pack_check` has its own allowance: at most **60 checks and 1 GiB (as sent) an hour**. Every check counts,
324
+ passed or refused, so fix what a refusal names before checking again. `office_pack_list` shows `check_left`.
323
325
 
324
326
  The skin-pack manifest format — every key, its ranges, a minimal example — and the limits are in the Office guide:
325
327
  [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.
@@ -229,8 +229,9 @@ values reloaded after Save. Password fields keep the browser's behaviour.
229
229
  The sidebar's **Fleet** (zh "Fleet 概覽", at the top) and the phone's Fleet tab open the Fleet tab this device used last
230
230
  (`agend_last_fleet_tab`; the Org chart the first time). The sidebar has no separate Fleet (Details) or View row.
231
231
  - **Tasks** — the task board: Home lists **projects** (with % done) and what waits for the person (**Confirm** /
232
- **Send back** finished work, **Answer** a blocked card); **No project** holds `task`-tool tasks. A project is a board
233
- of main tasks (M-n) by status — To do, In progress, Blocked, Waiting for you, Done — with drag to move, an assignee
232
+ **Send back** finished work, **Answer** a blocked card — #2756: only the cards the person handed out, as Needs you;
233
+ an agent's card in review says "Waiting for <agent>"); **No project** holds `task`-tool tasks. A project is a board
234
+ of main tasks (M-n) by status — To do, In progress, Blocked, To confirm, Done — with drag to move, an assignee
234
235
  filter and each main task's sub tasks (S-n). A card opens in a dialog: every field editable, its sub tasks, comments,
235
236
  progress log, history. **Search cards** in the header. Only a signed-in person confirms the work they handed out
236
237
  (an instance's `done` on such a card is review); a card an agent handed out, that agent confirms (#2434). No
@@ -262,11 +263,15 @@ per instance with a name tag, General and "Not in a team" in the **Lobby**. Each
262
263
  with the lamp on (working), tea break (idle), asleep behind a **Closed** sign (paused/stopped), a hand up under a
263
264
  blinking light (needs you, crashed, looks stuck). With **Live** on, each message, delegation and report is carried
264
265
  desk to desk along the corridors in the Key's colours; a delegation in progress is a purple folder on the worker's
265
- desk. Hover (or tap once) a desk for its name, state and backend; click (or tap again) opens the chat. **Find** dims
266
+ desk. Hover a desk for its name, state and backend; a click or tap (or Enter in the desk list) opens the
267
+ person's profile card (#2661: a 320 px popover beside them, following them; Esc, a press elsewhere or the same person
268
+ again closes it; on a phone a bottom sheet): level and XP, office and area, model, backend, today, first seen, the
269
+ activity line, **Find in office** and **Chat**. A double-click opens the chat directly. Each name tag has a level badge
270
+ (lifetime work, docs/office.md § Levels; **Settings → Web dashboard → Office levels**, `web.office_levels`). **Find** dims
266
271
  the rest. **Show** picks a team or the Lobby and **People** pins chosen instances (both kept per browser); the
267
272
  **Office** switcher lists offices kept on the host (`web-offices.json`, `GET`/`PUT /ui/offices`). An admin session
268
273
  (never a read-only one, a guest or the public link) gets **Edit offices**: add, rename and delete offices, pick who is
269
- in each (whole teams or single instances; none = everyone) and its style, and upload or delete **skin packs** (an
274
+ in each (Everyone, Picked: whole teams or single instances, or #2752 Nobody: its style's NPCs only; none picked = everyone) and its style, and upload or delete **skin packs** (an
270
275
  artist's pictures: `manifest.json` plus PNGs, format v1, kept in `web-office-skins/` in the AgEnD home; the host
271
276
  checks every rule — PNG only, each strip exactly frames·w × h, a 16:9 background, size caps — and never changes a
272
277
  pack; a strip may give its displayed size, `dw`/`dh`, apart from its pictures' size, and a character may walk four
@@ -274,13 +279,14 @@ ways with `walkDown`, `walkUp` and `walkSide`, the side one mirrored for left).
274
279
  packs** on (`office_pack_access`, Dashboard access) can check, upload, replace, delete and restore packs itself (one
275
280
  previous version kept per pack); **Agents changing packs** under the packs names those agents, sets whether their changes
276
281
  **Need my yes** (the default) or **Apply at once**, and approves or rejects the waiting ones (also from the notice's
277
- buttons in General); every change is logged and told in General. **Style** (per browser for the whole fleet, per office for a stored one): **Desks**,
282
+ buttons in General); every change is logged and told in General. **Style** (per office for a stored one; for the whole fleet, #2716, an admin's pick is kept on the host for every device and share link, anyone else's stays in their browser): **Desks**,
278
283
  **Studio** (one scene — Work, Lounge, Help desk, Nap corner — where each instance walks to the area for its state),
279
284
  **Cozy** (#2631: the same in a warm pixel-art office drawn as one picture; its notice board says a skin pack can
280
285
  restyle it; the default for a browser that has not picked a style and for a new office — a saved office keeps its
281
286
  own) or an uploaded pack; one the page cannot load is drawn as Desks with a note. On a stored office in Studio,
282
287
  Cozy or a pack,
283
- **Edit layout** (admin only) shows a 1280×720 coordinate grid and lets you drag seats, furniture, the door and
288
+ **Edit layout** (admin only) shows a 1280×720 coordinate grid and lets you drag seats, furniture, the door, the mail drop
289
+ (an envelope: where letters from other offices land; dashed on a pack without a `mailDrop`, #2736) and
284
290
  waypoints (or Tab to one and use the arrow keys, Shift for 10), add or remove waypoints and join or unjoin
285
291
  corridors; an item that sleeps at bedtime (a pack's `night`) has a night handle too ("Item {id} (night)": its night
286
292
  picture faint, a moon, a line to its day place; on the day place while it sleeps in place) — drag it to give the item
@@ -301,8 +307,8 @@ only. Hover and click work across
301
307
  tiles; a tile's label, or a double-click on it, opens that office; traffic between offices flies straight across.
302
308
  Edit offices and Edit layout wait for a single office.
303
309
  **Share…** (#2636; an admin session, on the dashboard reached directly or over the public link — never read-only or a guest; the URL shows only to its maker, in the dialog) makes an Office share
304
- link: anyone who opens it watches one office (or **All offices**) live, read-only, with no sign-in — names, identity
305
- colours and states, every 5 s; no chat, no clicks into anything, no settings; agents' `office_set` lines only when
310
+ link: anyone who opens it watches **Whole fleet** (#2716, in the fleet's style), one office or **All offices** live, in the link's **Look** (#2715: Light, Dark or the viewer's device; default what the maker's dashboard shows now), read-only, with no sign-in — names, identity
311
+ colours and states, every 5 s; no chat, no settings (a click shows a card with name, title, state, office and level only); agents' `office_set` lines only when
306
312
  **Include agents' own status lines** is ticked; hidden instances never. 1 h by default, 15 min to 24 h
307
313
  (`web.office_share.max_hours`); at most 10 open. Its own quick tunnel (`https://<random>.trycloudflare.com/o/<token>`)
308
314
  starts with the first link and stops with the last; the token is shown once. There is no chat command: the button only. Open links and **Revoke** are in **Settings → Access
@@ -311,7 +317,8 @@ says to try again in a few minutes (no retry). `web.office_share.enabled: false`
311
317
 
312
318
  The Office fills the Fleet panel and moves like the Canvas (#2540): drag to pan, the wheel or a pinch to zoom,
313
319
  **+** / **−** / **Fit** / **Fill** at the top right (the zoom shown as a percentage above them) or the `+ - 0` keys
314
- (with the office focused), an overview at the bottom right to jump (not on a phone). It takes the whole panel: the
320
+ (with the office focused), an overview at the bottom right to jump (not on a phone; hidden while a single office
321
+ is all in view, #2737). It takes the whole panel: the
315
322
  Fleet area's full width, down to the window's foot. **Fit** shows the whole scene as large as the panel allows
316
323
  (any scale, so it fills the panel's width or height); **Fill** (a toggle, kept per office) fills the panel instead,
317
324
  cropping what overflows — drag to see it. **+** / **−** step in pixel levels (each logical unit a whole number of
@@ -238,8 +238,9 @@ values reloaded after Save. Password fields keep the browser's behaviour.
238
238
  The sidebar's **Fleet** (zh "Fleet 概覽", at the top) and the phone's Fleet tab open the Fleet tab this device used last
239
239
  (`agend_last_fleet_tab`; the Org chart the first time). The sidebar has no separate Fleet (Details) or View row.
240
240
  - **Tasks** — the task board: Home lists **projects** (with % done) and what waits for the person (**Confirm** /
241
- **Send back** finished work, **Answer** a blocked card); **No project** holds `task`-tool tasks. A project is a board
242
- of main tasks (M-n) by status — To do, In progress, Blocked, Waiting for you, Done — with drag to move, an assignee
241
+ **Send back** finished work, **Answer** a blocked card — #2756: only the cards the person handed out, as Needs you;
242
+ an agent's card in review says "Waiting for <agent>"); **No project** holds `task`-tool tasks. A project is a board
243
+ of main tasks (M-n) by status — To do, In progress, Blocked, To confirm, Done — with drag to move, an assignee
243
244
  filter and each main task's sub tasks (S-n). A card opens in a dialog: every field editable, its sub tasks, comments,
244
245
  progress log, history. **Search cards** in the header. Only a signed-in person confirms the work they handed out
245
246
  (an instance's `done` on such a card is review); a card an agent handed out, that agent confirms (#2434). No
@@ -273,12 +274,16 @@ per instance with a name tag, General and "Not in a team" in the **Lobby**. Each
273
274
  with the lamp on (working), tea break (idle), asleep behind a **Closed** sign (paused/stopped), a hand up under a
274
275
  blinking light (needs you, crashed, looks stuck). With **Live** on, each message, delegation and report is carried
275
276
  desk to desk along the corridors in the Key's colours; a delegation in progress is a purple folder on the worker's
276
- desk. Hover (or tap once) a desk for its name, state and backend; click (or tap again) opens the chat. **Find** dims
277
+ desk. Hover a desk for its name, state and backend; a click or tap (or Enter in the desk list) opens the
278
+ person's profile card (#2661: a 320 px popover beside them, following them; Esc, a press elsewhere or the same person
279
+ again closes it; on a phone a bottom sheet): level and XP, office and area, model, backend, today, first seen, the
280
+ activity line, **Find in office** and **Chat**. A double-click opens the chat directly. Each name tag has a level badge
281
+ (lifetime work, docs/office.md § Levels; **Settings → Web dashboard → Office levels**, `web.office_levels`). **Find** dims
277
282
  the rest. **Show** picks a team or the Lobby and **People** pins chosen instances (both kept per browser); the
278
283
  **Office** switcher lists offices kept on the host (`web-offices.json`, `GET`/`PUT /ui/offices`). An admin session
279
284
  (never a read-only one, a guest or the public link) gets **Edit offices** (≥1200 px: a panel docked on the right in the
280
285
  usage rail's place, the Office in use beside it, × or Esc closes it and the rail returns; narrower: a centred dialog): add, rename and delete offices, pick who is
281
- in each (whole teams or single instances; none = everyone) and its style, and upload or delete **skin packs** (an
286
+ in each (Everyone, Picked: whole teams or single instances, or #2752 Nobody: its style's NPCs only; none picked = everyone) and its style, and upload or delete **skin packs** (an
282
287
  artist's pictures: `manifest.json` plus PNGs, format v1, kept in `web-office-skins/` in the AgEnD home; the host
283
288
  checks every rule — PNG only, each strip exactly frames·w × h, a 16:9 background, size caps — and never changes a
284
289
  pack; a strip may give its displayed size, `dw`/`dh`, apart from its pictures' size, and a character may walk four
@@ -286,13 +291,14 @@ ways with `walkDown`, `walkUp` and `walkSide`, the side one mirrored for left).
286
291
  packs** on (`office_pack_access`, Dashboard access) can check, upload, replace, delete and restore packs itself (one
287
292
  previous version kept per pack); **Agents changing packs** under the packs names those agents, sets whether their changes
288
293
  **Need my yes** (the default) or **Apply at once**, and approves or rejects the waiting ones (also from the notice's
289
- buttons in General); every change is logged and told in General. **Style** (per browser for the whole fleet, per office for a stored one): **Desks**,
294
+ buttons in General); every change is logged and told in General. **Style** (per office for a stored one; for the whole fleet, #2716, an admin's pick is kept on the host for every device and share link, anyone else's stays in their browser): **Desks**,
290
295
  **Studio** (one scene — Work, Lounge, Help desk, Nap corner — where each instance walks to the area for its state),
291
296
  **Cozy** (#2631: the same in a warm pixel-art office drawn as one picture; its notice board says a skin pack can
292
297
  restyle it; the default for a browser that has not picked a style and for a new office — a saved office keeps its
293
298
  own) or an uploaded pack; one the page cannot load is drawn as Desks with a note. On a stored office in Studio,
294
299
  Cozy or a pack,
295
- **Edit layout** (admin only) shows a 1280×720 coordinate grid and lets you drag seats, furniture, the door and
300
+ **Edit layout** (admin only) shows a 1280×720 coordinate grid and lets you drag seats, furniture, the door, the mail drop
301
+ (an envelope: where letters from other offices land; dashed on a pack without a `mailDrop`, #2736) and
296
302
  waypoints (or Tab to one and use the arrow keys, Shift for 10), add or remove waypoints and join or unjoin
297
303
  corridors; an item that sleeps at bedtime (a pack's `night`) has a night handle too ("Item {id} (night)": its night
298
304
  picture faint, a moon, a line to its day place; on the day place while it sleeps in place) — drag it to give the item
@@ -316,8 +322,8 @@ only. Hover and click work across
316
322
  tiles; a tile's label, or a double-click on it, opens that office; traffic between offices flies straight across.
317
323
  Edit offices and Edit layout wait for a single office.
318
324
  **Share…** (#2636; an admin session, on the dashboard reached directly or over the public link — never read-only or a guest; the URL shows only to its maker, in the dialog) makes an Office share
319
- link: anyone who opens it watches one office (or **All offices**) live, read-only, with no sign-in — names, identity
320
- colours and states, every 5 s; no chat, no clicks into anything, no settings; agents' `office_set` lines only when
325
+ link: anyone who opens it watches **Whole fleet** (#2716, in the fleet's style), one office or **All offices** live, in the link's **Look** (#2715: Light, Dark or the viewer's device; default what the maker's dashboard shows now), read-only, with no sign-in — names, identity
326
+ colours and states, every 5 s; no chat, no settings (a click shows a card with name, title, state, office and level only); agents' `office_set` lines only when
321
327
  **Include agents' own status lines** is ticked; hidden instances never. 1 h by default, 15 min to 24 h
322
328
  (`web.office_share.max_hours`); at most 10 open. Its own quick tunnel (`https://<random>.trycloudflare.com/o/<token>`)
323
329
  starts with the first link and stops with the last; the token is shown once. There is no chat command: the button only. Open links and **Revoke** are in **Settings → Access
@@ -326,7 +332,8 @@ says to try again in a few minutes (no retry). `web.office_share.enabled: false`
326
332
 
327
333
  The Office fills the Fleet panel and moves like the Canvas (#2540): drag to pan, the wheel or a pinch to zoom,
328
334
  **+** / **−** / **Fit** / **Fill** at the top right (the zoom shown as a percentage above them) or the `+ - 0` keys
329
- (with the office focused), an overview at the bottom right to jump (not on a phone). It takes the whole panel: the
335
+ (with the office focused), an overview at the bottom right to jump (not on a phone; hidden while a single office
336
+ is all in view, #2737). It takes the whole panel: the
330
337
  Fleet area's full width, down to the window's foot. **Fit** shows the whole scene as large as the panel allows
331
338
  (any scale, so it fills the panel's width or height); **Fill** (a toggle, kept per office) fills the panel instead,
332
339
  cropping what overflows — drag to see it. **+** / **−** step in pixel levels (each logical unit a whole number of
@@ -96,6 +96,7 @@ const FLEET_FIELD_IMPACTS = {
96
96
  "web.echo_to_channel": "now",
97
97
  "web.log_tab": "now",
98
98
  "web.usage_report_on_public_link": "now",
99
+ "web.office_levels": "now",
99
100
  "web.public_link.allow_public": "now",
100
101
  "web.public_link.ttl_minutes": "now",
101
102
  "web.public_link.protocol": "now",
@@ -1 +1 @@
1
- {"version":3,"file":"instance-config-impact.js","sourceRoot":"","sources":["../src/instance-config-impact.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAM9C,0EAA0E;AAC1E,MAAM,CAAC,MAAM,YAAY,GAA4B,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;AAElF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAsC,IAAI,GAAG,CAAuB;IACvG,eAAe;IACf,wBAAwB;IACxB,gBAAgB;IAChB,iBAAiB;IACjB,yBAAyB;IACzB,kBAAkB;IAClB,UAAU;IACV,cAAc;IACd,aAAa;IACb,MAAM;IACN,WAAW;IACX,sFAAsF;IACtF,2BAA2B;IAC3B,wFAAwF;IACxF,qBAAqB;IACrB,oGAAoG;IACpG,WAAW,EAAE,eAAe,EAAE,oBAAoB;CACnD,CAAC,CAAC;AAEH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAwB,IAAI,GAAG,CAChE,CAAC,e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ACtD,wEAAwE;QACxE,sEAAsE;QACtE,IAAI,CAAC,0BAA0B,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,OAAO,CAAC,YAAY,GAAG,EAAE,CAAC,GAAG,mBAAmB,CAAC,GAAG,CAAC,CAAC;IAClG,CAAC;IACD,KAAK,MAAM,GAAG,IAAI,cAAc,EAAE,CAAC;QACjC,OAAO,CAAC,WAAW,GAAG,EAAE,CAAC,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;QACpD,OAAO,CAAC,oBAAoB,GAAG,EAAE,CAAC,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;IAC/D,CAAC;IACD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC;AAC1C,CAAC"}
@@ -0,0 +1,21 @@
1
+ /** Confirmed option A only: keep the original carried session, preserve the named newer alternative. */
2
+ import type { KiroMigrateDeps } from "./kiro-migrate.js";
3
+ import type { KiroReconcileInput, KiroReconcilePlan } from "./backend/kiro-reconcile-store.js";
4
+ export interface KiroReconcileDeps extends KiroMigrateDeps {
5
+ store(input: KiroReconcileInput, plan?: KiroReconcilePlan, actor?: string, rollbackReceipt?: string): Promise<{
6
+ plan?: KiroReconcilePlan;
7
+ receipt?: string;
8
+ }>;
9
+ }
10
+ export interface KiroReconciliation {
11
+ name: string;
12
+ input: KiroReconcileInput;
13
+ plan: KiroReconcilePlan;
14
+ }
15
+ export declare function planKiroReconciliation(deps: KiroReconcileDeps, name: string, keep: string, archive: string, rollbackReceipt?: string): Promise<KiroReconciliation>;
16
+ export declare function kiroReconciliationPrompt(p: KiroReconciliation): string;
17
+ export declare function applyKiroReconciliation(deps: KiroReconcileDeps, p: KiroReconciliation, actor: string): Promise<{
18
+ ok: boolean;
19
+ text: string;
20
+ receipt?: string;
21
+ }>;
@@ -0,0 +1,80 @@
1
+ import { instanceCredentialProfile } from "./backend/credential-profile.js";
2
+ import { kiroV1DbPath, kiroV2SessionsDir } from "./backend/kiro.js";
3
+ import { t } from "./locale.js";
4
+ function target(deps, name, keep, archive) {
5
+ const fleet = deps.fleetConfig(), inst = fleet?.instances[name];
6
+ if (!inst || (inst.backend ?? fleet?.defaults?.backend) !== "kiro-cli" || inst.kiro_ui !== "tui" || !inst.working_directory
7
+ || !inst.model || !["stopped", "paused"].includes(deps.status(name)))
8
+ throw new Error(t("kiro_reconcile.stopped_required"));
9
+ const profile = instanceCredentialProfile(inst, fleet?.defaults, "kiro-cli");
10
+ return { agendHome: deps.agendHome, instance: name, workingDirectory: inst.working_directory, credentialProfile: profile,
11
+ sessionId: keep, archiveId: archive, sessionsDir: kiroV2SessionsDir(), dbPath: kiroV1DbPath(profile), model: inst.model };
12
+ }
13
+ export async function planKiroReconciliation(deps, name, keep, archive, rollbackReceipt) {
14
+ const input = target(deps, name, keep, archive), result = await deps.store(input, undefined, undefined, rollbackReceipt);
15
+ if (!result.plan || JSON.stringify(target(deps, name, keep, archive)) !== JSON.stringify(input))
16
+ throw new Error(t("kiro_reconcile.changed"));
17
+ return { name, input, plan: result.plan };
18
+ }
19
+ export function kiroReconciliationPrompt(p) {
20
+ return t(p.plan.rollbackReceipt ? "kiro_reconcile.rollback_prompt" : "kiro_reconcile.prompt", p.name, p.input.sessionId, p.input.archiveId);
21
+ }
22
+ export async function applyKiroReconciliation(deps, p, actor) {
23
+ let lease;
24
+ try {
25
+ lease = deps.reserve(p.name);
26
+ }
27
+ catch (error) {
28
+ return { ok: false, text: t("kiro_reconcile.failed", p.name, error.message) };
29
+ }
30
+ let receipt;
31
+ const current = () => {
32
+ if (!lease.current())
33
+ throw new Error(t("kiro_reconcile.changed"));
34
+ const config = deps.fleetConfig()?.instances[p.name];
35
+ if (!config || (config.backend ?? deps.fleetConfig()?.defaults?.backend) !== "kiro-cli" || config.kiro_ui !== "tui" || config.model !== p.input.model || config.working_directory !== p.input.workingDirectory
36
+ || instanceCredentialProfile(config, deps.fleetConfig()?.defaults, "kiro-cli") !== p.input.credentialProfile)
37
+ throw new Error(t("kiro_reconcile.changed"));
38
+ };
39
+ try {
40
+ if (JSON.stringify(target(deps, p.name, p.input.sessionId, p.input.archiveId)) !== JSON.stringify(p.input))
41
+ throw new Error(t("kiro_reconcile.changed"));
42
+ current();
43
+ const model = await deps.preflight(p.name, { name: p.name, workingDirectory: p.input.workingDirectory, credentialProfile: p.input.credentialProfile, classicId: p.input.sessionId });
44
+ current();
45
+ if (model !== p.input.model)
46
+ throw new Error(t("kiro_reconcile.changed"));
47
+ const result = await deps.store(p.input, p.plan, actor);
48
+ receipt = result.receipt;
49
+ current();
50
+ if (!receipt)
51
+ throw new Error(t("kiro_reconcile.changed"));
52
+ if (!p.plan.rollbackReceipt) {
53
+ await deps.restart(p.name);
54
+ current();
55
+ await deps.verify(p.name, p.input.sessionId, p.input.model, true);
56
+ current();
57
+ await deps.restart(p.name);
58
+ current();
59
+ await deps.verify(p.name, p.input.sessionId, p.input.model, true);
60
+ current();
61
+ }
62
+ return { ok: true, receipt, text: t(p.plan.rollbackReceipt ? "kiro_reconcile.rolled_back" : "kiro_reconcile.done", p.name, receipt) };
63
+ }
64
+ catch (error) {
65
+ let reason = error instanceof SyntaxError ? "Malformed reconciliation data" : error.message;
66
+ if (lease.current()) {
67
+ try {
68
+ await deps.stop(p.name);
69
+ }
70
+ catch {
71
+ reason += " " + t("kiro_migrate.stop_unconfirmed");
72
+ }
73
+ }
74
+ return { ok: false, ...(receipt ? { receipt } : {}), text: t("kiro_reconcile.failed", p.name, reason) };
75
+ }
76
+ finally {
77
+ lease.release();
78
+ }
79
+ }
80
+ //# sourceMappingURL=kiro-reconcile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kiro-reconcile.js","sourceRoot":"","sources":["../src/kiro-reconcile.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEpE,OAAO,EAAE,CAAC,E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AAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,MAAM,GAAG,KAAK,YAAY,WAAW,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAE,KAAe,CAAC,OAAO,CAAC;QACvG,IAAI,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;YAAC,IAAI,CAAC;gBAAC,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;YAAC,CAAC;YAAC,MAAM,CAAC;gBAAC,MAAM,IAAI,GAAG,GAAG,CAAC,CAAC,+BAA+B,CAAC,CAAC;YAAC,CAAC;QAAC,CAAC;QACvH,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,uBAAuB,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC;IAC1G,CAAC;YAAS,CAAC;QAAC,KAAK,CAAC,OAAO,EAAE,CAAC;IAAC,CAAC;AAChC,CAAC"}
@@ -1,5 +1,12 @@
1
1
  import type { KiroScanRead } from "./forged-envelope-scan.js";
2
2
  export declare const KIRO_FORENSIC_MAX_BYTES: number;
3
+ /** Callers using a tiny emptiness probe must distinguish work from an unsafe file. */
4
+ export declare class KiroTuiSnapshotSizeError extends Error {
5
+ readonly path: string;
6
+ readonly maxBytes: number;
7
+ readonly actualBytes: number;
8
+ constructor(path: string, maxBytes: number, actualBytes: number);
9
+ }
3
10
  /** Refuse symlinks/devices/foreign files and read exactly the size observed at open, not an unbounded live tail. */
4
11
  export declare function snapshotKiroTuiFile(path: string, maxBytes: number): {
5
12
  text: string;
@@ -3,19 +3,33 @@
3
3
  */
4
4
  import { closeSync, constants, fstatSync, lstatSync, openSync, readSync } from "node:fs";
5
5
  import { homedir } from "node:os";
6
- import { join } from "node:path";
6
+ import { basename, join } from "node:path";
7
7
  export const KIRO_FORENSIC_MAX_BYTES = 64 * 1024 * 1024;
8
8
  const META_MAX_BYTES = 8 * 1024 * 1024;
9
9
  const LINE_MAX_BYTES = 4 * 1024 * 1024;
10
10
  const plain = (value) => !!value && typeof value === "object" && !Array.isArray(value);
11
+ /** Callers using a tiny emptiness probe must distinguish work from an unsafe file. */
12
+ export class KiroTuiSnapshotSizeError extends Error {
13
+ path;
14
+ maxBytes;
15
+ actualBytes;
16
+ constructor(path, maxBytes, actualBytes) {
17
+ super(`TUI session ${JSON.stringify(basename(path))} exceeds the scan size limit (${actualBytes} > ${maxBytes} bytes)`);
18
+ this.path = path;
19
+ this.maxBytes = maxBytes;
20
+ this.actualBytes = actualBytes;
21
+ }
22
+ }
11
23
  /** Refuse symlinks/devices/foreign files and read exactly the size observed at open, not an unbounded live tail. */
12
24
  export function snapshotKiroTuiFile(path, maxBytes) {
13
25
  const fd = openSync(path, constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_NONBLOCK);
14
26
  try {
15
27
  const before = fstatSync(fd);
16
- if (!before.isFile() || (process.getuid && before.uid !== process.getuid()) || before.size > maxBytes) {
17
- throw new Error("TUI session is not an owned regular file within the scan size limit");
28
+ if (!before.isFile() || (process.getuid && before.uid !== process.getuid())) {
29
+ throw new Error(`TUI session ${JSON.stringify(basename(path))} is not an owned regular file`);
18
30
  }
31
+ if (before.size > maxBytes)
32
+ throw new KiroTuiSnapshotSizeError(path, maxBytes, before.size);
19
33
  const bytes = Buffer.alloc(before.size);
20
34
  let offset = 0;
21
35
  while (offset < bytes.length) {
@@ -1 +1 @@
1
- {"version":3,"file":"kiro-tui-forensic.js","sourceRoot":"","sources":["../src/kiro-tui-forensic.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACzF,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,O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,CAAC,IAAI,CAAC,UAAU,EAAE;YAAE,MAAM,IAAI,KAAK,CAAC,iEAAiE,CAAC,CAAC;QAC/J,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,CAAC;IAC/D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,yFAAyF;QACzF,MAAM,MAAM,GAAG,KAAK,YAAY,WAAW,IAAI,KAAK,YAAY,SAAS,CAAC,CAAC,CAAC,8CAA8C,CAAC,CAAC,CAAE,KAAe,CAAC,OAAO,CAAC;QACtJ,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC;IACxC,CAAC;AACH,CAAC"}
package/dist/locale.js CHANGED
@@ -178,6 +178,7 @@ const enMessages = {
178
178
  "dashboard.start_web_ack": "✅ You can now use /web in your group.",
179
179
  "web.public_login_notice": "🔐 New web sign-in · public: {0} (session {1}). If this was not you, use /web revoke.",
180
180
  "office_share.all": "All offices",
181
+ "office_share.whole": "the whole fleet",
181
182
  "office_share.created_notice": "🏢 {0} shared the Office ({1}) for {2}: anyone with the link can watch it, read-only. Revoke it in Settings → Access & security.",
182
183
  "office_share.revoked_notice": "🏢 {0} revoked the Office share link ({1}).",
183
184
  "office_share.revoked_all_notice": "🏢 {0} revoked {1} Office share links.",
@@ -415,6 +416,14 @@ const enMessages = {
415
416
  "kiro_migrate.done_restart_failed": "⚠️ {0} is set to kiro's TUI engine, but its restart failed ({1}); the move happens at its next start.",
416
417
  "kiro_migrate.done_carry": "Its first TUI launch resumes its classic conversation {0} once and records it as its own; if that launch starts fresh instead, it says so in its topic.",
417
418
  "kiro_migrate.done_fresh": "It starts with an empty conversation.",
419
+ "kiro_reconcile.audit_failed": "Reconciliation audit log is unavailable; no changes were made.",
420
+ "kiro_reconcile.stopped_required": "Reconciliation requires a stopped TUI fleet instance with an explicit model and directory.",
421
+ "kiro_reconcile.changed": "Reconciliation evidence or instance ownership changed; request confirmation again.",
422
+ "kiro_reconcile.prompt": "Reconcile {0}?\nKeep original conversation: {1}\nArchive intact (never delete): {2}\nPreserve both V2 file sets, repair the original pin, archive its frozen classic duplicate, then verify two starts with the same model. A failure stops in place. A receipt allows rollback into a stopped hold.",
423
+ "kiro_reconcile.rollback_prompt": "Roll back reconciliation for {0}?\nKeep ID: {1}\nArchived ID: {2}\nRestore the prior AgEnD identity and exact frozen classic index rows into a stopped hold. All V2 files and archives stay intact. Nothing is started.",
424
+ "kiro_reconcile.done": "{0}: original conversation restored and plain restart verified. Archive/rollback receipt: {1}. Both V2 conversations are preserved.",
425
+ "kiro_reconcile.rolled_back": "{0}: prior identity restored; instance stays stopped. Archives retained. Receipt: {1}.",
426
+ "kiro_reconcile.failed": "{0}: reconciliation did not complete: {1}. No fresh or classic fallback. Inspect the receipt before retrying.",
418
427
  "kiro_migrate.requested": "Asked in General for a fleet admin's confirmation. Nothing changes until it is confirmed.",
419
428
  "kiro_migrate.no_general": "There is no General topic to ask a fleet admin in, so the move cannot be confirmed.",
420
429
  "kiro.engine_floor": "{0} has run on kiro's {2} engine, so AgEnD will not launch it on {1}: that would resume the old copy of its conversation from before the move and lose everything done since. Set kiro_ui back to {2}.",
@@ -1409,6 +1418,7 @@ const enMessages = {
1409
1418
  "cli.service_retry": "Check your service manager, then retry: {0}",
1410
1419
  "cli.service_direct_hint": "If the service cannot run on this host, start the fleet without it: agend fleet start --direct",
1411
1420
  "cli.service_redirect": "ℹ An AgEnD service is installed here ({0}): running `agend {1}` so the service manager owns the fleet.",
1421
+ "cli.service_redirect_notify": "⚠ This process looks like a systemd unit waiting for READY (NOTIFY_SOCKET is set), but it handed the fleet to the service above and exits without starting one. If this unit runs its own fleet, use `agend fleet start --direct` in its ExecStart.",
1412
1422
  "cli.instance_restarted": "Instance \"{0}\" restarted (immediate)",
1413
1423
  "cli.restart_failed": "Restart failed: {0}",
1414
1424
  "cli.fleet_unreachable": "Cannot connect to fleet (port {0}). Is the fleet running?",
@@ -1585,6 +1595,7 @@ const zhTWMessages = {
1585
1595
  "dashboard.start_web_ack": "✅ 你現在可以在群組裡使用 /web 了。",
1586
1596
  "web.public_login_notice": "🔐 有新的網頁登入 · 公開入口:{0}(session {1})。如果不是你,請用 /web revoke。",
1587
1597
  "office_share.all": "所有辦公室",
1598
+ "office_share.whole": "整個 fleet",
1588
1599
  "office_share.created_notice": "🏢 {0} 分享了辦公室({1}),時間 {2}:拿到連結的人都能唯讀觀看。可在 設定 → 存取與安全 撤銷。",
1589
1600
  "office_share.revoked_notice": "🏢 {0} 撤銷了辦公室分享連結({1})。",
1590
1601
  "office_share.revoked_all_notice": "🏢 {0} 撤銷了 {1} 個辦公室分享連結。",
@@ -1822,6 +1833,14 @@ const zhTWMessages = {
1822
1833
  "kiro_migrate.done_restart_failed": "⚠️ {0} 已設為 kiro 的 TUI 引擎,但重啟失敗({1});下次啟動時搬移。",
1823
1834
  "kiro_migrate.done_carry": "它第一次以 TUI 啟動時會接續經典對話 {0} 一次,並登記為它自己的對話;若那次啟動改開新對話,會在它的 topic 說明。",
1824
1835
  "kiro_migrate.done_fresh": "它會從空的對話開始。",
1836
+ "kiro_reconcile.audit_failed": "對話處理的稽核紀錄目前無法寫入,沒有進行任何變更。",
1837
+ "kiro_reconcile.stopped_required": "接續處理需要已停止的 TUI fleet agent,並明確設定模型與目錄。",
1838
+ "kiro_reconcile.changed": "接續處理的證據或 agent 擁有權已改變,請重新要求確認。",
1839
+ "kiro_reconcile.prompt": "要處理 {0} 的對話嗎?\n保留原對話:{1}\n完整封存(絕不刪除):{2}\n會保留兩份 V2 檔案、修復原對話登記、備份並移出凍結的經典副本,再以相同模型驗證兩次啟動。失敗就停止;可用收據復原到停止等待的狀態。",
1840
+ "kiro_reconcile.rollback_prompt": "要復原 {0} 的對話處理嗎?\n保留的對話 ID:{1}\n封存的對話 ID:{2}\n會復原先前的 AgEnD 登記與凍結的經典索引原始資料,並維持停止;所有 V2 檔與封存都保留,不啟動任何 agent。",
1841
+ "kiro_reconcile.done": "{0}:已接回原對話,並驗證一般重啟。封存/復原收據:{1}。兩份 V2 對話都已保留。",
1842
+ "kiro_reconcile.rolled_back": "{0}:已復原先前登記並維持停止,封存仍保留。收據:{1}。",
1843
+ "kiro_reconcile.failed": "{0}:對話處理未完成:{1}。沒有改開新對話或切回經典模式;重試前請先檢查收據。",
1825
1844
  "kiro_migrate.requested": "已在 General 請 fleet admin 確認。確認前不會有任何變更。",
1826
1845
  "kiro_migrate.no_general": "沒有 General topic 可以請 fleet admin 確認,所以無法搬移。",
1827
1846
  "kiro.engine_floor": "{0} 已經在 kiro 的 {2} 引擎上執行過,所以 AgEnD 不會用 {1} 啟動它:那會接回搬移前的舊對話副本,之後做的事全部遺失。請把 kiro_ui 改回 {2}。",
@@ -2814,6 +2833,7 @@ const zhTWMessages = {
2814
2833
  "cli.service_retry": "請檢查服務管理員後再試:{0}",
2815
2834
  "cli.service_direct_hint": "如果這台主機無法執行服務,可以不透過服務啟動 fleet:agend fleet start --direct",
2816
2835
  "cli.service_redirect": "ℹ 這台主機已安裝 AgEnD 服務({0}):改為執行 `agend {1}`,讓服務管理員管理 fleet。",
2836
+ "cli.service_redirect_notify": "⚠ 這個程序看起來是等待 READY 的 systemd unit(已設定 NOTIFY_SOCKET),但它把 fleet 交給上面的服務,自己沒有啟動 fleet 就結束了。如果這個 unit 執行的是它自己的 fleet,請在它的 ExecStart 使用 `agend fleet start --direct`。",
2817
2837
  "cli.instance_restarted": "Instance「{0}」已重新啟動(立即)",
2818
2838
  "cli.restart_failed": "重新啟動失敗:{0}",
2819
2839
  "cli.fleet_unreachable": "無法連線到 fleet(port {0})。fleet 有在執行嗎?",