@a-t-h-i/bot-lobby 0.6.48 → 0.6.50

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 (61) hide show
  1. package/README.md +2 -2
  2. package/THIRD_PARTY_NOTICES.md +4 -3
  3. package/package.json +9 -7
  4. package/prompts/designer.md +15 -1
  5. package/prompts/master.md +4 -1
  6. package/src/ask/project-styles.ts +64 -0
  7. package/src/ask/tool.ts +23 -4
  8. package/src/ask/types.ts +1 -1
  9. package/src/ask/web.ts +27 -6
  10. package/src/classifier/classifier.ts +14 -2
  11. package/src/classifier/hosts.ts +12 -18
  12. package/src/classifier/instance.ts +7 -4
  13. package/src/execution/delegation.ts +2 -1
  14. package/src/execution/pi-runner.ts +11 -2
  15. package/src/lobby/host.ts +6 -0
  16. package/src/lobby/keys.ts +2 -1
  17. package/src/lobby/service.ts +75 -7
  18. package/src/lobby/session-questions.ts +49 -0
  19. package/src/lobby/sessions.ts +66 -0
  20. package/src/pi/auto-compaction.ts +46 -19
  21. package/src/pi/events.ts +2 -0
  22. package/src/pi/fresh-context.ts +10 -8
  23. package/src/pi/plan-checklist.ts +47 -15
  24. package/src/pi/tools.ts +2 -2
  25. package/src/schemas/task.ts +14 -0
  26. package/src/state/persistence.ts +4 -1
  27. package/src/webui/api/index.ts +36 -2
  28. package/src/webui/api/lobby.ts +1 -1
  29. package/src/webui/api/plan-facts.ts +9 -4
  30. package/src/webui/api/sessions.ts +21 -0
  31. package/src/webui/api/tasks.ts +12 -1
  32. package/src/webui/api/terminal.ts +42 -0
  33. package/src/webui/dev/fake-service.ts +42 -1
  34. package/src/webui/palette-core.ts +228 -228
  35. package/src/webui/protocol.ts +29 -2
  36. package/src/webui/server.ts +16 -1
  37. package/src/webui/terminal.ts +292 -0
  38. package/src/workflow/workflow.ts +3 -2
  39. package/webui/dist/assets/TerminalView-BrP-ENHg.css +1 -0
  40. package/webui/dist/assets/TerminalView-D_j85u4O.js +16 -0
  41. package/webui/dist/assets/dm-sans-latin-wght-normal-Xz1IZZA0.woff2 +0 -0
  42. package/webui/dist/assets/figtree-latin-wght-normal-D_ZTVpCC.woff2 +0 -0
  43. package/webui/dist/assets/fira-code-latin-wght-normal-CHoedHDv.woff2 +0 -0
  44. package/webui/dist/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
  45. package/webui/dist/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2 +0 -0
  46. package/webui/dist/assets/ibm-plex-sans-latin-wght-normal-IvpUvPa2.woff2 +0 -0
  47. package/webui/dist/assets/index-BkM--P3x.js +115 -0
  48. package/webui/dist/assets/index-DrHXotS7.css +2 -0
  49. package/webui/dist/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
  50. package/webui/dist/assets/manrope-latin-wght-normal-DHIcAJRg.woff2 +0 -0
  51. package/webui/dist/assets/nunito-latin-wght-normal-BzFMHfZw.woff2 +0 -0
  52. package/webui/dist/assets/outfit-latin-wght-normal-Bc-8i84L.woff2 +0 -0
  53. package/webui/dist/assets/plus-jakarta-sans-latin-wght-normal-eXO_dkmS.woff2 +0 -0
  54. package/webui/dist/assets/roboto-mono-latin-wght-normal-CZtBPCCa.woff2 +0 -0
  55. package/webui/dist/assets/source-code-pro-latin-wght-normal-BP8Zz55n.woff2 +0 -0
  56. package/webui/dist/assets/source-sans-3-latin-wght-normal-Bo_j9asI.woff2 +0 -0
  57. package/webui/dist/assets/space-grotesk-latin-wght-normal-BhU9QXUp.woff2 +0 -0
  58. package/webui/dist/build.json +110 -94
  59. package/webui/dist/index.html +2 -2
  60. package/webui/dist/assets/index-B5AnxwRU.css +0 -2
  61. package/webui/dist/assets/index-CznnCkjK.js +0 -114
@@ -647,276 +647,276 @@ export const PRESETS: readonly Palette[] = [
647
647
  id: "graphite",
648
648
  name: "Graphite",
649
649
  light: {
650
- "background": "oklch(0.985 0 260)",
651
- "foreground": "oklch(0.25 0 260)",
652
- "card": "oklch(0.997 0 260)",
653
- "card-foreground": "oklch(0.25 0 260)",
654
- "popover": "oklch(0.997 0 260)",
655
- "popover-foreground": "oklch(0.25 0 260)",
656
- "primary": "oklch(0.32 0 0)",
657
- "primary-foreground": "oklch(0.99 0 0)",
658
- "secondary": "oklch(0.94 0 260)",
659
- "secondary-foreground": "oklch(0.25 0 260)",
660
- "muted": "oklch(0.955 0 260)",
661
- "muted-foreground": "oklch(0.48 0 260)",
662
- "accent": "oklch(0.93 0 260)",
663
- "accent-foreground": "oklch(0.25 0 260)",
664
- "destructive": "oklch(0.56 0.2 25)",
665
- "border": "oklch(0.9 0 260)",
666
- "input": "oklch(0.85 0 260)",
667
- "ring": "oklch(0.32 0 0)",
668
- "chart-1": "oklch(0.32 0 0)",
650
+ "background": "#fafafa",
651
+ "foreground": "#222222",
652
+ "card": "#fefefe",
653
+ "card-foreground": "#222222",
654
+ "popover": "#fefefe",
655
+ "popover-foreground": "#222222",
656
+ "primary": "#333333",
657
+ "primary-foreground": "#fcfcfc",
658
+ "secondary": "#ebebeb",
659
+ "secondary-foreground": "#222222",
660
+ "muted": "#f0f0f0",
661
+ "muted-foreground": "#5d5d5d",
662
+ "accent": "#e8e8e8",
663
+ "accent-foreground": "#222222",
664
+ "destructive": "#d02b31",
665
+ "border": "#dedede",
666
+ "input": "#cecece",
667
+ "ring": "#333333",
668
+ "chart-1": "#333333",
669
669
  },
670
670
  dark: {
671
- "background": "oklch(0.18 0 260)",
672
- "foreground": "oklch(0.95 0 260)",
673
- "card": "oklch(0.215 0 260)",
674
- "card-foreground": "oklch(0.95 0 260)",
675
- "popover": "oklch(0.245 0 260)",
676
- "popover-foreground": "oklch(0.95 0 260)",
677
- "primary": "oklch(0.92 0 0)",
678
- "primary-foreground": "oklch(0.18 0 260)",
679
- "secondary": "oklch(0.28 0 260)",
680
- "secondary-foreground": "oklch(0.95 0 260)",
681
- "muted": "oklch(0.26 0 260)",
682
- "muted-foreground": "oklch(0.74 0 260)",
683
- "accent": "oklch(0.32 0 260)",
684
- "accent-foreground": "oklch(0.95 0 260)",
685
- "destructive": "oklch(0.7 0.17 22)",
686
- "border": "oklch(0.32 0 260)",
687
- "input": "oklch(0.38 0 260)",
688
- "ring": "oklch(0.92 0 0)",
689
- "chart-1": "oklch(0.92 0 0)",
671
+ "background": "#121212",
672
+ "foreground": "#eeeeee",
673
+ "card": "#191919",
674
+ "card-foreground": "#eeeeee",
675
+ "popover": "#202020",
676
+ "popover-foreground": "#eeeeee",
677
+ "primary": "#e4e4e4",
678
+ "primary-foreground": "#121212",
679
+ "secondary": "#292929",
680
+ "secondary-foreground": "#eeeeee",
681
+ "muted": "#242424",
682
+ "muted-foreground": "#ababab",
683
+ "accent": "#333333",
684
+ "accent-foreground": "#eeeeee",
685
+ "destructive": "#f66c6d",
686
+ "border": "#333333",
687
+ "input": "#424242",
688
+ "ring": "#e4e4e4",
689
+ "chart-1": "#e4e4e4",
690
690
  },
691
691
  },
692
692
  {
693
693
  id: "lagoon",
694
694
  name: "Lagoon",
695
695
  light: {
696
- "background": "oklch(0.985 0.0096 200)",
697
- "foreground": "oklch(0.25 0.03 200)",
698
- "card": "oklch(0.997 0.0048 200)",
699
- "card-foreground": "oklch(0.25 0.03 200)",
700
- "popover": "oklch(0.997 0.0048 200)",
701
- "popover-foreground": "oklch(0.25 0.03 200)",
702
- "primary": "oklch(0.55 0.12 200)",
703
- "primary-foreground": "oklch(0.99 0 0)",
704
- "secondary": "oklch(0.94 0.03 200)",
705
- "secondary-foreground": "oklch(0.25 0.03 200)",
706
- "muted": "oklch(0.955 0.018 200)",
707
- "muted-foreground": "oklch(0.48 0.036 200)",
708
- "accent": "oklch(0.93 0.048 200)",
709
- "accent-foreground": "oklch(0.25 0.03 200)",
710
- "destructive": "oklch(0.56 0.2 25)",
711
- "border": "oklch(0.9 0.024 200)",
712
- "input": "oklch(0.85 0.03 200)",
713
- "ring": "oklch(0.55 0.12 200)",
714
- "chart-1": "oklch(0.55 0.12 200)",
696
+ "background": "#f3fcfd",
697
+ "foreground": "#0e2627",
698
+ "card": "#fbffff",
699
+ "card-foreground": "#0e2627",
700
+ "popover": "#fbffff",
701
+ "popover-foreground": "#0e2627",
702
+ "primary": "#007780",
703
+ "primary-foreground": "#fcfcfc",
704
+ "secondary": "#d5f2f3",
705
+ "secondary-foreground": "#0e2627",
706
+ "muted": "#e3f4f5",
707
+ "muted-foreground": "#456466",
708
+ "accent": "#c3f2f4",
709
+ "accent-foreground": "#0e2627",
710
+ "destructive": "#d02b31",
711
+ "border": "#cde3e4",
712
+ "input": "#b8d4d5",
713
+ "ring": "#007780",
714
+ "chart-1": "#007780",
715
715
  },
716
716
  dark: {
717
- "background": "oklch(0.18 0.024 200)",
718
- "foreground": "oklch(0.95 0.0096 200)",
719
- "card": "oklch(0.215 0.0264 200)",
720
- "card-foreground": "oklch(0.95 0.0096 200)",
721
- "popover": "oklch(0.245 0.0264 200)",
722
- "popover-foreground": "oklch(0.95 0.0096 200)",
723
- "primary": "oklch(0.76 0.102 200)",
724
- "primary-foreground": "oklch(0.18 0.024 200)",
725
- "secondary": "oklch(0.28 0.03 200)",
726
- "secondary-foreground": "oklch(0.95 0.0096 200)",
727
- "muted": "oklch(0.26 0.024 200)",
728
- "muted-foreground": "oklch(0.74 0.0216 200)",
729
- "accent": "oklch(0.32 0.048 200)",
730
- "accent-foreground": "oklch(0.95 0.0096 200)",
731
- "destructive": "oklch(0.7 0.17 22)",
732
- "border": "oklch(0.32 0.03 200)",
733
- "input": "oklch(0.38 0.03 200)",
734
- "ring": "oklch(0.76 0.102 200)",
735
- "chart-1": "oklch(0.76 0.102 200)",
717
+ "background": "#041516",
718
+ "foreground": "#e8f1f1",
719
+ "card": "#091d1e",
720
+ "card-foreground": "#e8f1f1",
721
+ "popover": "#102425",
722
+ "popover-foreground": "#e8f1f1",
723
+ "primary": "#53c5cb",
724
+ "primary-foreground": "#041516",
725
+ "secondary": "#162d2f",
726
+ "secondary-foreground": "#e8f1f1",
727
+ "muted": "#152829",
728
+ "muted-foreground": "#9cafb0",
729
+ "accent": "#0c3a3c",
730
+ "accent-foreground": "#e8f1f1",
731
+ "destructive": "#f66c6d",
732
+ "border": "#203839",
733
+ "input": "#2f4749",
734
+ "ring": "#53c5cb",
735
+ "chart-1": "#53c5cb",
736
736
  },
737
737
  },
738
738
  {
739
739
  id: "dune",
740
740
  name: "Dune",
741
741
  light: {
742
- "background": "oklch(0.985 0.0096 70)",
743
- "foreground": "oklch(0.25 0.03 70)",
744
- "card": "oklch(0.997 0.0048 70)",
745
- "card-foreground": "oklch(0.25 0.03 70)",
746
- "popover": "oklch(0.997 0.0048 70)",
747
- "popover-foreground": "oklch(0.25 0.03 70)",
748
- "primary": "oklch(0.55 0.12 70)",
749
- "primary-foreground": "oklch(0.99 0 0)",
750
- "secondary": "oklch(0.94 0.03 70)",
751
- "secondary-foreground": "oklch(0.25 0.03 70)",
752
- "muted": "oklch(0.955 0.018 70)",
753
- "muted-foreground": "oklch(0.48 0.036 70)",
754
- "accent": "oklch(0.93 0.048 70)",
755
- "accent-foreground": "oklch(0.25 0.03 70)",
756
- "destructive": "oklch(0.56 0.2 25)",
757
- "border": "oklch(0.9 0.024 70)",
758
- "input": "oklch(0.85 0.03 70)",
759
- "ring": "oklch(0.55 0.12 70)",
760
- "chart-1": "oklch(0.55 0.12 70)",
742
+ "background": "#fef9f3",
743
+ "foreground": "#2b1f11",
744
+ "card": "#fffefb",
745
+ "card-foreground": "#2b1f11",
746
+ "popover": "#fffefb",
747
+ "popover-foreground": "#2b1f11",
748
+ "primary": "#9d6300",
749
+ "primary-foreground": "#fcfcfc",
750
+ "secondary": "#f9e8d6",
751
+ "secondary-foreground": "#2b1f11",
752
+ "muted": "#f8eee4",
753
+ "muted-foreground": "#6b5a48",
754
+ "accent": "#fde3c6",
755
+ "accent-foreground": "#2b1f11",
756
+ "destructive": "#d02b31",
757
+ "border": "#e9dccd",
758
+ "input": "#dbcbb9",
759
+ "ring": "#9d6300",
760
+ "chart-1": "#9d6300",
761
761
  },
762
762
  dark: {
763
- "background": "oklch(0.18 0.024 70)",
764
- "foreground": "oklch(0.95 0.0096 70)",
765
- "card": "oklch(0.215 0.0264 70)",
766
- "card-foreground": "oklch(0.95 0.0096 70)",
767
- "popover": "oklch(0.245 0.0264 70)",
768
- "popover-foreground": "oklch(0.95 0.0096 70)",
769
- "primary": "oklch(0.76 0.102 70)",
770
- "primary-foreground": "oklch(0.18 0.024 70)",
771
- "secondary": "oklch(0.28 0.03 70)",
772
- "secondary-foreground": "oklch(0.95 0.0096 70)",
773
- "muted": "oklch(0.26 0.024 70)",
774
- "muted-foreground": "oklch(0.74 0.0216 70)",
775
- "accent": "oklch(0.32 0.048 70)",
776
- "accent-foreground": "oklch(0.95 0.0096 70)",
777
- "destructive": "oklch(0.7 0.17 22)",
778
- "border": "oklch(0.32 0.03 70)",
779
- "input": "oklch(0.38 0.03 70)",
780
- "ring": "oklch(0.76 0.102 70)",
781
- "chart-1": "oklch(0.76 0.102 70)",
763
+ "background": "#181006",
764
+ "foreground": "#f3ede8",
765
+ "card": "#21170c",
766
+ "card-foreground": "#f3ede8",
767
+ "popover": "#291e12",
768
+ "popover-foreground": "#f3ede8",
769
+ "primary": "#dba666",
770
+ "primary-foreground": "#181006",
771
+ "secondary": "#322618",
772
+ "secondary-foreground": "#f3ede8",
773
+ "muted": "#2c2217",
774
+ "muted-foreground": "#b4a99d",
775
+ "accent": "#422e16",
776
+ "accent-foreground": "#f3ede8",
777
+ "destructive": "#f66c6d",
778
+ "border": "#3d3022",
779
+ "input": "#4d4031",
780
+ "ring": "#dba666",
781
+ "chart-1": "#dba666",
782
782
  },
783
783
  },
784
784
  {
785
785
  id: "plum",
786
786
  name: "Plum",
787
787
  light: {
788
- "background": "oklch(0.985 0.0112 320)",
789
- "foreground": "oklch(0.25 0.035 320)",
790
- "card": "oklch(0.997 0.0056 320)",
791
- "card-foreground": "oklch(0.25 0.035 320)",
792
- "popover": "oklch(0.997 0.0056 320)",
793
- "popover-foreground": "oklch(0.25 0.035 320)",
794
- "primary": "oklch(0.55 0.14 320)",
795
- "primary-foreground": "oklch(0.99 0 0)",
796
- "secondary": "oklch(0.94 0.035 320)",
797
- "secondary-foreground": "oklch(0.25 0.035 320)",
798
- "muted": "oklch(0.955 0.021 320)",
799
- "muted-foreground": "oklch(0.48 0.042 320)",
800
- "accent": "oklch(0.93 0.056 320)",
801
- "accent-foreground": "oklch(0.25 0.035 320)",
802
- "destructive": "oklch(0.56 0.2 25)",
803
- "border": "oklch(0.9 0.028 320)",
804
- "input": "oklch(0.85 0.035 320)",
805
- "ring": "oklch(0.55 0.14 320)",
806
- "chart-1": "oklch(0.55 0.14 320)",
788
+ "background": "#fef8ff",
789
+ "foreground": "#291c2c",
790
+ "card": "#fffdff",
791
+ "card-foreground": "#291c2c",
792
+ "popover": "#fffdff",
793
+ "popover-foreground": "#291c2c",
794
+ "primary": "#9553a4",
795
+ "primary-foreground": "#fcfcfc",
796
+ "secondary": "#f6e4fa",
797
+ "secondary-foreground": "#291c2c",
798
+ "muted": "#f7ecf9",
799
+ "muted-foreground": "#68566d",
800
+ "accent": "#f9dcff",
801
+ "accent-foreground": "#291c2c",
802
+ "destructive": "#d02b31",
803
+ "border": "#e7d8ea",
804
+ "input": "#d8c7dc",
805
+ "ring": "#9553a4",
806
+ "chart-1": "#9553a4",
807
807
  },
808
808
  dark: {
809
- "background": "oklch(0.18 0.028 320)",
810
- "foreground": "oklch(0.95 0.0112 320)",
811
- "card": "oklch(0.215 0.0308 320)",
812
- "card-foreground": "oklch(0.95 0.0112 320)",
813
- "popover": "oklch(0.245 0.0308 320)",
814
- "popover-foreground": "oklch(0.95 0.0112 320)",
815
- "primary": "oklch(0.76 0.119 320)",
816
- "primary-foreground": "oklch(0.18 0.028 320)",
817
- "secondary": "oklch(0.28 0.035 320)",
818
- "secondary-foreground": "oklch(0.95 0.0112 320)",
819
- "muted": "oklch(0.26 0.028 320)",
820
- "muted-foreground": "oklch(0.74 0.0252 320)",
821
- "accent": "oklch(0.32 0.056 320)",
822
- "accent-foreground": "oklch(0.95 0.0112 320)",
823
- "destructive": "oklch(0.7 0.17 22)",
824
- "border": "oklch(0.32 0.035 320)",
825
- "input": "oklch(0.38 0.035 320)",
826
- "ring": "oklch(0.76 0.119 320)",
827
- "chart-1": "oklch(0.76 0.119 320)",
809
+ "background": "#170d19",
810
+ "foreground": "#f2ecf3",
811
+ "card": "#201522",
812
+ "card-foreground": "#f2ecf3",
813
+ "popover": "#271c2a",
814
+ "popover-foreground": "#f2ecf3",
815
+ "primary": "#d398e0",
816
+ "primary-foreground": "#170d19",
817
+ "secondary": "#312334",
818
+ "secondary-foreground": "#f2ecf3",
819
+ "muted": "#2a202d",
820
+ "muted-foreground": "#b2a6b5",
821
+ "accent": "#3f2945",
822
+ "accent-foreground": "#f2ecf3",
823
+ "destructive": "#f66c6d",
824
+ "border": "#3b2d3e",
825
+ "input": "#4b3c4e",
826
+ "ring": "#d398e0",
827
+ "chart-1": "#d398e0",
828
828
  },
829
829
  },
830
830
  {
831
831
  id: "moss",
832
832
  name: "Moss",
833
833
  light: {
834
- "background": "oklch(0.985 0.0088 135)",
835
- "foreground": "oklch(0.25 0.0275 135)",
836
- "card": "oklch(0.997 0.0044 135)",
837
- "card-foreground": "oklch(0.25 0.0275 135)",
838
- "popover": "oklch(0.997 0.0044 135)",
839
- "popover-foreground": "oklch(0.25 0.0275 135)",
840
- "primary": "oklch(0.55 0.11 135)",
841
- "primary-foreground": "oklch(0.99 0 0)",
842
- "secondary": "oklch(0.94 0.0275 135)",
843
- "secondary-foreground": "oklch(0.25 0.0275 135)",
844
- "muted": "oklch(0.955 0.0165 135)",
845
- "muted-foreground": "oklch(0.48 0.033 135)",
846
- "accent": "oklch(0.93 0.044 135)",
847
- "accent-foreground": "oklch(0.25 0.0275 135)",
848
- "destructive": "oklch(0.56 0.2 25)",
849
- "border": "oklch(0.9 0.022 135)",
850
- "input": "oklch(0.85 0.0275 135)",
851
- "ring": "oklch(0.55 0.11 135)",
852
- "chart-1": "oklch(0.55 0.11 135)",
834
+ "background": "#f8fcf6",
835
+ "foreground": "#1c2517",
836
+ "card": "#fdfffc",
837
+ "card-foreground": "#1c2517",
838
+ "popover": "#fdfffc",
839
+ "popover-foreground": "#1c2517",
840
+ "primary": "#4a7333",
841
+ "primary-foreground": "#fcfcfc",
842
+ "secondary": "#e3f0dd",
843
+ "secondary-foreground": "#1c2517",
844
+ "muted": "#ebf3e8",
845
+ "muted-foreground": "#56624f",
846
+ "accent": "#dcefd2",
847
+ "accent-foreground": "#1c2517",
848
+ "destructive": "#d02b31",
849
+ "border": "#d8e2d3",
850
+ "input": "#c6d2c0",
851
+ "ring": "#4a7333",
852
+ "chart-1": "#4a7333",
853
853
  },
854
854
  dark: {
855
- "background": "oklch(0.18 0.022 135)",
856
- "foreground": "oklch(0.95 0.0088 135)",
857
- "card": "oklch(0.215 0.0242 135)",
858
- "card-foreground": "oklch(0.95 0.0088 135)",
859
- "popover": "oklch(0.245 0.0242 135)",
860
- "popover-foreground": "oklch(0.95 0.0088 135)",
861
- "primary": "oklch(0.76 0.0935 135)",
862
- "primary-foreground": "oklch(0.18 0.022 135)",
863
- "secondary": "oklch(0.28 0.0275 135)",
864
- "secondary-foreground": "oklch(0.95 0.0088 135)",
865
- "muted": "oklch(0.26 0.022 135)",
866
- "muted-foreground": "oklch(0.74 0.0198 135)",
867
- "accent": "oklch(0.32 0.044 135)",
868
- "accent-foreground": "oklch(0.95 0.0088 135)",
869
- "destructive": "oklch(0.7 0.17 22)",
870
- "border": "oklch(0.32 0.0275 135)",
871
- "input": "oklch(0.38 0.0275 135)",
872
- "ring": "oklch(0.76 0.0935 135)",
873
- "chart-1": "oklch(0.76 0.0935 135)",
855
+ "background": "#0d140a",
856
+ "foreground": "#ecf0ea",
857
+ "card": "#151c11",
858
+ "card-foreground": "#ecf0ea",
859
+ "popover": "#1b2317",
860
+ "popover-foreground": "#ecf0ea",
861
+ "primary": "#97bf82",
862
+ "primary-foreground": "#0d140a",
863
+ "secondary": "#232c1e",
864
+ "secondary-foreground": "#ecf0ea",
865
+ "muted": "#1f271c",
866
+ "muted-foreground": "#a6aea1",
867
+ "accent": "#293821",
868
+ "accent-foreground": "#ecf0ea",
869
+ "destructive": "#f66c6d",
870
+ "border": "#2d3628",
871
+ "input": "#3c4637",
872
+ "ring": "#97bf82",
873
+ "chart-1": "#97bf82",
874
874
  },
875
875
  },
876
876
  {
877
877
  id: "crimson",
878
878
  name: "Crimson",
879
879
  light: {
880
- "background": "oklch(0.985 0.0136 20)",
881
- "foreground": "oklch(0.25 0.0425 20)",
882
- "card": "oklch(0.997 0.0068 20)",
883
- "card-foreground": "oklch(0.25 0.0425 20)",
884
- "popover": "oklch(0.997 0.0068 20)",
885
- "popover-foreground": "oklch(0.25 0.0425 20)",
886
- "primary": "oklch(0.55 0.17 20)",
887
- "primary-foreground": "oklch(0.99 0 0)",
888
- "secondary": "oklch(0.94 0.0425 20)",
889
- "secondary-foreground": "oklch(0.25 0.0425 20)",
890
- "muted": "oklch(0.955 0.0255 20)",
891
- "muted-foreground": "oklch(0.48 0.051 20)",
892
- "accent": "oklch(0.93 0.068 20)",
893
- "accent-foreground": "oklch(0.25 0.0425 20)",
894
- "destructive": "oklch(0.56 0.2 25)",
895
- "border": "oklch(0.9 0.034 20)",
896
- "input": "oklch(0.85 0.0425 20)",
897
- "ring": "oklch(0.55 0.17 20)",
898
- "chart-1": "oklch(0.55 0.17 20)",
880
+ "background": "#fff7f6",
881
+ "foreground": "#331919",
882
+ "card": "#fffcfc",
883
+ "card-foreground": "#331919",
884
+ "popover": "#fffcfc",
885
+ "popover-foreground": "#331919",
886
+ "primary": "#c13a46",
887
+ "primary-foreground": "#fcfcfc",
888
+ "secondary": "#ffe1df",
889
+ "secondary-foreground": "#331919",
890
+ "muted": "#ffeae9",
891
+ "muted-foreground": "#785252",
892
+ "accent": "#ffd7d5",
893
+ "accent-foreground": "#331919",
894
+ "destructive": "#d02b31",
895
+ "border": "#f4d6d5",
896
+ "input": "#e9c3c2",
897
+ "ring": "#c13a46",
898
+ "chart-1": "#c13a46",
899
899
  },
900
900
  dark: {
901
- "background": "oklch(0.18 0.034 20)",
902
- "foreground": "oklch(0.95 0.0136 20)",
903
- "card": "oklch(0.215 0.0374 20)",
904
- "card-foreground": "oklch(0.95 0.0136 20)",
905
- "popover": "oklch(0.245 0.0374 20)",
906
- "popover-foreground": "oklch(0.95 0.0136 20)",
907
- "primary": "oklch(0.76 0.1445 20)",
908
- "primary-foreground": "oklch(0.18 0.034 20)",
909
- "secondary": "oklch(0.28 0.0425 20)",
910
- "secondary-foreground": "oklch(0.95 0.0136 20)",
911
- "muted": "oklch(0.26 0.034 20)",
912
- "muted-foreground": "oklch(0.74 0.0306 20)",
913
- "accent": "oklch(0.32 0.068 20)",
914
- "accent-foreground": "oklch(0.95 0.0136 20)",
915
- "destructive": "oklch(0.7 0.17 22)",
916
- "border": "oklch(0.32 0.0425 20)",
917
- "input": "oklch(0.38 0.0425 20)",
918
- "ring": "oklch(0.76 0.1445 20)",
919
- "chart-1": "oklch(0.76 0.1445 20)",
901
+ "background": "#1e0b0b",
902
+ "foreground": "#f8ebeb",
903
+ "card": "#281212",
904
+ "card-foreground": "#f8ebeb",
905
+ "popover": "#301919",
906
+ "popover-foreground": "#f8ebeb",
907
+ "primary": "#ff898b",
908
+ "primary-foreground": "#1e0b0b",
909
+ "secondary": "#3b2020",
910
+ "secondary-foreground": "#f8ebeb",
911
+ "muted": "#331d1d",
912
+ "muted-foreground": "#bea4a3",
913
+ "accent": "#502324",
914
+ "accent-foreground": "#f8ebeb",
915
+ "destructive": "#f66c6d",
916
+ "border": "#462a2a",
917
+ "input": "#573939",
918
+ "ring": "#ff898b",
919
+ "chart-1": "#ff898b",
920
920
  },
921
921
  },
922
922
  ]
@@ -218,6 +218,23 @@ export type StreamEvent =
218
218
  | { type: "reply"; text: string }
219
219
  | { type: "notice"; text: string; level: NoticeLevel };
220
220
 
221
+ /** A terminal the server runs (`terminal.*`): a shell in the project's folder. */
222
+ export interface TerminalInfo {
223
+ id: string;
224
+ title: string;
225
+ cwd: string;
226
+ alive: boolean;
227
+ /** The shell's exit code, once it ended. */
228
+ exitCode?: number;
229
+ startedAt: number;
230
+ }
231
+
232
+ /** One message on a terminal's stream (`GET /api/terminal.stream?id=…`). */
233
+ export type TerminalStreamEvent =
234
+ | { type: "reset"; data: string; alive: boolean; code?: number }
235
+ | { type: "data"; data: string }
236
+ | { type: "exit"; code?: number };
237
+
221
238
  /** The planning session as `planner.get` describes it. */
222
239
  export interface PlannerSnapshot {
223
240
  /** Seats on the panel next round. */
@@ -324,6 +341,8 @@ export interface EntryRefInfo {
324
341
  /** `tasks.get`: one task read whole, in the terminal's wording. */
325
342
  export interface TaskDetail {
326
343
  canAccept: boolean;
344
+ /** Open steps can be skipped (the user gives a reason). */
345
+ canSkip: boolean;
327
346
  canForceClose: boolean;
328
347
  timing?: TimingProjection;
329
348
  delivery?: Delivery;
@@ -337,9 +356,9 @@ export interface TaskDetail {
337
356
  planDetails?: string;
338
357
  /**
339
358
  * The plan as a checklist, in order; `current` is the step under way, `active` the steps a worker is on right now,
340
- * each with its worker time (ms, as of the reply).
359
+ * each with its worker time (ms, as of the reply); `skip` carries the reason the user gave for skipping a step.
341
360
  */
342
- steps: Array<{ text: string; status: "done" | "current" | "open"; active?: boolean; workedMs?: number; activeAgentCount?: number; agents?: StepAgentInfo[] }>;
361
+ steps: Array<{ text: string; status: "done" | "current" | "open" | "skipped"; skip?: { reason: string; at: string }; active?: boolean; workedMs?: number; activeAgentCount?: number; agents?: StepAgentInfo[] }>;
343
362
  /** How long the task's agents have worked on it, idle time left out (ms, as of the reply); `running` while they work. */
344
363
  work?: WorkClock;
345
364
  amendments: string[];
@@ -520,6 +539,7 @@ export interface Api {
520
539
  "tasks.open": { request: { taskId: string }; result: { sessionId?: string; key?: string; notice?: string } };
521
540
  "tasks.resume": { request: { taskId: string }; result: { notice: string; key?: string } };
522
541
  "tasks.accept": { request: { taskId: string }; result: { notice: string } };
542
+ "tasks.skipStep": { request: { taskId: string; step: number; text: string; reason: string }; result: { notice: string } };
523
543
  "tasks.forceClose": { request: { taskId: string; title: string }; result: { notice: string } };
524
544
  "tasks.resolveApproval": { request: { taskId: string; approvalId: string; decision: "approved" | "rejected"; note?: string }; result: { notice: string } };
525
545
  "tasks.deliveryReview": { request: { taskId: string }; result: { delivery: Delivery } };
@@ -535,6 +555,13 @@ export interface Api {
535
555
  "sessions.message": { request: { key?: string; sessionId?: string; text: string; attachments?: string[] }; result: { notice?: string } };
536
556
  "sessions.switch": { request: { key?: string; sessionId?: string; claimTaskId?: string }; result: { notice: string } };
537
557
  "sessions.answer": { request: { key: string; dialogId: string; answer: DialogAnswer }; result: { notice: string } };
558
+ "sessions.rename": { request: { key?: string; name: string }; result: { notice: string } };
559
+ "sessions.archive": { request: { key: string; archived?: boolean }; result: { notice: string } };
560
+ "terminal.list": { request: Record<string, never>; result: { available: boolean; reason?: string; terminals: TerminalInfo[] } };
561
+ "terminal.open": { request: { cols: number; rows: number }; result: TerminalInfo };
562
+ "terminal.input": { request: { id: string; data: string }; result: Record<string, never> };
563
+ "terminal.resize": { request: { id: string; cols: number; rows: number }; result: Record<string, never> };
564
+ "terminal.close": { request: { id: string }; result: Record<string, never> };
538
565
  "prompts.list": { request: Record<string, never>; result: { prompts: WebPrompt[] } };
539
566
  "prompts.answer": { request: { id: string; answer: unknown }; result: { notice?: string } };
540
567
  "prompts.dismiss": { request: { id: string }; result: Record<string, never> };
@@ -27,7 +27,8 @@ import {
27
27
  sessionCookie,
28
28
  sessionValue,
29
29
  } from "./auth.ts";
30
- import { callName, HttpError, routeApiCall, sendError, sendJson } from "./api/index.ts";
30
+ import { applyBaseHeaders, callName, HttpError, routeApiCall, sendError, sendJson } from "./api/index.ts";
31
+ import { terminals } from "./terminal.ts";
31
32
  import { distDir, serveStatic } from "./static.ts";
32
33
  import { EventHub } from "./events.ts";
33
34
  import { servePreview } from "./files.ts";
@@ -292,6 +293,19 @@ async function route(req: IncomingMessage, res: ServerResponse, state: RouteStat
292
293
  openStream(req, res, url, state);
293
294
  return;
294
295
  }
296
+ if (url.pathname === "/api/terminal.stream") {
297
+ if (req.method !== "GET") {
298
+ sendError(res, "unsupported", "only GET", 405);
299
+ return;
300
+ }
301
+ if (!isSignedIn(req.headers.cookie, state.session)) {
302
+ sendError(res, "unauthorized", "open the link Pi printed", 401);
303
+ return;
304
+ }
305
+ applyBaseHeaders(res);
306
+ if (!terminals.stream(req, res, url.searchParams.get("id") ?? "")) sendError(res, "not_found", "no such terminal", 404);
307
+ return;
308
+ }
295
309
  await routeApi(req, res, url, state);
296
310
  }
297
311
 
@@ -388,6 +402,7 @@ export async function startWebServer(options: WebServerOptions): Promise<WebServ
388
402
  return `http://127.0.0.1:${state.port}/#token=${state.link}`;
389
403
  },
390
404
  close: async () => {
405
+ terminals.closeAll();
391
406
  state.opener!.close();
392
407
  state.registry!.close();
393
408
  hub.close();