pi-usereq 0.4.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/.g.conf +20 -0
- package/.github/workflows/release-npm.yml +131 -0
- package/.gitignore +270 -0
- package/CHANGELOG.md +221 -0
- package/LICENSE +674 -0
- package/README.md +260 -0
- package/TODO.md +20 -0
- package/docs/pi.dev/agent-document-manifest.json +6399 -0
- package/docs/pi.dev/coding-agent-docs/compaction.md +394 -0
- package/docs/pi.dev/coding-agent-docs/custom-provider.md +596 -0
- package/docs/pi.dev/coding-agent-docs/development.md +71 -0
- package/docs/pi.dev/coding-agent-docs/extensions.md +2262 -0
- package/docs/pi.dev/coding-agent-docs/images/doom-extension.png +0 -0
- package/docs/pi.dev/coding-agent-docs/images/exy.png +0 -0
- package/docs/pi.dev/coding-agent-docs/images/interactive-mode.png +0 -0
- package/docs/pi.dev/coding-agent-docs/images/tree-view.png +0 -0
- package/docs/pi.dev/coding-agent-docs/json.md +82 -0
- package/docs/pi.dev/coding-agent-docs/keybindings.md +175 -0
- package/docs/pi.dev/coding-agent-docs/models.md +392 -0
- package/docs/pi.dev/coding-agent-docs/packages.md +218 -0
- package/docs/pi.dev/coding-agent-docs/prompt-templates.md +67 -0
- package/docs/pi.dev/coding-agent-docs/providers.md +195 -0
- package/docs/pi.dev/coding-agent-docs/rpc.md +1377 -0
- package/docs/pi.dev/coding-agent-docs/sdk.md +1124 -0
- package/docs/pi.dev/coding-agent-docs/session.md +412 -0
- package/docs/pi.dev/coding-agent-docs/settings.md +247 -0
- package/docs/pi.dev/coding-agent-docs/shell-aliases.md +13 -0
- package/docs/pi.dev/coding-agent-docs/skills.md +232 -0
- package/docs/pi.dev/coding-agent-docs/terminal-setup.md +106 -0
- package/docs/pi.dev/coding-agent-docs/termux.md +127 -0
- package/docs/pi.dev/coding-agent-docs/themes.md +295 -0
- package/docs/pi.dev/coding-agent-docs/tmux.md +61 -0
- package/docs/pi.dev/coding-agent-docs/tree.md +231 -0
- package/docs/pi.dev/coding-agent-docs/tui.md +887 -0
- package/docs/pi.dev/coding-agent-docs/windows.md +17 -0
- package/docs/pi.dev/mom-docs/artifacts-server.md +475 -0
- package/docs/pi.dev/mom-docs/events.md +307 -0
- package/docs/pi.dev/mom-docs/new.md +970 -0
- package/docs/pi.dev/mom-docs/sandbox.md +153 -0
- package/docs/pi.dev/mom-docs/slack-bot-minimal-guide.md +399 -0
- package/docs/pi.dev/mom-docs/v86.md +319 -0
- package/docs/pi.dev/pods-docs/gml-4.5.md +189 -0
- package/docs/pi.dev/pods-docs/gpt-oss.md +233 -0
- package/docs/pi.dev/pods-docs/implementation-plan.md +183 -0
- package/docs/pi.dev/pods-docs/kimi-k2.md +197 -0
- package/docs/pi.dev/pods-docs/models.md +116 -0
- package/docs/pi.dev/pods-docs/plan.md +166 -0
- package/docs/pi.dev/pods-docs/qwen3-coder.md +132 -0
- package/images/flowchart-bw.png +0 -0
- package/images/flowchart-bw.svg +102 -0
- package/images/flowchart.md +100 -0
- package/images/flowchart.png +0 -0
- package/images/flowchart.svg +3 -0
- package/package.json +46 -0
- package/req/docs/REFERENCES.md +4554 -0
- package/req/docs/REQUIREMENTS.md +475 -0
- package/req/docs/WORKFLOW.md +1059 -0
- package/scripts/debug-extension.ts +497 -0
- package/scripts/lib/extension-debug-harness.ts +450 -0
- package/scripts/lib/recording-extension-api.ts +786 -0
- package/scripts/lib/sdk-smoke.ts +503 -0
- package/scripts/pi-usereq-debug.sh +330 -0
- package/scripts/tool-args-to-params.ts +208 -0
- package/src/cli.ts +349 -0
- package/src/core/agent-tool-json.ts +621 -0
- package/src/core/compress-files.ts +72 -0
- package/src/core/compress-payload.ts +648 -0
- package/src/core/compress.ts +464 -0
- package/src/core/config.ts +272 -0
- package/src/core/doxygen-parser.ts +318 -0
- package/src/core/errors.ts +31 -0
- package/src/core/extension-status.ts +660 -0
- package/src/core/find-constructs.ts +319 -0
- package/src/core/find-payload.ts +915 -0
- package/src/core/generate-markdown.ts +120 -0
- package/src/core/path-context.ts +196 -0
- package/src/core/pi-notify.ts +430 -0
- package/src/core/pi-usereq-tools.ts +140 -0
- package/src/core/prompts.ts +184 -0
- package/src/core/reference-payload.ts +818 -0
- package/src/core/resources.ts +63 -0
- package/src/core/runtime-project-paths.ts +99 -0
- package/src/core/settings-menu.ts +233 -0
- package/src/core/source-analyzer.ts +1721 -0
- package/src/core/static-check.ts +674 -0
- package/src/core/token-counter.ts +729 -0
- package/src/core/tool-runner.ts +717 -0
- package/src/core/utils.ts +185 -0
- package/src/index.ts +2209 -0
- package/src/resources/guidelines/Google_C++_Style_Guide.md +3711 -0
- package/src/resources/guidelines/Google_Python_Style_Guide.md +3709 -0
- package/src/resources/prompts/analyze.md +130 -0
- package/src/resources/prompts/change.md +227 -0
- package/src/resources/prompts/check.md +139 -0
- package/src/resources/prompts/cover.md +219 -0
- package/src/resources/prompts/create.md +104 -0
- package/src/resources/prompts/fix.md +221 -0
- package/src/resources/prompts/flowchart.md +220 -0
- package/src/resources/prompts/implement.md +163 -0
- package/src/resources/prompts/new.md +226 -0
- package/src/resources/prompts/readme.md +182 -0
- package/src/resources/prompts/recreate.md +213 -0
- package/src/resources/prompts/refactor.md +213 -0
- package/src/resources/prompts/references.md +100 -0
- package/src/resources/prompts/renumber.md +119 -0
- package/src/resources/prompts/workflow.md +202 -0
- package/src/resources/prompts/write.md +99 -0
- package/src/resources/sounds/Machine-alert-beep-sound-effect.mp3 +0 -0
- package/src/resources/sounds/Soft-high-tech-notification-sound-effect.mp3 +0 -0
- package/src/resources/templates/Document_Source_Code_in_Doxygen_Style.md +130 -0
- package/src/resources/templates/HDT_Test_Authoring_Guide.md +318 -0
- package/src/resources/templates/Requirements_Template.md +78 -0
- package/tests/attended-results-scenarios.ts +758 -0
- package/tests/attended-results.test.ts +39 -0
- package/tests/cli-command-option-parity.test.ts +815 -0
- package/tests/debug-extension-harness.test.ts +463 -0
- package/tests/extension-registration.test.ts +2006 -0
- package/tests/fixtures/fixture_c.c +361 -0
- package/tests/fixtures/fixture_cpp.cpp +407 -0
- package/tests/fixtures/fixture_csharp.cs +411 -0
- package/tests/fixtures/fixture_elixir.ex +409 -0
- package/tests/fixtures/fixture_go.go +341 -0
- package/tests/fixtures/fixture_haskell.hs +250 -0
- package/tests/fixtures/fixture_java.java +430 -0
- package/tests/fixtures/fixture_javascript.js +383 -0
- package/tests/fixtures/fixture_kotlin.kt +451 -0
- package/tests/fixtures/fixture_lua.lua +276 -0
- package/tests/fixtures/fixture_perl.pl +310 -0
- package/tests/fixtures/fixture_php.php +433 -0
- package/tests/fixtures/fixture_python.py +502 -0
- package/tests/fixtures/fixture_ruby.rb +345 -0
- package/tests/fixtures/fixture_rust.rs +380 -0
- package/tests/fixtures/fixture_scala.scala +398 -0
- package/tests/fixtures/fixture_shell.sh +276 -0
- package/tests/fixtures/fixture_swift.swift +397 -0
- package/tests/fixtures/fixture_typescript.ts +434 -0
- package/tests/fixtures/fixture_zig.zig +295 -0
- package/tests/fixtures_attended_results/project/compress-line-numbers.json +5 -0
- package/tests/fixtures_attended_results/project/compress.json +5 -0
- package/tests/fixtures_attended_results/project/enable-static-check-invalid-command.json +5 -0
- package/tests/fixtures_attended_results/project/enable-static-check-valid.json +5 -0
- package/tests/fixtures_attended_results/project/files-static-check.json +5 -0
- package/tests/fixtures_attended_results/project/find-line-numbers.json +5 -0
- package/tests/fixtures_attended_results/project/find.json +5 -0
- package/tests/fixtures_attended_results/project/get-base-path.json +5 -0
- package/tests/fixtures_attended_results/project/git-check-clean.json +5 -0
- package/tests/fixtures_attended_results/project/git-check-dirty.json +5 -0
- package/tests/fixtures_attended_results/project/git-path.json +5 -0
- package/tests/fixtures_attended_results/project/git-wt-create-invalid.json +5 -0
- package/tests/fixtures_attended_results/project/git-wt-create-valid.json +5 -0
- package/tests/fixtures_attended_results/project/git-wt-delete-nonexistent.json +5 -0
- package/tests/fixtures_attended_results/project/git-wt-delete-valid.json +5 -0
- package/tests/fixtures_attended_results/project/git-wt-name.json +5 -0
- package/tests/fixtures_attended_results/project/references.json +5 -0
- package/tests/fixtures_attended_results/project/static-check.json +5 -0
- package/tests/fixtures_attended_results/project/tokens.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_zig.zig.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_zig.zig.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_zig.zig.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_zig.zig.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_zig.zig.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_zig.zig.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_zig.zig.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_zig.zig.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_zig.zig.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_zig.zig.json +5 -0
- package/tests/helpers.ts +204 -0
- package/tests/oracle-project.test.ts +63 -0
- package/tests/oracle-standalone.test.ts +48 -0
- package/tests/prompt-rendering.test.ts +66 -0
- package/tests/release-workflow.test.ts +133 -0
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file fixture_kotlin.kt
|
|
3
|
+
* @brief Comprehensive Kotlin test fixture for parser validation.
|
|
4
|
+
* @details Covers extension functions, inline/reified generics, DSL builders,
|
|
5
|
+
* delegation, coroutine scope, destructuring, sealed interfaces,
|
|
6
|
+
* value classes, operator overloading, and lateinit.
|
|
7
|
+
*/
|
|
8
|
+
// Single line comment
|
|
9
|
+
/* Multi-line
|
|
10
|
+
comment */
|
|
11
|
+
import kotlin.collections.List
|
|
12
|
+
import kotlinx.coroutines.flow.Flow
|
|
13
|
+
import kotlinx.coroutines.flow.flow
|
|
14
|
+
|
|
15
|
+
/* ── Annotations ──────────────────────────────────────────────────────── */
|
|
16
|
+
|
|
17
|
+
/** @brief Marks a class or function as deprecated with migration path. */
|
|
18
|
+
@Deprecated("Use UserV2 instead", replaceWith = ReplaceWith("UserV2"))
|
|
19
|
+
data class User(val name: String, val age: Int = 0)
|
|
20
|
+
|
|
21
|
+
/* ── Sealed class hierarchy ───────────────────────────────────────────── */
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @class Result
|
|
25
|
+
* @brief Sealed class representing success/failure outcomes.
|
|
26
|
+
* @tparam T The success value type.
|
|
27
|
+
*/
|
|
28
|
+
sealed class Result<out T> {
|
|
29
|
+
/**
|
|
30
|
+
* @class Success
|
|
31
|
+
* @brief Successful outcome holding a value.
|
|
32
|
+
* @param value The result data.
|
|
33
|
+
*/
|
|
34
|
+
data class Success<T>(val value: T) : Result<T>()
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @class Error
|
|
38
|
+
* @brief Failed outcome holding an error message.
|
|
39
|
+
* @param message Description of the failure.
|
|
40
|
+
* @param cause Optional underlying exception.
|
|
41
|
+
*/
|
|
42
|
+
data class Error(val message: String, val cause: Throwable? = null) : Result<Nothing>()
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @object Loading
|
|
46
|
+
* @brief Singleton state representing an in-progress operation.
|
|
47
|
+
*/
|
|
48
|
+
object Loading : Result<Nothing>()
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @brief Map the success value using a transform function.
|
|
52
|
+
* @tparam R The target type after transformation.
|
|
53
|
+
* @param transform Function converting T to R.
|
|
54
|
+
* @return Transformed Result or original error/loading state.
|
|
55
|
+
*/
|
|
56
|
+
fun <R> map(transform: (T) -> R): Result<R> = when (this) {
|
|
57
|
+
is Success -> Success(transform(value))
|
|
58
|
+
is Error -> Error(message, cause)
|
|
59
|
+
is Loading -> Loading
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* ── Interface ────────────────────────────────────────────────────────── */
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @interface Repository
|
|
67
|
+
* @brief Generic CRUD repository interface.
|
|
68
|
+
* @tparam T Entity type managed by this repository.
|
|
69
|
+
*/
|
|
70
|
+
interface Repository<T> {
|
|
71
|
+
/**
|
|
72
|
+
* @brief Find an entity by its unique identifier.
|
|
73
|
+
* @param id Entity ID.
|
|
74
|
+
* @return The entity or null if not found.
|
|
75
|
+
*/
|
|
76
|
+
fun findById(id: Int): T?
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* @brief Persist an entity.
|
|
80
|
+
* @param entity The entity to save.
|
|
81
|
+
* @return True if save succeeded.
|
|
82
|
+
*/
|
|
83
|
+
fun save(entity: T): Boolean
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* @brief Retrieve all entities as a Flow stream.
|
|
87
|
+
* @return Flow emitting all stored entities.
|
|
88
|
+
*/
|
|
89
|
+
fun findAll(): Flow<T>
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* @interface Identifiable
|
|
94
|
+
* @brief Sealed interface requiring an ID property.
|
|
95
|
+
*/
|
|
96
|
+
sealed interface Identifiable {
|
|
97
|
+
/** @brief Unique entity identifier. */
|
|
98
|
+
val id: Int
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* ── Enum class ───────────────────────────────────────────────────────── */
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* @enum Color
|
|
105
|
+
* @brief Color enum with hex value property and companion factory.
|
|
106
|
+
*/
|
|
107
|
+
enum class Color(val hex: String) {
|
|
108
|
+
/** @brief Red color channel. */
|
|
109
|
+
RED("#FF0000"),
|
|
110
|
+
/** @brief Green color channel. */
|
|
111
|
+
GREEN("#00FF00"),
|
|
112
|
+
/** @brief Blue color channel. */
|
|
113
|
+
BLUE("#0000FF");
|
|
114
|
+
|
|
115
|
+
companion object {
|
|
116
|
+
/**
|
|
117
|
+
* @brief Parse a color from its hex string.
|
|
118
|
+
* @param hex Hex color code including '#' prefix.
|
|
119
|
+
* @return Matching Color or null.
|
|
120
|
+
*/
|
|
121
|
+
fun fromHex(hex: String): Color? = values().find { it.hex == hex }
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/* ── Data class implementing interface ────────────────────────────────── */
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* @class Entity
|
|
129
|
+
* @brief Data class combining Identifiable with named properties.
|
|
130
|
+
* @param id Unique identifier.
|
|
131
|
+
* @param name Entity display name.
|
|
132
|
+
* @param status Current lifecycle status.
|
|
133
|
+
*/
|
|
134
|
+
data class Entity(
|
|
135
|
+
override val id: Int,
|
|
136
|
+
val name: String,
|
|
137
|
+
val status: String = "active",
|
|
138
|
+
) : Identifiable
|
|
139
|
+
|
|
140
|
+
/* ── Value class (inline class) ───────────────────────────────────────── */
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* @class EmailAddress
|
|
144
|
+
* @brief Inline value class wrapping a validated email string.
|
|
145
|
+
* @param value The raw email address string.
|
|
146
|
+
*/
|
|
147
|
+
@JvmInline
|
|
148
|
+
value class EmailAddress(val value: String) {
|
|
149
|
+
init {
|
|
150
|
+
require(value.contains('@')) { "Invalid email: $value" }
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/** @brief Extract the domain part of the email. */
|
|
154
|
+
val domain: String get() = value.substringAfter('@')
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/* ── Functions ────────────────────────────────────────────────────────── */
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* @function greet
|
|
161
|
+
* @brief Greet a person by name.
|
|
162
|
+
* @param name The person's name.
|
|
163
|
+
* @return Greeting message string.
|
|
164
|
+
*/
|
|
165
|
+
fun greet(name: String): String {
|
|
166
|
+
return "Hello $name"
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* @function fetchData
|
|
171
|
+
* @brief Suspend function simulating async data retrieval.
|
|
172
|
+
* @return Retrieved data as a string.
|
|
173
|
+
*/
|
|
174
|
+
suspend fun fetchData(): String {
|
|
175
|
+
/* Simulate network delay */
|
|
176
|
+
return "data"
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* @function processItems
|
|
181
|
+
* @brief Higher-order function with trailing lambda syntax.
|
|
182
|
+
* @param items List of strings to process.
|
|
183
|
+
* @param transform Function applied to each item.
|
|
184
|
+
* @return List of transformed results.
|
|
185
|
+
*/
|
|
186
|
+
fun processItems(items: List<String>, transform: (String) -> String): List<String> {
|
|
187
|
+
return items.map(transform)
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/* ── Extension functions ──────────────────────────────────────────────── */
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* @brief Extension function adding word count to String.
|
|
194
|
+
* @receiver String The string to count words in.
|
|
195
|
+
* @return Number of whitespace-separated words.
|
|
196
|
+
*/
|
|
197
|
+
fun String.wordCount(): Int {
|
|
198
|
+
return this.trim().split("\\s+".toRegex()).size
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* @brief Extension property returning the last character or null.
|
|
203
|
+
* @receiver String The string to inspect.
|
|
204
|
+
*/
|
|
205
|
+
val String.lastChar: Char?
|
|
206
|
+
get() = if (this.isEmpty()) null else this[this.length - 1]
|
|
207
|
+
|
|
208
|
+
/* ── Inline function with reified type ────────────────────────────────── */
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* @function filterByType
|
|
212
|
+
* @brief Filter list elements by reified type parameter.
|
|
213
|
+
* @tparam T The target type to filter for.
|
|
214
|
+
* @param items Mixed list to filter.
|
|
215
|
+
* @return List containing only elements of type T.
|
|
216
|
+
*/
|
|
217
|
+
inline fun <reified T> filterByType(items: List<Any>): List<T> {
|
|
218
|
+
return items.filterIsInstance<T>()
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/* ── Operator overloading ─────────────────────────────────────────────── */
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* @class Vector2
|
|
225
|
+
* @brief 2D vector with operator overloading for arithmetic.
|
|
226
|
+
* @param x Horizontal component.
|
|
227
|
+
* @param y Vertical component.
|
|
228
|
+
*/
|
|
229
|
+
data class Vector2(val x: Double, val y: Double) {
|
|
230
|
+
/**
|
|
231
|
+
* @brief Add two vectors component-wise.
|
|
232
|
+
* @param other The vector to add.
|
|
233
|
+
* @return Resulting sum vector.
|
|
234
|
+
*/
|
|
235
|
+
operator fun plus(other: Vector2) = Vector2(x + other.x, y + other.y)
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* @brief Negate the vector (unary minus).
|
|
239
|
+
* @return Vector with negated components.
|
|
240
|
+
*/
|
|
241
|
+
operator fun unaryMinus() = Vector2(-x, -y)
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* @brief Compute dot product via times operator.
|
|
245
|
+
* @param other The other vector.
|
|
246
|
+
* @return Scalar dot product.
|
|
247
|
+
*/
|
|
248
|
+
operator fun times(other: Vector2) = x * other.x + y * other.y
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/* ── Constants and variables ──────────────────────────────────────────── */
|
|
252
|
+
|
|
253
|
+
/** @brief Mathematical constant Pi. */
|
|
254
|
+
val PI = 3.14159265
|
|
255
|
+
|
|
256
|
+
/** @brief Mutable package-level counter. */
|
|
257
|
+
var counter = 0
|
|
258
|
+
|
|
259
|
+
/* ── Object (singleton) ───────────────────────────────────────────────── */
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* @object Singleton
|
|
263
|
+
* @brief Application-wide singleton for configuration management.
|
|
264
|
+
*/
|
|
265
|
+
object Singleton {
|
|
266
|
+
/** @brief Mutable configuration map. */
|
|
267
|
+
private val config = mutableMapOf<String, Any>()
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* @brief Store a configuration value.
|
|
271
|
+
* @param key Configuration key.
|
|
272
|
+
* @param value Configuration value.
|
|
273
|
+
*/
|
|
274
|
+
fun set(key: String, value: Any) {
|
|
275
|
+
config[key] = value
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* @brief Retrieve a typed configuration value.
|
|
280
|
+
* @tparam T Expected value type.
|
|
281
|
+
* @param key Configuration key.
|
|
282
|
+
* @return The value cast to T, or null.
|
|
283
|
+
*/
|
|
284
|
+
@Suppress("UNCHECKED_CAST")
|
|
285
|
+
fun <T> get(key: String): T? = config[key] as? T
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* @object Factory
|
|
290
|
+
* @brief Companion object pattern for factory construction.
|
|
291
|
+
*/
|
|
292
|
+
companion object Factory {
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/* ── Delegation ───────────────────────────────────────────────────────── */
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* @class DelegatingList
|
|
299
|
+
* @brief List implementation delegating to an inner mutable list.
|
|
300
|
+
* @tparam T Element type.
|
|
301
|
+
* @param inner The backing list.
|
|
302
|
+
*/
|
|
303
|
+
class DelegatingList<T>(private val inner: MutableList<T>) : List<T> by inner {
|
|
304
|
+
/** @brief Count of accesses to the delegated list. */
|
|
305
|
+
var accessCount = 0
|
|
306
|
+
private set
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* @brief Override size to track access and delegate.
|
|
310
|
+
*/
|
|
311
|
+
override val size: Int
|
|
312
|
+
get() {
|
|
313
|
+
accessCount++
|
|
314
|
+
return inner.size
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/* ── Class with lateinit ──────────────────────────────────────────────── */
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* @class Service
|
|
322
|
+
* @brief Service class demonstrating lateinit and lazy initialization.
|
|
323
|
+
*/
|
|
324
|
+
class Service {
|
|
325
|
+
/** @brief Late-initialized dependency, set after construction. */
|
|
326
|
+
lateinit var dependency: Repository<Entity>
|
|
327
|
+
|
|
328
|
+
/** @brief Lazily computed expensive resource. */
|
|
329
|
+
val resource: String by lazy {
|
|
330
|
+
/* Computed on first access */
|
|
331
|
+
"expensive_resource"
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* @brief Check if the dependency has been initialized.
|
|
336
|
+
* @return True if dependency is set.
|
|
337
|
+
*/
|
|
338
|
+
fun isReady(): Boolean = ::dependency.isInitialized
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/* ── DSL builder pattern ──────────────────────────────────────────────── */
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* @class HtmlBuilder
|
|
345
|
+
* @brief Simple DSL for building HTML strings.
|
|
346
|
+
*/
|
|
347
|
+
class HtmlBuilder {
|
|
348
|
+
private val elements = mutableListOf<String>()
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* @brief Add a div element with content from a lambda.
|
|
352
|
+
* @param block Lambda providing the div content.
|
|
353
|
+
*/
|
|
354
|
+
fun div(block: HtmlBuilder.() -> Unit) {
|
|
355
|
+
val inner = HtmlBuilder()
|
|
356
|
+
inner.block()
|
|
357
|
+
elements.add("<div>${inner.build()}</div>")
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* @brief Add a text node.
|
|
362
|
+
* @param text The text content.
|
|
363
|
+
*/
|
|
364
|
+
fun text(text: String) {
|
|
365
|
+
elements.add(text)
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* @brief Build the accumulated HTML string.
|
|
370
|
+
* @return Concatenated HTML output.
|
|
371
|
+
*/
|
|
372
|
+
fun build(): String = elements.joinToString("")
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* @function html
|
|
377
|
+
* @brief DSL entry point for building HTML content.
|
|
378
|
+
* @param block Builder lambda receiving HtmlBuilder scope.
|
|
379
|
+
* @return Complete HTML string.
|
|
380
|
+
*/
|
|
381
|
+
fun html(block: HtmlBuilder.() -> Unit): String {
|
|
382
|
+
val builder = HtmlBuilder()
|
|
383
|
+
builder.block()
|
|
384
|
+
return builder.build()
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
/* coverage extension block */
|
|
388
|
+
import kotlin.math.max
|
|
389
|
+
import kotlin.math.min
|
|
390
|
+
interface Logger
|
|
391
|
+
interface Parser
|
|
392
|
+
interface Emitter
|
|
393
|
+
interface Formatter
|
|
394
|
+
enum class ModeKt { FAST, SAFE }
|
|
395
|
+
enum class PhaseKt { INIT, RUN }
|
|
396
|
+
enum class StatusKt { READY, WAITING }
|
|
397
|
+
enum class SignalKt { ON, OFF }
|
|
398
|
+
@Synchronized
|
|
399
|
+
@PublishedApi
|
|
400
|
+
object CacheStore
|
|
401
|
+
var retries = 0
|
|
402
|
+
var attempts = 0
|
|
403
|
+
var state = "idle"
|
|
404
|
+
|
|
405
|
+
/* REQ-COVER-SRS-231 START */
|
|
406
|
+
/**
|
|
407
|
+
* @REQ-COVER-SRS-231 block 1
|
|
408
|
+
* @brief Coverage helper construct 1.
|
|
409
|
+
* @details Provides deterministic fixture-level Doxygen coverage block 1.
|
|
410
|
+
* @param value Input value for helper construct 1.
|
|
411
|
+
* @return Output value for helper construct 1.
|
|
412
|
+
*/
|
|
413
|
+
fun reqCoverKotlin1(value: Int): Int = value + 1
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* @REQ-COVER-SRS-231 block 2
|
|
417
|
+
* @brief Coverage helper construct 2.
|
|
418
|
+
* @details Provides deterministic fixture-level Doxygen coverage block 2.
|
|
419
|
+
* @param value Input value for helper construct 2.
|
|
420
|
+
* @return Output value for helper construct 2.
|
|
421
|
+
*/
|
|
422
|
+
fun reqCoverKotlin2(value: Int): Int = value + 2
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* @REQ-COVER-SRS-231 block 3
|
|
426
|
+
* @brief Coverage helper construct 3.
|
|
427
|
+
* @details Provides deterministic fixture-level Doxygen coverage block 3.
|
|
428
|
+
* @param value Input value for helper construct 3.
|
|
429
|
+
* @return Output value for helper construct 3.
|
|
430
|
+
*/
|
|
431
|
+
fun reqCoverKotlin3(value: Int): Int = value + 3
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* @REQ-COVER-SRS-231 block 4
|
|
435
|
+
* @brief Coverage helper construct 4.
|
|
436
|
+
* @details Provides deterministic fixture-level Doxygen coverage block 4.
|
|
437
|
+
* @param value Input value for helper construct 4.
|
|
438
|
+
* @return Output value for helper construct 4.
|
|
439
|
+
*/
|
|
440
|
+
fun reqCoverKotlin4(value: Int): Int = value + 4
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* @REQ-COVER-SRS-231 block 5
|
|
444
|
+
* @brief Coverage helper construct 5.
|
|
445
|
+
* @details Provides deterministic fixture-level Doxygen coverage block 5.
|
|
446
|
+
* @param value Input value for helper construct 5.
|
|
447
|
+
* @return Output value for helper construct 5.
|
|
448
|
+
*/
|
|
449
|
+
fun reqCoverKotlin5(value: Int): Int = value + 5
|
|
450
|
+
|
|
451
|
+
/* REQ-COVER-SRS-231 END */
|