predators-protocol 0.3.0-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/LICENSE +22 -0
- package/README.md +104 -0
- package/bin/predators-cli.js +490 -0
- package/bundle/.claude/commands/auditoria-tubarao.md +104 -0
- package/bundle/.claude/commands/briefing.md +84 -0
- package/bundle/.claude/commands/cyber-squad.md +71 -0
- package/bundle/.claude/commands/encarnar.md +63 -0
- package/bundle/.claude/commands/onda-fenix.md +71 -0
- package/bundle/.claude/commands/predador.md +67 -0
- package/bundle/.claude/commands/synapse-trace.md +92 -0
- package/bundle/CLAUDE.md +373 -0
- package/bundle/QUICKSTART-SOCIO.md +45 -0
- package/bundle/docs/CANON/DIRETRIZ-1-LEI-DO-TOM-CONVERSACIONAL.md +77 -0
- package/bundle/docs/CANON/DIRETRIZ-2-AUTONOMIA-SEQUENCIAL-LEI-9.md +85 -0
- package/bundle/docs/CANON/DIRETRIZ-3-LEI-8-PASSO-0-EVERY-ONDA.md +69 -0
- package/bundle/docs/CANON/DIRETRIZ-4-SEPARACAO-CANON-DOC-COMUNICACAO-DIRETA.md +69 -0
- package/bundle/docs/CANON/LEI-14-PERFEITO-OU-FIX-GERAL.md +113 -0
- package/bundle/docs/CYBER_SQUAD.md +367 -0
- package/bundle/docs/ENCARNACAO.md +291 -0
- package/bundle/docs/SYNAPSE.md +241 -0
- package/bundle/predators/apex/aguia-real/constitution.md +330 -0
- package/bundle/predators/apex/aguia-real/predator.json +28 -0
- package/bundle/predators/apex/leao/constitution.md +283 -0
- package/bundle/predators/apex/leao/predator.json +34 -0
- package/bundle/predators/apex/orca/constitution.md +279 -0
- package/bundle/predators/apex/orca/predator.json +43 -0
- package/bundle/predators/apex/tigre-siberiano/constitution.md +276 -0
- package/bundle/predators/apex/tigre-siberiano/predator.json +37 -0
- package/bundle/predators/builder/camaleao/constitution.md +171 -0
- package/bundle/predators/builder/camaleao/predator.json +36 -0
- package/bundle/predators/builder/coruja/constitution.md +169 -0
- package/bundle/predators/builder/coruja/predator.json +38 -0
- package/bundle/predators/builder/falcao-peregrino/constitution.md +171 -0
- package/bundle/predators/builder/falcao-peregrino/predator.json +37 -0
- package/bundle/predators/builder/gaviao/constitution.md +169 -0
- package/bundle/predators/builder/gaviao/predator.json +38 -0
- package/bundle/predators/builder/jaguar/constitution.md +181 -0
- package/bundle/predators/builder/jaguar/predator.json +51 -0
- package/bundle/predators/builder/onca-pintada/constitution.md +175 -0
- package/bundle/predators/builder/onca-pintada/predator.json +38 -0
- package/bundle/predators/builder/pantera-negra/constitution.md +307 -0
- package/bundle/predators/builder/pantera-negra/predator.json +23 -0
- package/bundle/predators/builder/polvo/constitution.md +182 -0
- package/bundle/predators/builder/polvo/predator.json +37 -0
- package/bundle/predators/builder/tatu-bola/constitution.md +299 -0
- package/bundle/predators/builder/tatu-bola/predator.json +43 -0
- package/bundle/predators/copy/corvo/constitution.md +156 -0
- package/bundle/predators/copy/corvo/predator.json +40 -0
- package/bundle/predators/copy/golfinho/constitution.md +199 -0
- package/bundle/predators/copy/golfinho/predator.json +38 -0
- package/bundle/predators/copy/lobo-cinzento/constitution.md +209 -0
- package/bundle/predators/copy/lobo-cinzento/predator.json +37 -0
- package/bundle/predators/copy/papagaio/constitution.md +194 -0
- package/bundle/predators/copy/papagaio/predator.json +38 -0
- package/bundle/predators/copy/rouxinol/constitution.md +196 -0
- package/bundle/predators/copy/rouxinol/predator.json +37 -0
- package/bundle/predators/copy/serpente-coral/constitution.md +210 -0
- package/bundle/predators/copy/serpente-coral/predator.json +37 -0
- package/bundle/predators/designer/aguia-harpia/constitution.md +199 -0
- package/bundle/predators/designer/aguia-harpia/predator.json +45 -0
- package/bundle/predators/designer/aranha-tecela/constitution.md +173 -0
- package/bundle/predators/designer/aranha-tecela/predator.json +37 -0
- package/bundle/predators/designer/borboleta-azul/constitution.md +171 -0
- package/bundle/predators/designer/borboleta-azul/predator.json +35 -0
- package/bundle/predators/designer/cisne-negro/constitution.md +172 -0
- package/bundle/predators/designer/cisne-negro/predator.json +36 -0
- package/bundle/predators/designer/mantis/constitution.md +182 -0
- package/bundle/predators/designer/mantis/predator.json +37 -0
- package/bundle/predators/designer/pavao/constitution.md +167 -0
- package/bundle/predators/designer/pavao/predator.json +23 -0
- package/bundle/predators/designer/tucano-toco/constitution.md +357 -0
- package/bundle/predators/designer/tucano-toco/predator.json +51 -0
- package/bundle/predators/governance/cavalo-marinho/constitution.md +216 -0
- package/bundle/predators/governance/cavalo-marinho/predator.json +35 -0
- package/bundle/predators/governance/elefante/constitution.md +236 -0
- package/bundle/predators/governance/elefante/predator.json +23 -0
- package/bundle/predators/governance/gorila-prata/constitution.md +225 -0
- package/bundle/predators/governance/gorila-prata/predator.json +43 -0
- package/bundle/predators/governance/lince/constitution.md +224 -0
- package/bundle/predators/governance/lince/predator.json +35 -0
- package/bundle/predators/governance/raposa/constitution.md +213 -0
- package/bundle/predators/governance/raposa/predator.json +35 -0
- package/bundle/predators/governance/tartaruga-gigante/constitution.md +218 -0
- package/bundle/predators/governance/tartaruga-gigante/predator.json +35 -0
- package/bundle/predators/growth/abelha-rainha/constitution.md +222 -0
- package/bundle/predators/growth/abelha-rainha/predator.json +36 -0
- package/bundle/predators/growth/albatroz/constitution.md +218 -0
- package/bundle/predators/growth/albatroz/predator.json +36 -0
- package/bundle/predators/growth/condor/constitution.md +203 -0
- package/bundle/predators/growth/condor/predator.json +23 -0
- package/bundle/predators/growth/coruja-de-igreja/constitution.md +236 -0
- package/bundle/predators/growth/coruja-de-igreja/predator.json +36 -0
- package/bundle/predators/growth/formiga-sauva/constitution.md +243 -0
- package/bundle/predators/growth/formiga-sauva/predator.json +45 -0
- package/bundle/predators/growth/lobo-do-artico/constitution.md +229 -0
- package/bundle/predators/growth/lobo-do-artico/predator.json +36 -0
- package/bundle/predators/hunter/crocodilo/constitution.md +293 -0
- package/bundle/predators/hunter/crocodilo/predator.json +39 -0
- package/bundle/predators/hunter/escorpiao/constitution.md +327 -0
- package/bundle/predators/hunter/escorpiao/predator.json +34 -0
- package/bundle/predators/hunter/hiena/constitution.md +343 -0
- package/bundle/predators/hunter/hiena/predator.json +34 -0
- package/bundle/predators/hunter/piranha/constitution.md +283 -0
- package/bundle/predators/hunter/piranha/predator.json +35 -0
- package/bundle/predators/hunter/tubarao-branco/constitution.md +527 -0
- package/bundle/predators/hunter/tubarao-branco/predator.json +36 -0
- package/bundle/predators/intel/alcateia/constitution.md +217 -0
- package/bundle/predators/intel/alcateia/predator.json +35 -0
- package/bundle/predators/intel/guepardo/constitution.md +201 -0
- package/bundle/predators/intel/guepardo/predator.json +36 -0
- package/bundle/predators/intel/jiboia/constitution.md +243 -0
- package/bundle/predators/intel/jiboia/predator.json +38 -0
- package/bundle/predators/intel/lobo-solitario/constitution.md +275 -0
- package/bundle/predators/intel/lobo-solitario/predator.json +23 -0
- package/bundle/predators/intel/morcego/constitution.md +217 -0
- package/bundle/predators/intel/morcego/predator.json +35 -0
- package/bundle/predators/intel/pirarucu/constitution.md +309 -0
- package/bundle/predators/intel/pirarucu/predator.json +40 -0
- package/bundle/predators/intel/polvo-mimico/constitution.md +220 -0
- package/bundle/predators/intel/polvo-mimico/predator.json +35 -0
- package/bundle/predators/intel/tarantula/constitution.md +222 -0
- package/bundle/predators/intel/tarantula/predator.json +37 -0
- package/bundle/predators/meta/aranha-d-agua/constitution.md +264 -0
- package/bundle/predators/meta/aranha-d-agua/predator.json +37 -0
- package/bundle/predators/meta/camaleao-real/constitution.md +245 -0
- package/bundle/predators/meta/camaleao-real/predator.json +36 -0
- package/bundle/predators/meta/coruja-real/constitution.md +255 -0
- package/bundle/predators/meta/coruja-real/predator.json +36 -0
- package/bundle/predators/meta/dragao-ancestral/constitution.md +297 -0
- package/bundle/predators/meta/dragao-ancestral/predator.json +23 -0
- package/bundle/predators/meta/fenix/constitution.md +282 -0
- package/bundle/predators/meta/fenix/predator.json +35 -0
- package/bundle/predators/meta/lince-das-neves/constitution.md +252 -0
- package/bundle/predators/meta/lince-das-neves/predator.json +35 -0
- package/bundle/predators/web3/caranguejo-ferradura/constitution.md +245 -0
- package/bundle/predators/web3/caranguejo-ferradura/predator.json +36 -0
- package/bundle/predators/web3/medusa/constitution.md +236 -0
- package/bundle/predators/web3/medusa/predator.json +39 -0
- package/bundle/predators/web3/orca-alfa/constitution.md +227 -0
- package/bundle/predators/web3/orca-alfa/predator.json +23 -0
- package/bundle/predators/web3/polvo-gigante/constitution.md +240 -0
- package/bundle/predators/web3/polvo-gigante/predator.json +36 -0
- package/bundle/predators/web3/raia-eletrica/constitution.md +236 -0
- package/bundle/predators/web3/raia-eletrica/predator.json +36 -0
- package/bundle/predators/web3/tubarao-martelo/constitution.md +236 -0
- package/bundle/predators/web3/tubarao-martelo/predator.json +36 -0
- package/lib/ascii-art.js +224 -0
- package/lib/audio.js +137 -0
- package/lib/colors.js +168 -0
- package/lib/config.js +114 -0
- package/lib/spinners.js +146 -0
- package/lib/splash.js +114 -0
- package/package.json +51 -0
package/lib/spinners.js
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
// lib/spinners.js · 6 predator-themed spinners frame-based
|
|
2
|
+
// Lei #13 Pureza: zero deps externas · ANSI cursor manipulation puro
|
|
3
|
+
// Sub-etapa B · Aranha-tecelã + Cisne-negro
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
|
|
7
|
+
const { colorByLayer, colorize, RESET } = require("./colors");
|
|
8
|
+
|
|
9
|
+
const CURSOR_HIDE = "\x1b[?25l";
|
|
10
|
+
const CURSOR_SHOW = "\x1b[?25h";
|
|
11
|
+
const ERASE_LINE = "\x1b[2K";
|
|
12
|
+
const LINE_START = "\r";
|
|
13
|
+
|
|
14
|
+
const SPINNERS_CANON = {
|
|
15
|
+
// Águia · vôando · análise estratégica
|
|
16
|
+
"aguia-soaring": {
|
|
17
|
+
layer: "apex",
|
|
18
|
+
frames: ["╱╲", "─╲", "╱─", "── ", " ──", " ╱╲", "╲╱ ", " ─"],
|
|
19
|
+
intervalMs: 120,
|
|
20
|
+
label: "Águia analisa",
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
// Tubarão · caçando · audit
|
|
24
|
+
"tubarao-hunting": {
|
|
25
|
+
layer: "hunter",
|
|
26
|
+
frames: ["▰▱▱▱▱▱", "▰▰▱▱▱▱", "▰▰▰▱▱▱", "▰▰▰▰▱▱", "▰▰▰▰▰▱", "▰▰▰▰▰▰", "▱▰▰▰▰▰", "▱▱▰▰▰▰"],
|
|
27
|
+
intervalMs: 100,
|
|
28
|
+
label: "Tubarão audita",
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
// Polvo · 8 tentáculos pulsing · cross-doc
|
|
32
|
+
"polvo-tentacles": {
|
|
33
|
+
layer: "builder",
|
|
34
|
+
frames: ["◯", "◍", "◐", "◑", "◒", "◓", "◔", "◕"],
|
|
35
|
+
intervalMs: 100,
|
|
36
|
+
label: "Polvo cruza-doc",
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
// Elefante · stomping · memória institucional
|
|
40
|
+
"elefante-stomping": {
|
|
41
|
+
layer: "governance",
|
|
42
|
+
frames: ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█", "▇", "▆", "▅", "▄", "▃", "▂"],
|
|
43
|
+
intervalMs: 80,
|
|
44
|
+
label: "Elefante consulta memória",
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
// Sinapse · firing · rede neural LLM
|
|
48
|
+
"sinapse-firing": {
|
|
49
|
+
layer: "meta",
|
|
50
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"],
|
|
51
|
+
intervalMs: 80,
|
|
52
|
+
label: "Sinapse processa",
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
// Default · The Eye pulsing
|
|
56
|
+
"default-eye": {
|
|
57
|
+
layer: "apex",
|
|
58
|
+
frames: ["⊙", "◉", "⊙", "◌", "○", "◌"],
|
|
59
|
+
intervalMs: 150,
|
|
60
|
+
label: "The eye that never closes",
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
// Map command type → recommended spinner
|
|
65
|
+
const COMMAND_SPINNER_MAP = {
|
|
66
|
+
invoke: "aguia-soaring",
|
|
67
|
+
list: "polvo-tentacles",
|
|
68
|
+
workflow: "sinapse-firing",
|
|
69
|
+
audit: "tubarao-hunting",
|
|
70
|
+
validate: "tubarao-hunting",
|
|
71
|
+
memory: "elefante-stomping",
|
|
72
|
+
"pre-action": "sinapse-firing",
|
|
73
|
+
default: "default-eye",
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
class Spinner {
|
|
77
|
+
constructor(spinnerName = "default-eye", options = {}) {
|
|
78
|
+
this.config = SPINNERS_CANON[spinnerName] || SPINNERS_CANON["default-eye"];
|
|
79
|
+
this.label = options.label || this.config.label;
|
|
80
|
+
this.theme = options.theme || "default";
|
|
81
|
+
this.stream = options.stream || process.stderr;
|
|
82
|
+
this._frame = 0;
|
|
83
|
+
this._interval = null;
|
|
84
|
+
this._active = false;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
_render() {
|
|
88
|
+
const frameChar = this.config.frames[this._frame % this.config.frames.length];
|
|
89
|
+
const coloredFrame = colorByLayer(frameChar, this.config.layer, this.theme);
|
|
90
|
+
const coloredLabel = colorize(this.label, "APEX_GOLD", this.theme);
|
|
91
|
+
this.stream.write(`${LINE_START}${ERASE_LINE}${coloredFrame} ${coloredLabel}`);
|
|
92
|
+
this._frame++;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
start() {
|
|
96
|
+
if (this._active) return this;
|
|
97
|
+
if (!this.stream.isTTY) {
|
|
98
|
+
// Non-TTY · graceful degradation · just print label once
|
|
99
|
+
this.stream.write(`${this.label}...\n`);
|
|
100
|
+
return this;
|
|
101
|
+
}
|
|
102
|
+
this._active = true;
|
|
103
|
+
this.stream.write(CURSOR_HIDE);
|
|
104
|
+
this._render();
|
|
105
|
+
this._interval = setInterval(() => this._render(), this.config.intervalMs);
|
|
106
|
+
return this;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
stop(finalMessage = "") {
|
|
110
|
+
if (!this._active && this.stream.isTTY) {
|
|
111
|
+
// Was non-TTY · nothing to clean
|
|
112
|
+
if (finalMessage) this.stream.write(`${finalMessage}\n`);
|
|
113
|
+
return this;
|
|
114
|
+
}
|
|
115
|
+
if (this._interval) {
|
|
116
|
+
clearInterval(this._interval);
|
|
117
|
+
this._interval = null;
|
|
118
|
+
}
|
|
119
|
+
if (this.stream.isTTY) {
|
|
120
|
+
this.stream.write(`${LINE_START}${ERASE_LINE}${CURSOR_SHOW}`);
|
|
121
|
+
}
|
|
122
|
+
if (finalMessage) this.stream.write(`${finalMessage}\n`);
|
|
123
|
+
this._active = false;
|
|
124
|
+
return this;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
succeed(message) {
|
|
128
|
+
return this.stop(`${colorize("✓", "INTEL_GREEN", this.theme)} ${message}`);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
fail(message) {
|
|
132
|
+
return this.stop(`${colorize("✗", "HUNTER_RED", this.theme)} ${message}`);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function getSpinnerForCommand(commandName, options = {}) {
|
|
137
|
+
const spinnerName = COMMAND_SPINNER_MAP[commandName] || COMMAND_SPINNER_MAP.default;
|
|
138
|
+
return new Spinner(spinnerName, options);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
module.exports = {
|
|
142
|
+
Spinner,
|
|
143
|
+
SPINNERS_CANON,
|
|
144
|
+
COMMAND_SPINNER_MAP,
|
|
145
|
+
getSpinnerForCommand,
|
|
146
|
+
};
|
package/lib/splash.js
ADDED
|
@@ -0,0 +1,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
|
+
|
|
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
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "predators-protocol",
|
|
3
|
+
"version": "0.3.0-beta.0",
|
|
4
|
+
"description": "Predators Protocol · multi-agent predatory framework · 63 predators in 10 layers · canon Lei #14 PERFEITO OU FIX-GERAL · UX layer + sync command · proprietary",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"predators-protocol",
|
|
7
|
+
"multi-agent",
|
|
8
|
+
"framework",
|
|
9
|
+
"ai-agents",
|
|
10
|
+
"claude",
|
|
11
|
+
"canon",
|
|
12
|
+
"cli"
|
|
13
|
+
],
|
|
14
|
+
"homepage": "https://github.com/SharkLEx/predators-protocol#readme",
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/SharkLEx/predators-protocol/issues"
|
|
17
|
+
},
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/SharkLEx/predators-protocol.git",
|
|
21
|
+
"directory": "packages/predators-protocol"
|
|
22
|
+
},
|
|
23
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
24
|
+
"author": "Alex Gonzaga (Tubarão-Apex) <alex@predators-protocol.dev>",
|
|
25
|
+
"type": "commonjs",
|
|
26
|
+
"bin": {
|
|
27
|
+
"predators-protocol": "bin/predators-cli.js"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"bin/predators-cli.js",
|
|
31
|
+
"lib/**/*.js",
|
|
32
|
+
"bundle/**/*.md",
|
|
33
|
+
"bundle/**/*.json",
|
|
34
|
+
"README.md",
|
|
35
|
+
"LICENSE"
|
|
36
|
+
],
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=20.0.0"
|
|
39
|
+
},
|
|
40
|
+
"publishConfig": {
|
|
41
|
+
"access": "public",
|
|
42
|
+
"registry": "https://registry.npmjs.org/"
|
|
43
|
+
},
|
|
44
|
+
"scripts": {
|
|
45
|
+
"preversion": "node scripts/check-cwd-canon.js",
|
|
46
|
+
"prepublishOnly": "node scripts/check-cwd-canon.js",
|
|
47
|
+
"prepack": "node scripts/copy-canon-bundle.js",
|
|
48
|
+
"test:cli": "node bin/predators-cli.js help",
|
|
49
|
+
"test:blindagem": "node tests/lib-blindagem-canon.test.js"
|
|
50
|
+
}
|
|
51
|
+
}
|