You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Enforce external menu configuration and adapter help visibility contracts
- Document current-command help navigation behavior and Python 3.10 compatibility
- Reorganize tests by runtime module and regenerate external menu schema
Co-authored-by: Codex <codex@openai.com>
Copy file name to clipboardExpand all lines: CONTEXT.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ Input supplied by a user to locate a plugin or function item in a help menu.
27
27
The deterministic display order of plugin menu items.
28
28
29
29
**菜单索引**:
30
-
The 1-based position of a menu item in the current sorted menu snapshot. It is not a stable identifier.
30
+
The 1-based position of a menu item in the current discoverable sorted menu snapshot. A Help view must not advertise an index when its target is absent from that snapshot. It is not a stable identifier.
Copy file name to clipboardExpand all lines: docs/adr/0002-resolve-menu-queries-by-snapshot-index-name-and-pinyin.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,4 +6,4 @@ status: accepted
6
6
7
7
PicMenu Next orders plugin menu items by pinyin sort key and then by plugin ID, removing incidental plugin-load ordering when names share the same pinyin. A numeric query selects the 1-based position in that current sorted snapshot, not a stable identity; the position may change as menu items change.
8
8
9
-
A pure positive number is resolved as an index before name or pinyin matching. Zero and all-zero strings remain fuzzy queries; other queries combine the displayed name at 60% and pinyin at 40%, require a score of 60, and never replace displayed names with pinyin. This keeps direct selection predictable while retaining Chinese and romanized discovery for plugin and function items.
9
+
A pure positive number is resolved as an index before name or pinyin matching. Zero and all-zero strings remain fuzzy queries; other queries combine the displayed name at 60% and pinyin at 40%, require a score of 60, and never replace displayed names with pinyin. Any index rendered as navigation guidance must resolve from the same discoverable snapshot under the stated help invocation. Current-command Help first uses the ordinary snapshot and uses a `-H` snapshot only for its hidden-item retry, so its guidance remains resolvable. This keeps direct selection predictable while retaining Chinese and romanized discovery for plugin and function items.
Copy file name to clipboardExpand all lines: docs/adr/0007-store-adapter-support-as-menu-data.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,4 +6,4 @@ status: accepted
6
6
7
7
Supported adapters are plugin-level menu data, not transient metadata or PicMenu extension configuration. PicMenu Next stores them internally as `set[str] | None`, accepts an array in external JSON/YAML/TOML config, collects `PluginMetadata.supported_adapters`, and lets external config replace that field as a whole so loaded and external plugin menus share one visibility model.
8
8
9
-
Missing or `null` adapter data means all adapters are supported, while an explicit empty list supports none and hides the plugin from ordinary menu discovery. `-H` or `--show-hidden` includes that adapter-hidden plugin, but does not make it compatible with the current adapter. Unresolvable entries are ignored without failing the menu but do not establish support. Adapter hiding is derived from final menu data before Mixins run, so a Mixin may override it; it affects only ordinary menu visibility, not Help interception for a command the user has already invoked.
9
+
Missing or `null` adapter data means all adapters are supported, while an explicit empty list supports none and hides the plugin from ordinary menu discovery. `-H` or `--show-hidden` includes that adapter-hidden plugin, but does not make it compatible with the current adapter. Unresolvable entries are ignored without failing the menu but do not establish support. Adapter hiding is derived from final menu data before Mixins run, so a Mixin may override it. It affects ordinary menu visibility and the first current-command Help attempt; that Help request retries in the `-H` snapshot when ordinary discovery finds no view, so any numeric navigation guidance remains valid.
Copy file name to clipboardExpand all lines: docs/adr/0013-render-intercepted-alconna-help-without-silence.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,6 @@ status: accepted
6
6
7
7
Normal help-menu queries respect hidden plugins and hidden function items: if a plugin is hidden, users cannot find it through the ordinary menu command, and explicit display of hidden items remains subject to hidden-item permission policy. Adapter support can hide a plugin as part of the menu data transformation path, and later Mixin changes take precedence over that derived hidden state. Alconna Help interception is different because the user has already invoked a concrete command, so PicMenu Next must return Help for that command regardless of plugin or function-item hidden state. It uses the same data path as ordinary plugin and function detail rendering; when the current command has no registered function item, it may create a temporary item for that render.
8
8
9
-
Alconna decides whether a `-h` or `--help` invocation requests output. Once PicMenu Next receives such a request for a recognized command, it must return a response. It first attempts a PicMenu help view with adapter filtering disabled but ordinary hidden-state filtering intact. Only a normal no-result, such as a missing plugin or function item (including an item hidden by that first attempt), triggers one retry with hidden-state filtering relaxed. If that retry still has no view, PicMenu Next returns Alconna's original help output.
9
+
Alconna decides whether a `-h` or `--help` invocation requests output. Once PicMenu Next receives such a request for a recognized command, it must return a response. It first attempts a PicMenu help view with the same adapter and hidden-state filtering as ordinary menu discovery. Only a normal no-result, such as a missing plugin or function item (including an item hidden by that first attempt), triggers one retry with hidden-state filtering relaxed. That retry uses the `-H` snapshot, including adapter-hidden plugins, so any numeric menu-navigation guidance remains resolvable. If that retry still has no view, PicMenu Next returns Alconna's original help output.
10
10
11
11
All PicMenu interception steps are protected as one operation. Any ordinary exception, including command ownership resolution, context injection, Mixin execution, or template rendering, is logged with `logger.exception` together with the command path and plugin ID, then immediately returns Alconna's original help output without a hidden-state retry. A failed interception must never turn an Alconna help request into silence.
0 commit comments