Skip to content

v0.59.0

Choose a tag to compare

@hucker hucker released this 16 Apr 22:17
· 1556 commits to main since this release

Help-system release. Every built-in command's /help page now opens with a one-line live status, device commands brought in by /include become first-class citizens in both /help and /search, and the device JSON schema picks up an optional version field so firmware updates automatically refresh the cache.

0.59.0 New Features

  • Dynamic help -- Command.long_help (and PluginInfo.long_help) now accepts a callable (PluginContext) -> str as well as a static string. Callables are invoked at render time so a command's DESCRIPTION section can reflect live runtime state (loaded files, current connection, cached counts). Existing static-string declarations are unchanged. See writing-plugins.md for the pattern.
  • Dynamic help on built-in commands -- /help for /cfg, /port and each port subcommand, /include, /cap.*, /ss, /run.edit, /proto (+ subcommands), /edit.run|proto|plugin, /var, /env, and /seq now opens with a green single-line status reflecting the current state (active cfg name, connected port, counter count, file counts in the relevant folder, etc.). Single-value commands show only the state line; multi-option commands keep their existing prose.
  • Dynamic-help helpers -- new termapy.help_dynamic module supplies small reusable building blocks (state_line, folder_line, port_status, cfg_status, ns_count, compose, green) so plugin authors can wire dynamic DESCRIPTION content in one or two lines. See writing-plugins.md.
  • Target-command parity -- /include'd device commands now support optional long_help and flags fields in their JSON. /help <target> renders a full man page (NAME, SYNOPSIS, DESCRIPTION, FLAGS, source marker) when those fields are present. /search indexes target commands alongside REPL plugins, tagging device-command hits with (target) so they're visually distinct. The demo device's AT+HELP.JSON uses the new fields on AT+INFO, AT+TEMP, AT+LED, and AT+BINDUMP so the feature is live out of the box in --demo.
  • Device schema versioning -- /include JSON may carry an optional top-level version string (device's own schema version, not termapy's). On fetch, if the device's version is strictly newer than the cached one (PEP 440 compare), the cache is overwritten; otherwise the cache is kept. First-time fetches with no cache always apply. /include.reload still bypasses the gate for manual refresh. The demo device advertises "version": "1.0.0" so the round-trip is exercised end-to-end.

0.59.0 Changes

  • /help is now case-sensitive on exact match -- the argument is no longer lowercased before lookup. Plugin names (conventionally lowercase) and device AT commands (conventionally upper) both match exactly. Typing /help INCLUDE used to silently lowercase and hit /include; it now falls through to the forgiving candidate list (which is still case-insensitive internally), where /include surfaces as a candidate. This is the change that makes /help AT+INFO work for included device commands.