omega-code 0.4.0__py3-none-any.whl

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 (73) hide show
  1. omega/__init__.py +0 -0
  2. omega/__main__.py +589 -0
  3. omega/artifacts.py +151 -0
  4. omega/checkpoint.py +246 -0
  5. omega/compact.py +106 -0
  6. omega/config.py +285 -0
  7. omega/eval/__init__.py +3 -0
  8. omega/eval/cli.py +127 -0
  9. omega/eval/examples/plan-version-flag.yaml +11 -0
  10. omega/eval/examples/relative-age-negative-delta.yaml +14 -0
  11. omega/eval/examples/version-flag.yaml +10 -0
  12. omega/eval/manifest.py +129 -0
  13. omega/eval/prices.py +29 -0
  14. omega/eval/report.py +135 -0
  15. omega/eval/runner.py +199 -0
  16. omega/eval/tasks.py +97 -0
  17. omega/events.py +145 -0
  18. omega/export.py +80 -0
  19. omega/gitlog.py +229 -0
  20. omega/hooks.py +63 -0
  21. omega/instructions.py +103 -0
  22. omega/integrations.py +284 -0
  23. omega/keys.py +173 -0
  24. omega/llm.py +442 -0
  25. omega/loop.py +510 -0
  26. omega/mcp.py +490 -0
  27. omega/memory/__init__.py +5 -0
  28. omega/memory/consolidate.py +103 -0
  29. omega/memory/curate.py +69 -0
  30. omega/memory/store.py +321 -0
  31. omega/memory/tools.py +175 -0
  32. omega/migrate.py +40 -0
  33. omega/onboarding.py +242 -0
  34. omega/permissions.py +137 -0
  35. omega/secrets.py +173 -0
  36. omega/server/__init__.py +7 -0
  37. omega/server/__main__.py +18 -0
  38. omega/server/app.py +71 -0
  39. omega/server/auth.py +73 -0
  40. omega/server/manager.py +287 -0
  41. omega/server/models.py +123 -0
  42. omega/server/tasks_api.py +311 -0
  43. omega/server/terminals.py +245 -0
  44. omega/server/worker.py +186 -0
  45. omega/session.py +209 -0
  46. omega/setup.html +281 -0
  47. omega/setup_server.py +452 -0
  48. omega/skills.py +158 -0
  49. omega/subagent.py +98 -0
  50. omega/tasks.py +195 -0
  51. omega/tools.py +590 -0
  52. omega/trace.py +156 -0
  53. omega/trajectory.py +146 -0
  54. omega/ui/__init__.py +0 -0
  55. omega/ui/composer.py +140 -0
  56. omega/ui/format.py +708 -0
  57. omega/ui/plain.py +141 -0
  58. omega/ui/tui/__init__.py +9 -0
  59. omega/ui/tui/app.py +958 -0
  60. omega/ui/tui/history.py +50 -0
  61. omega/ui/tui/modals.py +292 -0
  62. omega/ui/tui/onboarding.py +367 -0
  63. omega/ui/tui/prefs.py +25 -0
  64. omega/ui/tui/sidebar.py +510 -0
  65. omega/ui/tui/status.py +115 -0
  66. omega/ui/tui/theme.py +91 -0
  67. omega/ui/tui/transcript.py +783 -0
  68. omega/verify.py +133 -0
  69. omega_code-0.4.0.dist-info/METADATA +479 -0
  70. omega_code-0.4.0.dist-info/RECORD +73 -0
  71. omega_code-0.4.0.dist-info/WHEEL +4 -0
  72. omega_code-0.4.0.dist-info/entry_points.txt +2 -0
  73. omega_code-0.4.0.dist-info/licenses/LICENSE +21 -0
omega/ui/tui/theme.py ADDED
@@ -0,0 +1,91 @@
1
+ """The TUI's look, in three flavours picked with `/theme` and remembered in
2
+ ~/.omega/ui.json.
3
+
4
+ `system` (the default) paints no colours of its own: every surface is the
5
+ terminal's own background, text is its foreground, and the accents are its
6
+ 16-colour palette, so omega looks like any other program in that terminal --
7
+ light in a light terminal, dark in a dark one, and always in the user's own
8
+ palette. `light` and `dark` are Textual's painted palettes for anyone whose
9
+ terminal disagrees with how they want omega to look."""
10
+ from __future__ import annotations
11
+
12
+ from textual.theme import Theme
13
+
14
+ CHOICES = ("system", "light", "dark")
15
+ DEFAULT = "system"
16
+
17
+ SYSTEM_THEME = Theme(
18
+ name="omega-system",
19
+ ansi=True,
20
+ primary="ansi_blue",
21
+ secondary="ansi_cyan",
22
+ warning="ansi_yellow",
23
+ error="ansi_red",
24
+ success="ansi_green",
25
+ accent="ansi_blue",
26
+ foreground="ansi_default",
27
+ background="ansi_default",
28
+ surface="ansi_default",
29
+ panel="ansi_default",
30
+ boost="ansi_default",
31
+ dark=True,
32
+ variables={
33
+ "ansi-background": "ansi_default",
34
+ "ansi-foreground": "ansi_default",
35
+ "border": "ansi_blue",
36
+ "border-blurred": "ansi_bright_black",
37
+ "block-cursor-foreground": "ansi_bright_white",
38
+ "block-cursor-background": "ansi_blue",
39
+ "block-cursor-blurred-foreground": "ansi_default",
40
+ "block-cursor-blurred-background": "ansi_bright_black",
41
+ "input-cursor-background": "ansi_default",
42
+ "input-cursor-foreground": "ansi_default",
43
+ "input-cursor-text-style": "reverse",
44
+ "input-selection-background": "ansi_blue",
45
+ "input-selection-foreground": "ansi_bright_white",
46
+ "screen-selection-background": "ansi_blue",
47
+ "screen-selection-foreground": "ansi_bright_white",
48
+ "scrollbar": "ansi_bright_black",
49
+ "scrollbar-hover": "ansi_bright_black",
50
+ "scrollbar-active": "ansi_blue",
51
+ "scrollbar-background": "ansi_default",
52
+ "scrollbar-background-hover": "ansi_default",
53
+ "scrollbar-background-active": "ansi_default",
54
+ "scrollbar-corner-color": "ansi_default",
55
+ },
56
+ )
57
+
58
+ _TEXTUAL_THEME = {"system": SYSTEM_THEME.name, "light": "textual-light", "dark": "textual-dark"}
59
+
60
+ # Hairlines: the sidebar divider and the idle input border. The system
61
+ # flavour uses the palette's "bright black" (the grey every terminal reserves
62
+ # for exactly this); the painted ones use a faint foreground tint that reads
63
+ # the same on either background.
64
+ _RULE = {"system": "ansi_bright_black", "light": "#00000026", "dark": "#ffffff26"}
65
+
66
+ # Pygments styles for rich's `Markdown` code fences and `Syntax` blocks. The
67
+ # system flavour's `ansi_dark` is rich's palette-only style: no painted block
68
+ # background, so a code fence sits flat on the terminal like everything else.
69
+ _CODE = {"system": "ansi_dark", "light": "default", "dark": "monokai"}
70
+
71
+
72
+ def normalize(choice: object) -> str:
73
+ return choice if isinstance(choice, str) and choice in CHOICES else DEFAULT
74
+
75
+
76
+ def textual_theme(choice: str) -> str:
77
+ return _TEXTUAL_THEME[normalize(choice)]
78
+
79
+
80
+ def rule_color(choice: str) -> str:
81
+ return _RULE[normalize(choice)]
82
+
83
+
84
+ def code_theme(choice: str) -> str:
85
+ return _CODE[normalize(choice)]
86
+
87
+
88
+ def current_code_theme(app: object) -> str:
89
+ """The code theme for whichever app a widget is mounted in -- the
90
+ onboarding wizard and any test harness app fall back to the system look."""
91
+ return code_theme(str(getattr(app, "theme_choice", DEFAULT)))