agentix-cli 0.64.0 → 0.66.0

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 (48) hide show
  1. package/apps/mac-voice/Sources/AgentXVoice/AgentClient.swift +29 -8
  2. package/apps/mac-voice/Sources/AgentXVoice/MiniOrbs.swift +219 -0
  3. package/apps/mac-voice/Sources/AgentXVoice/Panel.swift +32 -3
  4. package/apps/mac-voice/Sources/AgentXVoice/PillBusy.swift +126 -0
  5. package/apps/mac-voice/Sources/AgentXVoice/StatusMenu.swift +53 -12
  6. package/apps/mac-voice/Sources/AgentXVoice/main.swift +49 -3
  7. package/dist/{agent-3M5EI4S6.js → agent-BQ5CCARE.js} +2 -2
  8. package/dist/{board-dashboard-JBRO26JC.js → board-dashboard-K3P2M7A7.js} +877 -375
  9. package/dist/board-dashboard-K3P2M7A7.js.map +1 -0
  10. package/dist/{chunk-WWMFNLKD.js → chunk-2NYP4OQU.js} +3 -3
  11. package/dist/chunk-2NYP4OQU.js.map +1 -0
  12. package/dist/{chunk-KZDG26LI.js → chunk-6CFAF5CH.js} +2 -2
  13. package/dist/{chunk-VUB6XYWD.js → chunk-AWKZ3BF2.js} +54 -54
  14. package/dist/chunk-AWKZ3BF2.js.map +1 -0
  15. package/dist/{chunk-HYKILAEJ.js → chunk-BBXBSM4R.js} +183 -183
  16. package/dist/chunk-BBXBSM4R.js.map +1 -0
  17. package/dist/{chunk-VVQDKHF5.js → chunk-EPTZ6JMA.js} +4 -4
  18. package/dist/chunk-JWDJMFU6.js +4 -0
  19. package/dist/chunk-JWDJMFU6.js.map +1 -0
  20. package/dist/{chunk-S2VETB7B.js → chunk-YDHI2CJG.js} +26 -26
  21. package/dist/chunk-YDHI2CJG.js.map +1 -0
  22. package/dist/{chunk-NNXHRO7H.js → chunk-ZIEUP56T.js} +17 -17
  23. package/dist/chunk-ZIEUP56T.js.map +1 -0
  24. package/dist/cli.js +1 -1
  25. package/dist/index.d.ts +2 -0
  26. package/dist/index.js +1 -1
  27. package/dist/{program-FSRL275V.js → program-4W45H3J2.js} +2 -2
  28. package/dist/push-announce-PM5FZJRW.js +3 -0
  29. package/dist/push-announce-PM5FZJRW.js.map +1 -0
  30. package/dist/push-prefs-YOJNTOJF.js +2 -0
  31. package/dist/push-store-5VJ4FNI4.js +2 -0
  32. package/dist/registry-TERSIHOC.js +2 -0
  33. package/dist/registry-TERSIHOC.js.map +1 -0
  34. package/package.json +1 -1
  35. package/dist/board-dashboard-JBRO26JC.js.map +0 -1
  36. package/dist/chunk-HYKILAEJ.js.map +0 -1
  37. package/dist/chunk-NNXHRO7H.js.map +0 -1
  38. package/dist/chunk-S2VETB7B.js.map +0 -1
  39. package/dist/chunk-VUB6XYWD.js.map +0 -1
  40. package/dist/chunk-WWMFNLKD.js.map +0 -1
  41. package/dist/push-store-LXTYULUF.js +0 -2
  42. package/dist/registry-T4R7LVFZ.js +0 -2
  43. /package/dist/{agent-3M5EI4S6.js.map → agent-BQ5CCARE.js.map} +0 -0
  44. /package/dist/{chunk-KZDG26LI.js.map → chunk-6CFAF5CH.js.map} +0 -0
  45. /package/dist/{chunk-VVQDKHF5.js.map → chunk-EPTZ6JMA.js.map} +0 -0
  46. /package/dist/{program-FSRL275V.js.map → program-4W45H3J2.js.map} +0 -0
  47. /package/dist/{push-store-LXTYULUF.js.map → push-prefs-YOJNTOJF.js.map} +0 -0
  48. /package/dist/{registry-T4R7LVFZ.js.map → push-store-5VJ4FNI4.js.map} +0 -0
@@ -92,6 +92,37 @@ final class App: NSObject, NSApplicationDelegate {
92
92
  statusMenu.thinking = counts
93
93
  }
94
94
 
95
+ /// Busy agents in the order their mini orbs first appeared.
96
+ private var busyOrder: [String] = []
97
+
98
+ /// The pill's mini orbs, one per busy agent (#266): questions in
99
+ /// flight or waiting here, answers waiting in or playing from the
100
+ /// daemon's speaking queue. Called when any of those change.
101
+ private func refreshBusy() {
102
+ let queue = statusMenu.queue
103
+ var snap = PillBusy.Snapshot()
104
+ snap.inFlight = inFlight
105
+ snap.waiting = waitingAsides.mapValues(\.count)
106
+ snap.playing = queue?.playing?.agentId
107
+ snap.toSpeak = queue?.waiting.compactMap(\.agentId) ?? []
108
+ let items = PillBusy.items(snap, order: busyOrder)
109
+ busyOrder = items.map(\.agentID)
110
+ let mainActive = recorder.isRecording || busy || asideSpeaker != nil
111
+ guard PillBusy.showsRow(items, mainAgent: shownAgent, mainActive: mainActive) else {
112
+ panel.showBusy([], more: 0)
113
+ return
114
+ }
115
+ let (count, more) = PillBusy.shown(items.count)
116
+ let orbs = items.prefix(count).map { item in
117
+ MiniOrbsModel.Orb(
118
+ agentID: item.agentID, activity: item.activity, queued: item.queued,
119
+ tint: statusMenu.color(of: item.agentID), colors: statusMenu.palette(of: item.agentID),
120
+ tooltip: PillBusy.tooltip(name: statusMenu.name(of: item.agentID),
121
+ node: statusMenu.node(of: item.agentID) ?? "this Mac", item: item))
122
+ }
123
+ panel.showBusy(Array(orbs), more: more)
124
+ }
125
+
95
126
  // --- Shortcuts ---
96
127
  //
97
128
  // Talk, stop and smart paste come from agentx.json (voice.hotkeys),
@@ -241,7 +272,12 @@ final class App: NSObject, NSApplicationDelegate {
241
272
  func applicationDidFinishLaunching(_ note: Notification) {
242
273
  NSApp.setActivationPolicy(.accessory)
243
274
  retireOlderInstances()
244
- panel.onRender = { [weak self] state in self?.statusMenu.show(state) }
275
+ panel.onRender = { [weak self] state in
276
+ self?.statusMenu.show(state)
277
+ // Who the main orb shows may have changed.
278
+ self?.refreshBusy()
279
+ }
280
+ statusMenu.onActivity = { [weak self] in self?.refreshBusy() }
245
281
  panel.contextMenu = { [weak self] in self?.statusMenu.menu ?? NSMenu() }
246
282
  panel.agentName = { [weak self] in
247
283
  guard let self else { return "" }
@@ -254,6 +290,7 @@ final class App: NSObject, NSApplicationDelegate {
254
290
  }
255
291
  panel.alwaysVisible = Config.showPill
256
292
  panel.orb.setAnimated(Config.animatedOrb)
293
+ panel.miniOrbs.setAnimated(Config.animatedOrb)
257
294
  panel.orb.levelSource = { [weak self] in self?.recorder.level ?? 0 }
258
295
  panel.onDismiss = { [weak self] in self?.dismissPill() }
259
296
  panel.agentPalette = { [weak self] in
@@ -264,7 +301,10 @@ final class App: NSObject, NSApplicationDelegate {
264
301
  statusMenu.pillVisible = { [weak self] in self?.panel.isVisible ?? false }
265
302
  statusMenu.onHidePill = { [weak self] in self?.dismissPill() }
266
303
  statusMenu.onResetPosition = { [weak self] in self?.panel.resetPosition() }
267
- statusMenu.onAnimatedOrbChanged = { [weak self] on in self?.panel.orb.setAnimated(on) }
304
+ statusMenu.onAnimatedOrbChanged = { [weak self] on in
305
+ self?.panel.orb.setAnimated(on)
306
+ self?.panel.miniOrbs.setAnimated(on)
307
+ }
268
308
  panel.render(.idle)
269
309
  statusMenu.onPillChanged = { [weak self] on in
270
310
  guard let self else { return }
@@ -500,7 +540,13 @@ final class App: NSObject, NSApplicationDelegate {
500
540
  // stays. An agent's own shortcut already said who.
501
541
  let agent: String
502
542
  if let forced { agent = forced }
503
- else { agent = await AgentClient.address(heard, target: Config.effectiveAgentID) }
543
+ else {
544
+ // Any agent on the mesh, by name. One on another node is
545
+ // remembered, so the pill and the menu can name and colour it.
546
+ let addressed = await AgentClient.address(heard, target: Config.effectiveAgentID)
547
+ statusMenu.learn(addressed)
548
+ agent = addressed.agentID
549
+ }
504
550
  if midTurn {
505
551
  // Another agent: ask it alongside ours rather than waiting.
506
552
  if agent != turnAgent && !Self.isStop(heard) {
@@ -1,2 +1,2 @@
1
- import{A as a,B as b,C as c}from"./chunk-KZDG26LI.js";import"./chunk-SFQUP3BP.js";import"./chunk-QOYAX2FT.js";import"./chunk-SZJMS7K4.js";import"./chunk-7I7IEX4S.js";import"./chunk-VDMYBPYB.js";import"./chunk-DSYKYZMT.js";import"./chunk-QIJLFPWE.js";export{a as createAgentContext,b as generate,c as generateStream};
2
- //# sourceMappingURL=agent-3M5EI4S6.js.map
1
+ import{A as a,B as b,C as c}from"./chunk-6CFAF5CH.js";import"./chunk-SFQUP3BP.js";import"./chunk-QOYAX2FT.js";import"./chunk-SZJMS7K4.js";import"./chunk-7I7IEX4S.js";import"./chunk-VDMYBPYB.js";import"./chunk-DSYKYZMT.js";import"./chunk-QIJLFPWE.js";export{a as createAgentContext,b as generate,c as generateStream};
2
+ //# sourceMappingURL=agent-BQ5CCARE.js.map