Store UME alarm payload fields as TEXT and run startup ALTER COLUMN upgrades so large alarm records no longer fail with StringDataRightTruncation. Keep full values during sync while hashing only pathological ultra-long alarm keys to preserve idempotent primary keys.
Co-authored-by: Cursor <cursoragent@cursor.com>
- Use last ended_at (done or failed) for debounce; remove duplicate time.sleep after sync\n- On startup mark running+no ended_at jobs failed (crash/interrupt) so interval logic is not fooled\n- Log marker page progress every 25 pages\n- Log when alarm/inventory scheduler threads start
Co-authored-by: Cursor <cursoragent@cursor.com>
- _reset_runtime_pause_flags() after create_all so pause state cannot survive process restart in memory\n- Before each alarms/inventory auto sync, wait until interval elapsed since last status=done job ended_at (any trigger); honor pause during wait\n- Helps avoid immediate duplicate sync on restart when DB was recently updated
Co-authored-by: Cursor <cursoragent@cursor.com>
Makes schedule attempts visible in ume_sync_jobs while HTTP pagination runs; log iteration/sleep/finish for alarms_current and inventory auto loops.
Co-authored-by: Cursor <cursoragent@cursor.com>
Avoid stale last_run_at when sync_alarms_current runs longer than interval; clarifying tooltip on UME page.
Co-authored-by: Cursor <cursoragent@cursor.com>
Non-reentrant Lock caused /v1/ume/token/refresh to hang when handshake failed or token empty inside renew; UI stuck on 续期中.
Co-authored-by: Cursor <cursoragent@cursor.com>
- keepalive: call renew when has_token and (expires_in<=0 or below renew_before) so 0s stuck state self-heals\n- alarms/inventory auto loops: set last_error while pulling so table is not stuck at init with no hint\n- UmePage: warn pills for connected+需续期, spinners on token actions, toast ok/err from App, invalidate sync status after token ops
Co-authored-by: Cursor <cursoragent@cursor.com>
Previously exp>mem_exp blocked loading when both were 0 (restart + DB row with missing expiry). Also clear in-memory token when DB row is cleared so token/status matches store after disconnect.
Co-authored-by: Cursor <cursoragent@cursor.com>
GET /v1/ume/alarms accepts host_name (contains on inventory); ne_id query kept for API clients. Web uses host_name field and link on host column.
Co-authored-by: Cursor <cursoragent@cursor.com>
API GET /v1/ume/sync/status exposes deleted only (sum of inventory NE + current-alarm reconcile counts from details_json). UI one column.
Co-authored-by: Cursor <cursoragent@cursor.com>
Drop ume_inventory_equipment_holder on startup; remove ORM model and sync/reconcile paths. Sync status API/UI no longer expose deleted_inventory_holders. Nested holder data remains in ne raw_json if UME returns it.
Co-authored-by: Cursor <cursoragent@cursor.com>
Parse UmeSyncJob.details_json in GET /v1/ume/sync/status for deleted_inventory_ne, deleted_inventory_holders, deleted_stale_current_alarms. Add table columns on UmePage and types.
Co-authored-by: Cursor <cursoragent@cursor.com>
After a complete marker pull (is_end_of_reply, no iterator/dup abort), delete local NE/holders and current alarms not present in this batch. Replace 48h-only current-alarm expiry. Flush before bulk delete to avoid ORM stale updates. Job/batch JSON records deleted counts and reconcile flags.
Co-authored-by: Cursor <cursoragent@cursor.com>
Set trust_env=False on netx->oclaw analyze and health clients so localhost checks are not routed through host proxies.
Co-authored-by: Cursor <cursoragent@cursor.com>
Install frontend npm dependencies automatically in start_netx so fresh machines can bring up the 5173 Vite UI without separate manual npm install.
Co-authored-by: Cursor <cursoragent@cursor.com>
Start the web dev server for -WithWeb even without -Background so 5173 is available in the common foreground run path.
Co-authored-by: Cursor <cursoragent@cursor.com>
Replace the DO-block role upsert with explicit role existence check plus CREATE/ALTER statements, preventing PowerShell/psql quoting issues on some Windows setups.
Co-authored-by: Cursor <cursoragent@cursor.com>
Use escaped $$ delimiters inside the SQL block so PowerShell does not treat them as interpolation and break init_pg on first-run setup.
Co-authored-by: Cursor <cursoragent@cursor.com>
Use ${...} interpolation in init_pg output to avoid InvalidVariableReferenceWithDrive when rendering user:password@host:port.
Co-authored-by: Cursor <cursoragent@cursor.com>
Provide a Windows init script to create/repair the netx role and database with a connection check, and document the step in README so new machines avoid initial auth failures.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add a from-scratch setup section covering Python, Node/npm, PostgreSQL, and startup commands, and update the startup script to always create/use .venv instead of falling back to system Python.
Co-authored-by: Cursor <cursoragent@cursor.com>
Exclude scripts/.run runtime logs and pid files from version control and remove previously tracked artifacts from the repository index.
Co-authored-by: Cursor <cursoragent@cursor.com>
Set up netx as a standalone git-managed project with isolated Python dependencies, alarm ingestion/query APIs, oclaw bridge integration, and ops-focused UI enhancements including history and raw field access.
Co-authored-by: Cursor <cursoragent@cursor.com>