feat(cli,snmp): fix APC runtime unit defaults and add interactive action editing

This commit is contained in:
2026-04-16 09:44:30 +00:00
parent c7b52c48d5
commit c42ebb56d3
22 changed files with 2001 additions and 863 deletions
+98 -32
View File
@@ -1,64 +1,108 @@
# Changelog
## 2026-04-16 - 5.10.0 - feat(cli,snmp)
fix APC runtime unit defaults and add interactive action editing
- correct APC PowerNet runtime handling to use TimeTicks-based conversion and update default runtime unit selection for APC devices
- add an action edit command for UPS and group actions so existing actions can be updated interactively
- introduce a v4.3 to v4.4 config migration to correct APC runtimeUnit values in existing configurations
## 2026-04-16 - 5.9.0 - feat(cli,snmp)
fix APC runtime defaults and add interactive action editing
- Correct APC PowerNet runtime handling to use TimeTicks-based conversion, update runtime-unit
defaults, and add a v4.3 to v4.4 migration for existing configs.
- Add `nupst action edit <target-id> <index>` so UPS and group actions can be updated without
hand-editing `config.json`.
- Document config hot-reload behavior, APC runtime guidance, and the lack of cross-node action
coordination when reusing configs on multiple machines.
## 2026-04-16 - 5.8.0 - feat(systemd)
improve service status reporting with structured systemctl data
- switch status collection from parsing `systemctl status` output to `systemctl show` properties for more reliable service state detection
- switch status collection from parsing `systemctl status` output to `systemctl show` properties for
more reliable service state detection
- display a distinct "not installed" status when the unit is missing
- format systemd memory and CPU usage values into readable output for status details
## 2026-04-16 - 5.7.0 - feat(monitoring)
add edge-triggered threshold handling with group action orchestration and HA-aware Proxmox shutdowns
- Track per-action threshold entry state so threshold-based actions fire only when conditions are newly violated
- Add group monitoring and threshold evaluation for redundant and non-redundant UPS groups, including suppression of destructive actions when members are unreachable
- Support optional Proxmox HA stop requests for HA-managed guests and prevent duplicate Proxmox or host shutdown scheduling
- Track per-action threshold entry state so threshold-based actions fire only when conditions are
newly violated
- Add group monitoring and threshold evaluation for redundant and non-redundant UPS groups,
including suppression of destructive actions when members are unreachable
- Support optional Proxmox HA stop requests for HA-managed guests and prevent duplicate Proxmox or
host shutdown scheduling
## 2026-04-14 - 5.6.0 - feat(config)
add configurable default shutdown delay for shutdown actions
- introduces a top-level defaultShutdownDelay config value used by shutdown actions that do not define their own delay
- applies the configured default during action execution, daemon-initiated shutdowns, CLI prompts, and status display output
- preserves explicit shutdownDelay values including 0 minutes and normalizes invalid config values back to the built-in default
- introduces a top-level defaultShutdownDelay config value used by shutdown actions that do not
define their own delay
- applies the configured default during action execution, daemon-initiated shutdowns, CLI prompts,
and status display output
- preserves explicit shutdownDelay values including 0 minutes and normalizes invalid config values
back to the built-in default
## 2026-04-14 - 5.5.1 - fix(cli,daemon,snmp)
normalize CLI argument parsing and extract daemon monitoring helpers with stronger SNMP typing
- Pass runtime arguments directly to the CLI in both Deno and Node entrypoints so commands and debug flags are parsed consistently
- Refactor daemon logic into dedicated pause state, config watch, UPS status, monitoring, action orchestration, shutdown execution, and shutdown monitoring modules
- Add explicit local typings and value coercion around net-snmp interactions to reduce untyped response handling
- Update user-facing CLI guidance to use current subcommands such as "nupst ups add", "nupst ups edit", and "nupst service start"
- Pass runtime arguments directly to the CLI in both Deno and Node entrypoints so commands and debug
flags are parsed consistently
- Refactor daemon logic into dedicated pause state, config watch, UPS status, monitoring, action
orchestration, shutdown execution, and shutdown monitoring modules
- Add explicit local typings and value coercion around net-snmp interactions to reduce untyped
response handling
- Update user-facing CLI guidance to use current subcommands such as "nupst ups add", "nupst ups
edit", and "nupst service start"
- Expand test coverage for extracted monitoring and pause-state helpers
## 2026-04-02 - 5.5.0 - feat(proxmox)
add Proxmox CLI auto-detection and interactive action setup improvements
- Add Proxmox action support for CLI mode using qm/pct with automatic fallback to REST API mode
- Expose proxmoxMode configuration and update CLI wizards to auto-detect local Proxmox tools before prompting for API credentials
- Expand interactive action creation to support shutdown, webhook, script, and Proxmox actions with improved displayed details
- Expose proxmoxMode configuration and update CLI wizards to auto-detect local Proxmox tools before
prompting for API credentials
- Expand interactive action creation to support shutdown, webhook, script, and Proxmox actions with
improved displayed details
- Update documentation to cover Proxmox CLI/API modes and clarify shutdown delay units in minutes
## 2026-03-30 - 5.4.1 - fix(deps)
bump tsdeno and net-snmp patch dependencies
- update @git.zone/tsdeno from ^1.2.0 to ^1.3.1
- update net-snmp import from 3.26.0 to 3.26.1 in the SNMP manager
## 2026-03-30 - 5.4.0 - feat(snmp)
add configurable SNMP runtime units with v4.3 migration support
- Adds explicit `runtimeUnit` support for SNMP devices with `minutes`, `seconds`, and `ticks` options.
- Adds explicit `runtimeUnit` support for SNMP devices with `minutes`, `seconds`, and `ticks`
options.
- Updates runtime processing to prefer configured units over UPS model heuristics.
- Introduces a v4.2 to v4.3 migration that populates `runtimeUnit` for existing SNMP device configs based on `upsModel`.
- Extends the CLI setup and device summary output to configure and display the selected runtime unit.
- Updates default config version to 4.3 and documents the new SNMP runtime unit setting in the README.
- Introduces a v4.2 to v4.3 migration that populates `runtimeUnit` for existing SNMP device configs
based on `upsModel`.
- Extends the CLI setup and device summary output to configure and display the selected runtime
unit.
- Updates default config version to 4.3 and documents the new SNMP runtime unit setting in the
README.
## 2026-03-18 - 5.3.3 - fix(deps)
add @git.zone/tsdeno as a development dependency
- Adds @git.zone/tsdeno@^1.2.0 to devDependencies in package.json.
## 2026-03-18 - 5.3.2 - fix(build)
replace manual release compilation workflows with tsdeno-based build configuration
- removes obsolete CI and npm publish workflows
@@ -68,6 +112,7 @@ replace manual release compilation workflows with tsdeno-based build configurati
- deletes the custom compile-all.sh script in favor of centralized build tooling
## 2026-03-15 - 5.3.1 - fix(cli)
rename the update command references to upgrade across the CLI and documentation
- Updates command parsing and help output to use `upgrade` instead of `update`.
@@ -75,40 +120,61 @@ rename the update command references to upgrade across the CLI and documentation
- Aligns README and command migration documentation with the renamed command.
## 2026-02-20 - 5.3.0 - feat(daemon)
Add UPSD (NUT) protocol support, Proxmox VM shutdown action, pause/resume monitoring, and network-loss/unreachable handling; bump config version to 4.2
- Add UPSD client (ts/upsd) and ProtocolResolver (ts/protocol) to support protocol-agnostic UPS queries (snmp or upsd).
- Introduce new TProtocol and IUpsdConfig types, wire up Nupst to initialize & expose UPSD client, and route status requests through ProtocolResolver.
- Add 'unreachable' TPowerStatus plus consecutiveFailures and unreachableSince tracking; mark UPS as unreachable after NETWORK.CONSECUTIVE_FAILURE_THRESHOLD failures and suppress shutdown actions while unreachable.
- Implement pause/resume feature: PAUSE.FILE_PATH state file, CLI commands (pause/resume), daemon pause-state polling, auto-resume, and include pause state in HTTP API responses.
- Add ProxmoxAction (ts/actions/proxmox-action.ts) with Proxmox API interaction, configuration options (token, node, timeout, force, insecure) and CLI prompts to configure proxmox actions.
- CLI and UI updates: protocol selection when adding UPS, protocol/host shown in lists, action details column supports proxmox, and status displays include protocol and unreachable state.
- Add migration MigrationV4_1ToV4_2 to set protocol:'snmp' for existing devices and bump config.version to '4.2'.
- Add new constants (NETWORK, UPSD, PAUSE, PROXMOX), update package.json scripts (test/build/lint/format), and wire protocol support across daemon, systemd, http-server, and various handlers.
Add UPSD (NUT) protocol support, Proxmox VM shutdown action, pause/resume monitoring, and
network-loss/unreachable handling; bump config version to 4.2
- Add UPSD client (ts/upsd) and ProtocolResolver (ts/protocol) to support protocol-agnostic UPS
queries (snmp or upsd).
- Introduce new TProtocol and IUpsdConfig types, wire up Nupst to initialize & expose UPSD client,
and route status requests through ProtocolResolver.
- Add 'unreachable' TPowerStatus plus consecutiveFailures and unreachableSince tracking; mark UPS as
unreachable after NETWORK.CONSECUTIVE_FAILURE_THRESHOLD failures and suppress shutdown actions
while unreachable.
- Implement pause/resume feature: PAUSE.FILE_PATH state file, CLI commands (pause/resume), daemon
pause-state polling, auto-resume, and include pause state in HTTP API responses.
- Add ProxmoxAction (ts/actions/proxmox-action.ts) with Proxmox API interaction, configuration
options (token, node, timeout, force, insecure) and CLI prompts to configure proxmox actions.
- CLI and UI updates: protocol selection when adding UPS, protocol/host shown in lists, action
details column supports proxmox, and status displays include protocol and unreachable state.
- Add migration MigrationV4_1ToV4_2 to set protocol:'snmp' for existing devices and bump
config.version to '4.2'.
- Add new constants (NETWORK, UPSD, PAUSE, PROXMOX), update package.json scripts
(test/build/lint/format), and wire protocol support across daemon, systemd, http-server, and
various handlers.
## 2026-01-29 - 5.2.4 - fix()
no changes
- No files changed in the provided git diff; no commit or version bump required.
## 2026-01-29 - 5.2.3 - fix(core)
fix lint/type issues and small refactors
- Add missing node:process imports in bin and scripts to ensure process is available
- Remove unused imports and unused type imports (e.g. writeFileSync, IActionConfig) to reduce noise
- Make some methods synchronous (service update, webhook call) to match actual usage
- Tighten SNMP typings and linting: added deno-lint-ignore comments, renamed unused params with leading underscore, and use `as const` for securityLevel fallbacks
- Tighten SNMP typings and linting: added deno-lint-ignore comments, renamed unused params with
leading underscore, and use `as const` for securityLevel fallbacks
- Improve error handling variable naming in systemd (use error instead of _error)
- Annotate ANSI regex with deno-lint-ignore no-control-regex and remove unused color/symbol imports across CLI/daemon/logger
- Annotate ANSI regex with deno-lint-ignore no-control-regex and remove unused color/symbol imports
across CLI/daemon/logger
## 2026-01-29 - 5.2.2 - fix(core)
tidy formatting and minor fixes across CLI, SNMP, HTTP server, migrations and packaging
- Normalize import ordering and improve logger/string formatting across many CLI handlers, daemon, systemd, actions and tests
- Normalize import ordering and improve logger/string formatting across many CLI handlers, daemon,
systemd, actions and tests
- Apply formatting tidies: trailing commas, newline fixes, and more consistent multiline strings
- Allow BaseMigration methods to return either sync or async results (shouldRun/migrate signatures updated)
- Improve SNMP manager and HTTP server logging/error messages and tighten some typings (raw SNMP types, server error typing)
- Small robustness and messaging improvements in npm installer and wrapper (platform/arch mapping, error outputs)
- Allow BaseMigration methods to return either sync or async results (shouldRun/migrate signatures
updated)
- Improve SNMP manager and HTTP server logging/error messages and tighten some typings (raw SNMP
types, server error typing)
- Small robustness and messaging improvements in npm installer and wrapper (platform/arch mapping,
error outputs)
- Update tests and documentation layout/formatting for readability
## 2026-01-29 - 5.2.1 - fix(cli(ups-handler), systemd)