zouroboros-tui 2.0.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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 marlandoj
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/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "zouroboros-tui",
3
+ "version": "2.0.0",
4
+ "description": "Terminal User Interface dashboard for Zouroboros",
5
+ "type": "module",
6
+ "bin": {
7
+ "zouroboros-tui": "./dist/index.js"
8
+ },
9
+ "dependencies": {
10
+ "blessed": "^0.1.81",
11
+ "blessed-contrib": "^4.11.0",
12
+ "zouroboros-core": "2.0.0"
13
+ },
14
+ "devDependencies": {
15
+ "@types/blessed": "^0.1.25",
16
+ "@types/node": "^20.0.0",
17
+ "typescript": "^5.3.0"
18
+ },
19
+ "keywords": [
20
+ "tui",
21
+ "dashboard",
22
+ "zouroboros",
23
+ "terminal"
24
+ ],
25
+ "license": "MIT",
26
+ "author": "marlandoj.zo.computer",
27
+ "scripts": {
28
+ "build": "tsc",
29
+ "dev": "tsc --watch",
30
+ "start": "bun dist/index.js",
31
+ "test": "echo \"No tests yet\" && exit 0"
32
+ }
33
+ }
package/src/index.ts ADDED
@@ -0,0 +1,167 @@
1
+ #!/usr/bin/env bun
2
+ /**
3
+ * Zouroboros TUI
4
+ *
5
+ * Terminal User Interface dashboard for visual monitoring.
6
+ *
7
+ * @module zouroboros-tui
8
+ */
9
+
10
+ import blessed from 'blessed';
11
+ import contrib from 'blessed-contrib';
12
+ import { loadConfig } from 'zouroboros-core';
13
+
14
+ // Create screen
15
+ const screen = blessed.screen({
16
+ smartCSR: true,
17
+ title: 'Zouroboros Dashboard'
18
+ });
19
+
20
+ // Create grid
21
+ const grid = new contrib.grid({
22
+ rows: 12,
23
+ cols: 12,
24
+ screen: screen
25
+ });
26
+
27
+ // Header
28
+ const header = grid.set(0, 0, 1, 12, blessed.box, {
29
+ content: ' {center}🐍⭕ Zouroboros Dashboard{/center} ',
30
+ tags: true,
31
+ style: {
32
+ fg: 'cyan',
33
+ bold: true
34
+ }
35
+ });
36
+
37
+ // Status box
38
+ const statusBox = grid.set(1, 0, 3, 4, blessed.box, {
39
+ label: ' System Status ',
40
+ content: `
41
+ Memory: {green-fg}●{/green-fg} Online
42
+ Swarm: {green-fg}●{/green-fg} Ready
43
+ Self-Heal: {green-fg}●{/green-fg} Active
44
+ `,
45
+ tags: true,
46
+ border: {
47
+ type: 'line'
48
+ },
49
+ style: {
50
+ border: {
51
+ fg: 'cyan'
52
+ }
53
+ }
54
+ });
55
+
56
+ // Metrics box
57
+ const metricsBox = grid.set(1, 4, 3, 4, blessed.box, {
58
+ label: ' Metrics ',
59
+ content: `
60
+ Facts Stored: 1,247
61
+ Episodes: 89
62
+ Swarm Tasks: 156
63
+ Health Score: 94%
64
+ `,
65
+ tags: true,
66
+ border: {
67
+ type: 'line'
68
+ },
69
+ style: {
70
+ border: {
71
+ fg: 'cyan'
72
+ }
73
+ }
74
+ });
75
+
76
+ // Recent activity log
77
+ const activityLog = grid.set(1, 8, 5, 4, contrib.log, {
78
+ label: ' Recent Activity ',
79
+ fg: 'green',
80
+ selectedFg: 'green',
81
+ border: {
82
+ type: 'line'
83
+ },
84
+ style: {
85
+ border: {
86
+ fg: 'cyan'
87
+ }
88
+ }
89
+ });
90
+
91
+ // Memory graph
92
+ const memoryChart = grid.set(4, 0, 4, 8, contrib.line, {
93
+ label: ' Memory Usage (7 days) ',
94
+ style: {
95
+ line: 'yellow',
96
+ text: 'green',
97
+ baseline: 'black',
98
+ border: {
99
+ fg: 'cyan'
100
+ }
101
+ },
102
+ x: ['Day 1', 'Day 2', 'Day 3', 'Day 4', 'Day 5', 'Day 6', 'Day 7'],
103
+ y: [45, 52, 68, 75, 82, 89, 94],
104
+ border: {
105
+ type: 'line'
106
+ }
107
+ });
108
+
109
+ // Commands box
110
+ const commandsBox = grid.set(8, 0, 4, 12, blessed.box, {
111
+ label: ' Quick Commands ',
112
+ content: `
113
+ Press keys to execute:
114
+
115
+ {bold}[i]{/bold} Run Introspection {bold}[p]{/bold} Generate Prescription
116
+ {bold}[s]{/bold} Search Memory {bold}[c]{/bold} Config
117
+ {bold}[d]{/bold} Doctor {bold}[q]{/bold} Quit
118
+ `,
119
+ tags: true,
120
+ border: {
121
+ type: 'line'
122
+ },
123
+ style: {
124
+ border: {
125
+ fg: 'cyan'
126
+ }
127
+ }
128
+ });
129
+
130
+ // Key bindings
131
+ screen.key(['q', 'C-c'], () => {
132
+ process.exit(0);
133
+ });
134
+
135
+ screen.key(['i'], () => {
136
+ activityLog.log('Running introspection...');
137
+ // Would trigger introspect
138
+ });
139
+
140
+ screen.key(['p'], () => {
141
+ activityLog.log('Generating prescription...');
142
+ // Would trigger prescribe
143
+ });
144
+
145
+ screen.key(['s'], () => {
146
+ activityLog.log('Memory search mode...');
147
+ // Would open search prompt
148
+ });
149
+
150
+ screen.key(['d'], () => {
151
+ activityLog.log('Running doctor...');
152
+ // Would run doctor
153
+ });
154
+
155
+ // Add sample log entries
156
+ activityLog.log('Dashboard started');
157
+ activityLog.log('System healthy');
158
+ activityLog.log('Memory: 1,247 facts');
159
+
160
+ // Render
161
+ screen.render();
162
+
163
+ // Update loop
164
+ setInterval(() => {
165
+ // Would update metrics here
166
+ screen.render();
167
+ }, 5000);
package/tsconfig.json ADDED
@@ -0,0 +1,17 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ESNext",
5
+ "moduleResolution": "bundler",
6
+ "declaration": true,
7
+ "strict": true,
8
+ "esModuleInterop": true,
9
+ "skipLibCheck": true,
10
+ "forceConsistentCasingInFileNames": true,
11
+ "outDir": "./dist",
12
+ "rootDir": "./src",
13
+ "resolveJsonModule": true
14
+ },
15
+ "include": ["src/**/*"],
16
+ "exclude": ["dist", "node_modules"]
17
+ }