@trillboards/edge-sdk 0.2.4 → 0.2.6
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 +4 -3
- package/deploy/docker/Dockerfile.cloud-sense +117 -0
- package/deploy/docker/Dockerfile.cpu +30 -21
- package/deploy/docker/Dockerfile.cuda +30 -21
- package/deploy/docker/Dockerfile.openvino +30 -20
- package/deploy/docker/README.md +9 -4
- package/deploy/docker/connector-entrypoint.sh +122 -0
- package/deploy/helm/README.md +1 -1
- package/deploy/k8s/daemonset.yaml +1 -1
- package/deploy/macos/README.md +161 -0
- package/deploy/macos/TrillboardsSetupApp.m +603 -0
- package/deploy/macos/build-macos-pkg.sh +588 -0
- package/deploy/macos/com.trillboards.edge.plist +62 -0
- package/deploy/macos/com.trillboards.litertlm.plist +45 -0
- package/deploy/macos/pair.command +519 -0
- package/deploy/macos/scripts/ensure-litertlm.sh +62 -0
- package/deploy/macos/scripts/postinstall +153 -0
- package/deploy/macos/scripts/setup-litertlm.sh +272 -0
- package/deploy/macos/test-install-pair.sh +383 -0
- package/deploy/macos/test-setup-litertlm-reinstall.sh +109 -0
- package/deploy/systemd/install.sh +25 -15
- package/deploy/systemd/trillboards-edge.service +4 -1
- package/deploy/windows/README.md +70 -0
- package/deploy/windows/build-windows.ps1 +225 -0
- package/deploy/windows/bundle-windows-installer.ps1 +153 -0
- package/deploy/windows/check-feeds.js +26 -0
- package/deploy/windows/e2e/fixtures/person.jpg +0 -0
- package/deploy/windows/e2e/test-local-sense.ps1 +185 -0
- package/deploy/windows/install-update.ps1 +101 -0
- package/deploy/windows/installer.nsi +138 -0
- package/deploy/windows/register-litertlm-task.ps1 +42 -0
- package/deploy/windows/register-task.ps1 +44 -0
- package/deploy/windows/run-connector.ps1 +69 -0
- package/deploy/windows/setup-litertlm.ps1 +361 -0
- package/deploy/windows/stop-existing.ps1 +72 -0
- package/deploy/windows/trillboards-edge-task.vbs +25 -0
- package/deploy/windows/trillboards-edge.cmd +33 -0
- package/deploy/windows/trillboards-pair.cmd +276 -0
- package/deploy/windows/trillboards-setup.ps1 +456 -0
- package/deploy/windows/trillboards-setup.vbs +13 -0
- package/dist/AudienceAnalyzeClient.d.ts +136 -0
- package/dist/AudienceAnalyzeClient.d.ts.map +1 -0
- package/dist/AudienceAnalyzeClient.js +246 -0
- package/dist/AudienceAnalyzeClient.js.map +1 -0
- package/dist/ChannelProber.d.ts +150 -0
- package/dist/ChannelProber.d.ts.map +1 -0
- package/dist/ChannelProber.js +887 -0
- package/dist/ChannelProber.js.map +1 -0
- package/dist/CloudEscalationPolicy.d.ts +143 -0
- package/dist/CloudEscalationPolicy.d.ts.map +1 -0
- package/dist/CloudEscalationPolicy.js +137 -0
- package/dist/CloudEscalationPolicy.js.map +1 -0
- package/dist/CloudSensingManager.d.ts +533 -0
- package/dist/CloudSensingManager.d.ts.map +1 -0
- package/dist/CloudSensingManager.js +1254 -0
- package/dist/CloudSensingManager.js.map +1 -0
- package/dist/DiscoveryReportClient.d.ts +66 -0
- package/dist/DiscoveryReportClient.d.ts.map +1 -0
- package/dist/DiscoveryReportClient.js +85 -0
- package/dist/DiscoveryReportClient.js.map +1 -0
- package/dist/EdgeAgent.d.ts +12 -2
- package/dist/EdgeAgent.d.ts.map +1 -1
- package/dist/EdgeAgent.js +55 -13
- package/dist/EdgeAgent.js.map +1 -1
- package/dist/LiteRtVlmProvider.d.ts +193 -0
- package/dist/LiteRtVlmProvider.d.ts.map +1 -0
- package/dist/LiteRtVlmProvider.js +436 -0
- package/dist/LiteRtVlmProvider.js.map +1 -0
- package/dist/MosaicSource.d.ts +108 -0
- package/dist/MosaicSource.d.ts.map +1 -0
- package/dist/MosaicSource.js +274 -0
- package/dist/MosaicSource.js.map +1 -0
- package/dist/OnvifClient.d.ts +83 -0
- package/dist/OnvifClient.d.ts.map +1 -0
- package/dist/OnvifClient.js +209 -0
- package/dist/OnvifClient.js.map +1 -0
- package/dist/PairClient.d.ts +106 -0
- package/dist/PairClient.d.ts.map +1 -0
- package/dist/PairClient.js +186 -0
- package/dist/PairClient.js.map +1 -0
- package/dist/RecorderAddressRecovery.d.ts +53 -0
- package/dist/RecorderAddressRecovery.d.ts.map +1 -0
- package/dist/RecorderAddressRecovery.js +359 -0
- package/dist/RecorderAddressRecovery.js.map +1 -0
- package/dist/SceneChangeDetector.d.ts +291 -0
- package/dist/SceneChangeDetector.d.ts.map +1 -0
- package/dist/SceneChangeDetector.js +682 -0
- package/dist/SceneChangeDetector.js.map +1 -0
- package/dist/SensingProfileClient.d.ts +59 -0
- package/dist/SensingProfileClient.d.ts.map +1 -0
- package/dist/SensingProfileClient.js +78 -0
- package/dist/SensingProfileClient.js.map +1 -0
- package/dist/SetupSessionClient.d.ts +114 -0
- package/dist/SetupSessionClient.d.ts.map +1 -0
- package/dist/SetupSessionClient.js +95 -0
- package/dist/SetupSessionClient.js.map +1 -0
- package/dist/VlmAdmissionGate.d.ts +126 -0
- package/dist/VlmAdmissionGate.d.ts.map +1 -0
- package/dist/VlmAdmissionGate.js +166 -0
- package/dist/VlmAdmissionGate.js.map +1 -0
- package/dist/autoSense.d.ts +216 -0
- package/dist/autoSense.d.ts.map +1 -0
- package/dist/autoSense.js +521 -0
- package/dist/autoSense.js.map +1 -0
- package/dist/cli.d.ts +27 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +511 -21
- package/dist/cli.js.map +1 -1
- package/dist/combinedSense.d.ts +128 -0
- package/dist/combinedSense.d.ts.map +1 -0
- package/dist/combinedSense.js +261 -0
- package/dist/combinedSense.js.map +1 -0
- package/dist/config.d.ts +351 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +99 -2
- package/dist/config.js.map +1 -1
- package/dist/connectorCadence.d.ts +135 -0
- package/dist/connectorCadence.d.ts.map +1 -0
- package/dist/connectorCadence.js +151 -0
- package/dist/connectorCadence.js.map +1 -0
- package/dist/dataDir.d.ts +33 -0
- package/dist/dataDir.d.ts.map +1 -0
- package/dist/dataDir.js +76 -0
- package/dist/dataDir.js.map +1 -0
- package/dist/deployedCadence.d.ts +167 -0
- package/dist/deployedCadence.d.ts.map +1 -0
- package/dist/deployedCadence.js +209 -0
- package/dist/deployedCadence.js.map +1 -0
- package/dist/deployedCadenceSource.d.ts +48 -0
- package/dist/deployedCadenceSource.d.ts.map +1 -0
- package/dist/deployedCadenceSource.js +74 -0
- package/dist/deployedCadenceSource.js.map +1 -0
- package/dist/diagnose.d.ts +1 -1
- package/dist/diagnose.d.ts.map +1 -1
- package/dist/diagnose.js +13 -12
- package/dist/diagnose.js.map +1 -1
- package/dist/discovery.d.ts +131 -0
- package/dist/discovery.d.ts.map +1 -0
- package/dist/discovery.js +499 -0
- package/dist/discovery.js.map +1 -0
- package/dist/gemmaModelOta.d.ts +118 -0
- package/dist/gemmaModelOta.d.ts.map +1 -0
- package/dist/gemmaModelOta.js +291 -0
- package/dist/gemmaModelOta.js.map +1 -0
- package/dist/index.d.ts +16 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +40 -1
- package/dist/index.js.map +1 -1
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +41 -18
- package/dist/init.js.map +1 -1
- package/dist/keepAwake.d.ts +33 -0
- package/dist/keepAwake.d.ts.map +1 -0
- package/dist/keepAwake.js +54 -0
- package/dist/keepAwake.js.map +1 -0
- package/dist/legacyRecorderProfile.d.ts +20 -0
- package/dist/legacyRecorderProfile.d.ts.map +1 -0
- package/dist/legacyRecorderProfile.js +27 -0
- package/dist/legacyRecorderProfile.js.map +1 -0
- package/dist/localInferenceSchema.d.ts +132 -0
- package/dist/localInferenceSchema.d.ts.map +1 -0
- package/dist/localInferenceSchema.js +274 -0
- package/dist/localInferenceSchema.js.map +1 -0
- package/dist/localSenseE2eHarness.d.ts +101 -0
- package/dist/localSenseE2eHarness.d.ts.map +1 -0
- package/dist/localSenseE2eHarness.js +279 -0
- package/dist/localSenseE2eHarness.js.map +1 -0
- package/dist/localSensing.d.ts +268 -0
- package/dist/localSensing.d.ts.map +1 -0
- package/dist/localSensing.js +492 -0
- package/dist/localSensing.js.map +1 -0
- package/dist/modelIntegrity.d.ts +59 -0
- package/dist/modelIntegrity.d.ts.map +1 -0
- package/dist/modelIntegrity.js +165 -0
- package/dist/modelIntegrity.js.map +1 -0
- package/dist/pairVerify.d.ts +100 -0
- package/dist/pairVerify.d.ts.map +1 -0
- package/dist/pairVerify.js +296 -0
- package/dist/pairVerify.js.map +1 -0
- package/dist/qrScanner.d.ts +33 -0
- package/dist/qrScanner.d.ts.map +1 -0
- package/dist/qrScanner.js +103 -0
- package/dist/qrScanner.js.map +1 -0
- package/dist/runtimePaths.d.ts +10 -0
- package/dist/runtimePaths.d.ts.map +1 -0
- package/dist/runtimePaths.js +79 -0
- package/dist/runtimePaths.js.map +1 -0
- package/dist/sensingRunMode.d.ts +68 -0
- package/dist/sensingRunMode.d.ts.map +1 -0
- package/dist/sensingRunMode.js +346 -0
- package/dist/sensingRunMode.js.map +1 -0
- package/dist/setupMode.d.ts +98 -0
- package/dist/setupMode.d.ts.map +1 -0
- package/dist/setupMode.js +828 -0
- package/dist/setupMode.js.map +1 -0
- package/dist/setupProgress.d.ts +31 -0
- package/dist/setupProgress.d.ts.map +1 -0
- package/dist/setupProgress.js +173 -0
- package/dist/setupProgress.js.map +1 -0
- package/package.json +13 -4
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# Trillboards Edge — macOS CCTV Connector (.pkg)
|
|
2
|
+
|
|
3
|
+
A self-contained macOS installer for the Trillboards CCTV connector. The
|
|
4
|
+
customer `.pkg` bundles Node, ffmpeg, the connector, and the pinned ~2.4 GB local
|
|
5
|
+
VLM. It installs and verifies local AI before camera pairing opens. The connector
|
|
6
|
+
never silently sends continuous camera load to cloud inference. No Node, ffmpeg,
|
|
7
|
+
Docker, or terminal is required on the operator's Mac.
|
|
8
|
+
|
|
9
|
+
What lands on disk (home-domain, **no sudo / no admin password**):
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
~/Library/Trillboards/edge/
|
|
13
|
+
bin/node pinned official Node v22 runtime (arm64/x64)
|
|
14
|
+
bin/ffmpeg bundled ffmpeg (from ffmpeg-static)
|
|
15
|
+
bin/trillboards-edge launcher (puts bin/ first on PATH, execs cli.js)
|
|
16
|
+
bin/trillboards-pair first-run pairing helper (GUI + headless)
|
|
17
|
+
lib/edge-sdk/dist/cli.js the connector CLI
|
|
18
|
+
lib/node_modules/… runtime deps (edge-core + edge-platform-rtsp +
|
|
19
|
+
edge-sdk), WITHOUT the heavy local-inference stack
|
|
20
|
+
share/com.trillboards.edge.plist LaunchAgent template
|
|
21
|
+
share/ensure-litertlm.sh background local-AI retry supervisor
|
|
22
|
+
share/models/gemma-4-E2B-it.litertlm required customer local VLM (removed after import)
|
|
23
|
+
~/Applications/Trillboards CCTV Setup.app native customer setup window (opened automatically)
|
|
24
|
+
~/Library/Application Support/Trillboards/trillboards.config.json (after pair, 0600)
|
|
25
|
+
~/Library/Logs/Trillboards/edge.{out,err}.log
|
|
26
|
+
~/Library/LaunchAgents/com.trillboards.edge.plist (after pair)
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The connector runs as a per-user **LaunchAgent** (`RunAtLoad` + `KeepAlive`),
|
|
30
|
+
bootstrapped automatically on first successful pair. The device token is
|
|
31
|
+
delivered **only by pairing** — it is never baked into the `.pkg`.
|
|
32
|
+
|
|
33
|
+
> The customer build includes Gemma and completes its local health check before
|
|
34
|
+
> pairing. Cloud inference requires explicit configuration. `--skip-model` is
|
|
35
|
+
> available only for engineering checks and must not be published.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Install (operator)
|
|
40
|
+
|
|
41
|
+
1. Download `TrillboardsEdge-<version>-arm64.pkg`.
|
|
42
|
+
2. Double-click it. The installer offers **Install for me only** (home-domain) —
|
|
43
|
+
no admin password. (Equivalent CLI: `installer -pkg <pkg> -target
|
|
44
|
+
CurrentUserHomeDirectory`.)
|
|
45
|
+
3. The installer installs and verifies the connector and included local AI
|
|
46
|
+
model. Only then does **Trillboards CCTV Setup** open automatically. Select
|
|
47
|
+
**Start setup**. The app opens the signed-in Trillboards camera wizard,
|
|
48
|
+
finds recorders on the local network, and validates each channel before any
|
|
49
|
+
camera screens are created. Black, disconnected, and unreadable inputs are
|
|
50
|
+
ignored. After the working cameras are saved, the already-installed local AI
|
|
51
|
+
begins sensing and the connector starts at every login. Reopen **Trillboards
|
|
52
|
+
CCTV Setup** from
|
|
53
|
+
`~/Applications` to resume or repair setup.
|
|
54
|
+
|
|
55
|
+
That's it. To check it's sensing: `tail -f ~/Library/Logs/Trillboards/edge.out.log`.
|
|
56
|
+
|
|
57
|
+
### Adding RTSP credentials locally (optional, creds-stay-on-prem mode)
|
|
58
|
+
|
|
59
|
+
If the portal delivered camera feeds **without** an `rtspUrl` (so credentials
|
|
60
|
+
never leave the venue), edit
|
|
61
|
+
`~/Library/Application Support/Trillboards/trillboards.config.json` and add the
|
|
62
|
+
`rtspUrl` to each camera, then restart the agent:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
launchctl kickstart -k "gui/$(id -u)/com.trillboards.edge"
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Build (engineering)
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
cd trillboards-edge-sdk
|
|
74
|
+
npm install # ensures ffmpeg-static is fetched
|
|
75
|
+
cd packages/edge-sdk/deploy/macos
|
|
76
|
+
./build-macos-pkg.sh # → dist-installer/TrillboardsEdge-<ver>-arm64.pkg
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Options:
|
|
80
|
+
|
|
81
|
+
| flag | default | meaning |
|
|
82
|
+
|------|---------|---------|
|
|
83
|
+
| `--arch arm64\|x64` | host arch | target architecture |
|
|
84
|
+
| `--node-version vX.Y.Z` | `v22.22.0` | pinned Node runtime to bundle |
|
|
85
|
+
| `--bundle-model` | on | include the pinned ~2.4 GB Gemma model required by customer setup |
|
|
86
|
+
| `--skip-model` | off | build a slim engineering artifact that must not be published to customers |
|
|
87
|
+
| `--offline` | off | skip the official Node download; copy the host `node` |
|
|
88
|
+
| `--sign-installer "Developer ID Installer: …"` | unset | `productsign` the pkg |
|
|
89
|
+
|
|
90
|
+
The build is idempotent (it wipes its staging tree each run) and **smoke-tests
|
|
91
|
+
the staged bundle** (`trillboards-edge version`) before packaging.
|
|
92
|
+
|
|
93
|
+
### Local end-to-end test
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
bash packages/edge-sdk/deploy/macos/test-install-pair.sh
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
No sudo. It builds the pkg, installs it home-domain, starts a local stub
|
|
100
|
+
pair+analyze server, pairs headlessly, runs `cloud-sense` against a **synthetic
|
|
101
|
+
ffmpeg source** (a generated clip via `file:` — no RTSP server needed), asserts a
|
|
102
|
+
**real JPEG frame** is produced by the bundled ffmpeg and POSTed with the paired
|
|
103
|
+
`X-Device-Token`, verifies the LaunchAgent bootstraps and senses autonomously,
|
|
104
|
+
then tears everything down. TAP output; non-zero exit on any failure.
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Signing & notarization (distribution follow-on)
|
|
109
|
+
|
|
110
|
+
The local build is **unsigned** because this repo's signing keychain has only
|
|
111
|
+
`Apple Development` / `Apple Distribution` identities — there is **no
|
|
112
|
+
`Developer ID Installer`** cert (the one Gatekeeper requires for a `.pkg`
|
|
113
|
+
distributed outside the App Store).
|
|
114
|
+
|
|
115
|
+
To ship a Gatekeeper-clean installer, on a machine that has the
|
|
116
|
+
`Developer ID Installer` cert:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
# 1. Sign the installer
|
|
120
|
+
./build-macos-pkg.sh --sign-installer "Developer ID Installer: Aethercorp Inc (78JQ7882U9)"
|
|
121
|
+
# (or: export MAC_INSTALLER_IDENTITY="Developer ID Installer: …" && ./build-macos-pkg.sh)
|
|
122
|
+
|
|
123
|
+
# 2. Notarize + staple
|
|
124
|
+
xcrun notarytool submit dist-installer/TrillboardsEdge-<ver>-arm64.pkg \
|
|
125
|
+
--keychain-profile <notary-profile> --wait
|
|
126
|
+
xcrun stapler staple dist-installer/TrillboardsEdge-<ver>-arm64.pkg
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
The bundled `bin/node` and `bin/ffmpeg` are third-party Mach-O binaries; for full
|
|
130
|
+
notarization they should additionally be **codesigned with a Developer ID
|
|
131
|
+
Application cert + hardened runtime** before the pkg is built (notarytool checks
|
|
132
|
+
nested executables). That cert is likewise not present here, so it's part of the
|
|
133
|
+
same distribution follow-on. Until then, the unsigned pkg installs fine via the
|
|
134
|
+
`installer` CLI and for internal/manual installs.
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Other platforms (same pair-then-local-first flow)
|
|
139
|
+
|
|
140
|
+
macOS is the must-have one-click installer. The connector itself is
|
|
141
|
+
cross-platform; the other OS installers live alongside this one and follow the
|
|
142
|
+
**identical** flow — `pair` writes the config, then `auto-sense` waits for and
|
|
143
|
+
runs the local model:
|
|
144
|
+
|
|
145
|
+
- **Linux (systemd):** [`../systemd/`](../systemd/) — `install.sh` lays down the
|
|
146
|
+
SDK + a `trillboards-edge` systemd unit. Pair first, then point the unit at
|
|
147
|
+
`auto-sense`:
|
|
148
|
+
```bash
|
|
149
|
+
trillboards-edge pair --code XXXX-XXXX --config /etc/trillboards/config.json
|
|
150
|
+
# edit the unit's ExecStart to: trillboards-edge auto-sense --config /etc/trillboards/config.json
|
|
151
|
+
sudo systemctl restart trillboards-edge
|
|
152
|
+
```
|
|
153
|
+
ffmpeg is required on the host (the systemd install handles it via apt).
|
|
154
|
+
- **Windows (Service):** [`../windows/install-service.ps1`](../windows/install-service.ps1)
|
|
155
|
+
— installs the SDK as a Windows service. Same flow: `trillboards-edge pair
|
|
156
|
+
--code XXXX-XXXX --config <path>` then run `auto-sense --config <path>`.
|
|
157
|
+
- **Docker:** [`../docker/`](../docker/) — for headless/server NVR gateways.
|
|
158
|
+
|
|
159
|
+
The pairing endpoint (`POST /v2/earner/cameras/pair`), the config shape, and the
|
|
160
|
+
local-first sensing runtime are shared across all platforms — only the
|
|
161
|
+
service-supervisor wrapper differs.
|