pi-usereq 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/.gitignore +3 -0
  2. package/CHANGELOG.md +31 -0
  3. package/README.md +1 -1
  4. package/package.json +1 -1
  5. package/{req → pi-usereq}/docs/REFERENCES.md +196 -159
  6. package/{req → pi-usereq}/docs/REQUIREMENTS.md +65 -44
  7. package/{req → pi-usereq}/docs/WORKFLOW.md +66 -73
  8. package/src/core/config.ts +39 -12
  9. package/src/core/extension-status.ts +94 -58
  10. package/src/core/pi-notify.ts +198 -11
  11. package/src/core/runtime-project-paths.ts +3 -32
  12. package/src/core/settings-menu.ts +9 -4
  13. package/src/core/static-check.ts +35 -171
  14. package/src/index.ts +281 -86
  15. package/tests/attended-results-scenarios.ts +3 -13
  16. package/tests/cli-command-option-parity.test.ts +21 -12
  17. package/tests/debug-extension-harness.test.ts +11 -7
  18. package/tests/extension-registration.test.ts +371 -71
  19. package/tests/oracle-project.test.ts +8 -3
  20. package/tests/oracle-standalone.test.ts +7 -13
  21. package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_c.c.json +0 -5
  22. package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_cpp.cpp.json +0 -5
  23. package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_csharp.cs.json +0 -5
  24. package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_elixir.ex.json +0 -5
  25. package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_go.go.json +0 -5
  26. package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_haskell.hs.json +0 -5
  27. package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_java.java.json +0 -5
  28. package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_javascript.js.json +0 -5
  29. package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_kotlin.kt.json +0 -5
  30. package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_lua.lua.json +0 -5
  31. package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_perl.pl.json +0 -5
  32. package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_php.php.json +0 -5
  33. package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_python.py.json +0 -5
  34. package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_ruby.rb.json +0 -5
  35. package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_rust.rs.json +0 -5
  36. package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_scala.scala.json +0 -5
  37. package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_shell.sh.json +0 -5
  38. package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_swift.swift.json +0 -5
  39. package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_typescript.ts.json +0 -5
  40. package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_zig.zig.json +0 -5
  41. package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_c.c.json +0 -5
  42. package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_cpp.cpp.json +0 -5
  43. package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_csharp.cs.json +0 -5
  44. package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_elixir.ex.json +0 -5
  45. package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_go.go.json +0 -5
  46. package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_haskell.hs.json +0 -5
  47. package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_java.java.json +0 -5
  48. package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_javascript.js.json +0 -5
  49. package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_kotlin.kt.json +0 -5
  50. package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_lua.lua.json +0 -5
  51. package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_perl.pl.json +0 -5
  52. package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_php.php.json +0 -5
  53. package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_python.py.json +0 -5
  54. package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_ruby.rb.json +0 -5
  55. package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_rust.rs.json +0 -5
  56. package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_scala.scala.json +0 -5
  57. package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_shell.sh.json +0 -5
  58. package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_swift.swift.json +0 -5
  59. package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_typescript.ts.json +0 -5
  60. package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_zig.zig.json +0 -5
@@ -1658,7 +1658,7 @@ import { makeRelativeIfContainsProject } from "./utils.js";
1658
1658
 
1659
1659
  ---
1660
1660
 
1661
- # extension-status.ts | TypeScript | 660L | 30 symbols | 4 imports | 30 comments
1661
+ # extension-status.ts | TypeScript | 686L | 32 symbols | 5 imports | 32 comments
1662
1662
  > Path: `src/core/extension-status.ts`
1663
1663
  - @brief Tracks pi-usereq extension status state and renders status-bar telemetry.
1664
1664
  - @details Centralizes hook interception, context-usage snapshots, run timing,
@@ -1669,10 +1669,11 @@ scheduling through exported controller helpers.
1669
1669
 
1670
1670
  ## Imports
1671
1671
  ```
1672
+ import path from "node:path";
1672
1673
  import type {
1673
1674
  import type { UseReqConfig } from "./config.js";
1675
+ import { normalizePathSlashes } from "./path-context.js";
1674
1676
  import { formatPiNotifyBeepStatus } from "./pi-notify.js";
1675
- import { formatAbsoluteGitPath, formatBasePathRelativeToGitPath, resolveRuntimeGitPath } from "./runtime-project-paths.js";
1676
1677
  ```
1677
1678
 
1678
1679
  ## Definitions
@@ -1768,19 +1769,19 @@ runtime. Runtime is O(1). Side effect: mutates `state.contextUsage`.
1768
1769
  - @return {void} No return value.
1769
1770
  - @satisfies REQ-118, REQ-119
1770
1771
 
1771
- ### fn `function countFilledContextCells(` (L275-283)
1772
- - @brief Counts the filled cells rendered by the 5-cell context bar.
1772
+ ### fn `function countFilledContextCells(` (L277-285)
1773
+ - @brief Counts the filled cells rendered by the 10-cell context bar.
1773
1774
  - @details Uses ceiling semantics for positive percentages so any non-zero
1774
1775
  usage occupies at least one cell and zero usage occupies none. Runtime is
1775
1776
  O(1). No external state is mutated.
1776
1777
  - @param[in] contextUsage {ContextUsage | undefined} Normalized context snapshot.
1777
- - @return {number} Filled-cell count in the inclusive range `[0, 5]`.
1778
+ - @return {number} Filled-cell count in the inclusive range `[0, 10]`.
1778
1779
  - @satisfies REQ-122
1779
1780
 
1780
- ### fn `function resolveContextUsageOverlay(` (L295-314)
1781
+ ### fn `function resolveContextUsageOverlay(` (L297-316)
1781
1782
  - @brief Resolves the threshold-specific context-bar overlay when required.
1782
- - @details Returns the empty-state `CLEAR` overlay when normalized context
1783
- usage is unavailable or non-positive and returns the high-water `FULL!`
1783
+ - @details Returns the empty-state `◀ CLEAR ▶ ` overlay when normalized context
1784
+ usage is unavailable or non-positive and returns the centered ` ◀ FULL ▶ `
1784
1785
  overlay with the active theme `error` token when usage exceeds 90 percent.
1785
1786
  Runtime is O(1). No external state is mutated.
1786
1787
  - @param[in] contextUsage {ContextUsage | undefined} Normalized context snapshot.
@@ -1798,8 +1799,8 @@ width. No external state is mutated.
1798
1799
  - @return {string} Rendered overlay text.
1799
1800
  - @satisfies REQ-127, REQ-128
1800
1801
 
1801
- ### fn `function formatContextUsageBar(` (L349-361)
1802
- - @brief Formats one 5-cell context-usage bar.
1802
+ ### fn `function formatContextUsageBar(` (L351-363)
1803
+ - @brief Formats one 10-cell context-usage bar.
1803
1804
  - @details Renders threshold-specific overlays for empty and high-water states;
1804
1805
  otherwise renders filled cells with the theme `warning` token on an
1805
1806
  accent-derived background and unfilled cells in `dim` on the same background
@@ -1807,10 +1808,10 @@ to preserve constant bar width. Runtime is O(1). No external state is
1807
1808
  mutated.
1808
1809
  - @param[in] theme {StatusThemeAdapter} Normalized status theme.
1809
1810
  - @param[in] contextUsage {ContextUsage | undefined} Normalized context snapshot.
1810
- - @return {string} Rendered 5-cell bar or overlay.
1811
+ - @return {string} Rendered 10-cell bar or overlay.
1811
1812
  - @satisfies REQ-121, REQ-122, REQ-126, REQ-127, REQ-128
1812
1813
 
1813
- ### fn `function formatStatusDuration(durationMs: number): string` (L372-377)
1814
+ ### fn `function formatStatusDuration(durationMs: number): string` (L374-379)
1814
1815
  - @brief Formats one elapsed-duration value as `M:SS`.
1815
1816
  - @details Floors the input to whole seconds, keeps minutes unbounded above 59,
1816
1817
  and zero-pads seconds to two digits. Runtime is O(1). No external state is
@@ -1819,7 +1820,27 @@ mutated.
1819
1820
  - @return {string} Duration rendered as `M:SS`.
1820
1821
  - @satisfies REQ-125
1821
1822
 
1822
- ### fn `function formatStatusField(` (L388-394)
1823
+ ### fn `function formatCompletedStatusDuration(` (L390-394)
1824
+ - @brief Formats one optional completed-duration value.
1825
+ - @details Returns the canonical unset placeholder `--:--` until the supplied
1826
+ timer receives a normally completed prompt duration, then delegates to
1827
+ `formatStatusDuration(...)`. Runtime is O(1). No external state is mutated.
1828
+ - @param[in] durationMs {number | undefined} Optional completed-duration value.
1829
+ - @return {string} Rendered duration or unset placeholder.
1830
+ - @satisfies REQ-124
1831
+
1832
+ ### fn `function formatElapsedStatusValue(` (L407-417)
1833
+ - @brief Formats the consolidated `elapsed` status-bar value.
1834
+ - @details Emits the active prompt segment `⏱︎ <active>`, the latest normally
1835
+ completed segment `⚑ <last>`, and the accumulated successful-runtime segment
1836
+ `⌛︎ <total>` with fixed spacing. Runtime is O(1). No external state is
1837
+ mutated.
1838
+ - @param[in] state {PiUsereqStatusState} Mutable status state snapshot.
1839
+ - @param[in] nowMs {number} Current wall-clock time in milliseconds.
1840
+ - @return {string} Consolidated `elapsed` field value.
1841
+ - @satisfies REQ-123, REQ-124, REQ-125, REQ-159
1842
+
1843
+ ### fn `function formatStatusField(` (L428-434)
1823
1844
  - @brief Formats one standard status-bar field.
1824
1845
  - @details Renders the field label in accent color and the value in warning
1825
1846
  color. Runtime is O(n) in combined text length. No external state is mutated.
@@ -1847,17 +1868,18 @@ Runtime is O(n) in message count. No external state is mutated.
1847
1868
  - @return {boolean} `true` when the run ended in aborted state.
1848
1869
  - @satisfies REQ-125
1849
1870
 
1850
- ### fn `function buildPiUsereqStatusText(` (L444-481)
1871
+ ### fn `function buildPiUsereqStatusText(` (L485-507)
1851
1872
  - @brief Builds the full single-line pi-usereq status-bar payload.
1852
- - @details Renders git, base, docs, tests, src, tools, context, elapsed, last, beep, and sound fields in the canonical order with dim bullet separators and threshold-specific context-bar overlays. Runtime is O(s) in configured source-path count plus runtime git probing. No external state is mutated.
1853
- - @param[in] cwd {string} Runtime working directory used for git/base path derivation.
1873
+ - @details Renders base, context, elapsed, beep, and sound fields in the
1874
+ canonical order with dim bullet separators and threshold-specific context-bar
1875
+ overlays. Runtime is O(1). No external state is mutated.
1876
+ - @param[in] cwd {string} Runtime working directory used for base-path derivation.
1854
1877
  - @param[in] config {UseReqConfig} Effective project configuration.
1855
- - @param[in] activeTools {readonly string[]} Active runtime tool names.
1856
1878
  - @param[in] theme {StatusThemeAdapter} Normalized status theme.
1857
1879
  - @param[in] state {PiUsereqStatusState} Mutable status state snapshot.
1858
1880
  - @param[in] nowMs {number} Current wall-clock time in milliseconds.
1859
1881
  - @return {string} Single-line status-bar text.
1860
- - @satisfies REQ-109, REQ-112, REQ-120, REQ-121, REQ-123, REQ-124, REQ-125, REQ-126, REQ-127, REQ-128, REQ-135, REQ-136, REQ-147, REQ-148, REQ-156
1882
+ - @satisfies REQ-109, REQ-112, REQ-120, REQ-121, REQ-123, REQ-124, REQ-125, REQ-126, REQ-127, REQ-128, REQ-135, REQ-136, REQ-148, REQ-156, REQ-159
1861
1883
 
1862
1884
  ### fn `function stopStatusTicker(controller: PiUsereqStatusController): void` (L491-496)
1863
1885
  - @brief Stops the live elapsed-time ticker when it is active.
@@ -1948,15 +1970,17 @@ limited to interval disposal and in-memory state mutation.
1948
1970
  |`backgroundize`|fn||203-219|const backgroundize = (color: StatusForegroundColor, text...|
1949
1971
  |`normalizeContextUsage`|fn||230-247|function normalizeContextUsage(|
1950
1972
  |`refreshContextUsage`|fn||259-264|function refreshContextUsage(|
1951
- |`countFilledContextCells`|fn||275-283|function countFilledContextCells(|
1952
- |`resolveContextUsageOverlay`|fn||295-314|function resolveContextUsageOverlay(|
1953
- |`formatContextUsageOverlay`|fn||327-335|function formatContextUsageOverlay(|
1954
- |`formatContextUsageBar`|fn||349-361|function formatContextUsageBar(|
1955
- |`formatStatusDuration`|fn||372-377|function formatStatusDuration(durationMs: number): string|
1956
- |`formatStatusField`|fn||388-394|function formatStatusField(|
1957
- |`formatRenderedStatusField`|fn||406-412|function formatRenderedStatusField(|
1958
- |`didAgentEndAbort`|fn||423-430|function didAgentEndAbort(messages: AgentEndEvent["messag...|
1959
- |`buildPiUsereqStatusText`|fn||444-481|function buildPiUsereqStatusText(|
1973
+ |`countFilledContextCells`|fn||277-285|function countFilledContextCells(|
1974
+ |`resolveContextUsageOverlay`|fn||297-316|function resolveContextUsageOverlay(|
1975
+ |`formatContextUsageOverlay`|fn||329-337|function formatContextUsageOverlay(|
1976
+ |`formatContextUsageBar`|fn||351-363|function formatContextUsageBar(|
1977
+ |`formatStatusDuration`|fn||374-379|function formatStatusDuration(durationMs: number): string|
1978
+ |`formatCompletedStatusDuration`|fn||390-394|function formatCompletedStatusDuration(|
1979
+ |`formatElapsedStatusValue`|fn||407-417|function formatElapsedStatusValue(|
1980
+ |`formatStatusField`|fn||428-434|function formatStatusField(|
1981
+ |`formatRenderedStatusField`|fn||446-452|function formatRenderedStatusField(|
1982
+ |`didAgentEndAbort`|fn||463-470|function didAgentEndAbort(messages: AgentEndEvent["messag...|
1983
+ |`buildPiUsereqStatusText`|fn||485-507|function buildPiUsereqStatusText(|
1960
1984
  |`stopStatusTicker`|fn||491-496|function stopStatusTicker(controller: PiUsereqStatusContr...|
1961
1985
  |`syncPiUsereqStatusTicker`|fn||508-524|function syncPiUsereqStatusTicker(|
1962
1986
  |`createPiUsereqStatusController`|fn||535-549|export function createPiUsereqStatusController(|
@@ -3008,17 +3032,17 @@ import { getInstallationPath, RESOURCE_ROOT_DIRNAME } from "./path-context.js";
3008
3032
 
3009
3033
  ---
3010
3034
 
3011
- # runtime-project-paths.ts | TypeScript | 99L | 6 symbols | 4 imports | 7 comments
3035
+ # runtime-project-paths.ts | TypeScript | 70L | 4 symbols | 4 imports | 5 comments
3012
3036
  > Path: `src/core/runtime-project-paths.ts`
3013
- - @brief Derives runtime-only repository and base-path facts.
3014
- - @details Centralizes git-repository probing, repository-root resolution, and base-path-to-git-path formatting for extension status, tool execution, and CLI flows. Runtime is dominated by git subprocess execution plus path normalization. Side effects are limited to subprocess spawning.
3037
+ - @brief Derives runtime-only repository facts.
3038
+ - @details Centralizes git-repository probing and repository-root resolution for extension status, tool execution, and CLI flows. Runtime is dominated by git subprocess execution plus path normalization. Side effects are limited to subprocess spawning.
3015
3039
 
3016
3040
  ## Imports
3017
3041
  ```
3018
3042
  import path from "node:path";
3019
3043
  import { spawnSync } from "node:child_process";
3020
3044
  import { ReqError } from "./errors.js";
3021
- import { isSameOrAncestorPath, normalizePathSlashes } from "./path-context.js";
3045
+ import { isSameOrAncestorPath } from "./path-context.js";
3022
3046
  ```
3023
3047
 
3024
3048
  ## Definitions
@@ -3052,21 +3076,6 @@ import { isSameOrAncestorPath, normalizePathSlashes } from "./path-context.js";
3052
3076
  - @return {string | undefined} Absolute repository-root path or `undefined` when unavailable.
3053
3077
  - @satisfies REQ-105, REQ-145
3054
3078
 
3055
- ### fn `export function formatBasePathRelativeToGitPath(basePath: string, gitPath: string | undefined): string` (L78-88)
3056
- - @brief Formats the runtime `base-path` relative to the runtime `git-path`.
3057
- - @details Returns `.` when the repository root is unavailable or identical to the base path. Otherwise returns the slash-normalized relative path from `git-path` to `base-path`. Runtime is O(p) in path length. No external state is mutated.
3058
- - @param[in] basePath {string} Runtime base path.
3059
- - @param[in] gitPath {string | undefined} Runtime repository root.
3060
- - @return {string} Relative base-path token for status rendering.
3061
- - @satisfies REQ-148
3062
-
3063
- ### fn `export function formatAbsoluteGitPath(gitPath: string | undefined): string` (L97-99)
3064
- - @brief Formats the runtime git path for status rendering.
3065
- - @details Returns a slash-normalized absolute path or an empty string when no repository root is available. Runtime is O(p) in path length. No external state is mutated.
3066
- - @param[in] gitPath {string | undefined} Runtime repository root.
3067
- - @return {string} Absolute repository path or an empty string.
3068
- - @satisfies REQ-147
3069
-
3070
3079
  ## Symbol Index
3071
3080
  |Symbol|Kind|Vis|Lines|Sig|
3072
3081
  |---|---|---|---|---|
@@ -3074,13 +3083,11 @@ import { isSameOrAncestorPath, normalizePathSlashes } from "./path-context.js";
3074
3083
  |`isInsideGitRepo`|fn||33-36|export function isInsideGitRepo(targetPath: string): boolean|
3075
3084
  |`resolveGitRoot`|fn||46-52|export function resolveGitRoot(targetPath: string): string|
3076
3085
  |`resolveRuntimeGitPath`|fn||61-68|export function resolveRuntimeGitPath(executionPath: stri...|
3077
- |`formatBasePathRelativeToGitPath`|fn||78-88|export function formatBasePathRelativeToGitPath(basePath:...|
3078
- |`formatAbsoluteGitPath`|fn||97-99|export function formatAbsoluteGitPath(gitPath: string | u...|
3079
3086
 
3080
3087
 
3081
3088
  ---
3082
3089
 
3083
- # settings-menu.ts | TypeScript | 233L | 11 symbols | 2 imports | 12 comments
3090
+ # settings-menu.ts | TypeScript | 238L | 11 symbols | 2 imports | 12 comments
3084
3091
  > Path: `src/core/settings-menu.ts`
3085
3092
  - @brief Renders pi-usereq configuration menus with the shared pi.dev settings style.
3086
3093
  - @details Wraps `SettingsList` in one extension-command helper that exposes right-aligned current values, built-in circular scrolling, bottom-line descriptions, and a deterministic bridge for offline test harnesses. Runtime is O(n) in visible choice count plus user interaction cost. Side effects are limited to transient custom-UI rendering.
@@ -3093,9 +3100,9 @@ import { Container, SettingsList, Text, type Component, type SettingItem, type S
3093
3100
 
3094
3101
  ## Definitions
3095
3102
 
3096
- ### iface `export interface PiUsereqSettingsMenuChoice` (L14-19)
3103
+ ### iface `export interface PiUsereqSettingsMenuChoice` (L14-20)
3097
3104
  - @brief Describes one selectable pi-usereq settings-menu choice.
3098
- - @details Stores the stable action identifier, left-column label, right-column current value, and bottom-line description consumed by the shared settings-menu renderer. The interface is compile-time only and introduces no runtime cost.
3105
+ - @details Stores the stable action identifier, left-column label, right-column current value, optional value-tone override, and bottom-line description consumed by the shared settings-menu renderer. The interface is compile-time only and introduces no runtime cost.
3099
3106
 
3100
3107
  ### iface `export interface PiUsereqSettingsMenuBridge` (L25-30)
3101
3108
  - @brief Describes the offline bridge exposed by shared settings-menu components.
@@ -3155,9 +3162,10 @@ Runtime is O(n) in title length. No external state is mutated.
3155
3162
  - @param[in] done {(value?: string) => void} Outer custom-UI completion callback.
3156
3163
  - @return {Component} Immediate-completion submenu component.
3157
3164
 
3158
- ### fn `function buildSettingItems(` (L156-167)
3165
+ ### fn `function buildSettingItems(` (L158-172)
3159
3166
  - @brief Builds `SettingsList` items from one menu-choice vector.
3160
- - @details Copies labels, current values, and descriptions into `SettingItem` records and attaches a submenu that resolves the outer custom UI with the selected choice identifier. Runtime is O(n) in choice count. No external state is mutated.
3167
+ - @details Copies labels, current values, value-tone overrides, and descriptions into `SettingItem` records and attaches a submenu that resolves the outer custom UI with the selected choice identifier. Runtime is O(n) in choice count. No external state is mutated.
3168
+ - @param[in] theme {PiUsereqSettingsTheme} Callback-local pi theme adapter.
3161
3169
  - @param[in] choices {PiUsereqSettingsMenuChoice[]} Ordered menu-choice vector.
3162
3170
  - @param[in] done {(value?: string) => void} Outer custom-UI completion callback.
3163
3171
  - @return {SettingItem[]} `SettingsList` item vector.
@@ -3174,7 +3182,7 @@ Runtime is O(n) in title length. No external state is mutated.
3174
3182
  ## Symbol Index
3175
3183
  |Symbol|Kind|Vis|Lines|Sig|
3176
3184
  |---|---|---|---|---|
3177
- |`PiUsereqSettingsMenuChoice`|iface||14-19|export interface PiUsereqSettingsMenuChoice|
3185
+ |`PiUsereqSettingsMenuChoice`|iface||14-20|export interface PiUsereqSettingsMenuChoice|
3178
3186
  |`PiUsereqSettingsMenuBridge`|iface||25-30|export interface PiUsereqSettingsMenuBridge|
3179
3187
  |`PiUsereqSettingsMenuComponent`|iface||36-38|export interface PiUsereqSettingsMenuComponent extends Co...|
3180
3188
  |`PiUsereqSettingsThemeColor`|type||46||
@@ -3183,8 +3191,8 @@ Runtime is O(n) in title length. No external state is mutated.
3183
3191
  |`buildPiUsereqSettingsListTheme`|fn||95-109|function buildPiUsereqSettingsListTheme(|
3184
3192
  |`formatPiUsereqSettingsMenuTitle`|fn||121-126|function formatPiUsereqSettingsMenuTitle(|
3185
3193
  |`createImmediateSelectionComponent`|fn||135-147|function createImmediateSelectionComponent(choiceId: stri...|
3186
- |`buildSettingItems`|fn||156-167|function buildSettingItems(|
3187
- |`showPiUsereqSettingsMenu`|fn||178-233|export async function showPiUsereqSettingsMenu(|
3194
+ |`buildSettingItems`|fn||158-172|function buildSettingItems(|
3195
+ |`showPiUsereqSettingsMenu`|fn||183-238|export async function showPiUsereqSettingsMenu(|
3188
3196
 
3189
3197
 
3190
3198
  ---
@@ -3332,10 +3340,10 @@ import { formatDoxygenFieldsAsMarkdown, parseDoxygenComment } from "./doxygen-pa
3332
3340
 
3333
3341
  ---
3334
3342
 
3335
- # static-check.ts | TypeScript | 674L | 18 symbols | 7 imports | 34 comments
3343
+ # static-check.ts | TypeScript | 538L | 16 symbols | 7 imports | 29 comments
3336
3344
  > Path: `src/core/static-check.ts`
3337
3345
  - @brief Defines static-check language mappings and checker dispatch implementations.
3338
- - @details Parses static-check configuration syntax, resolves file targets, and runs built-in or command-based analyzers such as Pylance and Ruff. Runtime is linear in file count plus external tool cost. Side effects include filesystem reads, PATH probing, process spawning, and console output.
3346
+ - @details Parses Command-only user static-check specifications, preserves debug `Dummy` config handling, resolves file targets, and runs modular dummy or command-based analyzers. Runtime is linear in file count plus external tool cost. Side effects include filesystem reads, PATH probing, process spawning, and console output.
3339
3347
 
3340
3348
  ## Imports
3341
3349
  ```
@@ -3350,39 +3358,44 @@ import { ReqError } from "./errors.js";
3350
3358
 
3351
3359
  ## Definitions
3352
3360
 
3353
- ### iface `export interface StaticCheckLanguageSupport` (L85-88)
3361
+ ### iface `export interface StaticCheckLanguageSupport` (L91-94)
3354
3362
  - @brief Describes supported extensions for one canonical static-check language.
3355
3363
  - @details The interface is used for UI rendering and capability reporting only. It is compile-time only and adds no runtime cost.
3356
3364
 
3357
- ### fn `export function getSupportedStaticCheckLanguages(): string[]` (L106-108)
3365
+ ### fn `export function getSupportedStaticCheckLanguages(): string[]` (L109-111)
3358
3366
  - @brief Returns the sorted list of canonical languages with extension support.
3359
3367
  - @details Deduplicates the extension map values and sorts them alphabetically for stable UI and error messages. Runtime is O(n log n). No side effects occur.
3360
3368
  - @return {string[]} Sorted canonical language names.
3361
3369
 
3362
- ### fn `export function getSupportedStaticCheckLanguageSupport(): StaticCheckLanguageSupport[]` (L115-126)
3370
+ ### fn `export function getSupportedStaticCheckLanguageSupport(): StaticCheckLanguageSupport[]` (L118-129)
3363
3371
  - @brief Returns supported languages paired with their known file extensions.
3364
3372
  - @details Groups extensions by canonical language and emits alphabetically sorted extension lists. Runtime is O(n log n). No external state is mutated.
3365
3373
  - @return {StaticCheckLanguageSupport[]} Sorted language-support descriptors.
3366
3374
 
3367
- ### fn `function formatStaticCheckModules(): string` (L133-135)
3368
- - @brief Formats the supported module list for diagnostics.
3369
- - @details Joins `STATIC_CHECK_MODULES` with commas for direct insertion into error strings. Time complexity is O(n). No side effects occur.
3370
- - @return {string} Comma-delimited module names.
3375
+ ### fn `function formatStaticCheckModules(): string` (L136-138)
3376
+ - @brief Formats the user-configurable module list for diagnostics.
3377
+ - @details Joins `STATIC_CHECK_MODULES` with commas for direct insertion into user-facing error strings. Time complexity is O(n). No side effects occur.
3378
+ - @return {string} Comma-delimited user-configurable module names.
3379
+
3380
+ ### fn `function formatDispatchStaticCheckModules(): string` (L145-147)
3381
+ - @brief Formats the persisted or debug-capable module list for dispatch diagnostics.
3382
+ - @details Joins `STATIC_CHECK_PERSISTED_MODULES` with commas for error strings emitted while executing existing config entries or debug-driver requests. Time complexity is O(n). No side effects occur.
3383
+ - @return {string} Comma-delimited persisted module names.
3371
3384
 
3372
- ### fn `function splitCsvLikeTokens(specRhs: string): string[]` (L143-165)
3385
+ ### fn `function splitCsvLikeTokens(specRhs: string): string[]` (L155-177)
3373
3386
  - @brief Splits a comma-delimited static-check specification while honoring quotes.
3374
3387
  - @details Performs a single pass over the right-hand side of `LANG=...`, preserving commas inside quoted segments. Runtime is O(n). No side effects occur.
3375
3388
  - @param[in] specRhs {string} Right-hand side of the enable-static-check specification.
3376
3389
  - @return {string[]} Parsed tokens with surrounding whitespace trimmed.
3377
3390
 
3378
- ### fn `export function parseEnableStaticCheck(spec: string): [string, StaticCheckEntry]` (L174-222)
3379
- - @brief Parses one `LANG=MODULE[,CMD[,PARAM...]]` static-check specification.
3380
- - @details Validates the language alias, canonicalizes the module name, enforces module-specific argument requirements, and returns a config entry ready for persistence. Runtime is O(n) in specification length. No external state is mutated.
3391
+ ### fn `export function parseEnableStaticCheck(spec: string): [string, StaticCheckEntry]` (L186-234)
3392
+ - @brief Parses one `LANG=Command,CMD[,PARAM...]` static-check specification.
3393
+ - @details Validates the language alias, canonicalizes the Command module name, enforces the required executable argument, and returns a config entry ready for persistence. Runtime is O(n) in specification length. No external state is mutated.
3381
3394
  - @param[in] spec {string} Raw static-check specification string.
3382
3395
  - @return {[string, StaticCheckEntry]} Tuple of canonical language name and normalized checker configuration.
3383
- - @throws {ReqError} Throws for missing separators, unknown languages, unknown modules, or missing required command arguments.
3396
+ - @throws {ReqError} Throws for missing separators, unknown languages, non-Command modules, or missing required command arguments.
3384
3397
 
3385
- ### fn `export function buildStaticCheckEntryIdentity(language: string, entry: StaticCheckEntry): string` (L232-237)
3398
+ ### fn `export function buildStaticCheckEntryIdentity(language: string, entry: StaticCheckEntry): string` (L244-249)
3386
3399
  - @brief Builds the duplicate-identity token for one static-check entry.
3387
3400
  - @details Canonicalizes the language key, module name, command name, and parameter list into a stable JSON tuple used for merge deduplication. Runtime is O(p) in parameter count. No side effects occur.
3388
3401
  - @param[in] language {string} Canonical or alias language name associated with the entry.
@@ -3390,7 +3403,7 @@ import { ReqError } from "./errors.js";
3390
3403
  - @return {string} Stable identity token suitable for equality comparison.
3391
3404
  - @satisfies REQ-036
3392
3405
 
3393
- ### fn `export function validateStaticCheckEntry(entry: StaticCheckEntry): void` (L247-258)
3406
+ ### fn `export function validateStaticCheckEntry(entry: StaticCheckEntry): void` (L259-270)
3394
3407
  - @brief Validates pre-persistence invariants for one static-check entry.
3395
3408
  - @details Rejects `Command` entries whose executable cannot be resolved before config writes while leaving non-command modules untouched. Runtime is O(p) in PATH entry count. Side effects are limited to filesystem reads.
3396
3409
  - @param[in] entry {StaticCheckEntry} Static-check configuration entry to validate.
@@ -3398,32 +3411,18 @@ import { ReqError } from "./errors.js";
3398
3411
  - @throws {ReqError} Throws when a `Command` entry omits `cmd` or resolves to a non-executable program.
3399
3412
  - @satisfies REQ-037
3400
3413
 
3401
- ### fn `function resolveFiles(inputs: string[]): string[]` (L266-290)
3414
+ ### fn `function resolveFiles(inputs: string[]): string[]` (L278-302)
3402
3415
  - @brief Resolves explicit files, directories, and glob patterns into absolute file paths.
3403
3416
  - @details Expands glob inputs with `fast-glob`, enumerates direct children for directory inputs, accepts regular files, and warns for invalid entries. Runtime is O(n + m) where m is the total matched path count. Side effects are filesystem reads and warning output to stderr.
3404
3417
  - @param[in] inputs {string[]} Raw file, directory, or glob inputs.
3405
3418
  - @return {string[]} Unique absolute file paths.
3406
3419
 
3407
- ### class `export class StaticCheckBase` (L296-370)
3408
- - @brief Provides the base implementation for file-oriented static checks.
3409
- - @details Resolves input files once, emits standardized headers, and defines overridable `checkFile` and `emitLine` hooks used by concrete analyzers. Runtime is O(f) plus subclass checker cost. Side effects include console output.
3420
+ ### class `export class StaticCheckBase` (L308-382)
3421
+ - @brief Provides the shared and debug-capable base implementation for file-oriented static checks.
3422
+ - @details Resolves input files once, emits standardized headers, implements the debug `Dummy` checker behavior, and defines overridable `checkFile` plus `emitLine` hooks used by concrete analyzers. Runtime is O(f) plus subclass checker cost. Side effects include console output.
3410
3423
 
3411
- ### fn `function detectPythonExecutable(projectBase?: string): string` (L378-398)
3412
- - @brief Resolves the preferred Python executable for Python-based checkers.
3413
- - @details Checks the project virtual environment first, then `PI_USEREQ_PYTHON`, then `python3`, then `python`, and finally falls back to the literal `python3` string. Runtime is O(c) in candidate count. Side effects are filesystem reads and PATH probing.
3414
- - @param[in] projectBase {string | undefined} Optional project root used to probe `.venv/bin/python`.
3415
- - @return {string} Executable path or command name.
3416
-
3417
- ### class `export class StaticCheckPylance extends StaticCheckBase` : StaticCheckBase (L404-455)
3418
- - @brief Runs Pyright/Pylance checks through the selected Python interpreter.
3419
- - @details Invokes `python -m pyright` for each resolved file and emits standardized OK/FAIL records. Runtime is dominated by external checker execution. Side effects include process spawning and console output.
3420
-
3421
- ### class `export class StaticCheckRuff extends StaticCheckBase` : StaticCheckBase (L461-509)
3422
- - @brief Runs Ruff checks through the selected Python interpreter.
3423
- - @details Invokes `python -m ruff check` for each resolved file and emits standardized OK/FAIL records. Runtime is dominated by external checker execution. Side effects include process spawning and console output.
3424
-
3425
- ### class `export class StaticCheckCommand extends StaticCheckBase` : StaticCheckBase (L515-564)
3426
- - @brief Runs an arbitrary external command as a static checker.
3424
+ ### class `export class StaticCheckCommand extends StaticCheckBase` : StaticCheckBase (L388-437)
3425
+ - @brief Runs the user-facing external-command static checker.
3427
3426
  - @brief Initializes a command-backed checker instance.
3428
3427
  - @details Validates command availability on PATH during construction, then invokes the command with configured extra arguments plus one target file at a time. Runtime is dominated by external command execution. Side effects include PATH probing, process spawning, and console output.
3429
3428
  - @details Validates that the executable exists on PATH before delegating file resolution to the base class and recording the command label. Runtime is O(p + f) where p is PATH entry count and f is resolved input count. Side effects are filesystem reads.
@@ -3433,30 +3432,30 @@ import { ReqError } from "./errors.js";
3433
3432
  - @param[in] failOnly {boolean} When `true`, suppress successful-file output.
3434
3433
  - @throws {ReqError} Throws when the executable cannot be found on PATH.
3435
3434
 
3436
- ### fn `function isExecutableFile(candidate: string): boolean` (L572-582)
3435
+ ### fn `function isExecutableFile(candidate: string): boolean` (L445-455)
3437
3436
  - @brief Tests whether one filesystem path is executable.
3438
3437
  - @details Requires the candidate to exist, be a regular file, and pass `X_OK` access checks. Runtime is O(1). Side effects are limited to filesystem reads.
3439
3438
  - @param[in] candidate {string} Absolute or relative path to inspect.
3440
3439
  - @return {boolean} `true` when the candidate is executable by the current process.
3441
3440
 
3442
- ### fn `function findExecutable(cmd: string): string | undefined` (L590-601)
3441
+ ### fn `function findExecutable(cmd: string): string | undefined` (L463-474)
3443
3442
  - @brief Locates an executable by scanning the current PATH.
3444
3443
  - @details Checks each PATH directory for an executable file named exactly as the requested command. Runtime is O(p) in PATH entry count. Side effects are filesystem reads.
3445
3444
  - @param[in] cmd {string} Executable name to locate.
3446
3445
  - @return {string | undefined} Absolute executable path, or `undefined` when not found.
3447
3446
 
3448
- ### fn `export function dispatchStaticCheckForFile(` (L612-615)
3447
+ ### fn `export function dispatchStaticCheckForFile(` (L485-488)
3449
3448
  - @brief Dispatches one configured static checker for a single file.
3450
- - @details Selects the checker implementation by module name, normalizes parameter arrays, and runs exactly one checker instance against the target file. Runtime is dominated by the selected checker. Side effects include console output and possible process spawning.
3449
+ - @details Selects the debug `Dummy` or user-facing `Command` implementation by module name, normalizes parameter arrays, and runs exactly one checker instance against the target file. Runtime is dominated by the selected checker. Side effects include console output and possible process spawning.
3451
3450
  - @param[in] filePath {string} Absolute or relative file path to check.
3452
3451
  - @param[in] langConfig {StaticCheckEntry} Normalized static-check configuration entry.
3453
3452
  - @param[in] options {{ failOnly?: boolean; projectBase?: string }} Optional execution controls.
3454
3453
  - @return {number} Checker exit status where `0` means success and non-zero means failure.
3455
3454
  - @throws {ReqError} Throws when configuration is incomplete or names an unknown module.
3456
3455
 
3457
- ### fn `export function runStaticCheck(argv: string[]): number` (L649-674)
3456
+ ### fn `export function runStaticCheck(argv: string[]): number` (L517-538)
3458
3457
  - @brief Runs the standalone static-check test driver.
3459
- - @details Dispatches subcommands to the built-in checker implementations without consulting project configuration. Runtime is O(n) in argument count plus checker cost. Side effects include console output and external process spawning.
3458
+ - @details Dispatches debug `dummy` or user-facing `command` subcommands without consulting project configuration. Runtime is O(n) in argument count plus checker cost. Side effects include console output and external process spawning.
3460
3459
  - @param[in] argv {string[]} Raw static-check subcommand arguments.
3461
3460
  - @return {number} Checker exit status where `0` means success.
3462
3461
  - @throws {ReqError} Throws when no subcommand is provided, the subcommand is unknown, or required arguments are missing.
@@ -3464,24 +3463,22 @@ import { ReqError } from "./errors.js";
3464
3463
  ## Symbol Index
3465
3464
  |Symbol|Kind|Vis|Lines|Sig|
3466
3465
  |---|---|---|---|---|
3467
- |`StaticCheckLanguageSupport`|iface||85-88|export interface StaticCheckLanguageSupport|
3468
- |`getSupportedStaticCheckLanguages`|fn||106-108|export function getSupportedStaticCheckLanguages(): string[]|
3469
- |`getSupportedStaticCheckLanguageSupport`|fn||115-126|export function getSupportedStaticCheckLanguageSupport():...|
3470
- |`formatStaticCheckModules`|fn||133-135|function formatStaticCheckModules(): string|
3471
- |`splitCsvLikeTokens`|fn||143-165|function splitCsvLikeTokens(specRhs: string): string[]|
3472
- |`parseEnableStaticCheck`|fn||174-222|export function parseEnableStaticCheck(spec: string): [st...|
3473
- |`buildStaticCheckEntryIdentity`|fn||232-237|export function buildStaticCheckEntryIdentity(language: s...|
3474
- |`validateStaticCheckEntry`|fn||247-258|export function validateStaticCheckEntry(entry: StaticChe...|
3475
- |`resolveFiles`|fn||266-290|function resolveFiles(inputs: string[]): string[]|
3476
- |`StaticCheckBase`|class||296-370|export class StaticCheckBase|
3477
- |`detectPythonExecutable`|fn||378-398|function detectPythonExecutable(projectBase?: string): st...|
3478
- |`StaticCheckPylance`|class||404-455|export class StaticCheckPylance extends StaticCheckBase|
3479
- |`StaticCheckRuff`|class||461-509|export class StaticCheckRuff extends StaticCheckBase|
3480
- |`StaticCheckCommand`|class||515-564|export class StaticCheckCommand extends StaticCheckBase|
3481
- |`isExecutableFile`|fn||572-582|function isExecutableFile(candidate: string): boolean|
3482
- |`findExecutable`|fn||590-601|function findExecutable(cmd: string): string | undefined|
3483
- |`dispatchStaticCheckForFile`|fn||612-615|export function dispatchStaticCheckForFile(|
3484
- |`runStaticCheck`|fn||649-674|export function runStaticCheck(argv: string[]): number|
3466
+ |`StaticCheckLanguageSupport`|iface||91-94|export interface StaticCheckLanguageSupport|
3467
+ |`getSupportedStaticCheckLanguages`|fn||109-111|export function getSupportedStaticCheckLanguages(): string[]|
3468
+ |`getSupportedStaticCheckLanguageSupport`|fn||118-129|export function getSupportedStaticCheckLanguageSupport():...|
3469
+ |`formatStaticCheckModules`|fn||136-138|function formatStaticCheckModules(): string|
3470
+ |`formatDispatchStaticCheckModules`|fn||145-147|function formatDispatchStaticCheckModules(): string|
3471
+ |`splitCsvLikeTokens`|fn||155-177|function splitCsvLikeTokens(specRhs: string): string[]|
3472
+ |`parseEnableStaticCheck`|fn||186-234|export function parseEnableStaticCheck(spec: string): [st...|
3473
+ |`buildStaticCheckEntryIdentity`|fn||244-249|export function buildStaticCheckEntryIdentity(language: s...|
3474
+ |`validateStaticCheckEntry`|fn||259-270|export function validateStaticCheckEntry(entry: StaticChe...|
3475
+ |`resolveFiles`|fn||278-302|function resolveFiles(inputs: string[]): string[]|
3476
+ |`StaticCheckBase`|class||308-382|export class StaticCheckBase|
3477
+ |`StaticCheckCommand`|class||388-437|export class StaticCheckCommand extends StaticCheckBase|
3478
+ |`isExecutableFile`|fn||445-455|function isExecutableFile(candidate: string): boolean|
3479
+ |`findExecutable`|fn||463-474|function findExecutable(cmd: string): string | undefined|
3480
+ |`dispatchStaticCheckForFile`|fn||485-488|export function dispatchStaticCheckForFile(|
3481
+ |`runStaticCheck`|fn||517-538|export function runStaticCheck(argv: string[]): number|
3485
3482
 
3486
3483
 
3487
3484
  ---
@@ -4099,7 +4096,7 @@ import path from "node:path";
4099
4096
 
4100
4097
  ---
4101
4098
 
4102
- # index.ts | TypeScript | 2209L | 50 symbols | 21 imports | 53 comments
4099
+ # index.ts | TypeScript | 2212L | 50 symbols | 21 imports | 53 comments
4103
4100
  > Path: `src/index.ts`
4104
4101
  - @brief Registers the pi-usereq extension commands, tools, and configuration UI.
4105
4102
  - @details Bridges the standalone tool-runner layer into the pi extension API by registering prompt commands, agent tools, and interactive configuration menus. Runtime at module load is O(1); later behavior depends on the selected command or tool. Side effects include extension registration, UI updates, filesystem reads/writes, and delegated tool execution.
@@ -4159,7 +4156,7 @@ cost.
4159
4156
  - @return {UseReqConfig} Effective project configuration.
4160
4157
  - @satisfies REQ-030, REQ-145, REQ-146
4161
4158
 
4162
- ### fn `function saveProjectConfig(cwd: string, config: UseReqConfig): void` (L191-194)
4159
+ ### fn `function saveProjectConfig(cwd: string, config: UseReqConfig): void` (L196-199)
4163
4160
  - @brief Persists project configuration from the extension runtime.
4164
4161
  - @details Resolves the project base, normalizes configured directory paths into project-relative form, and delegates persistence to `saveConfig` without serializing runtime-derived path metadata. Runtime is O(n) in config size. Side effects include config-file writes.
4165
4162
  - @param[in] cwd {string} Current working directory.
@@ -4167,7 +4164,16 @@ cost.
4167
4164
  - @return {void} No return value.
4168
4165
  - @satisfies REQ-146
4169
4166
 
4170
- ### fn `function collectProjectStaticCheckSelection(` (L203-234)
4167
+ ### fn `function formatProjectConfigPathForMenu(cwd: string): string` (L210-212)
4168
+ - @brief Formats the current project config path for top-level menu display.
4169
+ - @details Resolves `<base-path>/.pi-usereq/config.json` from the cwd-derived
4170
+ project base and formats it relative to the user home when possible. Runtime
4171
+ is O(p) in path length. No external state is mutated.
4172
+ - @param[in] cwd {string} Current working directory.
4173
+ - @return {string} User-home-relative or absolute config path display value.
4174
+ - @satisfies REQ-162
4175
+
4176
+ ### fn `function collectProjectStaticCheckSelection(` (L221-252)
4171
4177
  - @brief Collects the project-scoped static-check selection used by the agent tool.
4172
4178
  - @details Resolves configured source plus test directories, reuses the same fixture-root exclusions as `runProjectStaticCheck`, and returns canonical relative file paths for structured payload emission. Runtime is O(F) plus project file-discovery cost. Side effects are limited to filesystem reads and git subprocesses delegated through `collectSourceFiles`.
4173
4179
  - @param[in] projectBase {string} Resolved project base path.
@@ -4403,51 +4409,46 @@ updates.
4403
4409
  - @param[in] config {UseReqConfig} Effective project configuration.
4404
4410
  - @return {string} Compact summary string or `(none)`.
4405
4411
 
4406
- ### fn `function renderStaticCheckReference(config: UseReqConfig): string` (L1728-1749)
4412
+ ### fn `function renderStaticCheckReference(config: UseReqConfig): string` (L1728-1756)
4407
4413
  - @brief Renders the static-check configuration reference view.
4408
- - @details Produces a markdown-like summary containing configured entries, supported languages, supported modules, and example specifications. Runtime is O(l log l). No side effects occur.
4414
+ - @details Produces a markdown-like summary containing configured entries, supported languages, the Command-only user module surface, and canonical example specifications. Runtime is O(l log l). No side effects occur.
4409
4415
  - @param[in] config {UseReqConfig} Effective project configuration.
4410
4416
  - @return {string} Reference text for the editor view.
4411
4417
 
4412
- ### fn `function buildStaticCheckMenuChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L1758-1793)
4418
+ ### fn `function buildStaticCheckMenuChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L1765-1800)
4413
4419
  - @brief Builds the shared settings-menu choices for static-check management.
4414
- - @details Serializes static-check actions into right-valued menu rows consumed by the shared settings-menu renderer. Runtime is O(1). No external state is mutated.
4420
+ - @details Serializes Command-oriented static-check actions into right-valued menu rows consumed by the shared settings-menu renderer while omitting user-facing module selection. Runtime is O(1). No external state is mutated.
4415
4421
  - @param[in] config {UseReqConfig} Effective project configuration.
4416
4422
  - @return {PiUsereqSettingsMenuChoice[]} Ordered static-check menu choices.
4417
- - @satisfies REQ-008, REQ-151, REQ-152, REQ-153, REQ-154
4423
+ - @satisfies REQ-008, REQ-160, REQ-161, REQ-151, REQ-152, REQ-153, REQ-154
4418
4424
 
4419
- ### fn `function buildSupportedStaticCheckLanguageChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L1801-1820)
4425
+ ### fn `function buildSupportedStaticCheckLanguageChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L1808-1827)
4420
4426
  - @brief Builds the shared settings-menu choices for supported static-check languages.
4421
- - @details Exposes every supported language as one row whose right-side value reports extensions plus the current configured checker count. Runtime is O(l log l). No external state is mutated.
4427
+ - @details Exposes every supported language as one row whose right-side value reports extensions plus the current configured checker count for Command-oriented configuration flows. Runtime is O(l log l). No external state is mutated.
4422
4428
  - @param[in] config {UseReqConfig} Effective project configuration.
4423
4429
  - @return {PiUsereqSettingsMenuChoice[]} Ordered language-choice vector.
4424
4430
 
4425
- ### fn `function buildStaticCheckModuleChoices(language: string): PiUsereqSettingsMenuChoice[]` (L1828-1845)
4426
- - @brief Builds the shared settings-menu choices for static-check modules.
4427
- - @details Exposes every supported static-check module as one selectable row with a concise execution description. Runtime is O(m) in module count. No external state is mutated.
4428
- - @param[in] language {string} Canonical selected language.
4429
- - @return {PiUsereqSettingsMenuChoice[]} Ordered module-choice vector.
4430
-
4431
- ### fn `function buildConfiguredStaticCheckLanguageChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L1853-1870)
4431
+ ### fn `function buildConfiguredStaticCheckLanguageChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L1835-1852)
4432
4432
  - @brief Builds the shared settings-menu choices for configured static-check languages.
4433
4433
  - @details Exposes only languages that currently have at least one configured checker so removal remains deterministic. Runtime is O(l log l). No external state is mutated.
4434
4434
  - @param[in] config {UseReqConfig} Effective project configuration.
4435
4435
  - @return {PiUsereqSettingsMenuChoice[]} Ordered configured-language vector.
4436
4436
 
4437
- ### fn `async function configureStaticCheckMenu(ctx: ExtensionCommandContext, config: UseReqConfig): Promise<void>` (L1880-1953)
4437
+ ### fn `async function configureStaticCheckMenu(ctx: ExtensionCommandContext, config: UseReqConfig): Promise<void>` (L1862-1928)
4438
4438
  - @brief Runs the interactive static-check configuration menu.
4439
- - @details Lets the user inspect support, add entries by guided prompts or raw spec strings, and remove configured language entries through the shared settings-menu renderer until the user exits. Runtime depends on user interaction count. Side effects include UI updates and config mutation.
4439
+ - @details Lets the user inspect support, add Command entries by guided prompts or raw spec strings, and remove configured language entries through the shared settings-menu renderer until the user exits. Runtime depends on user interaction count. Side effects include UI updates and config mutation.
4440
4440
  - @param[in] ctx {ExtensionCommandContext} Active command context.
4441
4441
  - @param[in,out] config {UseReqConfig} Mutable configuration object.
4442
4442
  - @return {Promise<void>} Promise resolved when the menu closes.
4443
- - @satisfies REQ-008, REQ-151, REQ-152, REQ-153, REQ-154
4443
+ - @satisfies REQ-008, REQ-160, REQ-161, REQ-151, REQ-152, REQ-153, REQ-154
4444
4444
 
4445
- ### fn `function buildPiUsereqMenuChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L1962-2019)
4445
+ ### fn `function buildPiUsereqMenuChoices(` (L1956-2017)
4446
4446
  - @brief Builds the shared settings-menu choices for the top-level pi-usereq configuration UI.
4447
- - @details Serializes primary configuration actions into right-valued menu rows consumed by the shared settings-menu renderer. Runtime is O(s) in source-directory count. No external state is mutated.
4447
+ - @details Serializes primary configuration actions into right-valued menu rows consumed by the shared settings-menu renderer, including the display-only config path beside `show-config`. Runtime is O(s) in source-directory count. No external state is mutated.
4448
+ - @param[in] cwd {string} Current working directory.
4448
4449
  - @param[in] config {UseReqConfig} Effective project configuration.
4449
4450
  - @return {PiUsereqSettingsMenuChoice[]} Ordered top-level menu choices.
4450
- - @satisfies REQ-006, REQ-031, REQ-137, REQ-150, REQ-151, REQ-152
4451
+ - @satisfies REQ-006, REQ-031, REQ-137, REQ-150, REQ-151, REQ-152, REQ-162
4451
4452
 
4452
4453
  ### fn `function buildSrcDirMenuChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L2028-2049)
4453
4454
  - @brief Builds the shared settings-menu choices for source-directory management.
@@ -4463,14 +4464,14 @@ updates.
4463
4464
  - @return {PiUsereqSettingsMenuChoice[]} Ordered removable source-directory choices.
4464
4465
  - @satisfies REQ-006, REQ-151, REQ-152, REQ-153, REQ-154
4465
4466
 
4466
- ### fn `async function configurePiUsereq(` (L2084-2165)
4467
+ ### fn `async function configurePiUsereq(` (L2082-2167)
4467
4468
  - @brief Runs the top-level pi-usereq configuration menu.
4468
- - @details Loads project config, exposes docs/test/source/static-check/startup-tool/notification actions through the shared settings-menu renderer, persists changes on exit, and refreshes the single-line status bar. Runtime depends on user interaction count. Side effects include UI updates, config writes, and active-tool changes.
4469
+ - @details Loads project config, exposes docs/test/source/static-check/startup-tool/notification actions through the shared settings-menu renderer, persists changes on exit, and refreshes the single-line status bar. Runtime depends on user interaction count. Side effects include UI updates, config writes, active-tool changes, and editor text updates.
4469
4470
  - @param[in] pi {ExtensionAPI} Active extension API instance.
4470
4471
  - @param[in] ctx {ExtensionCommandContext} Active command context.
4471
4472
  - @param[in,out] statusController {PiUsereqStatusController} Mutable status controller.
4472
4473
  - @return {Promise<void>} Promise resolved when configuration is saved and the menu closes.
4473
- - @satisfies REQ-006, REQ-031, REQ-137, REQ-150, REQ-151, REQ-152, REQ-153, REQ-154
4474
+ - @satisfies REQ-006, REQ-031, REQ-137, REQ-150, REQ-151, REQ-152, REQ-153, REQ-154, REQ-162
4474
4475
 
4475
4476
  ### fn `const ensureSaved = () => saveProjectConfig(ctx.cwd, config)` (L2092-2096)
4476
4477
 
@@ -4490,13 +4491,14 @@ updates.
4490
4491
  configuration commands plus agent tools, registers the configurable
4491
4492
  successful-run sound shortcut when the runtime supports shortcuts, and
4492
4493
  installs shared wrappers for all supported pi lifecycle hooks so status
4493
- telemetry, context usage, prompt timing, and pi-notify effects remain
4494
- synchronized with runtime events. Runtime is O(h) in hook count during
4495
- registration. Side effects include filesystem reads, command/tool/shortcut
4496
- registration, UI updates, active-tool changes, and timer scheduling.
4494
+ telemetry, context usage, prompt timing, cumulative runtime, and pi-notify
4495
+ effects remain synchronized with runtime events. Runtime is O(h) in hook
4496
+ count during registration. Side effects include filesystem reads,
4497
+ command/tool/shortcut registration, UI updates, active-tool changes, and
4498
+ timer scheduling.
4497
4499
  - @param[in] pi {ExtensionAPI} Active extension API instance.
4498
4500
  - @return {void} No return value.
4499
- - @satisfies DES-002, REQ-004, REQ-005, REQ-009, REQ-044, REQ-045, REQ-067, REQ-068, REQ-109, REQ-110, REQ-111, REQ-112, REQ-113, REQ-114, REQ-115, REQ-116, REQ-117, REQ-118, REQ-119, REQ-120, REQ-121, REQ-122, REQ-123, REQ-124, REQ-125, REQ-126, REQ-129, REQ-130, REQ-131, REQ-132, REQ-133, REQ-134, REQ-135, REQ-136, REQ-137
4501
+ - @satisfies DES-002, REQ-004, REQ-005, REQ-009, REQ-044, REQ-045, REQ-067, REQ-068, REQ-109, REQ-111, REQ-112, REQ-113, REQ-114, REQ-115, REQ-116, REQ-117, REQ-118, REQ-119, REQ-120, REQ-121, REQ-122, REQ-123, REQ-124, REQ-125, REQ-126, REQ-129, REQ-130, REQ-131, REQ-132, REQ-133, REQ-134, REQ-135, REQ-136, REQ-137, REQ-148, REQ-159
4500
4502
 
4501
4503
  ## Symbol Index
4502
4504
  |Symbol|Kind|Vis|Lines|Sig|
@@ -4505,8 +4507,9 @@ registration, UI updates, active-tool changes, and timer scheduling.
4505
4507
  |`getProjectBase`|fn||153-155|function getProjectBase(cwd: string): string|
4506
4508
  |`buildSharedRuntimePathFacts`|fn||165-169|function buildSharedRuntimePathFacts(cwd: string, config:...|
4507
4509
  |`loadProjectConfig`|fn||178-181|function loadProjectConfig(cwd: string): UseReqConfig|
4508
- |`saveProjectConfig`|fn||191-194|function saveProjectConfig(cwd: string, config: UseReqCon...|
4509
- |`collectProjectStaticCheckSelection`|fn||203-234|function collectProjectStaticCheckSelection(|
4510
+ |`saveProjectConfig`|fn||196-199|function saveProjectConfig(cwd: string, config: UseReqCon...|
4511
+ |`formatProjectConfigPathForMenu`|fn||210-212|function formatProjectConfigPathForMenu(cwd: string): st...|
4512
+ |`collectProjectStaticCheckSelection`|fn||221-252|function collectProjectStaticCheckSelection(|
4510
4513
  |`buildTokenToolExecutionStderr`|fn||242-248|function buildTokenToolExecutionStderr(payload: TokenTool...|
4511
4514
  |`buildTokenToolExecuteResult`|fn||257-274|function buildTokenToolExecuteResult(|
4512
4515
  |`buildReferenceToolExecuteResult`|fn||283-300|function buildReferenceToolExecuteResult(|
@@ -4537,18 +4540,52 @@ registration, UI updates, active-tool changes, and timer scheduling.
4537
4540
  |`configurePiUsereqToolsMenu`|fn||1641-1692|async function configurePiUsereqToolsMenu(pi: ExtensionAP...|
4538
4541
  |`formatStaticCheckEntry`|fn||1700-1706|function formatStaticCheckEntry(entry: StaticCheckEntry):...|
4539
4542
  |`formatStaticCheckLanguagesSummary`|fn||1714-1720|function formatStaticCheckLanguagesSummary(config: UseReq...|
4540
- |`renderStaticCheckReference`|fn||1728-1749|function renderStaticCheckReference(config: UseReqConfig)...|
4541
- |`buildStaticCheckMenuChoices`|fn||1758-1793|function buildStaticCheckMenuChoices(config: UseReqConfig...|
4542
- |`buildSupportedStaticCheckLanguageChoices`|fn||1801-1820|function buildSupportedStaticCheckLanguageChoices(config:...|
4543
- |`buildStaticCheckModuleChoices`|fn||1828-1845|function buildStaticCheckModuleChoices(language: string):...|
4544
- |`buildConfiguredStaticCheckLanguageChoices`|fn||1853-1870|function buildConfiguredStaticCheckLanguageChoices(config...|
4545
- |`configureStaticCheckMenu`|fn||1880-1953|async function configureStaticCheckMenu(ctx: ExtensionCom...|
4546
- |`buildPiUsereqMenuChoices`|fn||1962-2019|function buildPiUsereqMenuChoices(config: UseReqConfig): ...|
4543
+ |`renderStaticCheckReference`|fn||1728-1756|function renderStaticCheckReference(config: UseReqConfig)...|
4544
+ |`buildStaticCheckMenuChoices`|fn||1765-1800|function buildStaticCheckMenuChoices(config: UseReqConfig...|
4545
+ |`buildSupportedStaticCheckLanguageChoices`|fn||1808-1827|function buildSupportedStaticCheckLanguageChoices(config:...|
4546
+ |`buildConfiguredStaticCheckLanguageChoices`|fn||1835-1852|function buildConfiguredStaticCheckLanguageChoices(config...|
4547
+ |`configureStaticCheckMenu`|fn||1862-1928|async function configureStaticCheckMenu(ctx: ExtensionCom...|
4548
+ |`buildPiUsereqMenuChoices`|fn||1956-2017|function buildPiUsereqMenuChoices(|
4547
4549
  |`buildSrcDirMenuChoices`|fn||2028-2049|function buildSrcDirMenuChoices(config: UseReqConfig): Pi...|
4548
4550
  |`buildSrcDirRemovalChoices`|fn||2058-2073|function buildSrcDirRemovalChoices(config: UseReqConfig):...|
4549
- |`configurePiUsereq`|fn||2084-2165|async function configurePiUsereq(|
4551
+ |`configurePiUsereq`|fn||2082-2167|async function configurePiUsereq(|
4550
4552
  |`ensureSaved`|fn||2092-2096|const ensureSaved = () => saveProjectConfig(ctx.cwd, config)|
4551
4553
  |`refreshStatus`|fn||2093-2096|const refreshStatus = () =>|
4552
- |`registerConfigCommands`|fn||2175-2185|function registerConfigCommands(|
4553
- |`piUsereqExtension`|fn||2201-2209|export default function piUsereqExtension(pi: ExtensionAP...|
4554
+ |`registerConfigCommands`|fn||2177-2187|function registerConfigCommands(|
4555
+ |`piUsereqExtension`|fn||2204-2212|export default function piUsereqExtension(pi: ExtensionAP...|
4556
+
4557
+ ## Delta Update 2026-04-19
4558
+
4559
+ ### Updated File: `src/core/config.ts`
4560
+ - `UseReqConfig` [`src/core/config.ts`]: persisted Pushover fields `notify-pushover-global-disable`, `notify-pushover-on-success`, `notify-pushover-user-key`, `notify-pushover-api-token`, and `notify-pushover-priority` extend the project configuration schema (lines 44-63).
4561
+ - `getDefaultConfig(...)` [`src/core/config.ts`]: default Pushover values are `false`, `false`, `""`, `""`, and `0` (lines 98-119).
4562
+ - `loadConfig(...)` [`src/core/config.ts`]: persisted Pushover fields are normalized during config load (lines 129-189).
4563
+ - `buildPersistedConfig(...)` [`src/core/config.ts`]: Pushover fields are serialized together with existing notification settings (lines 198-228).
4564
+
4565
+ ### Updated File: `src/core/extension-status.ts`
4566
+ - `PiUsereqPromptRequest` [`src/core/extension-status.ts`]: prompt command name and raw `%%ARGS%%` payload tracked across command delivery and runtime execution (lines 120-123).
4567
+ - `PiUsereqStatusState` [`src/core/extension-status.ts`]: pending and active prompt-request state extends timer telemetry (lines 129-136).
4568
+ - `buildPiUsereqStatusText(...)` [`src/core/extension-status.ts`]: status bar now renders `pushover` after `sound` (lines 490-514).
4569
+ - `updateExtensionStatus(...)` [`src/core/extension-status.ts`]: `agent_start` promotes pending prompt metadata into the active run, and shutdown clears prompt-request state (lines 645-680).
4570
+
4571
+ ### Updated File: `src/core/pi-notify.ts`
4572
+ - `PiNotifyPushoverPriority` [`src/core/pi-notify.ts`]: canonical `0|1` Pushover priority type (line 75).
4573
+ - `PiNotifyPushoverRequest` [`src/core/pi-notify.ts`]: successful prompt payload for Pushover delivery (lines 81-86).
4574
+ - `PiNotifyConfigFields` [`src/core/pi-notify.ts`]: notification config surface now includes Pushover flags, credentials, and priority (line 92).
4575
+ - `normalizePiNotifyPushoverCredential(...)` [`src/core/pi-notify.ts`]: credential normalization for user key and API token (lines 160-162).
4576
+ - `normalizePiNotifyPushoverPriority(...)` [`src/core/pi-notify.ts`]: priority normalization for persisted `0|1` values (lines 171-173).
4577
+ - `formatPiNotifyPushoverStatus(...)` [`src/core/pi-notify.ts`]: footer serialization for the dedicated Pushover enable flag (lines 203-205).
4578
+ - `setPiNotifyHttpsRequestForTests(...)` [`src/core/pi-notify.ts`]: deterministic HTTPS transport override for unit tests (lines 505-507).
4579
+ - `runPiNotifyEffects(...)` [`src/core/pi-notify.ts`]: successful-run routing now includes optional native Pushover delivery after sound execution (lines 590-617).
4580
+
4581
+ ### Updated File: `src/index.ts`
4582
+ - `handleExtensionStatusEvent(...)` [`src/index.ts`]: `agent_end` builds prompt-specific Pushover request metadata and dispatches it through `runPiNotifyEffects(...)` (lines 578-614).
4583
+ - `formatPiNotifyPushoverPriority(...)` [`src/index.ts`]: menu-value formatter for `0=Normal` and `1=High Priority` (lines 722-724).
4584
+ - `buildPiNotifyPushoverMenuChoices(...)` [`src/index.ts`]: nested Pushover menu rows for global disable, enable, credentials, and priority (lines 733-772).
4585
+ - `selectPiNotifyPushoverPriority(...)` [`src/index.ts`]: shared selector for Pushover priority (lines 782-804).
4586
+ - `configurePiNotifyPushoverMenu(...)` [`src/index.ts`]: interactive nested Pushover configuration menu (lines 814-863).
4587
+ - `buildPiNotifyMenuChoices(...)` [`src/index.ts`]: notifications menu now exposes the `Pushover notifications` submenu after the sound-command rows (lines 872-935).
4588
+ - `configurePiNotifyMenu(...)` [`src/index.ts`]: notifications menu routes the nested Pushover editor (lines 986-1055).
4589
+ - `registerPromptCommands(...)` [`src/index.ts`]: each bundled prompt command stores pending prompt metadata before rendering and dispatch (lines 1100-1120).
4590
+ - `piUsereqExtension(...)` [`src/index.ts`]: prompt registration now receives the shared status controller so successful prompt metadata survives until `agent_end` (lines 2396-2404).
4554
4591