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.
- package/CHANGELOG.md +10 -0
- package/README.md +1 -1
- package/package.json +1 -1
- package/pi-usereq/docs/REFERENCES.md +364 -393
- package/pi-usereq/docs/REQUIREMENTS.md +20 -19
- package/pi-usereq/docs/WORKFLOW.md +21 -29
- package/src/core/agent-tool-json.ts +42 -193
- package/src/core/compress-payload.ts +7 -15
- package/src/core/find-payload.ts +21 -44
- package/src/core/reference-payload.ts +6 -14
- package/src/core/token-counter.ts +3 -121
- package/src/index.ts +64 -100
- package/tests/debug-extension-harness.test.ts +15 -21
- package/tests/extension-registration.test.ts +23 -86
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "PI-useReq Requirements"
|
|
3
3
|
description: Software requirements specification
|
|
4
|
-
version: "0.0.
|
|
4
|
+
version: "0.0.36"
|
|
5
5
|
date: "2026-04-19"
|
|
6
6
|
author: "OpenAI Codex"
|
|
7
7
|
scope:
|
|
@@ -153,6 +153,7 @@ PI-useReq is a TypeScript pi extension plus companion Node CLI and standalone ex
|
|
|
153
153
|
- **REQ-171**: MUST render `pushover` immediately after `sound`, showing `on` or `off` from the Pushover successful-prompt enable setting.
|
|
154
154
|
- **REQ-172**: MUST make the Pushover submenu expose a `global disable` toggle that suppresses all Pushover delivery without mutating the successful-prompt enable setting.
|
|
155
155
|
- **REQ-159**: MUST increase `Σ` by each normally completed prompt duration and MUST NOT change `Σ` on escape-triggered cancellation.
|
|
156
|
+
- **REQ-173**: MUST optimize every agent-tool response for minimum token usage by excluding caller-known, static, duplicated, and registration-described facts from runtime payloads.
|
|
156
157
|
- **REQ-010**: MUST count tokens with `js-tiktoken` `cl100k_base`, count characters and lines, and make `files-tokens` emit agent-oriented JSON containing structured per-file metrics, extracted facts, and aggregate metrics.
|
|
157
158
|
- **REQ-011**: MUST generate explicit-file references by analyzing supported source files and emitting agent-oriented JSON with per-file metadata, imports, symbol records, and optional residual text.
|
|
158
159
|
- **REQ-012**: MUST compress supported source files by removing comments and blank lines, preserving indentation for Python, Haskell, and Elixir, and optionally preserving original line numbers.
|
|
@@ -161,40 +162,40 @@ PI-useReq is a TypeScript pi extension plus companion Node CLI and standalone ex
|
|
|
161
162
|
- **REQ-015**: MUST make CLI project-scope compression scan configured `src-dir` files and emit one compressed markdown block per supported file.
|
|
162
163
|
- **REQ-016**: MUST make `find` scan configured `src-dir` files using the requested tag filter and regular expression.
|
|
163
164
|
- **REQ-017**: MUST make `tokens` count only existing canonical docs `REQUIREMENTS.md`, `WORKFLOW.md`, and `REFERENCES.md`, reuse the structured `files-tokens` JSON contract, and fail when none exist.
|
|
164
|
-
- **REQ-069**: MUST
|
|
165
|
+
- **REQ-069**: MUST make `files-tokens` and `tokens` runtime payloads expose only `summary`, `files`, and `execution`, omitting request echoes and derived guidance from runtime responses.
|
|
165
166
|
- **REQ-070**: MUST emit counts, sizes, line counts, line ranges, and derived totals as JSON numbers with explicit unit-specific field names, keeping display strings optional and never as the sole carrier of numeric facts.
|
|
166
167
|
- **REQ-071**: MUST normalize `files-tokens` and `tokens` text fields by removing decorative formatting, isolating canonical paths, separating source-derived facts from guidance, and stripping non-semantic presentation artifacts.
|
|
167
|
-
- **REQ-072**: MUST register `files-tokens` and `tokens` with agent-oriented descriptions
|
|
168
|
+
- **REQ-072**: MUST register `files-tokens` and `tokens` with agent-oriented descriptions carrying static scope, encoding, canonical-doc selection, and failure facts omitted from runtime responses.
|
|
168
169
|
- **REQ-073**: MUST expose file-derived facts needed for direct access, including canonical path, language, existence, line counts, line ranges, and Doxygen-derived metadata, as dedicated JSON fields when available.
|
|
169
170
|
- **REQ-074**: MUST keep monolithic text summaries optional, place them after structured fields, and omit any fact from text-only representation when the same fact can be emitted as dedicated JSON.
|
|
170
|
-
- **REQ-075**: MUST
|
|
171
|
-
- **REQ-076**: MUST
|
|
171
|
+
- **REQ-075**: MUST surface `files-tokens` and `tokens` skip or read-error observations through per-file status fields and execution diagnostics instead of a dedicated guidance section.
|
|
172
|
+
- **REQ-076**: MUST make `files-references` and `references` runtime payloads expose only `summary`, `repository`, `files`, and `execution`, omitting request echoes from runtime responses.
|
|
172
173
|
- **REQ-077**: MUST expose symbol kind, path, declaration lines, counts, and line ranges as dedicated numeric or array fields, never only inside free-form strings.
|
|
173
174
|
- **REQ-078**: MUST expose parsed Doxygen fields as tag-specific JSON objects or arrays, keeping monolithic `text` only for unsplittable residual content.
|
|
174
175
|
- **REQ-079**: MUST normalize `files-references` and `references` text fields by removing decorative markdown artifacts and preserving only parser-relevant residual content.
|
|
175
|
-
- **REQ-080**: MUST register `files-references` and `references` with agent-oriented descriptions
|
|
176
|
-
- **REQ-081**: MUST make agent-tool `files-compress` and `compress` return structured JSON sections ordered as `
|
|
176
|
+
- **REQ-080**: MUST register `files-references` and `references` with agent-oriented descriptions carrying static scope, configuration, and failure facts omitted from runtime responses.
|
|
177
|
+
- **REQ-081**: MUST make agent-tool `files-compress` and `compress` return structured JSON sections ordered as `summary`, `repository`, `files`, and `execution`.
|
|
177
178
|
- **REQ-082**: MUST expose canonical paths, absolute paths, language IDs, source line counts, source line ranges, compressed line counts, and removed line counts as dedicated typed compression fields.
|
|
178
179
|
- **REQ-083**: MUST expose compressed excerpts through structured `compressed_lines` arrays and a separate `compressed_source_text` field, never only inside markdown headers, fences, or prefixed display strings.
|
|
179
180
|
- **REQ-084**: MUST expose file-level and symbol-level Doxygen fields as structured tag-specific JSON objects, and emit symbol records with declaration kind, canonical path, signatures, and numeric declaration line ranges.
|
|
180
181
|
- **REQ-085**: MUST keep residual monolithic text optional, place it after structured fields, and omit decorative markdown artifacts from compression JSON field values.
|
|
181
|
-
- **REQ-086**: MUST register `files-compress` and `compress` with agent-oriented descriptions
|
|
182
|
+
- **REQ-086**: MUST register `files-compress` and `compress` with agent-oriented descriptions carrying static scope, line-number behavior, selection rules, and failure facts omitted from runtime responses.
|
|
182
183
|
- **REQ-087**: MUST expose skipped inputs, unsupported extensions, compression failures, and zero-processable requests as structured statuses and stable error reasons, while keeping stderr diagnostics optional.
|
|
183
184
|
- **REQ-088**: MUST mirror the structured compression payload into tool `content[0].text` and tool `details`, with execution metadata nested under the mirrored JSON object.
|
|
184
|
-
- **REQ-089**: MUST make agent-tool `files-find` and `find` return structured JSON sections ordered as `
|
|
185
|
+
- **REQ-089**: MUST make agent-tool `files-find` and `find` return structured JSON sections ordered as `summary`, `repository`, `files`, and `execution`.
|
|
185
186
|
- **REQ-090**: MUST expose find request scope facts as dedicated fields, including tag filter, regex pattern, line-number mode, requested paths, configured source directories, and supported tags by language.
|
|
186
187
|
- **REQ-091**: MUST expose per-file and per-match find facts as dedicated fields, including canonical path, language, construct kind, symbol name, signature, declaration order, numeric line ranges, and stripped code lines.
|
|
187
188
|
- **REQ-092**: MUST expose parsed find Doxygen fields as tag-specific JSON objects or arrays for file-level and construct-level metadata, keeping monolithic residual text only when safe splitting is impossible.
|
|
188
189
|
- **REQ-093**: MUST emit find counts, file totals, match totals, line numbers, and line ranges as JSON numbers with explicit unit-specific field names, never only inside display strings.
|
|
189
190
|
- **REQ-094**: MUST normalize `files-find` and `find` text fields by removing markdown headers, fences, bullets, and other presentation-only artifacts from structured JSON values.
|
|
190
|
-
- **REQ-095**: MUST register `files-find` and `find` with agent-oriented descriptions
|
|
191
|
+
- **REQ-095**: MUST register `files-find` and `find` with agent-oriented descriptions carrying static regex semantics, supported tags by language, and failure facts omitted from runtime responses.
|
|
191
192
|
- **REQ-096**: MUST expose structured statuses for skipped files, unsupported languages, invalid tag filters, invalid regex patterns, no-match outcomes, and analysis failures, while keeping stderr diagnostics optional.
|
|
192
193
|
- **REQ-097**: MUST mirror the structured find payload into tool `content[0].text` and tool `details`, with execution metadata nested under the mirrored JSON object.
|
|
193
194
|
- **REQ-098**: MUST keep monolithic find `text` fields optional, place them after structured fields, and omit any fact from text-only representation when a dedicated JSON field can carry it.
|
|
194
|
-
- **REQ-099**: MUST make every agent-tool response expose a JSON-first tree whose
|
|
195
|
-
- **REQ-100**: MUST encode quantitative facts as JSON numbers in unit-specific fields, keep textual fields free of decorative formatting
|
|
196
|
-
- **REQ-101**: MUST register every agent tool with machine-oriented metadata describing purpose,
|
|
197
|
-
- **REQ-102**: MUST make every structured agent-tool execute result mirror the same JSON object into `content[0].text` and `details`, nesting execution metadata under dedicated `execution` fields.
|
|
195
|
+
- **REQ-099**: MUST make every agent-tool response expose a JSON-first tree whose runtime fields are directly accessible and whose caller-known or registration-described facts are omitted.
|
|
196
|
+
- **REQ-100**: MUST encode quantitative facts as JSON numbers in unit-specific fields, keep textual fields free of decorative formatting, and avoid duplicate or derivable facts in runtime payloads.
|
|
197
|
+
- **REQ-101**: MUST register every agent tool with machine-oriented metadata describing purpose, parameters, static scope facts, omitted response facts, output schema, specialized behaviors, and stable error conditions.
|
|
198
|
+
- **REQ-102**: MUST make every structured agent-tool execute result mirror the same JSON object into `content[0].text` and `details`, nesting only residual execution metadata under dedicated `execution` fields.
|
|
198
199
|
- **REQ-018**: MUST expose the `test-static-check` driver only through standalone CLI `--test-static-check`, dispatching `dummy` or `command` checker subcommands directly.
|
|
199
200
|
- **REQ-019**: MUST resolve each explicit static-check file by extension and run every configured checker for that language while capturing only failing checker output.
|
|
200
201
|
- **REQ-020**: MUST parse user `--enable-static-check` specs in `LANG=Command,CMD[,PARAM...]` format and normalize supported language names plus `Command` case-insensitively.
|
|
@@ -287,13 +288,13 @@ PI-useReq is a TypeScript pi extension plus companion Node CLI and standalone ex
|
|
|
287
288
|
- **TST-019**: MUST verify offline harness command and tool replay invoke registered handlers, preserve requested cwd semantics, and capture prompt payloads, tool results, and UI side effects.
|
|
288
289
|
- **TST-020**: MUST verify SDK parity comparison reports aligned inventories as clean, reports requested mismatch categories, and `package.json` declares the `debug:ext*` harness scripts.
|
|
289
290
|
- **TST-021**: MUST verify `scripts/pi-usereq-debug.sh tool` forwards `--params` unchanged and converts `--args` text into the JSON object forwarded through `--params`.
|
|
290
|
-
- **TST-022**: MUST verify `files-references` and `references` JSON outputs expose repository, file, symbol, location, and Doxygen facts through dedicated structured fields.
|
|
291
|
-
- **TST-023**: MUST verify harness inspection surfaces agent-oriented `files-references` and `references` tool descriptions with output schema,
|
|
292
|
-
- **TST-024**: MUST verify `files-find` and `find` JSON outputs expose
|
|
291
|
+
- **TST-022**: MUST verify `files-references` and `references` JSON outputs expose repository, file, symbol, location, and Doxygen facts through dedicated structured fields while omitting request echoes.
|
|
292
|
+
- **TST-023**: MUST verify harness inspection surfaces agent-oriented `files-references` and `references` tool descriptions with output schema, static scope facts, specialized behaviors, and failure details.
|
|
293
|
+
- **TST-024**: MUST verify `files-find` and `find` JSON outputs expose summary, repository, file, match, location, and Doxygen facts through dedicated structured fields while omitting request echoes.
|
|
293
294
|
- **TST-025**: MUST verify harness inspection surfaces agent-oriented `files-find` and `find` tool descriptions with input schema, output schema, line-number behavior, regex semantics, supported tags by language, and failure details.
|
|
294
|
-
- **TST-026**: MUST verify `files-compress` and `compress` JSON outputs expose structured
|
|
295
|
+
- **TST-026**: MUST verify `files-compress` and `compress` JSON outputs expose structured summary, repository, line, symbol, status, and Doxygen facts through dedicated fields while omitting request echoes.
|
|
295
296
|
- **TST-027**: MUST verify harness inspection surfaces agent-oriented `files-compress` and `compress` tool descriptions with parameters, line-number behavior, output schema, specialization triggers, and failure conditions.
|
|
296
|
-
- **TST-028**: MUST verify path, static-check, git, docs, and worktree agent-tool outputs expose structured JSON
|
|
297
|
+
- **TST-028**: MUST verify path, static-check, git, docs, and worktree agent-tool outputs expose structured JSON result, summary, file, and execution facts while omitting request echoes and runtime-path duplication.
|
|
297
298
|
- **TST-029**: MUST verify harness inspection surfaces machine-oriented descriptions for path, static-check, git, docs, and worktree tools, including parameters, output schema, specialization triggers, and failure conditions.
|
|
298
299
|
- **TST-039**: MUST verify `.github/workflows/release-npm.yml` keeps the existing tag filter, gates downstream release work on `origin/master`, runs npm publication, and creates the GitHub Release from generated changelog text.
|
|
299
300
|
- **TST-042**: MUST verify `package.json` keeps `name` equal to `pi-usereq` so npm publication resolves to `https://www.npmjs.com/package/pi-usereq`.
|
|
@@ -641,17 +641,16 @@
|
|
|
641
641
|
- `extractPrimaryHeadingText(...)`: extract the first markdown heading when present [`src/core/token-counter.ts`]
|
|
642
642
|
- `extractLeadingDoxygenFields(...)`: extract file-level Doxygen fields when present [`src/core/token-counter.ts`]
|
|
643
643
|
- `parseDoxygenComment(...)`: parse normalized Doxygen fields [`src/core/doxygen-parser.ts`]
|
|
644
|
-
- `orderPathsByMetric(...)`: derive stable counted-path orderings for guidance [`src/core/token-counter.ts`]
|
|
645
644
|
- `buildTokenToolExecuteResult(...)`: wrap token payloads into tool content and structured details [`src/index.ts`]
|
|
646
645
|
- `buildTokenToolExecutionStderr(...)`: serialize skipped and error observations into stderr text [`src/index.ts`]
|
|
647
646
|
- `buildStructuredToolExecuteResult(...)`: mirror the final JSON object into tool content and details [`src/core/agent-tool-json.ts`]
|
|
648
|
-
- `buildReferenceToolPayload(...)`: construct
|
|
647
|
+
- `buildReferenceToolPayload(...)`: construct token-optimized references JSON with repository structure, symbols, and Doxygen fields [`src/core/reference-payload.ts`]
|
|
649
648
|
- `canonicalizeReferencePath(...)`: normalize request and file paths against the project base [`src/core/reference-payload.ts`]
|
|
650
649
|
- `analyzeReferenceFile(...)`: analyze one processable file into structured imports, symbols, and comments [`src/core/reference-payload.ts`]
|
|
651
650
|
- `buildRepositoryTree(...)`: materialize the repository directory tree as structured JSON [`src/core/reference-payload.ts`]
|
|
652
651
|
- `buildReferenceToolExecuteResult(...)`: wrap references payloads into tool content and structured details [`src/index.ts`]
|
|
653
652
|
- `buildStructuredToolExecuteResult(...)`: mirror the final JSON object into tool content and details [`src/core/agent-tool-json.ts`]
|
|
654
|
-
- `buildCompressToolPayload(...)`: construct
|
|
653
|
+
- `buildCompressToolPayload(...)`: construct token-optimized compression JSON with structured line facts, symbols, and Doxygen fields [`src/core/compress-payload.ts`]
|
|
655
654
|
- `analyzeCompressFile(...)`: compress one requested file and attach symbol metadata when available [`src/core/compress-payload.ts`]
|
|
656
655
|
- `compressFileDetailed(...)`: compress one file into structured lines and rendered text [`src/core/compress.ts`]
|
|
657
656
|
- `analyzeCompressedFileSymbols(...)`: extract symbol and Doxygen records for compressed files [`src/core/compress-payload.ts`]
|
|
@@ -661,7 +660,7 @@
|
|
|
661
660
|
- `buildFindToolSchemaDescription(...)`: synthesize find parameter-schema descriptions [`src/index.ts`]
|
|
662
661
|
- `buildFindToolPromptGuidelines(...)`: synthesize agent-oriented find guidance strings [`src/index.ts`]
|
|
663
662
|
- `buildFindToolSupportedTagGuidelines(...)`: emit per-language supported-tag guidance lines [`src/index.ts`]
|
|
664
|
-
- `buildFindToolPayload(...)`: construct
|
|
663
|
+
- `buildFindToolPayload(...)`: construct token-optimized construct-search JSON with structured file statuses, matches, line facts, and Doxygen fields [`src/core/find-payload.ts`]
|
|
665
664
|
- `validateTagFilter(...)`: normalize requested construct tags [`src/core/find-payload.ts`]
|
|
666
665
|
- `validateRegexPattern(...)`: compile the construct-name regex [`src/core/find-payload.ts`]
|
|
667
666
|
- `analyzeFindFile(...)`: analyze one requested file into structured search status and match records [`src/core/find-payload.ts`]
|
|
@@ -672,20 +671,20 @@
|
|
|
672
671
|
- `buildStructuredToolExecuteResult(...)`: mirror the final JSON object into tool content and details [`src/core/agent-tool-json.ts`]
|
|
673
672
|
- `runGitPath(...)`: query the resolved git-path value [`src/core/tool-runner.ts`]
|
|
674
673
|
- `runGetBasePath(...)`: query the resolved base-path value [`src/core/tool-runner.ts`]
|
|
675
|
-
- `buildPathQueryToolPayload(...)`: structure path-query payloads for `git-path` and `get-base-path` [`src/core/agent-tool-json.ts`]
|
|
674
|
+
- `buildPathQueryToolPayload(...)`: structure token-optimized path-query payloads for `git-path` and `get-base-path` [`src/core/agent-tool-json.ts`]
|
|
676
675
|
- `runFilesStaticCheck(...)`: execute configured checkers for explicit-file requests [`src/core/tool-runner.ts`]
|
|
677
676
|
- `collectProjectStaticCheckSelection(...)`: derive project static-check file selections and fixture exclusions [`src/index.ts`]
|
|
678
677
|
- `runProjectStaticCheck(...)`: execute configured checkers for project source and test selections [`src/core/tool-runner.ts`]
|
|
679
|
-
- `buildStaticCheckToolPayload(...)`: structure static-check
|
|
678
|
+
- `buildStaticCheckToolPayload(...)`: structure token-optimized static-check summary, file-selection, and execution facts [`src/core/agent-tool-json.ts`]
|
|
680
679
|
- `runGitCheck(...)`: validate runtime repository cleanliness [`src/core/tool-runner.ts`]
|
|
681
|
-
- `buildGitCheckToolPayload(...)`: structure git-validation status and execution facts [`src/core/agent-tool-json.ts`]
|
|
682
|
-
- `buildDocsCheckToolPayload(...)`: structure canonical-doc presence and remediation facts [`src/core/agent-tool-json.ts`]
|
|
680
|
+
- `buildGitCheckToolPayload(...)`: structure token-optimized git-validation status and execution facts [`src/core/agent-tool-json.ts`]
|
|
681
|
+
- `buildDocsCheckToolPayload(...)`: structure token-optimized canonical-doc presence and remediation facts [`src/core/agent-tool-json.ts`]
|
|
683
682
|
- `runGitWtName(...)`: generate the standardized worktree name [`src/core/tool-runner.ts`]
|
|
684
|
-
- `buildWorktreeNameToolPayload(...)`: structure worktree-name generation facts [`src/core/agent-tool-json.ts`]
|
|
683
|
+
- `buildWorktreeNameToolPayload(...)`: structure token-optimized worktree-name generation facts [`src/core/agent-tool-json.ts`]
|
|
685
684
|
- `runGitWtCreate(...)`: create a dedicated worktree and branch [`src/core/tool-runner.ts`]
|
|
686
685
|
- `runGitWtDelete(...)`: delete a dedicated worktree and branch [`src/core/tool-runner.ts`]
|
|
687
|
-
- `buildWorktreeMutationToolPayload(...)`: structure worktree create
|
|
688
|
-
- `buildToolExecutionSection(...)`: normalize stdout, stderr, and exit-code metadata [`src/core/agent-tool-json.ts`]
|
|
686
|
+
- `buildWorktreeMutationToolPayload(...)`: structure token-optimized worktree create-delete facts [`src/core/agent-tool-json.ts`]
|
|
687
|
+
- `buildToolExecutionSection(...)`: normalize residual stdout, stderr, and exit-code metadata [`src/core/agent-tool-json.ts`]
|
|
689
688
|
- `normalizeToolFailure(...)`: convert `ReqError` failures into structured execution records [`src/core/agent-tool-json.ts`]
|
|
690
689
|
- `runSdkSmoke(...)`: replay offline `session_start`, probe the official SDK runtime, and compare inventories [`scripts/lib/sdk-smoke.ts`]
|
|
691
690
|
- `replaySessionStart(...)`: capture the offline `session_start` contract [`scripts/lib/extension-debug-harness.ts`]
|
|
@@ -780,16 +779,10 @@
|
|
|
780
779
|
- `runCapture(...)`: run git subprocess [`src/core/tool-runner.ts`]
|
|
781
780
|
- `resolveGitRoot(...)`: resolve repository root [`src/core/tool-runner.ts`]
|
|
782
781
|
- `runCapture(...)`: run git subprocess [`src/core/tool-runner.ts`]
|
|
783
|
-
- `buildSharedRuntimePathFacts(...)`: derive shared runtime path facts for path, git, docs, worktree, and static-check payloads [`src/index.ts`]
|
|
784
|
-
- `buildRuntimePathContext(...)`: derive installation, execution, base, config, docs, tests, source, and git paths [`src/core/path-context.ts`]
|
|
785
|
-
- `getInstallationPath(...)`: resolve the installed extension root from the executing module [`src/core/path-context.ts`]
|
|
786
|
-
- `getConfigPath(...)`: derive the `.pi-usereq/config.json` path [`src/core/path-context.ts`]
|
|
787
|
-
- `buildRuntimePathFacts(...)`: convert runtime paths into payload-facing path strings [`src/core/path-context.ts`]
|
|
788
|
-
- `formatRuntimePathForDisplay(...)`: serialize user-home-relative paths with environment variables [`src/core/path-context.ts`]
|
|
789
782
|
- `runGitPath(...)`: query the resolved git-path value [`src/core/tool-runner.ts`]
|
|
790
783
|
- `runGetBasePath(...)`: query the resolved base-path value [`src/core/tool-runner.ts`]
|
|
791
|
-
- `buildPathQueryToolPayload(...)`: structure path-query payloads for `git-path` and `get-base-path` [`src/core/agent-tool-json.ts`]
|
|
792
|
-
- `buildTokenToolPayload(...)`: construct
|
|
784
|
+
- `buildPathQueryToolPayload(...)`: structure token-optimized path-query payloads for `git-path` and `get-base-path` [`src/core/agent-tool-json.ts`]
|
|
785
|
+
- `buildTokenToolPayload(...)`: construct token-optimized token JSON with direct-access source facts and metrics [`src/core/token-counter.ts`]
|
|
793
786
|
- `probeRequestedPath(...)`: classify requested paths as readable files, missing inputs, or non-file inputs [`src/core/token-counter.ts`]
|
|
794
787
|
- `countFilesMetrics(...)`: read readable files and extract token, character, byte, line, heading, and optional Doxygen facts [`src/core/token-counter.ts`]
|
|
795
788
|
- `buildCountFileMetricsResult(...)`: assemble direct-access per-file metrics and metadata [`src/core/token-counter.ts`]
|
|
@@ -800,17 +793,16 @@
|
|
|
800
793
|
- `extractPrimaryHeadingText(...)`: extract the first markdown heading when present [`src/core/token-counter.ts`]
|
|
801
794
|
- `extractLeadingDoxygenFields(...)`: extract file-level Doxygen fields when present [`src/core/token-counter.ts`]
|
|
802
795
|
- `parseDoxygenComment(...)`: parse normalized Doxygen fields [`src/core/doxygen-parser.ts`]
|
|
803
|
-
- `orderPathsByMetric(...)`: derive stable counted-path orderings for guidance [`src/core/token-counter.ts`]
|
|
804
796
|
- `buildTokenToolExecuteResult(...)`: wrap token payloads into tool content and structured details [`src/index.ts`]
|
|
805
797
|
- `buildTokenToolExecutionStderr(...)`: serialize skipped and error observations into stderr text [`src/index.ts`]
|
|
806
798
|
- `buildStructuredToolExecuteResult(...)`: mirror the final JSON object into tool content and details [`src/core/agent-tool-json.ts`]
|
|
807
|
-
- `buildReferenceToolPayload(...)`: construct
|
|
799
|
+
- `buildReferenceToolPayload(...)`: construct token-optimized references JSON with repository structure, symbols, and Doxygen fields [`src/core/reference-payload.ts`]
|
|
808
800
|
- `canonicalizeReferencePath(...)`: normalize request and file paths against the project base [`src/core/reference-payload.ts`]
|
|
809
801
|
- `analyzeReferenceFile(...)`: analyze one processable file into structured imports, symbols, and comments [`src/core/reference-payload.ts`]
|
|
810
802
|
- `buildRepositoryTree(...)`: materialize the repository directory tree as structured JSON [`src/core/reference-payload.ts`]
|
|
811
803
|
- `buildReferenceToolExecuteResult(...)`: wrap references payloads into tool content and structured details [`src/index.ts`]
|
|
812
804
|
- `buildStructuredToolExecuteResult(...)`: mirror the final JSON object into tool content and details [`src/core/agent-tool-json.ts`]
|
|
813
|
-
- `buildCompressToolPayload(...)`: construct
|
|
805
|
+
- `buildCompressToolPayload(...)`: construct token-optimized compression JSON with structured line facts, symbols, and Doxygen fields [`src/core/compress-payload.ts`]
|
|
814
806
|
- `analyzeCompressFile(...)`: compress one requested file and attach symbol metadata when available [`src/core/compress-payload.ts`]
|
|
815
807
|
- `compressFileDetailed(...)`: compress one file into structured lines and rendered text [`src/core/compress.ts`]
|
|
816
808
|
- `analyzeCompressedFileSymbols(...)`: extract symbol and Doxygen records for compressed files [`src/core/compress-payload.ts`]
|
|
@@ -820,7 +812,7 @@
|
|
|
820
812
|
- `buildFindToolSchemaDescription(...)`: synthesize find parameter-schema descriptions [`src/index.ts`]
|
|
821
813
|
- `buildFindToolPromptGuidelines(...)`: synthesize agent-oriented find guidance strings [`src/index.ts`]
|
|
822
814
|
- `buildFindToolSupportedTagGuidelines(...)`: emit per-language supported-tag guidance lines [`src/index.ts`]
|
|
823
|
-
- `buildFindToolPayload(...)`: construct
|
|
815
|
+
- `buildFindToolPayload(...)`: construct token-optimized construct-search JSON with structured file statuses, matches, line facts, and Doxygen fields [`src/core/find-payload.ts`]
|
|
824
816
|
- `validateTagFilter(...)`: normalize requested construct tags [`src/core/find-payload.ts`]
|
|
825
817
|
- `validateRegexPattern(...)`: compile the construct-name regex [`src/core/find-payload.ts`]
|
|
826
818
|
- `analyzeFindFile(...)`: analyze one requested file into structured search status and match records [`src/core/find-payload.ts`]
|
|
@@ -832,16 +824,16 @@
|
|
|
832
824
|
- `runFilesStaticCheck(...)`: execute configured checkers for explicit-file requests [`src/core/tool-runner.ts`]
|
|
833
825
|
- `collectProjectStaticCheckSelection(...)`: derive project static-check file selections and fixture exclusions [`src/index.ts`]
|
|
834
826
|
- `runProjectStaticCheck(...)`: execute configured checkers for project source and test selections [`src/core/tool-runner.ts`]
|
|
835
|
-
- `buildStaticCheckToolPayload(...)`: structure static-check
|
|
827
|
+
- `buildStaticCheckToolPayload(...)`: structure token-optimized static-check summary, file-selection, and execution facts [`src/core/agent-tool-json.ts`]
|
|
836
828
|
- `runGitCheck(...)`: validate runtime repository cleanliness [`src/core/tool-runner.ts`]
|
|
837
|
-
- `buildGitCheckToolPayload(...)`: structure git-validation status and execution facts [`src/core/agent-tool-json.ts`]
|
|
838
|
-
- `buildDocsCheckToolPayload(...)`: structure canonical-doc presence and remediation facts [`src/core/agent-tool-json.ts`]
|
|
829
|
+
- `buildGitCheckToolPayload(...)`: structure token-optimized git-validation status and execution facts [`src/core/agent-tool-json.ts`]
|
|
830
|
+
- `buildDocsCheckToolPayload(...)`: structure token-optimized canonical-doc presence and remediation facts [`src/core/agent-tool-json.ts`]
|
|
839
831
|
- `runGitWtName(...)`: generate the standardized worktree name [`src/core/tool-runner.ts`]
|
|
840
|
-
- `buildWorktreeNameToolPayload(...)`: structure worktree-name generation facts [`src/core/agent-tool-json.ts`]
|
|
832
|
+
- `buildWorktreeNameToolPayload(...)`: structure token-optimized worktree-name generation facts [`src/core/agent-tool-json.ts`]
|
|
841
833
|
- `runGitWtCreate(...)`: create a dedicated worktree and branch [`src/core/tool-runner.ts`]
|
|
842
834
|
- `runGitWtDelete(...)`: delete a dedicated worktree and branch [`src/core/tool-runner.ts`]
|
|
843
|
-
- `buildWorktreeMutationToolPayload(...)`: structure worktree create
|
|
844
|
-
- `buildToolExecutionSection(...)`: normalize stdout, stderr, and exit-code metadata [`src/core/agent-tool-json.ts`]
|
|
835
|
+
- `buildWorktreeMutationToolPayload(...)`: structure token-optimized worktree create-delete facts [`src/core/agent-tool-json.ts`]
|
|
836
|
+
- `buildToolExecutionSection(...)`: normalize residual stdout, stderr, and exit-code metadata [`src/core/agent-tool-json.ts`]
|
|
845
837
|
- `normalizeToolFailure(...)`: convert `ReqError` failures into structured execution records [`src/core/agent-tool-json.ts`]
|
|
846
838
|
- `registerConfigCommands(...)`: register interactive configuration commands [`src/index.ts`]
|
|
847
839
|
- `configurePiUsereq(...)`: interactive configuration menu root [`src/index.ts`]
|