pi-usereq 0.40.0 → 0.42.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.
@@ -633,7 +633,7 @@ import { makeRelativeIfContainsProject } from "./utils.js";
633
633
 
634
634
  ### fn `export function normalizeContextFilesFlag(value: unknown): boolean` (L229-231)
635
635
  - @brief Normalizes one persisted context-file injection flag.
636
- - @details Returns the documented default (`true`) for missing or non-boolean values and preserves only explicit boolean input, so any malformed persisted entry keeps context-file injection enabled. Runtime is O(1). No external state is mutated.
636
+ - @details Returns the documented default (`false`) for missing or non-boolean values and preserves only explicit boolean input, so any malformed persisted entry keeps context-file injection disabled. Runtime is O(1). No external state is mutated.
637
637
  - @param[in] value {unknown} Candidate persisted context-file flag.
638
638
  - @return {boolean} Normalized context-file injection flag.
639
639
  - @satisfies REQ-328
@@ -2763,7 +2763,7 @@ import type { UseReqConfig } from "./config.js";
2763
2763
  ```
2764
2764
  import fs from "node:fs";
2765
2765
  import path from "node:path";
2766
- import { spawnSync } from "node:child_process";
2766
+ import { spawnSync, type SpawnSyncReturns } from "node:child_process";
2767
2767
  import { ReqError } from "./errors.js";
2768
2768
  import { classifyPiNotifyOutcome, type PiNotifyOutcome } from "./pi-notify.js";
2769
2769
  import {
@@ -2777,40 +2777,40 @@ import {
2777
2777
 
2778
2778
  ## Definitions
2779
2779
 
2780
- ### iface `export interface PromptRequiredDocSpec` (L42-45)
2780
+ ### iface `export interface PromptRequiredDocSpec` (L43-46)
2781
2781
  - @brief Describes one canonical required-document probe.
2782
2782
  - @details Binds a canonical doc filename to the remediation prompt command surfaced on failure so prompt-specific doc validation can stay deterministic. The interface is compile-time only and introduces no runtime cost.
2783
2783
 
2784
- ### iface `export interface PromptCommandExecutionPlan` (L51-65)
2784
+ ### iface `export interface PromptCommandExecutionPlan` (L52-66)
2785
2785
  - @brief Describes one prompt-command execution plan tracked across lifecycle hooks.
2786
2786
  - @details Stores the prompt identity, runtime git root, associated branch name, original project base, execution context path, persisted origin and execution session files, and optional worktree metadata so the extension can switch all cwd surfaces before prompt dispatch and finalize worktree lifecycle after agent end. The interface is compile-time only and introduces no runtime cost.
2787
2787
 
2788
- ### iface `interface PromptCommandPostCreateHookContext` (L71-76)
2788
+ ### iface `interface PromptCommandPostCreateHookContext` (L72-77)
2789
2789
  - @brief Describes one post-create test hook payload for prompt-command worktrees.
2790
2790
  - @details Exposes the git root, generated worktree name, sibling worktree path, and effective execution base so tests can simulate post-create verification failures deterministically. The interface is compile-time only and introduces no runtime cost.
2791
2791
 
2792
- - type `type PromptCommandPostCreateHook = (context: PromptCommandPostCreateHookContext) => void;` (L82)
2792
+ - type `type PromptCommandPostCreateHook = (context: PromptCommandPostCreateHookContext) => void;` (L83)
2793
2793
  - @brief Represents one synchronous test hook invoked after prompt worktree creation.
2794
2794
  - @details Allows tests to mutate or remove newly created worktree artifacts before verification executes. The alias is compile-time only and introduces no runtime cost.
2795
- ### iface `interface PromptCommandDebugOptions` (L88-91)
2795
+ ### iface `interface PromptCommandDebugOptions` (L89-92)
2796
2796
  - @brief Describes optional debug logging context for prompt orchestration helpers.
2797
2797
  - @details Carries the effective project configuration and current workflow state so prompt-runtime helpers can append selected debug entries without depending on extension UI types. The interface is compile-time only and introduces no runtime cost.
2798
2798
 
2799
- ### iface `interface PromptCommandSessionMessageOptions` (L97-99)
2799
+ ### iface `interface PromptCommandSessionMessageOptions` (L98-100)
2800
2800
  - @brief Describes prompt-delivery options supported by replacement-session callbacks.
2801
2801
  - @details Mirrors the documented `sendUserMessage(...)` delivery modes needed when prompt orchestration targets a replacement session after a slash-command-owned session switch. The interface is compile-time only and introduces no runtime cost.
2802
2802
 
2803
- ### iface `interface PromptCommandSessionSwitchOptions` (L105-107)
2803
+ ### iface `interface PromptCommandSessionSwitchOptions` (L106-108)
2804
2804
  - @brief Describes the replacement-session callback options accepted by session switching.
2805
2805
  - @details Mirrors the documented pi runtime `withSession(...)` hook so prompt-command orchestration can continue work against the replacement session after the old command context becomes stale. The interface is compile-time only and introduces no runtime cost.
2806
2806
 
2807
- ### iface `interface PromptCommandActiveContext extends PromptCommandSessionContext` : PromptCommandSessionContext (L113-118)
2807
+ ### iface `interface PromptCommandActiveContext extends PromptCommandSessionContext` : PromptCommandSessionContext (L114-119)
2808
2808
  - @brief Describes the minimal session-bound surface available after session replacement.
2809
2809
  - @details Extends the shared prompt-command context with `sendUserMessage(...)` so prompt dispatch can target the replacement session without reusing stale pre-switch runtime objects. The interface is compile-time only and introduces no runtime cost.
2810
2810
 
2811
- ### iface `interface PromptCommandSessionEntry` (L124-130)
2811
+ ### iface `interface PromptCommandSessionEntry` (L125-130)
2812
2812
  - @brief Describes one serializable session entry copied into a materialized execution-session file.
2813
- - @details Captures the stable tree-entry fields needed to write a JSONL session snapshot for cross-cwd session replacement when the origin session file has not been flushed yet. The interface is compile-time only and introduces no runtime cost.
2813
+ - @details Captures the stable tree-entry fields needed to write a JSONL session snapshot for cross-cwd session replacement when the origin session file has not been flushed yet. Mirrors the SDK `SessionEntryBase` shape without an index signature so the SDK `SessionEntry` union remains structurally assignable for passthrough serialization. The interface is compile-time only and introduces no runtime cost.
2814
2814
 
2815
2815
  ### iface `interface PromptCommandSessionContext` (L136-148)
2816
2816
  - @brief Describes the minimal command-context session surface used by prompt orchestration.
@@ -2962,12 +2962,12 @@ import {
2962
2962
  - @param[in] error {unknown} Thrown value.
2963
2963
  - @return {PromptCommandSessionContext | undefined} Attached prompt-command context when available.
2964
2964
 
2965
- ### fn `function runCapture(command: string[], cwd: string): ReturnType<typeof spawnSync>` (L845-850)
2965
+ ### fn `function runCapture(command: string[], cwd: string): SpawnSyncReturns<string>` (L845-850)
2966
2966
  - @brief Executes one git subprocess synchronously and captures UTF-8 output.
2967
2967
  - @details Delegates to `spawnSync`, preserves the supplied working directory, and returns the raw subprocess result used by prompt-command orchestration. Runtime is dominated by external process execution. Side effects include process spawning.
2968
2968
  - @param[in] command {string[]} Executable plus argument vector.
2969
2969
  - @param[in] cwd {string} Working directory for the subprocess.
2970
- - @return {ReturnType<typeof spawnSync>} Captured subprocess result.
2970
+ - @return {SpawnSyncReturns<string>} Captured subprocess result with UTF-8 decoded stdout and stderr.
2971
2971
 
2972
2972
  ### fn `function listPromptTrackedBasePathChanges(basePath: string): string[]` (L860-878)
2973
2973
  - @brief Lists tracked `base-path` status rows that require stash-assisted merge handling.
@@ -3183,15 +3183,15 @@ import {
3183
3183
  ## Symbol Index
3184
3184
  |Symbol|Kind|Vis|Lines|Sig|
3185
3185
  |---|---|---|---|---|
3186
- |`PromptRequiredDocSpec`|iface||42-45|export interface PromptRequiredDocSpec|
3187
- |`PromptCommandExecutionPlan`|iface||51-65|export interface PromptCommandExecutionPlan|
3188
- |`PromptCommandPostCreateHookContext`|iface||71-76|interface PromptCommandPostCreateHookContext|
3189
- |`PromptCommandPostCreateHook`|type||82||
3190
- |`PromptCommandDebugOptions`|iface||88-91|interface PromptCommandDebugOptions|
3191
- |`PromptCommandSessionMessageOptions`|iface||97-99|interface PromptCommandSessionMessageOptions|
3192
- |`PromptCommandSessionSwitchOptions`|iface||105-107|interface PromptCommandSessionSwitchOptions|
3193
- |`PromptCommandActiveContext`|iface||113-118|interface PromptCommandActiveContext extends PromptComman...|
3194
- |`PromptCommandSessionEntry`|iface||124-130|interface PromptCommandSessionEntry|
3186
+ |`PromptRequiredDocSpec`|iface||43-46|export interface PromptRequiredDocSpec|
3187
+ |`PromptCommandExecutionPlan`|iface||52-66|export interface PromptCommandExecutionPlan|
3188
+ |`PromptCommandPostCreateHookContext`|iface||72-77|interface PromptCommandPostCreateHookContext|
3189
+ |`PromptCommandPostCreateHook`|type||83||
3190
+ |`PromptCommandDebugOptions`|iface||89-92|interface PromptCommandDebugOptions|
3191
+ |`PromptCommandSessionMessageOptions`|iface||98-100|interface PromptCommandSessionMessageOptions|
3192
+ |`PromptCommandSessionSwitchOptions`|iface||106-108|interface PromptCommandSessionSwitchOptions|
3193
+ |`PromptCommandActiveContext`|iface||114-119|interface PromptCommandActiveContext extends PromptComman...|
3194
+ |`PromptCommandSessionEntry`|iface||125-130|interface PromptCommandSessionEntry|
3195
3195
  |`PromptCommandSessionContext`|iface||136-148|interface PromptCommandSessionContext|
3196
3196
  |`PromptCommandContextError`|iface||154-156|interface PromptCommandContextError extends Error|
3197
3197
  |`isUsablePromptSessionFile`|fn||171-189|function isUsablePromptSessionFile(|
@@ -3212,7 +3212,7 @@ import {
3212
3212
  |`isPromptCommandStaleContextError`|fn||733-736|function isPromptCommandStaleContextError(error: unknown)...|
3213
3213
  |`attachPromptCommandErrorContext`|fn||745-753|function attachPromptCommandErrorContext(|
3214
3214
  |`getPromptCommandErrorContext`|fn||761-767|export function getPromptCommandErrorContext(|
3215
- |`runCapture`|fn||845-850|function runCapture(command: string[], cwd: string): Retu...|
3215
+ |`runCapture`|fn||845-850|function runCapture(command: string[], cwd: string): Spaw...|
3216
3216
  |`listPromptTrackedBasePathChanges`|fn||860-878|function listPromptTrackedBasePathChanges(basePath: strin...|
3217
3217
  |`finalizePromptCommandMerge`|fn||888-1010|function finalizePromptCommandMerge(|
3218
3218
  |`setPromptCommandPostCreateHookForTests`|fn||1018-1022|export function setPromptCommandPostCreateHookForTests(|
@@ -3444,12 +3444,12 @@ import { readBundledInstruction, readBundledPrompt } from "./resources.js";
3444
3444
 
3445
3445
  ### fn `export function renderPromptCommandSummary(` (L385-425)
3446
3446
  - @brief Builds the on-screen command invocation summary for one bundled prompt-backed `req-<prompt>` command.
3447
- - @details Renders the command name without the `req-` prefix in uppercase, the user request arguments, and the active configuration fields (`docs-dir`, `src-dir`, `tests-dir`, enabled context files, `AUTO_GIT_COMMIT`, effective `GIT_WORKTREE_ENABLED`, `GIT_WORKTREE_PREFIX`, enabled static-check languages, and `enabled-tools`) so the TUI shows only a compact summary while the full rendered prompt is delivered hidden to the LLM agent. Static-check languages are emitted in canonical `DEFAULT_STATIC_CHECK_LANGUAGES` order; enabled tools are emitted in documented menu order via `comparePiUsereqStartupToolNames`. Runtime is O(l + t log t) where l is language count and t is enabled-tool count. No external state is mutated.
3447
+ - @details Renders the command name without the `req-` prefix in uppercase, the user request arguments, and the active configuration fields (`docs-dir`, `src-dir`, `tests-dir`, enabled context files, `AUTO_GIT_COMMIT`, effective `GIT_WORKTREE_ENABLED`, `GIT_WORKTREE_PREFIX`, enabled static-check languages, and `enabled-tools`) so the TUI shows only a compact summary while the full rendered prompt is delivered hidden to the LLM agent. Static-check languages are emitted in canonical `DEFAULT_STATIC_CHECK_LANGUAGES` order; enabled tools are emitted in documented menu order via `comparePiUsereqStartupToolNames`. The `context files`, `static code checks`, and `enabled tools` fields render the literal `none` placeholder whenever their respective enabled-item list is empty so the summary never shows a blank value. Runtime is O(l + t log t) where l is language count and t is enabled-tool count. No external state is mutated.
3448
3448
  - @param[in] promptName {string} Bundled prompt name without the `req-` prefix.
3449
3449
  - @param[in] args {string} User request arguments passed to the slash command.
3450
3450
  - @param[in] config {UseReqConfig} Effective project configuration supplying directory, git, static-check, and tool fields.
3451
3451
  - @return {string} Multi-line command invocation summary text.
3452
- - @satisfies REQ-335, REQ-336, REQ-337
3452
+ - @satisfies REQ-335, REQ-336, REQ-337, REQ-338
3453
3453
 
3454
3454
  ## Symbol Index
3455
3455
  |Symbol|Kind|Vis|Lines|Sig|
@@ -3476,7 +3476,7 @@ import { readBundledInstruction, readBundledPrompt } from "./resources.js";
3476
3476
 
3477
3477
  ## Imports
3478
3478
  ```
3479
- import { spawnSync } from "node:child_process";
3479
+ import { spawnSync, type SpawnSyncReturns } from "node:child_process";
3480
3480
  import path from "node:path";
3481
3481
  import type { UseReqConfig } from "./config.js";
3482
3482
  import { ReqError } from "./errors.js";
@@ -3490,12 +3490,12 @@ import { runReferences } from "./tool-runner.js";
3490
3490
  - @brief Describes the prepared execution facts for one `req-references` run.
3491
3491
  - @details Stores the validated project base, resolved git root, target references path, and fixed commit message needed by the specialized direct-write workflow. The interface is compile-time only and introduces no runtime cost.
3492
3492
 
3493
- ### fn `function runCapture(command: string[], cwd: string): ReturnType<typeof spawnSync>` (L44-49)
3493
+ ### fn `function runCapture(command: string[], cwd: string): SpawnSyncReturns<string>` (L44-49)
3494
3494
  - @brief Executes one synchronous subprocess and captures UTF-8 output.
3495
3495
  - @details Delegates to `spawnSync(...)`, preserves the supplied working directory, and returns the raw result so callers can interpret git exit status plus diagnostics deterministically. Runtime is dominated by external process execution. Side effects include subprocess creation.
3496
3496
  - @param[in] command {string[]} Executable plus argument vector.
3497
3497
  - @param[in] cwd {string} Working directory for the subprocess.
3498
- - @return {ReturnType<typeof spawnSync>} Captured subprocess result.
3498
+ - @return {SpawnSyncReturns<string>} Captured subprocess result with UTF-8 stdout and stderr.
3499
3499
 
3500
3500
  ### fn `function buildIgnoredGitStatusPaths(` (L59-73)
3501
3501
  - @brief Builds the set of git-status paths ignored for cleanliness checks.
@@ -3543,7 +3543,7 @@ import { runReferences } from "./tool-runner.js";
3543
3543
  |Symbol|Kind|Vis|Lines|Sig|
3544
3544
  |---|---|---|---|---|
3545
3545
  |`ReqReferencesCommandPlan`|iface||30-35|export interface ReqReferencesCommandPlan|
3546
- |`runCapture`|fn||44-49|function runCapture(command: string[], cwd: string): Retu...|
3546
+ |`runCapture`|fn||44-49|function runCapture(command: string[], cwd: string): Spaw...|
3547
3547
  |`buildIgnoredGitStatusPaths`|fn||59-73|function buildIgnoredGitStatusPaths(|
3548
3548
  |`listResidualGitStatusLines`|fn||84-102|function listResidualGitStatusLines(|
3549
3549
  |`getGitAddTargetPath`|fn||111-117|function getGitAddTargetPath(gitRoot: string, absolutePat...|
@@ -3562,7 +3562,7 @@ import { runReferences } from "./tool-runner.js";
3562
3562
  ```
3563
3563
  import fs from "node:fs";
3564
3564
  import path from "node:path";
3565
- import { spawnSync } from "node:child_process";
3565
+ import { spawnSync, type SpawnSyncReturns } from "node:child_process";
3566
3566
  import {
3567
3567
  import { ReqError } from "./errors.js";
3568
3568
  import {
@@ -3582,12 +3582,12 @@ import { resolveRuntimeGitPath } from "./runtime-project-paths.js";
3582
3582
  - type `type ReqResetCommandContext = Parameters<typeof restorePromptCommandExecution>[1];` (L59)
3583
3583
  - @brief Describes the session-bound context surface reused during `req-reset` recovery.
3584
3584
  - @details Reuses the session-switching contract already accepted by `restorePromptCommandExecution(...)` so the dedicated reset command can restore the original session without depending on concrete pi runtime classes. The alias is compile-time only and introduces no runtime cost.
3585
- ### fn `function runCapture(command: string[], cwd: string): ReturnType<typeof spawnSync>` (L68-73)
3585
+ ### fn `function runCapture(command: string[], cwd: string): SpawnSyncReturns<string>` (L68-73)
3586
3586
  - @brief Executes one synchronous subprocess and captures UTF-8 output.
3587
3587
  - @details Delegates to `spawnSync(...)`, preserves the supplied working directory, and returns the raw result so callers can interpret git exit status plus diagnostics deterministically. Runtime is dominated by external process execution. Side effects include subprocess creation.
3588
3588
  - @param[in] command {string[]} Executable plus argument vector.
3589
3589
  - @param[in] cwd {string} Working directory for the subprocess.
3590
- - @return {ReturnType<typeof spawnSync>} Captured subprocess result.
3590
+ - @return {SpawnSyncReturns<string>} Captured subprocess result with UTF-8 stdout and stderr.
3591
3591
 
3592
3592
  ### fn `function escapeReqResetRegExpLiteral(text: string): string` (L81-83)
3593
3593
  - @brief Escapes one literal string for safe JavaScript regular-expression reuse.
@@ -3659,7 +3659,7 @@ import { resolveRuntimeGitPath } from "./runtime-project-paths.js";
3659
3659
  |`ReqResetCommandPlan`|iface||34-40|export interface ReqResetCommandPlan|
3660
3660
  |`ReqResetCommandExecutionResult`|iface||46-53|export interface ReqResetCommandExecutionResult|
3661
3661
  |`ReqResetCommandContext`|type||59||
3662
- |`runCapture`|fn||68-73|function runCapture(command: string[], cwd: string): Retu...|
3662
+ |`runCapture`|fn||68-73|function runCapture(command: string[], cwd: string): Spaw...|
3663
3663
  |`escapeReqResetRegExpLiteral`|fn||81-83|function escapeReqResetRegExpLiteral(text: string): string|
3664
3664
  |`buildReqResetWorktreeNamePattern`|fn||93-100|function buildReqResetWorktreeNamePattern(gitRoot: string...|
3665
3665
  |`listReqResetRegisteredWorktreeRoots`|fn||109-118|function listReqResetRegisteredWorktreeRoots(gitRoot: str...|
@@ -3752,19 +3752,19 @@ import { getInstallationPath, RESOURCE_ROOT_DIRNAME } from "./path-context.js";
3752
3752
  ## Imports
3753
3753
  ```
3754
3754
  import path from "node:path";
3755
- import { spawnSync } from "node:child_process";
3755
+ import { spawnSync, type SpawnSyncReturns } from "node:child_process";
3756
3756
  import { ReqError } from "./errors.js";
3757
3757
  import { isSameOrAncestorPath } from "./path-context.js";
3758
3758
  ```
3759
3759
 
3760
3760
  ## Definitions
3761
3761
 
3762
- ### fn `function runGitCapture(command: string[], cwd?: string): ReturnType<typeof spawnSync>` (L19-24)
3762
+ ### fn `function runGitCapture(command: string[], cwd?: string): SpawnSyncReturns<string>` (L19-24)
3763
3763
  - @brief Executes one git subprocess and captures UTF-8 output.
3764
3764
  - @details Delegates to `spawnSync`, keeps execution synchronous for deterministic command flows, and supports an optional working directory. Runtime is dominated by the spawned git process. Side effects include subprocess creation.
3765
3765
  - @param[in] command {string[]} Git executable plus argument vector.
3766
3766
  - @param[in] cwd {string | undefined} Optional working directory.
3767
- - @return {ReturnType<typeof spawnSync>} Captured subprocess result.
3767
+ - @return {SpawnSyncReturns<string>} Captured subprocess result with UTF-8 stdout and stderr.
3768
3768
 
3769
3769
  ### fn `export function isInsideGitRepo(targetPath: string): boolean` (L33-36)
3770
3770
  - @brief Tests whether one path is inside a git work tree.
@@ -4091,7 +4091,7 @@ import { formatDoxygenFieldsAsMarkdown, parseDoxygenComment } from "./doxygen-pa
4091
4091
 
4092
4092
  ---
4093
4093
 
4094
- # static-check.ts | TypeScript | 538L | 16 symbols | 7 imports | 29 comments
4094
+ # static-check.ts | TypeScript | 595L | 18 symbols | 8 imports | 31 comments
4095
4095
  > Path: `src/core/static-check.ts`
4096
4096
  - @brief Defines static-check language mappings and checker dispatch implementations.
4097
4097
  - @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.
@@ -4103,50 +4103,51 @@ import path from "node:path";
4103
4103
  import process from "node:process";
4104
4104
  import { spawnSync } from "node:child_process";
4105
4105
  import fg from "fast-glob";
4106
- import type { StaticCheckEntry } from "./config.js";
4106
+ import type { StaticCheckEntry, UseReqConfig } from "./config.js";
4107
4107
  import { ReqError } from "./errors.js";
4108
+ import { getInstallationPath } from "./path-context.js";
4108
4109
  ```
4109
4110
 
4110
4111
  ## Definitions
4111
4112
 
4112
- ### iface `export interface StaticCheckLanguageSupport` (L91-94)
4113
+ ### iface `export interface StaticCheckLanguageSupport` (L92-95)
4113
4114
  - @brief Describes supported extensions for one canonical static-check language.
4114
4115
  - @details The interface is used for UI rendering and capability reporting only. It is compile-time only and adds no runtime cost.
4115
4116
 
4116
- ### fn `export function getSupportedStaticCheckLanguages(): string[]` (L109-111)
4117
+ ### fn `export function getSupportedStaticCheckLanguages(): string[]` (L110-112)
4117
4118
  - @brief Returns the sorted list of canonical languages with extension support.
4118
4119
  - @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.
4119
4120
  - @return {string[]} Sorted canonical language names.
4120
4121
 
4121
- ### fn `export function getSupportedStaticCheckLanguageSupport(): StaticCheckLanguageSupport[]` (L118-129)
4122
+ ### fn `export function getSupportedStaticCheckLanguageSupport(): StaticCheckLanguageSupport[]` (L119-130)
4122
4123
  - @brief Returns supported languages paired with their known file extensions.
4123
4124
  - @details Groups extensions by canonical language and emits alphabetically sorted extension lists. Runtime is O(n log n). No external state is mutated.
4124
4125
  - @return {StaticCheckLanguageSupport[]} Sorted language-support descriptors.
4125
4126
 
4126
- ### fn `function formatStaticCheckModules(): string` (L136-138)
4127
+ ### fn `function formatStaticCheckModules(): string` (L137-139)
4127
4128
  - @brief Formats the user-configurable module list for diagnostics.
4128
4129
  - @details Joins `STATIC_CHECK_MODULES` with commas for direct insertion into user-facing error strings. Time complexity is O(n). No side effects occur.
4129
4130
  - @return {string} Comma-delimited user-configurable module names.
4130
4131
 
4131
- ### fn `function formatDispatchStaticCheckModules(): string` (L145-147)
4132
+ ### fn `function formatDispatchStaticCheckModules(): string` (L146-148)
4132
4133
  - @brief Formats the persisted or debug-capable module list for dispatch diagnostics.
4133
4134
  - @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.
4134
4135
  - @return {string} Comma-delimited persisted module names.
4135
4136
 
4136
- ### fn `function splitCsvLikeTokens(specRhs: string): string[]` (L155-177)
4137
+ ### fn `function splitCsvLikeTokens(specRhs: string): string[]` (L156-178)
4137
4138
  - @brief Splits a comma-delimited static-check specification while honoring quotes.
4138
4139
  - @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.
4139
4140
  - @param[in] specRhs {string} Right-hand side of the enable-static-check specification.
4140
4141
  - @return {string[]} Parsed tokens with surrounding whitespace trimmed.
4141
4142
 
4142
- ### fn `export function parseEnableStaticCheck(spec: string): [string, StaticCheckEntry]` (L186-234)
4143
+ ### fn `export function parseEnableStaticCheck(spec: string): [string, StaticCheckEntry]` (L187-235)
4143
4144
  - @brief Parses one `LANG=Command,CMD[,PARAM...]` static-check specification.
4144
4145
  - @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.
4145
4146
  - @param[in] spec {string} Raw static-check specification string.
4146
4147
  - @return {[string, StaticCheckEntry]} Tuple of canonical language name and normalized checker configuration.
4147
4148
  - @throws {ReqError} Throws for missing separators, unknown languages, non-Command modules, or missing required command arguments.
4148
4149
 
4149
- ### fn `export function buildStaticCheckEntryIdentity(language: string, entry: StaticCheckEntry): string` (L244-249)
4150
+ ### fn `export function buildStaticCheckEntryIdentity(language: string, entry: StaticCheckEntry): string` (L245-250)
4150
4151
  - @brief Builds the duplicate-identity token for one static-check entry.
4151
4152
  - @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.
4152
4153
  - @param[in] language {string} Canonical or alias language name associated with the entry.
@@ -4154,7 +4155,7 @@ import { ReqError } from "./errors.js";
4154
4155
  - @return {string} Stable identity token suitable for equality comparison.
4155
4156
  - @satisfies REQ-036
4156
4157
 
4157
- ### fn `export function validateStaticCheckEntry(entry: StaticCheckEntry): void` (L259-270)
4158
+ ### fn `export function validateStaticCheckEntry(entry: StaticCheckEntry): void` (L260-271)
4158
4159
  - @brief Validates pre-persistence invariants for one static-check entry.
4159
4160
  - @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.
4160
4161
  - @param[in] entry {StaticCheckEntry} Static-check configuration entry to validate.
@@ -4162,17 +4163,17 @@ import { ReqError } from "./errors.js";
4162
4163
  - @throws {ReqError} Throws when a `Command` entry omits `cmd` or resolves to a non-executable program.
4163
4164
  - @satisfies REQ-037
4164
4165
 
4165
- ### fn `function resolveFiles(inputs: string[]): string[]` (L278-302)
4166
+ ### fn `function resolveFiles(inputs: string[]): string[]` (L279-303)
4166
4167
  - @brief Resolves explicit files, directories, and glob patterns into absolute file paths.
4167
4168
  - @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.
4168
4169
  - @param[in] inputs {string[]} Raw file, directory, or glob inputs.
4169
4170
  - @return {string[]} Unique absolute file paths.
4170
4171
 
4171
- ### class `export class StaticCheckBase` (L308-382)
4172
+ ### class `export class StaticCheckBase` (L309-383)
4172
4173
  - @brief Provides the shared and debug-capable base implementation for file-oriented static checks.
4173
4174
  - @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.
4174
4175
 
4175
- ### class `export class StaticCheckCommand extends StaticCheckBase` : StaticCheckBase (L388-437)
4176
+ ### class `export class StaticCheckCommand extends StaticCheckBase` : StaticCheckBase (L389-438)
4176
4177
  - @brief Runs the user-facing external-command static checker.
4177
4178
  - @brief Initializes a command-backed checker instance.
4178
4179
  - @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.
@@ -4183,19 +4184,33 @@ import { ReqError } from "./errors.js";
4183
4184
  - @param[in] failOnly {boolean} When `true`, suppress successful-file output.
4184
4185
  - @throws {ReqError} Throws when the executable cannot be found on PATH.
4185
4186
 
4186
- ### fn `function isExecutableFile(candidate: string): boolean` (L445-455)
4187
+ ### fn `function isExecutableFile(candidate: string): boolean` (L446-456)
4187
4188
  - @brief Tests whether one filesystem path is executable.
4188
4189
  - @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.
4189
4190
  - @param[in] candidate {string} Absolute or relative path to inspect.
4190
4191
  - @return {boolean} `true` when the candidate is executable by the current process.
4191
4192
 
4192
- ### fn `function findExecutable(cmd: string): string | undefined` (L463-474)
4193
+ ### fn `export function findExecutable(cmd: string): string | undefined` (L464-475)
4193
4194
  - @brief Locates an executable by scanning the current PATH.
4194
4195
  - @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.
4195
4196
  - @param[in] cmd {string} Executable name to locate.
4196
4197
  - @return {string | undefined} Absolute executable path, or `undefined` when not found.
4197
4198
 
4198
- ### fn `export function dispatchStaticCheckForFile(` (L485-488)
4199
+ ### fn `export function resolveCheckerExecutable(cmd: string): string | undefined` (L484-499)
4200
+ - @brief Resolves one checker executable across bundled `node_modules/.bin` locations and PATH.
4201
+ - @details Probes the installation-owned `node_modules/.bin` directory, the project-scope parent `node_modules/.bin` directory used by `--prefix` layouts, and finally the system PATH scan, returning the first executable match. Runtime is O(p) in PATH entry count plus bounded filesystem metadata checks. Side effects are limited to filesystem reads.
4202
+ - @param[in] cmd {string} Executable name or relative path to resolve.
4203
+ - @return {string | undefined} Absolute executable path, or `undefined` when not found in any probed location.
4204
+ - @satisfies REQ-023, REQ-037, DES-018
4205
+
4206
+ ### fn `export function checkDefaultCheckersAvailability(config: UseReqConfig): string[]` (L508-528)
4207
+ - @brief Determines which enabled static-check executables are missing from the runtime environment.
4208
+ - @details Iterates every enabled language checker entry in the effective config, resolves each `Command` entry executable through `resolveCheckerExecutable`, and collects the missing command names so the caller can surface one consolidated warning. Runtime is O(l * c * p) where l is language count, c is checker count, and p is PATH entry count. Side effects are limited to filesystem reads.
4209
+ - @param[in] config {UseReqConfig} Effective merged configuration.
4210
+ - @return {string[]} Unique command names that are enabled but unresolvable.
4211
+ - @satisfies REQ-341, REQ-343, REQ-344
4212
+
4213
+ ### fn `export function dispatchStaticCheckForFile(` (L539-542)
4199
4214
  - @brief Dispatches one configured static checker for a single file.
4200
4215
  - @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.
4201
4216
  - @param[in] filePath {string} Absolute or relative file path to check.
@@ -4204,7 +4219,7 @@ import { ReqError } from "./errors.js";
4204
4219
  - @return {number} Checker exit status where `0` means success and non-zero means failure.
4205
4220
  - @throws {ReqError} Throws when configuration is incomplete or names an unknown module.
4206
4221
 
4207
- ### fn `export function runStaticCheck(argv: string[]): number` (L517-538)
4222
+ ### fn `export function runStaticCheck(argv: string[]): number` (L571-595)
4208
4223
  - @brief Runs the standalone static-check test driver.
4209
4224
  - @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.
4210
4225
  - @param[in] argv {string[]} Raw static-check subcommand arguments.
@@ -4214,22 +4229,24 @@ import { ReqError } from "./errors.js";
4214
4229
  ## Symbol Index
4215
4230
  |Symbol|Kind|Vis|Lines|Sig|
4216
4231
  |---|---|---|---|---|
4217
- |`StaticCheckLanguageSupport`|iface||91-94|export interface StaticCheckLanguageSupport|
4218
- |`getSupportedStaticCheckLanguages`|fn||109-111|export function getSupportedStaticCheckLanguages(): string[]|
4219
- |`getSupportedStaticCheckLanguageSupport`|fn||118-129|export function getSupportedStaticCheckLanguageSupport():...|
4220
- |`formatStaticCheckModules`|fn||136-138|function formatStaticCheckModules(): string|
4221
- |`formatDispatchStaticCheckModules`|fn||145-147|function formatDispatchStaticCheckModules(): string|
4222
- |`splitCsvLikeTokens`|fn||155-177|function splitCsvLikeTokens(specRhs: string): string[]|
4223
- |`parseEnableStaticCheck`|fn||186-234|export function parseEnableStaticCheck(spec: string): [st...|
4224
- |`buildStaticCheckEntryIdentity`|fn||244-249|export function buildStaticCheckEntryIdentity(language: s...|
4225
- |`validateStaticCheckEntry`|fn||259-270|export function validateStaticCheckEntry(entry: StaticChe...|
4226
- |`resolveFiles`|fn||278-302|function resolveFiles(inputs: string[]): string[]|
4227
- |`StaticCheckBase`|class||308-382|export class StaticCheckBase|
4228
- |`StaticCheckCommand`|class||388-437|export class StaticCheckCommand extends StaticCheckBase|
4229
- |`isExecutableFile`|fn||445-455|function isExecutableFile(candidate: string): boolean|
4230
- |`findExecutable`|fn||463-474|function findExecutable(cmd: string): string | undefined|
4231
- |`dispatchStaticCheckForFile`|fn||485-488|export function dispatchStaticCheckForFile(|
4232
- |`runStaticCheck`|fn||517-538|export function runStaticCheck(argv: string[]): number|
4232
+ |`StaticCheckLanguageSupport`|iface||92-95|export interface StaticCheckLanguageSupport|
4233
+ |`getSupportedStaticCheckLanguages`|fn||110-112|export function getSupportedStaticCheckLanguages(): string[]|
4234
+ |`getSupportedStaticCheckLanguageSupport`|fn||119-130|export function getSupportedStaticCheckLanguageSupport():...|
4235
+ |`formatStaticCheckModules`|fn||137-139|function formatStaticCheckModules(): string|
4236
+ |`formatDispatchStaticCheckModules`|fn||146-148|function formatDispatchStaticCheckModules(): string|
4237
+ |`splitCsvLikeTokens`|fn||156-178|function splitCsvLikeTokens(specRhs: string): string[]|
4238
+ |`parseEnableStaticCheck`|fn||187-235|export function parseEnableStaticCheck(spec: string): [st...|
4239
+ |`buildStaticCheckEntryIdentity`|fn||245-250|export function buildStaticCheckEntryIdentity(language: s...|
4240
+ |`validateStaticCheckEntry`|fn||260-271|export function validateStaticCheckEntry(entry: StaticChe...|
4241
+ |`resolveFiles`|fn||279-303|function resolveFiles(inputs: string[]): string[]|
4242
+ |`StaticCheckBase`|class||309-383|export class StaticCheckBase|
4243
+ |`StaticCheckCommand`|class||389-438|export class StaticCheckCommand extends StaticCheckBase|
4244
+ |`isExecutableFile`|fn||446-456|function isExecutableFile(candidate: string): boolean|
4245
+ |`findExecutable`|fn||464-475|export function findExecutable(cmd: string): string | und...|
4246
+ |`resolveCheckerExecutable`|fn||484-499|export function resolveCheckerExecutable(cmd: string): st...|
4247
+ |`checkDefaultCheckersAvailability`|fn||508-528|export function checkDefaultCheckersAvailability(config: ...|
4248
+ |`dispatchStaticCheckForFile`|fn||539-542|export function dispatchStaticCheckForFile(|
4249
+ |`runStaticCheck`|fn||571-595|export function runStaticCheck(argv: string[]): number|
4233
4250
 
4234
4251
 
4235
4252
  ---
@@ -4752,7 +4769,7 @@ import path from "node:path";
4752
4769
 
4753
4770
  ---
4754
4771
 
4755
- # index.ts | TypeScript | 4582L | 106 symbols | 27 imports | 110 comments
4772
+ # index.ts | TypeScript | 4605L | 106 symbols | 27 imports | 118 comments
4756
4773
  > Path: `src/index.ts`
4757
4774
  - @brief Registers the pi-usereq extension commands, tools, and configuration UI.
4758
4775
  - @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.
@@ -4790,55 +4807,55 @@ import { makeRelativeIfContainsProject, shellSplit } from "./core/utils.js";
4790
4807
 
4791
4808
  ## Definitions
4792
4809
 
4793
- ### iface `interface PiShortcutRegistrar` (L186-194)
4810
+ ### iface `interface PiShortcutRegistrar` (L187-195)
4794
4811
  - @brief Describes the optional shortcut-registration surface used by pi-usereq.
4795
4812
  - @details Narrows the runtime API to the documented `registerShortcut(...)`
4796
4813
  method so the extension can remain compatible with offline harnesses that do
4797
4814
  not implement shortcut capture. Compile-time only and introduces no runtime
4798
4815
  cost.
4799
4816
 
4800
- ### fn `function getProjectBase(cwd: string): string` (L202-211)
4817
+ ### fn `function getProjectBase(cwd: string): string` (L203-212)
4801
4818
  - @brief Resolves the effective project base from a working directory.
4802
4819
  - @details Normalizes the provided cwd into an absolute path without consulting configuration. Time complexity is O(1). No I/O side effects occur.
4803
4820
  - @param[in] cwd {string} Current working directory.
4804
4821
  - @return {string} Absolute project base path.
4805
4822
 
4806
- ### fn `function getProcessCwdSafe(): string` (L218-227)
4823
+ ### fn `function getProcessCwdSafe(): string` (L219-228)
4807
4824
  - @brief Resolves a safe process working directory for extension-load paths.
4808
4825
  - @details Returns `process.cwd()` when available and falls back to absolute `PWD`, `HOME`, or `/` when the current shell directory has been deleted. Runtime is O(1). No external state is mutated.
4809
4826
  - @return {string} Absolute fallback-safe process working directory.
4810
4827
 
4811
- ### fn `function resolveLiveBootstrapCwd(cwd: string): string` (L235-247)
4828
+ ### fn `function resolveLiveBootstrapCwd(cwd: string): string` (L236-248)
4812
4829
  - @brief Resolves the live working directory used for bootstrap-sensitive flows.
4813
4830
  - @details Prefers the supplied cwd when it still exists. Otherwise reuses the tracked runtime context path when it remains live, then the tracked runtime base path, and finally a process-safe cwd so deleted worktree paths retained by stale contexts cannot poison later prompt preflight or lifecycle bootstrap. Runtime is O(1) plus bounded filesystem probes. No external state is mutated.
4814
4831
  - @param[in] cwd {string} Candidate context cwd.
4815
4832
  - @return {string} Existing absolute cwd used for bootstrap work.
4816
4833
 
4817
- ### fn `function syncContextCwdMirror(ctx: { cwd?: string }, cwd: string): void` (L256-265)
4834
+ ### fn `function syncContextCwdMirror(ctx: { cwd?: string }, cwd: string): void` (L257-266)
4818
4835
  - @brief Best-effort synchronizes one context `cwd` mirror with bootstrap reality.
4819
4836
  - @details Applies the resolved live cwd to the supplied context when writable and ignores stale or read-only mirrors so command bootstrap can continue using authoritative filesystem probes. Runtime is O(1). Side effects are limited to optional `ctx.cwd` mutation.
4820
4837
  - @param[in] cwd {string} Resolved live cwd.
4821
4838
  - @param[in,out] ctx {{ cwd?: string }} Mutable context-like object.
4822
4839
  - @return {void} No return value.
4823
4840
 
4824
- ### fn `function loadProjectConfig(cwd: string): UseReqConfig` (L274-277)
4841
+ ### fn `function loadProjectConfig(cwd: string): UseReqConfig` (L275-278)
4825
4842
  - @brief Loads project configuration for the extension runtime.
4826
4843
  - @details Resolves the project base, loads persisted config, and normalizes configured directory paths without reading or persisting runtime-derived `base-path` or `git-path` metadata. Runtime is dominated by config I/O. Side effects are limited to filesystem reads.
4827
4844
  - @param[in] cwd {string} Current working directory.
4828
4845
  - @return {UseReqConfig} Effective project configuration.
4829
4846
  - @satisfies REQ-030, REQ-145, REQ-146
4830
4847
 
4831
- - type `type DebugToolCommandExecuteResult = ReturnType<typeof buildMonolithicToolExecuteResult>;` (L283)
4848
+ - type `type DebugToolCommandExecuteResult = ReturnType<typeof buildMonolithicToolExecuteResult>;` (L284)
4832
4849
  - @brief Describes the execute-result surface reused by debug tool wrapper commands.
4833
4850
  - @details Narrows debug slash-command handlers to the same monolithic content-plus-execution wrapper returned by agent tools so editor output and notifications can reuse shared extraction helpers. The alias is compile-time only and introduces no runtime cost.
4834
- ### fn `function shouldRegisterDebugToolCommands(cwd: string): boolean` (L292-298)
4851
+ ### fn `function shouldRegisterDebugToolCommands(cwd: string): boolean` (L293-299)
4835
4852
  - @brief Tests whether debug tool wrapper commands should be registered for one runtime cwd.
4836
4853
  - @details Loads the effective project configuration for the supplied cwd and returns `true` only when `DEBUG_TOOL_COMMANDS_ENABLED` resolves to `enable`. Malformed or unreadable config payloads degrade to `false` so extension activation never aborts while deciding whether to register optional debug commands. Runtime is dominated by config I/O. Side effects are limited to filesystem reads.
4837
4854
  - @param[in] cwd {string} Candidate runtime working directory.
4838
4855
  - @return {boolean} `true` when debug tool wrapper commands should be registered.
4839
4856
  - @satisfies REQ-323
4840
4857
 
4841
- ### fn `function writeDebugToolCommandResultToEditor(` (L309-323)
4858
+ ### fn `function writeDebugToolCommandResultToEditor(` (L310-324)
4842
4859
  - @brief Writes one debug tool-wrapper result into the editor and emits a status notification.
4843
4860
  - @details Extracts the primary monolithic content text from the wrapped tool result, forwards that exact text to the editor, and emits an informational or error notification keyed by the tool exit code. Runtime is O(n) in output length. Side effects include editor-text mutation and UI notifications.
4844
4861
  - @param[in] ctx {ExtensionCommandContext} Active command context.
@@ -4847,7 +4864,7 @@ cost.
4847
4864
  - @return {void} No return value.
4848
4865
  - @satisfies REQ-324
4849
4866
 
4850
- ### fn `function executeDebugToolCommand(` (L335-353)
4867
+ ### fn `function executeDebugToolCommand(` (L336-354)
4851
4868
  - @brief Executes one config-gated debug tool wrapper slash command.
4852
4869
  - @details Resolves a live cwd for the invoking command context, refreshes runtime path state, loads the effective project configuration, rejects execution when debug tool wrapper commands are disabled, and otherwise writes the selected wrapped tool output into the editor. Runtime is dominated by the delegated tool runner. Side effects include runtime-path bootstrap, filesystem reads, optional tool side effects, editor-text mutation, and UI notifications.
4853
4870
  - @param[in] ctx {ExtensionCommandContext} Active command context.
@@ -4857,14 +4874,14 @@ cost.
4857
4874
  - @throws {ReqError} Throws when debug tool wrapper commands are disabled for the active project.
4858
4875
  - @satisfies REQ-324, REQ-325
4859
4876
 
4860
- ### fn `function registerDebugToolCommands(pi: ExtensionAPI): void` (L362-401)
4877
+ ### fn `function registerDebugToolCommands(pi: ExtensionAPI): void` (L363-402)
4861
4878
  - @brief Registers config-gated debug slash-command wrappers for selected project analysis tools.
4862
4879
  - @details Registers `debug-compress`, `debug-references`, `debug-static-check`, `debug-summarize`, and `debug-tokens` as extension commands that reuse the same runner paths as the corresponding agent tools and write the resulting monolithic text into the editor instead of the LLM content channel. Re-registering the same commands is idempotent because pi keeps the latest same-extension command definition per name. Runtime is O(1) for registration; handler cost depends on the selected runner. Side effects include command registration.
4863
4880
  - @param[in] pi {ExtensionAPI} Active extension API instance.
4864
4881
  - @return {void} No return value.
4865
4882
  - @satisfies DES-015, REQ-323, REQ-324, REQ-325
4866
4883
 
4867
- ### fn `function saveProjectConfig(cwd: string, config: UseReqConfig): void` (L411-414)
4884
+ ### fn `function saveProjectConfig(cwd: string, config: UseReqConfig): void` (L412-415)
4868
4885
  - @brief Persists effective project configuration from the extension runtime.
4869
4886
  - @details Resolves the project base, normalizes configured local directory paths into project-relative form, and delegates split local/global persistence to `saveConfig` without serializing runtime-derived path metadata. Runtime is O(n) in config size. Side effects include config-file writes.
4870
4887
  - @param[in] cwd {string} Current working directory.
@@ -4872,38 +4889,38 @@ cost.
4872
4889
  - @return {void} No return value.
4873
4890
  - @satisfies REQ-146, REQ-315
4874
4891
 
4875
- ### fn `function formatLocalConfigPathForMenu(cwd: string): string` (L423-427)
4892
+ ### fn `function formatLocalConfigPathForMenu(cwd: string): string` (L424-428)
4876
4893
  - @brief Formats the current local config path for top-level menu display.
4877
4894
  - @details Resolves `<base-path>/.pi-usereq.json` from the cwd-derived project base and reuses the shared runtime-path formatter so the `Show local configuration` row uses the documented `~`-relative display contract. Runtime is O(p) in path length. No external state is mutated.
4878
4895
  - @param[in] cwd {string} Current working directory.
4879
4896
  - @return {string} `~`-relative or absolute local config-path display value.
4880
4897
  - @satisfies REQ-162
4881
4898
 
4882
- ### fn `function formatGlobalConfigPathForMenu(): string` (L435-437)
4899
+ ### fn `function formatGlobalConfigPathForMenu(): string` (L436-438)
4883
4900
  - @brief Formats the current global config path for top-level menu display.
4884
4901
  - @details Resolves `~/.config/pi-usereq/config.json` through the shared runtime-path formatter so the `Show global configuration` row uses the documented `~`-relative display contract. Runtime is O(p) in path length. No external state is mutated.
4885
4902
  - @return {string} `~`-relative or absolute global config-path display value.
4886
4903
  - @satisfies REQ-319
4887
4904
 
4888
- ### fn `function buildTerminalSettingsMenuChoices(options:` (L446-457)
4905
+ ### fn `function buildTerminalSettingsMenuChoices(options:` (L447-458)
4889
4906
  - @brief Builds the standardized terminal rows appended to every configuration menu.
4890
4907
  - @details Returns the canonical value-less `Reset defaults` row so all configuration menus and descendant selector menus share the same terminal ordering contract without rendering `Save and close`. Runtime is O(1). No external state is mutated.
4891
4908
  - @param[in] options {{ resetDefaultsDescription: string }} Menu-specific terminal-row metadata.
4892
4909
  - @return {PiUsereqSettingsMenuChoice[]} Ordered terminal menu rows.
4893
4910
  - @satisfies REQ-193
4894
4911
 
4895
- ### iface `interface ResetConfirmationChange` (L463-467)
4912
+ ### iface `interface ResetConfirmationChange` (L464-468)
4896
4913
  - @brief Describes one pending reset value change shown in confirmation menus.
4897
4914
  - @details Stores the row label plus its previous and next values so reset-confirmation submenus can expose machine-readable and human-verifiable change previews. The interface is compile-time only and introduces no runtime cost.
4898
4915
 
4899
- ### fn `function formatResetConfirmationValue(previousValue: string, nextValue: string): string` (L476-478)
4916
+ ### fn `function formatResetConfirmationValue(previousValue: string, nextValue: string): string` (L477-479)
4900
4917
  - @brief Formats one reset-confirmation value pair for menu display.
4901
4918
  - @details Serializes the previous and next values into a deterministic `previous -> next` preview string used by confirmation submenus. Runtime is O(n) in combined value length. No external state is mutated.
4902
4919
  - @param[in] previousValue {string} Current persisted value.
4903
4920
  - @param[in] nextValue {string} Candidate default value.
4904
4921
  - @return {string} Rendered preview string.
4905
4922
 
4906
- ### fn `function buildResetConfirmationChoices(` (L488-527)
4923
+ ### fn `function buildResetConfirmationChoices(` (L489-528)
4907
4924
  - @brief Builds the shared settings-menu choices for one reset-confirmation submenu.
4908
4925
  - @details Renders each pending changed value as a disabled preview row, appends explicit approve and abort actions, and falls back to one disabled no-op row when no values would change. Runtime is O(n) in changed-value count. No external state is mutated.
4909
4926
  - @param[in] changes {ResetConfirmationChange[]} Changed-value preview rows.
@@ -4911,7 +4928,7 @@ cost.
4911
4928
  - @param[in] abortDescription {string} Description for the abort action.
4912
4929
  - @return {PiUsereqSettingsMenuChoice[]} Reset-confirmation submenu choices.
4913
4930
 
4914
- ### fn `async function confirmResetChanges(` (L539-552)
4931
+ ### fn `async function confirmResetChanges(` (L540-553)
4915
4932
  - @brief Opens one explicit reset-confirmation submenu.
4916
4933
  - @details Uses the shared settings-menu renderer to show every changed value before reset application and returns `true` only when the user selects the explicit approval action. Runtime depends on user interaction count. Side effects are limited to transient custom-UI rendering.
4917
4934
  - @param[in] ctx {ExtensionCommandContext} Active command context.
@@ -4921,14 +4938,14 @@ cost.
4921
4938
  - @param[in] abortDescription {string} Description for the abort action.
4922
4939
  - @return {Promise<boolean>} `true` when the reset is explicitly approved.
4923
4940
 
4924
- ### fn `function writePersistedConfigToEditor(` (L561-566)
4941
+ ### fn `function writePersistedConfigToEditor(` (L562-567)
4925
4942
  - @brief Writes one already-persisted config file text into the editor.
4926
4943
  - @details Reads the target config file from disk after the caller has saved any pending changes and forwards the exact persisted text into the editor. Runtime is O(n) in serialized config size. Side effects include filesystem reads and editor-text mutation.
4927
4944
  - @param[in] ctx {ExtensionCommandContext} Active command context.
4928
4945
  - @param[in] configPath {string} Absolute persisted config path.
4929
4946
  - @return {void} No return value.
4930
4947
 
4931
- ### fn `function writePersistedLocalConfigToEditor(` (L576-582)
4948
+ ### fn `function writePersistedLocalConfigToEditor(` (L577-583)
4932
4949
  - @brief Writes the already-persisted local configuration file text into the editor.
4933
4950
  - @details Reads `<base-path>/.pi-usereq.json` from disk after the caller has saved any pending local and global configuration changes, then forwards that exact persisted text into the editor. Runtime is O(n) in serialized config size. Side effects include filesystem reads and editor-text mutation.
4934
4951
  - @param[in] ctx {ExtensionCommandContext} Active command context.
@@ -4936,58 +4953,58 @@ cost.
4936
4953
  - @return {void} No return value.
4937
4954
  - @satisfies REQ-031
4938
4955
 
4939
- ### fn `function writePersistedGlobalConfigToEditor(` (L591-595)
4956
+ ### fn `function writePersistedGlobalConfigToEditor(` (L592-596)
4940
4957
  - @brief Writes the already-persisted global configuration file text into the editor.
4941
4958
  - @details Reads `~/.config/pi-usereq/config.json` from disk after the caller has saved any pending local and global configuration changes, then forwards that exact persisted text into the editor. Runtime is O(n) in serialized config size. Side effects include filesystem reads and editor-text mutation.
4942
4959
  - @param[in] ctx {ExtensionCommandContext} Active command context.
4943
4960
  - @return {void} No return value.
4944
4961
  - @satisfies REQ-318
4945
4962
 
4946
- ### fn `function buildSearchToolSupportedTagGuidelines(): string[]` (L656-660)
4963
+ ### fn `function buildSearchToolSupportedTagGuidelines(): string[]` (L657-661)
4947
4964
  - @brief Builds the supported-tag guidance lines embedded in search-tool registrations.
4948
4965
  - @details Emits one deterministic line per supported language containing its canonical registration label and sorted tag list so downstream agents can specialize requests without invoking the tool first. Runtime is O(l * t log t). No side effects occur.
4949
4966
  - @return {string[]} Supported-tag guidance lines.
4950
4967
 
4951
- ### fn `function buildSearchToolSchemaDescription(scope: FindToolScope): string` (L668-673)
4968
+ ### fn `function buildSearchToolSchemaDescription(scope: FindToolScope): string` (L669-674)
4952
4969
  - @brief Builds the schema description for one search-tool registration.
4953
4970
  - @details Specializes the explicit-file and configured-directory input contracts while documenting the monolithic markdown output channel and minimal execution details shape. Runtime is O(1). No side effects occur.
4954
4971
  - @param[in] scope {FindToolScope} Search-tool scope.
4955
4972
  - @return {string} Parameter-schema description.
4956
4973
 
4957
- ### fn `function buildSearchToolPromptGuidelines(scope: FindToolScope): string[]` (L681-694)
4974
+ ### fn `function buildSearchToolPromptGuidelines(scope: FindToolScope): string[]` (L682-695)
4958
4975
  - @brief Builds the prompt-guideline set for one search-tool registration.
4959
4976
  - @details Encodes scope selection, monolithic markdown output semantics, regex semantics, line-number behavior, tag-filter rules, and the full language-to-tag matrix as stable agent-oriented strings. Runtime is O(l * t log t). No side effects occur.
4960
4977
  - @param[in] scope {FindToolScope} Search-tool scope.
4961
4978
  - @return {string[]} Prompt-guideline strings.
4962
4979
 
4963
- - type `type MonolithicToolRenderResult = {` (L700)
4980
+ - type `type MonolithicToolRenderResult = {` (L701)
4964
4981
  - @brief Describes the monolithic tool-result surface consumed by tool-row renderers.
4965
4982
  - @details Narrows execute-result data to the primary text content block plus the minimal `details.execution` metadata returned by monolithic tool wrappers. The alias is compile-time only and introduces no runtime cost.
4966
- ### fn `function getMonolithicToolText(result: MonolithicToolRenderResult): string` (L717-720)
4983
+ ### fn `function getMonolithicToolText(result: MonolithicToolRenderResult): string` (L718-721)
4967
4984
  - @brief Extracts the primary monolithic text block from one tool result.
4968
4985
  - @details Returns the first text content block when present and falls back to an empty string when the tool emitted no LLM-facing content. Runtime is O(1). No external state is mutated.
4969
4986
  - @param[in] result {MonolithicToolRenderResult} Tool result wrapper.
4970
4987
  - @return {string} Primary monolithic content text.
4971
4988
 
4972
- ### fn `function getMonolithicToolErrorText(result: MonolithicToolRenderResult): string | undefined` (L728-738)
4989
+ ### fn `function getMonolithicToolErrorText(result: MonolithicToolRenderResult): string | undefined` (L729-739)
4973
4990
  - @brief Reads the first residual execution error string from one monolithic tool result.
4974
4991
  - @details Prefers the first `stderr_lines` entry when present and otherwise falls back to the first line of `stderr`. Runtime is O(1) plus first-line split cost. No external state is mutated.
4975
4992
  - @param[in] result {MonolithicToolRenderResult} Tool result wrapper.
4976
4993
  - @return {string | undefined} First residual execution error string.
4977
4994
 
4978
- ### fn `function formatCompactToolArgumentValue(value: unknown): string | undefined` (L746-785)
4995
+ ### fn `function formatCompactToolArgumentValue(value: unknown): string | undefined` (L747-786)
4979
4996
  - @brief Formats one scalar or structural tool argument for compact render summaries.
4980
4997
  - @details Truncates long strings, compresses arrays into short previews, and renders plain object arguments as key indexes so collapsed tool rows stay compact while still exposing the essential invocation shape. Runtime is O(n) in preview size. No external state is mutated.
4981
4998
  - @param[in] value {unknown} Candidate tool argument value.
4982
4999
  - @return {string | undefined} Compact preview string or `undefined` when the value carries no useful summary.
4983
5000
 
4984
- ### fn `function buildCompactToolInvocationText(args: Record<string, unknown> | undefined): string` (L793-804)
5001
+ ### fn `function buildCompactToolInvocationText(args: Record<string, unknown> | undefined): string` (L794-805)
4985
5002
  - @brief Builds the compact invocation summary appended to collapsed tool rows.
4986
5003
  - @details Renders only caller-supplied parameters that have stable, non-empty compact previews and joins them in insertion order so agents can infer how the tool was used without expanding the full result. Runtime is O(n) in argument count and preview size. No external state is mutated.
4987
5004
  - @param[in] args {Record<string, unknown> | undefined} Current tool call arguments.
4988
5005
  - @return {string} Compact invocation summary prefixed with one separating space, or the empty string when no useful preview exists.
4989
5006
 
4990
- ### fn `function summarizeStructuredToolResult(` (L814-829)
5007
+ ### fn `function summarizeStructuredToolResult(` (L815-830)
4991
5008
  - @brief Builds the compact default text for one monolithic tool result row.
4992
5009
  - @details Prefers the tool name, compact invocation preview, and success marker for collapsed rows, and falls back to residual execution diagnostics when the tool failed before completing successfully. Runtime is O(n) in compact argument-preview size. No external state is mutated.
4993
5010
  - @param[in] toolName {string} Registered tool name.
@@ -4995,29 +5012,29 @@ cost.
4995
5012
  - @param[in] args {Record<string, unknown> | undefined} Current tool call arguments.
4996
5013
  - @return {string} Compact single-line summary.
4997
5014
 
4998
- ### fn `function buildStructuredToolRenderResult(toolName: string)` (L838-857)
5015
+ ### fn `function buildStructuredToolRenderResult(toolName: string)` (L839-858)
4999
5016
  - @brief Builds a custom `renderResult` implementation for one monolithic tool.
5000
5017
  - @details Reuses a mutable `Text` component when possible, keeps the default collapsed row compact with essential invocation parameters plus result status, and reveals the full monolithic content only when the tool row is expanded. Runtime is O(n) in expanded content length and compact argument-preview size. No external state is mutated.
5001
5018
  - @param[in] toolName {string} Registered tool name.
5002
5019
  - @return {(result: MonolithicToolRenderResult, options: { expanded?: boolean; isPartial?: boolean }, _theme: unknown, context: { args?: Record<string, unknown>; lastComponent?: unknown }) => Text} Custom result renderer.
5003
5020
  - @satisfies REQ-210
5004
5021
 
5005
- ### fn `function executeMonolithicTool(operation: () => ToolResult): ReturnType<typeof buildMonolithicToolExecuteResult>` (L865-871)
5022
+ ### fn `function executeMonolithicTool(operation: () => ToolResult): ReturnType<typeof buildMonolithicToolExecuteResult>` (L866-872)
5006
5023
  - @brief Executes one CLI-style runner for a monolithic agent tool.
5007
5024
  - @details Reuses the standalone tool-runner contract, normalizes thrown failures into `ToolResult`, and wraps the selected stdout or stderr text into the monolithic content channel. Runtime is dominated by the delegated runner. Side effects depend on the selected tool.
5008
5025
  - @param[in] operation {() => ToolResult} Runner callback.
5009
5026
  - @return {ReturnType<typeof buildMonolithicToolExecuteResult>} Monolithic tool execute result.
5010
5027
 
5011
- ### fn `function executeStatusTool(operation: () => ToolResult): ReturnType<typeof buildMonolithicToolExecuteResult>` (L880-909)
5028
+ ### fn `function executeStatusTool(operation: () => ToolResult): ReturnType<typeof buildMonolithicToolExecuteResult>` (L881-910)
5012
5029
  - @brief Executes one CLI-style runner for a status-only agent tool.
5013
5030
  - @details Reuses the standalone tool-runner contract, preserves `content[0].text` as the status-only `success` or `error: <diagnostic>` payload, and strips success-path `stdout_lines` so `details.execution` stays limited to the numeric code plus optional residual stderr diagnostics. Runtime is dominated by the delegated runner. Side effects depend on the selected tool.
5014
5031
  - @param[in] operation {() => ToolResult} Runner callback.
5015
5032
  - @return {ReturnType<typeof buildMonolithicToolExecuteResult>} Status-only tool execute result.
5016
5033
  - @satisfies REQ-294, REQ-295, REQ-296
5017
5034
 
5018
- ### fn `function deliverPromptCommand(` (L921-970)
5035
+ ### fn `function deliverPromptCommand(` (L922-986)
5019
5036
  - @brief Starts delivery of one rendered prompt into the current active session.
5020
- - @details Prefers the replacement-session `sendMessage(...)` helper exposed by `withSession(...)` callbacks after session replacement so post-switch prompt delivery never reuses stale pre-switch session-bound extension objects. Delivers the rendered prompt as a `display:false` custom message with `triggerTurn:true` so the full content reaches the LLM agent without appearing on screen, and emits a `display:true` command invocation summary so the TUI shows only the compact summary. Returns the underlying hidden-delivery promise without awaiting it so callers can record the `running` workflow transition as soon as prompt handoff is accepted instead of waiting for the full agent turn to complete on runtimes whose async replacement-session helpers resolve only after `agent_end`. When pi later invalidates that replacement-session context during successful prompt-end restoration, the helper suppresses the documented stale-extension-context rejection because the prompt was already accepted and late rethrow would surface a false orchestration failure. Falls back to `sendUserMessage(...)` only for non-replacement flows or runtimes that do not expose `sendMessage`. Runtime is O(n) in prompt length. Side effects are limited to hidden prompt delivery plus on-screen summary display.
5037
+ - @details Prefers the replacement-session `sendMessage(...)` helper exposed by `withSession(...)` callbacks after session replacement so post-switch prompt delivery never reuses stale pre-switch session-bound extension objects. Delivers the rendered prompt as a `display:false` custom message with `triggerTurn:true` so the full content reaches the LLM agent without appearing on screen, and emits a `display:true` command invocation summary so the TUI shows only the compact summary. Awaits the non-critical summary delivery and suppresses its failures before dispatching the authoritative hidden prompt turn so a rejecting summary never surfaces as an unhandled rejection that could terminate the process before prompt-end closure runs the worktree merge. Returns the underlying hidden-delivery promise without awaiting the full agent turn so callers can record the `running` workflow transition as soon as prompt handoff is accepted; the returned promise resolves after the hidden prompt message is accepted, which on runtimes whose async replacement-session helpers resolve only after `agent_end` lets prompt-end closure finalize the worktree merge during the awaited delivery. When pi later invalidates that replacement-session context during successful prompt-end restoration, the helper suppresses the documented stale-extension-context rejection because the prompt was already accepted and late rethrow would surface a false orchestration failure. Falls back to `sendUserMessage(...)` only for non-replacement flows or runtimes that do not expose `sendMessage`. Runtime is O(n) in prompt length. Side effects are limited to hidden prompt delivery plus on-screen summary display.
5021
5038
  - @param[in] pi {ExtensionAPI} Handler-scoped extension API instance retained as the fallback dispatcher.
5022
5039
  - @param[in] content {string} Rendered prompt markdown.
5023
5040
  - @param[in] summary {string} Command invocation summary text displayed on screen.
@@ -5025,7 +5042,7 @@ cost.
5025
5042
  - @return {Promise<void>} Promise representing eventual prompt-delivery completion.
5026
5043
  - @satisfies REQ-004, REQ-067, REQ-068, REQ-227, REQ-281, REQ-334, REQ-335, DES-016
5027
5044
 
5028
- ### fn `function shouldIgnoreLatePromptDeliveryFailure(` (L981-997)
5045
+ ### fn `function shouldIgnoreLatePromptDeliveryFailure(` (L997-1013)
5029
5046
  - @brief Detects prompt-delivery failures that can be ignored after prompt ownership has moved past the command handler.
5030
5047
  - @details Matches the documented stale-extension-context runtime error once prompt ownership has already moved beyond command-side preflight. The helper treats the failure as ignorable when the persisted prompt runtime state shows the same execution session as the active prompt run or when the persisted workflow state has already advanced beyond `checking|running`, because rethrowing at that point would incorrectly re-enter command-side abort logic after the prompt was already accepted. Runtime is O(n) in error-message length plus path length. No external state is mutated.
5031
5048
  - @param[in] error {unknown} Candidate prompt-delivery failure.
@@ -5034,7 +5051,7 @@ cost.
5034
5051
  - @return {boolean} `true` when the failure is a late stale-context delivery rejection that MUST be ignored.
5035
5052
  - @satisfies REQ-208, REQ-280, REQ-281, REQ-282
5036
5053
 
5037
- ### fn `function logPromptWorkflowStateChange(` (L1010-1029)
5054
+ ### fn `function logPromptWorkflowStateChange(` (L1026-1045)
5038
5055
  - @brief Appends one workflow-state debug entry for a bundled prompt when selected.
5039
5056
  - @details Reuses the shared debug logger so `req-*` command handlers and prompt-end orchestration can record deterministic workflow transitions without duplicating JSON payload shaping. Runtime is O(n) in serialized payload size only when logging is enabled and O(1) otherwise. Side effects include debug-log file writes for matching enabled prompts.
5040
5057
  - @param[in] projectBase {string} Absolute original project base path.
@@ -5045,7 +5062,7 @@ cost.
5045
5062
  - @return {void} No return value.
5046
5063
  - @satisfies REQ-245, REQ-246, REQ-247
5047
5064
 
5048
- ### fn `function logPromptWorkflowEvent(` (L1045-1065)
5065
+ ### fn `function logPromptWorkflowEvent(` (L1061-1081)
5049
5066
  - @brief Appends one dedicated prompt workflow debug entry when selected.
5050
5067
  - @details Reuses the shared workflow-event logger so prompt activation, restoration, closure, and session-shutdown paths can emit higher-granularity orchestration diagnostics without duplicating JSON payload shaping. Runtime is O(n) in serialized payload size only when logging is enabled and O(1) otherwise. Side effects include debug-log file writes for matching enabled prompts.
5051
5068
  - @param[in] projectBase {string} Absolute original project base path.
@@ -5059,31 +5076,31 @@ cost.
5059
5076
  - @return {void} No return value.
5060
5077
  - @satisfies REQ-245, REQ-246, REQ-247, REQ-277
5061
5078
 
5062
- ### fn `function transitionPromptWorkflowState(` (L1078-1091)
5079
+ ### fn `function transitionPromptWorkflowState(` (L1094-1107)
5063
5080
  - @brief Transitions one prompt workflow state and logs the transition immediately after the state update.
5064
5081
  - @details Captures the previous workflow state, applies the new state through the shared status helper, and appends the gated `workflow_state` debug entry only after the transition has completed. Runtime is O(1). Side effects include status mutation, status-bar rendering, and optional debug-log writes.
5065
5082
  - @param[in] ctx {ExtensionContext | ExtensionCommandContext} Active extension context.
5066
5083
  - @param[in] projectBase {string} Absolute original project base path.
5067
5084
  - @param[in] config {UseReqConfig} Effective project configuration.
5068
5085
  - @param[in] promptName {import("./core/prompt-command-catalog.js").PromptCommandName} Bundled prompt name.
5069
- - @param[in] nextState {DebugWorkflowState} Next workflow state.
5086
+ - @param[in] nextState {import("./core/extension-status.js").PiUsereqWorkflowState} Next workflow state.
5070
5087
  - @param[in,out] statusController {PiUsereqStatusController} Mutable status controller.
5071
5088
  - @return {void} No return value.
5072
5089
 
5073
- ### fn `function resolvePromptCommandDescription(` (L1099-1103)
5090
+ ### fn `function resolvePromptCommandDescription(` (L1115-1119)
5074
5091
  - @brief Resolves the runtime slash-command description for one bundled prompt.
5075
5092
  - @details Reads the bundled prompt markdown, extracts the first `# ` heading payload, and falls back to the historical generated label when the prompt omits a level-one heading. Runtime is O(n) in prompt length. Side effects are limited to filesystem reads.
5076
5093
  - @param[in] promptName {import("./core/prompt-command-catalog.js").PromptCommandName} Bundled prompt name.
5077
5094
  - @return {string} Runtime command description.
5078
5095
 
5079
- ### fn `function resolveDebugProjectBase(cwd: string, statusController: PiUsereqStatusController): string` (L1112-1116)
5096
+ ### fn `function resolveDebugProjectBase(cwd: string, statusController: PiUsereqStatusController): string` (L1128-1132)
5080
5097
  - @brief Resolves the original project base used for debug-log file writes.
5081
5098
  - @details Prefers the active or pending prompt execution plan so tool-result logging during worktree-backed prompt runs persists into the original repository path instead of transient worktree directories. Runtime is O(1). No external state is mutated.
5082
5099
  - @param[in] cwd {string} Current extension working directory.
5083
5100
  - @param[in] statusController {PiUsereqStatusController} Mutable status controller.
5084
5101
  - @return {string} Absolute original project base path for debug logging.
5085
5102
 
5086
- ### fn `function notifyContextSafely(` (L1127-1144)
5103
+ ### fn `function notifyContextSafely(` (L1143-1160)
5087
5104
  - @brief Delivers one best-effort UI notification without failing on stale replacement contexts.
5088
5105
  - @details Attempts to use the supplied extension context for UI notification delivery and suppresses the documented stale-extension-context runtime error raised after session replacement, because prompt-orchestration closure can outlive the context that initiated the switch. Runtime is O(n) in message length. Side effects are limited to user notification delivery when the context is still active.
5089
5106
  - @param[in] ctx {ExtensionContext | ExtensionCommandContext | undefined} Candidate UI context.
@@ -5092,7 +5109,7 @@ cost.
5092
5109
  - @return {boolean} `true` when the notification was delivered and `false` when the context was already stale.
5093
5110
  - @satisfies REQ-280
5094
5111
 
5095
- ### fn `function rejectNonIdleReqCommand(` (L1156-1176)
5112
+ ### fn `function rejectNonIdleReqCommand(` (L1172-1192)
5096
5113
  - @brief Rejects one non-`idle` req-command invocation and records the workflow error state.
5097
5114
  - @details Builds a deterministic busy-state diagnostic from the current workflow state, transitions the shared workflow state to `error`, preserves any pending or active prompt execution metadata for later closure handling, emits an error notification, and throws `ReqError`. Bundled prompt commands reuse `transitionPromptWorkflowState(...)` when cached configuration is available so prompt debug logging captures the actual state transition; specialized non-prompt commands fall back to direct status mutation. Runtime is O(1). Side effects include workflow-state mutation, status-bar rendering, optional debug-log writes, and user notification delivery.
5098
5115
  - @param[in] ctx {ExtensionContext | ExtensionCommandContext} Active extension context.
@@ -5102,20 +5119,20 @@ cost.
5102
5119
  - @throws {ReqError} Always throws because non-`idle` req commands are rejected.
5103
5120
  - @satisfies REQ-224
5104
5121
 
5105
- ### fn `function getPiUsereqStartupTools(pi: ExtensionAPI): ToolInfo[]` (L1185-1193)
5122
+ ### fn `function getPiUsereqStartupTools(pi: ExtensionAPI): ToolInfo[]` (L1201-1209)
5106
5123
  - @brief Returns the configurable active-tool inventory visible to the extension.
5107
5124
  - @details Filters runtime tools against the canonical configurable-tool set, keeps only builtin-backed embedded tools, and orders the result by the documented custom/files/embedded/default-disabled grouping. Runtime is O(t log t). No external state is mutated.
5108
5125
  - @param[in] pi {ExtensionAPI} Active extension API instance.
5109
5126
  - @return {ToolInfo[]} Sorted configurable tool descriptors.
5110
5127
  - @satisfies REQ-007, REQ-063, REQ-231, REQ-232
5111
5128
 
5112
- ### fn `function getConfiguredEnabledPiUsereqTools(config: UseReqConfig): string[]` (L1201-1205)
5129
+ ### fn `function getConfiguredEnabledPiUsereqTools(config: UseReqConfig): string[]` (L1217-1221)
5113
5130
  - @brief Normalizes and returns the configured enabled active tools.
5114
5131
  - @details Reuses repository normalization rules, updates the config object in place, and returns the normalized array. Runtime is O(n) in configured tool count. Side effect: mutates `config["enabled-tools"]`.
5115
5132
  - @param[in,out] config {UseReqConfig} Mutable configuration object.
5116
5133
  - @return {string[]} Normalized enabled tool names.
5117
5134
 
5118
- ### fn `function applyConfiguredPiUsereqTools(pi: ExtensionAPI, config: UseReqConfig): void` (L1215-1232)
5135
+ ### fn `function applyConfiguredPiUsereqTools(pi: ExtensionAPI, config: UseReqConfig): void` (L1231-1248)
5119
5136
  - @brief Applies the configured active-tool enablement to the current session.
5120
5137
  - @details Preserves non-configurable active tools, removes every configurable tool from the active set, then re-adds only configured tools that exist in the current runtime inventory. Runtime is O(t). Side effects include `pi.setActiveTools(...)`.
5121
5138
  - @param[in] pi {ExtensionAPI} Active extension API instance.
@@ -5123,7 +5140,7 @@ cost.
5123
5140
  - @return {void} No return value.
5124
5141
  - @satisfies REQ-009, REQ-064
5125
5142
 
5126
- ### fn `async function handleExtensionStatusEvent(` (L1245-1516)
5143
+ ### fn `async function handleExtensionStatusEvent(` (L1261-1539)
5127
5144
  - @brief Handles one intercepted pi lifecycle hook for pi-usereq status updates.
5128
5145
  - @details Applies session-start-specific resource validation, project-config refresh, startup-tool enablement, and selected debug-tool logging before forwarding the originating hook name and payload into the shared `updateExtensionStatus(...)` pipeline. Before `agent_start`, re-verifies any prepared prompt execution session switch. On `agent_end`, dispatches configured command-notify, sound, and prompt-specific Pushover effects, logs dedicated workflow-closure diagnostics, restores the original session-backed `base-path` for every matched worktree-backed completion by reusing persisted replacement-session command contexts when event contexts omit `switchSession()`, executes the stash-assisted merge-and-delete finalization path for every matched successful worktree-backed completion even when a later busy-command rejection already moved workflow state to `error`, emits a warning-only notification when restored `base-path` changes are reapplied after merge, tolerates stale replacement-session notification contexts after session replacement, retains the worktree plus notifies closure failure for interrupted or failed outcomes, logs selected prompt workflow transitions, and transitions workflow state through `merging`, `error`, and `idle` as required. On `session_shutdown`, captures pre-update prompt snapshots so workflow-shutdown diagnostics and same-runtime command continuation preserve the active prompt workflow state across switch-triggered rebinding, then disposes the shared controller. Runtime is dominated by configuration loading during `session_start` and git finalization during matched successful `agent_end` handling; all other hooks are O(1). Side effects include resource checks, active-tool mutation, active-session replacement, status updates, live-ticker disposal on shutdown, optional child-process spawning, outbound HTTPS requests, branch merges, worktree deletion, and optional debug-log writes.
5129
5146
  - @param[in] pi {ExtensionAPI} Active extension API instance.
@@ -5134,7 +5151,7 @@ cost.
5134
5151
  - @return {Promise<void>} Promise resolved when hook processing completes.
5135
5152
  - @satisfies REQ-117, REQ-118, REQ-119, REQ-131, REQ-132, REQ-133, REQ-166, REQ-167, REQ-168, REQ-169, REQ-172, REQ-176, REQ-178, REQ-184, REQ-185, REQ-186, REQ-187, REQ-208, REQ-209, REQ-221, REQ-228, REQ-229, REQ-230, REQ-244, REQ-245, REQ-246, REQ-247, REQ-276, REQ-277, REQ-278, REQ-279, REQ-280, REQ-291, REQ-292
5136
5153
 
5137
- ### fn `function registerExtensionStatusHooks(` (L1532-1551)
5154
+ ### fn `function registerExtensionStatusHooks(` (L1555-1574)
5138
5155
  - @brief Registers shared wrappers for every supported pi lifecycle hook.
5139
5156
  - @details Installs one generic wrapper per intercepted hook so every resource,
5140
5157
  session, agent, model, tool, bash, and input event is routed through the
@@ -5148,7 +5165,7 @@ registered hook count. Side effects include hook registration.
5148
5165
  - @return {void} No return value.
5149
5166
  - @satisfies DES-002, REQ-113, REQ-114, REQ-115, REQ-116, REQ-117
5150
5167
 
5151
- ### fn `function setConfiguredPiUsereqTools(pi: ExtensionAPI, config: UseReqConfig, enabledTools: string[]): void` (L1561-1564)
5168
+ ### fn `function setConfiguredPiUsereqTools(pi: ExtensionAPI, config: UseReqConfig, enabledTools: string[]): void` (L1584-1587)
5152
5169
  - @brief Replaces the configured active-tool selection and applies it immediately.
5153
5170
  - @details Normalizes the requested tool names, stores them in config, and synchronizes the active tool set with runtime registration state. Runtime is O(n + t). Side effect: mutates config and active tools.
5154
5171
  - @param[in] pi {ExtensionAPI} Active extension API instance.
@@ -5156,26 +5173,26 @@ registered hook count. Side effects include hook registration.
5156
5173
  - @param[in,out] config {UseReqConfig} Mutable configuration object.
5157
5174
  - @return {void} No return value.
5158
5175
 
5159
- ### fn `function getDebugToolToggleNames(): PiUsereqStartupToolName[]` (L1572-1574)
5176
+ ### fn `function getDebugToolToggleNames(): PiUsereqStartupToolName[]` (L1595-1597)
5160
5177
  - @brief Returns the canonical debug-tool toggle order.
5161
5178
  - @details Reuses the documented configurable-tool ordering so debug toggles list extension-owned tools before embedded tools and remain deterministic across sessions. Runtime is O(t log t). No external state is mutated.
5162
5179
  - @return {PiUsereqStartupToolName[]} Ordered debug-tool toggle names.
5163
5180
  - @satisfies REQ-242
5164
5181
 
5165
- ### fn `function resetDebugConfigToDefaults(config: UseReqConfig): void` (L1583-1592)
5182
+ ### fn `function resetDebugConfigToDefaults(config: UseReqConfig): void` (L1606-1615)
5166
5183
  - @brief Restores the debug configuration subtree to its documented defaults.
5167
5184
  - @details Resets global debug enablement, log path, tool-wrapper command registration, workflow-state filter, dedicated workflow-event logging, and selected tool plus prompt debug toggles without mutating unrelated settings. Runtime is O(1). Side effect: mutates `config`.
5168
5185
  - @param[in,out] config {UseReqConfig} Mutable configuration object.
5169
5186
  - @return {void} No return value.
5170
5187
  - @satisfies REQ-236, REQ-237, REQ-238, REQ-239, REQ-195, REQ-277, REQ-322
5171
5188
 
5172
- ### fn `function formatDebugMenuSummary(config: UseReqConfig): string` (L1600-1606)
5189
+ ### fn `function formatDebugMenuSummary(config: UseReqConfig): string` (L1623-1629)
5173
5190
  - @brief Formats the top-level Debug summary value.
5174
5191
  - @details Emits the current global debug mode plus compact selected-tool and selected-prompt counts for right-aligned menu display. Runtime is O(n) in configured selector count. No external state is mutated.
5175
5192
  - @param[in] config {UseReqConfig} Effective project configuration.
5176
5193
  - @return {string} Compact debug summary string.
5177
5194
 
5178
- ### fn `function buildDebugMenuChoice(` (L1616-1629)
5195
+ ### fn `function buildDebugMenuChoice(` (L1639-1652)
5179
5196
  - @brief Builds one debug-menu row with optional disabled styling.
5180
5197
  - @details Applies dim styling and disables selection whenever global debug is off for all rows except the global `Debug` toggle row. Runtime is O(1). No external state is mutated.
5181
5198
  - @param[in] choice {PiUsereqSettingsMenuChoice} Base debug-menu row.
@@ -5183,21 +5200,21 @@ registered hook count. Side effects include hook registration.
5183
5200
  - @return {PiUsereqSettingsMenuChoice} Styled debug-menu row.
5184
5201
  - @satisfies REQ-241
5185
5202
 
5186
- ### fn `async function selectDebugLogOnStatus(` (L1638-1666)
5203
+ ### fn `async function selectDebugLogOnStatus(` (L1661-1689)
5187
5204
  - @brief Opens the workflow-state filter selector used by the Debug submenu.
5188
5205
  - @details Exposes `any` plus each canonical workflow state through the shared settings-menu renderer and returns the selected normalized filter or `undefined` when the user cancels the submenu. Runtime depends on user interaction count. Side effects are limited to transient custom-UI rendering.
5189
5206
  - @param[in] ctx {ExtensionCommandContext} Active command context.
5190
5207
  - @param[in] currentValue {DebugLogOnStatus} Current persisted workflow-state filter.
5191
5208
  - @return {Promise<DebugLogOnStatus | undefined>} Selected workflow-state filter or `undefined` when cancelled.
5192
5209
 
5193
- ### fn `function buildDebugMenuChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L1675-1761)
5210
+ ### fn `function buildDebugMenuChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L1698-1784)
5194
5211
  - @brief Builds the shared settings-menu choices for debug logging configuration.
5195
5212
  - @details Serializes global debug controls plus tool-wrapper command registration, workflow-state, dedicated workflow-event, per-tool, and per-prompt toggles into one submenu, deriving inventories from the canonical tool and prompt lists and dimming locked rows while debug is disabled. Runtime is O(t + p). No external state is mutated.
5196
5213
  - @param[in] config {UseReqConfig} Effective project configuration.
5197
5214
  - @return {PiUsereqSettingsMenuChoice[]} Ordered debug-menu choices.
5198
5215
  - @satisfies REQ-240, REQ-241, REQ-242, REQ-243, REQ-193, REQ-277, REQ-321, REQ-322
5199
5216
 
5200
- ### fn `async function configureDebugMenu(` (L1772-1962)
5217
+ ### fn `async function configureDebugMenu(` (L1795-1985)
5201
5218
  - @brief Runs the interactive Debug submenu.
5202
5219
  - @details Lets the user toggle global debug enablement, tool-wrapper command registration, debug file and workflow filters, dedicated workflow-event logging, per-tool selectors, and per-prompt selectors while preserving row focus across re-renders. Runtime depends on user interaction count. Side effects include UI updates, config mutation, and optional debug command registration.
5203
5220
  - @param[in] pi {ExtensionAPI} Active extension API instance.
@@ -5206,47 +5223,47 @@ registered hook count. Side effects include hook registration.
5206
5223
  - @return {Promise<void>} Promise resolved when the submenu closes.
5207
5224
  - @satisfies REQ-236, REQ-237, REQ-238, REQ-239, REQ-240, REQ-241, REQ-242, REQ-243, REQ-192, REQ-193, REQ-195, REQ-277, REQ-321, REQ-322, REQ-323
5208
5225
 
5209
- ### fn `const updateDebugToolCommandsEnabled = (nextValue: unknown): void =>` (L1778-1785)
5226
+ ### fn `const updateDebugToolCommandsEnabled = (nextValue: unknown): void =>` (L1801-1808)
5210
5227
 
5211
- - type `type PiNotifyBooleanConfigKey =` (L1968)
5228
+ - type `type PiNotifyBooleanConfigKey =` (L1991)
5212
5229
  - @brief Represents one persisted boolean notification-setting key.
5213
5230
  - @details Restricts menu toggles to the global enable flags and completed/interrupted/failed event toggles used by command-notify, sound, and Pushover configuration. Compile-time only and introduces no runtime cost.
5214
- - type `type PiNotifyEventBooleanConfigKey = Exclude<` (L1985)
5231
+ - type `type PiNotifyEventBooleanConfigKey = Exclude<` (L2008)
5215
5232
  - @brief Represents one persisted boolean notification event-toggle key.
5216
5233
  - @details Restricts shared event-submenu mutation helpers to completed/interrupted/failed toggles and excludes global enable flags. Compile-time only and introduces no runtime cost.
5217
- - type `type PiNotifyEventId = "completed" | "interrupted" | "failed";` (L1994)
5234
+ - type `type PiNotifyEventId = "completed" | "interrupted" | "failed";` (L2017)
5218
5235
  - @brief Represents one shared prompt-end event identifier used by notification menus.
5219
5236
  - @details Restricts event-submenu rendering to the canonical completed/interrupted/failed domain shared by command-notify, sound, and Pushover routing. Compile-time only and introduces no runtime cost.
5220
- ### iface `interface PiNotifyEventRowDefinition` (L2000-2004)
5237
+ ### iface `interface PiNotifyEventRowDefinition` (L2023-2027)
5221
5238
  - @brief Describes one shared prompt-end event row rendered inside notification event submenus.
5222
5239
  - @details Binds one canonical event identifier to the human-readable label and terminal-outcome description reused across command-notify, sound, and Pushover event menus. The interface is compile-time only and introduces no runtime cost.
5223
5240
 
5224
- ### iface `interface PiNotifyEventMenuDefinition` (L2010-2016)
5241
+ ### iface `interface PiNotifyEventMenuDefinition` (L2033-2039)
5225
5242
  - @brief Describes one notification-system event submenu contract.
5226
5243
  - @details Binds the top-level launcher row, submenu title, toast prefix, and completed/interrupted/failed config keys for one notification transport. The interface is compile-time only and introduces no runtime cost.
5227
5244
 
5228
- ### fn `function togglePiNotifyFlag(config: UseReqConfig, key: PiNotifyBooleanConfigKey): boolean` (L2025-2028)
5245
+ ### fn `function togglePiNotifyFlag(config: UseReqConfig, key: PiNotifyBooleanConfigKey): boolean` (L2048-2051)
5229
5246
  - @brief Flips one persisted boolean notification setting.
5230
5247
  - @details Negates the selected configuration flag in place and returns the resulting boolean value so callers can emit deterministic UI feedback. Runtime is O(1). Side effect: mutates `config`.
5231
5248
  - @param[in] key {PiNotifyBooleanConfigKey} Boolean configuration key to toggle.
5232
5249
  - @param[in,out] config {UseReqConfig} Mutable configuration object.
5233
5250
  - @return {boolean} Next enabled state.
5234
5251
 
5235
- ### fn `function resetPiNotifyConfigToDefaults(config: UseReqConfig): void` (L2037-2061)
5252
+ ### fn `function resetPiNotifyConfigToDefaults(config: UseReqConfig): void` (L2060-2084)
5236
5253
  - @brief Restores notification-related settings to their documented defaults.
5237
5254
  - @details Copies the command-notify, sound, and Pushover configuration subtree from a fresh default config into the supplied mutable project config. Runtime is O(1). Side effect: mutates `config`.
5238
5255
  - @param[in,out] config {UseReqConfig} Mutable configuration object.
5239
5256
  - @return {void} No return value.
5240
5257
  - @satisfies REQ-174, REQ-178, REQ-184, REQ-195, REQ-196
5241
5258
 
5242
- ### fn `function formatPiNotifyPushoverPriority(priority: PiNotifyPushoverPriority): string` (L2070-2072)
5259
+ ### fn `function formatPiNotifyPushoverPriority(priority: PiNotifyPushoverPriority): string` (L2093-2095)
5243
5260
  - @brief Formats one persisted Pushover priority for menu display.
5244
5261
  - @details Maps the canonical `0|1` priority domain to deterministic `Normal|High` labels reused by the Pushover configuration UI. Runtime is O(1). No external state is mutated.
5245
5262
  - @param[in] priority {PiNotifyPushoverPriority} Persisted Pushover priority.
5246
5263
  - @return {string} Menu-display label.
5247
5264
  - @satisfies REQ-172
5248
5265
 
5249
- ### fn `function formatPiNotifyEventMenuSummary(` (L2156-2164)
5266
+ ### fn `function formatPiNotifyEventMenuSummary(` (L2179-2187)
5250
5267
  - @brief Formats the top-level summary value for one notification event submenu.
5251
5268
  - @details Counts enabled completed/interrupted/failed toggles for the selected transport and renders the result as `n/3 on` for right-aligned menu display. Runtime is O(1). No external state is mutated.
5252
5269
  - @param[in] config {UseReqConfig} Effective project configuration.
@@ -5254,7 +5271,7 @@ registered hook count. Side effects include hook registration.
5254
5271
  - @return {string} Compact enabled-toggle summary.
5255
5272
  - @satisfies REQ-198
5256
5273
 
5257
- ### fn `function buildPiNotifyEventLauncherChoice(` (L2174-2184)
5274
+ ### fn `function buildPiNotifyEventLauncherChoice(` (L2197-2207)
5258
5275
  - @brief Builds the top-level launcher row for one notification event submenu.
5259
5276
  - @details Reuses the shared completed/interrupted/failed summary renderer so the `Notifications` menu can expose dedicated event editors for command-notify, sound, and Pushover in a uniform shape. Runtime is O(1). No external state is mutated.
5260
5277
  - @param[in] config {UseReqConfig} Effective project configuration.
@@ -5262,7 +5279,7 @@ registered hook count. Side effects include hook registration.
5262
5279
  - @return {PiUsereqSettingsMenuChoice} Launcher row for the selected event submenu.
5263
5280
  - @satisfies REQ-181, REQ-183, REQ-165, REQ-198
5264
5281
 
5265
- ### fn `function buildPiNotifyEventMenuChoices(` (L2194-2210)
5282
+ ### fn `function buildPiNotifyEventMenuChoices(` (L2217-2233)
5266
5283
  - @brief Builds the shared settings-menu choices for one notification event submenu.
5267
5284
  - @details Serializes completed/interrupted/failed rows with right-aligned `on|off` values, then appends a value-less `Reset defaults` row for submenu-scoped mutation control. Runtime is O(1). No external state is mutated.
5268
5285
  - @param[in] config {UseReqConfig} Effective project configuration.
@@ -5270,7 +5287,7 @@ registered hook count. Side effects include hook registration.
5270
5287
  - @return {PiUsereqSettingsMenuChoice[]} Ordered event-submenu choice vector.
5271
5288
  - @satisfies REQ-188, REQ-193, REQ-198
5272
5289
 
5273
- ### fn `function resetPiNotifyEventMenuToDefaults(` (L2220-2228)
5290
+ ### fn `function resetPiNotifyEventMenuToDefaults(` (L2243-2251)
5274
5291
  - @brief Restores one notification event submenu to its documented defaults.
5275
5292
  - @details Copies only the completed/interrupted/failed toggles referenced by the supplied submenu contract from a fresh default config into the mutable project config. Runtime is O(1). Side effect: mutates `config`.
5276
5293
  - @param[in] eventMenu {PiNotifyEventMenuDefinition} Notification-system event submenu contract.
@@ -5278,7 +5295,7 @@ registered hook count. Side effects include hook registration.
5278
5295
  - @return {void} No return value.
5279
5296
  - @satisfies REQ-174, REQ-178, REQ-184, REQ-195
5280
5297
 
5281
- ### fn `function resolvePiNotifyEventLabel(` (L2238-2245)
5298
+ ### fn `function resolvePiNotifyEventLabel(` (L2261-2268)
5282
5299
  - @brief Resolves the human-readable event label for one event-toggle config key.
5283
5300
  - @details Matches the supplied config key against the submenu contract and returns the corresponding completed/interrupted/failed menu label for deterministic notification toasts. Runtime is O(1). No external state is mutated.
5284
5301
  - @param[in] key {PiNotifyEventBooleanConfigKey} Event-toggle configuration key.
@@ -5286,7 +5303,7 @@ registered hook count. Side effects include hook registration.
5286
5303
  - @return {string} Human-readable event label.
5287
5304
  - @satisfies REQ-188, REQ-198
5288
5305
 
5289
- ### fn `async function configurePiNotifyEventMenu(` (L2256-2332)
5306
+ ### fn `async function configurePiNotifyEventMenu(` (L2279-2355)
5290
5307
  - @brief Runs one dedicated notification event submenu.
5291
5308
  - @details Reuses the shared settings-menu renderer to toggle completed/interrupted/failed delivery flags, preserve row focus, and apply submenu-scoped reset semantics for command-notify, sound, or Pushover events. Runtime depends on user interaction count. Side effects include UI updates and config mutation.
5292
5309
  - @param[in] ctx {ExtensionCommandContext} Active command context.
@@ -5295,14 +5312,14 @@ registered hook count. Side effects include hook registration.
5295
5312
  - @return {Promise<void>} Promise resolved when the submenu closes.
5296
5313
  - @satisfies REQ-188, REQ-192, REQ-193, REQ-195, REQ-198
5297
5314
 
5298
- ### fn `function buildPiNotifyPushoverRows(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L2341-2391)
5315
+ ### fn `function buildPiNotifyPushoverRows(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L2364-2414)
5299
5316
  - @brief Builds the direct Pushover rows rendered inside `Notifications`.
5300
5317
  - @details Serializes the global enable flag, shared-event submenu launcher, priority, title, text, and credential rows into right-valued menu items appended after the sound-command rows, dims and disables the enable row until both credentials are populated, renders the locked value as `configure user/token keys first`, and escapes control characters for the single-line `Pushover text` value. Runtime is O(n) in the rendered text-template length. No external state is mutated.
5301
5318
  - @param[in] config {UseReqConfig} Effective project configuration.
5302
5319
  - @return {PiUsereqSettingsMenuChoice[]} Ordered direct Pushover rows.
5303
5320
  - @satisfies REQ-163, REQ-165, REQ-172, REQ-184, REQ-185, REQ-198, REQ-234, REQ-235
5304
5321
 
5305
- ### fn `async function selectPiNotifyPushoverPriority(` (L2401-2429)
5322
+ ### fn `async function selectPiNotifyPushoverPriority(` (L2424-2452)
5306
5323
  - @brief Opens the shared settings-menu selector for Pushover priority.
5307
5324
  - @details Reuses the pi-usereq settings-menu renderer so Pushover priority selection remains stylistically aligned with the notification menus and appends a value-less subtree-local `Reset defaults` row. Runtime depends on user interaction count. Side effects are limited to transient custom-UI rendering.
5308
5325
  - @param[in] ctx {ExtensionCommandContext} Active command context.
@@ -5310,14 +5327,14 @@ registered hook count. Side effects include hook registration.
5310
5327
  - @return {Promise<PiNotifyPushoverPriority | "reset-defaults" | undefined>} Selected priority, reset action, or `undefined` when cancelled.
5311
5328
  - @satisfies REQ-172, REQ-192
5312
5329
 
5313
- ### fn `function buildPiNotifyMenuChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L2438-2496)
5330
+ ### fn `function buildPiNotifyMenuChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L2461-2519)
5314
5331
  - @brief Builds the shared settings-menu choices for notification configuration.
5315
5332
  - @details Serializes command-notify, sound, and Pushover blocks with dedicated shared-event submenu launchers so the settings-menu renderer can expose one unified but modular configuration surface, including locked Pushover enablement, persisted boot-sound rows that stay decoupled from the active runtime sound level, and escaped single-line rendering for `Pushover text`. Runtime is O(n) in the longest rendered command or text field. No external state is mutated.
5316
5333
  - @param[in] config {UseReqConfig} Effective project configuration.
5317
5334
  - @return {PiUsereqSettingsMenuChoice[]} Ordered notification-menu choice vector.
5318
5335
  - @satisfies REQ-137, REQ-149, REQ-150, REQ-151, REQ-152, REQ-163, REQ-164, REQ-165, REQ-172, REQ-179, REQ-181, REQ-183, REQ-188, REQ-193, REQ-198, REQ-234, REQ-235, REQ-289
5319
5336
 
5320
- ### fn `async function selectPiNotifySoundLevel(` (L2506-2546)
5337
+ ### fn `async function selectPiNotifySoundLevel(` (L2529-2569)
5321
5338
  - @brief Opens the shared settings-menu selector for the persisted boot sound level.
5322
5339
  - @details Reuses the pi-usereq settings-menu renderer so boot-sound selection remains stylistically aligned with the notification menu, keeps the active runtime sound level unchanged, and appends a value-less subtree-local `Reset defaults` row. Runtime depends on user interaction count. Side effects are limited to transient custom-UI rendering.
5323
5340
  - @param[in] ctx {ExtensionCommandContext} Active command context.
@@ -5325,7 +5342,7 @@ registered hook count. Side effects include hook registration.
5325
5342
  - @return {Promise<PiNotifySoundLevel | "reset-defaults" | undefined>} Selected boot sound level, reset action, or `undefined` when cancelled.
5326
5343
  - @satisfies REQ-131, REQ-179, REQ-192, REQ-289
5327
5344
 
5328
- ### fn `async function configurePiNotifyMenu(` (L2556-2842)
5345
+ ### fn `async function configurePiNotifyMenu(` (L2579-2865)
5329
5346
  - @brief Runs the interactive notification-configuration menu.
5330
5347
  - @details Exposes command-notify, sound, and Pushover controls through the shared settings-menu renderer, persists every notification subtree mutation into global configuration, delegates completed/interrupted/failed toggles to dedicated event submenus, preserves boot-sound edits without altering the active runtime sound level, keeps `Enable pushover` locked until both credentials are populated, decodes escaped control-sequence input for `Pushover text`, and preserves row focus across menu re-renders. Runtime depends on user interaction count. Side effects include UI updates and config mutation.
5331
5348
  - @param[in] ctx {ExtensionCommandContext} Active command context.
@@ -5333,7 +5350,7 @@ registered hook count. Side effects include hook registration.
5333
5350
  - @return {Promise<boolean>} `true` when the sound-toggle shortcut changed.
5334
5351
  - @satisfies REQ-131, REQ-133, REQ-134, REQ-137, REQ-163, REQ-164, REQ-165, REQ-172, REQ-179, REQ-181, REQ-183, REQ-184, REQ-188, REQ-192, REQ-193, REQ-195, REQ-196, REQ-198, REQ-234, REQ-235, REQ-288, REQ-289
5335
5352
 
5336
- ### fn `function registerPiNotifyShortcut(` (L2857-2880)
5353
+ ### fn `function registerPiNotifyShortcut(` (L2880-2903)
5337
5354
  - @brief Registers the configurable notification-sound shortcut when supported.
5338
5355
  - @details Loads the current effective config, registers one raw pi shortcut when
5339
5356
  the runtime exposes `registerShortcut(...)`, cycles only the active runtime
@@ -5346,15 +5363,15 @@ registration and status updates.
5346
5363
  - @return {void} No return value.
5347
5364
  - @satisfies REQ-134, REQ-180, REQ-286, REQ-287
5348
5365
 
5349
- ### fn `function resolveReqResetPromptRequest(` (L2888-2914)
5366
+ ### fn `function resolveReqResetPromptRequest(` (L2911-2937)
5350
5367
  - @brief Resolves the prompt execution plan targeted by `req-reset` recovery.
5351
5368
  - @details Prefers the current in-memory active request, then the current in-memory pending request, then the process-scoped persisted prompt runtime state so the dedicated reset command can recover from same-host unclean prompt termination after session replacement. Runtime is O(1). No external state is mutated.
5352
5369
  - @param[in] statusController {PiUsereqStatusController} Mutable status controller.
5353
5370
  - @return {PromptCommandExecutionPlan | undefined} Recoverable prompt execution plan when one remains available.
5354
5371
 
5355
- ### fn `const isWorktreeBacked = (request: PromptCommandExecutionPlan | undefined): request is PromptCommandExecutionPlan =>` (L2891-2898)
5372
+ ### fn `const isWorktreeBacked = (request: PromptCommandExecutionPlan | undefined): request is PromptCommandExecutionPlan =>` (L2914-2921)
5356
5373
 
5357
- ### fn `function registerReqResetCommand(` (L2924-2978)
5374
+ ### fn `function registerReqResetCommand(` (L2947-3001)
5358
5375
  - @brief Registers the specialized `req-reset` slash command.
5359
5376
  - @details Registers the non-agentic prompt-recovery command that accepts any current workflow state, reuses persisted prompt runtime state when available, restores the original session-backed `base-path`, force-removes matching generated worktrees plus branches, clears recoverable prompt state when restoration succeeds, and notifies pi without starting an LLM session or creating a worktree. Runtime is dominated by session restoration plus git cleanup. Side effects include command registration, status-controller mutation, active-session replacement, worktree deletion, branch deletion, and user notifications.
5360
5377
  - @param[in] pi {ExtensionAPI} Active extension API instance.
@@ -5362,7 +5379,7 @@ registration and status updates.
5362
5379
  - @return {void} No return value.
5363
5380
  - @satisfies REQ-304, REQ-305, REQ-306, REQ-307, REQ-308, REQ-309, REQ-310, REQ-311, REQ-312, REQ-313
5364
5381
 
5365
- ### fn `function registerReqReferencesCommand(` (L2988-3028)
5382
+ ### fn `function registerReqReferencesCommand(` (L3011-3051)
5366
5383
  - @brief Registers the specialized `req-references` slash command.
5367
5384
  - @details Registers the non-agentic references-maintenance command that rejects non-`idle` invocations by transitioning workflow state to `error` before direct execution, otherwise reuses slash-command-owned git validation, transitions workflow state through `checking|running|idle`, regenerates `REFERENCES.md` directly from configured source directories, stages only the generated file, creates the fixed-message git commit, verifies repository cleanliness, and notifies pi without starting an LLM session or creating a worktree. Runtime is dominated by git subprocess execution plus source-summary generation. Side effects include command registration, status-controller mutation, filesystem writes, git index/history mutation, and user notifications.
5368
5385
  - @param[in] pi {ExtensionAPI} Active extension API instance.
@@ -5370,7 +5387,7 @@ registration and status updates.
5370
5387
  - @return {void} No return value.
5371
5388
  - @satisfies REQ-200, REQ-221, REQ-224, REQ-298, REQ-299, REQ-300, REQ-301, REQ-302, REQ-303
5372
5389
 
5373
- ### fn `function registerPromptCommands(` (L3038-3159)
5390
+ ### fn `function registerPromptCommands(` (L3061-3182)
5374
5391
  - @brief Registers bundled prompt-backed commands with the extension.
5375
5392
  - @details Creates one prompt-template-backed `req-<prompt>` command per bundled prompt name. Each handler rejects non-`idle` workflow state by transitioning the shared workflow state to `error` before command-side preflight, otherwise transitions the shared workflow state through `checking`, `error`, and `running`, runs dedicated prompt-command git and required-doc preflight checks, optionally prepares a dedicated worktree execution plan using the active session directory, persists the prompt metadata needed for switch-triggered rebinding, switches the active session to the verified execution cwd before prompt handoff, logs dedicated workflow-activation diagnostics, renders the prompt, starts prompt delivery into the forked active session, records `running` immediately after delivery handoff begins, and then awaits the wrapped prompt-delivery promise whose stale post-restore rejections are suppressed. Runtime is O(p) for registration; handler cost depends on prompt preflight, worktree preparation, session switching, prompt rendering, prompt dispatch, and optional debug logging. Side effects include command registration, status-controller mutation, worktree creation, active-session replacement, optional worktree rollback, user-message delivery during execution, and optional debug-log writes.
5376
5393
  - @param[in] pi {ExtensionAPI} Active extension API instance.
@@ -5378,14 +5395,14 @@ registration and status updates.
5378
5395
  - @return {void} No return value.
5379
5396
  - @satisfies REQ-004, REQ-067, REQ-068, REQ-169, REQ-200, REQ-201, REQ-202, REQ-203, REQ-206, REQ-207, REQ-219, REQ-220, REQ-221, REQ-224, REQ-225, REQ-226, REQ-227, REQ-245, REQ-246, REQ-247, REQ-277, REQ-281
5380
5397
 
5381
- ### fn `function registerAgentTools(pi: ExtensionAPI): void` (L3169-3468)
5398
+ ### fn `function registerAgentTools(pi: ExtensionAPI): void` (L3192-3491)
5382
5399
  - @brief Registers pi-usereq agent tools exposed to the model.
5383
5400
  - @details Defines the tool schemas, prompt metadata, and execution handlers that bridge extension tool calls into tool-runner operations without registering duplicate custom slash commands for the same capabilities. Runtime is O(t) for registration; execution cost depends on the selected tool. Side effects include tool registration.
5384
5401
  - @param[in] pi {ExtensionAPI} Active extension API instance.
5385
5402
  - @return {void} No return value.
5386
5403
  - @satisfies REQ-005, REQ-010, REQ-011, REQ-014, REQ-017, REQ-044, REQ-069, REQ-070, REQ-071, REQ-072, REQ-073, REQ-074, REQ-075, REQ-076, REQ-077, REQ-078, REQ-079, REQ-080, REQ-089, REQ-090, REQ-091, REQ-092, REQ-093, REQ-094, REQ-095, REQ-096, REQ-097, REQ-098, REQ-099, REQ-100, REQ-101, REQ-102, REQ-293, REQ-294, REQ-295, REQ-296, REQ-297
5387
5404
 
5388
- ### fn `function buildPiUsereqToolsMenuChoices(pi: ExtensionAPI, config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L3513-3538)
5405
+ ### fn `function buildPiUsereqToolsMenuChoices(pi: ExtensionAPI, config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L3536-3561)
5389
5406
  - @brief Builds the shared settings-menu choices for startup-tool management.
5390
5407
  - @details Serializes startup-tool actions into right-valued menu rows consumed by the shared settings-menu renderer while omitting the removed status-reference action. Runtime is O(t) in configurable-tool count. No external state is mutated.
5391
5408
  - @param[in] pi {ExtensionAPI} Active extension API instance.
@@ -5393,7 +5410,7 @@ registration and status updates.
5393
5410
  - @return {PiUsereqSettingsMenuChoice[]} Ordered startup-tool menu choices.
5394
5411
  - @satisfies REQ-007, REQ-150, REQ-151, REQ-152, REQ-153, REQ-154, REQ-193
5395
5412
 
5396
- ### fn `function buildPiUsereqToolToggleChoices(pi: ExtensionAPI, config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L3548-3562)
5413
+ ### fn `function buildPiUsereqToolToggleChoices(pi: ExtensionAPI, config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L3571-3585)
5397
5414
  - @brief Builds the shared settings-menu choices for per-tool startup toggles.
5398
5415
  - @details Exposes every configurable startup tool as one row whose right-side value reports the current enabled state, preserves the documented custom/files/embedded/default-disabled ordering, and appends a value-less subtree-local `Reset defaults` row. Runtime is O(t) in configurable-tool count. No external state is mutated.
5399
5416
  - @param[in] pi {ExtensionAPI} Active extension API instance.
@@ -5401,7 +5418,7 @@ registration and status updates.
5401
5418
  - @return {PiUsereqSettingsMenuChoice[]} Ordered per-tool toggle choices.
5402
5419
  - @satisfies REQ-007, REQ-151, REQ-152, REQ-153, REQ-154, REQ-231, REQ-232
5403
5420
 
5404
- ### fn `async function configurePiUsereqToolsMenu(` (L3573-3690)
5421
+ ### fn `async function configurePiUsereqToolsMenu(` (L3596-3713)
5405
5422
  - @brief Runs the interactive active-tool configuration menu.
5406
5423
  - @details Synchronizes runtime active tools with the effective config, renders startup-tool actions through the shared settings-menu UI, persists enablement changes into global configuration, preserves the documented per-tool ordering, and updates configuration state in response to selections until the user exits. Runtime depends on user interaction count. Side effects include UI updates, active-tool changes, and config mutation.
5407
5424
  - @param[in] pi {ExtensionAPI} Active extension API instance.
@@ -5410,58 +5427,58 @@ registration and status updates.
5410
5427
  - @return {Promise<void>} Promise resolved when the menu closes.
5411
5428
  - @satisfies REQ-007, REQ-063, REQ-064, REQ-150, REQ-151, REQ-152, REQ-153, REQ-154, REQ-193, REQ-231, REQ-232
5412
5429
 
5413
- ### fn `function getStaticCheckLanguageConfigForMenu(` (L3699-3704)
5430
+ ### fn `function getStaticCheckLanguageConfigForMenu(` (L3722-3727)
5414
5431
  - @brief Resolves one static-check language config for menu rendering.
5415
5432
  - @details Returns the configured per-language static-check object when present and otherwise synthesizes a disabled empty-language object so menu code can render all supported languages deterministically. Runtime is O(1). No external state is mutated.
5416
5433
  - @param[in] config {UseReqConfig} Effective project configuration.
5417
5434
  - @param[in] language {string} Canonical language name.
5418
5435
  - @return {StaticCheckLanguageConfig} Resolved per-language config object.
5419
5436
 
5420
- ### fn `function countConfiguredStaticCheckLanguages(config: UseReqConfig): number` (L3712-3714)
5437
+ ### fn `function countConfiguredStaticCheckLanguages(config: UseReqConfig): number` (L3735-3737)
5421
5438
  - @brief Counts languages that currently expose at least one configured checker.
5422
5439
  - @details Treats configured-but-disabled languages as configured when their checker list is non-empty so removal actions remain deterministic. Runtime is O(l). No external state is mutated.
5423
5440
  - @param[in] config {UseReqConfig} Effective project configuration.
5424
5441
  - @return {number} Number of languages with at least one configured checker.
5425
5442
 
5426
- ### fn `function countEnabledStaticCheckLanguages(config: UseReqConfig): number` (L3722-3724)
5443
+ ### fn `function countEnabledStaticCheckLanguages(config: UseReqConfig): number` (L3745-3747)
5427
5444
  - @brief Counts languages whose static-check enable flag is on.
5428
5445
  - @details Counts only languages whose persisted per-language config explicitly sets `enabled=enable`, regardless of checker count. Runtime is O(l). No external state is mutated.
5429
5446
  - @param[in] config {UseReqConfig} Effective project configuration.
5430
5447
  - @return {number} Number of enabled languages.
5431
5448
 
5432
- ### fn `function resetStaticCheckConfig(config: UseReqConfig): void` (L3733-3735)
5449
+ ### fn `function resetStaticCheckConfig(config: UseReqConfig): void` (L3756-3758)
5433
5450
  - @brief Restores the documented static-check default configuration.
5434
5451
  - @details Replaces the mutable config subtree with a fresh clone of the documented per-language defaults so menu reset actions restore both enable flags and checker lists in one step. Runtime is O(l + c). Side effect: mutates `config`.
5435
5452
  - @param[in,out] config {UseReqConfig} Mutable configuration object.
5436
5453
  - @return {void} No return value.
5437
5454
  - @satisfies REQ-250, REQ-251, REQ-252
5438
5455
 
5439
- ### fn `function formatStaticCheckLanguagesSummary(config: UseReqConfig): string` (L3743-3745)
5456
+ ### fn `function formatStaticCheckLanguagesSummary(config: UseReqConfig): string` (L3766-3768)
5440
5457
  - @brief Summarizes enabled and configured static-check languages.
5441
5458
  - @details Counts enabled languages and languages with at least one checker, then emits one compact summary string suitable for the top-level configuration menu. Runtime is O(l). No external state is mutated.
5442
5459
  - @param[in] config {UseReqConfig} Effective project configuration.
5443
5460
  - @return {string} Compact summary string.
5444
5461
 
5445
- ### fn `function buildStaticCheckMenuChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L3754-3786)
5462
+ ### fn `function buildStaticCheckMenuChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L3777-3809)
5446
5463
  - @brief Builds the shared settings-menu choices for static-check management.
5447
5464
  - @details Serializes guided Command-oriented add and remove actions, renders one direct on/off toggle row for every supported language, and appends canonical terminal rows while omitting raw-spec and reference-only actions. Runtime is O(l). No external state is mutated.
5448
5465
  - @param[in] config {UseReqConfig} Effective project configuration.
5449
5466
  - @return {PiUsereqSettingsMenuChoice[]} Ordered static-check menu choices.
5450
5467
  - @satisfies REQ-008, REQ-150, REQ-151, REQ-152, REQ-153, REQ-154, REQ-160, REQ-161, REQ-193, REQ-248
5451
5468
 
5452
- ### fn `function buildSupportedStaticCheckLanguageChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L3794-3811)
5469
+ ### fn `function buildSupportedStaticCheckLanguageChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L3817-3834)
5453
5470
  - @brief Builds the shared settings-menu choices for supported static-check languages.
5454
5471
  - @details Exposes every supported language as one row whose right-side value reports extensions, enablement, and configured checker count for guided Command configuration flows, then appends subtree-local terminal rows. Runtime is O(l). No external state is mutated.
5455
5472
  - @param[in] config {UseReqConfig} Effective project configuration.
5456
5473
  - @return {PiUsereqSettingsMenuChoice[]} Ordered language-choice vector.
5457
5474
 
5458
- ### fn `function buildConfiguredStaticCheckLanguageChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L3819-3836)
5475
+ ### fn `function buildConfiguredStaticCheckLanguageChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L3842-3859)
5459
5476
  - @brief Builds the shared settings-menu choices for configured static-check languages.
5460
5477
  - @details Exposes only languages whose checker lists are non-empty so removal remains deterministic, then appends subtree-local terminal rows. Runtime is O(l). No external state is mutated.
5461
5478
  - @param[in] config {UseReqConfig} Effective project configuration.
5462
5479
  - @return {PiUsereqSettingsMenuChoice[]} Ordered configured-language vector.
5463
5480
 
5464
- ### fn `async function configureStaticCheckMenu(` (L3846-3992)
5481
+ ### fn `async function configureStaticCheckMenu(` (L3869-4015)
5465
5482
  - @brief Runs the interactive static-check configuration menu.
5466
5483
  - @details Lets the user add and remove global Command entries, toggle direct local per-language enable flags, and reset the subtree to documented defaults through the shared settings-menu renderer until the user exits. Runtime depends on user interaction count. Side effects include UI updates and config mutation.
5467
5484
  - @param[in] ctx {ExtensionCommandContext} Active command context.
@@ -5469,21 +5486,21 @@ registration and status updates.
5469
5486
  - @return {Promise<void>} Promise resolved when the menu closes.
5470
5487
  - @satisfies REQ-008, REQ-151, REQ-152, REQ-153, REQ-154, REQ-160, REQ-161, REQ-193, REQ-195, REQ-248, REQ-253
5471
5488
 
5472
- ### fn `function formatContextFilesSummary(config: UseReqConfig): string` (L4001-4003)
5489
+ ### fn `function formatContextFilesSummary(config: UseReqConfig): string` (L4024-4026)
5473
5490
  - @brief Summarizes the `Context Files` flag state for the top-level menu value column.
5474
5491
  - @details Renders the three context-file flags as compact `name:on|off` segments in the documented order so the top-level row reflects the current injection configuration. Runtime is O(1). No external state is mutated.
5475
5492
  - @param[in] config {UseReqConfig} Effective project configuration.
5476
5493
  - @return {string} Compact `Context Files` summary string.
5477
5494
  - @satisfies REQ-327
5478
5495
 
5479
- ### fn `function buildContextFilesMenuChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L4012-4039)
5496
+ ### fn `function buildContextFilesMenuChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L4035-4062)
5480
5497
  - @brief Builds the shared settings-menu choices for the `Context Files` submenu.
5481
5498
  - @details Exposes one inline on|off toggle row per context file in the documented `REQUIREMENTS.md`, `REFERENCES.md`, `WORKFLOW.md` order plus a value-less subtree-local `Reset defaults` row. Runtime is O(1). No external state is mutated.
5482
5499
  - @param[in] config {UseReqConfig} Effective project configuration.
5483
5500
  - @return {PiUsereqSettingsMenuChoice[]} Ordered `Context Files` submenu choices.
5484
5501
  - @satisfies REQ-327, REQ-328, REQ-333
5485
5502
 
5486
- ### fn `async function configureContextFilesMenu(` (L4050-4108)
5503
+ ### fn `async function configureContextFilesMenu(` (L4073-4131)
5487
5504
  - @brief Runs the `Context Files` configuration submenu.
5488
5505
  - @details Loads the shared settings menu with the three context-file toggle rows, persists each inline toggle immediately through the shared change callback, restores all three flags to enabled on approved subtree reset, preserves focus on the toggled row, and returns to the top-level menu on cancel. Runtime depends on user interaction count. Side effects include config writes and UI notifications.
5489
5506
  - @param[in] ctx {ExtensionCommandContext} Active command context.
@@ -5492,9 +5509,9 @@ registration and status updates.
5492
5509
  - @return {Promise<void>} Promise resolved when the submenu closes.
5493
5510
  - @satisfies REQ-327, REQ-328, REQ-333
5494
5511
 
5495
- ### fn `const setFlag = (flagKey: "context-files-requirements" | "context-files-references" | "context-files-workflow", enabled: boolean): void =>` (L4055-4059)
5512
+ ### fn `const setFlag = (flagKey: "context-files-requirements" | "context-files-references" | "context-files-workflow", enabled: boolean): void =>` (L4078-4082)
5496
5513
 
5497
- ### fn `function buildPiUsereqMenuChoices(` (L4118-4223)
5514
+ ### fn `function buildPiUsereqMenuChoices(` (L4141-4246)
5498
5515
  - @brief Builds the shared settings-menu choices for the top-level pi-usereq configuration UI.
5499
5516
  - @details Serializes primary configuration actions into right-valued menu rows consumed by the shared settings-menu renderer, including the `Context Files` injection toggles, automatic git-commit mode, effective prompt-command worktree state, notification summary, debug summary, locked worktree rows when automatic git commit is disabled, and display-only local plus global config paths. Runtime is O(s) in source-directory count. No external state is mutated.
5500
5517
  - @param[in] cwd {string} Current working directory.
@@ -5502,21 +5519,21 @@ registration and status updates.
5502
5519
  - @return {PiUsereqSettingsMenuChoice[]} Ordered top-level menu choices.
5503
5520
  - @satisfies REQ-006, REQ-031, REQ-137, REQ-150, REQ-151, REQ-152, REQ-162, REQ-190, REQ-191, REQ-197, REQ-204, REQ-205, REQ-212, REQ-215, REQ-216, REQ-236, REQ-237, REQ-238, REQ-239, REQ-240, REQ-314, REQ-318, REQ-319, REQ-320, REQ-326
5504
5521
 
5505
- ### fn `function buildSrcDirMenuChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L4232-4250)
5522
+ ### fn `function buildSrcDirMenuChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L4255-4273)
5506
5523
  - @brief Builds the shared settings-menu choices for source-directory management.
5507
5524
  - @details Exposes add and remove actions for `src-dir` entries through right-valued menu rows consumed by the shared settings-menu renderer. Runtime is O(s) in source-directory count. No external state is mutated.
5508
5525
  - @param[in] config {UseReqConfig} Effective project configuration.
5509
5526
  - @return {PiUsereqSettingsMenuChoice[]} Ordered source-directory management choices.
5510
5527
  - @satisfies REQ-006, REQ-151, REQ-152, REQ-153, REQ-154, REQ-193
5511
5528
 
5512
- ### fn `function buildSrcDirRemovalChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L4259-4271)
5529
+ ### fn `function buildSrcDirRemovalChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L4282-4294)
5513
5530
  - @brief Builds the shared settings-menu choices for removing one source-directory entry.
5514
5531
  - @details Exposes every configured `src-dir` entry as one removable row and appends a value-less subtree-local `Reset defaults` row. Runtime is O(s) in source-directory count. No external state is mutated.
5515
5532
  - @param[in] config {UseReqConfig} Effective project configuration.
5516
5533
  - @return {PiUsereqSettingsMenuChoice[]} Ordered removable source-directory choices.
5517
5534
  - @satisfies REQ-006, REQ-151, REQ-152, REQ-153, REQ-154
5518
5535
 
5519
- ### fn `async function configurePiUsereq(` (L4282-4540)
5536
+ ### fn `async function configurePiUsereq(` (L4305-4563)
5520
5537
  - @brief Runs the top-level pi-usereq configuration menu.
5521
5538
  - @details Loads the effective merged config, exposes docs/test/source/automatic-commit/worktree/static-check/startup-tool/notification/debug actions through the shared settings-menu renderer, forces worktree disablement when automatic git commit is disabled, prevents locked row edits, persists changes on exit, closes immediately after `Show local configuration` or `Show global configuration`, 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.
5522
5539
  - @param[in] pi {ExtensionAPI} Active extension API instance.
@@ -5525,9 +5542,9 @@ registration and status updates.
5525
5542
  - @return {Promise<void>} Promise resolved when configuration is saved and the menu closes.
5526
5543
  - @satisfies REQ-006, REQ-031, REQ-137, REQ-150, REQ-151, REQ-152, REQ-153, REQ-154, REQ-162, REQ-190, REQ-191, REQ-192, REQ-194, REQ-195, REQ-204, REQ-205, REQ-212, REQ-215, REQ-216, REQ-236, REQ-237, REQ-238, REQ-239, REQ-240, REQ-241, REQ-242, REQ-243, REQ-314, REQ-318, REQ-319, REQ-320, REQ-326, REQ-327, REQ-328, REQ-333
5527
5544
 
5528
- ### fn `const persistConfigChange = () =>` (L4293-4298)
5545
+ ### fn `const persistConfigChange = () =>` (L4316-4321)
5529
5546
 
5530
- ### fn `function registerConfigCommands(` (L4550-4560)
5547
+ ### fn `function registerConfigCommands(` (L4573-4583)
5531
5548
  - @brief Registers configuration-management commands.
5532
5549
  - @details Adds the interactive `pi-usereq` configuration command only; the config-viewer action is now exposed exclusively inside that menu. Runtime is O(1) for registration. Side effects include command registration.
5533
5550
  - @param[in] pi {ExtensionAPI} Active extension API instance.
@@ -5535,7 +5552,7 @@ registration and status updates.
5535
5552
  - @return {void} No return value.
5536
5553
  - @satisfies REQ-006, REQ-031
5537
5554
 
5538
- ### fn `export default function piUsereqExtension(pi: ExtensionAPI): void` (L4569-4582)
5555
+ ### fn `export default function piUsereqExtension(pi: ExtensionAPI): void` (L4592-4605)
5539
5556
  - @brief Registers the complete pi-usereq extension.
5540
5557
  - @details Validates installation-owned bundled resources, registers the specialized `req-reset` and `req-references` commands plus bundled prompt-backed commands and agent tools, conditionally registers config-gated debug tool wrapper commands when the current project enables them, registers configuration commands, registers the configurable notification-sound shortcut when the runtime supports shortcuts, and installs shared wrappers for all supported pi lifecycle hooks so status telemetry, context usage, prompt timing, cumulative runtime, prompt-specific Pushover metadata, tool-result debug logging, and prompt-orchestration effects remain synchronized with runtime events. Runtime is O(h) in hook count during registration. Side effects include filesystem reads, command/tool/shortcut registration, UI updates, active-tool changes, optional debug-log writes, and timer scheduling.
5541
5558
  - @param[in] pi {ExtensionAPI} Active extension API instance.
@@ -5545,110 +5562,110 @@ registration and status updates.
5545
5562
  ## Symbol Index
5546
5563
  |Symbol|Kind|Vis|Lines|Sig|
5547
5564
  |---|---|---|---|---|
5548
- |`PiShortcutRegistrar`|iface||186-194|interface PiShortcutRegistrar|
5549
- |`getProjectBase`|fn||202-211|function getProjectBase(cwd: string): string|
5550
- |`getProcessCwdSafe`|fn||218-227|function getProcessCwdSafe(): string|
5551
- |`resolveLiveBootstrapCwd`|fn||235-247|function resolveLiveBootstrapCwd(cwd: string): string|
5552
- |`syncContextCwdMirror`|fn||256-265|function syncContextCwdMirror(ctx: { cwd?: string }, cwd:...|
5553
- |`loadProjectConfig`|fn||274-277|function loadProjectConfig(cwd: string): UseReqConfig|
5554
- |`DebugToolCommandExecuteResult`|type||283||
5555
- |`shouldRegisterDebugToolCommands`|fn||292-298|function shouldRegisterDebugToolCommands(cwd: string): bo...|
5556
- |`writeDebugToolCommandResultToEditor`|fn||309-323|function writeDebugToolCommandResultToEditor(|
5557
- |`executeDebugToolCommand`|fn||335-353|function executeDebugToolCommand(|
5558
- |`registerDebugToolCommands`|fn||362-401|function registerDebugToolCommands(pi: ExtensionAPI): void|
5559
- |`saveProjectConfig`|fn||411-414|function saveProjectConfig(cwd: string, config: UseReqCon...|
5560
- |`formatLocalConfigPathForMenu`|fn||423-427|function formatLocalConfigPathForMenu(cwd: string): string|
5561
- |`formatGlobalConfigPathForMenu`|fn||435-437|function formatGlobalConfigPathForMenu(): string|
5562
- |`buildTerminalSettingsMenuChoices`|fn||446-457|function buildTerminalSettingsMenuChoices(options:|
5563
- |`ResetConfirmationChange`|iface||463-467|interface ResetConfirmationChange|
5564
- |`formatResetConfirmationValue`|fn||476-478|function formatResetConfirmationValue(previousValue: stri...|
5565
- |`buildResetConfirmationChoices`|fn||488-527|function buildResetConfirmationChoices(|
5566
- |`confirmResetChanges`|fn||539-552|async function confirmResetChanges(|
5567
- |`writePersistedConfigToEditor`|fn||561-566|function writePersistedConfigToEditor(|
5568
- |`writePersistedLocalConfigToEditor`|fn||576-582|function writePersistedLocalConfigToEditor(|
5569
- |`writePersistedGlobalConfigToEditor`|fn||591-595|function writePersistedGlobalConfigToEditor(|
5570
- |`buildSearchToolSupportedTagGuidelines`|fn||656-660|function buildSearchToolSupportedTagGuidelines(): string[]|
5571
- |`buildSearchToolSchemaDescription`|fn||668-673|function buildSearchToolSchemaDescription(scope: FindTool...|
5572
- |`buildSearchToolPromptGuidelines`|fn||681-694|function buildSearchToolPromptGuidelines(scope: FindToolS...|
5573
- |`MonolithicToolRenderResult`|type||700||
5574
- |`getMonolithicToolText`|fn||717-720|function getMonolithicToolText(result: MonolithicToolRend...|
5575
- |`getMonolithicToolErrorText`|fn||728-738|function getMonolithicToolErrorText(result: MonolithicToo...|
5576
- |`formatCompactToolArgumentValue`|fn||746-785|function formatCompactToolArgumentValue(value: unknown): ...|
5577
- |`buildCompactToolInvocationText`|fn||793-804|function buildCompactToolInvocationText(args: Record<stri...|
5578
- |`summarizeStructuredToolResult`|fn||814-829|function summarizeStructuredToolResult(|
5579
- |`buildStructuredToolRenderResult`|fn||838-857|function buildStructuredToolRenderResult(toolName: string)|
5580
- |`executeMonolithicTool`|fn||865-871|function executeMonolithicTool(operation: () => ToolResul...|
5581
- |`executeStatusTool`|fn||880-909|function executeStatusTool(operation: () => ToolResult): ...|
5582
- |`deliverPromptCommand`|fn||921-970|function deliverPromptCommand(|
5583
- |`shouldIgnoreLatePromptDeliveryFailure`|fn||981-997|function shouldIgnoreLatePromptDeliveryFailure(|
5584
- |`logPromptWorkflowStateChange`|fn||1010-1029|function logPromptWorkflowStateChange(|
5585
- |`logPromptWorkflowEvent`|fn||1045-1065|function logPromptWorkflowEvent(|
5586
- |`transitionPromptWorkflowState`|fn||1078-1091|function transitionPromptWorkflowState(|
5587
- |`resolvePromptCommandDescription`|fn||1099-1103|function resolvePromptCommandDescription(|
5588
- |`resolveDebugProjectBase`|fn||1112-1116|function resolveDebugProjectBase(cwd: string, statusContr...|
5589
- |`notifyContextSafely`|fn||1127-1144|function notifyContextSafely(|
5590
- |`rejectNonIdleReqCommand`|fn||1156-1176|function rejectNonIdleReqCommand(|
5591
- |`getPiUsereqStartupTools`|fn||1185-1193|function getPiUsereqStartupTools(pi: ExtensionAPI): ToolI...|
5592
- |`getConfiguredEnabledPiUsereqTools`|fn||1201-1205|function getConfiguredEnabledPiUsereqTools(config: UseReq...|
5593
- |`applyConfiguredPiUsereqTools`|fn||1215-1232|function applyConfiguredPiUsereqTools(pi: ExtensionAPI, c...|
5594
- |`handleExtensionStatusEvent`|fn||1245-1516|async function handleExtensionStatusEvent(|
5595
- |`registerExtensionStatusHooks`|fn||1532-1551|function registerExtensionStatusHooks(|
5596
- |`setConfiguredPiUsereqTools`|fn||1561-1564|function setConfiguredPiUsereqTools(pi: ExtensionAPI, con...|
5597
- |`getDebugToolToggleNames`|fn||1572-1574|function getDebugToolToggleNames(): PiUsereqStartupToolNa...|
5598
- |`resetDebugConfigToDefaults`|fn||1583-1592|function resetDebugConfigToDefaults(config: UseReqConfig)...|
5599
- |`formatDebugMenuSummary`|fn||1600-1606|function formatDebugMenuSummary(config: UseReqConfig): st...|
5600
- |`buildDebugMenuChoice`|fn||1616-1629|function buildDebugMenuChoice(|
5601
- |`selectDebugLogOnStatus`|fn||1638-1666|async function selectDebugLogOnStatus(|
5602
- |`buildDebugMenuChoices`|fn||1675-1761|function buildDebugMenuChoices(config: UseReqConfig): PiU...|
5603
- |`configureDebugMenu`|fn||1772-1962|async function configureDebugMenu(|
5604
- |`updateDebugToolCommandsEnabled`|fn||1778-1785|const updateDebugToolCommandsEnabled = (nextValue: unknow...|
5605
- |`PiNotifyBooleanConfigKey`|type||1968||
5606
- |`PiNotifyEventBooleanConfigKey`|type||1985||
5607
- |`PiNotifyEventId`|type||1994||
5608
- |`PiNotifyEventRowDefinition`|iface||2000-2004|interface PiNotifyEventRowDefinition|
5609
- |`PiNotifyEventMenuDefinition`|iface||2010-2016|interface PiNotifyEventMenuDefinition|
5610
- |`togglePiNotifyFlag`|fn||2025-2028|function togglePiNotifyFlag(config: UseReqConfig, key: Pi...|
5611
- |`resetPiNotifyConfigToDefaults`|fn||2037-2061|function resetPiNotifyConfigToDefaults(config: UseReqConf...|
5612
- |`formatPiNotifyPushoverPriority`|fn||2070-2072|function formatPiNotifyPushoverPriority(priority: PiNotif...|
5613
- |`formatPiNotifyEventMenuSummary`|fn||2156-2164|function formatPiNotifyEventMenuSummary(|
5614
- |`buildPiNotifyEventLauncherChoice`|fn||2174-2184|function buildPiNotifyEventLauncherChoice(|
5615
- |`buildPiNotifyEventMenuChoices`|fn||2194-2210|function buildPiNotifyEventMenuChoices(|
5616
- |`resetPiNotifyEventMenuToDefaults`|fn||2220-2228|function resetPiNotifyEventMenuToDefaults(|
5617
- |`resolvePiNotifyEventLabel`|fn||2238-2245|function resolvePiNotifyEventLabel(|
5618
- |`configurePiNotifyEventMenu`|fn||2256-2332|async function configurePiNotifyEventMenu(|
5619
- |`buildPiNotifyPushoverRows`|fn||2341-2391|function buildPiNotifyPushoverRows(config: UseReqConfig):...|
5620
- |`selectPiNotifyPushoverPriority`|fn||2401-2429|async function selectPiNotifyPushoverPriority(|
5621
- |`buildPiNotifyMenuChoices`|fn||2438-2496|function buildPiNotifyMenuChoices(config: UseReqConfig): ...|
5622
- |`selectPiNotifySoundLevel`|fn||2506-2546|async function selectPiNotifySoundLevel(|
5623
- |`configurePiNotifyMenu`|fn||2556-2842|async function configurePiNotifyMenu(|
5624
- |`registerPiNotifyShortcut`|fn||2857-2880|function registerPiNotifyShortcut(|
5625
- |`resolveReqResetPromptRequest`|fn||2888-2914|function resolveReqResetPromptRequest(|
5626
- |`isWorktreeBacked`|fn||2891-2898|const isWorktreeBacked = (request: PromptCommandExecution...|
5627
- |`registerReqResetCommand`|fn||2924-2978|function registerReqResetCommand(|
5628
- |`registerReqReferencesCommand`|fn||2988-3028|function registerReqReferencesCommand(|
5629
- |`registerPromptCommands`|fn||3038-3159|function registerPromptCommands(|
5630
- |`registerAgentTools`|fn||3169-3468|function registerAgentTools(pi: ExtensionAPI): void|
5631
- |`buildPiUsereqToolsMenuChoices`|fn||3513-3538|function buildPiUsereqToolsMenuChoices(pi: ExtensionAPI, ...|
5632
- |`buildPiUsereqToolToggleChoices`|fn||3548-3562|function buildPiUsereqToolToggleChoices(pi: ExtensionAPI,...|
5633
- |`configurePiUsereqToolsMenu`|fn||3573-3690|async function configurePiUsereqToolsMenu(|
5634
- |`getStaticCheckLanguageConfigForMenu`|fn||3699-3704|function getStaticCheckLanguageConfigForMenu(|
5635
- |`countConfiguredStaticCheckLanguages`|fn||3712-3714|function countConfiguredStaticCheckLanguages(config: UseR...|
5636
- |`countEnabledStaticCheckLanguages`|fn||3722-3724|function countEnabledStaticCheckLanguages(config: UseReqC...|
5637
- |`resetStaticCheckConfig`|fn||3733-3735|function resetStaticCheckConfig(config: UseReqConfig): void|
5638
- |`formatStaticCheckLanguagesSummary`|fn||3743-3745|function formatStaticCheckLanguagesSummary(config: UseReq...|
5639
- |`buildStaticCheckMenuChoices`|fn||3754-3786|function buildStaticCheckMenuChoices(config: UseReqConfig...|
5640
- |`buildSupportedStaticCheckLanguageChoices`|fn||3794-3811|function buildSupportedStaticCheckLanguageChoices(config:...|
5641
- |`buildConfiguredStaticCheckLanguageChoices`|fn||3819-3836|function buildConfiguredStaticCheckLanguageChoices(config...|
5642
- |`configureStaticCheckMenu`|fn||3846-3992|async function configureStaticCheckMenu(|
5643
- |`formatContextFilesSummary`|fn||4001-4003|function formatContextFilesSummary(config: UseReqConfig):...|
5644
- |`buildContextFilesMenuChoices`|fn||4012-4039|function buildContextFilesMenuChoices(config: UseReqConfi...|
5645
- |`configureContextFilesMenu`|fn||4050-4108|async function configureContextFilesMenu(|
5646
- |`setFlag`|fn||4055-4059|const setFlag = (flagKey: "context-files-requirements" | ...|
5647
- |`buildPiUsereqMenuChoices`|fn||4118-4223|function buildPiUsereqMenuChoices(|
5648
- |`buildSrcDirMenuChoices`|fn||4232-4250|function buildSrcDirMenuChoices(config: UseReqConfig): Pi...|
5649
- |`buildSrcDirRemovalChoices`|fn||4259-4271|function buildSrcDirRemovalChoices(config: UseReqConfig):...|
5650
- |`configurePiUsereq`|fn||4282-4540|async function configurePiUsereq(|
5651
- |`persistConfigChange`|fn||4293-4298|const persistConfigChange = () =>|
5652
- |`registerConfigCommands`|fn||4550-4560|function registerConfigCommands(|
5653
- |`piUsereqExtension`|fn||4569-4582|export default function piUsereqExtension(pi: ExtensionAP...|
5565
+ |`PiShortcutRegistrar`|iface||187-195|interface PiShortcutRegistrar|
5566
+ |`getProjectBase`|fn||203-212|function getProjectBase(cwd: string): string|
5567
+ |`getProcessCwdSafe`|fn||219-228|function getProcessCwdSafe(): string|
5568
+ |`resolveLiveBootstrapCwd`|fn||236-248|function resolveLiveBootstrapCwd(cwd: string): string|
5569
+ |`syncContextCwdMirror`|fn||257-266|function syncContextCwdMirror(ctx: { cwd?: string }, cwd:...|
5570
+ |`loadProjectConfig`|fn||275-278|function loadProjectConfig(cwd: string): UseReqConfig|
5571
+ |`DebugToolCommandExecuteResult`|type||284||
5572
+ |`shouldRegisterDebugToolCommands`|fn||293-299|function shouldRegisterDebugToolCommands(cwd: string): bo...|
5573
+ |`writeDebugToolCommandResultToEditor`|fn||310-324|function writeDebugToolCommandResultToEditor(|
5574
+ |`executeDebugToolCommand`|fn||336-354|function executeDebugToolCommand(|
5575
+ |`registerDebugToolCommands`|fn||363-402|function registerDebugToolCommands(pi: ExtensionAPI): void|
5576
+ |`saveProjectConfig`|fn||412-415|function saveProjectConfig(cwd: string, config: UseReqCon...|
5577
+ |`formatLocalConfigPathForMenu`|fn||424-428|function formatLocalConfigPathForMenu(cwd: string): string|
5578
+ |`formatGlobalConfigPathForMenu`|fn||436-438|function formatGlobalConfigPathForMenu(): string|
5579
+ |`buildTerminalSettingsMenuChoices`|fn||447-458|function buildTerminalSettingsMenuChoices(options:|
5580
+ |`ResetConfirmationChange`|iface||464-468|interface ResetConfirmationChange|
5581
+ |`formatResetConfirmationValue`|fn||477-479|function formatResetConfirmationValue(previousValue: stri...|
5582
+ |`buildResetConfirmationChoices`|fn||489-528|function buildResetConfirmationChoices(|
5583
+ |`confirmResetChanges`|fn||540-553|async function confirmResetChanges(|
5584
+ |`writePersistedConfigToEditor`|fn||562-567|function writePersistedConfigToEditor(|
5585
+ |`writePersistedLocalConfigToEditor`|fn||577-583|function writePersistedLocalConfigToEditor(|
5586
+ |`writePersistedGlobalConfigToEditor`|fn||592-596|function writePersistedGlobalConfigToEditor(|
5587
+ |`buildSearchToolSupportedTagGuidelines`|fn||657-661|function buildSearchToolSupportedTagGuidelines(): string[]|
5588
+ |`buildSearchToolSchemaDescription`|fn||669-674|function buildSearchToolSchemaDescription(scope: FindTool...|
5589
+ |`buildSearchToolPromptGuidelines`|fn||682-695|function buildSearchToolPromptGuidelines(scope: FindToolS...|
5590
+ |`MonolithicToolRenderResult`|type||701||
5591
+ |`getMonolithicToolText`|fn||718-721|function getMonolithicToolText(result: MonolithicToolRend...|
5592
+ |`getMonolithicToolErrorText`|fn||729-739|function getMonolithicToolErrorText(result: MonolithicToo...|
5593
+ |`formatCompactToolArgumentValue`|fn||747-786|function formatCompactToolArgumentValue(value: unknown): ...|
5594
+ |`buildCompactToolInvocationText`|fn||794-805|function buildCompactToolInvocationText(args: Record<stri...|
5595
+ |`summarizeStructuredToolResult`|fn||815-830|function summarizeStructuredToolResult(|
5596
+ |`buildStructuredToolRenderResult`|fn||839-858|function buildStructuredToolRenderResult(toolName: string)|
5597
+ |`executeMonolithicTool`|fn||866-872|function executeMonolithicTool(operation: () => ToolResul...|
5598
+ |`executeStatusTool`|fn||881-910|function executeStatusTool(operation: () => ToolResult): ...|
5599
+ |`deliverPromptCommand`|fn||922-986|function deliverPromptCommand(|
5600
+ |`shouldIgnoreLatePromptDeliveryFailure`|fn||997-1013|function shouldIgnoreLatePromptDeliveryFailure(|
5601
+ |`logPromptWorkflowStateChange`|fn||1026-1045|function logPromptWorkflowStateChange(|
5602
+ |`logPromptWorkflowEvent`|fn||1061-1081|function logPromptWorkflowEvent(|
5603
+ |`transitionPromptWorkflowState`|fn||1094-1107|function transitionPromptWorkflowState(|
5604
+ |`resolvePromptCommandDescription`|fn||1115-1119|function resolvePromptCommandDescription(|
5605
+ |`resolveDebugProjectBase`|fn||1128-1132|function resolveDebugProjectBase(cwd: string, statusContr...|
5606
+ |`notifyContextSafely`|fn||1143-1160|function notifyContextSafely(|
5607
+ |`rejectNonIdleReqCommand`|fn||1172-1192|function rejectNonIdleReqCommand(|
5608
+ |`getPiUsereqStartupTools`|fn||1201-1209|function getPiUsereqStartupTools(pi: ExtensionAPI): ToolI...|
5609
+ |`getConfiguredEnabledPiUsereqTools`|fn||1217-1221|function getConfiguredEnabledPiUsereqTools(config: UseReq...|
5610
+ |`applyConfiguredPiUsereqTools`|fn||1231-1248|function applyConfiguredPiUsereqTools(pi: ExtensionAPI, c...|
5611
+ |`handleExtensionStatusEvent`|fn||1261-1539|async function handleExtensionStatusEvent(|
5612
+ |`registerExtensionStatusHooks`|fn||1555-1574|function registerExtensionStatusHooks(|
5613
+ |`setConfiguredPiUsereqTools`|fn||1584-1587|function setConfiguredPiUsereqTools(pi: ExtensionAPI, con...|
5614
+ |`getDebugToolToggleNames`|fn||1595-1597|function getDebugToolToggleNames(): PiUsereqStartupToolNa...|
5615
+ |`resetDebugConfigToDefaults`|fn||1606-1615|function resetDebugConfigToDefaults(config: UseReqConfig)...|
5616
+ |`formatDebugMenuSummary`|fn||1623-1629|function formatDebugMenuSummary(config: UseReqConfig): st...|
5617
+ |`buildDebugMenuChoice`|fn||1639-1652|function buildDebugMenuChoice(|
5618
+ |`selectDebugLogOnStatus`|fn||1661-1689|async function selectDebugLogOnStatus(|
5619
+ |`buildDebugMenuChoices`|fn||1698-1784|function buildDebugMenuChoices(config: UseReqConfig): PiU...|
5620
+ |`configureDebugMenu`|fn||1795-1985|async function configureDebugMenu(|
5621
+ |`updateDebugToolCommandsEnabled`|fn||1801-1808|const updateDebugToolCommandsEnabled = (nextValue: unknow...|
5622
+ |`PiNotifyBooleanConfigKey`|type||1991||
5623
+ |`PiNotifyEventBooleanConfigKey`|type||2008||
5624
+ |`PiNotifyEventId`|type||2017||
5625
+ |`PiNotifyEventRowDefinition`|iface||2023-2027|interface PiNotifyEventRowDefinition|
5626
+ |`PiNotifyEventMenuDefinition`|iface||2033-2039|interface PiNotifyEventMenuDefinition|
5627
+ |`togglePiNotifyFlag`|fn||2048-2051|function togglePiNotifyFlag(config: UseReqConfig, key: Pi...|
5628
+ |`resetPiNotifyConfigToDefaults`|fn||2060-2084|function resetPiNotifyConfigToDefaults(config: UseReqConf...|
5629
+ |`formatPiNotifyPushoverPriority`|fn||2093-2095|function formatPiNotifyPushoverPriority(priority: PiNotif...|
5630
+ |`formatPiNotifyEventMenuSummary`|fn||2179-2187|function formatPiNotifyEventMenuSummary(|
5631
+ |`buildPiNotifyEventLauncherChoice`|fn||2197-2207|function buildPiNotifyEventLauncherChoice(|
5632
+ |`buildPiNotifyEventMenuChoices`|fn||2217-2233|function buildPiNotifyEventMenuChoices(|
5633
+ |`resetPiNotifyEventMenuToDefaults`|fn||2243-2251|function resetPiNotifyEventMenuToDefaults(|
5634
+ |`resolvePiNotifyEventLabel`|fn||2261-2268|function resolvePiNotifyEventLabel(|
5635
+ |`configurePiNotifyEventMenu`|fn||2279-2355|async function configurePiNotifyEventMenu(|
5636
+ |`buildPiNotifyPushoverRows`|fn||2364-2414|function buildPiNotifyPushoverRows(config: UseReqConfig):...|
5637
+ |`selectPiNotifyPushoverPriority`|fn||2424-2452|async function selectPiNotifyPushoverPriority(|
5638
+ |`buildPiNotifyMenuChoices`|fn||2461-2519|function buildPiNotifyMenuChoices(config: UseReqConfig): ...|
5639
+ |`selectPiNotifySoundLevel`|fn||2529-2569|async function selectPiNotifySoundLevel(|
5640
+ |`configurePiNotifyMenu`|fn||2579-2865|async function configurePiNotifyMenu(|
5641
+ |`registerPiNotifyShortcut`|fn||2880-2903|function registerPiNotifyShortcut(|
5642
+ |`resolveReqResetPromptRequest`|fn||2911-2937|function resolveReqResetPromptRequest(|
5643
+ |`isWorktreeBacked`|fn||2914-2921|const isWorktreeBacked = (request: PromptCommandExecution...|
5644
+ |`registerReqResetCommand`|fn||2947-3001|function registerReqResetCommand(|
5645
+ |`registerReqReferencesCommand`|fn||3011-3051|function registerReqReferencesCommand(|
5646
+ |`registerPromptCommands`|fn||3061-3182|function registerPromptCommands(|
5647
+ |`registerAgentTools`|fn||3192-3491|function registerAgentTools(pi: ExtensionAPI): void|
5648
+ |`buildPiUsereqToolsMenuChoices`|fn||3536-3561|function buildPiUsereqToolsMenuChoices(pi: ExtensionAPI, ...|
5649
+ |`buildPiUsereqToolToggleChoices`|fn||3571-3585|function buildPiUsereqToolToggleChoices(pi: ExtensionAPI,...|
5650
+ |`configurePiUsereqToolsMenu`|fn||3596-3713|async function configurePiUsereqToolsMenu(|
5651
+ |`getStaticCheckLanguageConfigForMenu`|fn||3722-3727|function getStaticCheckLanguageConfigForMenu(|
5652
+ |`countConfiguredStaticCheckLanguages`|fn||3735-3737|function countConfiguredStaticCheckLanguages(config: UseR...|
5653
+ |`countEnabledStaticCheckLanguages`|fn||3745-3747|function countEnabledStaticCheckLanguages(config: UseReqC...|
5654
+ |`resetStaticCheckConfig`|fn||3756-3758|function resetStaticCheckConfig(config: UseReqConfig): void|
5655
+ |`formatStaticCheckLanguagesSummary`|fn||3766-3768|function formatStaticCheckLanguagesSummary(config: UseReq...|
5656
+ |`buildStaticCheckMenuChoices`|fn||3777-3809|function buildStaticCheckMenuChoices(config: UseReqConfig...|
5657
+ |`buildSupportedStaticCheckLanguageChoices`|fn||3817-3834|function buildSupportedStaticCheckLanguageChoices(config:...|
5658
+ |`buildConfiguredStaticCheckLanguageChoices`|fn||3842-3859|function buildConfiguredStaticCheckLanguageChoices(config...|
5659
+ |`configureStaticCheckMenu`|fn||3869-4015|async function configureStaticCheckMenu(|
5660
+ |`formatContextFilesSummary`|fn||4024-4026|function formatContextFilesSummary(config: UseReqConfig):...|
5661
+ |`buildContextFilesMenuChoices`|fn||4035-4062|function buildContextFilesMenuChoices(config: UseReqConfi...|
5662
+ |`configureContextFilesMenu`|fn||4073-4131|async function configureContextFilesMenu(|
5663
+ |`setFlag`|fn||4078-4082|const setFlag = (flagKey: "context-files-requirements" | ...|
5664
+ |`buildPiUsereqMenuChoices`|fn||4141-4246|function buildPiUsereqMenuChoices(|
5665
+ |`buildSrcDirMenuChoices`|fn||4255-4273|function buildSrcDirMenuChoices(config: UseReqConfig): Pi...|
5666
+ |`buildSrcDirRemovalChoices`|fn||4282-4294|function buildSrcDirRemovalChoices(config: UseReqConfig):...|
5667
+ |`configurePiUsereq`|fn||4305-4563|async function configurePiUsereq(|
5668
+ |`persistConfigChange`|fn||4316-4321|const persistConfigChange = () =>|
5669
+ |`registerConfigCommands`|fn||4573-4583|function registerConfigCommands(|
5670
+ |`piUsereqExtension`|fn||4592-4605|export default function piUsereqExtension(pi: ExtensionAP...|
5654
5671