pi-magi-theme 0.1.0
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.
- package/LICENSE +21 -0
- package/README.md +75 -0
- package/extensions/magi/index.ts +1518 -0
- package/package.json +44 -0
- package/themes/magi.json +96 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 b-iurea
|
|
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.
|
package/README.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# pi-magi-theme
|
|
2
|
+
|
|
3
|
+
A three-mind council theme + extension for [pi](https://pi.dev): a detailed Tree of Life in the header, the three MAGI in a fixed side panel, live llama-swap telemetry, and `/magi`, a council of three models that votes on your engineering questions.
|
|
4
|
+
|
|
5
|
+
All artwork is original. The symbolism (the three Magi, the Tree of Life, the golem, the seven seals) is public domain.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pi install npm:pi-magi-theme
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Then in `~/.pi/agent/settings.json`:
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
"theme": "magi",
|
|
17
|
+
"tuiMode": "fullscreen"
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
`tuiMode: fullscreen` keeps the side panel fixed while the chat scrolls.
|
|
21
|
+
|
|
22
|
+
### From source
|
|
23
|
+
|
|
24
|
+
Clone the repo and point pi at it instead (edits in the repo are live on the next pi start):
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
"extensions": ["/path/to/pi-magi-theme/extensions/magi"],
|
|
28
|
+
"themes": ["/path/to/pi-magi-theme/themes"]
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Commands: `/magi <question>`, `/magi config`, `/magi-ui [on|off|panel]`.
|
|
32
|
+
|
|
33
|
+
## Lore ↔ function
|
|
34
|
+
|
|
35
|
+
Every symbol stands for something real the agent is doing.
|
|
36
|
+
|
|
37
|
+
| Symbol | Meaning | Function | Where |
|
|
38
|
+
|--------|---------|----------|-------|
|
|
39
|
+
| Tree of Life, upper triad (Keter, Chokmah, Binah) | will, wisdom, understanding | the model is **thinking** | footer |
|
|
40
|
+
| light descending Tiferet → Malkuth | manifestation | the model is **streaming the answer** (with live tok/s) | footer |
|
|
41
|
+
| light ascending Malkuth → Keter | ascent | the model is **being loaded into VRAM** | footer |
|
|
42
|
+
| Malkuth at rest | the kingdom | **idle**, with the last run duration | footer |
|
|
43
|
+
| MELCHIOR · BALTHASAR · CASPAR | the three Magi | light up while **thinking**, give the **verdict** when answering, boot on model load; `/magi` council | panel |
|
|
44
|
+
| the golem, EMET ("truth") | a clay servant that acts | a **tool is running** | panel + footer |
|
|
45
|
+
| the golem, MET ("death") | the aleph is erased | a **tool failed** | panel + footer |
|
|
46
|
+
| SYNC | the golem's obedience | **tool success rate** | panel + footer |
|
|
47
|
+
| CHESED ✓ / GEBURAH ✗ | mercy / severity | **successful / failed tools** | panel + footer |
|
|
48
|
+
| the seven seals | the end of an age | **context window usage**, one seal per seventh | panel |
|
|
49
|
+
| breaking the seals → seventh seal opened | apocalypse and renewal | **context compaction** running → done | panel + footer |
|
|
50
|
+
|
|
51
|
+
## The council
|
|
52
|
+
|
|
53
|
+
`/magi <question>` asks three models in parallel, each with its own nature, then shows the votes and a majority verdict:
|
|
54
|
+
|
|
55
|
+
| Unit | Nature | Looks at |
|
|
56
|
+
|------|--------|----------|
|
|
57
|
+
| MELCHIOR | PRAGMATIST | simplest working solution, effort vs value, reuse, YAGNI |
|
|
58
|
+
| BALTHASAR | GUARDIAN | failure modes, security, operability, maintainability |
|
|
59
|
+
| CASPAR | VISIONARY | reframing the problem, alternatives, DX, evolution |
|
|
60
|
+
|
|
61
|
+
Each MAGI also gets the recent conversation as context. Full opinions are added to the chat (not sent to the agent).
|
|
62
|
+
|
|
63
|
+
`/magi config` picks a model per unit and saves `~/.pi/agent/magi.json` (unset = current session model). Optional per-unit thinking:
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
{ "MELCHIOR": { "model": "llama-swap/Qwen3.8 27B Q4_K_M - Thinking", "thinking": "low" } }
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## llama-swap
|
|
70
|
+
|
|
71
|
+
When the session model uses the `llama-swap` provider, the side panel:
|
|
72
|
+
|
|
73
|
+
- loads the model into VRAM on startup and on model change (`GET /upstream/<model>/health`), with a MAGI boot animation;
|
|
74
|
+
- shows VRAM, GPU load/temperature/power and RAM from `/metrics`;
|
|
75
|
+
- shows server-measured tok/s, prompt tok/s and KV cache hits from `/api/metrics/activity`.
|