@camstack/server 1.2.459 → 1.2.460
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/THIRD_PARTY_MODELS.md +2 -2
- package/dist/boot/boot-config.js +40 -15
- package/dist/main.js +12 -0
- package/package.json +9 -9
package/THIRD_PARTY_MODELS.md
CHANGED
|
@@ -134,7 +134,7 @@ entry kept resolvable for a saved selection but no longer offered.
|
|
|
134
134
|
|
|
135
135
|
| Catalog ids | Upstream | Code / weights | Training data | CamStack changes | Downloaded from |
|
|
136
136
|
| --- | --- | --- | --- | --- | --- |
|
|
137
|
-
| `yunet-2023mar` (default) | [OpenCV Zoo YuNet](https://github.com/opencv/opencv_zoo/tree/main/models/face_detection_yunet) | BSD-3-Clause (`BSD-3-Clause.txt`) / MIT (`MIT-yunet-reference.txt`) | WIDER FACE: research-oriented terms; images CC BY-NC-ND | input contract baked into the graph (the pool RGB /255 becomes the upstream BGR 0..255: Mul(255) plus a channel Gather); internal tensor names cleared in the OpenVINO IR; ONNX fp32, OpenVINO IR fp32, CoreML fp16 (scripts/build-yunet-model.py) | mirror `faceDetection/yunet` |
|
|
137
|
+
| `yunet-2023mar` (default) | [OpenCV Zoo YuNet](https://github.com/opencv/opencv_zoo/tree/main/models/face_detection_yunet) | BSD-3-Clause (`BSD-3-Clause.txt`) / MIT (`MIT-yunet-reference.txt`) | WIDER FACE: research-oriented terms; images CC BY-NC-ND | input contract baked into the graph (the pool RGB /255 becomes the upstream BGR 0..255: Mul(255) plus a channel Gather); internal tensor names cleared in the OpenVINO IR; ONNX fp32, OpenVINO IR fp32, CoreML fp16 (scripts/build-yunet-model.py); Edge TPU build: the bake folded into the first Conv, full-integer int8 post-training quantisation calibrated on CamStack person crops, compiled with edgetpu_compiler 14 (scripts/build-yunet-edgetpu.py) | mirror `faceDetection/yunet` |
|
|
138
138
|
|
|
139
139
|
### Face recognition
|
|
140
140
|
|
|
@@ -146,7 +146,7 @@ entry kept resolvable for a saved selection but no longer offered.
|
|
|
146
146
|
|
|
147
147
|
| Catalog ids | Upstream | Code / weights | Training data | CamStack changes | Downloaded from |
|
|
148
148
|
| --- | --- | --- | --- | --- | --- |
|
|
149
|
-
| `yolox-tiny-plate` (default) | [open-lpr models (faisalthaheem/open-lpr-models), YOLOX-tiny](https://huggingface.co/faisalthaheem/open-lpr-models) | Apache-2.0 / Apache-2.0 (`Apache-2.0.txt`) | Simanno annotated plate corpus plus community-contributed photographs, pseudo-labelled by a teacher model (not published; the upstream NOTICE says the photographs were uploaded without consent obtained): UNKNOWN | input contract baked into the graph (static 1x3x640x640 RGB /255 becomes the upstream BGR 0..255: Mul(255) plus a channel Gather) and the output reshaped to the YOLOv8 layout (cx, cy, w, h, obj*cls); ONNX fp32, OpenVINO IR fp16, CoreML fp16 (scripts/build-yolox-plate-model.py) | mirror `plateDetection/yolox-tiny-plate` |
|
|
149
|
+
| `yolox-tiny-plate` (default) | [open-lpr models (faisalthaheem/open-lpr-models), YOLOX-tiny](https://huggingface.co/faisalthaheem/open-lpr-models) | Apache-2.0 / Apache-2.0 (`Apache-2.0.txt`) | Simanno annotated plate corpus plus community-contributed photographs, pseudo-labelled by a teacher model (not published; the upstream NOTICE says the photographs were uploaded without consent obtained): UNKNOWN | input contract baked into the graph (static 1x3x640x640 RGB /255 becomes the upstream BGR 0..255: Mul(255) plus a channel Gather) and the output reshaped to the YOLOv8 layout (cx, cy, w, h, obj*cls); ONNX fp32, OpenVINO IR fp16, CoreML fp16 (scripts/build-yolox-plate-model.py); Edge TPU build: the Focus stem rewritten as the equivalent 6x6 stride-2 Conv with the input bake folded into it, the graph cut before the grid decode (raw per-stride head), full-integer int8 post-training quantisation calibrated on CamStack vehicle crops, compiled with edgetpu_compiler 14 (scripts/build-yolox-plate-edgetpu.py) | mirror `plateDetection/yolox-tiny-plate` |
|
|
150
150
|
|
|
151
151
|
### Licence plate reading
|
|
152
152
|
|
package/dist/boot/boot-config.js
CHANGED
|
@@ -38,6 +38,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
38
38
|
};
|
|
39
39
|
})();
|
|
40
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
exports.ignoredTlsCertSources = ignoredTlsCertSources;
|
|
41
42
|
exports.loadBootstrapConfig = loadBootstrapConfig;
|
|
42
43
|
exports.autoGenerateJwtSecret = autoGenerateJwtSecret;
|
|
43
44
|
exports.setupInfra = setupInfra;
|
|
@@ -67,9 +68,15 @@ const ENV_VAR_MAP = {
|
|
|
67
68
|
CAMSTACK_ADMIN_USER: 'auth.adminUsername',
|
|
68
69
|
CAMSTACK_ADMIN_PASS: 'auth.adminPassword',
|
|
69
70
|
CAMSTACK_TLS_ENABLED: 'tls.enabled',
|
|
70
|
-
CAMSTACK_TLS_CERT: 'tls.certPath',
|
|
71
|
-
CAMSTACK_TLS_KEY: 'tls.keyPath',
|
|
72
71
|
};
|
|
72
|
+
/**
|
|
73
|
+
* Env variables that once set the node's certificate. Ignored since D726:
|
|
74
|
+
* the admin UI (Network → Local access) is the one way to set it. Still
|
|
75
|
+
* named here so a node that has them set is told, not silently re-keyed.
|
|
76
|
+
*/
|
|
77
|
+
const IGNORED_TLS_CERT_ENV = ['CAMSTACK_TLS_CERT', 'CAMSTACK_TLS_KEY'];
|
|
78
|
+
/** The `config.yaml` keys those variables were mapped onto — ignored too. */
|
|
79
|
+
const IGNORED_TLS_CERT_KEYS = ['certPath', 'keyPath'];
|
|
73
80
|
// ---------------------------------------------------------------------------
|
|
74
81
|
// Helpers
|
|
75
82
|
// ---------------------------------------------------------------------------
|
|
@@ -82,6 +89,20 @@ function setNested(obj, p, value) {
|
|
|
82
89
|
const child = (0, types_1.asJsonObject)(obj[head]) ?? {};
|
|
83
90
|
return { ...obj, [head]: setNested(child, rest.join('.'), value) };
|
|
84
91
|
}
|
|
92
|
+
/**
|
|
93
|
+
* Every env variable and `config.yaml` key that would once have set the
|
|
94
|
+
* certificate and is now ignored (D726). Blank env values count as unset,
|
|
95
|
+
* exactly as the override loop treats them.
|
|
96
|
+
*/
|
|
97
|
+
function ignoredTlsCertSources(env, raw) {
|
|
98
|
+
const fromEnv = IGNORED_TLS_CERT_ENV.filter((name) => {
|
|
99
|
+
const value = env[name];
|
|
100
|
+
return value !== undefined && value !== '';
|
|
101
|
+
});
|
|
102
|
+
const tls = (0, types_1.asJsonObject)(raw['tls']) ?? {};
|
|
103
|
+
const fromYaml = IGNORED_TLS_CERT_KEYS.filter((key) => tls[key] !== undefined).map((key) => `tls.${key}`);
|
|
104
|
+
return [...fromEnv, ...fromYaml];
|
|
105
|
+
}
|
|
85
106
|
// ---------------------------------------------------------------------------
|
|
86
107
|
// loadBootstrapConfig
|
|
87
108
|
// ---------------------------------------------------------------------------
|
|
@@ -145,6 +166,11 @@ function loadBootstrapConfig(configPath) {
|
|
|
145
166
|
raw = setNested(raw, configPath_, coerced);
|
|
146
167
|
console.log(`[Phase1] Env override: ${envKey} → ${configPath_}`);
|
|
147
168
|
}
|
|
169
|
+
const ignored = ignoredTlsCertSources(process.env, raw);
|
|
170
|
+
if (ignored.length > 0) {
|
|
171
|
+
console.warn(`[Phase1] WARN ${ignored.join(', ')} ignored — the certificate is set only in the admin UI. ` +
|
|
172
|
+
'Upload the certificate in Network → Local access (D726).');
|
|
173
|
+
}
|
|
148
174
|
return config_schema_1.bootstrapSchema.parse(raw);
|
|
149
175
|
}
|
|
150
176
|
// ---------------------------------------------------------------------------
|
|
@@ -210,22 +236,21 @@ async function setupInfra(configPath, bootstrapConfig) {
|
|
|
210
236
|
// broken chunks with require("fs") when leaked .js files exist in core/src/.
|
|
211
237
|
// CJS build works correctly and tsx supports require().
|
|
212
238
|
const core = require('@camstack/system');
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
239
|
+
// The certificate comes only from the admin UI (D726): the generated
|
|
240
|
+
// local CA → leaf (D227), or an operator upload served verbatim.
|
|
241
|
+
const extraSans = [...core.readExtraSans(dataPath)];
|
|
242
|
+
const boot = await core.prepareBootTls(dataPath, extraSans.length > 0 ? { extraSans } : undefined);
|
|
243
|
+
if (boot.uploadedMissing) {
|
|
244
|
+
console.warn(`[Phase2c] WARN the uploaded TLS certificate is missing from ${path.join(dataPath, 'tls')} — serving the generated one. Upload it again in Network → Local access.`);
|
|
245
|
+
}
|
|
246
|
+
if (boot.ensured !== undefined) {
|
|
247
|
+
tlsCert = boot.ensured;
|
|
248
|
+
logTlsCert(boot.ensured);
|
|
219
249
|
}
|
|
220
250
|
else {
|
|
221
|
-
|
|
222
|
-
const extraSans = [...(core.readExtraSans?.(dataPath) ?? [])];
|
|
223
|
-
const tlsResult = await ensureTlsCert(dataPath, extraSans.length > 0 ? { extraSans } : undefined);
|
|
224
|
-
tlsCert = tlsResult;
|
|
225
|
-
logTlsCert(tlsResult);
|
|
226
|
-
const pair = loadTlsCert(tlsResult.certPath, tlsResult.keyPath);
|
|
227
|
-
tlsOptions = { key: pair.key, cert: pair.cert };
|
|
251
|
+
console.log(`[Phase2c] Serving the uploaded TLS certificate from ${path.join(dataPath, 'tls')}`);
|
|
228
252
|
}
|
|
253
|
+
tlsOptions = { key: boot.pair.key, cert: boot.pair.cert };
|
|
229
254
|
}
|
|
230
255
|
return {
|
|
231
256
|
bootstrapConfig: config,
|
package/dist/main.js
CHANGED
|
@@ -40,6 +40,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
40
40
|
const node_child_process_1 = require("node:child_process");
|
|
41
41
|
const fs = __importStar(require("node:fs"));
|
|
42
42
|
const path = __importStar(require("node:path"));
|
|
43
|
+
const node_tls_1 = require("node:tls");
|
|
43
44
|
// Boot-time capability declaration runs over the auto-generated
|
|
44
45
|
// `ALL_CAPABILITY_DEFINITIONS` array — every `*.cap.ts` file that ships
|
|
45
46
|
// with `@camstack/types` is included automatically. Adding a new cap
|
|
@@ -1489,6 +1490,17 @@ async function bootstrap() {
|
|
|
1489
1490
|
const logger = app.get(logging_service_1.LoggingService).createLogger('System');
|
|
1490
1491
|
const protocol = tlsOptions ? 'https' : 'http';
|
|
1491
1492
|
logger.info('CamStack server listening', { meta: { protocol, host, port, trpcRegistered } });
|
|
1493
|
+
// Certificate actions (Network → Local access) swap the served certificate
|
|
1494
|
+
// in place through this registration — without it an upload sat on disk
|
|
1495
|
+
// while the listener kept serving the boot-time leaf (D726).
|
|
1496
|
+
if (tlsOptions) {
|
|
1497
|
+
if (fastify.server instanceof node_tls_1.Server) {
|
|
1498
|
+
(0, system_1.registerHttpsListener)(fastify.server, tlsOptions);
|
|
1499
|
+
}
|
|
1500
|
+
else {
|
|
1501
|
+
logger.warn('HTTPS listener is not a TLS server — certificate changes need a restart');
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1492
1504
|
// LAN HTTP sibling — same Fastify request graph, dedicated port. Handler
|
|
1493
1505
|
// is registered as soon as we have the instance; bind happens after HTTPS
|
|
1494
1506
|
// is up so a failed HTTPS listen does not leave HTTP serving alone.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.460",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"private": false,
|
|
6
6
|
"files": [
|
|
@@ -37,18 +37,18 @@
|
|
|
37
37
|
]
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@camstack/addon-admin-ui": "1.2.
|
|
41
|
-
"@camstack/addon-agent-ui": "1.2.
|
|
40
|
+
"@camstack/addon-admin-ui": "1.2.334",
|
|
41
|
+
"@camstack/addon-agent-ui": "1.2.176",
|
|
42
42
|
"@camstack/addon-auth": "1.2.127",
|
|
43
43
|
"@camstack/addon-decoder-nodeav": "1.2.119",
|
|
44
44
|
"@camstack/addon-notifiers": "1.2.128",
|
|
45
|
-
"@camstack/addon-pipeline": "1.2.
|
|
46
|
-
"@camstack/addon-pipeline-orchestrator": "1.2.
|
|
47
|
-
"@camstack/addon-post-analysis": "1.2.
|
|
45
|
+
"@camstack/addon-pipeline": "1.2.329",
|
|
46
|
+
"@camstack/addon-pipeline-orchestrator": "1.2.284",
|
|
47
|
+
"@camstack/addon-post-analysis": "1.2.336",
|
|
48
48
|
"@camstack/sdk": "1.2.122",
|
|
49
|
-
"@camstack/system": "1.2.
|
|
50
|
-
"@camstack/types": "1.2.
|
|
51
|
-
"@camstack/ui-library": "1.2.
|
|
49
|
+
"@camstack/system": "1.2.357",
|
|
50
|
+
"@camstack/types": "1.2.308",
|
|
51
|
+
"@camstack/ui-library": "1.2.234",
|
|
52
52
|
"@fastify/compress": "^9.0.0",
|
|
53
53
|
"@fastify/cookie": "^11.0.2",
|
|
54
54
|
"@fastify/cors": "^11.2.0",
|