@songsid/agend 2.3.5-beta.2 → 2.3.5-beta.3

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 (135) hide show
  1. package/dist/agent-cli-instructions.md +2 -2
  2. package/dist/auth-api.d.ts +2 -0
  3. package/dist/auth-api.js +5 -1
  4. package/dist/auth-api.js.map +1 -1
  5. package/dist/backend/claude-code.d.ts +2 -0
  6. package/dist/backend/claude-code.js +16 -3
  7. package/dist/backend/claude-code.js.map +1 -1
  8. package/dist/backend/cli-env-probe.js +6 -2
  9. package/dist/backend/cli-env-probe.js.map +1 -1
  10. package/dist/backend/codex.d.ts +5 -3
  11. package/dist/backend/codex.js +31 -13
  12. package/dist/backend/codex.js.map +1 -1
  13. package/dist/backend/kiro.js +1 -1
  14. package/dist/backend/kiro.js.map +1 -1
  15. package/dist/backend/types.d.ts +5 -1
  16. package/dist/backend/types.js.map +1 -1
  17. package/dist/bundled-tmux-guard.d.ts +4 -0
  18. package/dist/bundled-tmux-guard.js +7 -0
  19. package/dist/bundled-tmux-guard.js.map +1 -1
  20. package/dist/cache-service.d.ts +6 -0
  21. package/dist/cache-service.js +105 -0
  22. package/dist/cache-service.js.map +1 -1
  23. package/dist/channel/mcp-tools.js +2 -2
  24. package/dist/channel/mcp-tools.js.map +1 -1
  25. package/dist/daemon.d.ts +3 -0
  26. package/dist/daemon.js +17 -2
  27. package/dist/daemon.js.map +1 -1
  28. package/dist/fleet-manager.d.ts +71 -0
  29. package/dist/fleet-manager.js +393 -92
  30. package/dist/fleet-manager.js.map +1 -1
  31. package/dist/fleet-process-handlers.d.ts +1 -1
  32. package/dist/fleet-process-handlers.js +3 -2
  33. package/dist/fleet-process-handlers.js.map +1 -1
  34. package/dist/general-knowledge/skills/concepts/SKILL.md +11 -12
  35. package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +9 -1
  36. package/dist/general-knowledge/skills/fleet-config/SKILL.md +12 -0
  37. package/dist/general-knowledge/skills/fleet-health/SKILL.md +1 -1
  38. package/dist/general-knowledge/skills/instance-lifecycle/SKILL.md +4 -0
  39. package/dist/general-knowledge/skills/web-dashboard/SKILL.md +16 -11
  40. package/dist/instance-lifecycle.d.ts +1 -1
  41. package/dist/instance-lifecycle.js +16 -1
  42. package/dist/instance-lifecycle.js.map +1 -1
  43. package/dist/instructions.js +29 -6
  44. package/dist/instructions.js.map +1 -1
  45. package/dist/kiro-history-scan.d.ts +26 -0
  46. package/dist/kiro-history-scan.js +141 -0
  47. package/dist/kiro-history-scan.js.map +1 -0
  48. package/dist/kiro-history-worker.d.ts +1 -0
  49. package/dist/kiro-history-worker.js +9 -0
  50. package/dist/kiro-history-worker.js.map +1 -0
  51. package/dist/kiro-history.d.ts +20 -0
  52. package/dist/kiro-history.js +96 -0
  53. package/dist/kiro-history.js.map +1 -0
  54. package/dist/kiro-usage-run.d.ts +2 -0
  55. package/dist/kiro-usage-run.js +4 -1
  56. package/dist/kiro-usage-run.js.map +1 -1
  57. package/dist/locale.js +67 -67
  58. package/dist/locale.js.map +1 -1
  59. package/dist/login-flows.d.ts +4 -0
  60. package/dist/login-flows.js +8 -4
  61. package/dist/login-flows.js.map +1 -1
  62. package/dist/office-levels.d.ts +4 -3
  63. package/dist/office-levels.js +3 -3
  64. package/dist/office-levels.js.map +1 -1
  65. package/dist/outbound-handlers.js +32 -12
  66. package/dist/outbound-handlers.js.map +1 -1
  67. package/dist/outbound-schemas.d.ts +14 -0
  68. package/dist/outbound-schemas.js +4 -0
  69. package/dist/outbound-schemas.js.map +1 -1
  70. package/dist/setup-i18n.js +4 -4
  71. package/dist/setup-i18n.js.map +1 -1
  72. package/dist/subagent-records.d.ts +42 -0
  73. package/dist/subagent-records.js +159 -0
  74. package/dist/subagent-records.js.map +1 -0
  75. package/dist/subagent-service.d.ts +27 -0
  76. package/dist/subagent-service.js +199 -0
  77. package/dist/subagent-service.js.map +1 -0
  78. package/dist/tool-permissions.d.ts +2 -3
  79. package/dist/tool-permissions.js +3 -3
  80. package/dist/tool-permissions.js.map +1 -1
  81. package/dist/ui/backend-signin.js +62 -62
  82. package/dist/ui/chat-commands.js +7 -0
  83. package/dist/ui/chat-store.js +9 -4
  84. package/dist/ui/chat-strings.js +18 -18
  85. package/dist/ui/fleet-cache.js +3 -3
  86. package/dist/ui/fleet-canvas.js +2 -2
  87. package/dist/ui/fleet-office-editor.js +1 -1
  88. package/dist/ui/fleet-office.js +1 -1
  89. package/dist/ui/fleet-org.js +2 -2
  90. package/dist/ui/fleet-task-card.js +1 -1
  91. package/dist/ui/fleet-task-common.js +7 -7
  92. package/dist/ui/model-picker.js +64 -0
  93. package/dist/ui/panel-chat.js +47 -16
  94. package/dist/ui/panel-fleet.js +8 -8
  95. package/dist/ui/panel-needs.js +3 -3
  96. package/dist/ui/panel-settings.js +16 -6
  97. package/dist/ui/settings-catalog.js +19 -4
  98. package/dist/ui/settings-dialogs.js +25 -8
  99. package/dist/ui/settings-guests.js +1 -1
  100. package/dist/ui/settings-registry.js +3 -1
  101. package/dist/ui/settings-strings.js +30 -26
  102. package/dist/ui/settings-update.js +69 -0
  103. package/dist/ui/shared/app-i18n.js +8 -4
  104. package/dist/ui/shared/app-shell.js +2 -0
  105. package/dist/ui/shared/app-update.js +215 -0
  106. package/dist/ui/shared/app.css +48 -2
  107. package/dist/ui/shared/instance-nav.js +1 -1
  108. package/dist/ui/shared/model-picker.css +21 -0
  109. package/dist/ui/shared/setup-host-text.js +4 -4
  110. package/dist/ui/shared/signin.js +32 -16
  111. package/dist/ui/shared/subagent-row.css +15 -0
  112. package/dist/ui/shared/view-strings.js +17 -17
  113. package/dist/ui/structured-signin.js +26 -26
  114. package/dist/ui/subagent-row.js +64 -0
  115. package/dist/ui/web-terminal/terminal.js +9 -9
  116. package/dist/update-marker.d.ts +2 -2
  117. package/dist/update-marker.js +4 -3
  118. package/dist/update-marker.js.map +1 -1
  119. package/dist/usage/providers.js +2 -2
  120. package/dist/usage/providers.js.map +1 -1
  121. package/dist/usage-rollup.d.ts +3 -0
  122. package/dist/usage-rollup.js +2 -0
  123. package/dist/usage-rollup.js.map +1 -1
  124. package/dist/web-api.d.ts +14 -0
  125. package/dist/web-api.js +216 -2
  126. package/dist/web-api.js.map +1 -1
  127. package/dist/web-auth.js +2 -1
  128. package/dist/web-auth.js.map +1 -1
  129. package/dist/web-commands.d.ts +8 -0
  130. package/dist/web-commands.js +6 -0
  131. package/dist/web-commands.js.map +1 -1
  132. package/dist/web-update.d.ts +77 -0
  133. package/dist/web-update.js +102 -0
  134. package/dist/web-update.js.map +1 -0
  135. package/package.json +2 -2
@@ -92,6 +92,7 @@ import { SearchIndex } from "./search/search-index.js";
92
92
  import { type CrossInstanceRecord, type XmsgVisibility } from "./search/search-docs.js";
93
93
  import { WebSettingsTools } from "./web-settings-tools.js";
94
94
  import { type Delegation, type TrafficItem } from "./fleet-traffic.js";
95
+ import { type WebUpdateHost } from "./web-update.js";
95
96
  import { WebBackendLogins, type SignInTarget } from "./web-backend-login.js";
96
97
  import { BrowserBackendSignIns } from "./browser-backend-signins.js";
97
98
  import { type RawConfigPatch } from "./settings-api.js";
@@ -573,6 +574,18 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
573
574
  private previewInputs;
574
575
  private healthPortRetried;
575
576
  private updateCheckTimer;
577
+ /** M-2738: the last update check's answer, for the web (null until the first check settles). */
578
+ private updateCheckState;
579
+ /** M-2738: a web "check now" in flight, and when the last one ran (one a minute at most). */
580
+ private updateCheckNow;
581
+ /** M-2738: a web start's Idempotency-Key → its answer (a retried request never starts a second update). */
582
+ private webUpdateStarts;
583
+ /**
584
+ * M-2738 (Prism #3505 P2-2): this fleet's own claim on a web-started update, from admission until its updater exits
585
+ * (or was never launched). The progress marker expires after 15 minutes so a crashed update cannot silence incident
586
+ * reports; that expiry never proves the update ended, so it never admits a second one while this is held.
587
+ */
588
+ private webUpdateOwned;
576
589
  private updateProgressTimer;
577
590
  private updateProgressEditRunning;
578
591
  private lastUpdateProgressText;
@@ -1139,6 +1152,12 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1139
1152
  /** SIGUSR1: full process reload. Names who asked (#1120). */
1140
1153
  private onFullRestartSignal;
1141
1154
  private handleUpdateSlash;
1155
+ /**
1156
+ * The update itself, for slash `/update` and the web's Update (M-2738): the installed `agend`, verified, launched
1157
+ * independently with its log — or a failure in the progress marker. `stillAllowed` is asked again once the awaits
1158
+ * are done (the asker may have lost the right, or the fleet begun stopping, meanwhile).
1159
+ */
1160
+ private launchInstalledUpdate;
1142
1161
  private handleProfileSlash;
1143
1162
  /** Typed /profile belongs only to Telegram's General dispatcher. */
1144
1163
  runProfileCommand(msg: InboundMessage, seconds?: string): Promise<void>;
@@ -1238,6 +1257,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1238
1257
  viewHistory(name: string, q: ViewHistoryQuery): Promise<ViewHistoryAnswer | null>;
1239
1258
  /** #1218: GET /ui/steps — an instance's steps, read on demand (null: no such instance). */
1240
1259
  logSteps(name: string, q: LogQuery): Promise<LogAnswer | null>;
1260
+ private subagentReader;
1261
+ subagentRuns(name: string): Promise<import("./subagent-service.js").SubagentAnswer>;
1241
1262
  /**
1242
1263
  * #1218: where an instance's steps are read from, resolved only when its Log asks: the transcript its daemon follows
1243
1264
  * now; for claude-code, also the path its statusline last named (so a stopped instance's Log still shows its last
@@ -2380,6 +2401,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2380
2401
  /** No chat platform is configured at all: the web dashboard is the fleet's only surface. */
2381
2402
  /** #2910: no Discord or Telegram connection at all (src/web-only-fleet.ts). */
2382
2403
  isWebOnlyFleet(): boolean;
2404
+ /**
2405
+ * S-117 story 1: the sign-in page's "no chat" words (no /web to send) — a web-only fleet, or one whose chat is not
2406
+ * connected yet (a fresh install whose bot is still being set up, or is down): /web cannot answer there.
2407
+ */
2408
+ signinWithoutChat(): boolean;
2383
2409
  /** On a fleet with no chat platform, the dashboard is where an instance-health prompt is posted (#1307 item 6). */
2384
2410
  private webOnlyPromptPlace;
2385
2411
  /** Resolves when the reply is in the web chat (#1770: after its files are copied); the caller need not wait. */
@@ -2512,6 +2538,15 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2512
2538
  * "not found", as for an id that does not exist, and changes nothing. Project and fleet decisions: as before.
2513
2539
  */
2514
2540
  decisionHiddenFrom(instance: string, id: unknown): string | null;
2541
+ /** A ClassicBot agent's own folder — where startClassicInstance launches it, and its project for decisions (#3454). */
2542
+ classicWorkspaceDir(instanceName: string): string;
2543
+ /**
2544
+ * #3454: the project root of an agent calling the agent endpoint (CLI mode), as the MCP path has it from the daemon's
2545
+ * own working directory. A fleet instance: its fleet.yaml working_directory, as before. A ClassicBot agent (not in
2546
+ * fleet.yaml): its own workspace — it used to fall back to "", one project shared by every CLI-mode ClassicBot room.
2547
+ * Anything else: null, and the caller refuses rather than guess.
2548
+ */
2549
+ decisionProjectRootFor(instance: string): string | null;
2515
2550
  handleDecisionCrudHttp(instance: string, op: string, args: Record<string, unknown>): Promise<unknown>;
2516
2551
  handleTaskCrudHttp(instance: string, args: Record<string, unknown>): Promise<unknown>;
2517
2552
  handleSetDisplayNameHttp(instance: string, name: string): Promise<unknown>;
@@ -3397,6 +3432,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
3397
3432
  command: string;
3398
3433
  args?: string;
3399
3434
  confirm?: string;
3435
+ action?: import("./web-commands.js").WebModelAction;
3400
3436
  }, opts: {
3401
3437
  publicLink: boolean;
3402
3438
  person?: Pick<WebPersonView, "userId" | "name">;
@@ -4025,6 +4061,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
4025
4061
  private persistCliEnvProbeResult;
4026
4062
  /** Background-probe every distinct backend in use at startup (non-blocking). */
4027
4063
  private probeCliEnvs;
4064
+ /** Maintain discovery after committed config changes; a model-field read remains passive. */
4065
+ private probeChangedCliEnvs;
4028
4066
  /** Best-effort model list for `/model`: cached CLI env first, else live probe. Never throws. */
4029
4067
  private getModelOptions;
4030
4068
  /**
@@ -4206,7 +4244,19 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
4206
4244
  * #2072 part 3: the models a Settings field offers for `backend` — the cached catalog (an instance's own credential
4207
4245
  * profile's, when it is named and has one), claude's account catalog included. Read only: never a probe.
4208
4246
  */
4247
+ private webModelTargetIds;
4248
+ private webModelTargetSequence;
4249
+ private webModelCatalogs;
4250
+ private webModelRefreshes;
4251
+ /** Resolve only trusted config; the browser never supplies a home, provider URL or credentials. */
4252
+ private webModelBinding;
4253
+ private webModelEnv;
4209
4254
  modelCatalogFor(backend: string, instance: string | null): import("./backend/types.js").ModelOption[];
4255
+ /** Explicit, bounded vendor rediscovery. Never publish an answer under a different account/config/instance. */
4256
+ refreshModelCatalogFor(backend: string, instance: string | null): Promise<{
4257
+ models: import("./backend/types.js").ModelOption[];
4258
+ refreshed: boolean;
4259
+ }>;
4210
4260
  /**
4211
4261
  * #2072 (#2078 review): the snapshot as THIS instance would see it. Its sign-in on a backend is its own credential
4212
4262
  * profile's when it has one there — the host's default login says nothing about it. A profile's login is a file check
@@ -4574,7 +4624,28 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
4574
4624
  };
4575
4625
  private runSettingsApply;
4576
4626
  restartInstances(): Promise<void>;
4627
+ /** The running package's version (package.json next to this code). */
4628
+ private runningAgendVersion;
4629
+ /**
4630
+ * What the install's own channel offers: the target version and whether it came from that channel's dist-tag. Throws
4631
+ * when npm cannot be asked (the callers decide what a failed look means).
4632
+ */
4633
+ private lookUpUpdateTarget;
4634
+ /** M-2738: record a look's answer for the web — the same offer the notice below would make. */
4635
+ private recordUpdateCheck;
4577
4636
  private checkForUpdates;
4637
+ /** The web's update routes (web-api.ts handleWebUpdate) read and start through this. */
4638
+ get webUpdate(): WebUpdateHost;
4639
+ /** "Check for updates": look now, no chat notice. One a minute; a second ask while one runs waits for it. */
4640
+ private checkUpdateNow;
4641
+ /**
4642
+ * M-2738: Update from the web — a fleet admin's session, after its own confirmation (the leader's D1). Only what the
4643
+ * last check offers as installable; the update itself is chat `/update`'s (launchInstalledUpdate). Its progress marker
4644
+ * targets no chat message (WEB_UPDATE_ADAPTER); the page reads the stages the updater writes into it.
4645
+ */
4646
+ private startWebUpdate;
4647
+ /** M-2738: a web start's answer for its key, the same on a retry (at most 32 kept). */
4648
+ private startWebUpdateOnce;
4578
4649
  /**
4579
4650
  * Semver "a > b". Compares major.minor.patch numerically; a version without a
4580
4651
  * prerelease outranks the same core with one (2.0.8 > 2.0.8-beta.16); two