cosmic-moment 0.1.0__tar.gz

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.
@@ -0,0 +1,48 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main, master]
6
+ pull_request:
7
+
8
+ jobs:
9
+ test:
10
+ name: Test (Python ${{ matrix.python-version }})
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ fail-fast: false
14
+ matrix:
15
+ python-version: ["3.11", "3.12"]
16
+
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+
20
+ - name: Install uv
21
+ uses: astral-sh/setup-uv@v5
22
+ with:
23
+ version: "latest"
24
+
25
+ - name: Set up Python ${{ matrix.python-version }}
26
+ run: uv python install ${{ matrix.python-version }}
27
+
28
+ - name: Install dependencies
29
+ run: uv sync --extra dev
30
+
31
+ - name: Lint (ruff)
32
+ run: uv run ruff check .
33
+
34
+ - name: Format check (ruff)
35
+ run: uv run ruff format --check .
36
+
37
+ - name: Run tests
38
+ run: uv run pytest
39
+
40
+ docs:
41
+ name: Build docs
42
+ runs-on: ubuntu-latest
43
+ steps:
44
+ - uses: actions/checkout@v4
45
+ - uses: astral-sh/setup-uv@v5
46
+ - run: uv python install 3.11
47
+ - run: uv sync --extra docs
48
+ - run: uv run mkdocs build --strict
@@ -0,0 +1,22 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.egg-info/
5
+ .eggs/
6
+ dist/
7
+ build/
8
+ .venv/
9
+ .uv/
10
+
11
+ # Testing
12
+ .coverage
13
+ htmlcov/
14
+ .pytest_cache/
15
+
16
+ # Docs
17
+ site/
18
+
19
+ # Editors
20
+ .vscode/
21
+ .idea/
22
+ *.swp
@@ -0,0 +1,17 @@
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ rev: v0.6.0
4
+ hooks:
5
+ - id: ruff
6
+ args: [--fix]
7
+ - id: ruff-format
8
+
9
+ - repo: https://github.com/pre-commit/pre-commit-hooks
10
+ rev: v4.6.0
11
+ hooks:
12
+ - id: trailing-whitespace
13
+ - id: end-of-file-fixer
14
+ - id: check-yaml
15
+ - id: check-toml
16
+ - id: check-merge-conflict
17
+ - id: debug-statements
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 JohannRömer
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,116 @@
1
+ Metadata-Version: 2.4
2
+ Name: cosmic-moment
3
+ Version: 0.1.0
4
+ Summary: Discrete moments of cosmic emergence – the singular points where modulated entropy duality collapses into conscious frames.
5
+ Project-URL: Repository, https://github.com/GenesisAeon/cosmic-moment
6
+ Project-URL: Issues, https://github.com/GenesisAeon/cosmic-moment/issues
7
+ Author-email: GenesisAeon Team <team@genesisaeon.org>
8
+ License: MIT
9
+ License-File: LICENSE
10
+ Keywords: consciousness,cosmology,emergence,entropy,modulation
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Science/Research
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Topic :: Scientific/Engineering :: Physics
18
+ Requires-Python: >=3.11
19
+ Requires-Dist: entropy-governance>=0.1.0
20
+ Requires-Dist: entropy-table>=1.0.1
21
+ Requires-Dist: implosive-genesis>=0.4.0
22
+ Requires-Dist: medium-modulation>=0.1.0
23
+ Requires-Dist: numpy>=2.0.0
24
+ Requires-Dist: rich>=13.0.0
25
+ Requires-Dist: sympy>=1.13.0
26
+ Requires-Dist: typer>=0.15.0
27
+ Provides-Extra: dev
28
+ Requires-Dist: pytest-cov>=5.0; extra == 'dev'
29
+ Requires-Dist: pytest>=8.0; extra == 'dev'
30
+ Requires-Dist: ruff>=0.9; extra == 'dev'
31
+ Provides-Extra: docs
32
+ Requires-Dist: mkdocs-material>=9.6; extra == 'docs'
33
+ Requires-Dist: mkdocs>=1.6; extra == 'docs'
34
+ Requires-Dist: mkdocstrings[python]>=0.27; extra == 'docs'
35
+ Description-Content-Type: text/markdown
36
+
37
+ # cosmic-moment
38
+
39
+ **Discrete moments of cosmic emergence** — the fractal singularities where modulated entropy duality collapses into conscious presence.
40
+
41
+ [![CI](https://github.com/GenesisAeon/cosmic-moment/actions/workflows/ci.yml/badge.svg)](https://github.com/GenesisAeon/cosmic-moment/actions/workflows/ci.yml)
42
+ [![PyPI](https://img.shields.io/pypi/v/cosmic-moment)](https://pypi.org/project/cosmic-moment/)
43
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue)](https://www.python.org)
44
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
45
+
46
+ Built directly on **medium-modulation**, **entropy-governance** and **implosive-genesis** chronology.
47
+
48
+ ---
49
+
50
+ ## Install
51
+
52
+ ```bash
53
+ pip install cosmic-moment
54
+ ```
55
+
56
+ ## Usage
57
+
58
+ ```bash
59
+ cm detect --threshold 0.618
60
+ cm collapse --t 3.14
61
+ ```
62
+
63
+ ## Quick start (Python)
64
+
65
+ ```python
66
+ from cosmic_moment.core import CosmicMoment
67
+
68
+ cm = CosmicMoment()
69
+ moments = cm.detect(threshold=0.618, steps=100)
70
+ print(f"Detected {len(moments)} cosmic moments")
71
+
72
+ frame = cm.collapse(moments[0])
73
+ print(frame)
74
+ ```
75
+
76
+ ## CLI Reference
77
+
78
+ | Command | Description |
79
+ |---------|-------------|
80
+ | `cm detect [--threshold FLOAT] [--steps INT]` | Detect collapse points where modulated duality exceeds threshold |
81
+ | `cm collapse [--t FLOAT]` | Trigger frame collapse at a cosmic moment |
82
+
83
+ ## Stack integration
84
+
85
+ | Package | Role |
86
+ |---------|------|
87
+ | `medium-modulation` | `modulated_entropy` — core S∝A ↔ S∝V duality signal |
88
+ | `implosive-genesis` | `ChronologyValidator` — 10-part chronology check |
89
+ | `entropy-governance` | governance constraints on entropy flow |
90
+ | `entropy-table` | `EntropyTable` — domain relation persistence |
91
+
92
+ ## Project structure
93
+
94
+ ```
95
+ cosmic-moment/
96
+ ├── pyproject.toml
97
+ ├── README.md
98
+ ├── domains.yaml
99
+ ├── src/
100
+ │ └── cosmic_moment/
101
+ │ ├── __init__.py
102
+ │ ├── core.py # CosmicMoment + collapse detection
103
+ │ ├── cli.py # Typer CLI (cm)
104
+ │ └── entropy_table_bridge.py # EntropyTable integration
105
+ ├── tests/
106
+ │ ├── test_core.py
107
+ │ └── test_cli.py
108
+ └── mkdocs.yml
109
+ ```
110
+
111
+ ---
112
+
113
+ **DOI** (after Zenodo release): 10.5281/zenodo.XXXXXXX
114
+ **PyPI**: https://pypi.org/project/cosmic-moment/
115
+
116
+ Built with [uv](https://docs.astral.sh/uv/) · [Typer](https://typer.tiangolo.com/) · [Rich](https://rich.readthedocs.io/) · [SymPy](https://www.sympy.org/)
@@ -0,0 +1,80 @@
1
+ # cosmic-moment
2
+
3
+ **Discrete moments of cosmic emergence** — the fractal singularities where modulated entropy duality collapses into conscious presence.
4
+
5
+ [![CI](https://github.com/GenesisAeon/cosmic-moment/actions/workflows/ci.yml/badge.svg)](https://github.com/GenesisAeon/cosmic-moment/actions/workflows/ci.yml)
6
+ [![PyPI](https://img.shields.io/pypi/v/cosmic-moment)](https://pypi.org/project/cosmic-moment/)
7
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue)](https://www.python.org)
8
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
9
+
10
+ Built directly on **medium-modulation**, **entropy-governance** and **implosive-genesis** chronology.
11
+
12
+ ---
13
+
14
+ ## Install
15
+
16
+ ```bash
17
+ pip install cosmic-moment
18
+ ```
19
+
20
+ ## Usage
21
+
22
+ ```bash
23
+ cm detect --threshold 0.618
24
+ cm collapse --t 3.14
25
+ ```
26
+
27
+ ## Quick start (Python)
28
+
29
+ ```python
30
+ from cosmic_moment.core import CosmicMoment
31
+
32
+ cm = CosmicMoment()
33
+ moments = cm.detect(threshold=0.618, steps=100)
34
+ print(f"Detected {len(moments)} cosmic moments")
35
+
36
+ frame = cm.collapse(moments[0])
37
+ print(frame)
38
+ ```
39
+
40
+ ## CLI Reference
41
+
42
+ | Command | Description |
43
+ |---------|-------------|
44
+ | `cm detect [--threshold FLOAT] [--steps INT]` | Detect collapse points where modulated duality exceeds threshold |
45
+ | `cm collapse [--t FLOAT]` | Trigger frame collapse at a cosmic moment |
46
+
47
+ ## Stack integration
48
+
49
+ | Package | Role |
50
+ |---------|------|
51
+ | `medium-modulation` | `modulated_entropy` — core S∝A ↔ S∝V duality signal |
52
+ | `implosive-genesis` | `ChronologyValidator` — 10-part chronology check |
53
+ | `entropy-governance` | governance constraints on entropy flow |
54
+ | `entropy-table` | `EntropyTable` — domain relation persistence |
55
+
56
+ ## Project structure
57
+
58
+ ```
59
+ cosmic-moment/
60
+ ├── pyproject.toml
61
+ ├── README.md
62
+ ├── domains.yaml
63
+ ├── src/
64
+ │ └── cosmic_moment/
65
+ │ ├── __init__.py
66
+ │ ├── core.py # CosmicMoment + collapse detection
67
+ │ ├── cli.py # Typer CLI (cm)
68
+ │ └── entropy_table_bridge.py # EntropyTable integration
69
+ ├── tests/
70
+ │ ├── test_core.py
71
+ │ └── test_cli.py
72
+ └── mkdocs.yml
73
+ ```
74
+
75
+ ---
76
+
77
+ **DOI** (after Zenodo release): 10.5281/zenodo.XXXXXXX
78
+ **PyPI**: https://pypi.org/project/cosmic-moment/
79
+
80
+ Built with [uv](https://docs.astral.sh/uv/) · [Typer](https://typer.tiangolo.com/) · [Rich](https://rich.readthedocs.io/) · [SymPy](https://www.sympy.org/)
@@ -0,0 +1,25 @@
1
+ # Changelog
2
+
3
+ All notable changes to `cosmic-moment` are documented here.
4
+
5
+ ---
6
+
7
+ ## [0.1.0] – 2026-03-13
8
+
9
+ **First Cosmic Moments of Emergence**
10
+
11
+ ### Added
12
+
13
+ - `CosmicMoment.detect(S_A, S_V, threshold, steps)` — discrete detection of collapse points where `modulated_entropy(S_A, S_V)` exceeds threshold
14
+ - `CosmicMoment.collapse(t)` — simulate frame collapse at a given time coordinate, returning a structured event record
15
+ - CLI entrypoint `cm` with two commands:
16
+ - `cm detect [--threshold FLOAT] [--steps INT]`
17
+ - `cm collapse [--t FLOAT]`
18
+ - `CosmicMomentBridge` — persist domain relations via `entropy-table` (`domains.yaml`)
19
+ - Full integration with the GenesisAeon stack:
20
+ - `medium-modulation` — `modulated_entropy` S∝A ↔ S∝V duality signal
21
+ - `implosive-genesis` — `ChronologyValidator` 10-part chronology check
22
+ - `entropy-governance` — governance constraints on entropy flow
23
+ - `entropy-table` — domain relation persistence
24
+ - 99 % test coverage (pytest-cov), ruff clean, mkdocs --strict clean
25
+ - MIT License
@@ -0,0 +1,64 @@
1
+ # CLI Reference
2
+
3
+ The `cm` entrypoint provides two commands for observing and simulating cosmic moments.
4
+
5
+ ---
6
+
7
+ ## `cm detect`
8
+
9
+ Detect collapse points where `modulated_entropy(S_A, S_V)` exceeds the given threshold.
10
+
11
+ ```
12
+ Usage: cm detect [OPTIONS]
13
+
14
+ Options:
15
+ --threshold FLOAT Collapse detection threshold [default: 0.618]
16
+ --steps INTEGER Number of time steps to evaluate [default: 100]
17
+ --help Show this message and exit.
18
+ ```
19
+
20
+ **Examples**
21
+
22
+ ```bash
23
+ # Default: golden-ratio threshold, 100 steps
24
+ cm detect
25
+
26
+ # Custom threshold
27
+ cm detect --threshold 0.5
28
+
29
+ # Higher resolution scan
30
+ cm detect --threshold 0.618 --steps 500
31
+ ```
32
+
33
+ ---
34
+
35
+ ## `cm collapse`
36
+
37
+ Trigger a frame collapse at a given time coordinate and record the event.
38
+
39
+ ```
40
+ Usage: cm collapse [OPTIONS]
41
+
42
+ Options:
43
+ --t FLOAT Time coordinate of the collapse [default: 3.14]
44
+ --help Show this message and exit.
45
+ ```
46
+
47
+ **Examples**
48
+
49
+ ```bash
50
+ # Default collapse at π
51
+ cm collapse
52
+
53
+ # Collapse at a specific moment
54
+ cm collapse --t 6.28
55
+ ```
56
+
57
+ ---
58
+
59
+ ## Summary
60
+
61
+ | Command | Description |
62
+ |---------|-------------|
63
+ | `cm detect [--threshold FLOAT] [--steps INT]` | Detect collapse points where modulated duality exceeds threshold |
64
+ | `cm collapse [--t FLOAT]` | Trigger frame collapse at a cosmic moment |
@@ -0,0 +1,73 @@
1
+ # cosmic-moment
2
+
3
+ **Discrete moments of cosmic emergence** — the fractal singularities where modulated entropy duality collapses into conscious presence.
4
+
5
+ [![CI](https://github.com/GenesisAeon/cosmic-moment/actions/workflows/ci.yml/badge.svg)](https://github.com/GenesisAeon/cosmic-moment/actions/workflows/ci.yml)
6
+ [![PyPI](https://img.shields.io/pypi/v/cosmic-moment)](https://pypi.org/project/cosmic-moment/)
7
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue)](https://www.python.org)
8
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/GenesisAeon/cosmic-moment/blob/main/LICENSE)
9
+
10
+ Built directly on **medium-modulation**, **entropy-governance**, **entropy-table** and **implosive-genesis** chronology.
11
+
12
+ ---
13
+
14
+ ## Install
15
+
16
+ ```bash
17
+ pip install cosmic-moment
18
+ ```
19
+
20
+ ## Quick start (CLI)
21
+
22
+ ```bash
23
+ cm detect --threshold 0.618
24
+ cm collapse --t 3.14
25
+ ```
26
+
27
+ ## Quick start (Python)
28
+
29
+ ```python
30
+ from cosmic_moment.core import CosmicMoment
31
+
32
+ cm = CosmicMoment()
33
+ moments = cm.detect(threshold=0.618, steps=100)
34
+ print(f"Detected {len(moments)} cosmic moments")
35
+
36
+ frame = cm.collapse(moments[0])
37
+ print(frame)
38
+ # {'timestamp': 0.101, 'collapsed': True, 'new_layer': 'consciousness'}
39
+ ```
40
+
41
+ ## Stack integration
42
+
43
+ | Package | Role |
44
+ |---------|------|
45
+ | `medium-modulation` | `modulated_entropy` — core S∝A ↔ S∝V duality signal |
46
+ | `implosive-genesis` | `ChronologyValidator` — 10-part chronology check |
47
+ | `entropy-governance` | governance constraints on entropy flow |
48
+ | `entropy-table` | `EntropyTable` — domain relation persistence |
49
+
50
+ ## Project structure
51
+
52
+ ```
53
+ cosmic-moment/
54
+ ├── pyproject.toml
55
+ ├── README.md
56
+ ├── domains.yaml
57
+ ├── src/
58
+ │ └── cosmic_moment/
59
+ │ ├── __init__.py
60
+ │ ├── core.py # CosmicMoment + collapse detection
61
+ │ ├── cli.py # Typer CLI (cm)
62
+ │ └── entropy_table_bridge.py # EntropyTable integration
63
+ ├── tests/
64
+ │ ├── test_core.py
65
+ │ └── test_cli.py
66
+ └── mkdocs.yml
67
+ ```
68
+
69
+ ---
70
+
71
+ **PyPI**: <https://pypi.org/project/cosmic-moment/>
72
+
73
+ Built with [uv](https://docs.astral.sh/uv/) · [Typer](https://typer.tiangolo.com/) · [Rich](https://rich.readthedocs.io/) · [SymPy](https://www.sympy.org/)
@@ -0,0 +1,8 @@
1
+ domains:
2
+ cosmic-moment:
3
+ collapse_threshold: 0.618
4
+ golden_moment_baseline: 1.236
5
+ S_A_default: 1.0
6
+ S_V_default: 1.618
7
+ modulation_depth: 0.5
8
+ modulation_freq: 1.0
@@ -0,0 +1,43 @@
1
+ site_name: cosmic-moment
2
+ site_description: Discrete moments of cosmic emergence — singular points where modulated entropy duality collapses into conscious frames.
3
+ site_author: GenesisAeon
4
+ repo_url: https://github.com/GenesisAeon/cosmic-moment
5
+ repo_name: GenesisAeon/cosmic-moment
6
+
7
+ theme:
8
+ name: material
9
+ palette:
10
+ - media: "(prefers-color-scheme: light)"
11
+ scheme: default
12
+ primary: deep purple
13
+ accent: purple
14
+ toggle:
15
+ icon: material/brightness-7
16
+ name: Switch to dark mode
17
+ - media: "(prefers-color-scheme: dark)"
18
+ scheme: slate
19
+ primary: deep purple
20
+ accent: purple
21
+ toggle:
22
+ icon: material/brightness-4
23
+ name: Switch to light mode
24
+ features:
25
+ - navigation.tabs
26
+ - navigation.sections
27
+ - navigation.top
28
+ - content.code.annotate
29
+ - content.code.copy
30
+ - search.highlight
31
+
32
+ markdown_extensions:
33
+ - admonition
34
+ - pymdownx.highlight:
35
+ anchor_linenums: true
36
+ - pymdownx.superfences
37
+ - pymdownx.tabbed:
38
+ alternate_style: true
39
+
40
+ nav:
41
+ - Home: index.md
42
+ - CLI Reference: cli.md
43
+ - Changelog: changelog.md
@@ -0,0 +1,65 @@
1
+ [project]
2
+ name = "cosmic-moment"
3
+ version = "0.1.0"
4
+ description = "Discrete moments of cosmic emergence – the singular points where modulated entropy duality collapses into conscious frames."
5
+ readme = "README.md"
6
+ requires-python = ">=3.11"
7
+ license = {text = "MIT"}
8
+ authors = [{name = "GenesisAeon Team", email = "team@genesisaeon.org"}]
9
+ keywords = ["entropy", "emergence", "cosmology", "modulation", "consciousness"]
10
+ classifiers = [
11
+ "Development Status :: 3 - Alpha",
12
+ "Intended Audience :: Science/Research",
13
+ "License :: OSI Approved :: MIT License",
14
+ "Programming Language :: Python :: 3",
15
+ "Programming Language :: Python :: 3.11",
16
+ "Programming Language :: Python :: 3.12",
17
+ "Topic :: Scientific/Engineering :: Physics",
18
+ ]
19
+ dependencies = [
20
+ "medium-modulation>=0.1.0",
21
+ "entropy-governance>=0.1.0",
22
+ "entropy-table>=1.0.1",
23
+ "implosive-genesis>=0.4.0",
24
+ "sympy>=1.13.0",
25
+ "numpy>=2.0.0",
26
+ "rich>=13.0.0",
27
+ "typer>=0.15.0",
28
+ ]
29
+
30
+ [project.optional-dependencies]
31
+ dev = ["pytest>=8.0", "pytest-cov>=5.0", "ruff>=0.9"]
32
+ docs = ["mkdocs>=1.6", "mkdocstrings[python]>=0.27", "mkdocs-material>=9.6"]
33
+
34
+ [project.scripts]
35
+ cm = "cosmic_moment.cli:app"
36
+
37
+ [project.urls]
38
+ Repository = "https://github.com/GenesisAeon/cosmic-moment"
39
+ Issues = "https://github.com/GenesisAeon/cosmic-moment/issues"
40
+
41
+ [build-system]
42
+ requires = ["hatchling"]
43
+ build-backend = "hatchling.build"
44
+
45
+ [tool.hatch.build.targets.wheel]
46
+ packages = ["src/cosmic_moment"]
47
+
48
+ [tool.ruff]
49
+ line-length = 88
50
+ target-version = "py311"
51
+
52
+ [tool.ruff.lint]
53
+ select = ["E", "F", "B", "I", "W", "UP", "C4", "SIM"]
54
+ ignore = ["B008"] # typer uses function calls in defaults
55
+
56
+ [tool.ruff.lint.per-file-ignores]
57
+ "tests/**" = ["S101"] # allow assert in tests
58
+
59
+ [tool.pytest.ini_options]
60
+ testpaths = ["tests"]
61
+ addopts = "--cov=cosmic_moment --cov-report=term-missing -v"
62
+
63
+ [tool.coverage.run]
64
+ source = ["src"]
65
+ omit = ["tests/*"]
@@ -0,0 +1,4 @@
1
+ """cosmic-moment — discrete moments of cosmic emergence."""
2
+
3
+ __version__ = "0.1.0"
4
+ __author__ = "GenesisAeon Team"
@@ -0,0 +1,41 @@
1
+ """Typer CLI for cosmic-moment — `cm` entrypoint."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import typer
6
+ from rich.console import Console
7
+
8
+ from .core import CosmicMoment
9
+
10
+ app = typer.Typer(help="Cosmic Moment CLI – discrete points of cosmic self-awareness.")
11
+ console = Console()
12
+
13
+ _cm = CosmicMoment()
14
+
15
+
16
+ @app.command()
17
+ def detect(
18
+ threshold: float = typer.Option(0.618, help="Collapse detection threshold."),
19
+ steps: int = typer.Option(100, help="Number of time steps to evaluate."),
20
+ ) -> None:
21
+ """Detect cosmic moments of emergence."""
22
+ moments = _cm.detect(threshold=threshold, steps=steps)
23
+ console.print(f"[bold magenta]Detected {len(moments)} cosmic moment(s)[/]")
24
+ if moments:
25
+ console.print(f"First at t = {moments[0]}")
26
+
27
+
28
+ @app.command()
29
+ def collapse(
30
+ t: float = typer.Option(3.14, help="Time coordinate of the collapse."),
31
+ ) -> None:
32
+ """Trigger frame collapse at a cosmic moment."""
33
+ result = _cm.collapse(t)
34
+ console.print(
35
+ f"[bold cyan]Frame collapsed at t={result['timestamp']:.3f} "
36
+ f"→ new {result['new_layer']} layer[/]"
37
+ )
38
+
39
+
40
+ if __name__ == "__main__":
41
+ app()