pi-usereq 0.5.0 → 0.6.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.
@@ -918,7 +918,7 @@ import {
918
918
 
919
919
  ---
920
920
 
921
- # agent-tool-json.ts | TypeScript | 621L | 23 symbols | 7 imports | 24 comments
921
+ # agent-tool-json.ts | TypeScript | 470L | 23 symbols | 6 imports | 24 comments
922
922
  > Path: `src/core/agent-tool-json.ts`
923
923
  - @brief Builds structured agent-tool JSON payloads for path, git, docs, worktree, and static-check tools.
924
924
  - @details Converts extension-tool execution state into deterministic JSON-first payloads optimized for direct LLM traversal. The module normalizes execution metadata, path facts, required-doc status, worktree mutation facts, and static-check file-selection facts without depending on presentation-oriented text. Runtime is O(F) in the number of described files plus path normalization cost. Side effects are limited to filesystem reads.
@@ -928,7 +928,6 @@ import {
928
928
  import fs from "node:fs";
929
929
  import path from "node:path";
930
930
  import type { StaticCheckEntry } from "./config.js";
931
- import type { RuntimePathFacts } from "./path-context.js";
932
931
  import { ReqError } from "./errors.js";
933
932
  import { STATIC_CHECK_EXT_TO_LANG } from "./static-check.js";
934
933
  import type { ToolResult } from "./tool-runner.js";
@@ -936,143 +935,138 @@ import type { ToolResult } from "./tool-runner.js";
936
935
 
937
936
  ## Definitions
938
937
 
939
- ### iface `export interface ToolExecutionSection` (L19-27)
938
+ ### iface `export interface ToolExecutionSection` (L18-22)
940
939
  - @brief Describes normalized execution metadata shared by structured tool payloads.
941
- - @details Separates numeric status, line-oriented diagnostics, and optional raw text so downstream agents can branch on stable fields before consulting residual text. The interface is compile-time only and introduces no runtime cost.
940
+ - @details Stores only the exit code and residual stdout or stderr line arrays needed after response payload construction, omitting duplicate text and count fields to reduce token cost. The interface is compile-time only and introduces no runtime cost.
942
941
 
943
- ### iface `export interface StructuredToolExecuteResult<T>` (L33-36)
942
+ ### iface `export interface StructuredToolExecuteResult<T>` (L28-31)
944
943
  - @brief Describes the standard execute return wrapper used by structured agent tools.
945
944
  - @details Mirrors the same JSON payload into both the text content channel and the machine-readable details channel so agents can consume stable fields without reparsing ad-hoc prose. The interface is compile-time only and introduces no runtime cost.
946
945
 
947
- ### iface `export interface PathQueryToolPayload` (L42-58)
946
+ ### iface `export interface PathQueryToolPayload` (L37-43)
948
947
  - @brief Describes the structured payload returned by path-query tools.
949
- - @details Exposes the requested config key, caller cwd, resolved project base, resolved path value, and shared runtime path facts as direct-access fields. The interface is compile-time only and introduces no runtime cost.
948
+ - @details Exposes only the resolved path facts that can differ at runtime plus residual execution diagnostics, omitting caller-known request echoes and duplicated runtime-path inventories. The interface is compile-time only and introduces no runtime cost.
950
949
 
951
- ### iface `export interface GitCheckToolPayload` (L64-80)
950
+ ### iface `export interface GitCheckToolPayload` (L49-56)
952
951
  - @brief Describes the structured payload returned by `git-check`.
953
- - @details Exposes git-root presence, repository validation status, shared runtime path facts, and normalized execution diagnostics as stable fields. The interface is compile-time only and introduces no runtime cost.
952
+ - @details Exposes only the runtime git-path presence fact plus aggregate repository validation status, omitting intermediate request metadata whose semantics already live in the tool registration. The interface is compile-time only and introduces no runtime cost.
954
953
 
955
- ### iface `export interface DocsCheckFileRecord` (L86-94)
954
+ ### iface `export interface DocsCheckFileRecord` (L62-67)
956
955
  - @brief Describes one canonical-doc status record returned by `docs-check`.
957
- - @details Binds each required filename to its prompt generator, normalized path facts, and presence status so agents can branch per missing document deterministically. The interface is compile-time only and introduces no runtime cost.
956
+ - @details Stores the canonical path, remediation prompt command, and presence status while omitting redundant filesystem probe fields already summarized by the status value. The interface is compile-time only and introduces no runtime cost.
958
957
 
959
- ### iface `export interface DocsCheckToolPayload` (L100-116)
958
+ ### iface `export interface DocsCheckToolPayload` (L73-80)
960
959
  - @brief Describes the structured payload returned by `docs-check`.
961
- - @details Exposes docs-root selection, per-document presence facts, remediation prompt commands, shared runtime path facts, and execution diagnostics as stable JSON fields. The interface is compile-time only and introduces no runtime cost.
960
+ - @details Exposes per-document presence facts and remediation commands plus residual execution diagnostics, omitting static request metadata that can be inferred from the tool registration and caller context. The interface is compile-time only and introduces no runtime cost.
962
961
 
963
- ### iface `export interface WorktreeNameToolPayload` (L122-137)
962
+ ### iface `export interface WorktreeNameToolPayload` (L86-92)
964
963
  - @brief Describes the structured payload returned by `git-wt-name`.
965
- - @details Exposes the generated worktree name, its normative format, shared runtime path facts, and execution diagnostics as direct-access fields. The interface is compile-time only and introduces no runtime cost.
964
+ - @details Exposes only the generated worktree name plus residual execution diagnostics, omitting the static normative format string because it already belongs in registration metadata. The interface is compile-time only and introduces no runtime cost.
966
965
 
967
- ### iface `export interface WorktreeMutationToolPayload` (L143-161)
966
+ ### iface `export interface WorktreeMutationToolPayload` (L98-105)
968
967
  - @brief Describes the structured payload returned by worktree mutation tools.
969
- - @details Exposes the requested operation, exact worktree name, derived worktree path, mutation status, shared runtime path facts, and execution diagnostics as stable JSON fields. The interface is compile-time only and introduces no runtime cost.
968
+ - @details Exposes only the exact worktree name and derived path that can vary per invocation plus residual execution diagnostics, omitting static operation descriptors and duplicated branch-name fields. The interface is compile-time only and introduces no runtime cost.
970
969
 
971
- ### iface `export interface StaticCheckFileRecord` (L167-179)
970
+ ### iface `export interface StaticCheckFileRecord` (L111-117)
972
971
  - @brief Describes one file-selection record inside a static-check payload.
973
- - @details Exposes request order, normalized path facts, detected language, configured checker modules, and stable selection status without forcing agents to parse checker output text. The interface is compile-time only and introduces no runtime cost.
972
+ - @details Exposes canonical path, detected language, configured checker modules, and stable selection status without echoing caller inputs or redundant filesystem probe fields. The interface is compile-time only and introduces no runtime cost.
974
973
 
975
- ### iface `export interface StaticCheckToolPayload` (L185-207)
974
+ ### iface `export interface StaticCheckToolPayload` (L123-133)
976
975
  - @brief Describes the structured payload returned by static-check agent tools.
977
- - @details Exposes scope selection, configured checker coverage, per-file selection facts, shared runtime path facts, and normalized execution diagnostics while keeping residual checker text optional under execution. The interface is compile-time only and introduces no runtime cost.
976
+ - @details Exposes aggregate checker coverage, per-file selection facts, and normalized execution diagnostics while omitting request echoes whose semantics are already available in the tool registration and input parameters. The interface is compile-time only and introduces no runtime cost.
978
977
 
979
- ### fn `function formatJsonToolPayload(payload: unknown): string` (L215-217)
978
+ ### fn `function formatJsonToolPayload(payload: unknown): string` (L141-143)
980
979
  - @brief Serializes one structured payload as pretty-printed JSON.
981
980
  - @details Uses two-space indentation and omits a trailing newline so the mirrored text payload remains deterministic and compact. Runtime is O(n) in payload size. No external state is mutated.
982
981
  - @param[in] payload {unknown} Structured JSON-compatible payload.
983
982
  - @return {string} Pretty-printed JSON text.
984
983
 
985
- ### fn `function splitToolOutputLines(text: string): string[]` (L225-228)
984
+ ### fn `function splitToolOutputLines(text: string): string[]` (L151-154)
986
985
  - @brief Splits one stdout or stderr text block into normalized non-empty lines.
987
986
  - @details Trims trailing newlines, preserves internal line order, and omits empty records so downstream agents can branch on stable arrays without reparsing blank output. Runtime is O(n) in text length. No external state is mutated.
988
987
  - @param[in] text {string} Raw output text.
989
988
  - @return {string[]} Normalized non-empty output lines.
990
989
 
991
- ### fn `function canonicalizeToolPath(baseDir: string, candidatePath: string): string` (L237-244)
990
+ ### fn `function canonicalizeToolPath(baseDir: string, candidatePath: string): string` (L163-170)
992
991
  - @brief Normalizes one path into a canonical slash-separated form relative to the project base when possible.
993
992
  - @details Resolves the candidate against the provided base, emits a relative path for in-project targets, and falls back to an absolute slash-normalized path for external targets. Runtime is O(p) in path length. No external state is mutated.
994
993
  - @param[in] baseDir {string} Absolute project base path.
995
994
  - @param[in] candidatePath {string} Relative or absolute path candidate.
996
995
  - @return {string} Canonical slash-normalized path.
997
996
 
998
- - fn `export function buildStructuredToolExecuteResult<T extends { execution: ToolExecutionSection }>(` (L252)
997
+ - fn `export function buildStructuredToolExecuteResult<T extends { execution: ToolExecutionSection }>(` (L178)
999
998
  - @brief Converts one structured tool payload into the standard execute wrapper.
1000
999
  - @details Mirrors the same payload into `content[0].text` and `details` so agents can use direct JSON fields or raw JSON text interchangeably without divergence. Runtime is O(n) in payload size. No external state is mutated.
1001
1000
  - @param[in] payload {T} Structured payload containing an `execution` section.
1002
1001
  - @return {StructuredToolExecuteResult<T>} Standard execute wrapper with mirrored payload.
1003
- ### fn `export function buildToolExecutionSection(result: ToolResult): ToolExecutionSection` (L267-281)
1002
+ ### fn `export function buildToolExecutionSection(result: ToolResult): ToolExecutionSection` (L193-203)
1004
1003
  - @brief Converts one raw `ToolResult` into a normalized execution section.
1005
- - @details Separates numeric exit status, line-oriented stdout/stderr arrays, and optional raw text so downstream agents can consume structured facts before consulting residual text. Runtime is O(n) in output size. No external state is mutated.
1004
+ - @details Preserves only the exit code plus non-empty stdout or stderr line arrays so downstream payloads carry residual diagnostics without duplicating the primary structured response body. Runtime is O(n) in output size. No external state is mutated.
1006
1005
  - @param[in] result {ToolResult} Raw tool result.
1007
- - @return {ToolExecutionSection} Normalized execution metadata.
1006
+ - @return {ToolExecutionSection} Normalized residual execution metadata.
1008
1007
 
1009
- ### fn `export function normalizeToolFailure(error: unknown): ToolResult` (L290-299)
1008
+ ### fn `export function normalizeToolFailure(error: unknown): ToolResult` (L212-221)
1010
1009
  - @brief Converts one `ReqError` into a synthetic `ToolResult` for structured payload emission.
1011
1010
  - @details Preserves the numeric exit code and message in stderr so agent tools can return deterministic JSON even when the underlying runner fails. Non-`ReqError` values are rethrown. Runtime is O(1). No external state is mutated.
1012
1011
  - @param[in] error {unknown} Thrown value captured from a runner.
1013
1012
  - @return {ToolResult} Synthetic tool result with empty stdout.
1014
1013
  - @throws {unknown} Rethrows non-`ReqError` failures unchanged.
1015
1014
 
1016
- ### fn `export function buildPathQueryToolPayload(` (L312-338)
1015
+ ### fn `export function buildPathQueryToolPayload(` (L233-250)
1017
1016
  - @brief Builds the structured payload returned by `git-path` or `get-base-path`.
1018
- - @details Exposes the resolved runtime path value as a direct-access field and preserves normalized execution metadata separately from path facts. Runtime is O(p) in path length. No external state is mutated.
1017
+ - @details Exposes only the resolved runtime path value plus residual execution metadata, omitting request echoes and duplicated runtime-path inventories from the runtime payload. Runtime is O(p) in path length. No external state is mutated.
1019
1018
  - @param[in] toolName {"git-path" | "get-base-path"} Target tool name.
1020
1019
  - @param[in] workingDirectoryPath {string} Caller working directory.
1021
1020
  - @param[in] projectBasePath {string} Resolved project base path.
1022
1021
  - @param[in] resolvedPath {string} Resolved config path value.
1023
- - @param[in] runtimePaths {RuntimePathFacts} Shared runtime path facts.
1024
1022
  - @param[in] execution {ToolExecutionSection} Normalized execution metadata.
1025
1023
  - @return {PathQueryToolPayload} Structured path-query payload.
1026
1024
 
1027
- ### fn `export function buildGitCheckToolPayload(` (L349-373)
1025
+ ### fn `export function buildGitCheckToolPayload(` (L260-275)
1028
1026
  - @brief Builds the structured payload returned by `git-check`.
1029
- - @details Encodes runtime git-root presence plus clean-versus-error status as direct fields while preserving raw diagnostics under execution. Runtime is O(p) in path length. No external state is mutated.
1027
+ - @details Encodes runtime git-path presence plus aggregate clean-versus-error status while preserving raw diagnostics under execution. Runtime is O(p) in path length. No external state is mutated.
1030
1028
  - @param[in] projectBasePath {string} Resolved project base path.
1031
1029
  - @param[in] configuredGitPath {string | undefined} Runtime git root path.
1032
- - @param[in] runtimePaths {RuntimePathFacts} Shared runtime path facts.
1033
1030
  - @param[in] execution {ToolExecutionSection} Normalized execution metadata.
1034
1031
  - @return {GitCheckToolPayload} Structured git-check payload.
1035
1032
 
1036
- ### fn `export function buildDocsCheckToolPayload(` (L383-433)
1033
+ ### fn `export function buildDocsCheckToolPayload(` (L284-321)
1037
1034
  - @brief Builds the structured payload returned by `docs-check`.
1038
- - @details Enumerates required canonical documents, binds each missing file to its remediation prompt command, and emits summary counts plus normalized execution metadata. Runtime is O(k) in required file count plus filesystem reads. Side effects are limited to filesystem reads.
1035
+ - @details Enumerates required canonical documents, binds each missing file to its remediation prompt command, and emits summary counts plus residual execution diagnostics while omitting static request metadata. Runtime is O(k) in required file count plus filesystem reads. Side effects are limited to filesystem reads.
1039
1036
  - @param[in] projectBasePath {string} Resolved project base path.
1040
1037
  - @param[in] docsDirPath {string} Configured docs directory relative to the project base.
1041
- - @param[in] runtimePaths {RuntimePathFacts} Shared runtime path facts.
1042
1038
  - @return {DocsCheckToolPayload} Structured docs-check payload.
1043
1039
 
1044
- ### fn `export function buildWorktreeNameToolPayload(` (L444-467)
1040
+ ### fn `export function buildWorktreeNameToolPayload(` (L331-346)
1045
1041
  - @brief Builds the structured payload returned by `git-wt-name`.
1046
- - @details Preserves the generated worktree name plus its normative format string as direct-access fields and reports failures through structured execution metadata. Runtime is O(n) in output size. No external state is mutated.
1042
+ - @details Preserves only the generated worktree name and error diagnostics, leaving the static naming format in registration metadata instead of the runtime payload. Runtime is O(n) in output size. No external state is mutated.
1047
1043
  - @param[in] projectBasePath {string} Resolved project base path.
1048
1044
  - @param[in] configuredGitPath {string | undefined} Runtime git root path.
1049
- - @param[in] runtimePaths {RuntimePathFacts} Shared runtime path facts.
1050
1045
  - @param[in] execution {ToolExecutionSection} Normalized execution metadata.
1051
1046
  - @return {WorktreeNameToolPayload} Structured worktree-name payload.
1052
1047
 
1053
- ### fn `export function buildWorktreeMutationToolPayload(` (L480-514)
1048
+ ### fn `export function buildWorktreeMutationToolPayload(` (L358-379)
1054
1049
  - @brief Builds the structured payload returned by `git-wt-create` or `git-wt-delete`.
1055
- - @details Exposes the requested operation, exact worktree name, derived worktree path, and mutation outcome as stable JSON fields while preserving raw diagnostics under execution. Runtime is O(p) in path length. No external state is mutated.
1050
+ - @details Exposes only the exact worktree name, derived worktree path, and error diagnostics, omitting static operation and branch-name echoes from the runtime payload. Runtime is O(p) in path length. No external state is mutated.
1056
1051
  - @param[in] toolName {"git-wt-create" | "git-wt-delete"} Target tool name.
1057
1052
  - @param[in] projectBasePath {string} Resolved project base path.
1058
1053
  - @param[in] configuredGitPath {string | undefined} Runtime git root path.
1059
1054
  - @param[in] worktreeName {string} Exact requested worktree name.
1060
- - @param[in] runtimePaths {RuntimePathFacts} Shared runtime path facts.
1061
1055
  - @param[in] execution {ToolExecutionSection} Normalized execution metadata.
1062
1056
  - @return {WorktreeMutationToolPayload} Structured worktree mutation payload.
1063
1057
 
1064
- ### fn `function buildStaticCheckFileRecord(` (L525-564)
1058
+ ### fn `function buildStaticCheckFileRecord(` (L390-424)
1065
1059
  - @brief Builds one static-check file-selection record.
1066
- - @details Resolves filesystem status, detects the configured language by file extension, counts configured checker entries, and emits a stable selection status without parsing checker output text. Runtime is O(p + c) in path length plus configured checker count. Side effects are limited to filesystem reads.
1060
+ - @details Resolves filesystem status, detects the configured language by file extension, and emits the configured checker modules plus a stable selection status without echoing caller inputs or redundant filesystem facts. Runtime is O(p + c) in path length plus configured checker count. Side effects are limited to filesystem reads.
1067
1061
  - @param[in] inputPath {string} Caller-supplied file path.
1068
1062
  - @param[in] requestIndex {number} Zero-based request position.
1069
1063
  - @param[in] projectBasePath {string} Resolved project base path.
1070
1064
  - @param[in] staticCheckConfig {Record<string, StaticCheckEntry[]>} Effective static-check configuration.
1071
1065
  - @return {StaticCheckFileRecord} Structured file-selection record.
1072
1066
 
1073
- ### fn `export function buildStaticCheckToolPayload(` (L580-621)
1067
+ ### fn `export function buildStaticCheckToolPayload(` (L439-470)
1074
1068
  - @brief Builds the structured payload returned by `files-static-check` or `static-check`.
1075
- - @details Exposes configured checker coverage, per-file selection facts, and normalized execution diagnostics while leaving raw checker output under execution for residual inspection only. Runtime is O(F + C). Side effects are limited to filesystem reads.
1069
+ - @details Exposes configured checker coverage, per-file selection facts, and normalized execution diagnostics while omitting request echoes whose semantics already live in registration metadata. Runtime is O(F + C). Side effects are limited to filesystem reads.
1076
1070
  - @param[in] toolName {"files-static-check" | "static-check"} Target tool name.
1077
1071
  - @param[in] scope {"explicit-files" | "configured-source-and-test-directories"} Selection scope label.
1078
1072
  - @param[in] projectBasePath {string} Resolved project base path.
@@ -1080,36 +1074,35 @@ import type { ToolResult } from "./tool-runner.js";
1080
1074
  - @param[in] selectionDirectoryPaths {string[]} Directories that produced the selection.
1081
1075
  - @param[in] excludedDirectoryPaths {string[]} Directory roots excluded from project selection.
1082
1076
  - @param[in] staticCheckConfig {Record<string, StaticCheckEntry[]>} Effective static-check configuration.
1083
- - @param[in] runtimePaths {RuntimePathFacts} Shared runtime path facts.
1084
1077
  - @param[in] execution {ToolExecutionSection} Normalized execution metadata.
1085
1078
  - @return {StaticCheckToolPayload} Structured static-check payload.
1086
1079
 
1087
1080
  ## Symbol Index
1088
1081
  |Symbol|Kind|Vis|Lines|Sig|
1089
1082
  |---|---|---|---|---|
1090
- |`ToolExecutionSection`|iface||19-27|export interface ToolExecutionSection|
1091
- |`StructuredToolExecuteResult`|iface||33-36|export interface StructuredToolExecuteResult<T>|
1092
- |`PathQueryToolPayload`|iface||42-58|export interface PathQueryToolPayload|
1093
- |`GitCheckToolPayload`|iface||64-80|export interface GitCheckToolPayload|
1094
- |`DocsCheckFileRecord`|iface||86-94|export interface DocsCheckFileRecord|
1095
- |`DocsCheckToolPayload`|iface||100-116|export interface DocsCheckToolPayload|
1096
- |`WorktreeNameToolPayload`|iface||122-137|export interface WorktreeNameToolPayload|
1097
- |`WorktreeMutationToolPayload`|iface||143-161|export interface WorktreeMutationToolPayload|
1098
- |`StaticCheckFileRecord`|iface||167-179|export interface StaticCheckFileRecord|
1099
- |`StaticCheckToolPayload`|iface||185-207|export interface StaticCheckToolPayload|
1100
- |`formatJsonToolPayload`|fn||215-217|function formatJsonToolPayload(payload: unknown): string|
1101
- |`splitToolOutputLines`|fn||225-228|function splitToolOutputLines(text: string): string[]|
1102
- |`canonicalizeToolPath`|fn||237-244|function canonicalizeToolPath(baseDir: string, candidateP...|
1103
- |`buildStructuredToolExecuteResult`|fn||252|export function buildStructuredToolExecuteResult<T extend...|
1104
- |`buildToolExecutionSection`|fn||267-281|export function buildToolExecutionSection(result: ToolRes...|
1105
- |`normalizeToolFailure`|fn||290-299|export function normalizeToolFailure(error: unknown): Too...|
1106
- |`buildPathQueryToolPayload`|fn||312-338|export function buildPathQueryToolPayload(|
1107
- |`buildGitCheckToolPayload`|fn||349-373|export function buildGitCheckToolPayload(|
1108
- |`buildDocsCheckToolPayload`|fn||383-433|export function buildDocsCheckToolPayload(|
1109
- |`buildWorktreeNameToolPayload`|fn||444-467|export function buildWorktreeNameToolPayload(|
1110
- |`buildWorktreeMutationToolPayload`|fn||480-514|export function buildWorktreeMutationToolPayload(|
1111
- |`buildStaticCheckFileRecord`|fn||525-564|function buildStaticCheckFileRecord(|
1112
- |`buildStaticCheckToolPayload`|fn||580-621|export function buildStaticCheckToolPayload(|
1083
+ |`ToolExecutionSection`|iface||18-22|export interface ToolExecutionSection|
1084
+ |`StructuredToolExecuteResult`|iface||28-31|export interface StructuredToolExecuteResult<T>|
1085
+ |`PathQueryToolPayload`|iface||37-43|export interface PathQueryToolPayload|
1086
+ |`GitCheckToolPayload`|iface||49-56|export interface GitCheckToolPayload|
1087
+ |`DocsCheckFileRecord`|iface||62-67|export interface DocsCheckFileRecord|
1088
+ |`DocsCheckToolPayload`|iface||73-80|export interface DocsCheckToolPayload|
1089
+ |`WorktreeNameToolPayload`|iface||86-92|export interface WorktreeNameToolPayload|
1090
+ |`WorktreeMutationToolPayload`|iface||98-105|export interface WorktreeMutationToolPayload|
1091
+ |`StaticCheckFileRecord`|iface||111-117|export interface StaticCheckFileRecord|
1092
+ |`StaticCheckToolPayload`|iface||123-133|export interface StaticCheckToolPayload|
1093
+ |`formatJsonToolPayload`|fn||141-143|function formatJsonToolPayload(payload: unknown): string|
1094
+ |`splitToolOutputLines`|fn||151-154|function splitToolOutputLines(text: string): string[]|
1095
+ |`canonicalizeToolPath`|fn||163-170|function canonicalizeToolPath(baseDir: string, candidateP...|
1096
+ |`buildStructuredToolExecuteResult`|fn||178|export function buildStructuredToolExecuteResult<T extend...|
1097
+ |`buildToolExecutionSection`|fn||193-203|export function buildToolExecutionSection(result: ToolRes...|
1098
+ |`normalizeToolFailure`|fn||212-221|export function normalizeToolFailure(error: unknown): Too...|
1099
+ |`buildPathQueryToolPayload`|fn||233-250|export function buildPathQueryToolPayload(|
1100
+ |`buildGitCheckToolPayload`|fn||260-275|export function buildGitCheckToolPayload(|
1101
+ |`buildDocsCheckToolPayload`|fn||284-321|export function buildDocsCheckToolPayload(|
1102
+ |`buildWorktreeNameToolPayload`|fn||331-346|export function buildWorktreeNameToolPayload(|
1103
+ |`buildWorktreeMutationToolPayload`|fn||358-379|export function buildWorktreeMutationToolPayload(|
1104
+ |`buildStaticCheckFileRecord`|fn||390-424|function buildStaticCheckFileRecord(|
1105
+ |`buildStaticCheckToolPayload`|fn||439-470|export function buildStaticCheckToolPayload(|
1113
1106
 
1114
1107
 
1115
1108
  ---
@@ -1154,7 +1147,7 @@ import { compressFileDetailed, detectLanguage } from "./compress.js";
1154
1147
 
1155
1148
  ---
1156
1149
 
1157
- # compress-payload.ts | TypeScript | 648L | 22 symbols | 5 imports | 23 comments
1150
+ # compress-payload.ts | TypeScript | 640L | 22 symbols | 5 imports | 23 comments
1158
1151
  > Path: `src/core/compress-payload.ts`
1159
1152
  - @brief Builds agent-oriented JSON payloads for `files-compress` and `compress`.
1160
1153
  - @details Converts compression results into deterministic JSON sections ordered for LLM traversal, including request metadata, repository scope, structured file metrics, structured compressed lines, symbols, and Doxygen fields. Runtime is O(F log F + S) where F is file count and S is total source size. Side effects are limited to filesystem reads and optional stderr logging.
@@ -1210,48 +1203,48 @@ import {
1210
1203
  - @brief Describes the repository section of the compression payload.
1211
1204
  - @details Stores the base path, configured source-directory scope, and canonical file list used during compression. The interface is compile-time only and introduces no runtime cost.
1212
1205
 
1213
- ### iface `export interface CompressToolPayload` (L170-175)
1206
+ ### iface `export interface CompressToolPayload` (L170-174)
1214
1207
  - @brief Describes the full agent-oriented compression payload.
1215
- - @details Orders the top-level sections as request, summary, repository, and files so execution metadata can be appended deterministically by the tool wrapper. The interface is compile-time only and introduces no runtime cost.
1208
+ - @details Exposes only aggregate compression totals, repository scope, and per-file compression records, omitting request echoes that are already known to the caller or encoded in tool registration metadata. The interface is compile-time only and introduces no runtime cost.
1216
1209
 
1217
- ### iface `export interface BuildCompressToolPayloadOptions` (L181-189)
1210
+ ### iface `export interface BuildCompressToolPayloadOptions` (L180-188)
1218
1211
  - @brief Describes the options required to build one compression payload.
1219
1212
  - @details Supplies tool identity, scope, base directory, requested paths, line-number mode, and optional configured source directories while keeping payload construction deterministic. The interface is compile-time only and introduces no runtime cost.
1220
1213
 
1221
- ### fn `function canonicalizeCompressionPath(targetPath: string, baseDir: string): string` (L198-206)
1214
+ ### fn `function canonicalizeCompressionPath(targetPath: string, baseDir: string): string` (L197-205)
1222
1215
  - @brief Canonicalizes one filesystem path relative to the payload base directory.
1223
1216
  - @details Emits a slash-normalized relative path when the target is under the base directory; otherwise emits the normalized absolute path. Runtime is O(p) in path length. No side effects occur.
1224
1217
  - @param[in] targetPath {string} Absolute or relative filesystem path.
1225
1218
  - @param[in] baseDir {string} Base directory used for relative canonicalization.
1226
1219
  - @return {string} Canonicalized path string.
1227
1220
 
1228
- ### fn `function buildLineRange(startLineNumber: number, endLineNumber: number): CompressLineRange` (L215-221)
1221
+ ### fn `function buildLineRange(startLineNumber: number, endLineNumber: number): CompressLineRange` (L214-220)
1229
1222
  - @brief Builds one structured line-range record.
1230
1223
  - @details Duplicates the inclusive range as start, end, and tuple fields so callers can address whichever shape is most convenient. Runtime is O(1). No side effects occur.
1231
1224
  - @param[in] startLineNumber {number} Inclusive start line number.
1232
1225
  - @param[in] endLineNumber {number} Inclusive end line number.
1233
1226
  - @return {CompressLineRange} Structured line-range record.
1234
1227
 
1235
- ### fn `function resolveSymbolName(element: SourceElement): string` (L229-231)
1228
+ ### fn `function resolveSymbolName(element: SourceElement): string` (L228-230)
1236
1229
  - @brief Resolves one stable symbol name from an analyzed element.
1237
1230
  - @details Prefers explicit analyzer name metadata, then falls back to the derived signature or the first source line so every symbol retains a direct-access identifier. Runtime is O(1). No side effects occur.
1238
1231
  - @param[in] element {SourceElement} Source element.
1239
1232
  - @return {string} Stable symbol name.
1240
1233
 
1241
- ### fn `function resolveParentElement(definitions: SourceElement[], child: SourceElement): SourceElement | undefined` (L240-249)
1234
+ ### fn `function resolveParentElement(definitions: SourceElement[], child: SourceElement): SourceElement | undefined` (L239-248)
1242
1235
  - @brief Resolves the direct parent element for one child symbol.
1243
1236
  - @details Matches by parent name plus inclusive line containment and chooses the deepest enclosing definition. Runtime is O(n) in definition count. No side effects occur.
1244
1237
  - @param[in] definitions {SourceElement[]} Sorted definition elements.
1245
1238
  - @param[in] child {SourceElement} Candidate child symbol.
1246
1239
  - @return {SourceElement | undefined} Matched parent definition when available.
1247
1240
 
1248
- ### fn `function mapCompressedLines(compressedLines: CompressedLineEntry[]): CompressToolLineEntry[]` (L257-264)
1241
+ ### fn `function mapCompressedLines(compressedLines: CompressedLineEntry[]): CompressToolLineEntry[]` (L256-263)
1249
1242
  - @brief Maps structured compression lines into the payload line-entry contract.
1250
1243
  - @details Performs a shallow field copy so the payload remains decoupled from the core compression result type. Runtime is O(n) in compressed line count. No side effects occur.
1251
1244
  - @param[in] compressedLines {CompressedLineEntry[]} Structured compression lines.
1252
1245
  - @return {CompressToolLineEntry[]} Payload line entries.
1253
1246
 
1254
- ### fn `function analyzeCompressedFileSymbols(` (L276-360)
1247
+ ### fn `function analyzeCompressedFileSymbols(` (L275-359)
1255
1248
  - @brief Builds structured symbol entries for one successfully analyzed file.
1256
1249
  - @details Extracts definition elements, computes parent-child relationships, attaches structured Doxygen metadata, and repeats the canonical file path inside each symbol record for direct-access agent indexing. Runtime is O(n log n) in definition count. No side effects occur.
1257
1250
  - @param[in] analyzer {SourceAnalyzer} Shared analyzer instance.
@@ -1261,7 +1254,7 @@ import {
1261
1254
  - @return {{ languageName: string | undefined; symbols: CompressToolSymbolEntry[]; fileDoxygen: StructuredDoxygenFields | undefined; fileDescriptionText: string | undefined; doxygenFieldCount: number }} Structured symbol-analysis result.
1262
1255
  - @throws {Error} Throws when source analysis or enrichment fails.
1263
1256
 
1264
- ### fn `function analyzeCompressFile(` (L374-505)
1257
+ ### fn `function analyzeCompressFile(` (L373-504)
1265
1258
  - @brief Analyzes one path into a structured compression file entry.
1266
1259
  - @details Resolves path identity, performs compression, attempts supplementary symbol and Doxygen extraction, preserves stable skip or error reasons, and keeps compression success independent from symbol-analysis success. Runtime is dominated by file I/O and analyzer cost. Side effects are limited to filesystem reads and optional stderr logging.
1267
1260
  - @param[in] analyzer {SourceAnalyzer} Shared analyzer instance.
@@ -1273,14 +1266,14 @@ import {
1273
1266
  - @param[in] verbose {boolean} When `true`, emit per-file diagnostics to stderr.
1274
1267
  - @return {CompressToolFileEntry} Structured file entry.
1275
1268
 
1276
- ### fn `export function buildCompressToolPayload(options: BuildCompressToolPayloadOptions): CompressToolPayload` (L514-628)
1269
+ ### fn `export function buildCompressToolPayload(options: BuildCompressToolPayloadOptions): CompressToolPayload` (L513-620)
1277
1270
  - @brief Builds the full agent-oriented compression payload.
1278
- - @details Validates requested paths against the filesystem, compresses processable files in caller order, preserves skipped and failed inputs in structured file entries, computes aggregate numeric totals, and emits repository scope metadata. Runtime is O(F log F + S). Side effects are limited to filesystem reads and optional stderr logging.
1271
+ - @details Validates requested paths against the filesystem, compresses processable files in caller order, preserves skipped and failed inputs in structured file entries, computes aggregate numeric totals, and emits repository scope metadata without echoing request facts already known to the caller. Runtime is O(F log F + S). Side effects are limited to filesystem reads and optional stderr logging.
1279
1272
  - @param[in] options {BuildCompressToolPayloadOptions} Payload-construction options.
1280
- - @return {CompressToolPayload} Structured compression payload ordered as request, summary, repository, and files.
1273
+ - @return {CompressToolPayload} Structured compression payload ordered as summary, repository, and files.
1281
1274
  - @satisfies REQ-081, REQ-082, REQ-083, REQ-084, REQ-085, REQ-087
1282
1275
 
1283
- ### fn `export function buildCompressToolExecutionStderr(payload: CompressToolPayload): string` (L637-648)
1276
+ ### fn `export function buildCompressToolExecutionStderr(payload: CompressToolPayload): string` (L629-640)
1284
1277
  - @brief Builds execution diagnostics for one compression payload.
1285
1278
  - @details Serializes skipped inputs, hard compression failures, and supplementary symbol-analysis warnings into stable stderr lines while keeping successful compressed files silent. Runtime is O(n) in issue count. No side effects occur.
1286
1279
  - @param[in] payload {CompressToolPayload} Structured compression payload.
@@ -1301,17 +1294,17 @@ import {
1301
1294
  |`CompressToolRequestSection`|iface||126-136|export interface CompressToolRequestSection|
1302
1295
  |`CompressToolSummarySection`|iface||142-153|export interface CompressToolSummarySection|
1303
1296
  |`CompressToolRepositorySection`|iface||159-164|export interface CompressToolRepositorySection|
1304
- |`CompressToolPayload`|iface||170-175|export interface CompressToolPayload|
1305
- |`BuildCompressToolPayloadOptions`|iface||181-189|export interface BuildCompressToolPayloadOptions|
1306
- |`canonicalizeCompressionPath`|fn||198-206|function canonicalizeCompressionPath(targetPath: string, ...|
1307
- |`buildLineRange`|fn||215-221|function buildLineRange(startLineNumber: number, endLineN...|
1308
- |`resolveSymbolName`|fn||229-231|function resolveSymbolName(element: SourceElement): string|
1309
- |`resolveParentElement`|fn||240-249|function resolveParentElement(definitions: SourceElement[...|
1310
- |`mapCompressedLines`|fn||257-264|function mapCompressedLines(compressedLines: CompressedLi...|
1311
- |`analyzeCompressedFileSymbols`|fn||276-360|function analyzeCompressedFileSymbols(|
1312
- |`analyzeCompressFile`|fn||374-505|function analyzeCompressFile(|
1313
- |`buildCompressToolPayload`|fn||514-628|export function buildCompressToolPayload(options: BuildCo...|
1314
- |`buildCompressToolExecutionStderr`|fn||637-648|export function buildCompressToolExecutionStderr(payload:...|
1297
+ |`CompressToolPayload`|iface||170-174|export interface CompressToolPayload|
1298
+ |`BuildCompressToolPayloadOptions`|iface||180-188|export interface BuildCompressToolPayloadOptions|
1299
+ |`canonicalizeCompressionPath`|fn||197-205|function canonicalizeCompressionPath(targetPath: string, ...|
1300
+ |`buildLineRange`|fn||214-220|function buildLineRange(startLineNumber: number, endLineN...|
1301
+ |`resolveSymbolName`|fn||228-230|function resolveSymbolName(element: SourceElement): string|
1302
+ |`resolveParentElement`|fn||239-248|function resolveParentElement(definitions: SourceElement[...|
1303
+ |`mapCompressedLines`|fn||256-263|function mapCompressedLines(compressedLines: CompressedLi...|
1304
+ |`analyzeCompressedFileSymbols`|fn||275-359|function analyzeCompressedFileSymbols(|
1305
+ |`analyzeCompressFile`|fn||373-504|function analyzeCompressFile(|
1306
+ |`buildCompressToolPayload`|fn||513-620|export function buildCompressToolPayload(options: BuildCo...|
1307
+ |`buildCompressToolExecutionStderr`|fn||629-640|export function buildCompressToolExecutionStderr(payload:...|
1315
1308
 
1316
1309
 
1317
1310
  ---
@@ -2109,7 +2102,7 @@ import { SourceAnalyzer, SourceElement, ElementType } from "./source-analyzer.js
2109
2102
 
2110
2103
  ---
2111
2104
 
2112
- # find-payload.ts | TypeScript | 915L | 32 symbols | 6 imports | 33 comments
2105
+ # find-payload.ts | TypeScript | 892L | 31 symbols | 6 imports | 32 comments
2113
2106
  > Path: `src/core/find-payload.ts`
2114
2107
  - @brief Builds agent-oriented JSON payloads for `files-find` and `find`.
2115
2108
  - @details Converts construct-search results into deterministic JSON sections ordered for LLM traversal, including request metadata, repository scope, file statuses, structured matches, structured Doxygen fields, typed line ranges, and normalized stripped code lines. Runtime is O(F log F + S + M) where F is file count, S is analyzed source size, and M is matched construct count. Side effects are limited to filesystem reads and optional stderr logging.
@@ -2161,87 +2154,82 @@ import {
2161
2154
  - @brief Describes the request section of the find payload.
2162
2155
  - @details Captures tool identity, scope, base directory, line-number mode, tag filter, regex, validation statuses, and requested path inventory so agents can reason about how the search was executed. The interface is compile-time only and introduces no runtime cost.
2163
2156
 
2164
- ### iface `export interface FindToolSummarySection` (L161-171)
2157
+ ### iface `export interface FindToolSummarySection` (L161-172)
2165
2158
  - @brief Describes the summary section of the find payload.
2166
- - @details Exposes aggregate file, match, line, and Doxygen counts as numeric fields plus one stable search-status discriminator. The interface is compile-time only and introduces no runtime cost.
2159
+ - @details Exposes aggregate file, match, line, and Doxygen counts as numeric fields plus one stable search-status discriminator and the normalized validation error when request parsing fails. The interface is compile-time only and introduces no runtime cost.
2167
2160
 
2168
- ### iface `export interface FindToolRepositorySection` (L177-183)
2161
+ ### iface `export interface FindToolRepositorySection` (L178-183)
2169
2162
  - @brief Describes the repository section of the find payload.
2170
- - @details Stores the base path, configured source-directory scope, canonical file list, and supported-tag matrix needed to specialize later searches without rereading tool descriptions. The interface is compile-time only and introduces no runtime cost.
2163
+ - @details Stores the base path, configured source-directory scope, and canonical file list used during search while omitting the static supported-tag matrix because that data belongs in tool registration metadata. The interface is compile-time only and introduces no runtime cost.
2171
2164
 
2172
- ### iface `export interface FindToolPayload` (L189-194)
2165
+ ### iface `export interface FindToolPayload` (L189-193)
2173
2166
  - @brief Describes the full agent-oriented find payload.
2174
- - @details Orders the top-level sections as request, summary, repository, and files so execution metadata can be appended deterministically by the tool wrapper. The interface is compile-time only and introduces no runtime cost.
2167
+ - @details Exposes only aggregate search totals, repository scope, and per-file match records, omitting request echoes and static supported-tag matrices that already belong in registration metadata. The interface is compile-time only and introduces no runtime cost.
2175
2168
 
2176
- ### iface `export interface BuildFindToolPayloadOptions` (L200-210)
2169
+ ### iface `export interface BuildFindToolPayloadOptions` (L199-209)
2177
2170
  - @brief Describes the options required to build one find payload.
2178
2171
  - @details Supplies tool identity, scope, base directory, tag filter, regex, requested paths, line-number mode, and optional configured source directories while keeping payload construction deterministic. The interface is compile-time only and introduces no runtime cost.
2179
2172
 
2180
- ### iface `interface ValidatedRegex` (L216-220)
2173
+ ### iface `interface ValidatedRegex` (L215-219)
2181
2174
  - @brief Describes the result of validating one regex pattern.
2182
2175
  - @details Separates valid compiled regex instances from invalid user input while preserving a stable machine-readable status and error message. The interface is compile-time only and introduces no runtime cost.
2183
2176
 
2184
- ### iface `interface ValidatedTagFilter` (L226-231)
2177
+ ### iface `interface ValidatedTagFilter` (L225-230)
2185
2178
  - @brief Describes the result of validating one tag filter.
2186
2179
  - @details Separates normalized tag values from invalid or empty filters while preserving a stable status and error message. The interface is compile-time only and introduces no runtime cost.
2187
2180
 
2188
- ### fn `function canonicalizeFindPath(targetPath: string, baseDir: string): string` (L240-248)
2181
+ ### fn `function canonicalizeFindPath(targetPath: string, baseDir: string): string` (L239-247)
2189
2182
  - @brief Canonicalizes one filesystem path relative to the payload base directory.
2190
2183
  - @details Emits a slash-normalized relative path when the target is under the base directory; otherwise emits the normalized absolute path. Runtime is O(p) in path length. No side effects occur.
2191
2184
  - @param[in] targetPath {string} Absolute or relative filesystem path.
2192
2185
  - @param[in] baseDir {string} Base directory used for relative canonicalization.
2193
2186
  - @return {string} Canonicalized path string.
2194
2187
 
2195
- ### fn `function buildLineRange(startLineNumber: number, endLineNumber: number): FindLineRange` (L257-263)
2188
+ ### fn `function buildLineRange(startLineNumber: number, endLineNumber: number): FindLineRange` (L256-262)
2196
2189
  - @brief Builds one structured line-range record.
2197
2190
  - @details Duplicates the inclusive range as start, end, and tuple fields so callers can address whichever shape is most convenient. Runtime is O(1). No side effects occur.
2198
2191
  - @param[in] startLineNumber {number} Inclusive start line number.
2199
2192
  - @param[in] endLineNumber {number} Inclusive end line number.
2200
2193
  - @return {FindLineRange} Structured line-range record.
2201
2194
 
2202
- ### fn `function buildSupportedTagsByLanguage(): Record<string, string[]>` (L270-276)
2203
- - @brief Returns the supported-tag matrix ordered for deterministic JSON emission.
2204
- - @details Sorts languages alphabetically and tag arrays lexicographically so downstream agents can reuse the matrix without reparsing human prose. Runtime is O(l * t log t). No side effects occur.
2205
- - @return {Record<string, string[]>} Supported tags keyed by canonical language identifier.
2206
-
2207
- ### fn `function resolveSymbolName(element: SourceElement): string` (L284-286)
2195
+ ### fn `function resolveSymbolName(element: SourceElement): string` (L270-272)
2208
2196
  - @brief Resolves one stable symbol name from an analyzed element.
2209
2197
  - @details Prefers explicit analyzer name metadata, then falls back to the derived signature or the first source line so every matched construct retains a direct-access identifier. Runtime is O(1). No side effects occur.
2210
2198
  - @param[in] element {SourceElement} Source element.
2211
2199
  - @return {string} Stable symbol name.
2212
2200
 
2213
- ### fn `function resolveParentElement(definitions: SourceElement[], element: SourceElement): SourceElement | undefined` (L295-304)
2201
+ ### fn `function resolveParentElement(definitions: SourceElement[], element: SourceElement): SourceElement | undefined` (L281-290)
2214
2202
  - @brief Resolves the direct parent definition for one source element.
2215
2203
  - @details Matches by parent name plus inclusive line containment and chooses the deepest enclosing definition. Runtime is O(n) in definition count. No side effects occur.
2216
2204
  - @param[in] definitions {SourceElement[]} Sorted definition elements.
2217
2205
  - @param[in] element {SourceElement} Candidate child element.
2218
2206
  - @return {SourceElement | undefined} Matched parent definition when available.
2219
2207
 
2220
- ### fn `function mapCodeLines(lineEntries: StrippedConstructLineEntry[]): FindToolCodeLineEntry[]` (L312-319)
2208
+ ### fn `function mapCodeLines(lineEntries: StrippedConstructLineEntry[]): FindToolCodeLineEntry[]` (L298-305)
2221
2209
  - @brief Converts stripped-code line entries into the payload line-entry contract.
2222
2210
  - @details Performs a shallow field copy so the payload remains decoupled from the lower-level strip helper type. Runtime is O(n) in stripped line count. No side effects occur.
2223
2211
  - @param[in] lineEntries {StrippedConstructLineEntry[]} Normalized stripped-code line entries.
2224
2212
  - @return {FindToolCodeLineEntry[]} Payload line entries.
2225
2213
 
2226
- ### fn `function buildStrippedSourceText(lineEntries: FindToolCodeLineEntry[]): string | undefined` (L327-332)
2214
+ ### fn `function buildStrippedSourceText(lineEntries: FindToolCodeLineEntry[]): string | undefined` (L313-318)
2227
2215
  - @brief Joins stripped-code line entries into one optional monolithic text field.
2228
2216
  - @details Preserves rendered display strings in line order so agents that need a contiguous excerpt can read one field without losing access to the structured line array. Runtime is O(n) in stripped line count. No side effects occur.
2229
2217
  - @param[in] lineEntries {FindToolCodeLineEntry[]} Structured stripped-code line entries.
2230
2218
  - @return {string | undefined} Joined stripped-source text, or `undefined` when no lines remain.
2231
2219
 
2232
- ### fn `function validateTagFilter(tagFilter: string): ValidatedTagFilter` (L340-356)
2220
+ ### fn `function validateTagFilter(tagFilter: string): ValidatedTagFilter` (L326-342)
2233
2221
  - @brief Validates and normalizes one tag filter.
2234
2222
  - @details Parses the raw pipe-delimited filter, sorts the resulting unique tag values, and marks the filter invalid when no recognized tag remains after normalization. Runtime is O(n log n) in requested tag count. No side effects occur.
2235
2223
  - @param[in] tagFilter {string} Raw pipe-delimited tag filter.
2236
2224
  - @return {ValidatedTagFilter} Validation result containing the normalized tag set and status.
2237
2225
 
2238
- ### fn `function validateRegexPattern(pattern: string): ValidatedRegex` (L364-376)
2226
+ ### fn `function validateRegexPattern(pattern: string): ValidatedRegex` (L350-362)
2239
2227
  - @brief Validates and compiles one construct-name regex pattern.
2240
2228
  - @details Uses the JavaScript `RegExp` engine with search-style `.test(...)` evaluation and records a stable error message when compilation fails. Runtime is O(n) in pattern length. No side effects occur.
2241
2229
  - @param[in] pattern {string} Raw user pattern.
2242
2230
  - @return {ValidatedRegex} Validation result containing the compiled regex when valid.
2243
2231
 
2244
- ### fn `function elementMatches(element: SourceElement, tagSet: Set<string>, regex: RegExp): boolean` (L386-394)
2232
+ ### fn `function elementMatches(element: SourceElement, tagSet: Set<string>, regex: RegExp): boolean` (L372-380)
2245
2233
  - @brief Tests whether one element matches a validated tag filter and regex.
2246
2234
  - @details Rejects unnamed elements and elements outside the requested tag set before applying the precompiled regex to the construct name. Runtime is O(1) plus regex evaluation. No side effects occur.
2247
2235
  - @param[in] element {SourceElement} Candidate source element.
@@ -2249,13 +2237,13 @@ import {
2249
2237
  - @param[in] regex {RegExp} Precompiled construct-name regex.
2250
2238
  - @return {boolean} `true` when the element matches both filters.
2251
2239
 
2252
- ### fn `function countLogicalLines(fileContent: string): number` (L402-407)
2240
+ ### fn `function countLogicalLines(fileContent: string): number` (L388-393)
2253
2241
  - @brief Counts logical source lines from one file content string.
2254
2242
  - @details Preserves the repository's line-count convention that excludes the terminal empty split produced by trailing newlines. Runtime is O(n) in content length. No side effects occur.
2255
2243
  - @param[in] fileContent {string} Raw file content.
2256
2244
  - @return {number} Logical source-line count.
2257
2245
 
2258
- ### fn `function buildSkippedFileEntry(` (L422-457)
2246
+ ### fn `function buildSkippedFileEntry(` (L408-443)
2259
2247
  - @brief Builds one skipped file entry for a request path.
2260
2248
  - @details Preserves path identity, filesystem status, language metadata when detectable, supported tags for the language, and a stable skip reason without attempting search analysis. Runtime is O(t) in supported-tag count. No side effects occur.
2261
2249
  - @param[in] inputPath {string} Caller-supplied path.
@@ -2268,7 +2256,7 @@ import {
2268
2256
  - @param[in] isFile {boolean} Filesystem file-kind flag.
2269
2257
  - @return {FindToolFileEntry} Structured skipped file entry.
2270
2258
 
2271
- ### fn `function buildMatchEntry(` (L471-514)
2259
+ ### fn `function buildMatchEntry(` (L457-500)
2272
2260
  - @brief Builds one matched construct entry from an analyzed element.
2273
2261
  - @details Resolves symbol identity, hierarchy hints, structured Doxygen fields, numeric declaration lines, and stripped code excerpts while keeping monolithic source text optional. Runtime is O(n) in construct span length plus Doxygen size. No side effects occur.
2274
2262
  - @param[in] element {SourceElement} Matched element.
@@ -2280,7 +2268,7 @@ import {
2280
2268
  - @param[in] includeLineNumbers {boolean} When `true`, rendered display strings include absolute source line prefixes.
2281
2269
  - @return {FindToolMatchEntry} Structured match entry.
2282
2270
 
2283
- ### fn `function analyzeFindFile(` (L530-716)
2271
+ ### fn `function analyzeFindFile(` (L516-702)
2284
2272
  - @brief Analyzes one path into a structured find file entry.
2285
2273
  - @details Resolves path identity, validates language and tag support, parses the file with `SourceAnalyzer`, builds structured match entries, and preserves stable status facts for no-match or failure outcomes. Runtime is dominated by file I/O and analyzer cost. Side effects are limited to filesystem reads and optional stderr logging.
2286
2274
  - @param[in] analyzer {SourceAnalyzer} Shared analyzer instance.
@@ -2294,14 +2282,14 @@ import {
2294
2282
  - @param[in] verbose {boolean} When `true`, emit per-file diagnostics to stderr.
2295
2283
  - @return {FindToolFileEntry} Structured file entry.
2296
2284
 
2297
- ### fn `export function buildFindToolPayload(options: BuildFindToolPayloadOptions): FindToolPayload` (L725-881)
2285
+ ### fn `export function buildFindToolPayload(options: BuildFindToolPayloadOptions): FindToolPayload` (L711-858)
2298
2286
  - @brief Builds the full agent-oriented find payload.
2299
- - @details Validates request parameters, analyzes requested files in caller order when the request is valid, preserves skipped and no-match outcomes in structured file entries, computes aggregate numeric totals, and emits a structured supported-tag matrix. Runtime is O(F log F + S + M). Side effects are limited to filesystem reads and optional stderr logging.
2287
+ - @details Validates request parameters, analyzes requested files in caller order when the request is valid, preserves skipped and no-match outcomes in structured file entries, computes aggregate numeric totals, and omits request echoes plus the static supported-tag matrix already encoded in registration metadata. Runtime is O(F log F + S + M). Side effects are limited to filesystem reads and optional stderr logging.
2300
2288
  - @param[in] options {BuildFindToolPayloadOptions} Payload-construction options.
2301
- - @return {FindToolPayload} Structured find payload ordered as request, summary, repository, and files.
2289
+ - @return {FindToolPayload} Structured find payload ordered as summary, repository, and files.
2302
2290
  - @satisfies REQ-089, REQ-090, REQ-091, REQ-092, REQ-093, REQ-094, REQ-096, REQ-098
2303
2291
 
2304
- ### fn `export function buildFindToolExecutionStderr(payload: FindToolPayload): string` (L890-915)
2292
+ ### fn `export function buildFindToolExecutionStderr(payload: FindToolPayload): string` (L867-892)
2305
2293
  - @brief Builds deterministic stderr diagnostics from a find payload.
2306
2294
  - @details Serializes invalid request states, skipped inputs, no-match files, and analysis failures into stable newline-delimited diagnostics while leaving successful matched files silent. Runtime is O(n) in file-entry count. No side effects occur.
2307
2295
  - @param[in] payload {FindToolPayload} Structured find payload.
@@ -2321,28 +2309,27 @@ import {
2321
2309
  |`FindToolMatchEntry`|iface||84-103|export interface FindToolMatchEntry extends FindLineRange|
2322
2310
  |`FindToolFileEntry`|iface||109-131|export interface FindToolFileEntry extends FindLineRange|
2323
2311
  |`FindToolRequestSection`|iface||137-155|export interface FindToolRequestSection|
2324
- |`FindToolSummarySection`|iface||161-171|export interface FindToolSummarySection|
2325
- |`FindToolRepositorySection`|iface||177-183|export interface FindToolRepositorySection|
2326
- |`FindToolPayload`|iface||189-194|export interface FindToolPayload|
2327
- |`BuildFindToolPayloadOptions`|iface||200-210|export interface BuildFindToolPayloadOptions|
2328
- |`ValidatedRegex`|iface||216-220|interface ValidatedRegex|
2329
- |`ValidatedTagFilter`|iface||226-231|interface ValidatedTagFilter|
2330
- |`canonicalizeFindPath`|fn||240-248|function canonicalizeFindPath(targetPath: string, baseDir...|
2331
- |`buildLineRange`|fn||257-263|function buildLineRange(startLineNumber: number, endLineN...|
2332
- |`buildSupportedTagsByLanguage`|fn||270-276|function buildSupportedTagsByLanguage(): Record<string, s...|
2333
- |`resolveSymbolName`|fn||284-286|function resolveSymbolName(element: SourceElement): string|
2334
- |`resolveParentElement`|fn||295-304|function resolveParentElement(definitions: SourceElement[...|
2335
- |`mapCodeLines`|fn||312-319|function mapCodeLines(lineEntries: StrippedConstructLineE...|
2336
- |`buildStrippedSourceText`|fn||327-332|function buildStrippedSourceText(lineEntries: FindToolCod...|
2337
- |`validateTagFilter`|fn||340-356|function validateTagFilter(tagFilter: string): ValidatedT...|
2338
- |`validateRegexPattern`|fn||364-376|function validateRegexPattern(pattern: string): Validated...|
2339
- |`elementMatches`|fn||386-394|function elementMatches(element: SourceElement, tagSet: S...|
2340
- |`countLogicalLines`|fn||402-407|function countLogicalLines(fileContent: string): number|
2341
- |`buildSkippedFileEntry`|fn||422-457|function buildSkippedFileEntry(|
2342
- |`buildMatchEntry`|fn||471-514|function buildMatchEntry(|
2343
- |`analyzeFindFile`|fn||530-716|function analyzeFindFile(|
2344
- |`buildFindToolPayload`|fn||725-881|export function buildFindToolPayload(options: BuildFindTo...|
2345
- |`buildFindToolExecutionStderr`|fn||890-915|export function buildFindToolExecutionStderr(payload: Fin...|
2312
+ |`FindToolSummarySection`|iface||161-172|export interface FindToolSummarySection|
2313
+ |`FindToolRepositorySection`|iface||178-183|export interface FindToolRepositorySection|
2314
+ |`FindToolPayload`|iface||189-193|export interface FindToolPayload|
2315
+ |`BuildFindToolPayloadOptions`|iface||199-209|export interface BuildFindToolPayloadOptions|
2316
+ |`ValidatedRegex`|iface||215-219|interface ValidatedRegex|
2317
+ |`ValidatedTagFilter`|iface||225-230|interface ValidatedTagFilter|
2318
+ |`canonicalizeFindPath`|fn||239-247|function canonicalizeFindPath(targetPath: string, baseDir...|
2319
+ |`buildLineRange`|fn||256-262|function buildLineRange(startLineNumber: number, endLineN...|
2320
+ |`resolveSymbolName`|fn||270-272|function resolveSymbolName(element: SourceElement): string|
2321
+ |`resolveParentElement`|fn||281-290|function resolveParentElement(definitions: SourceElement[...|
2322
+ |`mapCodeLines`|fn||298-305|function mapCodeLines(lineEntries: StrippedConstructLineE...|
2323
+ |`buildStrippedSourceText`|fn||313-318|function buildStrippedSourceText(lineEntries: FindToolCod...|
2324
+ |`validateTagFilter`|fn||326-342|function validateTagFilter(tagFilter: string): ValidatedT...|
2325
+ |`validateRegexPattern`|fn||350-362|function validateRegexPattern(pattern: string): Validated...|
2326
+ |`elementMatches`|fn||372-380|function elementMatches(element: SourceElement, tagSet: S...|
2327
+ |`countLogicalLines`|fn||388-393|function countLogicalLines(fileContent: string): number|
2328
+ |`buildSkippedFileEntry`|fn||408-443|function buildSkippedFileEntry(|
2329
+ |`buildMatchEntry`|fn||457-500|function buildMatchEntry(|
2330
+ |`analyzeFindFile`|fn||516-702|function analyzeFindFile(|
2331
+ |`buildFindToolPayload`|fn||711-858|export function buildFindToolPayload(options: BuildFindTo...|
2332
+ |`buildFindToolExecutionStderr`|fn||867-892|export function buildFindToolExecutionStderr(payload: Fin...|
2346
2333
 
2347
2334
 
2348
2335
  ---
@@ -2793,7 +2780,7 @@ import { readBundledPrompt } from "./resources.js";
2793
2780
 
2794
2781
  ---
2795
2782
 
2796
- # reference-payload.ts | TypeScript | 818L | 28 symbols | 5 imports | 27 comments
2783
+ # reference-payload.ts | TypeScript | 810L | 28 symbols | 5 imports | 27 comments
2797
2784
  > Path: `src/core/reference-payload.ts`
2798
2785
  - @brief Builds agent-oriented JSON payloads for `files-references` and `references`.
2799
2786
  - @details Converts analyzed source files into deterministic JSON sections ordered for LLM traversal, including repository structure, per-file metrics, imports, symbols, structured Doxygen fields, and structured comment evidence. Runtime is O(F log F + S) where F is file count and S is total source size. Side effects are limited to filesystem reads and optional stderr logging.
@@ -2855,77 +2842,77 @@ import {
2855
2842
  - @brief Describes the repository section of the references payload.
2856
2843
  - @details Stores the base path, configured source-directory scope, canonical file list, and structured directory tree used during analysis. The interface is compile-time only and introduces no runtime cost.
2857
2844
 
2858
- ### iface `export interface ReferenceToolPayload` (L187-192)
2845
+ ### iface `export interface ReferenceToolPayload` (L187-191)
2859
2846
  - @brief Describes the full agent-oriented references payload.
2860
- - @details Orders the top-level sections as request, summary, repository, and files for deterministic downstream traversal. The interface is compile-time only and introduces no runtime cost.
2847
+ - @details Exposes only aggregate analysis totals, repository structure, and per-file reference records, omitting request echoes that are already known to the caller or encoded in the tool registration. The interface is compile-time only and introduces no runtime cost.
2861
2848
 
2862
- ### iface `export interface BuildReferenceToolPayloadOptions` (L198-205)
2849
+ ### iface `export interface BuildReferenceToolPayloadOptions` (L197-204)
2863
2850
  - @brief Describes the options required to build one references payload.
2864
2851
  - @details Supplies tool identity, scope, base directory, requested paths, and optional configured source directories while keeping payload construction deterministic. The interface is compile-time only and introduces no runtime cost.
2865
2852
 
2866
- ### fn `function canonicalizeReferencePath(targetPath: string, baseDir: string): string` (L214-222)
2853
+ ### fn `function canonicalizeReferencePath(targetPath: string, baseDir: string): string` (L213-221)
2867
2854
  - @brief Canonicalizes one filesystem path relative to the payload base directory.
2868
2855
  - @details Emits a slash-normalized relative path when the target is under the base directory; otherwise emits the normalized absolute path. Runtime is O(p) in path length. No side effects occur.
2869
2856
  - @param[in] targetPath {string} Absolute or relative filesystem path.
2870
2857
  - @param[in] baseDir {string} Base directory used for relative canonicalization.
2871
2858
  - @return {string} Canonicalized path string.
2872
2859
 
2873
- ### fn `function buildLineRange(startLineNumber: number, endLineNumber: number): ReferenceLineRange` (L231-237)
2860
+ ### fn `function buildLineRange(startLineNumber: number, endLineNumber: number): ReferenceLineRange` (L230-236)
2874
2861
  - @brief Builds one structured line-range record.
2875
2862
  - @details Duplicates the inclusive range as start, end, and tuple fields so callers can address whichever shape is most convenient. Runtime is O(1). No side effects occur.
2876
2863
  - @param[in] startLineNumber {number} Inclusive start line number.
2877
2864
  - @param[in] endLineNumber {number} Inclusive end line number.
2878
2865
  - @return {ReferenceLineRange} Structured line-range record.
2879
2866
 
2880
- ### fn `function extractCommentText(commentElement: SourceElement, maxLength = 0): string` (L246-266)
2867
+ ### fn `function extractCommentText(commentElement: SourceElement, maxLength = 0): string` (L245-265)
2881
2868
  - @brief Extracts normalized plain text from one comment element.
2882
2869
  - @details Removes language comment markers, drops delimiter-only lines, joins content with spaces, and optionally truncates the result. Runtime is O(n) in comment length. No side effects occur.
2883
2870
  - @param[in] commentElement {SourceElement} Comment element.
2884
2871
  - @param[in] maxLength {number} Optional maximum output length; `0` disables truncation.
2885
2872
  - @return {string} Cleaned comment text.
2886
2873
 
2887
- ### fn `function extractCommentLines(commentElement: SourceElement): string[]` (L274-288)
2874
+ ### fn `function extractCommentLines(commentElement: SourceElement): string[]` (L273-287)
2888
2875
  - @brief Extracts cleaned individual lines from one comment element.
2889
2876
  - @details Removes language comment markers while preserving line granularity for structured comment payloads. Runtime is O(n) in comment length. No side effects occur.
2890
2877
  - @param[in] commentElement {SourceElement} Comment element.
2891
2878
  - @return {string[]} Cleaned comment lines.
2892
2879
 
2893
- ### fn `function buildCommentMaps(elements: SourceElement[]): [Record<number, SourceElement[]>, SourceElement[], string]` (L296-346)
2880
+ ### fn `function buildCommentMaps(elements: SourceElement[]): [Record<number, SourceElement[]>, SourceElement[], string]` (L295-345)
2894
2881
  - @brief Associates nearby comment blocks with definitions and standalone comment groups.
2895
2882
  - @details Reuses the repository comment-attachment heuristic that binds comments within three lines of a definition while preserving early file-description text. Runtime is O(n log n). No side effects occur.
2896
2883
  - @param[in] elements {SourceElement[]} Analyzed source elements.
2897
2884
  - @return {[Record<number, SourceElement[]>, SourceElement[], string]} Attached-comment map, standalone comments, and compact file description.
2898
2885
 
2899
- ### fn `function resolveSymbolName(element: SourceElement): string` (L354-356)
2886
+ ### fn `function resolveSymbolName(element: SourceElement): string` (L353-355)
2900
2887
  - @brief Resolves one stable symbol name from an analyzed element.
2901
2888
  - @details Prefers explicit analyzer name metadata, then falls back to the derived signature or the first source line so every symbol retains a direct-access identifier. Runtime is O(1). No side effects occur.
2902
2889
  - @param[in] element {SourceElement} Source element.
2903
2890
  - @return {string} Stable symbol name.
2904
2891
 
2905
- ### fn `function resolveParentElement(definitions: SourceElement[], child: SourceElement): SourceElement | undefined` (L365-374)
2892
+ ### fn `function resolveParentElement(definitions: SourceElement[], child: SourceElement): SourceElement | undefined` (L364-373)
2906
2893
  - @brief Resolves the direct parent element for one child symbol.
2907
2894
  - @details Matches by parent name plus inclusive line containment and chooses the deepest enclosing definition. Runtime is O(n) in definition count. No side effects occur.
2908
2895
  - @param[in] definitions {SourceElement[]} Sorted definition elements.
2909
2896
  - @param[in] child {SourceElement} Candidate child symbol.
2910
2897
  - @return {SourceElement | undefined} Matched parent definition when available.
2911
2898
 
2912
- ### fn `function buildCommentEntry(commentElement: SourceElement): ReferenceCommentEntry` (L382-389)
2899
+ ### fn `function buildCommentEntry(commentElement: SourceElement): ReferenceCommentEntry` (L381-388)
2913
2900
  - @brief Builds one structured comment record from a comment element.
2914
2901
  - @details Preserves numeric line-range metadata plus normalized text and per-line fragments. Runtime is O(n) in comment length. No side effects occur.
2915
2902
  - @param[in] commentElement {SourceElement} Source comment element.
2916
2903
  - @return {ReferenceCommentEntry} Structured comment record.
2917
2904
 
2918
- ### fn `function buildRepositoryTree(canonicalPaths: string[]): ReferenceRepositoryTreeNode` (L397-456)
2905
+ ### fn `function buildRepositoryTree(canonicalPaths: string[]): ReferenceRepositoryTreeNode` (L396-455)
2919
2906
  - @brief Builds one structured repository tree from canonical file paths.
2920
2907
  - @details Materializes a nested directory map and converts it into recursively ordered JSON nodes without decorative ASCII formatting. Runtime is O(n log n) in path count. No side effects occur.
2921
2908
  - @param[in] canonicalPaths {string[]} Canonical file paths.
2922
2909
  - @return {ReferenceRepositoryTreeNode} Structured repository tree rooted at `.`.
2923
2910
 
2924
- ### fn `const ensureDirectory = (parent: ReferenceRepositoryTreeNode, nodeName: string, relativePath: string): ReferenceRepositoryTreeNode =>` (L406-420)
2911
+ ### fn `const ensureDirectory = (parent: ReferenceRepositoryTreeNode, nodeName: string, relativePath: string): ReferenceRepositoryTreeNode =>` (L405-419)
2925
2912
 
2926
- ### fn `const finalizeNode = (node: ReferenceRepositoryTreeNode): ReferenceRepositoryTreeNode =>` (L442-453)
2913
+ ### fn `const finalizeNode = (node: ReferenceRepositoryTreeNode): ReferenceRepositoryTreeNode =>` (L441-452)
2927
2914
 
2928
- ### fn `function analyzeReferenceFile(` (L469-662)
2915
+ ### fn `function analyzeReferenceFile(` (L468-661)
2929
2916
  - @brief Builds one analyzed file entry for the references payload.
2930
2917
  - @details Parses the file with `SourceAnalyzer`, extracts structured imports and symbols, attaches structured Doxygen fields, and preserves standalone comment evidence. Runtime is O(S log S) in file size and symbol count. Side effects are limited to filesystem reads and optional stderr logging.
2931
2918
  - @param[in] analyzer {SourceAnalyzer} Shared source analyzer instance.
@@ -2936,14 +2923,14 @@ import {
2936
2923
  - @param[in] verbose {boolean} When `true`, emit per-file progress diagnostics to stderr.
2937
2924
  - @return {ReferenceToolFileEntry} Structured file entry.
2938
2925
 
2939
- ### fn `export function buildReferenceToolPayload(options: BuildReferenceToolPayloadOptions): ReferenceToolPayload` (L671-796)
2926
+ ### fn `export function buildReferenceToolPayload(options: BuildReferenceToolPayloadOptions): ReferenceToolPayload` (L670-788)
2940
2927
  - @brief Builds the full agent-oriented references payload.
2941
- - @details Validates requested paths against the filesystem, analyzes processable files in caller order, preserves skipped and failed inputs in structured file entries, computes aggregate numeric totals, and emits a structured repository tree. Runtime is O(F log F + S). Side effects are limited to filesystem reads and optional stderr logging.
2928
+ - @details Validates requested paths against the filesystem, analyzes processable files in caller order, preserves skipped and failed inputs in structured file entries, computes aggregate numeric totals, and emits structured repository data without echoing request metadata already known to the caller. Runtime is O(F log F + S). Side effects are limited to filesystem reads and optional stderr logging.
2942
2929
  - @param[in] options {BuildReferenceToolPayloadOptions} Payload-construction options.
2943
- - @return {ReferenceToolPayload} Structured references payload ordered as request, summary, repository, and files.
2930
+ - @return {ReferenceToolPayload} Structured references payload ordered as summary, repository, and files.
2944
2931
  - @satisfies REQ-011, REQ-014, REQ-076, REQ-077, REQ-078, REQ-079
2945
2932
 
2946
- ### fn `export function buildReferenceToolExecutionStderr(payload: ReferenceToolPayload): string` (L804-818)
2933
+ ### fn `export function buildReferenceToolExecutionStderr(payload: ReferenceToolPayload): string` (L796-810)
2947
2934
  - @brief Builds deterministic stderr diagnostics from a references payload.
2948
2935
  - @details Serializes skipped-input and analysis-error entries into stable newline-delimited diagnostics while leaving fully analyzed payloads silent. Runtime is O(n) in file-entry count. No side effects occur.
2949
2936
  - @param[in] payload {ReferenceToolPayload} Structured references payload.
@@ -2964,22 +2951,22 @@ import {
2964
2951
  |`ReferenceToolSummarySection`|iface||146-157|export interface ReferenceToolSummarySection|
2965
2952
  |`ReferenceRepositoryTreeNode`|iface||163-169|export interface ReferenceRepositoryTreeNode|
2966
2953
  |`ReferenceToolRepositorySection`|iface||175-181|export interface ReferenceToolRepositorySection|
2967
- |`ReferenceToolPayload`|iface||187-192|export interface ReferenceToolPayload|
2968
- |`BuildReferenceToolPayloadOptions`|iface||198-205|export interface BuildReferenceToolPayloadOptions|
2969
- |`canonicalizeReferencePath`|fn||214-222|function canonicalizeReferencePath(targetPath: string, ba...|
2970
- |`buildLineRange`|fn||231-237|function buildLineRange(startLineNumber: number, endLineN...|
2971
- |`extractCommentText`|fn||246-266|function extractCommentText(commentElement: SourceElement...|
2972
- |`extractCommentLines`|fn||274-288|function extractCommentLines(commentElement: SourceElemen...|
2973
- |`buildCommentMaps`|fn||296-346|function buildCommentMaps(elements: SourceElement[]): [Re...|
2974
- |`resolveSymbolName`|fn||354-356|function resolveSymbolName(element: SourceElement): string|
2975
- |`resolveParentElement`|fn||365-374|function resolveParentElement(definitions: SourceElement[...|
2976
- |`buildCommentEntry`|fn||382-389|function buildCommentEntry(commentElement: SourceElement)...|
2977
- |`buildRepositoryTree`|fn||397-456|function buildRepositoryTree(canonicalPaths: string[]): R...|
2978
- |`ensureDirectory`|fn||406-420|const ensureDirectory = (parent: ReferenceRepositoryTreeN...|
2979
- |`finalizeNode`|fn||442-453|const finalizeNode = (node: ReferenceRepositoryTreeNode):...|
2980
- |`analyzeReferenceFile`|fn||469-662|function analyzeReferenceFile(|
2981
- |`buildReferenceToolPayload`|fn||671-796|export function buildReferenceToolPayload(options: BuildR...|
2982
- |`buildReferenceToolExecutionStderr`|fn||804-818|export function buildReferenceToolExecutionStderr(payload...|
2954
+ |`ReferenceToolPayload`|iface||187-191|export interface ReferenceToolPayload|
2955
+ |`BuildReferenceToolPayloadOptions`|iface||197-204|export interface BuildReferenceToolPayloadOptions|
2956
+ |`canonicalizeReferencePath`|fn||213-221|function canonicalizeReferencePath(targetPath: string, ba...|
2957
+ |`buildLineRange`|fn||230-236|function buildLineRange(startLineNumber: number, endLineN...|
2958
+ |`extractCommentText`|fn||245-265|function extractCommentText(commentElement: SourceElement...|
2959
+ |`extractCommentLines`|fn||273-287|function extractCommentLines(commentElement: SourceElemen...|
2960
+ |`buildCommentMaps`|fn||295-345|function buildCommentMaps(elements: SourceElement[]): [Re...|
2961
+ |`resolveSymbolName`|fn||353-355|function resolveSymbolName(element: SourceElement): string|
2962
+ |`resolveParentElement`|fn||364-373|function resolveParentElement(definitions: SourceElement[...|
2963
+ |`buildCommentEntry`|fn||381-388|function buildCommentEntry(commentElement: SourceElement)...|
2964
+ |`buildRepositoryTree`|fn||396-455|function buildRepositoryTree(canonicalPaths: string[]): R...|
2965
+ |`ensureDirectory`|fn||405-419|const ensureDirectory = (parent: ReferenceRepositoryTreeN...|
2966
+ |`finalizeNode`|fn||441-452|const finalizeNode = (node: ReferenceRepositoryTreeNode):...|
2967
+ |`analyzeReferenceFile`|fn||468-661|function analyzeReferenceFile(|
2968
+ |`buildReferenceToolPayload`|fn||670-788|export function buildReferenceToolPayload(options: BuildR...|
2969
+ |`buildReferenceToolExecutionStderr`|fn||796-810|export function buildReferenceToolExecutionStderr(payload...|
2983
2970
 
2984
2971
 
2985
2972
  ---
@@ -3483,7 +3470,7 @@ import { ReqError } from "./errors.js";
3483
3470
 
3484
3471
  ---
3485
3472
 
3486
- # token-counter.ts | TypeScript | 729L | 29 symbols | 5 imports | 35 comments
3473
+ # token-counter.ts | TypeScript | 611L | 28 symbols | 5 imports | 34 comments
3487
3474
  > Path: `src/core/token-counter.ts`
3488
3475
  - @brief Provides token, size, and structure counting utilities for agent-oriented file payloads.
3489
3476
  - @details Wraps `js-tiktoken` encoding lookup, extracts per-file structural facts, and builds machine-oriented JSON payloads for token-centric tools. Runtime is linear in processed text size plus sort cost for derived ordering hints. Side effects are limited to filesystem reads in file-based helpers.
@@ -3545,80 +3532,72 @@ import { parseDoxygenComment, type DoxygenFieldMap } from "./doxygen-parser.js";
3545
3532
  - @brief Describes the guidance section of the agent-oriented token payload.
3546
3533
  - @details Separates source observations, derived recommendations, and actionable next-step hints so downstream agents can choose between raw evidence and planning heuristics without reparsing mixed prose. The interface is compile-time only and introduces no runtime cost.
3547
3534
 
3548
- ### iface `export interface TokenToolPayload` (L180-185)
3535
+ ### iface `export interface TokenToolPayload` (L180-183)
3549
3536
  - @brief Describes the full agent-oriented token payload.
3550
- - @details Orders the top-level sections as request, summary, files, and guidance for deterministic downstream traversal. The interface is compile-time only and introduces no runtime cost.
3537
+ - @details Exposes only aggregate numeric totals plus per-file metrics, omitting request echoes and derived guidance that can be inferred from tool registration or recomputed by the caller. The interface is compile-time only and introduces no runtime cost.
3551
3538
 
3552
- ### iface `export interface BuildTokenToolPayloadOptions` (L191-199)
3539
+ ### iface `export interface BuildTokenToolPayloadOptions` (L189-197)
3553
3540
  - @brief Describes the options required to build one agent-oriented token payload.
3554
3541
  - @details Supplies tool identity, scope, path base, requested paths, and optional canonical-doc metadata while keeping counting behavior configurable through a stable object contract. The interface is compile-time only and introduces no runtime cost.
3555
3542
 
3556
- ### class `export class TokenCounter` (L205-245)
3543
+ ### class `export class TokenCounter` (L203-243)
3557
3544
  - @brief Encapsulates one tokenizer instance for repeated token counting.
3558
3545
  - @brief Stores the tokenizer implementation used for subsequent counts.
3559
3546
  - @details Caches a `js-tiktoken` encoding object so multiple documents can be counted without repeated encoding lookup. Counting cost is O(n) in content length. The class mutates only instance state during construction.
3560
3547
  - @details The field holds the encoder returned by `getEncoding`. Access complexity is O(1). The value is initialized once per instance.
3561
3548
 
3562
- ### fn `function canonicalizeTokenPath(filePath: string, baseDir: string): string` (L254-262)
3549
+ ### fn `function canonicalizeTokenPath(filePath: string, baseDir: string): string` (L252-260)
3563
3550
  - @brief Converts one filesystem path into the canonical token-payload path form.
3564
3551
  - @details Emits a slash-normalized relative path when the target is under the supplied base directory; otherwise emits a slash-normalized absolute path. Runtime is O(p) in path length. No external state is mutated.
3565
3552
  - @param[in] filePath {string} Candidate absolute or relative filesystem path.
3566
3553
  - @param[in] baseDir {string} Reference directory used for relative canonicalization.
3567
3554
  - @return {string} Canonicalized path string.
3568
3555
 
3569
- ### fn `function countLines(content: string): number` (L270-276)
3556
+ ### fn `function countLines(content: string): number` (L268-274)
3570
3557
  - @brief Counts logical lines in one text payload.
3571
3558
  - @details Counts newline separators while treating a trailing newline as line termination instead of an extra empty logical line. Runtime is O(n) in text length. No side effects occur.
3572
3559
  - @param[in] content {string} Text payload.
3573
3560
  - @return {number} Logical line count; `0` for empty content.
3574
3561
 
3575
- ### fn `function stripMarkdownFrontMatter(content: string): string` (L284-287)
3562
+ ### fn `function stripMarkdownFrontMatter(content: string): string` (L282-285)
3576
3563
  - @brief Strips YAML front matter from markdown content before heading extraction.
3577
3564
  - @details Removes the first `--- ... ---` block only when it appears at the file start so heading detection can operate on semantic markdown content instead of metadata. Runtime is O(n) in content length. No side effects occur.
3578
3565
  - @param[in] content {string} Markdown payload.
3579
3566
  - @return {string} Markdown body without the leading front matter block.
3580
3567
 
3581
- ### fn `function extractPrimaryHeadingText(content: string, filePath: string): string | undefined` (L296-303)
3568
+ ### fn `function extractPrimaryHeadingText(content: string, filePath: string): string | undefined` (L294-301)
3582
3569
  - @brief Extracts the first level-one markdown heading when present.
3583
3570
  - @details Restricts extraction to markdown-like files, skips YAML front matter, and returns the first `# ` heading payload without surrounding whitespace. Runtime is O(n) in content length. No side effects occur.
3584
3571
  - @param[in] content {string} File content.
3585
3572
  - @param[in] filePath {string} Source path used for extension-based markdown detection.
3586
3573
  - @return {string | undefined} First heading text, or `undefined` when absent or the file is not markdown-like.
3587
3574
 
3588
- ### fn `function inferLanguageName(filePath: string): string | undefined` (L311-320)
3575
+ ### fn `function inferLanguageName(filePath: string): string | undefined` (L309-318)
3589
3576
  - @brief Infers a file language label optimized for agent payloads.
3590
3577
  - @details Reuses source-language detection when available, normalizes markdown extensions explicitly, and falls back to the lowercase extension name without the leading dot. Runtime is O(1). No side effects occur.
3591
3578
  - @param[in] filePath {string} File path whose extension should be classified.
3592
3579
  - @return {string | undefined} Normalized language label, or `undefined` when the path has no usable extension.
3593
3580
 
3594
- ### fn `function extractLeadingDoxygenFields(content: string): DoxygenFieldMap | undefined` (L328-346)
3581
+ ### fn `function extractLeadingDoxygenFields(content: string): DoxygenFieldMap | undefined` (L326-344)
3595
3582
  - @brief Extracts leading Doxygen file fields when present.
3596
3583
  - @details Tests common leading-comment syntaxes, normalizes an optional shebang away before matching, and returns the first non-empty parsed Doxygen map. Runtime is O(n) in comment length. No side effects occur.
3597
3584
  - @param[in] content {string} File content.
3598
3585
  - @return {DoxygenFieldMap | undefined} Parsed Doxygen field map, or `undefined` when no supported file-level fields are present.
3599
3586
 
3600
- ### fn `function roundRatio(numerator: number, denominator: number): number` (L355-360)
3587
+ ### fn `function roundRatio(numerator: number, denominator: number): number` (L353-358)
3601
3588
  - @brief Rounds one ratio to six decimal places.
3602
3589
  - @details Preserves zero exactly and otherwise limits floating-point noise so share fields remain stable across executions. Runtime is O(1). No side effects occur.
3603
3590
  - @param[in] numerator {number} Partial numeric value.
3604
3591
  - @param[in] denominator {number} Total numeric value.
3605
3592
  - @return {number} Rounded ratio in range `[0, 1]` when the denominator is positive; `0` otherwise.
3606
3593
 
3607
- ### fn `function orderPathsByMetric(` (L370-395)
3608
- - @brief Orders canonical file paths by one numeric metric while removing duplicates.
3609
- - @details Filters to counted file entries, sorts by the supplied metric direction, breaks ties by canonical path, and preserves only the first occurrence of each path. Runtime is O(n log n). No external state is mutated.
3610
- - @param[in] files {TokenToolFileEntry[]} Token payload file entries.
3611
- - @param[in] metric {(entry: TokenToolFileEntry) => number} Numeric metric selector.
3612
- - @param[in] direction {"asc" | "desc"} Sort direction.
3613
- - @return {string[]} Unique canonical paths ordered by the requested metric.
3614
-
3615
- ### fn `function probeRequestedPath(absolutePath: string): { exists: boolean; isFile: boolean; reason?: string }` (L403-417)
3594
+ ### fn `function probeRequestedPath(absolutePath: string): { exists: boolean; isFile: boolean; reason?: string }` (L366-380)
3616
3595
  - @brief Probes one requested path before token counting.
3617
3596
  - @details Resolves whether the target exists and is a regular file while capturing a stable skip reason for missing or non-file inputs. Runtime is dominated by one filesystem stat. Side effects are limited to filesystem reads.
3618
3597
  - @param[in] absolutePath {string} Absolute path to inspect.
3619
3598
  - @return {{ exists: boolean; isFile: boolean; reason?: string }} Path probe result.
3620
3599
 
3621
- ### fn `function buildCountFileMetricsResult(filePath: string, content: string, counter: TokenCounter): CountFileMetricsResult` (L427-442)
3600
+ ### fn `function buildCountFileMetricsResult(filePath: string, content: string, counter: TokenCounter): CountFileMetricsResult` (L390-405)
3622
3601
  - @brief Builds one rich per-file metrics record from readable content.
3623
3602
  - @details Combines token, character, byte, and line counts with file-extension, inferred-language, heading, and Doxygen metadata extraction so agents can consume direct-access facts without reparsing the raw file. Runtime is O(n) in content length. No external state is mutated.
3624
3603
  - @param[in] filePath {string} Absolute or project-local file path.
@@ -3626,14 +3605,14 @@ import { parseDoxygenComment, type DoxygenFieldMap } from "./doxygen-parser.js";
3626
3605
  - @param[in] counter {TokenCounter} Reused token counter instance.
3627
3606
  - @return {CountFileMetricsResult} Structured per-file metrics record.
3628
3607
 
3629
- ### fn `export function countFileMetrics(content: string, encodingName = TOKEN_COUNTER_ENCODING):` (L451-464)
3608
+ ### fn `export function countFileMetrics(content: string, encodingName = TOKEN_COUNTER_ENCODING):` (L414-427)
3630
3609
  - @brief Counts tokens, characters, bytes, and lines for one in-memory content string.
3631
3610
  - @details Instantiates a `TokenCounter`, tokenizes the supplied text, and pairs the result with raw character length, UTF-8 byte size, and logical line count. Runtime is O(n). No filesystem I/O occurs.
3632
3611
  - @param[in] content {string} Text payload to measure.
3633
3612
  - @param[in] encodingName {string} Tokenizer identifier. Defaults to `cl100k_base`.
3634
3613
  - @return {{ tokens: number; chars: number; bytes: number; lines: number }} Aggregate metrics for the supplied content.
3635
3614
 
3636
- ### fn `export function countFilesMetrics(filePaths: string[], encodingName = TOKEN_COUNTER_ENCODING): CountFileMetricsResult[]` (L474-495)
3615
+ ### fn `export function countFilesMetrics(filePaths: string[], encodingName = TOKEN_COUNTER_ENCODING): CountFileMetricsResult[]` (L437-458)
3637
3616
  - @brief Counts tokens, characters, bytes, and lines for multiple files.
3638
3617
  - @details Reuses a single `TokenCounter`, reads each file as UTF-8, and returns per-file metrics plus direct-access metadata such as heading and Doxygen file fields. Read failures are captured as error strings instead of aborting the entire batch. Runtime is O(F + S). Side effects are limited to filesystem reads.
3639
3618
  - @param[in] filePaths {string[]} File paths to measure.
@@ -3641,14 +3620,14 @@ import { parseDoxygenComment, type DoxygenFieldMap } from "./doxygen-parser.js";
3641
3620
  - @return {CountFileMetricsResult[]} Per-file metrics and optional read errors.
3642
3621
  - @satisfies REQ-010, REQ-070, REQ-073
3643
3622
 
3644
- ### fn `export function buildTokenToolPayload(options: BuildTokenToolPayloadOptions): TokenToolPayload` (L504-697)
3623
+ ### fn `export function buildTokenToolPayload(options: BuildTokenToolPayloadOptions): TokenToolPayload` (L467-579)
3645
3624
  - @brief Builds the agent-oriented JSON payload for token-centric tools.
3646
- - @details Validates requested paths against the filesystem, counts token metrics for processable files, preserves caller order in the file table, separates raw observations from derived guidance, and emits direct-access file facts such as line ranges, sizes, headings, and optional Doxygen file fields. Runtime is O(F log F + S). Side effects are limited to filesystem reads.
3625
+ - @details Validates requested paths against the filesystem, counts token metrics for processable files, preserves caller order in the file table, and emits direct-access file facts such as sizes, headings, and optional Doxygen file fields while omitting request echoes and derived guidance. Runtime is O(F + S). Side effects are limited to filesystem reads.
3647
3626
  - @param[in] options {BuildTokenToolPayloadOptions} Payload-construction options.
3648
- - @return {TokenToolPayload} Structured token payload ordered as request, summary, files, guidance.
3627
+ - @return {TokenToolPayload} Structured token payload ordered as summary then files.
3649
3628
  - @satisfies REQ-010, REQ-017, REQ-069, REQ-070, REQ-071, REQ-073, REQ-074, REQ-075
3650
3629
 
3651
- ### fn `export function formatPackSummary(results: CountFileMetricsResult[]): string` (L705-729)
3630
+ ### fn `export function formatPackSummary(results: CountFileMetricsResult[]): string` (L587-611)
3652
3631
  - @brief Formats per-file token metrics as a human-readable summary block.
3653
3632
  - @details Aggregates totals, emits one status line per file, and appends a summary footer containing file, token, and character counts. Runtime is O(n). No external state is mutated.
3654
3633
  - @param[in] results {CountFileMetricsResult[]} Per-file metric records.
@@ -3669,23 +3648,22 @@ import { parseDoxygenComment, type DoxygenFieldMap } from "./doxygen-parser.js";
3669
3648
  |`TokenToolRecommendation`|iface||150-154|export interface TokenToolRecommendation|
3670
3649
  |`TokenToolNextStepHint`|iface||160-164|export interface TokenToolNextStepHint|
3671
3650
  |`TokenToolGuidanceSection`|iface||170-174|export interface TokenToolGuidanceSection|
3672
- |`TokenToolPayload`|iface||180-185|export interface TokenToolPayload|
3673
- |`BuildTokenToolPayloadOptions`|iface||191-199|export interface BuildTokenToolPayloadOptions|
3674
- |`TokenCounter`|class||205-245|export class TokenCounter|
3675
- |`canonicalizeTokenPath`|fn||254-262|function canonicalizeTokenPath(filePath: string, baseDir:...|
3676
- |`countLines`|fn||270-276|function countLines(content: string): number|
3677
- |`stripMarkdownFrontMatter`|fn||284-287|function stripMarkdownFrontMatter(content: string): string|
3678
- |`extractPrimaryHeadingText`|fn||296-303|function extractPrimaryHeadingText(content: string, fileP...|
3679
- |`inferLanguageName`|fn||311-320|function inferLanguageName(filePath: string): string | un...|
3680
- |`extractLeadingDoxygenFields`|fn||328-346|function extractLeadingDoxygenFields(content: string): Do...|
3681
- |`roundRatio`|fn||355-360|function roundRatio(numerator: number, denominator: numbe...|
3682
- |`orderPathsByMetric`|fn||370-395|function orderPathsByMetric(|
3683
- |`probeRequestedPath`|fn||403-417|function probeRequestedPath(absolutePath: string): { exis...|
3684
- |`buildCountFileMetricsResult`|fn||427-442|function buildCountFileMetricsResult(filePath: string, co...|
3685
- |`countFileMetrics`|fn||451-464|export function countFileMetrics(content: string, encodin...|
3686
- |`countFilesMetrics`|fn||474-495|export function countFilesMetrics(filePaths: string[], en...|
3687
- |`buildTokenToolPayload`|fn||504-697|export function buildTokenToolPayload(options: BuildToken...|
3688
- |`formatPackSummary`|fn||705-729|export function formatPackSummary(results: CountFileMetri...|
3651
+ |`TokenToolPayload`|iface||180-183|export interface TokenToolPayload|
3652
+ |`BuildTokenToolPayloadOptions`|iface||189-197|export interface BuildTokenToolPayloadOptions|
3653
+ |`TokenCounter`|class||203-243|export class TokenCounter|
3654
+ |`canonicalizeTokenPath`|fn||252-260|function canonicalizeTokenPath(filePath: string, baseDir:...|
3655
+ |`countLines`|fn||268-274|function countLines(content: string): number|
3656
+ |`stripMarkdownFrontMatter`|fn||282-285|function stripMarkdownFrontMatter(content: string): string|
3657
+ |`extractPrimaryHeadingText`|fn||294-301|function extractPrimaryHeadingText(content: string, fileP...|
3658
+ |`inferLanguageName`|fn||309-318|function inferLanguageName(filePath: string): string | un...|
3659
+ |`extractLeadingDoxygenFields`|fn||326-344|function extractLeadingDoxygenFields(content: string): Do...|
3660
+ |`roundRatio`|fn||353-358|function roundRatio(numerator: number, denominator: numbe...|
3661
+ |`probeRequestedPath`|fn||366-380|function probeRequestedPath(absolutePath: string): { exis...|
3662
+ |`buildCountFileMetricsResult`|fn||390-405|function buildCountFileMetricsResult(filePath: string, co...|
3663
+ |`countFileMetrics`|fn||414-427|export function countFileMetrics(content: string, encodin...|
3664
+ |`countFilesMetrics`|fn||437-458|export function countFilesMetrics(filePaths: string[], en...|
3665
+ |`buildTokenToolPayload`|fn||467-579|export function buildTokenToolPayload(options: BuildToken...|
3666
+ |`formatPackSummary`|fn||587-611|export function formatPackSummary(results: CountFileMetri...|
3689
3667
 
3690
3668
 
3691
3669
  ---
@@ -4096,7 +4074,7 @@ import path from "node:path";
4096
4074
 
4097
4075
  ---
4098
4076
 
4099
- # index.ts | TypeScript | 2212L | 50 symbols | 21 imports | 53 comments
4077
+ # index.ts | TypeScript | 2368L | 53 symbols | 21 imports | 56 comments
4100
4078
  > Path: `src/index.ts`
4101
4079
  - @brief Registers the pi-usereq extension commands, tools, and configuration UI.
4102
4080
  - @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.
@@ -4113,7 +4091,7 @@ import {
4113
4091
  import {
4114
4092
  import {
4115
4093
  import {
4116
- import { buildRuntimePathContext, buildRuntimePathFacts } from "./core/path-context.js";
4094
+ import { formatRuntimePathForDisplay } from "./core/path-context.js";
4117
4095
  import { resolveRuntimeGitPath } from "./core/runtime-project-paths.js";
4118
4096
  import { showPiUsereqSettingsMenu, type PiUsereqSettingsMenuChoice } from "./core/settings-menu.js";
4119
4097
  import {
@@ -4128,35 +4106,27 @@ import { makeRelativeIfContainsProject, shellSplit } from "./core/utils.js";
4128
4106
 
4129
4107
  ## Definitions
4130
4108
 
4131
- ### iface `interface PiShortcutRegistrar` (L137-145)
4109
+ ### iface `interface PiShortcutRegistrar` (L143-151)
4132
4110
  - @brief Describes the optional shortcut-registration surface used by pi-usereq.
4133
4111
  - @details Narrows the runtime API to the documented `registerShortcut(...)`
4134
4112
  method so the extension can remain compatible with offline harnesses that do
4135
4113
  not implement shortcut capture. Compile-time only and introduces no runtime
4136
4114
  cost.
4137
4115
 
4138
- ### fn `function getProjectBase(cwd: string): string` (L153-155)
4116
+ ### fn `function getProjectBase(cwd: string): string` (L159-161)
4139
4117
  - @brief Resolves the effective project base from a working directory.
4140
4118
  - @details Normalizes the provided cwd into an absolute path without consulting configuration. Time complexity is O(1). No I/O side effects occur.
4141
4119
  - @param[in] cwd {string} Current working directory.
4142
4120
  - @return {string} Absolute project base path.
4143
4121
 
4144
- ### fn `function buildSharedRuntimePathFacts(cwd: string, config: UseReqConfig): import("./core/path-context.js").RuntimePathFacts` (L165-169)
4145
- - @brief Builds the shared runtime path facts for the current command or tool context.
4146
- - @details Derives installation, execution, base, config, resource, docs, test, source, and optional git paths from the cwd-derived project configuration plus runtime-only repository probing, then converts them into prompt/tool-facing strings. Runtime is O(s + p) where s is configured source-directory count and p is aggregate path length. Side effects are limited to git subprocess execution.
4147
- - @param[in] cwd {string} Current working directory.
4148
- - @param[in] config {UseReqConfig} Effective project configuration.
4149
- - @return {import("./core/path-context.js").RuntimePathFacts} Shared runtime path facts.
4150
- - @satisfies REQ-145, REQ-146
4151
-
4152
- ### fn `function loadProjectConfig(cwd: string): UseReqConfig` (L178-181)
4122
+ ### fn `function loadProjectConfig(cwd: string): UseReqConfig` (L170-173)
4153
4123
  - @brief Loads project configuration for the extension runtime.
4154
4124
  - @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.
4155
4125
  - @param[in] cwd {string} Current working directory.
4156
4126
  - @return {UseReqConfig} Effective project configuration.
4157
4127
  - @satisfies REQ-030, REQ-145, REQ-146
4158
4128
 
4159
- ### fn `function saveProjectConfig(cwd: string, config: UseReqConfig): void` (L196-199)
4129
+ ### fn `function saveProjectConfig(cwd: string, config: UseReqConfig): void` (L183-186)
4160
4130
  - @brief Persists project configuration from the extension runtime.
4161
4131
  - @details Resolves the project base, normalizes configured directory paths into project-relative form, and delegates persistence to `saveConfig` without serializing runtime-derived path metadata. Runtime is O(n) in config size. Side effects include config-file writes.
4162
4132
  - @param[in] cwd {string} Current working directory.
@@ -4164,7 +4134,7 @@ cost.
4164
4134
  - @return {void} No return value.
4165
4135
  - @satisfies REQ-146
4166
4136
 
4167
- ### fn `function formatProjectConfigPathForMenu(cwd: string): string` (L210-212)
4137
+ ### fn `function formatProjectConfigPathForMenu(cwd: string): string` (L197-199)
4168
4138
  - @brief Formats the current project config path for top-level menu display.
4169
4139
  - @details Resolves `<base-path>/.pi-usereq/config.json` from the cwd-derived
4170
4140
  project base and formats it relative to the user home when possible. Runtime
@@ -4173,65 +4143,65 @@ is O(p) in path length. No external state is mutated.
4173
4143
  - @return {string} User-home-relative or absolute config path display value.
4174
4144
  - @satisfies REQ-162
4175
4145
 
4176
- ### fn `function collectProjectStaticCheckSelection(` (L221-252)
4146
+ ### fn `function collectProjectStaticCheckSelection(` (L208-239)
4177
4147
  - @brief Collects the project-scoped static-check selection used by the agent tool.
4178
4148
  - @details Resolves configured source plus test directories, reuses the same fixture-root exclusions as `runProjectStaticCheck`, and returns canonical relative file paths for structured payload emission. Runtime is O(F) plus project file-discovery cost. Side effects are limited to filesystem reads and git subprocesses delegated through `collectSourceFiles`.
4179
4149
  - @param[in] projectBase {string} Resolved project base path.
4180
4150
  - @param[in] config {UseReqConfig} Effective project configuration.
4181
4151
  - @return {{ selectionDirectoryPaths: string[]; excludedDirectoryPaths: string[]; selectedPaths: string[] }} Structured static-check selection facts.
4182
4152
 
4183
- ### fn `function buildTokenToolExecutionStderr(payload: TokenToolPayload): string` (L242-248)
4153
+ ### fn `function buildTokenToolExecutionStderr(payload: TokenToolPayload): string` (L247-255)
4184
4154
  - @brief Builds execution diagnostics for one token-tool payload.
4185
4155
  - @details Serializes skipped-input and read-error observations into stable stderr lines while leaving successful counted files silent. Runtime is O(n) in issue count. No side effects occur.
4186
4156
  - @param[in] payload {TokenToolPayload} Structured token payload.
4187
4157
  - @return {string} Newline-delimited execution diagnostics.
4188
4158
 
4189
- ### fn `function buildTokenToolExecuteResult(` (L257-274)
4159
+ ### fn `function buildTokenToolExecuteResult(` (L264-279)
4190
4160
  - @brief Builds the agent-oriented execute result returned by token-count tools.
4191
4161
  - @details Mirrors the structured token payload into both the text `content` channel and the machine-readable `details` channel while isolating execution metadata under `execution`. Runtime is O(n) in payload size. No side effects occur.
4192
4162
  - @param[in] payload {TokenToolPayload} Structured token payload.
4193
4163
  - @return {{ content: Array<{ type: "text"; text: string }>; details: TokenToolPayload & { execution: { code: number; stderr: string } } }} Token-tool execute result.
4194
4164
  - @satisfies REQ-069, REQ-070, REQ-071, REQ-073, REQ-074, REQ-075, REQ-099, REQ-102
4195
4165
 
4196
- ### fn `function buildReferenceToolExecuteResult(` (L283-300)
4166
+ ### fn `function buildReferenceToolExecuteResult(` (L288-304)
4197
4167
  - @brief Builds the agent-oriented execute result returned by references tools.
4198
4168
  - @details Mirrors the structured references payload into both the text `content` channel and the machine-readable `details` channel while isolating execution metadata under `execution`. Runtime is O(n) in payload size. No side effects occur.
4199
4169
  - @param[in] payload {ReferenceToolPayload} Structured references payload.
4200
4170
  - @return {{ content: Array<{ type: "text"; text: string }>; details: ReferenceToolPayload & { execution: { code: number; stderr: string } } }} References-tool execute result.
4201
4171
  - @satisfies REQ-076, REQ-077, REQ-078, REQ-079, REQ-099, REQ-102
4202
4172
 
4203
- ### fn `function buildCompressionToolExecuteResult(` (L309-326)
4173
+ ### fn `function buildCompressionToolExecuteResult(` (L313-329)
4204
4174
  - @brief Builds the agent-oriented execute result returned by compression tools.
4205
4175
  - @details Mirrors the structured compression payload into both the text `content` channel and the machine-readable `details` channel while isolating execution metadata under `execution`. Runtime is O(n) in payload size. No side effects occur.
4206
4176
  - @param[in] payload {CompressToolPayload} Structured compression payload.
4207
4177
  - @return {{ content: Array<{ type: "text"; text: string }>; details: CompressToolPayload & { execution: { code: number; stderr: string } } }} Compression-tool execute result.
4208
4178
  - @satisfies REQ-081, REQ-082, REQ-083, REQ-084, REQ-085, REQ-087, REQ-088, REQ-099, REQ-102
4209
4179
 
4210
- ### fn `function buildFindToolSupportedTagGuidelines(): string[]` (L387-391)
4180
+ ### fn `function buildFindToolSupportedTagGuidelines(): string[]` (L390-394)
4211
4181
  - @brief Builds the supported-tag guidance lines embedded in find-tool registrations.
4212
4182
  - @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.
4213
4183
  - @return {string[]} Supported-tag guidance lines.
4214
4184
 
4215
- ### fn `function buildFindToolSchemaDescription(scope: FindToolScope): string` (L399-404)
4185
+ ### fn `function buildFindToolSchemaDescription(scope: FindToolScope): string` (L402-407)
4216
4186
  - @brief Builds the schema description for one find-tool registration.
4217
4187
  - @details Specializes the input-scope sentence for explicit-file or configured-directory searches while keeping the JSON output contract stable and fully machine-readable. Runtime is O(1). No side effects occur.
4218
4188
  - @param[in] scope {FindToolScope} Find-tool scope.
4219
4189
  - @return {string} Parameter-schema description.
4220
4190
 
4221
- ### fn `function buildFindToolPromptGuidelines(scope: FindToolScope): string[]` (L412-428)
4191
+ ### fn `function buildFindToolPromptGuidelines(scope: FindToolScope): string[]` (L415-431)
4222
4192
  - @brief Builds the prompt-guideline set for one find-tool registration.
4223
4193
  - @details Encodes scope selection, output schema, 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.
4224
4194
  - @param[in] scope {FindToolScope} Find-tool scope.
4225
4195
  - @return {string[]} Prompt-guideline strings.
4226
4196
 
4227
- ### fn `function buildFindToolExecuteResult(` (L437-455)
4197
+ ### fn `function buildFindToolExecuteResult(` (L440-457)
4228
4198
  - @brief Builds the agent-oriented execute result returned by find tools.
4229
4199
  - @details Mirrors the structured find payload into both the text `content` channel and the machine-readable `details` channel while isolating execution metadata under `execution`. Runtime is O(n) in payload size. No side effects occur.
4230
4200
  - @param[in] payload {FindToolPayload} Structured find payload.
4231
4201
  - @return {{ content: Array<{ type: "text"; text: string }>; details: FindToolPayload & { execution: { code: number; stderr: string } } }} Find-tool execute result.
4232
4202
  - @satisfies REQ-089, REQ-090, REQ-091, REQ-092, REQ-093, REQ-094, REQ-097, REQ-098, REQ-099, REQ-102
4233
4203
 
4234
- ### fn `async function deliverPromptCommand(pi: ExtensionAPI, content: string): Promise<void>` (L465-467)
4204
+ ### fn `async function deliverPromptCommand(pi: ExtensionAPI, content: string): Promise<void>` (L467-469)
4235
4205
  - @brief Delivers one rendered prompt into the active session.
4236
4206
  - @details Writes the rendered prompt directly through `pi.sendUserMessage(...)` without creating replacement sessions or pre-reset flows. Runtime is O(n) in prompt length. Side effects are limited to user-message delivery.
4237
4207
  - @param[in] pi {ExtensionAPI} Active extension API instance.
@@ -4239,26 +4209,26 @@ is O(p) in path length. No external state is mutated.
4239
4209
  - @return {Promise<void>} Promise resolved after the prompt is queued for delivery.
4240
4210
  - @satisfies REQ-004, REQ-067, REQ-068
4241
4211
 
4242
- ### fn `function getPiUsereqStartupTools(pi: ExtensionAPI): ToolInfo[]` (L476-481)
4212
+ ### fn `function getPiUsereqStartupTools(pi: ExtensionAPI): ToolInfo[]` (L478-483)
4243
4213
  - @brief Returns the configurable active-tool inventory visible to the extension.
4244
4214
  - @details Filters runtime tools against the canonical configurable-tool set, thereby combining extension-owned tools with supported embedded pi CLI tools. Output order is sorted by tool name. Runtime is O(t log t). No external state is mutated.
4245
4215
  - @param[in] pi {ExtensionAPI} Active extension API instance.
4246
4216
  - @return {ToolInfo[]} Sorted configurable tool descriptors.
4247
4217
  - @satisfies REQ-007, REQ-063
4248
4218
 
4249
- ### fn `function getConfiguredEnabledPiUsereqTools(config: UseReqConfig): string[]` (L489-493)
4219
+ ### fn `function getConfiguredEnabledPiUsereqTools(config: UseReqConfig): string[]` (L491-495)
4250
4220
  - @brief Normalizes and returns the configured enabled active tools.
4251
4221
  - @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"]`.
4252
4222
  - @param[in,out] config {UseReqConfig} Mutable configuration object.
4253
4223
  - @return {string[]} Normalized enabled tool names.
4254
4224
 
4255
- ### fn `function getPiUsereqToolKind(tool: ToolInfo): "builtin" | "extension"` (L501-506)
4225
+ ### fn `function getPiUsereqToolKind(tool: ToolInfo): "builtin" | "extension"` (L503-508)
4256
4226
  - @brief Classifies one configurable tool as embedded or extension-owned.
4257
4227
  - @details Uses the runtime `sourceInfo.source` field plus the supported embedded-name subset to produce one stable UI label. Runtime is O(1). No external state is mutated.
4258
4228
  - @param[in] tool {ToolInfo} Runtime tool descriptor.
4259
4229
  - @return {"builtin" | "extension"} Stable tool-kind label.
4260
4230
 
4261
- ### fn `function applyConfiguredPiUsereqTools(pi: ExtensionAPI, config: UseReqConfig): void` (L516-533)
4231
+ ### fn `function applyConfiguredPiUsereqTools(pi: ExtensionAPI, config: UseReqConfig): void` (L518-535)
4262
4232
  - @brief Applies the configured active-tool enablement to the current session.
4263
4233
  - @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(...)`.
4264
4234
  - @param[in] pi {ExtensionAPI} Active extension API instance.
@@ -4266,25 +4236,27 @@ is O(p) in path length. No external state is mutated.
4266
4236
  - @return {void} No return value.
4267
4237
  - @satisfies REQ-009, REQ-064
4268
4238
 
4269
- ### fn `async function handleExtensionStatusEvent(` (L553-573)
4239
+ ### fn `async function handleExtensionStatusEvent(` (L557-593)
4270
4240
  - @brief Handles one intercepted pi lifecycle hook for pi-usereq status updates.
4271
4241
  - @details Applies session-start-specific resource validation, project-config
4272
4242
  refresh, and startup-tool enablement before forwarding the originating hook
4273
4243
  name and payload into the shared `updateExtensionStatus(...)` pipeline.
4274
- On `agent_end`, also dispatches configured pi-notify beep and sound effects.
4275
- Runtime is dominated by configuration loading during `session_start`; all
4276
- other hooks are O(1). Side effects include resource checks, active-tool
4277
- mutation, status updates, live-ticker disposal on shutdown, stdout writes,
4278
- and optional child-process spawning.
4244
+ On `agent_end`, also dispatches configured pi-notify beep, sound, and
4245
+ prompt-specific Pushover effects when the current run originates from a
4246
+ bundled prompt command. Runtime is dominated by configuration loading during
4247
+ `session_start`; all other hooks are O(1). Side effects include resource
4248
+ checks, active-tool mutation, status updates, live-ticker disposal on
4249
+ shutdown, stdout writes, optional child-process spawning, and outbound
4250
+ HTTPS requests.
4279
4251
  - @param[in] pi {ExtensionAPI} Active extension API instance.
4280
4252
  - @param[in] hookName {PiUsereqStatusHookName} Intercepted hook name.
4281
4253
  - @param[in] event {unknown} Hook payload forwarded by pi.
4282
4254
  - @param[in] ctx {ExtensionContext} Active extension context.
4283
4255
  - @param[in,out] statusController {PiUsereqStatusController} Mutable status controller.
4284
4256
  - @return {Promise<void>} Promise resolved when hook processing completes.
4285
- - @satisfies REQ-117, REQ-118, REQ-119, REQ-129, REQ-130, REQ-131, REQ-132, REQ-133
4257
+ - @satisfies REQ-117, REQ-118, REQ-119, REQ-129, REQ-130, REQ-131, REQ-132, REQ-133, REQ-166, REQ-167, REQ-168, REQ-169, REQ-172
4286
4258
 
4287
- ### fn `function registerExtensionStatusHooks(` (L586-599)
4259
+ ### fn `function registerExtensionStatusHooks(` (L606-619)
4288
4260
  - @brief Registers shared wrappers for every supported pi lifecycle hook.
4289
4261
  - @details Installs one generic wrapper per intercepted hook so every resource,
4290
4262
  session, agent, model, tool, bash, and input event is routed through the
@@ -4295,7 +4267,7 @@ count. Side effects include hook registration.
4295
4267
  - @return {void} No return value.
4296
4268
  - @satisfies DES-002, REQ-113, REQ-114, REQ-115, REQ-116, REQ-117
4297
4269
 
4298
- ### fn `function setConfiguredPiUsereqTools(pi: ExtensionAPI, config: UseReqConfig, enabledTools: string[]): void` (L609-612)
4270
+ ### fn `function setConfiguredPiUsereqTools(pi: ExtensionAPI, config: UseReqConfig, enabledTools: string[]): void` (L629-632)
4299
4271
  - @brief Replaces the configured active-tool selection and applies it immediately.
4300
4272
  - @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.
4301
4273
  - @param[in] pi {ExtensionAPI} Active extension API instance.
@@ -4303,33 +4275,63 @@ count. Side effects include hook registration.
4303
4275
  - @param[in,out] config {UseReqConfig} Mutable configuration object.
4304
4276
  - @return {void} No return value.
4305
4277
 
4306
- ### fn `function renderPiUsereqToolsReference(pi: ExtensionAPI, config: UseReqConfig): string` (L621-649)
4278
+ ### fn `function renderPiUsereqToolsReference(pi: ExtensionAPI, config: UseReqConfig): string` (L641-669)
4307
4279
  - @brief Renders a textual reference for configurable-tool configuration and runtime state.
4308
4280
  - @details Lists every configurable tool with configured enablement, runtime activation, builtin-versus-extension classification, source metadata, and optional descriptions. Runtime is O(t). No side effects occur.
4309
4281
  - @param[in] pi {ExtensionAPI} Active extension API instance.
4310
4282
  - @param[in] config {UseReqConfig} Effective project configuration.
4311
4283
  - @return {string} Multiline tool-status report.
4312
4284
 
4313
- - type `type PiNotifyBeepConfigKey =` (L657)
4285
+ - type `type PiNotifyBeepConfigKey =` (L677)
4314
4286
  - @brief Represents one persisted pi-notify beep flag key.
4315
4287
  - @details Restricts menu toggles to the three independent prompt-end beep
4316
4288
  flags stored in project configuration. Compile-time only and introduces no
4317
4289
  runtime cost.
4318
- ### fn `function togglePiNotifyBeepFlag(config: UseReqConfig, key: PiNotifyBeepConfigKey): boolean` (L669-672)
4290
+ ### fn `function togglePiNotifyBeepFlag(config: UseReqConfig, key: PiNotifyBeepConfigKey): boolean` (L689-692)
4319
4291
  - @brief Flips one persisted pi-notify beep flag.
4320
4292
  - @details Negates the selected prompt-end beep flag in place and returns the resulting boolean value so callers can emit deterministic UI feedback. Runtime is O(1). Side effect: mutates `config`.
4321
4293
  - @param[in] key {PiNotifyBeepConfigKey} Beep flag key to toggle.
4322
4294
  - @param[in,out] config {UseReqConfig} Mutable configuration object.
4323
4295
  - @return {boolean} Next enabled state.
4324
4296
 
4325
- ### fn `function buildPiNotifyMenuChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L681-738)
4297
+ ### fn `function formatPiNotifyPushoverPriority(priority: PiNotifyPushoverPriority): string` (L701-703)
4298
+ - @brief Formats one persisted Pushover priority for menu display.
4299
+ - @details Maps the canonical `0|1` priority domain to deterministic menu text reused by the Pushover configuration UI. Runtime is O(1). No external state is mutated.
4300
+ - @param[in] priority {PiNotifyPushoverPriority} Persisted Pushover priority.
4301
+ - @return {string} Menu-display label.
4302
+ - @satisfies REQ-165
4303
+
4304
+ ### fn `function buildPiNotifyPushoverMenuChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L712-751)
4305
+ - @brief Builds the shared settings-menu choices for Pushover configuration.
4306
+ - @details Serializes the Pushover global-disable flag, successful-completion enable flag, credential strings, and priority value into right-valued menu rows consumed by the shared settings-menu renderer. Runtime is O(1). No external state is mutated.
4307
+ - @param[in] config {UseReqConfig} Effective project configuration.
4308
+ - @return {PiUsereqSettingsMenuChoice[]} Ordered Pushover-menu choice vector.
4309
+ - @satisfies REQ-163, REQ-165, REQ-166, REQ-172
4310
+
4311
+ ### fn `async function selectPiNotifyPushoverPriority(` (L761-783)
4312
+ - @brief Opens the shared settings-menu selector for Pushover priority.
4313
+ - @details Reuses the pi-usereq settings-menu renderer so Pushover priority selection remains stylistically aligned with the existing notification menus and returns the chosen priority or `undefined` on cancel. Runtime depends on user interaction count. Side effects are limited to transient custom-UI rendering.
4314
+ - @param[in] ctx {ExtensionCommandContext} Active command context.
4315
+ - @param[in] currentPriority {PiNotifyPushoverPriority} Persisted priority value.
4316
+ - @return {Promise<PiNotifyPushoverPriority | undefined>} Selected priority or `undefined` when cancelled.
4317
+ - @satisfies REQ-165
4318
+
4319
+ ### fn `async function configurePiNotifyPushoverMenu(` (L793-842)
4320
+ - @brief Runs the interactive Pushover-configuration menu.
4321
+ - @details Exposes the Pushover global-disable flag, successful-completion enable flag, user key, API token, and priority selector through the shared settings-menu renderer. Runtime depends on user interaction count. Side effects include UI updates and config mutation.
4322
+ - @param[in] ctx {ExtensionCommandContext} Active command context.
4323
+ - @param[in,out] config {UseReqConfig} Mutable configuration object.
4324
+ - @return {Promise<void>} Promise resolved when the menu closes.
4325
+ - @satisfies REQ-163, REQ-165, REQ-166, REQ-172
4326
+
4327
+ ### fn `function buildPiNotifyMenuChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L851-914)
4326
4328
  - @brief Builds the shared settings-menu choices for notification configuration.
4327
- - @details Serializes the current beep flags, selected notify command, hotkey bind, and per-level notify commands into right-valued menu rows consumed by the shared settings-menu renderer. Runtime is O(1) plus command-length formatting. No external state is mutated.
4329
+ - @details Serializes the current beep flags, selected notify command, hotkey bind, per-level notify commands, and the Pushover submenu entry into right-valued menu rows consumed by the shared settings-menu renderer. Runtime is O(1) plus command-length formatting. No external state is mutated.
4328
4330
  - @param[in] config {UseReqConfig} Effective project configuration.
4329
4331
  - @return {PiUsereqSettingsMenuChoice[]} Ordered notification-menu choice vector.
4330
- - @satisfies REQ-137, REQ-149, REQ-150, REQ-151, REQ-152
4332
+ - @satisfies REQ-137, REQ-149, REQ-150, REQ-151, REQ-152, REQ-163, REQ-164, REQ-165, REQ-166, REQ-172
4331
4333
 
4332
- ### fn `async function selectPiNotifySoundLevel(` (L748-779)
4334
+ ### fn `async function selectPiNotifySoundLevel(` (L924-955)
4333
4335
  - @brief Opens the shared settings-menu selector for the selected notify command.
4334
4336
  - @details Reuses the pi-usereq settings-menu renderer so notify-command selection remains stylistically aligned with the main configuration UI and returns the chosen sound level or `undefined` on cancel. Runtime depends on user interaction count. Side effects are limited to transient custom-UI rendering.
4335
4337
  - @param[in] ctx {ExtensionCommandContext} Active command context.
@@ -4337,15 +4339,15 @@ runtime cost.
4337
4339
  - @return {Promise<PiNotifySoundLevel | undefined>} Selected sound level or `undefined` when cancelled.
4338
4340
  - @satisfies REQ-131, REQ-137, REQ-149, REQ-151, REQ-152, REQ-153, REQ-154
4339
4341
 
4340
- ### fn `async function configurePiNotifyMenu(` (L789-854)
4342
+ ### fn `async function configurePiNotifyMenu(` (L965-1034)
4341
4343
  - @brief Runs the interactive notification-configuration menu.
4342
- - @details Exposes prompt-end beep toggles, selected notify-command selection, hotkey-bind editing, and per-level notify-command editors through the shared settings-menu renderer. Runtime depends on user interaction count. Side effects include UI updates and config mutation.
4344
+ - @details Exposes prompt-end beep toggles, selected notify-command selection, hotkey-bind editing, per-level notify-command editors, and the nested Pushover submenu through the shared settings-menu renderer. Runtime depends on user interaction count. Side effects include UI updates and config mutation.
4343
4345
  - @param[in] ctx {ExtensionCommandContext} Active command context.
4344
4346
  - @param[in,out] config {UseReqConfig} Mutable configuration object.
4345
4347
  - @return {Promise<boolean>} `true` when the sound-toggle shortcut changed.
4346
- - @satisfies REQ-129, REQ-131, REQ-133, REQ-134, REQ-137, REQ-149, REQ-150, REQ-151, REQ-152, REQ-153, REQ-154
4348
+ - @satisfies REQ-129, REQ-131, REQ-133, REQ-134, REQ-137, REQ-149, REQ-150, REQ-151, REQ-152, REQ-153, REQ-154, REQ-163, REQ-164, REQ-165, REQ-166, REQ-172
4347
4349
 
4348
- ### fn `function registerPiNotifyShortcut(` (L869-889)
4350
+ ### fn `function registerPiNotifyShortcut(` (L1049-1069)
4349
4351
  - @brief Registers the configurable successful-run sound shortcut when supported.
4350
4352
  - @details Loads the current project config, registers one raw pi shortcut when
4351
4353
  the runtime exposes `registerShortcut(...)`, cycles persisted sound state on
@@ -4358,21 +4360,22 @@ updates.
4358
4360
  - @return {void} No return value.
4359
4361
  - @satisfies REQ-131, REQ-134, REQ-136
4360
4362
 
4361
- ### fn `function registerPromptCommands(pi: ExtensionAPI): void` (L898-911)
4363
+ ### fn `function registerPromptCommands(` (L1079-1099)
4362
4364
  - @brief Registers bundled prompt commands with the extension.
4363
- - @details Creates one `req-<prompt>` command per bundled prompt name. Each handler ensures resources exist, renders the prompt, and sends it into the current active session. Runtime is O(p) for registration; handler cost depends on prompt rendering plus prompt dispatch. Side effects include command registration and user-message delivery during execution.
4365
+ - @details Creates one `req-<prompt>` command per bundled prompt name. Each handler ensures resources exist, records the prompt metadata needed for successful completion notifications, renders the prompt, and sends it into the current active session. Runtime is O(p) for registration; handler cost depends on prompt rendering plus prompt dispatch. Side effects include command registration, status-controller mutation, and user-message delivery during execution.
4364
4366
  - @param[in] pi {ExtensionAPI} Active extension API instance.
4367
+ - @param[in,out] statusController {PiUsereqStatusController} Mutable status controller.
4365
4368
  - @return {void} No return value.
4366
- - @satisfies REQ-004, REQ-067, REQ-068
4369
+ - @satisfies REQ-004, REQ-067, REQ-068, REQ-169
4367
4370
 
4368
- ### fn `function registerAgentTools(pi: ExtensionAPI): void` (L921-1220)
4371
+ ### fn `function registerAgentTools(pi: ExtensionAPI): void` (L1109-1408)
4369
4372
  - @brief Registers pi-usereq agent tools exposed to the model.
4370
4373
  - @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.
4371
4374
  - @param[in] pi {ExtensionAPI} Active extension API instance.
4372
4375
  - @return {void} No return value.
4373
4376
  - @satisfies REQ-005, REQ-010, REQ-011, REQ-014, REQ-017, REQ-044, REQ-045, 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
4374
4377
 
4375
- ### fn `function buildPiUsereqToolsMenuChoices(pi: ExtensionAPI, config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L1564-1604)
4378
+ ### fn `function buildPiUsereqToolsMenuChoices(pi: ExtensionAPI, config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L1737-1777)
4376
4379
  - @brief Builds the shared settings-menu choices for startup-tool management.
4377
4380
  - @details Serializes startup-tool actions into right-valued menu rows consumed by the shared settings-menu renderer. Runtime is O(t) in configurable-tool count. No external state is mutated.
4378
4381
  - @param[in] pi {ExtensionAPI} Active extension API instance.
@@ -4380,7 +4383,7 @@ updates.
4380
4383
  - @return {PiUsereqSettingsMenuChoice[]} Ordered startup-tool menu choices.
4381
4384
  - @satisfies REQ-007, REQ-151, REQ-152, REQ-153, REQ-154
4382
4385
 
4383
- ### fn `function buildPiUsereqToolToggleChoices(pi: ExtensionAPI, config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L1614-1630)
4386
+ ### fn `function buildPiUsereqToolToggleChoices(pi: ExtensionAPI, config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L1787-1803)
4384
4387
  - @brief Builds the shared settings-menu choices for per-tool startup toggles.
4385
4388
  - @details Exposes every configurable startup tool as one row whose right-side value reports the current enabled state. Runtime is O(t) in configurable-tool count. No external state is mutated.
4386
4389
  - @param[in] pi {ExtensionAPI} Active extension API instance.
@@ -4388,7 +4391,7 @@ updates.
4388
4391
  - @return {PiUsereqSettingsMenuChoice[]} Ordered per-tool toggle choices.
4389
4392
  - @satisfies REQ-007, REQ-151, REQ-152, REQ-153, REQ-154
4390
4393
 
4391
- ### fn `async function configurePiUsereqToolsMenu(pi: ExtensionAPI, ctx: ExtensionCommandContext, config: UseReqConfig): Promise<void>` (L1641-1692)
4394
+ ### fn `async function configurePiUsereqToolsMenu(pi: ExtensionAPI, ctx: ExtensionCommandContext, config: UseReqConfig): Promise<void>` (L1814-1865)
4392
4395
  - @brief Runs the interactive active-tool configuration menu.
4393
4396
  - @details Synchronizes runtime active tools with persisted config, renders startup-tool actions through the shared settings-menu UI, 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.
4394
4397
  - @param[in] pi {ExtensionAPI} Active extension API instance.
@@ -4397,44 +4400,44 @@ updates.
4397
4400
  - @return {Promise<void>} Promise resolved when the menu closes.
4398
4401
  - @satisfies REQ-007, REQ-063, REQ-064, REQ-151, REQ-152, REQ-153, REQ-154
4399
4402
 
4400
- ### fn `function formatStaticCheckEntry(entry: StaticCheckEntry): string` (L1700-1706)
4403
+ ### fn `function formatStaticCheckEntry(entry: StaticCheckEntry): string` (L1873-1879)
4401
4404
  - @brief Formats one static-check configuration entry for UI display.
4402
4405
  - @details Renders command-backed entries as `Command(cmd args...)` and all other modules as `Module(args...)`. Runtime is O(n) in parameter count. No side effects occur.
4403
4406
  - @param[in] entry {StaticCheckEntry} Static-check configuration entry.
4404
4407
  - @return {string} Human-readable entry summary.
4405
4408
 
4406
- ### fn `function formatStaticCheckLanguagesSummary(config: UseReqConfig): string` (L1714-1720)
4409
+ ### fn `function formatStaticCheckLanguagesSummary(config: UseReqConfig): string` (L1887-1893)
4407
4410
  - @brief Summarizes configured static-check languages.
4408
4411
  - @details Keeps only languages with at least one configured checker, sorts them, and emits a compact `Language (count)` list. Runtime is O(l log l). No side effects occur.
4409
4412
  - @param[in] config {UseReqConfig} Effective project configuration.
4410
4413
  - @return {string} Compact summary string or `(none)`.
4411
4414
 
4412
- ### fn `function renderStaticCheckReference(config: UseReqConfig): string` (L1728-1756)
4415
+ ### fn `function renderStaticCheckReference(config: UseReqConfig): string` (L1901-1929)
4413
4416
  - @brief Renders the static-check configuration reference view.
4414
4417
  - @details Produces a markdown-like summary containing configured entries, supported languages, the Command-only user module surface, and canonical example specifications. Runtime is O(l log l). No side effects occur.
4415
4418
  - @param[in] config {UseReqConfig} Effective project configuration.
4416
4419
  - @return {string} Reference text for the editor view.
4417
4420
 
4418
- ### fn `function buildStaticCheckMenuChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L1765-1800)
4421
+ ### fn `function buildStaticCheckMenuChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L1938-1973)
4419
4422
  - @brief Builds the shared settings-menu choices for static-check management.
4420
4423
  - @details Serializes Command-oriented static-check actions into right-valued menu rows consumed by the shared settings-menu renderer while omitting user-facing module selection. Runtime is O(1). No external state is mutated.
4421
4424
  - @param[in] config {UseReqConfig} Effective project configuration.
4422
4425
  - @return {PiUsereqSettingsMenuChoice[]} Ordered static-check menu choices.
4423
4426
  - @satisfies REQ-008, REQ-160, REQ-161, REQ-151, REQ-152, REQ-153, REQ-154
4424
4427
 
4425
- ### fn `function buildSupportedStaticCheckLanguageChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L1808-1827)
4428
+ ### fn `function buildSupportedStaticCheckLanguageChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L1981-2000)
4426
4429
  - @brief Builds the shared settings-menu choices for supported static-check languages.
4427
4430
  - @details Exposes every supported language as one row whose right-side value reports extensions plus the current configured checker count for Command-oriented configuration flows. Runtime is O(l log l). No external state is mutated.
4428
4431
  - @param[in] config {UseReqConfig} Effective project configuration.
4429
4432
  - @return {PiUsereqSettingsMenuChoice[]} Ordered language-choice vector.
4430
4433
 
4431
- ### fn `function buildConfiguredStaticCheckLanguageChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L1835-1852)
4434
+ ### fn `function buildConfiguredStaticCheckLanguageChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L2008-2025)
4432
4435
  - @brief Builds the shared settings-menu choices for configured static-check languages.
4433
4436
  - @details Exposes only languages that currently have at least one configured checker so removal remains deterministic. Runtime is O(l log l). No external state is mutated.
4434
4437
  - @param[in] config {UseReqConfig} Effective project configuration.
4435
4438
  - @return {PiUsereqSettingsMenuChoice[]} Ordered configured-language vector.
4436
4439
 
4437
- ### fn `async function configureStaticCheckMenu(ctx: ExtensionCommandContext, config: UseReqConfig): Promise<void>` (L1862-1928)
4440
+ ### fn `async function configureStaticCheckMenu(ctx: ExtensionCommandContext, config: UseReqConfig): Promise<void>` (L2035-2101)
4438
4441
  - @brief Runs the interactive static-check configuration menu.
4439
4442
  - @details Lets the user inspect support, add Command entries by guided prompts or raw spec strings, and remove configured language entries through the shared settings-menu renderer until the user exits. Runtime depends on user interaction count. Side effects include UI updates and config mutation.
4440
4443
  - @param[in] ctx {ExtensionCommandContext} Active command context.
@@ -4442,7 +4445,7 @@ updates.
4442
4445
  - @return {Promise<void>} Promise resolved when the menu closes.
4443
4446
  - @satisfies REQ-008, REQ-160, REQ-161, REQ-151, REQ-152, REQ-153, REQ-154
4444
4447
 
4445
- ### fn `function buildPiUsereqMenuChoices(` (L1956-2017)
4448
+ ### fn `function buildPiUsereqMenuChoices(` (L2111-2172)
4446
4449
  - @brief Builds the shared settings-menu choices for the top-level pi-usereq configuration UI.
4447
4450
  - @details Serializes primary configuration actions into right-valued menu rows consumed by the shared settings-menu renderer, including the display-only config path beside `show-config`. Runtime is O(s) in source-directory count. No external state is mutated.
4448
4451
  - @param[in] cwd {string} Current working directory.
@@ -4450,21 +4453,21 @@ updates.
4450
4453
  - @return {PiUsereqSettingsMenuChoice[]} Ordered top-level menu choices.
4451
4454
  - @satisfies REQ-006, REQ-031, REQ-137, REQ-150, REQ-151, REQ-152, REQ-162
4452
4455
 
4453
- ### fn `function buildSrcDirMenuChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L2028-2049)
4456
+ ### fn `function buildSrcDirMenuChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L2181-2202)
4454
4457
  - @brief Builds the shared settings-menu choices for source-directory management.
4455
4458
  - @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.
4456
4459
  - @param[in] config {UseReqConfig} Effective project configuration.
4457
4460
  - @return {PiUsereqSettingsMenuChoice[]} Ordered source-directory management choices.
4458
4461
  - @satisfies REQ-006, REQ-151, REQ-152, REQ-153, REQ-154
4459
4462
 
4460
- ### fn `function buildSrcDirRemovalChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L2058-2073)
4463
+ ### fn `function buildSrcDirRemovalChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L2211-2226)
4461
4464
  - @brief Builds the shared settings-menu choices for removing one source-directory entry.
4462
4465
  - @details Exposes every configured `src-dir` entry as one removable row and appends a `Back` action for cancellation. Runtime is O(s) in source-directory count. No external state is mutated.
4463
4466
  - @param[in] config {UseReqConfig} Effective project configuration.
4464
4467
  - @return {PiUsereqSettingsMenuChoice[]} Ordered removable source-directory choices.
4465
4468
  - @satisfies REQ-006, REQ-151, REQ-152, REQ-153, REQ-154
4466
4469
 
4467
- ### fn `async function configurePiUsereq(` (L2082-2167)
4470
+ ### fn `async function configurePiUsereq(` (L2237-2322)
4468
4471
  - @brief Runs the top-level pi-usereq configuration menu.
4469
4472
  - @details Loads project config, exposes docs/test/source/static-check/startup-tool/notification actions through the shared settings-menu renderer, persists changes on exit, and refreshes the single-line status bar. Runtime depends on user interaction count. Side effects include UI updates, config writes, active-tool changes, and editor text updates.
4470
4473
  - @param[in] pi {ExtensionAPI} Active extension API instance.
@@ -4473,11 +4476,11 @@ updates.
4473
4476
  - @return {Promise<void>} Promise resolved when configuration is saved and the menu closes.
4474
4477
  - @satisfies REQ-006, REQ-031, REQ-137, REQ-150, REQ-151, REQ-152, REQ-153, REQ-154, REQ-162
4475
4478
 
4476
- ### fn `const ensureSaved = () => saveProjectConfig(ctx.cwd, config)` (L2092-2096)
4479
+ ### fn `const ensureSaved = () => saveProjectConfig(ctx.cwd, config)` (L2245-2249)
4477
4480
 
4478
- ### fn `const refreshStatus = () =>` (L2093-2096)
4481
+ ### fn `const refreshStatus = () =>` (L2246-2249)
4479
4482
 
4480
- ### fn `function registerConfigCommands(` (L2175-2185)
4483
+ ### fn `function registerConfigCommands(` (L2332-2342)
4481
4484
  - @brief Registers configuration-management commands.
4482
4485
  - @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.
4483
4486
  - @param[in] pi {ExtensionAPI} Active extension API instance.
@@ -4485,107 +4488,75 @@ updates.
4485
4488
  - @return {void} No return value.
4486
4489
  - @satisfies REQ-006, REQ-031
4487
4490
 
4488
- ### fn `export default function piUsereqExtension(pi: ExtensionAPI): void` (L2201-2209)
4491
+ ### fn `export default function piUsereqExtension(pi: ExtensionAPI): void` (L2360-2368)
4489
4492
  - @brief Registers the complete pi-usereq extension.
4490
4493
  - @details Validates installation-owned bundled resources, registers prompt and
4491
4494
  configuration commands plus agent tools, registers the configurable
4492
4495
  successful-run sound shortcut when the runtime supports shortcuts, and
4493
4496
  installs shared wrappers for all supported pi lifecycle hooks so status
4494
- telemetry, context usage, prompt timing, cumulative runtime, and pi-notify
4495
- effects remain synchronized with runtime events. Runtime is O(h) in hook
4497
+ telemetry, context usage, prompt timing, cumulative runtime, prompt-specific
4498
+ Pushover metadata, and pi-notify effects remain synchronized with runtime
4499
+ events. Runtime is O(h) in hook
4496
4500
  count during registration. Side effects include filesystem reads,
4497
4501
  command/tool/shortcut registration, UI updates, active-tool changes, and
4498
4502
  timer scheduling.
4499
4503
  - @param[in] pi {ExtensionAPI} Active extension API instance.
4500
4504
  - @return {void} No return value.
4501
- - @satisfies DES-002, REQ-004, REQ-005, REQ-009, REQ-044, REQ-045, REQ-067, REQ-068, REQ-109, REQ-111, REQ-112, REQ-113, REQ-114, REQ-115, REQ-116, REQ-117, REQ-118, REQ-119, REQ-120, REQ-121, REQ-122, REQ-123, REQ-124, REQ-125, REQ-126, REQ-129, REQ-130, REQ-131, REQ-132, REQ-133, REQ-134, REQ-135, REQ-136, REQ-137, REQ-148, REQ-159
4505
+ - @satisfies DES-002, REQ-004, REQ-005, REQ-009, REQ-044, REQ-045, REQ-067, REQ-068, REQ-109, REQ-111, REQ-112, REQ-113, REQ-114, REQ-115, REQ-116, REQ-117, REQ-118, REQ-119, REQ-120, REQ-121, REQ-122, REQ-123, REQ-124, REQ-125, REQ-126, REQ-129, REQ-130, REQ-131, REQ-132, REQ-133, REQ-134, REQ-135, REQ-136, REQ-137, REQ-148, REQ-159, REQ-163, REQ-164, REQ-165, REQ-166, REQ-167, REQ-168, REQ-169, REQ-170, REQ-171, REQ-172
4502
4506
 
4503
4507
  ## Symbol Index
4504
4508
  |Symbol|Kind|Vis|Lines|Sig|
4505
4509
  |---|---|---|---|---|
4506
- |`PiShortcutRegistrar`|iface||137-145|interface PiShortcutRegistrar|
4507
- |`getProjectBase`|fn||153-155|function getProjectBase(cwd: string): string|
4508
- |`buildSharedRuntimePathFacts`|fn||165-169|function buildSharedRuntimePathFacts(cwd: string, config:...|
4509
- |`loadProjectConfig`|fn||178-181|function loadProjectConfig(cwd: string): UseReqConfig|
4510
- |`saveProjectConfig`|fn||196-199|function saveProjectConfig(cwd: string, config: UseReqCon...|
4511
- |`formatProjectConfigPathForMenu`|fn||210-212|function formatProjectConfigPathForMenu(cwd: string): st...|
4512
- |`collectProjectStaticCheckSelection`|fn||221-252|function collectProjectStaticCheckSelection(|
4513
- |`buildTokenToolExecutionStderr`|fn||242-248|function buildTokenToolExecutionStderr(payload: TokenTool...|
4514
- |`buildTokenToolExecuteResult`|fn||257-274|function buildTokenToolExecuteResult(|
4515
- |`buildReferenceToolExecuteResult`|fn||283-300|function buildReferenceToolExecuteResult(|
4516
- |`buildCompressionToolExecuteResult`|fn||309-326|function buildCompressionToolExecuteResult(|
4517
- |`buildFindToolSupportedTagGuidelines`|fn||387-391|function buildFindToolSupportedTagGuidelines(): string[]|
4518
- |`buildFindToolSchemaDescription`|fn||399-404|function buildFindToolSchemaDescription(scope: FindToolSc...|
4519
- |`buildFindToolPromptGuidelines`|fn||412-428|function buildFindToolPromptGuidelines(scope: FindToolSco...|
4520
- |`buildFindToolExecuteResult`|fn||437-455|function buildFindToolExecuteResult(|
4521
- |`deliverPromptCommand`|fn||465-467|async function deliverPromptCommand(pi: ExtensionAPI, con...|
4522
- |`getPiUsereqStartupTools`|fn||476-481|function getPiUsereqStartupTools(pi: ExtensionAPI): ToolI...|
4523
- |`getConfiguredEnabledPiUsereqTools`|fn||489-493|function getConfiguredEnabledPiUsereqTools(config: UseReq...|
4524
- |`getPiUsereqToolKind`|fn||501-506|function getPiUsereqToolKind(tool: ToolInfo): "builtin" |...|
4525
- |`applyConfiguredPiUsereqTools`|fn||516-533|function applyConfiguredPiUsereqTools(pi: ExtensionAPI, c...|
4526
- |`handleExtensionStatusEvent`|fn||553-573|async function handleExtensionStatusEvent(|
4527
- |`registerExtensionStatusHooks`|fn||586-599|function registerExtensionStatusHooks(|
4528
- |`setConfiguredPiUsereqTools`|fn||609-612|function setConfiguredPiUsereqTools(pi: ExtensionAPI, con...|
4529
- |`renderPiUsereqToolsReference`|fn||621-649|function renderPiUsereqToolsReference(pi: ExtensionAPI, c...|
4530
- |`PiNotifyBeepConfigKey`|type||657||
4531
- |`togglePiNotifyBeepFlag`|fn||669-672|function togglePiNotifyBeepFlag(config: UseReqConfig, key...|
4532
- |`buildPiNotifyMenuChoices`|fn||681-738|function buildPiNotifyMenuChoices(config: UseReqConfig): ...|
4533
- |`selectPiNotifySoundLevel`|fn||748-779|async function selectPiNotifySoundLevel(|
4534
- |`configurePiNotifyMenu`|fn||789-854|async function configurePiNotifyMenu(|
4535
- |`registerPiNotifyShortcut`|fn||869-889|function registerPiNotifyShortcut(|
4536
- |`registerPromptCommands`|fn||898-911|function registerPromptCommands(pi: ExtensionAPI): void|
4537
- |`registerAgentTools`|fn||921-1220|function registerAgentTools(pi: ExtensionAPI): void|
4538
- |`buildPiUsereqToolsMenuChoices`|fn||1564-1604|function buildPiUsereqToolsMenuChoices(pi: ExtensionAPI, ...|
4539
- |`buildPiUsereqToolToggleChoices`|fn||1614-1630|function buildPiUsereqToolToggleChoices(pi: ExtensionAPI,...|
4540
- |`configurePiUsereqToolsMenu`|fn||1641-1692|async function configurePiUsereqToolsMenu(pi: ExtensionAP...|
4541
- |`formatStaticCheckEntry`|fn||1700-1706|function formatStaticCheckEntry(entry: StaticCheckEntry):...|
4542
- |`formatStaticCheckLanguagesSummary`|fn||1714-1720|function formatStaticCheckLanguagesSummary(config: UseReq...|
4543
- |`renderStaticCheckReference`|fn||1728-1756|function renderStaticCheckReference(config: UseReqConfig)...|
4544
- |`buildStaticCheckMenuChoices`|fn||1765-1800|function buildStaticCheckMenuChoices(config: UseReqConfig...|
4545
- |`buildSupportedStaticCheckLanguageChoices`|fn||1808-1827|function buildSupportedStaticCheckLanguageChoices(config:...|
4546
- |`buildConfiguredStaticCheckLanguageChoices`|fn||1835-1852|function buildConfiguredStaticCheckLanguageChoices(config...|
4547
- |`configureStaticCheckMenu`|fn||1862-1928|async function configureStaticCheckMenu(ctx: ExtensionCom...|
4548
- |`buildPiUsereqMenuChoices`|fn||1956-2017|function buildPiUsereqMenuChoices(|
4549
- |`buildSrcDirMenuChoices`|fn||2028-2049|function buildSrcDirMenuChoices(config: UseReqConfig): Pi...|
4550
- |`buildSrcDirRemovalChoices`|fn||2058-2073|function buildSrcDirRemovalChoices(config: UseReqConfig):...|
4551
- |`configurePiUsereq`|fn||2082-2167|async function configurePiUsereq(|
4552
- |`ensureSaved`|fn||2092-2096|const ensureSaved = () => saveProjectConfig(ctx.cwd, config)|
4553
- |`refreshStatus`|fn||2093-2096|const refreshStatus = () =>|
4554
- |`registerConfigCommands`|fn||2177-2187|function registerConfigCommands(|
4555
- |`piUsereqExtension`|fn||2204-2212|export default function piUsereqExtension(pi: ExtensionAP...|
4556
-
4557
- ## Delta Update 2026-04-19
4558
-
4559
- ### Updated File: `src/core/config.ts`
4560
- - `UseReqConfig` [`src/core/config.ts`]: persisted Pushover fields `notify-pushover-global-disable`, `notify-pushover-on-success`, `notify-pushover-user-key`, `notify-pushover-api-token`, and `notify-pushover-priority` extend the project configuration schema (lines 44-63).
4561
- - `getDefaultConfig(...)` [`src/core/config.ts`]: default Pushover values are `false`, `false`, `""`, `""`, and `0` (lines 98-119).
4562
- - `loadConfig(...)` [`src/core/config.ts`]: persisted Pushover fields are normalized during config load (lines 129-189).
4563
- - `buildPersistedConfig(...)` [`src/core/config.ts`]: Pushover fields are serialized together with existing notification settings (lines 198-228).
4564
-
4565
- ### Updated File: `src/core/extension-status.ts`
4566
- - `PiUsereqPromptRequest` [`src/core/extension-status.ts`]: prompt command name and raw `%%ARGS%%` payload tracked across command delivery and runtime execution (lines 120-123).
4567
- - `PiUsereqStatusState` [`src/core/extension-status.ts`]: pending and active prompt-request state extends timer telemetry (lines 129-136).
4568
- - `buildPiUsereqStatusText(...)` [`src/core/extension-status.ts`]: status bar now renders `pushover` after `sound` (lines 490-514).
4569
- - `updateExtensionStatus(...)` [`src/core/extension-status.ts`]: `agent_start` promotes pending prompt metadata into the active run, and shutdown clears prompt-request state (lines 645-680).
4570
-
4571
- ### Updated File: `src/core/pi-notify.ts`
4572
- - `PiNotifyPushoverPriority` [`src/core/pi-notify.ts`]: canonical `0|1` Pushover priority type (line 75).
4573
- - `PiNotifyPushoverRequest` [`src/core/pi-notify.ts`]: successful prompt payload for Pushover delivery (lines 81-86).
4574
- - `PiNotifyConfigFields` [`src/core/pi-notify.ts`]: notification config surface now includes Pushover flags, credentials, and priority (line 92).
4575
- - `normalizePiNotifyPushoverCredential(...)` [`src/core/pi-notify.ts`]: credential normalization for user key and API token (lines 160-162).
4576
- - `normalizePiNotifyPushoverPriority(...)` [`src/core/pi-notify.ts`]: priority normalization for persisted `0|1` values (lines 171-173).
4577
- - `formatPiNotifyPushoverStatus(...)` [`src/core/pi-notify.ts`]: footer serialization for the dedicated Pushover enable flag (lines 203-205).
4578
- - `setPiNotifyHttpsRequestForTests(...)` [`src/core/pi-notify.ts`]: deterministic HTTPS transport override for unit tests (lines 505-507).
4579
- - `runPiNotifyEffects(...)` [`src/core/pi-notify.ts`]: successful-run routing now includes optional native Pushover delivery after sound execution (lines 590-617).
4580
-
4581
- ### Updated File: `src/index.ts`
4582
- - `handleExtensionStatusEvent(...)` [`src/index.ts`]: `agent_end` builds prompt-specific Pushover request metadata and dispatches it through `runPiNotifyEffects(...)` (lines 578-614).
4583
- - `formatPiNotifyPushoverPriority(...)` [`src/index.ts`]: menu-value formatter for `0=Normal` and `1=High Priority` (lines 722-724).
4584
- - `buildPiNotifyPushoverMenuChoices(...)` [`src/index.ts`]: nested Pushover menu rows for global disable, enable, credentials, and priority (lines 733-772).
4585
- - `selectPiNotifyPushoverPriority(...)` [`src/index.ts`]: shared selector for Pushover priority (lines 782-804).
4586
- - `configurePiNotifyPushoverMenu(...)` [`src/index.ts`]: interactive nested Pushover configuration menu (lines 814-863).
4587
- - `buildPiNotifyMenuChoices(...)` [`src/index.ts`]: notifications menu now exposes the `Pushover notifications` submenu after the sound-command rows (lines 872-935).
4588
- - `configurePiNotifyMenu(...)` [`src/index.ts`]: notifications menu routes the nested Pushover editor (lines 986-1055).
4589
- - `registerPromptCommands(...)` [`src/index.ts`]: each bundled prompt command stores pending prompt metadata before rendering and dispatch (lines 1100-1120).
4590
- - `piUsereqExtension(...)` [`src/index.ts`]: prompt registration now receives the shared status controller so successful prompt metadata survives until `agent_end` (lines 2396-2404).
4591
-
4510
+ |`PiShortcutRegistrar`|iface||143-151|interface PiShortcutRegistrar|
4511
+ |`getProjectBase`|fn||159-161|function getProjectBase(cwd: string): string|
4512
+ |`loadProjectConfig`|fn||170-173|function loadProjectConfig(cwd: string): UseReqConfig|
4513
+ |`saveProjectConfig`|fn||183-186|function saveProjectConfig(cwd: string, config: UseReqCon...|
4514
+ |`formatProjectConfigPathForMenu`|fn||197-199|function formatProjectConfigPathForMenu(cwd: string): string|
4515
+ |`collectProjectStaticCheckSelection`|fn||208-239|function collectProjectStaticCheckSelection(|
4516
+ |`buildTokenToolExecutionStderr`|fn||247-255|function buildTokenToolExecutionStderr(payload: TokenTool...|
4517
+ |`buildTokenToolExecuteResult`|fn||264-279|function buildTokenToolExecuteResult(|
4518
+ |`buildReferenceToolExecuteResult`|fn||288-304|function buildReferenceToolExecuteResult(|
4519
+ |`buildCompressionToolExecuteResult`|fn||313-329|function buildCompressionToolExecuteResult(|
4520
+ |`buildFindToolSupportedTagGuidelines`|fn||390-394|function buildFindToolSupportedTagGuidelines(): string[]|
4521
+ |`buildFindToolSchemaDescription`|fn||402-407|function buildFindToolSchemaDescription(scope: FindToolSc...|
4522
+ |`buildFindToolPromptGuidelines`|fn||415-431|function buildFindToolPromptGuidelines(scope: FindToolSco...|
4523
+ |`buildFindToolExecuteResult`|fn||440-457|function buildFindToolExecuteResult(|
4524
+ |`deliverPromptCommand`|fn||467-469|async function deliverPromptCommand(pi: ExtensionAPI, con...|
4525
+ |`getPiUsereqStartupTools`|fn||478-483|function getPiUsereqStartupTools(pi: ExtensionAPI): ToolI...|
4526
+ |`getConfiguredEnabledPiUsereqTools`|fn||491-495|function getConfiguredEnabledPiUsereqTools(config: UseReq...|
4527
+ |`getPiUsereqToolKind`|fn||503-508|function getPiUsereqToolKind(tool: ToolInfo): "builtin" |...|
4528
+ |`applyConfiguredPiUsereqTools`|fn||518-535|function applyConfiguredPiUsereqTools(pi: ExtensionAPI, c...|
4529
+ |`handleExtensionStatusEvent`|fn||557-593|async function handleExtensionStatusEvent(|
4530
+ |`registerExtensionStatusHooks`|fn||606-619|function registerExtensionStatusHooks(|
4531
+ |`setConfiguredPiUsereqTools`|fn||629-632|function setConfiguredPiUsereqTools(pi: ExtensionAPI, con...|
4532
+ |`renderPiUsereqToolsReference`|fn||641-669|function renderPiUsereqToolsReference(pi: ExtensionAPI, c...|
4533
+ |`PiNotifyBeepConfigKey`|type||677||
4534
+ |`togglePiNotifyBeepFlag`|fn||689-692|function togglePiNotifyBeepFlag(config: UseReqConfig, key...|
4535
+ |`formatPiNotifyPushoverPriority`|fn||701-703|function formatPiNotifyPushoverPriority(priority: PiNotif...|
4536
+ |`buildPiNotifyPushoverMenuChoices`|fn||712-751|function buildPiNotifyPushoverMenuChoices(config: UseReqC...|
4537
+ |`selectPiNotifyPushoverPriority`|fn||761-783|async function selectPiNotifyPushoverPriority(|
4538
+ |`configurePiNotifyPushoverMenu`|fn||793-842|async function configurePiNotifyPushoverMenu(|
4539
+ |`buildPiNotifyMenuChoices`|fn||851-914|function buildPiNotifyMenuChoices(config: UseReqConfig): ...|
4540
+ |`selectPiNotifySoundLevel`|fn||924-955|async function selectPiNotifySoundLevel(|
4541
+ |`configurePiNotifyMenu`|fn||965-1034|async function configurePiNotifyMenu(|
4542
+ |`registerPiNotifyShortcut`|fn||1049-1069|function registerPiNotifyShortcut(|
4543
+ |`registerPromptCommands`|fn||1079-1099|function registerPromptCommands(|
4544
+ |`registerAgentTools`|fn||1109-1408|function registerAgentTools(pi: ExtensionAPI): void|
4545
+ |`buildPiUsereqToolsMenuChoices`|fn||1737-1777|function buildPiUsereqToolsMenuChoices(pi: ExtensionAPI, ...|
4546
+ |`buildPiUsereqToolToggleChoices`|fn||1787-1803|function buildPiUsereqToolToggleChoices(pi: ExtensionAPI,...|
4547
+ |`configurePiUsereqToolsMenu`|fn||1814-1865|async function configurePiUsereqToolsMenu(pi: ExtensionAP...|
4548
+ |`formatStaticCheckEntry`|fn||1873-1879|function formatStaticCheckEntry(entry: StaticCheckEntry):...|
4549
+ |`formatStaticCheckLanguagesSummary`|fn||1887-1893|function formatStaticCheckLanguagesSummary(config: UseReq...|
4550
+ |`renderStaticCheckReference`|fn||1901-1929|function renderStaticCheckReference(config: UseReqConfig)...|
4551
+ |`buildStaticCheckMenuChoices`|fn||1938-1973|function buildStaticCheckMenuChoices(config: UseReqConfig...|
4552
+ |`buildSupportedStaticCheckLanguageChoices`|fn||1981-2000|function buildSupportedStaticCheckLanguageChoices(config:...|
4553
+ |`buildConfiguredStaticCheckLanguageChoices`|fn||2008-2025|function buildConfiguredStaticCheckLanguageChoices(config...|
4554
+ |`configureStaticCheckMenu`|fn||2035-2101|async function configureStaticCheckMenu(ctx: ExtensionCom...|
4555
+ |`buildPiUsereqMenuChoices`|fn||2111-2172|function buildPiUsereqMenuChoices(|
4556
+ |`buildSrcDirMenuChoices`|fn||2181-2202|function buildSrcDirMenuChoices(config: UseReqConfig): Pi...|
4557
+ |`buildSrcDirRemovalChoices`|fn||2211-2226|function buildSrcDirRemovalChoices(config: UseReqConfig):...|
4558
+ |`configurePiUsereq`|fn||2237-2322|async function configurePiUsereq(|
4559
+ |`ensureSaved`|fn||2245-2249|const ensureSaved = () => saveProjectConfig(ctx.cwd, config)|
4560
+ |`refreshStatus`|fn||2246-2249|const refreshStatus = () =>|
4561
+ |`registerConfigCommands`|fn||2332-2342|function registerConfigCommands(|
4562
+ |`piUsereqExtension`|fn||2360-2368|export default function piUsereqExtension(pi: ExtensionAP...|