neuroalpha 0.3.16 → 0.5.1
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/README.md +0 -1
- package/config/certs/russian_trusted_root_ca.pem +33 -0
- package/docs//320/224/320/225/320/237/320/233/320/236/320/231.md +4 -4
- package/docs//320/230/320/235/320/241/320/242/320/240/320/243/320/232/320/246/320/230/320/257.md +2 -6
- package/docs//320/234/320/225/320/245/320/220/320/235/320/230/320/232/320/220_/320/230_/320/237/320/220/320/240/320/220/320/234/320/225/320/242/320/240/320/253.md +2 -2
- package/package.json +60 -53
- package/public/activate.html +36 -0
- package/public/activate.js +33 -0
- package/public/admin.html +126 -7
- package/public/app.js +608 -182
- package/public/index.html +57 -47
- package/public/landing.html +106 -37
- package/public/legal.html +4 -4
- package/public/styles.css +152 -36
- package/server/api/routes.js +308 -37
- package/server/auth/index.js +79 -15
- package/server/brokers/index.js +1022 -172
- package/server/build-info.js +7 -0
- package/server/config.js +13 -6
- package/server/data/moex.js +6 -4
- package/server/db.js +22 -18
- package/server/desktop-entry.js +103 -0
- package/server/hub.js +28 -14
- package/server/index.js +82 -12
- package/server/instance/agent.js +259 -0
- package/server/instance/central.js +491 -0
- package/server/instance/identity.js +79 -0
- package/server/instance/provision.js +166 -0
- package/server/instance/signing.js +71 -0
- package/server/model/edge.js +19 -0
- package/server/model/forecast.js +107 -57
- package/server/model/live.js +1 -1
- package/server/model/models.js +12 -3
- package/server/model/research.js +218 -30
- package/server/notify/index.js +51 -16
- package/server/params-meta.js +3 -3
- package/server/role.js +44 -0
- package/server/security.js +40 -0
- package/server/strategist/index.js +462 -488
- package/server/strategist/tools.js +675 -532
- package/server/tls-ca.js +32 -0
package/server/tls-ca.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Copyright (c) 2026 Roman A. Perepelkin. All rights reserved. Proprietary software.
|
|
2
|
+
// Доверенные корневые сертификаты для HTTPS к российским сервисам (брокеры, GigaChat, MAX):
|
|
3
|
+
// системные корни Node.js + корневой сертификат НУЦ Минцифры РФ (Russian Trusted Root CA).
|
|
4
|
+
import fs from 'node:fs';
|
|
5
|
+
import path from 'node:path';
|
|
6
|
+
import tls from 'node:tls';
|
|
7
|
+
import { ROOT } from './config.js';
|
|
8
|
+
|
|
9
|
+
const CANDIDATES = [
|
|
10
|
+
process.env.BROKER_CA_FILE,
|
|
11
|
+
process.env.GIGACHAT_CA_FILE,
|
|
12
|
+
path.join(ROOT, 'config', 'certs', 'russian_trusted_root_ca.pem'),
|
|
13
|
+
path.resolve(ROOT, '../work/#system/certs/russian_trusted_root_ca.pem'),
|
|
14
|
+
].filter(Boolean);
|
|
15
|
+
|
|
16
|
+
let russianRootPem = '';
|
|
17
|
+
let russianRootPath = '';
|
|
18
|
+
for (const p of CANDIDATES) {
|
|
19
|
+
try {
|
|
20
|
+
if (fs.existsSync(p)) {
|
|
21
|
+
russianRootPem = fs.readFileSync(p, 'utf8');
|
|
22
|
+
russianRootPath = p;
|
|
23
|
+
break;
|
|
24
|
+
}
|
|
25
|
+
} catch { /* ignore */ }
|
|
26
|
+
}
|
|
27
|
+
if (!russianRootPem) {
|
|
28
|
+
console.warn('⚠ Не найден сертификат НУЦ Минцифры (russian_trusted_root_ca.pem): HTTPS к Т-Банку будет отклонён. Укажите путь в BROKER_CA_FILE.');
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const TRUSTED_CA = russianRootPem ? [...tls.rootCertificates, russianRootPem] : [...tls.rootCertificates];
|
|
32
|
+
export const RUSSIAN_ROOT_CA_PATH = russianRootPath;
|