noiton 2.0.2 → 2.0.3
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/package.json +1 -1
- package/src/commands/change.js +2 -2
- package/src/commands/init.js +3 -2
- package/src/commands/refresh.js +2 -2
- package/src/commands/remove.js +2 -2
- package/src/commands/status.js +2 -2
- package/src/octopus.js +62 -212
- package/src/ui.js +2 -23
package/package.json
CHANGED
package/src/commands/change.js
CHANGED
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
import { input, confirm } from "@inquirer/prompts";
|
|
6
6
|
import { c } from "../constants.js";
|
|
7
|
-
import {
|
|
7
|
+
import { printBanner, spinner, ok, fail, info, box, dim } from "../ui.js";
|
|
8
8
|
import { getConfiguredAgents } from "../lib/agents/index.js";
|
|
9
9
|
import { validateKey, maskKey } from "../lib/api.js";
|
|
10
10
|
import { farewellMessage } from "../messages.js";
|
|
11
11
|
|
|
12
12
|
export async function changeCommand() {
|
|
13
|
-
|
|
13
|
+
printBanner();
|
|
14
14
|
|
|
15
15
|
const configured = getConfiguredAgents();
|
|
16
16
|
|
package/src/commands/init.js
CHANGED
|
@@ -21,6 +21,7 @@ import { input, confirm, select, checkbox } from "@inquirer/prompts";
|
|
|
21
21
|
import { c } from "../constants.js";
|
|
22
22
|
import {
|
|
23
23
|
printBanner,
|
|
24
|
+
successBanner,
|
|
24
25
|
box,
|
|
25
26
|
spinner,
|
|
26
27
|
ok,
|
|
@@ -52,7 +53,7 @@ import { installAgent, updateAgent, offerInstall } from "../lib/install.js";
|
|
|
52
53
|
|
|
53
54
|
export async function initCommand() {
|
|
54
55
|
// ============= STEP 1: BANNER =============
|
|
55
|
-
printBanner(
|
|
56
|
+
printBanner();
|
|
56
57
|
await sleep(400);
|
|
57
58
|
|
|
58
59
|
// ============= STEP 2: DETECT AGENTS =============
|
|
@@ -317,7 +318,7 @@ export async function initCommand() {
|
|
|
317
318
|
divider();
|
|
318
319
|
await sleep(300);
|
|
319
320
|
console.log();
|
|
320
|
-
|
|
321
|
+
successBanner();
|
|
321
322
|
await sleep(400);
|
|
322
323
|
|
|
323
324
|
const successCount = results.filter((r) => r.ok).length;
|
package/src/commands/refresh.js
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { c } from "../constants.js";
|
|
6
|
-
import {
|
|
6
|
+
import { printBanner, spinner, ok, fail, info, box, dim } from "../ui.js";
|
|
7
7
|
import { getConfiguredAgents, getAgent } from "../lib/agents/index.js";
|
|
8
8
|
import { validateKey, maskKey } from "../lib/api.js";
|
|
9
9
|
import { input } from "@inquirer/prompts";
|
|
10
10
|
import { farewellMessage } from "../messages.js";
|
|
11
11
|
|
|
12
12
|
export async function refreshCommand() {
|
|
13
|
-
|
|
13
|
+
printBanner();
|
|
14
14
|
|
|
15
15
|
const configured = getConfiguredAgents();
|
|
16
16
|
|
package/src/commands/remove.js
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
import { confirm } from "@inquirer/prompts";
|
|
6
6
|
import { c } from "../constants.js";
|
|
7
|
-
import {
|
|
7
|
+
import { printBanner, spinner, ok, fail, info, box, dim } from "../ui.js";
|
|
8
8
|
import { getConfiguredAgents } from "../lib/agents/index.js";
|
|
9
9
|
import { farewellMessage, cancelMessage } from "../messages.js";
|
|
10
10
|
|
|
11
11
|
export async function removeCommand() {
|
|
12
|
-
|
|
12
|
+
printBanner();
|
|
13
13
|
|
|
14
14
|
const configured = getConfiguredAgents();
|
|
15
15
|
|
package/src/commands/status.js
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { c } from "../constants.js";
|
|
6
|
-
import {
|
|
6
|
+
import { printBanner, ok, warn, fail, info, dim, divider, checklist, box } from "../ui.js";
|
|
7
7
|
import { getAllStatuses } from "../lib/agents/index.js";
|
|
8
8
|
import { maskKey } from "../lib/api.js";
|
|
9
9
|
import { farewellMessage } from "../messages.js";
|
|
10
10
|
|
|
11
11
|
export async function statusCommand() {
|
|
12
|
-
|
|
12
|
+
printBanner();
|
|
13
13
|
|
|
14
14
|
const statuses = getAllStatuses();
|
|
15
15
|
const detected = statuses.filter((s) => s.detected);
|
package/src/octopus.js
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* NOITON
|
|
2
|
+
* NOITON Banner - Clean OpenCode-style design
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* -
|
|
6
|
-
* -
|
|
7
|
-
* -
|
|
8
|
-
* -
|
|
4
|
+
* Features:
|
|
5
|
+
* - Big 🐙 emoji prominently displayed
|
|
6
|
+
* - Large "NOITON" wordmark in figlet (ANSI Shadow)
|
|
7
|
+
* - Clean subtitle line
|
|
8
|
+
* - No more ASCII art octopus
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
+
import figlet from "figlet";
|
|
11
12
|
import gradient from "gradient-string";
|
|
13
|
+
import { VERSION, c } from "./constants.js";
|
|
12
14
|
|
|
13
|
-
// NOITON brand gradient
|
|
15
|
+
// NOITON brand gradient (purple → magenta → cyan)
|
|
14
16
|
const brandGradient = gradient([
|
|
15
17
|
"#A78BFA", // light purple
|
|
16
18
|
"#C084FC", // purple
|
|
@@ -22,229 +24,77 @@ const brandGradient = gradient([
|
|
|
22
24
|
const successGradient = gradient(["#34D399", "#22D3EE", "#A78BFA"]);
|
|
23
25
|
const errorGradient = gradient(["#F87171", "#EF4444"]);
|
|
24
26
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
╭┘ ╰┐
|
|
42
|
-
╭┘ ♥ ✦ ♥ ╰┐
|
|
43
|
-
│ │
|
|
44
|
-
╰╮ ╭╯
|
|
45
|
-
╰╮ ✦ ♥ ╭╯
|
|
46
|
-
╰╮ ╭╯
|
|
47
|
-
╰─✦───♥─✦─╯
|
|
48
|
-
`);
|
|
27
|
+
// Cache the figlet rendering for performance
|
|
28
|
+
let cachedFiglet = null;
|
|
29
|
+
function getFiglet() {
|
|
30
|
+
if (!cachedFiglet) {
|
|
31
|
+
try {
|
|
32
|
+
cachedFiglet = figlet.textSync("NOITON", {
|
|
33
|
+
font: "ANSI Shadow",
|
|
34
|
+
width: 80,
|
|
35
|
+
whitespaceBreak: true,
|
|
36
|
+
});
|
|
37
|
+
} catch {
|
|
38
|
+
// Fallback if figlet fails
|
|
39
|
+
cachedFiglet = `N O I T O N`;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return cachedFiglet;
|
|
49
43
|
}
|
|
50
44
|
|
|
51
45
|
/**
|
|
52
|
-
*
|
|
46
|
+
* Print the big NOITON banner with octopus emoji.
|
|
47
|
+
* OpenCode-style: big emoji + big text + subtitle
|
|
53
48
|
*/
|
|
54
|
-
export function
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
╲_______╱
|
|
60
|
-
╭╯ ╰╮
|
|
61
|
-
╭┘ ◠ ◠ ╰┐
|
|
62
|
-
╰╮ ♥ ╭╯
|
|
63
|
-
╰───╯
|
|
64
|
-
`);
|
|
65
|
-
}
|
|
49
|
+
export function printBanner() {
|
|
50
|
+
console.log();
|
|
51
|
+
// Big octopus emoji on its own line, centered
|
|
52
|
+
console.log(c.cyan(" 🐙"));
|
|
53
|
+
console.log();
|
|
66
54
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
*/
|
|
70
|
-
export function octopusCurious() {
|
|
71
|
-
return brandGradient.multiline(`
|
|
72
|
-
╭━━━━━━━━━╮
|
|
73
|
-
╱ ╲
|
|
74
|
-
│ ? ? │
|
|
75
|
-
│ ◡ │
|
|
76
|
-
╲___________╱
|
|
77
|
-
│ ╲___╱ │
|
|
78
|
-
╭┤ ├╮
|
|
79
|
-
╭┘╰┐ ╭━┘╰┐
|
|
80
|
-
╭┘ ╰╮ ╭┘ ╰┐
|
|
81
|
-
╭┘ ╰━╯ ╰┐
|
|
82
|
-
╭┘ ╰┐
|
|
83
|
-
╭┘ ? ? ? ╰┐
|
|
84
|
-
│ │
|
|
85
|
-
╰╮ ╭╯
|
|
86
|
-
╰╮ ╭╯
|
|
87
|
-
╰╮ ? ? ╭╯
|
|
88
|
-
╰───────────╯
|
|
89
|
-
`);
|
|
90
|
-
}
|
|
55
|
+
// Big NOITON wordmark with gradient
|
|
56
|
+
console.log(brandGradient.multiline(getFiglet()));
|
|
91
57
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
│ @ @ │
|
|
100
|
-
│ ▬ │
|
|
101
|
-
╲___________╱
|
|
102
|
-
│ ╲___╱ │
|
|
103
|
-
╭┤ ├╮
|
|
104
|
-
╭┘╰┐ ╭━┘╰┐
|
|
105
|
-
╭┘ ╰╮ ╭┘ ╰┐
|
|
106
|
-
╭┘ ◠ ╰━╯ ◠ ╰┐
|
|
107
|
-
╭┘ ⚙ ╰┐
|
|
108
|
-
╭┘ ⚙ ⚙ ⚙ ╰┐
|
|
109
|
-
│ ⚙ ⚙ │
|
|
110
|
-
╰╮ ⚙ ⚙ ╭╯
|
|
111
|
-
╰╮ ╭╯
|
|
112
|
-
╰╮──⚙───⚙──⚙─╭╯
|
|
113
|
-
╰───────────╯
|
|
114
|
-
`);
|
|
58
|
+
// Subtitle line
|
|
59
|
+
console.log(
|
|
60
|
+
" " +
|
|
61
|
+
c.bold(c.white("🐙 Universal AI Agent Connector")) +
|
|
62
|
+
c.dim(` · v${VERSION}`)
|
|
63
|
+
);
|
|
64
|
+
console.log();
|
|
115
65
|
}
|
|
116
66
|
|
|
117
67
|
/**
|
|
118
|
-
*
|
|
68
|
+
* Smaller success banner (used at end of init flow)
|
|
119
69
|
*/
|
|
120
|
-
export function
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
╭━━━╭┘ ╰╮ ╭┘ ╰┐━━━╮
|
|
131
|
-
╭━━━╭┘ ◠ ╰━╯ ◠ ╰┐━━━╮
|
|
132
|
-
╭━━━╭┘ ╰┐━━━╮
|
|
133
|
-
╭━━━╭┘ ♥ ★ ♥ ╰┐━━━╮
|
|
134
|
-
│ │
|
|
135
|
-
╰╮ ★ ♥ ★ ♥ ╭╯
|
|
136
|
-
╰╮ ╭╯
|
|
137
|
-
★ ╰╮ ♥ ★ ♥ ╭╯ ★
|
|
138
|
-
╰─★──♥───★──♥──★╯
|
|
139
|
-
♪ ♥ ♪
|
|
140
|
-
`);
|
|
70
|
+
export function successBanner() {
|
|
71
|
+
console.log();
|
|
72
|
+
console.log(c.green(" 🐙"));
|
|
73
|
+
console.log();
|
|
74
|
+
console.log(successGradient.multiline(getFiglet()));
|
|
75
|
+
console.log(
|
|
76
|
+
" " +
|
|
77
|
+
c.bold(c.green("✨ Tudo conectado! ✨"))
|
|
78
|
+
);
|
|
79
|
+
console.log();
|
|
141
80
|
}
|
|
142
81
|
|
|
143
82
|
/**
|
|
144
|
-
* Sad
|
|
83
|
+
* Sad/small banner
|
|
145
84
|
*/
|
|
146
|
-
export function
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
╲___________╱
|
|
153
|
-
│ ╲___╱ │
|
|
154
|
-
╭┤ ├╮
|
|
155
|
-
╭┘╰┐ ╭━┘╰┐
|
|
156
|
-
╭━┘ ╰╮ ╭┘ ╰━╗
|
|
157
|
-
╭┘ ╰━╯ ╰┐
|
|
158
|
-
╭┘ ╰┐
|
|
159
|
-
│ │
|
|
160
|
-
╰╮ ╭╯
|
|
161
|
-
╰╮ ╭╯
|
|
162
|
-
╰╮ ╭╯
|
|
163
|
-
╰╮ ╭╯
|
|
164
|
-
╰──────╯
|
|
165
|
-
`);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* Sleeping octopus - zzz floating
|
|
170
|
-
*/
|
|
171
|
-
export function octopusSleeping() {
|
|
172
|
-
return brandGradient.multiline(`
|
|
173
|
-
╭━━━━━━━━━╮
|
|
174
|
-
╱ ╲
|
|
175
|
-
│ - - │
|
|
176
|
-
│ ▬ │
|
|
177
|
-
╲___________╱ z
|
|
178
|
-
│ ╲___╱ │ zZ
|
|
179
|
-
╭┤ ├╮ zZZ
|
|
180
|
-
╭┘╰┐ ╭━┘╰┐
|
|
181
|
-
╭┘ ╰╮ ╭┘ ╰┐
|
|
182
|
-
╭┘ ╰━╯ ╰┐
|
|
183
|
-
╭┘ z ╰┐
|
|
184
|
-
╭┘ zZ ╰┐
|
|
185
|
-
│ zZZ │
|
|
186
|
-
╰╮ ╭╯
|
|
187
|
-
╰╮ ╭╯
|
|
188
|
-
╰──────────────╯
|
|
189
|
-
`);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* Coding octopus - typing on keyboard
|
|
194
|
-
*/
|
|
195
|
-
export function octopusCoding() {
|
|
196
|
-
return brandGradient.multiline(`
|
|
197
|
-
╭━━━━━━━━━╮
|
|
198
|
-
╱ ╲
|
|
199
|
-
│ ◉ ◉ │
|
|
200
|
-
│ ◡ │
|
|
201
|
-
╲___________╱
|
|
202
|
-
│ ╲___╱ │
|
|
203
|
-
╭┤ ├╮
|
|
204
|
-
╭───╭┘╰┐ ╭━┘╰┐───╮
|
|
205
|
-
╭┘ ╭┘ ╰╮ ╭┘ ╰┐ ╰┐
|
|
206
|
-
╭┘ ╭┘ ◠ ╰━╯ ◠ ╰┐ ╰┐
|
|
207
|
-
╭┘ ╭┘ ╰┐ ╰┐
|
|
208
|
-
╭┘ ╭┘ ╰┐ ╰┐
|
|
209
|
-
│ │ [ / / / / ] │ │
|
|
210
|
-
╰╮ ╰╮ ╭╯ ╭╯
|
|
211
|
-
╰╮ ╰╮ ▓▓▓▓▓▓▓ ╭╯ ╭╯
|
|
212
|
-
╰╮ ╰╮ ╭╯ ╭╯
|
|
213
|
-
╰╮╰──────────╯ ╭╯
|
|
214
|
-
╰╮ ▓▓ ╭╯
|
|
215
|
-
╰──────────╯
|
|
216
|
-
`);
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* NOITON wordmark logo with small octopus on top
|
|
221
|
-
*/
|
|
222
|
-
export function octopusLogo() {
|
|
223
|
-
return brandGradient.multiline(`
|
|
224
|
-
╭━━━━━╮
|
|
225
|
-
╱ ◉ ◉ ╲
|
|
226
|
-
│ ◡ │
|
|
227
|
-
╲_______╱
|
|
228
|
-
╭╯ ╰╮
|
|
229
|
-
╭┘ ◠ ◠ ╰┐
|
|
230
|
-
╰╮ ♥ ╭╯
|
|
231
|
-
╰───╯
|
|
232
|
-
|
|
233
|
-
███╗ ██╗ ██████╗ ██╗████████╗ ██████╗ ███╗ ██╗
|
|
234
|
-
████╗ ██║██╔═══██╗██║╚══██╔══╝██╔═══██╗████╗ ██║
|
|
235
|
-
██╔██╗ ██║██║ ██║██║ ██║ ██║ ██║██╔██╗ ██║
|
|
236
|
-
██║╚██╗██║██║ ██║██║ ██║ ██║ ██║██║╚██╗██║
|
|
237
|
-
██║ ╚████║╚██████╔╝██║ ██║ ╚██████╔╝██║ ╚████║
|
|
238
|
-
╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝
|
|
239
|
-
`);
|
|
85
|
+
export function errorBanner() {
|
|
86
|
+
console.log();
|
|
87
|
+
console.log(c.red(" 🐙"));
|
|
88
|
+
console.log();
|
|
89
|
+
console.log(errorGradient.multiline(getFiglet()));
|
|
90
|
+
console.log();
|
|
240
91
|
}
|
|
241
92
|
|
|
242
93
|
/**
|
|
243
|
-
* Get
|
|
94
|
+
* Get just the big octopus emoji (for inline use)
|
|
244
95
|
*/
|
|
245
|
-
export function
|
|
246
|
-
|
|
247
|
-
return poses[Math.floor(Math.random() * poses.length)]();
|
|
96
|
+
export function bigOctopus() {
|
|
97
|
+
return c.cyan("🐙");
|
|
248
98
|
}
|
|
249
99
|
|
|
250
100
|
export {
|
package/src/ui.js
CHANGED
|
@@ -9,30 +9,9 @@ import picocolors from "picocolors";
|
|
|
9
9
|
import ora from "ora";
|
|
10
10
|
import boxen from "boxen";
|
|
11
11
|
import { VERSION, c } from "./constants.js";
|
|
12
|
-
import {
|
|
12
|
+
import { printBanner, successBanner, errorBanner, bigOctopus, brandGradient } from "./octopus.js";
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Print the main NOITON banner with octopus mascot.
|
|
18
|
-
* @param {"happy"|"curious"|"dancing"|"sad"|"sleeping"|"working"} mood
|
|
19
|
-
*/
|
|
20
|
-
export function printBanner(mood = "happy") {
|
|
21
|
-
const octopus = {
|
|
22
|
-
happy: octopusHappy,
|
|
23
|
-
curious: octopusCurious,
|
|
24
|
-
dancing: octopusDancing,
|
|
25
|
-
sad: octopusSad,
|
|
26
|
-
sleeping: octopusSleeping,
|
|
27
|
-
working: octopusWorking,
|
|
28
|
-
}[mood] || octopusHappy;
|
|
29
|
-
|
|
30
|
-
console.log();
|
|
31
|
-
console.log(octopus());
|
|
32
|
-
console.log(brandGradient(` N O I T O N v${VERSION}`));
|
|
33
|
-
console.log(c.dim(` 🐙 Universal AI Agent Connector 🐙`));
|
|
34
|
-
console.log();
|
|
35
|
-
}
|
|
14
|
+
export { printBanner, successBanner, errorBanner, bigOctopus, brandGradient };
|
|
36
15
|
|
|
37
16
|
// ============= BOXES =============
|
|
38
17
|
|