@songsid/agend 2.4.0-beta.38 → 2.4.0-beta.39

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 (84) hide show
  1. package/dist/agent-whats-new.js +1 -1
  2. package/dist/agent-whats-new.js.map +1 -1
  3. package/dist/agent-workspace.js +5 -4
  4. package/dist/agent-workspace.js.map +1 -1
  5. package/dist/auth-api.js +2 -0
  6. package/dist/auth-api.js.map +1 -1
  7. package/dist/build-provenance.json +1 -1
  8. package/dist/cli.js +1 -1
  9. package/dist/cli.js.map +1 -1
  10. package/dist/fleet-manager.d.ts +15 -0
  11. package/dist/fleet-manager.js +38 -11
  12. package/dist/fleet-manager.js.map +1 -1
  13. package/dist/general-knowledge/skills/admin/SKILL.md +1 -1
  14. package/dist/general-knowledge/skills/hub/SKILL.md +50 -50
  15. package/dist/general-knowledge/skills/web-dashboard/SKILL.md +4 -0
  16. package/dist/hub/directory/directory.js +2 -2
  17. package/dist/hub/directory/directory.js.map +1 -1
  18. package/dist/hub/init/text.js +11 -11
  19. package/dist/hub/init/text.js.map +1 -1
  20. package/dist/hub/mcp/catalog.js +1 -1
  21. package/dist/hub/mcp/catalog.js.map +1 -1
  22. package/dist/hub/mcp/server.js +1 -1
  23. package/dist/hub/mcp/server.js.map +1 -1
  24. package/dist/locale.js +6 -6
  25. package/dist/locale.js.map +1 -1
  26. package/dist/office-share-page.js +1 -1
  27. package/dist/office-share-page.js.map +1 -1
  28. package/dist/runtime-personal-answer-only.js +1 -1
  29. package/dist/runtime-personal-answer-only.js.map +1 -1
  30. package/dist/runtime-transcript-delta-reader.js +6 -1
  31. package/dist/runtime-transcript-delta-reader.js.map +1 -1
  32. package/dist/tmux-rollback.js +21 -23
  33. package/dist/tmux-rollback.js.map +1 -1
  34. package/dist/tmux-server.d.ts +2 -0
  35. package/dist/tmux-server.js +31 -13
  36. package/dist/tmux-server.js.map +1 -1
  37. package/dist/ui/hub-admin-overview.js +2 -2
  38. package/dist/ui/hub-agent-intro.js +2 -2
  39. package/dist/ui/hub-ai-apps-strings.js +1 -1
  40. package/dist/ui/hub-chat-strings.js +2 -2
  41. package/dist/ui/hub-client.js +18 -5
  42. package/dist/ui/hub-company-join-strings.js +31 -31
  43. package/dist/ui/hub-company-join.js +2 -2
  44. package/dist/ui/hub-enrolment-code-strings.js +10 -10
  45. package/dist/ui/hub-grant-picker.js +3 -3
  46. package/dist/ui/hub-group-strings.js +2 -2
  47. package/dist/ui/hub-join-one-strings.js +12 -12
  48. package/dist/ui/hub-join-steps.js +10 -10
  49. package/dist/ui/hub-my-agents-strings.js +3 -3
  50. package/dist/ui/hub-personal-agent-strings.js +6 -6
  51. package/dist/ui/hub-roles-strings.js +1 -1
  52. package/dist/ui/hub-room-composer.js +21 -1
  53. package/dist/ui/hub-room-owner-requests-strings.js +2 -2
  54. package/dist/ui/hub-room-thread.js +116 -9
  55. package/dist/ui/hub-strings.js +4 -4
  56. package/dist/ui/hub-subject-picker.js +1 -1
  57. package/dist/ui/hub-teams-strings.js +1 -1
  58. package/dist/ui/settings-access-overview.js +104 -25
  59. package/dist/ui/settings-hub-member-address.js +6 -6
  60. package/dist/ui/settings-hub-web-address.js +6 -6
  61. package/dist/ui/settings-registry.js +1 -1
  62. package/dist/ui/shared/access-overview.css +6 -0
  63. package/dist/ui/shared/app-shell.js +7 -7
  64. package/dist/ui/shared/app.css +24 -3
  65. package/dist/ui/shared/info-tip.js +33 -8
  66. package/dist/ui/shared/update-card-ui.js +72 -25
  67. package/dist/ui/shared/usage-agents.js +99 -0
  68. package/dist/ui/shared/usage-dialog.js +15 -18
  69. package/dist/ui/shared/view-strings.js +1 -1
  70. package/dist/ui/workspace-diff-path.d.ts +1 -0
  71. package/dist/ui/workspace-diff-path.js +22 -0
  72. package/dist/ui/workspace-panel.js +4 -3
  73. package/dist/update-readiness-host.js +6 -2
  74. package/dist/update-readiness-host.js.map +1 -1
  75. package/dist/update-readiness.js +15 -2
  76. package/dist/update-readiness.js.map +1 -1
  77. package/dist/usage/providers.d.ts +4 -0
  78. package/dist/usage/providers.js +9 -2
  79. package/dist/usage/providers.js.map +1 -1
  80. package/dist/usage/usage-api.js +3 -2
  81. package/dist/usage/usage-api.js.map +1 -1
  82. package/dist/web-api.js +2 -1
  83. package/dist/web-api.js.map +1 -1
  84. package/package.json +1 -1
@@ -2638,6 +2638,12 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2638
2638
  private onGracefulRestartSignal;
2639
2639
  /** SIGUSR1: full process reload. Names who asked (#1120). */
2640
2640
  private onFullRestartSignal;
2641
+ /**
2642
+ * M-4000 / M-4001: where a slash /update's message is, as Discord reports a press or an edit on it: in a guild, the
2643
+ * configured guild (or, with no `group_id`, the command's own guild) as chatId and the channel or thread as threadId —
2644
+ * the place a text /update and General's own card use. Outside a guild, the bare channel.
2645
+ */
2646
+ private updateSlashPlace;
2641
2647
  private handleUpdateSlash;
2642
2648
  /**
2643
2649
  * The update itself, for slash `/update` and the web's Update (M-2738): the installed `agend`, verified, launched
@@ -4982,6 +4988,15 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
4982
4988
  * null when the backend has no profiles. A Windows agent's profile is the one kept on its paired Runtime computer.
4983
4989
  */
4984
4990
  credentialProfileLabel(name: string, backend?: string): string | null;
4991
+ /**
4992
+ * M-4002: the status frame's `credential_profile` for one instance — never a failed frame. An account that cannot be
4993
+ * worked out says so (`credential_profile_unknown`), unlike a Windows agent's (left out: its login is on its own
4994
+ * computer): the page then lists nobody for any login of that CLI rather than a partial list (Prism on #4659).
4995
+ */
4996
+ statusCredentialProfile(name: string, backend: string): {
4997
+ credential_profile?: string | null;
4998
+ credential_profile_unknown?: true;
4999
+ };
4985
5000
  /**
4986
5001
  * #1699: the claude config dir an instance's CLI uses — its credential profile's, else exactly as before
4987
5002
  * (CLAUDE_CONFIG_DIR or ~/.claude).
@@ -11143,6 +11143,16 @@ export class FleetManager {
11143
11143
  process.exit(1);
11144
11144
  });
11145
11145
  }
11146
+ /**
11147
+ * M-4000 / M-4001: where a slash /update's message is, as Discord reports a press or an edit on it: in a guild, the
11148
+ * configured guild (or, with no `group_id`, the command's own guild) as chatId and the channel or thread as threadId —
11149
+ * the place a text /update and General's own card use. Outside a guild, the bare channel.
11150
+ */
11151
+ updateSlashPlace(data, adapterId) {
11152
+ return data.guildId
11153
+ ? { chatId: String(this.getChannelConfig(adapterId)?.group_id ?? data.guildId), threadId: data.channelId }
11154
+ : { chatId: data.channelId };
11155
+ }
11146
11156
  async handleUpdateSlash(data, adapterId) {
11147
11157
  const gate = this.fleetAdminGate(data.userId, adapterId);
11148
11158
  if (gate !== "ok") {
@@ -11154,13 +11164,9 @@ export class FleetManager {
11154
11164
  // M-3967: the card with its buttons, as the slash's own public reply; anything else in words.
11155
11165
  const adapter = this.adapters.get(adapterId) ?? this.adapter;
11156
11166
  if (adapter && data.respondButtons) {
11157
- // M-4000: where the card is, as a press on it reports it. A Discord button in a guild channel (or a thread) comes
11158
- // back as the configured guild (chatId) and the channel (threadId) — the place a text /update and General's own
11159
- // card use, and the one /update now's progress uses below. Recording the bare channel as chatId refused every press.
11160
- const place = data.guildId
11161
- ? { chatId: String(this.getChannelConfig(adapterId)?.group_id ?? data.guildId), threadId: data.channelId }
11162
- : { chatId: data.channelId };
11163
- const words = await this.showUpdateCard({ adapter, adapterId, ...place, respondButtons: data.respondButtons });
11167
+ // M-4000: where the card is, as a press on it reports it (updateSlashPlace).
11168
+ const place = this.updateSlashPlace(data, adapterId);
11169
+ const words = await this.showUpdateCard({ adapter, adapterId, chatId: place.chatId, ...(place.threadId ? { threadId: place.threadId } : {}), respondButtons: data.respondButtons });
11164
11170
  if (words !== null)
11165
11171
  await data.respond(words);
11166
11172
  return;
@@ -11177,8 +11183,9 @@ export class FleetManager {
11177
11183
  await this.refreshUpdateOffer(); // M-3964: the run's label is what it installs
11178
11184
  const adapter = this.adapters.get(adapterId) ?? this.adapter;
11179
11185
  if (messageId && adapter) {
11180
- const chatId = String(this.getChannelConfig(adapterId)?.group_id ?? data.channelId);
11181
- this.beginUpdateProgress(adapter, chatId, data.channelId, messageId);
11186
+ // M-4001 (Fable on #4658): the same address as the card's, so a Fleet without `group_id` records the guild too.
11187
+ const place = this.updateSlashPlace(data, adapterId);
11188
+ this.beginUpdateProgress(adapter, place.chatId, place.threadId ?? data.channelId, messageId);
11182
11189
  }
11183
11190
  this.beginUpdateRun();
11184
11191
  // Plain `agend update`: the CLI picks the channel from the version it is about to replace (a beta install
@@ -25167,6 +25174,19 @@ export class FleetManager {
25167
25174
  return "invalid";
25168
25175
  return "default";
25169
25176
  }
25177
+ /**
25178
+ * M-4002: the status frame's `credential_profile` for one instance — never a failed frame. An account that cannot be
25179
+ * worked out says so (`credential_profile_unknown`), unlike a Windows agent's (left out: its login is on its own
25180
+ * computer): the page then lists nobody for any login of that CLI rather than a partial list (Prism on #4659).
25181
+ */
25182
+ statusCredentialProfile(name, backend) {
25183
+ try {
25184
+ return { credential_profile: this.credentialProfileLabel(name, backend) };
25185
+ }
25186
+ catch {
25187
+ return { credential_profile_unknown: true };
25188
+ }
25189
+ }
25170
25190
  /**
25171
25191
  * #1699: the claude config dir an instance's CLI uses — its credential profile's, else exactly as before
25172
25192
  * (CLAUDE_CONFIG_DIR or ~/.claude).
@@ -34492,7 +34512,10 @@ export class FleetManager {
34492
34512
  await origin.complete(t("classic.mode_menu_failed"));
34493
34513
  return;
34494
34514
  }
34495
- const nonce = randomBytes(6).toString("hex");
34515
+ // M-4008: 32 hex, the nonce prompt button shape (`<prefix>:<32 hex>:<action>`). The Discord adapter lets a button from
34516
+ // outside the primary guild — a new channel of a secondary guild, where /start runs — through only in that shape; a
34517
+ // 12-hex id was dropped at ingress, so neither choice created the room. The pending menu's own checks are unchanged.
34518
+ const nonce = randomBytes(16).toString("hex");
34496
34519
  const restrictedChoice = {
34497
34520
  id: `${CLASSIC_MODE_CALLBACK_PREFIX}${nonce}:restricted`,
34498
34521
  label: t("classic.mode_restricted"),
@@ -34533,7 +34556,7 @@ export class FleetManager {
34533
34556
  async handleClassicModeSelection(data) {
34534
34557
  if (!data.callbackData.startsWith(CLASSIC_MODE_CALLBACK_PREFIX))
34535
34558
  return false;
34536
- const match = data.callbackData.match(/^classic-mode:([0-9a-f]+):(restricted|free)$/);
34559
+ const match = data.callbackData.match(/^classic-mode:([0-9a-f]{32}):(restricted|free)$/);
34537
34560
  if (!match)
34538
34561
  return true;
34539
34562
  const pending = this.pendingClassicStarts.get(match[1]);
@@ -38858,6 +38881,10 @@ export class FleetManager {
38858
38881
  model_source,
38859
38882
  ...(backend === "claude-code" ? { model_observation: this.modelObservationForInstance(name) } : {}),
38860
38883
  backend,
38884
+ // M-4002: the account it signs in with, as list_instances says it (a profile, "default", "invalid", or null where the
38885
+ // backend has none): the usage panel lists each login's agents from this. A Windows agent's login is on its own
38886
+ // computer, never a row of this host's usage, so it has none here. A guest's frame never carries it.
38887
+ ...(isWindowsInstance(nativeConfig) ? {} : this.statusCredentialProfile(name, backend)),
38861
38888
  effort,
38862
38889
  effort_source,
38863
38890
  // Whether the chat header's effort chip is offered (shown as "auto" while none is set): the backend takes an