neuroalpha 0.6.13 → 0.7.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/README.md +14 -10
- package/bin/cli.js +79 -69
- package/docs//320/230/320/235/320/241/320/242/320/240/320/243/320/232/320/246/320/230/320/257.md +2 -2
- package/package.json +4 -5
- package/public/activate.html +41 -19
- package/public/activate.js +81 -10
- package/public/app.js +300 -152
- package/public/index.html +4 -37
- package/server/api/routes.js +570 -906
- package/server/auth/index.js +576 -761
- package/server/brokers/index.js +1 -2
- package/server/config.js +73 -53
- package/server/index.js +186 -212
- package/server/llm/local-engine.js +843 -0
- package/server/llm/providers.js +45 -34
- package/server/notify/index.js +304 -466
- package/deploy/docs/01-central.md +0 -96
- package/deploy/docs/02-cloud-instances.md +0 -130
- package/deploy/docs/03-desktop-build.md +0 -92
- package/deploy/docs/04-client-guide.md +0 -101
- package/deploy/docs/05-operations.md +0 -109
- package/deploy/docs/06-env-reference.md +0 -91
- package/deploy/docs/07-stress-test.md +0 -253
- package/deploy/docs/pdf/01-central.pdf +0 -0
- package/deploy/docs/pdf/02-cloud-instances.pdf +0 -0
- package/deploy/docs/pdf/03-desktop-build.pdf +0 -0
- package/deploy/docs/pdf/04-client-guide.pdf +0 -0
- package/deploy/docs/pdf/05-operations.pdf +0 -0
- package/deploy/docs/pdf/06-env-reference.pdf +0 -0
- package/deploy/docs/pdf/07-stress-test.pdf +0 -0
- package/deploy/install.sh +0 -128
- package/deploy/k8s/instance.yaml +0 -147
- package/public/admin.html +0 -604
- package/public/landing.html +0 -1207
- package/public/legal.html +0 -134
- package/scripts/set-admin-password.mjs +0 -30
- package/server/billing/yookassa.js +0 -142
- package/server/instance/agent.js +0 -259
- package/server/instance/central.js +0 -514
- package/server/instance/identity.js +0 -79
- package/server/instance/provision.js +0 -166
- package/server/instance/signing.js +0 -71
- package/server/role.js +0 -44
package/deploy/k8s/instance.yaml
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
# Copyright (c) 2026 Roman A. Perepelkin. All rights reserved. Proprietary software.
|
|
2
|
-
# Шаблон машины клиента НейроАльфа. Замените na235412 на ID машины из админки центра (вкладка «Машины клиентов»),
|
|
3
|
-
# а значения Secret — на переменные, показанные при создании машины (ключ показывается один раз).
|
|
4
|
-
#
|
|
5
|
-
# sed 's/na235412/naXXXXXX/g' instance.yaml | kubectl apply -f -
|
|
6
|
-
#
|
|
7
|
-
# Одна реплика и стратегия Recreate обязательны: база SQLite на томе не допускает двух процессов сразу.
|
|
8
|
-
apiVersion: v1
|
|
9
|
-
kind: Namespace
|
|
10
|
-
metadata:
|
|
11
|
-
name: na235412
|
|
12
|
-
labels:
|
|
13
|
-
app.kubernetes.io/part-of: neuroalpha
|
|
14
|
-
---
|
|
15
|
-
apiVersion: v1
|
|
16
|
-
kind: Secret
|
|
17
|
-
metadata:
|
|
18
|
-
name: neuroalpha-instance
|
|
19
|
-
namespace: na235412
|
|
20
|
-
type: Opaque
|
|
21
|
-
stringData:
|
|
22
|
-
NEUROALPHA_ROLE: instance
|
|
23
|
-
INSTANCE_ID: na235412
|
|
24
|
-
INSTANCE_KEY: na_inst_REPLACE_ME
|
|
25
|
-
CENTRAL_URL: https://neuroalpha.odant.org
|
|
26
|
-
CLOUD_URL: https://neuroalpha.odant.org
|
|
27
|
-
# Открытый ключ центра одной строкой с \n — вставьте как есть из админки, в одинарных кавычках
|
|
28
|
-
LICENSE_PUBLIC_KEY: '-----BEGIN PUBLIC KEY-----\nREPLACE_ME\n-----END PUBLIC KEY-----'
|
|
29
|
-
# Необязательно: ключ шифрования токенов брокера. Если не задан — создаётся на томе /data/.master.key
|
|
30
|
-
# MASTER_KEY: "случайная строка 32+ символа"
|
|
31
|
-
---
|
|
32
|
-
apiVersion: v1
|
|
33
|
-
kind: PersistentVolumeClaim
|
|
34
|
-
metadata:
|
|
35
|
-
name: neuroalpha-data
|
|
36
|
-
namespace: na235412
|
|
37
|
-
spec:
|
|
38
|
-
accessModes: [ReadWriteOnce]
|
|
39
|
-
resources:
|
|
40
|
-
requests:
|
|
41
|
-
storage: 5Gi
|
|
42
|
-
---
|
|
43
|
-
apiVersion: apps/v1
|
|
44
|
-
kind: Deployment
|
|
45
|
-
metadata:
|
|
46
|
-
name: neuroalpha
|
|
47
|
-
namespace: na235412
|
|
48
|
-
spec:
|
|
49
|
-
replicas: 1
|
|
50
|
-
strategy:
|
|
51
|
-
type: Recreate
|
|
52
|
-
selector:
|
|
53
|
-
matchLabels: { app: neuroalpha }
|
|
54
|
-
template:
|
|
55
|
-
metadata:
|
|
56
|
-
labels: { app: neuroalpha }
|
|
57
|
-
spec:
|
|
58
|
-
securityContext:
|
|
59
|
-
runAsNonRoot: true
|
|
60
|
-
runAsUser: 1000
|
|
61
|
-
fsGroup: 1000
|
|
62
|
-
containers:
|
|
63
|
-
- name: neuroalpha
|
|
64
|
-
image: registry.odant.org/neuroalpha:0.4.0
|
|
65
|
-
imagePullPolicy: IfNotPresent
|
|
66
|
-
ports:
|
|
67
|
-
- containerPort: 3000
|
|
68
|
-
envFrom:
|
|
69
|
-
- secretRef:
|
|
70
|
-
name: neuroalpha-instance
|
|
71
|
-
volumeMounts:
|
|
72
|
-
- name: data
|
|
73
|
-
mountPath: /data
|
|
74
|
-
resources:
|
|
75
|
-
requests: { cpu: "500m", memory: "1Gi" }
|
|
76
|
-
limits: { cpu: "2", memory: "3Gi" }
|
|
77
|
-
readinessProbe:
|
|
78
|
-
httpGet: { path: /healthz, port: 3000 }
|
|
79
|
-
initialDelaySeconds: 10
|
|
80
|
-
periodSeconds: 15
|
|
81
|
-
livenessProbe:
|
|
82
|
-
httpGet: { path: /healthz, port: 3000 }
|
|
83
|
-
initialDelaySeconds: 60
|
|
84
|
-
periodSeconds: 30
|
|
85
|
-
failureThreshold: 4
|
|
86
|
-
securityContext:
|
|
87
|
-
allowPrivilegeEscalation: false
|
|
88
|
-
capabilities: { drop: [ALL] }
|
|
89
|
-
volumes:
|
|
90
|
-
- name: data
|
|
91
|
-
persistentVolumeClaim:
|
|
92
|
-
claimName: neuroalpha-data
|
|
93
|
-
---
|
|
94
|
-
apiVersion: v1
|
|
95
|
-
kind: Service
|
|
96
|
-
metadata:
|
|
97
|
-
name: neuroalpha
|
|
98
|
-
namespace: na235412
|
|
99
|
-
spec:
|
|
100
|
-
selector: { app: neuroalpha }
|
|
101
|
-
ports:
|
|
102
|
-
- port: 80
|
|
103
|
-
targetPort: 3000
|
|
104
|
-
---
|
|
105
|
-
apiVersion: networking.k8s.io/v1
|
|
106
|
-
kind: Ingress
|
|
107
|
-
metadata:
|
|
108
|
-
name: neuroalpha
|
|
109
|
-
namespace: na235412
|
|
110
|
-
annotations:
|
|
111
|
-
# WebSocket /ws держит соединение долго
|
|
112
|
-
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
|
|
113
|
-
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
|
|
114
|
-
spec:
|
|
115
|
-
ingressClassName: nginx
|
|
116
|
-
tls:
|
|
117
|
-
- hosts: [na235412.odant.org]
|
|
118
|
-
# wildcard-сертификат *.odant.org, скопированный в каждый namespace (или выпускаемый cert-manager)
|
|
119
|
-
secretName: odant-wildcard-tls
|
|
120
|
-
rules:
|
|
121
|
-
- host: na235412.odant.org
|
|
122
|
-
http:
|
|
123
|
-
paths:
|
|
124
|
-
- path: /
|
|
125
|
-
pathType: Prefix
|
|
126
|
-
backend:
|
|
127
|
-
service:
|
|
128
|
-
name: neuroalpha
|
|
129
|
-
port:
|
|
130
|
-
number: 80
|
|
131
|
-
---
|
|
132
|
-
# Машине нужен только исходящий доступ (центр, Мосбиржа, брокеры, новости) и входящий — от ingress.
|
|
133
|
-
apiVersion: networking.k8s.io/v1
|
|
134
|
-
kind: NetworkPolicy
|
|
135
|
-
metadata:
|
|
136
|
-
name: neuroalpha-ingress-only
|
|
137
|
-
namespace: na235412
|
|
138
|
-
spec:
|
|
139
|
-
podSelector: { matchLabels: { app: neuroalpha } }
|
|
140
|
-
policyTypes: [Ingress]
|
|
141
|
-
ingress:
|
|
142
|
-
- from:
|
|
143
|
-
- namespaceSelector:
|
|
144
|
-
matchLabels:
|
|
145
|
-
kubernetes.io/metadata.name: ingress-nginx
|
|
146
|
-
ports:
|
|
147
|
-
- port: 3000
|