@songsid/agend 2.1.2-beta.13 → 2.1.2-beta.15

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.
@@ -5681,7 +5681,15 @@ When users create specialized instances, suggest these configurations:
5681
5681
  this.logger.info({ url: `http://localhost:${port}/view?token=${this.viewToken}` }, "Web View available");
5682
5682
  }
5683
5683
  getUiStatus() {
5684
- const instances = Object.keys(this.fleetConfig?.instances ?? {}).map(name => {
5684
+ const fleetNames = Object.keys(this.fleetConfig?.instances ?? {});
5685
+ // Classic rooms live only in classicBot.yaml — /api/profiles merges them into
5686
+ // the View roster, but previously getUiStatus skipped them so context_pct was
5687
+ // always 0 (live map miss → l?.context_pct ?? 0).
5688
+ const classicOnly = (this.classicChannels?.getAll() ?? [])
5689
+ .map(ch => ch.instanceName)
5690
+ .filter(name => !fleetNames.includes(name));
5691
+ const names = [...fleetNames, ...classicOnly];
5692
+ const instances = names.map(name => {
5685
5693
  const statusFile = join(this.getInstanceDir(name), "statusline.json");
5686
5694
  let cost = 0;
5687
5695
  let model = "";
@@ -5694,11 +5702,12 @@ When users create specialized instances, suggest these configurations:
5694
5702
  this.logger.debug({ err, name }, "statusline.json read failed (getUiStatus)");
5695
5703
  }
5696
5704
  // Align with /ctx: statusline for claude-code, pane scrape for kiro/grok/codex.
5697
- // Previously only statusline.json was read, so View sidebar ctx% was always 0
5698
- // for every non-claude backend.
5699
- const backend = this.fleetConfig?.instances[name]?.backend
5700
- ?? this.fleetConfig?.defaults?.backend
5701
- ?? "claude-code";
5705
+ const classic = classicOnly.includes(name);
5706
+ const backend = classic
5707
+ ? this.classicChannels.getBackendByInstance(name, this.fleetConfig?.defaults?.backend)
5708
+ : (this.fleetConfig?.instances[name]?.backend
5709
+ ?? this.fleetConfig?.defaults?.backend
5710
+ ?? "claude-code");
5702
5711
  const { context } = resolveInstanceContext(this.dataDir, name, backend);
5703
5712
  const context_pct = context ?? 0;
5704
5713
  return { name, status: this.getInstanceStatus(name), context_pct, cost, model };