predators-protocol 0.5.0-beta.0 → 0.5.3-beta.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/lib/splash.js CHANGED
@@ -1,114 +1,117 @@
1
- // lib/splash.js · cinematic splash screen first-connection
2
- // Lei #13 Pureza: canon próprio · zero clone Matrix-style externo
3
- // Sub-etapa E · Polvo integração cumulativa
4
-
5
- "use strict";
6
-
7
- const { colorize, colorByLayer, bold, dim, italic, RESET } = require("./colors");
8
- const { renderEye, renderHeroBanner } = require("./ascii-art");
9
- const { isFirstConnection, markConnected, getTheme, readConfig } = require("./config");
10
-
11
- function sleep(ms) {
12
- return new Promise(resolve => setTimeout(resolve, ms));
13
- }
14
-
15
- async function fadeInLines(lines, msPerLine = 80, stream = process.stdout) {
16
- for (const line of lines) {
17
- stream.write(line + "\n");
18
- if (msPerLine > 0) await sleep(msPerLine);
19
- }
20
- }
21
-
22
- async function renderCinematicSplash(stream = process.stdout) {
23
- const theme = getTheme();
24
-
25
- // Clear screen for cinematic feel (only if TTY)
26
- if (stream.isTTY) {
27
- stream.write("\x1b[2J\x1b[H");
28
- }
29
-
30
- stream.write("\n");
31
- // The Eye logo · reveal slow
32
- const eyeLines = renderEye(theme).split("\n");
33
- await fadeInLines(eyeLines, stream.isTTY ? 30 : 0, stream);
34
-
35
- stream.write("\n");
36
-
37
- // Hero banner Predators Protocol text
38
- stream.write(renderHeroBanner(theme));
39
- stream.write("\n");
40
-
41
- // Tagline
42
- const tagline = italic(colorize(
43
- '"The eye that never closes. 63 predadores ativos. Canon vigente."',
44
- "APEX_GOLD",
45
- theme,
46
- ));
47
- stream.write(` ${tagline}\n\n`);
48
-
49
- await sleep(stream.isTTY ? 500 : 0);
50
-
51
- // Welcome message + quick start
52
- const welcomeBlock = [
53
- bold(colorize(" ▶ Bem-vindo ao Predators Protocol", "BUILDER_CYAN")),
54
- "",
55
- dim(" Framework multi-agente predatório · 63 predadores em 10 camadas"),
56
- dim(" Lei do Sangue inviolável · Synapse · Canon dos 3 Vetos"),
57
- "",
58
- bold(" Quick start:"),
59
- ` ${colorize("npx predators-protocol@beta help", "INTEL_GREEN")} ${dim("· lista comandos canon")}`,
60
- ` ${colorize("npx predators-protocol@beta list-predators", "INTEL_GREEN")} ${dim("· 63 predadores")}`,
61
- ` ${colorize("npx predators-protocol@beta layers-list", "INTEL_GREEN")} ${dim("· 7 context layers L0-L6")}`,
62
- ` ${colorize("npx predators-protocol@beta config", "INTEL_GREEN")} ${dim("· preferences · theme · audio toggle")}`,
63
- "",
64
- dim(" GitHub: https://github.com/SharkLEx/predators-protocol"),
65
- dim(" Licença: Proprietary · Alex Gonzaga (Tubarão-Apex)"),
66
- "",
67
- ];
68
- await fadeInLines(welcomeBlock, stream.isTTY ? 40 : 0, stream);
69
- }
70
-
71
- async function renderMiniSplash(stream = process.stdout) {
72
- const theme = getTheme();
73
- const config = readConfig();
74
- const eyeMini = colorize("◉", "APEX_GOLD", theme);
75
- const name = colorize("Predators Protocol", "APEX_GOLD", theme);
76
- const ver = dim("· canon vigente · 63 predadores ativos");
77
- const lastSeen = config.lastConnectionAt
78
- ? dim(`(última conexão: ${new Date(config.lastConnectionAt).toISOString().slice(0, 10)})`)
79
- : "";
80
- stream.write(`\n ${eyeMini} ${name} ${ver} ${lastSeen}\n\n`);
81
- }
82
-
83
- async function runInitSplash(options = {}) {
84
- const stream = options.stream || process.stdout;
85
- const force = options.force || false;
86
- const minimal = options.minimal || false;
87
-
88
- const config = readConfig();
89
- if (!config.splash.enabled && !force) {
90
- return { rendered: false, reason: "splash_disabled_user_pref" };
91
- }
92
-
93
- const firstTime = isFirstConnection();
94
-
95
- if (firstTime || force) {
96
- await renderCinematicSplash(stream);
97
- markConnected();
98
- return { rendered: true, mode: "cinematic", firstTime };
99
- }
100
- if (minimal || !options.fullEveryTime) {
101
- await renderMiniSplash(stream);
102
- markConnected();
103
- return { rendered: true, mode: "minimal", firstTime: false };
104
- }
105
- await renderCinematicSplash(stream);
106
- markConnected();
107
- return { rendered: true, mode: "cinematic", firstTime: false };
108
- }
109
-
110
- module.exports = {
111
- renderCinematicSplash,
112
- renderMiniSplash,
113
- runInitSplash,
114
- };
1
+ // lib/splash.js · cinematic splash screen first-connection
2
+ // Lei #13 Pureza: canon próprio · zero clone Matrix-style externo
3
+ // Sub-etapa E · Polvo integração cumulativa
4
+
5
+ "use strict";
6
+
7
+ const { colorize, colorByLayer, bold, dim, italic, RESET } = require("./colors");
8
+ const { renderEye, renderHeroBanner } = require("./ascii-art");
9
+ const { isFirstConnection, markConnected, getTheme, readConfig } = require("./config");
10
+ const { renderHeartbeat } = require("./heartbeat-animation");
11
+
12
+ function sleep(ms) {
13
+ return new Promise(resolve => setTimeout(resolve, ms));
14
+ }
15
+
16
+ async function fadeInLines(lines, msPerLine = 80, stream = process.stdout) {
17
+ for (const line of lines) {
18
+ stream.write(line + "\n");
19
+ if (msPerLine > 0) await sleep(msPerLine);
20
+ }
21
+ }
22
+
23
+ async function renderCinematicSplash(stream = process.stdout) {
24
+ const theme = getTheme();
25
+
26
+ // Clear screen for cinematic feel (only if TTY)
27
+ if (stream.isTTY) {
28
+ stream.write("\x1b[2J\x1b[H");
29
+ }
30
+
31
+ stream.write("\n");
32
+ // The Eye logo · reveal slow
33
+ const eyeLines = renderEye(theme).split("\n");
34
+ await fadeInLines(eyeLines, stream.isTTY ? 30 : 0, stream);
35
+
36
+ stream.write("\n");
37
+
38
+ // Hero banner "PREDATORS PROTOCOL" · canon Heartbeat Sangue (Lei #1 tema)
39
+ // 3 batidas vermelho-sangue → amarelo-dourado · ~1.7s + resting (Apex T7 BINARY 2026-05-27)
40
+ // Borboleta-azul Art. 4 imutável reduced-motion preservado via heartbeat-animation.js
41
+ await renderHeartbeat(stream);
42
+ stream.write("\n");
43
+
44
+ // Tagline (64 predadores pós-F4 Baleia-cantora · canon vigente)
45
+ const tagline = italic(colorize(
46
+ '"The eye that never closes. 64 predadores ativos. Canon vigente."',
47
+ "APEX_GOLD",
48
+ theme,
49
+ ));
50
+ stream.write(` ${tagline}\n\n`);
51
+
52
+ await sleep(stream.isTTY ? 500 : 0);
53
+
54
+ // Welcome message + quick start
55
+ const welcomeBlock = [
56
+ bold(colorize(" Bem-vindo ao Predators Protocol", "BUILDER_CYAN")),
57
+ "",
58
+ dim(" Framework multi-agente predatório · 64 predadores em 10 camadas"),
59
+ dim(" Lei do Sangue inviolável · Synapse · Canon dos 3 Vetos"),
60
+ "",
61
+ bold(" Quick start:"),
62
+ ` ${colorize("npx predators-protocol@beta help", "INTEL_GREEN")} ${dim("· lista comandos canon")}`,
63
+ ` ${colorize("npx predators-protocol@beta list-predators", "INTEL_GREEN")} ${dim("· 64 predadores")}`,
64
+ ` ${colorize("npx predators-protocol@beta layers-list", "INTEL_GREEN")} ${dim("· 7 context layers L0-L6")}`,
65
+ ` ${colorize("npx predators-protocol@beta config", "INTEL_GREEN")} ${dim("· preferences · theme · audio toggle")}`,
66
+ "",
67
+ dim(" GitHub: https://github.com/SharkLEx/predators-protocol"),
68
+ dim(" Licença: Proprietary · Alex Gonzaga (Tubarão-Apex)"),
69
+ "",
70
+ ];
71
+ await fadeInLines(welcomeBlock, stream.isTTY ? 40 : 0, stream);
72
+ }
73
+
74
+ async function renderMiniSplash(stream = process.stdout) {
75
+ const theme = getTheme();
76
+ const config = readConfig();
77
+ const eyeMini = colorize("◉", "APEX_GOLD", theme);
78
+ const name = colorize("Predators Protocol", "APEX_GOLD", theme);
79
+ const ver = dim("· canon vigente · 64 predadores ativos");
80
+ const lastSeen = config.lastConnectionAt
81
+ ? dim(`(última conexão: ${new Date(config.lastConnectionAt).toISOString().slice(0, 10)})`)
82
+ : "";
83
+ stream.write(`\n ${eyeMini} ${name} ${ver} ${lastSeen}\n\n`);
84
+ }
85
+
86
+ async function runInitSplash(options = {}) {
87
+ const stream = options.stream || process.stdout;
88
+ const force = options.force || false;
89
+ const minimal = options.minimal || false;
90
+
91
+ const config = readConfig();
92
+ if (!config.splash.enabled && !force) {
93
+ return { rendered: false, reason: "splash_disabled_user_pref" };
94
+ }
95
+
96
+ const firstTime = isFirstConnection();
97
+
98
+ if (firstTime || force) {
99
+ await renderCinematicSplash(stream);
100
+ markConnected();
101
+ return { rendered: true, mode: "cinematic", firstTime };
102
+ }
103
+ if (minimal || !options.fullEveryTime) {
104
+ await renderMiniSplash(stream);
105
+ markConnected();
106
+ return { rendered: true, mode: "minimal", firstTime: false };
107
+ }
108
+ await renderCinematicSplash(stream);
109
+ markConnected();
110
+ return { rendered: true, mode: "cinematic", firstTime: false };
111
+ }
112
+
113
+ module.exports = {
114
+ renderCinematicSplash,
115
+ renderMiniSplash,
116
+ runInitSplash,
117
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "predators-protocol",
3
- "version": "0.5.0-beta.0",
4
- "description": "Predators Protocol · multi-agent predatory framework · 64 predators in 10 layers · canon Lei #14 PERFEITO OU FIX-GERAL · FASE 7 COMPLETA: RuntimeRouter + Synapse Engine + LLM Real Production + v1 Híbrida full transition · proprietary",
3
+ "version": "0.5.3-beta.0",
4
+ "description": "Predators Protocol \u00b7 multi-agent predatory framework \u00b7 64 predators in 10 layers \u00b7 canon Lei #14 PERFEITO OU FIX-GERAL \u00b7 FASE 7 COMPLETA: RuntimeRouter + Synapse Engine + LLM Real Production + v1 \u2192 H\u00edbrida full transition \u00b7 proprietary",
5
5
  "keywords": [
6
6
  "predators-protocol",
7
7
  "multi-agent",
@@ -21,7 +21,7 @@
21
21
  "directory": "packages/predators-protocol"
22
22
  },
23
23
  "license": "SEE LICENSE IN LICENSE",
24
- "author": "Alex Gonzaga (Tubarão-Apex) <alex@predators-protocol.dev>",
24
+ "author": "Alex Gonzaga (Tubar\u00e3o-Apex) <alex@predators-protocol.dev>",
25
25
  "type": "commonjs",
26
26
  "bin": {
27
27
  "predators-protocol": "bin/predators-cli.js"