Commit Graph
104 Commits
Author SHA1 Message Date
chick 2977f75129 fix: apply security and correctness review findings across both stacks
Legacy panel:
- upstream body reads now carry their own deadline and a 10 MB byte budget;
  a stalled modem can no longer hang /api/status fan-out forever nor OOM
  the proxy (request headers alone had the timeout, bodies had none)
- add X-Frame-Options DENY / CSP frame-ancestors none / nosniff; the panel
  (delete-instance and confirmed-write dialogs) is no longer clickjackable
- only send a JSON content-type when the API console request has a body, so
  payload-less dangerous writes stop failing with 400 and burning the
  one-use confirmation token
- register a form-urlencoded parser (the proxy branch was unreachable) and
  drop the multipart parser that buffered up to 60 MB before rejecting;
  bodyLimit drops to 2 MB; framework-level 415 keeps the stable error body
- remove /api/sms/send from readable paths: GET bypassed the write
  confirmation for a send endpoint
- /api/instances/:id/login maps upstream failures to a stable 502 instead
  of leaking raw error text
- guard MULTI_SIMADMIN_TIMEOUT_MS parsing (NaN aborted every request);
  prune dead code (buildClients, cookie expando no-op)

Control plane:
- deleting a notification channel detaches it from rules instead of leaving
  dangling ids that made every referencing rule unreadable and silently
  dropped future notifications; rule reads tolerate unknown ids
- startup sweep resets notification_queue rows stranded in 'sending' by a
  crash (mirrors the sms outbox sweep); terminal outbox rows are pruned on
  the retention timer
- /api/v1/metrics no longer emits operator-assigned node names on the
  session-free scrape; login limiter map is bounded and pruned; Secure
  cookie honors the gateway-declared x-forwarded-proto
- webhook delivery sets redirect: manual (signed payloads are not replayed)
- SMTP envelope sender is validated against CR/LF smuggling
- scheduled reboots with delaySeconds != 3 fail fast at the dispatcher with
  a clear reason instead of burning every retry; contract narrowed to the
  pinned baseline
2026-09-07 01:57:47 +08:00
chick 236e78327c feat(console-update): systemd restart launcher for Linux supervision
Linux deployments under a systemd unit can now use the online update
panel: MULTI_SIMADMIN_SYSTEMD_UNIT (+ optional _SCOPE=user|system) hands
the restart to systemctl; createPlatformRestartLauncher picks launchd on
macOS and systemd on Linux, degrading to 'unsupported' otherwise.
2026-09-07 01:38:23 +08:00
chick 3c5971e167 feat(installer): support Linux hosts with XDG data root and ss port probe
- platform gate accepts Darwin and Linux; other platforms are refused
- default install root follows each platform's convention
  (~/Library/Application Support vs ~/.local/share)
- LAN IP discovery uses ip -4/hostname -I on Linux, ipconfig on macOS
- port occupancy checks fall back from lsof to ss
- API process gets MULTI_SIMADMIN_SECRET_BACKEND pinned per platform
- README documents the per-platform secret storage
2026-09-07 01:36:04 +08:00
chick e4c4bce75b feat(secrets): add a 0600 file secret backend so production runs on Linux
The production composition hardwired the macOS Keychain (/usr/bin/security),
which made Linux deployment impossible. Now:

- SecretStore gains a stable provider identity persisted in
  secret_references.provider; services stop hardcoding 'macos-keychain'
- shared reference codec (secret-reference.ts) understands both
  keychain:// and secret-file:// references
- FileSecretStore: single 0600 JSON map under the data root, atomic
  temp+rename writes, serialized in-process, same validation envelope
- production composition picks the backend via
  MULTI_SIMADMIN_SECRET_BACKEND (default: Keychain on darwin, file store
  elsewhere) and readiness probes the matching backend
2026-09-07 01:32:07 +08:00
chick c57dc81e42 fix: finish cross-platform test parity while keeping POSIX deployment semantics
- cutover readState: enforce 0600 mode bits only on POSIX (Windows ACLs
  govern access; chmod is a no-op there)
- backup activation: skip the read-only-handle fsync on win32; the staged
  rename-over-open-WAL tests keep running on the POSIX deployment targets
- test-fixtures: normalize fixture paths to POSIX separators before
  comparing with manifest entries
2026-09-07 01:18:44 +08:00
chick 96dd9e2ba6 chore: pin LF line endings via .gitattributes
Windows checkouts previously materialized CRLF, breaking every pinned
sha256 snapshot check in operation-registry and test-fixtures.
2026-09-07 01:10:19 +08:00
chick 4f42a6f835 fix: make cutover restart argv upgrade-safe and tests platform-honest
- cutover-orchestrator: restart via 'node --import tsx' (matching install.sh)
  instead of a hardcoded .pnpm/tsx@4.22.4 loader path that breaks on tsx bumps
- production-gateway: use process.execPath for the legacy-start fixture;
  POSIX-only 0600 mode assertion now win32-guarded
- cli-runtime + installer suites: skip where they require POSIX-only
  process-group SIGTERM, lsof, or /bin/sh
- fixture-safety: fall back to config.example.json when config.json is absent
  on a fresh clone
2026-09-07 01:09:49 +08:00
chick eed134a25c fix: honor underscore-unused convention and make durability fsyncs cross-platform
- eslint: respect the repo's existing _-prefix convention for unused vars
- phase-one-blockers: derive projectRoot via import.meta.dirname so Windows
  checkouts stop producing C:\C:\... paths
- backup/release-evidence/cutover-orchestrator: skip POSIX-only directory
  fsync on win32 and fsync read-only handles through a writable handle
2026-09-07 01:07:16 +08:00
chick f6319374cd feat(web): add console update panel, system maintenance path and connection settings UI
- Add online update workflow with plan, backup and install states.

- Expose maintenance paths, component backup jobs and connection authorization modes.

- Align auth and automation screens with the fused control plane.
2026-09-07 00:45:44 +08:00
chick 6d251dab7b feat(web): fuse Hub device modules into instance panels with SMS aggregation
- Consolidate cellular, eSIM, network and device module interactions.

- Add aggregate SMS workflows and identity-aware action controls.

- Extend SMSC privacy handling and module action icons.
2026-09-07 00:45:38 +08:00
chick 864e1bd90c feat(web): rebuild fleet page with Hub-style identity guard and context actions
- Surface device identity state, carrier details and upstream link health.

- Add fleet-level identity monitoring and restart/baseband context actions.

- Apply consistent notification scoping across fleet views.
2026-09-07 00:45:28 +08:00
chick 635527dd26 feat(api): integrate identity, notification scope and connection settings into control plane
- Wire identity, metrics and update services into the assembled API.

- Add connection authorization modes and scoped console authorization.

- Preserve notification group IDs for filtered delivery.

- Extend maintenance, backup, resource and module flows with runtime metadata and upstream safety.
2026-09-07 00:45:18 +08:00
chick 7168e9dba2 feat(api): add online console update with pre-install backup
- Add console update planning, download validation and staged installation.

- Create a component backup before applying online updates.

- Expose controlled update routes from the production control plane.
2026-09-07 00:44:58 +08:00
chick 961eb928c4 feat(api): add device identity guard and Prometheus metrics
- Persist device identity observations and expose fleet identity summaries.

- Block device control actions when identity verification fails.

- Add metrics collection and a Prometheus scrape endpoint.
2026-09-07 00:44:51 +08:00
chick 8406f14469 feat(contracts,automation): add multi-group scopes, SMS macros and operator registry
- Allow scheduled operations to resolve multiple device groups.

- Add reusable SMS time and random-value macros.

- Add China operator PLMN metadata shared by API and UI.
2026-09-07 00:44:33 +08:00
chick 8b7df8cb65 fix(instances): release the hub binding before forgetting a node
Deletion now follows the published contract: prepare returns the one-time
token and the console spends it on DELETE /api/v1/instances/:id with
If-Match, where the generic execute endpoint had been rejecting it as an
operation the safe transport cannot replay.

An online device is told to release its own binding first. A refusal keeps
the record and reports UNBIND_FAILED on the job item so the console can say
why the node is still there; a node that never answers a heartbeat is
forgotten locally.
2026-09-05 19:52:27 +08:00
chick 5016586922 test: give process-spawning suites room and pin the fused behaviour
The runtime executables bind fixed ports, so the production command check now
skips instead of failing against a live deployment, and the canary check takes
a reserved free port. Raise the default test timeout for the SQLite and browser
suites that were only slow under full-suite parallelism.
2026-09-05 18:53:05 +08:00
chick a75badeb58 feat(web): rebuild the console around the fused control plane
Render the Hub feature set in the existing Animal Island styling: fleet
messages, notification centre, log centre, organisation panel, per-instance
device module panels and the settings backup, connection and maintenance
surfaces.
2026-09-05 18:53:04 +08:00
chick f9186bd851 feat(api): absorb the Hub control plane into the local instance model
Add central notification channels, rules, queue and delivery logs, fleet
organization groups and tags, device discovery, the device action catalog,
instance module reads, the log centre, connection settings and system
maintenance as native /api/v1 routes backed by the existing secret store,
audit trail and pinned upstream transport.
2026-09-05 18:53:04 +08:00
chick f11877f13e feat(contracts): share notification, organization and device capability models
Move the Hub channel table, organization tags and device capability definitions
into the workspace packages so the control plane and the console validate the
same contract, and refresh the frozen upstream evidence for the new paths.
2026-09-05 18:52:54 +08:00
chick 03fa2e6c7b chore: keep local runtime data out of version control 2026-09-05 18:52:53 +08:00
Codex 9bc0f27f12 fix: canonicalize browser navigation after commit 2026-07-30 22:35:37 +08:00
Codex 95abd09c39 style: format navigation tests 2026-07-30 22:21:29 +08:00
Codex 4fbc902325 test: cover persistent browser navigation 2026-07-30 22:13:05 +08:00
Codex 25502a52bb fix: flush proxied event stream headers 2026-07-30 22:11:48 +08:00
Codex 144e17c220 feat: navigate workspaces without page reloads 2026-07-30 22:10:59 +08:00
Codex 3a6652be0f fix: simplify top-level settings 2026-07-30 22:08:34 +08:00
Codex af5abb4b82 docs: plan settings navigation performance fix 2026-07-30 22:06:28 +08:00
Codex 3bbd227c58 docs: define settings navigation performance fix 2026-07-30 22:01:31 +08:00
Codex d60cff1dd8 feat(web): protect phone data and polish release UI 2026-07-30 20:16:50 +08:00
Codex 6ec8e4f6a6 docs: plan phone privacy release polish 2026-07-30 19:52:37 +08:00
Codex cf2cf6827d docs: define phone privacy and release polish 2026-07-30 19:49:17 +08:00
Codex 570edf6bb2 feat: rebuild warm operations workbench 2026-07-30 14:49:33 +08:00
Codex 25c853dea8 docs: define compact fleet cards 2026-07-30 14:25:34 +08:00
Codex f57ec1f48d docs: define warm operations workbench 2026-07-30 00:53:59 +08:00
chick bbd94b5672 feat(ui): simplify fleet cards by moving edit/delete into detail
Hide instance IDs and config/delete controls on overview cards; keep
service/system restart only, with edit still available from detail.
2026-07-22 00:20:32 +08:00
chick 3c7018a792 feat(ui): refine fleet search/filter toolbar with status chips
Adopt Portainer/Beszel-style fleet controls: prominent search, status
facet chips with counts, active filter chips, result count, and
primary-row sort/select. Keep advanced filters collapsed for secondary
facets. Tests and production dist rebuild for gateway 8788.
2026-07-21 23:31:08 +08:00
chick 7d0363d275 feat(ui): topbar settings, hide dev badge, premium fleet cards
Collapse the redundant left workspace nav (overview is already the home
surface) and move Settings into the top bar. Hide placeholder `dev`
version badges. Restyle fleet cards with softer elevation, status
summary chips, hover sheen, and reduced-motion-safe entrance motion.
2026-07-21 23:14:37 +08:00
chick 9ea8021cce feat(fleet): card-only UI with progressive load and restart ops
Drop the redundant advanced table so fleet stays resource-first cards.
Keep multi-select batch service/system restart via prepare→execute, card
restarts, overview system ops, and progressive fleet loading.
2026-07-21 22:56:55 +08:00
chick ebed4c1969 feat(auth): allow trusted remote bootstrap and add installer 2026-07-19 21:10:16 +08:00
chick 49ee4e6570 feat(web): redesign fleet cards and instance workspace 2026-07-19 18:54:26 +08:00
chick f2803896a8 feat(auth): protect aggregate console with password login 2026-07-19 17:13:43 +08:00
chick 75682b8134 feat(web): make instance detail the operations workbench 2026-07-19 14:05:06 +08:00
chick f7d69a0fa7 feat(web): prioritize SMS operations workspace 2026-07-19 10:30:52 +08:00
chick 0112e3320a feat(sms): add real instance message workflow 2026-07-19 02:12:57 +08:00
chick 38a26c2ce1 fix(transport): allow passwordless resource reads 2026-07-19 00:56:03 +08:00
chick 4e7bdea230 fix(resources): probe passwordless instances 2026-07-19 00:51:55 +08:00
chick 23f18963ef feat(fleet): show instance resource metrics 2026-07-19 00:22:23 +08:00
chick 2411801240 feat(web): make instance overview card-first 2026-07-18 23:23:41 +08:00
chick abfd07f8a3 feat(web): localize and redesign operations console 2026-07-18 22:22:41 +08:00