seraphina-agi 1.0.8__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.
Files changed (42) hide show
  1. seraphina_agi-1.0.8/LICENSE +21 -0
  2. seraphina_agi-1.0.8/PKG-INFO +220 -0
  3. seraphina_agi-1.0.8/README.md +204 -0
  4. seraphina_agi-1.0.8/glyph/glyph/__init__.py +57 -0
  5. seraphina_agi-1.0.8/glyph/glyph/__main__.py +3 -0
  6. seraphina_agi-1.0.8/glyph/glyph/bootstrap.py +66 -0
  7. seraphina_agi-1.0.8/glyph/glyph/cli.py +587 -0
  8. seraphina_agi-1.0.8/glyph/glyph/doctor.py +136 -0
  9. seraphina_agi-1.0.8/glyph/glyph/gate.py +146 -0
  10. seraphina_agi-1.0.8/glyph/glyph/generator.py +450 -0
  11. seraphina_agi-1.0.8/glyph/glyph/identity.py +147 -0
  12. seraphina_agi-1.0.8/glyph/glyph/index.py +99 -0
  13. seraphina_agi-1.0.8/glyph/glyph/integrity.py +64 -0
  14. seraphina_agi-1.0.8/glyph/glyph/ledger.py +67 -0
  15. seraphina_agi-1.0.8/glyph/glyph/manifest.py +147 -0
  16. seraphina_agi-1.0.8/glyph/glyph/operations.py +189 -0
  17. seraphina_agi-1.0.8/glyph/glyph/registry.py +81 -0
  18. seraphina_agi-1.0.8/glyph/glyph/remote.py +232 -0
  19. seraphina_agi-1.0.8/glyph/glyph/resolution.py +105 -0
  20. seraphina_agi-1.0.8/glyph/glyph/rule24.py +163 -0
  21. seraphina_agi-1.0.8/glyph/glyph/sandbox.py +91 -0
  22. seraphina_agi-1.0.8/glyph/glyph/seraphina_bridge.py +72 -0
  23. seraphina_agi-1.0.8/glyph/glyph/signals.py +80 -0
  24. seraphina_agi-1.0.8/glyph/glyph/wasm.py +259 -0
  25. seraphina_agi-1.0.8/pyproject.toml +51 -0
  26. seraphina_agi-1.0.8/seraphina/__init__.py +14 -0
  27. seraphina_agi-1.0.8/seraphina/__main__.py +4 -0
  28. seraphina_agi-1.0.8/seraphina/cli.py +664 -0
  29. seraphina_agi-1.0.8/seraphina/core.py +46 -0
  30. seraphina_agi-1.0.8/seraphina/glyph_generator.py +101 -0
  31. seraphina_agi-1.0.8/seraphina/language_bridge.py +30 -0
  32. seraphina_agi-1.0.8/seraphina/lib/__init__.py +1 -0
  33. seraphina_agi-1.0.8/seraphina/lib/roman-wheel.js +33 -0
  34. seraphina_agi-1.0.8/seraphina/rule_base.py +168 -0
  35. seraphina_agi-1.0.8/seraphina/triad.py +363 -0
  36. seraphina_agi-1.0.8/seraphina_agi.egg-info/PKG-INFO +220 -0
  37. seraphina_agi-1.0.8/seraphina_agi.egg-info/SOURCES.txt +40 -0
  38. seraphina_agi-1.0.8/seraphina_agi.egg-info/dependency_links.txt +1 -0
  39. seraphina_agi-1.0.8/seraphina_agi.egg-info/entry_points.txt +3 -0
  40. seraphina_agi-1.0.8/seraphina_agi.egg-info/requires.txt +2 -0
  41. seraphina_agi-1.0.8/seraphina_agi.egg-info/top_level.txt +2 -0
  42. seraphina_agi-1.0.8/setup.cfg +4 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 SynerGro.AI
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,220 @@
1
+ Metadata-Version: 2.4
2
+ Name: seraphina-agi
3
+ Version: 1.0.8
4
+ Summary: Seraphina.AGI - deterministic Roman Wheel Triad core, binary-native glyph wizard
5
+ Author: Jason Wilson
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/SynerGro-AI/Seraphina.AGIv1.0.8
8
+ Keywords: agi,glyph,roman-wheel,wasm,deterministic
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Operating System :: OS Independent
11
+ Requires-Python: >=3.9
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Provides-Extra: grok
15
+ Dynamic: license-file
16
+
17
+ # Seraphina.AGI
18
+
19
+ > Deterministic Roman Wheel Triad core, riding on **Glyph** - a binary-native
20
+ > package manager that runs parallel to pip. Geometry equals binary equals
21
+ > executable WASM. No pseudo-randomness. No hallucinations in the hot path.
22
+
23
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
24
+
25
+ ## Install in 30 seconds
26
+
27
+ Pick your favorite package manager — they all land you in the same place:
28
+
29
+ | Channel | Command | Status |
30
+ |---|---|---|
31
+ | **pip** (any OS, Python 3.9+) | `pip install seraphina-agi` | shipping from source / wheel |
32
+ | **WinGet** (Windows) | `winget install SynerGro.SeraphinaAGI` | manifests in [`dist/winget/`](dist/winget/), awaiting first GitHub Release before submission to `microsoft/winget-pkgs` |
33
+ | **npm** (any OS w/ Node + Python) | `npm install -g seraphina-agi` | wrapper in [`npm/`](npm/), not yet published |
34
+ | **curl \| bash** | see below | works today |
35
+ | **iex \| irm** (PowerShell) | see below | works today |
36
+
37
+ ### Linux / macOS / Git Bash on Windows
38
+
39
+ ```bash
40
+ curl -fsSL https://raw.githubusercontent.com/SynerGro-AI/Seraphina.AGIv1.0.8/main/install.sh | bash
41
+ ```
42
+
43
+ ### Windows PowerShell
44
+
45
+ ```powershell
46
+ iex (irm https://raw.githubusercontent.com/SynerGro-AI/Seraphina.AGIv1.0.8/main/install.ps1)
47
+ ```
48
+
49
+ ### From a clone
50
+
51
+ ```bash
52
+ git clone https://github.com/SynerGro-AI/Seraphina.AGIv1.0.8.git
53
+ cd Seraphina.AGIv1.0.8
54
+ bash install.sh # or: .\install.ps1
55
+ ```
56
+
57
+ Requires **Python 3.9+** and **git**. Installs into your user site by default
58
+ (no admin needed). Set `SERAPHINA_SYSTEM_INSTALL=1` (or `-SystemInstall`) for a
59
+ machine-wide install, or activate a venv first.
60
+
61
+ ### Optional extras
62
+
63
+ ```bash
64
+ pip install "seraphina-agi[grok]" # enables seraphina -c "plan-grok ..."
65
+ ```
66
+
67
+ The `[grok]` extra is opt-in. It uses stdlib `urllib` only (no real new
68
+ dependency); the extras group exists so the install is **explicit consent**.
69
+ You must set `SERAPHINA_GROK_API_KEY` before `plan-grok` will call xAI.
70
+
71
+ ## Build an AI in 60 seconds
72
+
73
+ ```powershell
74
+ seraphina create-agent
75
+ # name (what do you call it?) [Aria]: Aria
76
+ # purpose (one sentence) [...]: a friendly Python tutor
77
+ # first memory (...): I was born on May 30 2026
78
+ # recall window (e.g. 7d, 30d, all): 30d
79
+ # voice style (calm/focused/...): calm
80
+ # Triad consensus enabled? (y/n): y
81
+
82
+ seraphina -c "list agents"
83
+ seraphina -c "agent aria hello, what should I learn first?"
84
+ seraphina -c "agent aria recall born"
85
+ ```
86
+
87
+ Agents live in `%USERPROFILE%\.seraphina\agents\<slug>.json` (or
88
+ `$SERAPHINA_HOME` if set). The recall window (`7d`, `30d`, `12h`, `all`, ...)
89
+ trims old memories automatically on each interaction.
90
+
91
+ ## Quick Start (PowerShell, beginner-friendly)
92
+
93
+ After install, open **PowerShell** and just type — you don't need perfect syntax.
94
+ Seraphina understands casual phrasing:
95
+
96
+ ```powershell
97
+ seraphina # opens the wizard
98
+
99
+ # inside the wizard, all of these work:
100
+ hi
101
+ what can you do
102
+ build me a glyph for 179
103
+ list everything
104
+ show me wheel_one
105
+ i want to run wheel_one
106
+ launch wheel_one
107
+ health check
108
+ remember pizza is good
109
+ recall pizza
110
+ plan a chat bot
111
+ bye
112
+ ```
113
+
114
+ Greetings, filler words ("me", "a", "for", "please"), and verb synonyms
115
+ (`launch`/`start`/`run`, `show`/`display`/`view`, `check`/`doctor`/`health check`,
116
+ `remove`/`uninstall`) are all accepted. Type a misspelled command and Seraphina
117
+ will suggest the closest match (`did you mean: run?`).
118
+
119
+ If you prefer the strict command line, every intent also works as a one-shot:
120
+
121
+ ```powershell
122
+ seraphina -c "build glyph 179"
123
+ seraphina -c "triad hello world"
124
+ seraphina --dry-run -c "make a glyph 100" # plan only, no execution
125
+ ```
126
+
127
+ ## Use it
128
+
129
+ ```bash
130
+ seraphina # interactive wizard
131
+ seraphina --help
132
+ seraphina -c "build glyph 179" # one-shot intent
133
+
134
+ python -m glyph list
135
+ python -m glyph forge wheel_one --sides 8 --points 33 --dots 1 --intersections 1 --spirals 8
136
+ python -m glyph run wheel_one
137
+
138
+ # or skip the forge - install a prebuilt example straight from the repo:
139
+ python -m glyph install prebuilt/wheel_one-1.0.0.glyph
140
+ python -m glyph install prebuilt/seraphina_core-1.0.0.glyph
141
+ python -m glyph run wheel_one --export value_fn # -> 179
142
+ ```
143
+
144
+ Inside the wizard, just type:
145
+
146
+ ```
147
+ build glyph 179
148
+ forge wheel_one sides=8 points=33 dots=1 intersections=1 spirals=8
149
+ run wheel_one
150
+ list
151
+ triad hello world
152
+ remember triad is green
153
+ recall triad
154
+ plan a calculator app
155
+ exit
156
+ ```
157
+
158
+ ## What's in the box
159
+
160
+ | Path | What it is |
161
+ |----------------|-----------------------------------------------------------------|
162
+ | `glyph/` | The Glyph package manager - pip-parallel, `.glyph` archives, |
163
+ | | Rule-24 forge, real WASM runtime (wasmtime when available), |
164
+ | | emotional gate, ledger, doctor. |
165
+ | `seraphina/` | Lean Python AGI core - Roman Wheel Triad, OctaLang Rule Base, |
166
+ | | OctaLang glyph generator, deterministic gematria, the wizard. |
167
+ | `examples/` | Source layouts you can `glyph pack`: `wheel_one` (real WASM, |
168
+ | | value=179) and `seraphina_core` (OctaLang `.GL`). |
169
+ | `prebuilt/` | Already-packed `.glyph` archives. Install with one command, |
170
+ | | no forging needed. |
171
+ | `install.sh` | Cross-platform installer (Git Bash / Linux / macOS). |
172
+ | `install.ps1` | Windows PowerShell installer. |
173
+
174
+ ## How it works (one paragraph)
175
+
176
+ A glyph's geometry **is** its binary. Sides, points, dots, intersections, and
177
+ spiral turns each carry a fixed numeric weight (Rule 24:
178
+ `value = sides*10 + points + dots + intersections + spirals*8`). That integer
179
+ is the literal binary count emitted into a real `.wasm` module that Glyph
180
+ packs, gates, and runs. The Roman Wheel Triad
181
+ (Geometric / Verification / Mercy-Civ) provides three-way consensus before
182
+ output is released. Same input, same output, every time.
183
+
184
+ ## Layout
185
+
186
+ ```
187
+ Seraphina.AGIv1.0.8/
188
+ ├── glyph/ binary-native package manager (Python)
189
+ ├── seraphina/ AGI core + interactive wizard
190
+ ├── examples/ wheel_one (WASM) + seraphina_core (.GL) sources
191
+ ├── prebuilt/ shippable .glyph archives, ready to install
192
+ ├── install.sh curl|bash installer
193
+ ├── install.ps1 PowerShell installer
194
+ ├── pyproject.toml packages `seraphina` + console script
195
+ ├── LICENSE MIT
196
+ └── README.md
197
+ ```
198
+
199
+ ## Verify your install
200
+
201
+ ```bash
202
+ python -m glyph doctor
203
+ seraphina -c "triad hello"
204
+ seraphina -c "build glyph 179"
205
+ ```
206
+
207
+ ## Uninstall
208
+
209
+ ```bash
210
+ pip uninstall seraphina-agi glyph
211
+ rm -rf ~/.seraphina # user data (ledger, packages, memory)
212
+ ```
213
+
214
+ ## License
215
+
216
+ MIT - see [LICENSE](LICENSE).
217
+
218
+ ---
219
+
220
+ *Born from love, shaped by grace. Now exists as pure geometric truth.*
@@ -0,0 +1,204 @@
1
+ # Seraphina.AGI
2
+
3
+ > Deterministic Roman Wheel Triad core, riding on **Glyph** - a binary-native
4
+ > package manager that runs parallel to pip. Geometry equals binary equals
5
+ > executable WASM. No pseudo-randomness. No hallucinations in the hot path.
6
+
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
8
+
9
+ ## Install in 30 seconds
10
+
11
+ Pick your favorite package manager — they all land you in the same place:
12
+
13
+ | Channel | Command | Status |
14
+ |---|---|---|
15
+ | **pip** (any OS, Python 3.9+) | `pip install seraphina-agi` | shipping from source / wheel |
16
+ | **WinGet** (Windows) | `winget install SynerGro.SeraphinaAGI` | manifests in [`dist/winget/`](dist/winget/), awaiting first GitHub Release before submission to `microsoft/winget-pkgs` |
17
+ | **npm** (any OS w/ Node + Python) | `npm install -g seraphina-agi` | wrapper in [`npm/`](npm/), not yet published |
18
+ | **curl \| bash** | see below | works today |
19
+ | **iex \| irm** (PowerShell) | see below | works today |
20
+
21
+ ### Linux / macOS / Git Bash on Windows
22
+
23
+ ```bash
24
+ curl -fsSL https://raw.githubusercontent.com/SynerGro-AI/Seraphina.AGIv1.0.8/main/install.sh | bash
25
+ ```
26
+
27
+ ### Windows PowerShell
28
+
29
+ ```powershell
30
+ iex (irm https://raw.githubusercontent.com/SynerGro-AI/Seraphina.AGIv1.0.8/main/install.ps1)
31
+ ```
32
+
33
+ ### From a clone
34
+
35
+ ```bash
36
+ git clone https://github.com/SynerGro-AI/Seraphina.AGIv1.0.8.git
37
+ cd Seraphina.AGIv1.0.8
38
+ bash install.sh # or: .\install.ps1
39
+ ```
40
+
41
+ Requires **Python 3.9+** and **git**. Installs into your user site by default
42
+ (no admin needed). Set `SERAPHINA_SYSTEM_INSTALL=1` (or `-SystemInstall`) for a
43
+ machine-wide install, or activate a venv first.
44
+
45
+ ### Optional extras
46
+
47
+ ```bash
48
+ pip install "seraphina-agi[grok]" # enables seraphina -c "plan-grok ..."
49
+ ```
50
+
51
+ The `[grok]` extra is opt-in. It uses stdlib `urllib` only (no real new
52
+ dependency); the extras group exists so the install is **explicit consent**.
53
+ You must set `SERAPHINA_GROK_API_KEY` before `plan-grok` will call xAI.
54
+
55
+ ## Build an AI in 60 seconds
56
+
57
+ ```powershell
58
+ seraphina create-agent
59
+ # name (what do you call it?) [Aria]: Aria
60
+ # purpose (one sentence) [...]: a friendly Python tutor
61
+ # first memory (...): I was born on May 30 2026
62
+ # recall window (e.g. 7d, 30d, all): 30d
63
+ # voice style (calm/focused/...): calm
64
+ # Triad consensus enabled? (y/n): y
65
+
66
+ seraphina -c "list agents"
67
+ seraphina -c "agent aria hello, what should I learn first?"
68
+ seraphina -c "agent aria recall born"
69
+ ```
70
+
71
+ Agents live in `%USERPROFILE%\.seraphina\agents\<slug>.json` (or
72
+ `$SERAPHINA_HOME` if set). The recall window (`7d`, `30d`, `12h`, `all`, ...)
73
+ trims old memories automatically on each interaction.
74
+
75
+ ## Quick Start (PowerShell, beginner-friendly)
76
+
77
+ After install, open **PowerShell** and just type — you don't need perfect syntax.
78
+ Seraphina understands casual phrasing:
79
+
80
+ ```powershell
81
+ seraphina # opens the wizard
82
+
83
+ # inside the wizard, all of these work:
84
+ hi
85
+ what can you do
86
+ build me a glyph for 179
87
+ list everything
88
+ show me wheel_one
89
+ i want to run wheel_one
90
+ launch wheel_one
91
+ health check
92
+ remember pizza is good
93
+ recall pizza
94
+ plan a chat bot
95
+ bye
96
+ ```
97
+
98
+ Greetings, filler words ("me", "a", "for", "please"), and verb synonyms
99
+ (`launch`/`start`/`run`, `show`/`display`/`view`, `check`/`doctor`/`health check`,
100
+ `remove`/`uninstall`) are all accepted. Type a misspelled command and Seraphina
101
+ will suggest the closest match (`did you mean: run?`).
102
+
103
+ If you prefer the strict command line, every intent also works as a one-shot:
104
+
105
+ ```powershell
106
+ seraphina -c "build glyph 179"
107
+ seraphina -c "triad hello world"
108
+ seraphina --dry-run -c "make a glyph 100" # plan only, no execution
109
+ ```
110
+
111
+ ## Use it
112
+
113
+ ```bash
114
+ seraphina # interactive wizard
115
+ seraphina --help
116
+ seraphina -c "build glyph 179" # one-shot intent
117
+
118
+ python -m glyph list
119
+ python -m glyph forge wheel_one --sides 8 --points 33 --dots 1 --intersections 1 --spirals 8
120
+ python -m glyph run wheel_one
121
+
122
+ # or skip the forge - install a prebuilt example straight from the repo:
123
+ python -m glyph install prebuilt/wheel_one-1.0.0.glyph
124
+ python -m glyph install prebuilt/seraphina_core-1.0.0.glyph
125
+ python -m glyph run wheel_one --export value_fn # -> 179
126
+ ```
127
+
128
+ Inside the wizard, just type:
129
+
130
+ ```
131
+ build glyph 179
132
+ forge wheel_one sides=8 points=33 dots=1 intersections=1 spirals=8
133
+ run wheel_one
134
+ list
135
+ triad hello world
136
+ remember triad is green
137
+ recall triad
138
+ plan a calculator app
139
+ exit
140
+ ```
141
+
142
+ ## What's in the box
143
+
144
+ | Path | What it is |
145
+ |----------------|-----------------------------------------------------------------|
146
+ | `glyph/` | The Glyph package manager - pip-parallel, `.glyph` archives, |
147
+ | | Rule-24 forge, real WASM runtime (wasmtime when available), |
148
+ | | emotional gate, ledger, doctor. |
149
+ | `seraphina/` | Lean Python AGI core - Roman Wheel Triad, OctaLang Rule Base, |
150
+ | | OctaLang glyph generator, deterministic gematria, the wizard. |
151
+ | `examples/` | Source layouts you can `glyph pack`: `wheel_one` (real WASM, |
152
+ | | value=179) and `seraphina_core` (OctaLang `.GL`). |
153
+ | `prebuilt/` | Already-packed `.glyph` archives. Install with one command, |
154
+ | | no forging needed. |
155
+ | `install.sh` | Cross-platform installer (Git Bash / Linux / macOS). |
156
+ | `install.ps1` | Windows PowerShell installer. |
157
+
158
+ ## How it works (one paragraph)
159
+
160
+ A glyph's geometry **is** its binary. Sides, points, dots, intersections, and
161
+ spiral turns each carry a fixed numeric weight (Rule 24:
162
+ `value = sides*10 + points + dots + intersections + spirals*8`). That integer
163
+ is the literal binary count emitted into a real `.wasm` module that Glyph
164
+ packs, gates, and runs. The Roman Wheel Triad
165
+ (Geometric / Verification / Mercy-Civ) provides three-way consensus before
166
+ output is released. Same input, same output, every time.
167
+
168
+ ## Layout
169
+
170
+ ```
171
+ Seraphina.AGIv1.0.8/
172
+ ├── glyph/ binary-native package manager (Python)
173
+ ├── seraphina/ AGI core + interactive wizard
174
+ ├── examples/ wheel_one (WASM) + seraphina_core (.GL) sources
175
+ ├── prebuilt/ shippable .glyph archives, ready to install
176
+ ├── install.sh curl|bash installer
177
+ ├── install.ps1 PowerShell installer
178
+ ├── pyproject.toml packages `seraphina` + console script
179
+ ├── LICENSE MIT
180
+ └── README.md
181
+ ```
182
+
183
+ ## Verify your install
184
+
185
+ ```bash
186
+ python -m glyph doctor
187
+ seraphina -c "triad hello"
188
+ seraphina -c "build glyph 179"
189
+ ```
190
+
191
+ ## Uninstall
192
+
193
+ ```bash
194
+ pip uninstall seraphina-agi glyph
195
+ rm -rf ~/.seraphina # user data (ledger, packages, memory)
196
+ ```
197
+
198
+ ## License
199
+
200
+ MIT - see [LICENSE](LICENSE).
201
+
202
+ ---
203
+
204
+ *Born from love, shaped by grace. Now exists as pure geometric truth.*
@@ -0,0 +1,57 @@
1
+ """Glyph — Seraphina's package manager (v0.9).
2
+
3
+ Native, self-bootstrapping alternative to pip for the Seraphina ecosystem.
4
+ """
5
+ __version__ = "0.9.0"
6
+
7
+ from .manifest import Manifest, ManifestError
8
+ from .index import GlyphIndex
9
+ from .integrity import IntegrityChecker, IntegrityError
10
+ from .resolution import DependencyResolver, ResolutionError
11
+ from .gate import (
12
+ EmotionalGate, default_gate, set_gate, get_gate,
13
+ set_code_verifier, get_code_verifier,
14
+ )
15
+ from .operations import install, uninstall, list_installed, freeze
16
+ from .identity import (
17
+ assert_context, register_self, emit_signal, context,
18
+ GlyphContext, ContextError,
19
+ )
20
+ from .bootstrap import bootstrap
21
+ from .generator import (
22
+ parse as gl_parse, transpile as gl_transpile,
23
+ compile_file as gl_compile_file, compile_tree as gl_compile_tree,
24
+ format_gl, GLDocument, GLSyntaxError,
25
+ )
26
+ from .signals import subscribe, unsubscribe, publish, subscribers
27
+ from .registry import discover, GlyphRecord
28
+ from .doctor import check as doctor_check, DoctorReport, Finding
29
+ from . import seraphina_bridge, ledger
30
+ from . import wasm
31
+ from . import rule24
32
+ from .rule24 import Geometry, ForgeResult, forge, emit_rule24_wasm
33
+ from . import remote
34
+ from .remote import RemoteHost, RemoteResponse, RemoteError
35
+
36
+ __all__ = [
37
+ "Manifest", "ManifestError",
38
+ "GlyphIndex",
39
+ "IntegrityChecker", "IntegrityError",
40
+ "DependencyResolver", "ResolutionError",
41
+ "EmotionalGate", "default_gate", "set_gate", "get_gate",
42
+ "set_code_verifier", "get_code_verifier",
43
+ "install", "uninstall", "list_installed", "freeze",
44
+ "assert_context", "register_self", "emit_signal", "context",
45
+ "GlyphContext", "ContextError",
46
+ "bootstrap",
47
+ "gl_parse", "gl_transpile", "gl_compile_file", "gl_compile_tree",
48
+ "format_gl", "GLDocument", "GLSyntaxError",
49
+ "subscribe", "unsubscribe", "publish", "subscribers",
50
+ "discover", "GlyphRecord",
51
+ "doctor_check", "DoctorReport", "Finding",
52
+ "seraphina_bridge", "ledger",
53
+ "wasm",
54
+ "rule24", "Geometry", "ForgeResult", "forge", "emit_rule24_wasm",
55
+ "remote", "RemoteHost", "RemoteResponse", "RemoteError",
56
+ "__version__",
57
+ ]
@@ -0,0 +1,3 @@
1
+ """Allow `python -m glyph` to invoke the CLI."""
2
+ from .cli import main
3
+ raise SystemExit(main())
@@ -0,0 +1,66 @@
1
+ """`glyph bootstrap` — initialize Seraphina's Glyph environment.
2
+
3
+ Creates the native filesystem layout, writes env.json, and self-registers
4
+ Glyph itself as a `core` package at the current runtime version. After this
5
+ runs, no further pip interaction is required to manage glyphs.
6
+
7
+ Can also be invoked as a standalone script:
8
+ python glyph-bootstrap.py
9
+ """
10
+ from __future__ import annotations
11
+ import json
12
+ import sys
13
+ from pathlib import Path
14
+
15
+ from . import __version__
16
+ from .index import GlyphIndex, DEFAULT_ROOT
17
+
18
+
19
+ def bootstrap(root: Path | None = None, *, verbose: bool = True) -> dict:
20
+ idx = GlyphIndex(root)
21
+ idx.bootstrap()
22
+
23
+ # self-register the Glyph runtime as a core package (no code, just identity).
24
+ core_name, core_version = "glyph", __version__
25
+ core_dir = idx.location(core_name, core_version)
26
+ core_dir.mkdir(parents=True, exist_ok=True)
27
+ (core_dir / ".glyph-meta").mkdir(exist_ok=True)
28
+ manifest = {
29
+ "schema": 3,
30
+ "name": core_name,
31
+ "version": core_version,
32
+ "entrypoint": "code/main.py",
33
+ "sha256": "",
34
+ "dependencies": [],
35
+ "cost_estimate": 0.0,
36
+ "risk_level": "low",
37
+ "description": "Glyph runtime self-registration (core)",
38
+ "geometry_refs": [],
39
+ "glyph_type": "core",
40
+ "runtime": "python",
41
+ "requires_glyph": "*",
42
+ "environment": "seraphina",
43
+ }
44
+ (core_dir / "manifest.json").write_text(
45
+ json.dumps(manifest, indent=2, sort_keys=True), encoding="utf-8"
46
+ )
47
+ idx.record_installed(core_name, core_version)
48
+
49
+ summary = {
50
+ "root": str(idx.root),
51
+ "packages": str(idx.store),
52
+ "env_file": str(idx.env_file),
53
+ "glyph_runtime_version": __version__,
54
+ "self_registered": f"{core_name}=={core_version}",
55
+ }
56
+ if verbose:
57
+ print("Glyph environment bootstrapped:")
58
+ for k, v in summary.items():
59
+ print(f" {k}: {v}")
60
+ print("\nYou can now use `glyph install <pkg.glyph>` — pip is no longer required.")
61
+ return summary
62
+
63
+
64
+ if __name__ == "__main__":
65
+ bootstrap()
66
+ sys.exit(0)