mouaif 0.3.0 → 0.3.2

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 (37) hide show
  1. package/README.md +1 -1
  2. package/bin/mouaif.js +1 -5
  3. package/frontend/dist/assets/{AgentFilePicker-CcKLJorU.js → AgentFilePicker-ZW6vm5Hy.js} +1 -1
  4. package/frontend/dist/assets/{CliModal-Hs5phmNZ.js → CliModal-D2cX4W0a.js} +1 -1
  5. package/frontend/dist/assets/{DictationPage-BI23lp42.js → DictationPage-Dwb6gGNi.js} +1 -1
  6. package/frontend/dist/assets/{FileEditor-DDl31c6d.js → FileEditor-BqgbeJHy.js} +1 -1
  7. package/frontend/dist/assets/{GitModal-3EC_gpJ5.js → GitModal-BPaOnX1a.js} +1 -1
  8. package/frontend/dist/assets/{Inspector-Ba3R1w04.js → Inspector-C88hoEcC.js} +1 -1
  9. package/frontend/dist/assets/{SettingsAbout-bvZGDEDw.js → SettingsAbout-D5gHujOy.js} +1 -1
  10. package/frontend/dist/assets/{SettingsActions-Dk6WX9jv.js → SettingsActions-YrcVF8D3.js} +1 -1
  11. package/frontend/dist/assets/{SettingsAgents-BNV0MgDB.js → SettingsAgents-BVwBxPbO.js} +1 -1
  12. package/frontend/dist/assets/{SettingsDefaults-DbMmQbzc.js → SettingsDefaults-CMSIeSt8.js} +1 -1
  13. package/frontend/dist/assets/{SettingsHiddenContent-BZ2sloH1.js → SettingsHiddenContent-XE1HiHzN.js} +1 -1
  14. package/frontend/dist/assets/{SettingsMcp-DOrfbQd1.js → SettingsMcp-BAK8U0e4.js} +1 -1
  15. package/frontend/dist/assets/{SettingsMcpEdit-BGMQ2CWC.js → SettingsMcpEdit-j21BWCAH.js} +1 -1
  16. package/frontend/dist/assets/{SettingsMcpRegistry-BywXee_A.js → SettingsMcpRegistry-DH5YAigF.js} +1 -1
  17. package/frontend/dist/assets/{SettingsNotifications-B0LEs11a.js → SettingsNotifications-DJt0f8Jn.js} +1 -1
  18. package/frontend/dist/assets/{SettingsPricing-BAg33iVF.js → SettingsPricing-Csy5MjG-.js} +1 -1
  19. package/frontend/dist/assets/{SettingsProject-DNrKhCcZ.js → SettingsProject-Cry5UltF.js} +1 -1
  20. package/frontend/dist/assets/{SettingsProjects-IqkBfDcm.js → SettingsProjects-d3wgiADv.js} +1 -1
  21. package/frontend/dist/assets/{SettingsPrompts-BgeiASuk.js → SettingsPrompts-B9ECDKEa.js} +1 -1
  22. package/frontend/dist/assets/{SettingsProviders-k0xJN0IK.js → SettingsProviders-BalA35c9.js} +1 -1
  23. package/frontend/dist/assets/{SettingsTags-B5kjFdQi.js → SettingsTags-D_1AgCwY.js} +1 -1
  24. package/frontend/dist/assets/index-BDkCsON6.js +61 -0
  25. package/frontend/dist/assets/index-FzhcinOk.css +1 -0
  26. package/frontend/dist/index.html +2 -2
  27. package/frontend/dist/sw.js +1 -1
  28. package/package.json +6 -7
  29. package/src/access-auth.js +1 -86
  30. package/src/http-server.js +2 -9
  31. package/src/pty.js +189 -0
  32. package/src/server-handlers-access.js +1 -101
  33. package/src/server-handlers-tools.js +25 -36
  34. package/src/server-shared.js +1 -14
  35. package/src/statusBar.js +19 -8
  36. package/frontend/dist/assets/index-BGvI4n0T.js +0 -61
  37. package/frontend/dist/assets/index-CANPYzQg.css +0 -1
package/src/statusBar.js CHANGED
@@ -29,7 +29,7 @@
29
29
  // from turning the bar into a ruler.
30
30
  const MIN_CELLS = 4;
31
31
  const MAX_CELLS = 32;
32
- // Characters a bar row adds around its cells: `[` + cells + `]` + ` 100%`.
32
+ // Characters a bar row adds around its cells: `[` + cells + `]` + a gap + ` 100%`.
33
33
  const BAR_OVERHEAD_CHARS = 7;
34
34
  // On a one-line style the bar shares its line with the message, so it takes
35
35
  // at most this share of the line and leaves the rest for the text.
@@ -55,6 +55,10 @@ const MIN_INLINE_INFO_CHARS = 8;
55
55
  const DETAIL_LINES_INLINE = 1;
56
56
  const DETAIL_LINES_PREVIEW = 3;
57
57
  const DETAIL_LINES_EXPANDED = 6;
58
+ // Between the bar and its percentage. A NON-BREAKING space, not U+0020: the
59
+ // two are one unit, so an OS wrapping the body cannot separate `40%` from the
60
+ // bar it labels. Counted as one character by BAR_OVERHEAD_CHARS either way.
61
+ const PERCENT_GAP = '\u00A0';
58
62
  // Truncation marker for a message clipped to fit a line. Kept ASCII for the
59
63
  // same reason the bar is: notification fonts render it consistently.
60
64
  const ELLIPSIS = '...';
@@ -492,26 +496,33 @@ function planForSubscription(sub) {
492
496
 
493
497
  // ---- Rendering --------------------------------------------------------
494
498
 
495
- // asciiStatusBar(percent, cells) -> '[##----] 40%'
499
+ // asciiStatusBar(percent, cells) -> '[##----]\u00A040%'
496
500
  //
497
- // Pure ASCII (`#` filled, `-` empty) — no Unicode block glyphs, which render
498
- // inconsistently across Android, iOS, and desktop notification fonts.
499
- // `percent == null` means "no measurable progress" (an error): the bar is
500
- // empty and carries no label. Any non-zero progress lights at least one cell,
501
- // so a fine bar never reads as empty at the start of a task.
501
+ // Pure ASCII bar glyphs (`#` filled, `-` empty) — no Unicode block glyphs,
502
+ // which render inconsistently across Android, iOS, and desktop notification
503
+ // fonts. `percent == null` means "no measurable progress" (an error): the bar
504
+ // is empty and carries no label. Any non-zero progress lights at least one
505
+ // cell, so a fine bar never reads as empty at the start of a task.
506
+ //
507
+ // The gap before the percentage is a NON-BREAKING space, so the bar and its
508
+ // number are one unbreakable token: an OS that wraps the body (its own font is
509
+ // larger and proportional, unlike the monospace the width was measured with)
510
+ // can push the whole `[####----] 40%` pair to the next line, but can never
511
+ // split `40%` off the bar it describes.
502
512
  function asciiStatusBar(percent, cells) {
503
513
  const width = clamp(Math.round(Number(cells) || MIN_CELLS), MIN_CELLS, MAX_CELLS);
504
514
  const normalized = percent == null ? null : clamp(Math.round(Number(percent) || 0), 0, 100);
505
515
  const filled = normalized == null ? 0
506
516
  : (normalized > 0 ? Math.max(1, Math.round((normalized / 100) * width)) : 0);
507
517
  return '[' + '#'.repeat(filled) + '-'.repeat(width - filled) + ']'
508
- + (normalized == null ? '' : ' ' + normalized + '%');
518
+ + (normalized == null ? '' : PERCENT_GAP + normalized + '%');
509
519
  }
510
520
 
511
521
  module.exports = {
512
522
  MIN_CELLS,
513
523
  MAX_CELLS,
514
524
  BAR_OVERHEAD_CHARS,
525
+ PERCENT_GAP,
515
526
  SEPARATOR,
516
527
  INLINE_SEPARATOR,
517
528
  INLINE_BAR_SHARE,