pi-usereq 0.49.0 → 0.51.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (940) hide show
  1. package/README.md +1 -1
  2. package/package.json +5 -1
  3. package/scripts/lib/extension-debug-harness.ts +443 -0
  4. package/scripts/lib/recording-extension-api.ts +855 -0
  5. package/scripts/lib/sdk-smoke.ts +503 -0
  6. package/src/core/extension-status.ts +13 -4
  7. package/src/index.ts +105 -71
  8. package/.g.conf +0 -16
  9. package/.github/workflows/release-npm.yml +0 -134
  10. package/.gitignore +0 -274
  11. package/CHANGELOG.md +0 -706
  12. package/TODO.md +0 -20
  13. package/docs/pi.dev/agent-document-manifest.json +0 -6399
  14. package/docs/pi.dev/coding-agent-docs/compaction.md +0 -394
  15. package/docs/pi.dev/coding-agent-docs/custom-provider.md +0 -637
  16. package/docs/pi.dev/coding-agent-docs/development.md +0 -71
  17. package/docs/pi.dev/coding-agent-docs/extensions.md +0 -2536
  18. package/docs/pi.dev/coding-agent-docs/images/doom-extension.png +0 -0
  19. package/docs/pi.dev/coding-agent-docs/images/exy.png +0 -0
  20. package/docs/pi.dev/coding-agent-docs/images/interactive-mode.png +0 -0
  21. package/docs/pi.dev/coding-agent-docs/images/tree-view.png +0 -0
  22. package/docs/pi.dev/coding-agent-docs/json.md +0 -82
  23. package/docs/pi.dev/coding-agent-docs/keybindings.md +0 -197
  24. package/docs/pi.dev/coding-agent-docs/models.md +0 -395
  25. package/docs/pi.dev/coding-agent-docs/packages.md +0 -218
  26. package/docs/pi.dev/coding-agent-docs/prompt-templates.md +0 -88
  27. package/docs/pi.dev/coding-agent-docs/providers.md +0 -196
  28. package/docs/pi.dev/coding-agent-docs/rpc.md +0 -1407
  29. package/docs/pi.dev/coding-agent-docs/sdk.md +0 -1149
  30. package/docs/pi.dev/coding-agent-docs/session.md +0 -412
  31. package/docs/pi.dev/coding-agent-docs/settings.md +0 -248
  32. package/docs/pi.dev/coding-agent-docs/shell-aliases.md +0 -13
  33. package/docs/pi.dev/coding-agent-docs/skills.md +0 -232
  34. package/docs/pi.dev/coding-agent-docs/terminal-setup.md +0 -106
  35. package/docs/pi.dev/coding-agent-docs/termux.md +0 -127
  36. package/docs/pi.dev/coding-agent-docs/themes.md +0 -295
  37. package/docs/pi.dev/coding-agent-docs/tmux.md +0 -61
  38. package/docs/pi.dev/coding-agent-docs/tree.md +0 -233
  39. package/docs/pi.dev/coding-agent-docs/tui.md +0 -918
  40. package/docs/pi.dev/coding-agent-docs/windows.md +0 -17
  41. package/docs/pi.dev/mom-docs/artifacts-server.md +0 -475
  42. package/docs/pi.dev/mom-docs/events.md +0 -307
  43. package/docs/pi.dev/mom-docs/new.md +0 -970
  44. package/docs/pi.dev/mom-docs/sandbox.md +0 -153
  45. package/docs/pi.dev/mom-docs/slack-bot-minimal-guide.md +0 -399
  46. package/docs/pi.dev/mom-docs/v86.md +0 -319
  47. package/docs/pi.dev/pods-docs/gml-4.5.md +0 -189
  48. package/docs/pi.dev/pods-docs/gpt-oss.md +0 -233
  49. package/docs/pi.dev/pods-docs/implementation-plan.md +0 -183
  50. package/docs/pi.dev/pods-docs/kimi-k2.md +0 -197
  51. package/docs/pi.dev/pods-docs/models.md +0 -116
  52. package/docs/pi.dev/pods-docs/plan.md +0 -166
  53. package/docs/pi.dev/pods-docs/qwen3-coder.md +0 -132
  54. package/images/flowchart-bw.png +0 -0
  55. package/images/flowchart-bw.svg +0 -102
  56. package/images/flowchart.md +0 -100
  57. package/images/flowchart.png +0 -0
  58. package/images/flowchart.svg +0 -3
  59. package/pi-usereq/docs/REFERENCES.md +0 -5713
  60. package/pi-usereq/docs/REQUIREMENTS.md +0 -781
  61. package/pi-usereq/docs/WORKFLOW.md +0 -1341
  62. package/pi.dev-src/pi-mono/agent/src/agent-loop.ts +0 -683
  63. package/pi.dev-src/pi-mono/agent/src/agent.ts +0 -543
  64. package/pi.dev-src/pi-mono/agent/src/index.ts +0 -8
  65. package/pi.dev-src/pi-mono/agent/src/proxy.ts +0 -367
  66. package/pi.dev-src/pi-mono/agent/src/types.ts +0 -364
  67. package/pi.dev-src/pi-mono/agent/test/agent-loop.test.ts +0 -1181
  68. package/pi.dev-src/pi-mono/agent/test/agent.test.ts +0 -463
  69. package/pi.dev-src/pi-mono/agent/test/e2e.test.ts +0 -404
  70. package/pi.dev-src/pi-mono/agent/test/utils/calculate.ts +0 -32
  71. package/pi.dev-src/pi-mono/agent/test/utils/get-current-time.ts +0 -46
  72. package/pi.dev-src/pi-mono/agent/vitest.config.ts +0 -9
  73. package/pi.dev-src/pi-mono/ai/bedrock-provider.d.ts +0 -1
  74. package/pi.dev-src/pi-mono/ai/bedrock-provider.js +0 -1
  75. package/pi.dev-src/pi-mono/ai/scripts/generate-models.ts +0 -1635
  76. package/pi.dev-src/pi-mono/ai/scripts/generate-test-image.ts +0 -34
  77. package/pi.dev-src/pi-mono/ai/src/api-registry.ts +0 -98
  78. package/pi.dev-src/pi-mono/ai/src/bedrock-provider.ts +0 -6
  79. package/pi.dev-src/pi-mono/ai/src/cli.ts +0 -133
  80. package/pi.dev-src/pi-mono/ai/src/env-api-keys.ts +0 -134
  81. package/pi.dev-src/pi-mono/ai/src/index.ts +0 -35
  82. package/pi.dev-src/pi-mono/ai/src/models.generated.ts +0 -14928
  83. package/pi.dev-src/pi-mono/ai/src/models.ts +0 -82
  84. package/pi.dev-src/pi-mono/ai/src/oauth.ts +0 -1
  85. package/pi.dev-src/pi-mono/ai/src/providers/amazon-bedrock.ts +0 -929
  86. package/pi.dev-src/pi-mono/ai/src/providers/anthropic.ts +0 -1125
  87. package/pi.dev-src/pi-mono/ai/src/providers/azure-openai-responses.ts +0 -253
  88. package/pi.dev-src/pi-mono/ai/src/providers/faux.ts +0 -499
  89. package/pi.dev-src/pi-mono/ai/src/providers/github-copilot-headers.ts +0 -37
  90. package/pi.dev-src/pi-mono/ai/src/providers/google-gemini-cli.ts +0 -996
  91. package/pi.dev-src/pi-mono/ai/src/providers/google-shared.ts +0 -354
  92. package/pi.dev-src/pi-mono/ai/src/providers/google-vertex.ts +0 -543
  93. package/pi.dev-src/pi-mono/ai/src/providers/google.ts +0 -500
  94. package/pi.dev-src/pi-mono/ai/src/providers/mistral.ts +0 -629
  95. package/pi.dev-src/pi-mono/ai/src/providers/openai-codex-responses.ts +0 -984
  96. package/pi.dev-src/pi-mono/ai/src/providers/openai-completions.ts +0 -1063
  97. package/pi.dev-src/pi-mono/ai/src/providers/openai-responses-shared.ts +0 -539
  98. package/pi.dev-src/pi-mono/ai/src/providers/openai-responses.ts +0 -264
  99. package/pi.dev-src/pi-mono/ai/src/providers/register-builtins.ts +0 -433
  100. package/pi.dev-src/pi-mono/ai/src/providers/simple-options.ts +0 -47
  101. package/pi.dev-src/pi-mono/ai/src/providers/transform-messages.ts +0 -220
  102. package/pi.dev-src/pi-mono/ai/src/stream.ts +0 -59
  103. package/pi.dev-src/pi-mono/ai/src/types.ts +0 -417
  104. package/pi.dev-src/pi-mono/ai/src/utils/event-stream.ts +0 -87
  105. package/pi.dev-src/pi-mono/ai/src/utils/hash.ts +0 -13
  106. package/pi.dev-src/pi-mono/ai/src/utils/headers.ts +0 -7
  107. package/pi.dev-src/pi-mono/ai/src/utils/json-parse.ts +0 -124
  108. package/pi.dev-src/pi-mono/ai/src/utils/overflow.ts +0 -138
  109. package/pi.dev-src/pi-mono/ai/src/utils/sanitize-unicode.ts +0 -25
  110. package/pi.dev-src/pi-mono/ai/src/utils/typebox-helpers.ts +0 -24
  111. package/pi.dev-src/pi-mono/ai/src/utils/validation.ts +0 -324
  112. package/pi.dev-src/pi-mono/ai/test/abort.test.ts +0 -260
  113. package/pi.dev-src/pi-mono/ai/test/anthropic-oauth.test.ts +0 -99
  114. package/pi.dev-src/pi-mono/ai/test/anthropic-opus-4-7-smoke.test.ts +0 -72
  115. package/pi.dev-src/pi-mono/ai/test/anthropic-sse-parsing.test.ts +0 -113
  116. package/pi.dev-src/pi-mono/ai/test/anthropic-thinking-disable.test.ts +0 -152
  117. package/pi.dev-src/pi-mono/ai/test/anthropic-tool-name-normalization.test.ts +0 -205
  118. package/pi.dev-src/pi-mono/ai/test/azure-utils.ts +0 -28
  119. package/pi.dev-src/pi-mono/ai/test/bedrock-endpoint-resolution.test.ts +0 -131
  120. package/pi.dev-src/pi-mono/ai/test/bedrock-models.test.ts +0 -66
  121. package/pi.dev-src/pi-mono/ai/test/bedrock-thinking-payload.test.ts +0 -107
  122. package/pi.dev-src/pi-mono/ai/test/bedrock-utils.ts +0 -18
  123. package/pi.dev-src/pi-mono/ai/test/cache-retention.test.ts +0 -335
  124. package/pi.dev-src/pi-mono/ai/test/context-overflow.test.ts +0 -714
  125. package/pi.dev-src/pi-mono/ai/test/cross-provider-handoff.test.ts +0 -458
  126. package/pi.dev-src/pi-mono/ai/test/data/red-circle.png +0 -0
  127. package/pi.dev-src/pi-mono/ai/test/empty.test.ts +0 -742
  128. package/pi.dev-src/pi-mono/ai/test/faux-provider.test.ts +0 -597
  129. package/pi.dev-src/pi-mono/ai/test/fireworks-models.test.ts +0 -49
  130. package/pi.dev-src/pi-mono/ai/test/github-copilot-anthropic.test.ts +0 -108
  131. package/pi.dev-src/pi-mono/ai/test/github-copilot-oauth.test.ts +0 -196
  132. package/pi.dev-src/pi-mono/ai/test/google-gemini-cli-claude-thinking-header.test.ts +0 -103
  133. package/pi.dev-src/pi-mono/ai/test/google-gemini-cli-empty-stream.test.ts +0 -108
  134. package/pi.dev-src/pi-mono/ai/test/google-gemini-cli-retry-delay.test.ts +0 -53
  135. package/pi.dev-src/pi-mono/ai/test/google-shared-convert-tools.test.ts +0 -187
  136. package/pi.dev-src/pi-mono/ai/test/google-shared-gemini3-unsigned-tool-call.test.ts +0 -172
  137. package/pi.dev-src/pi-mono/ai/test/google-shared-image-tool-result-routing.test.ts +0 -124
  138. package/pi.dev-src/pi-mono/ai/test/google-thinking-disable.test.ts +0 -183
  139. package/pi.dev-src/pi-mono/ai/test/google-thinking-signature.test.ts +0 -38
  140. package/pi.dev-src/pi-mono/ai/test/google-tool-call-missing-args.test.ts +0 -105
  141. package/pi.dev-src/pi-mono/ai/test/google-vertex-api-key-resolution.test.ts +0 -144
  142. package/pi.dev-src/pi-mono/ai/test/image-tool-result.test.ts +0 -481
  143. package/pi.dev-src/pi-mono/ai/test/interleaved-thinking.test.ts +0 -145
  144. package/pi.dev-src/pi-mono/ai/test/lazy-module-load.test.ts +0 -102
  145. package/pi.dev-src/pi-mono/ai/test/mistral-reasoning-mode.test.ts +0 -66
  146. package/pi.dev-src/pi-mono/ai/test/mistral-tool-schema.test.ts +0 -61
  147. package/pi.dev-src/pi-mono/ai/test/oauth.ts +0 -89
  148. package/pi.dev-src/pi-mono/ai/test/openai-codex-cache-affinity-e2e.test.ts +0 -36
  149. package/pi.dev-src/pi-mono/ai/test/openai-codex-stream.test.ts +0 -686
  150. package/pi.dev-src/pi-mono/ai/test/openai-completions-cache-control-format.test.ts +0 -189
  151. package/pi.dev-src/pi-mono/ai/test/openai-completions-prompt-cache.test.ts +0 -198
  152. package/pi.dev-src/pi-mono/ai/test/openai-completions-thinking-as-text.test.ts +0 -214
  153. package/pi.dev-src/pi-mono/ai/test/openai-completions-tool-choice.test.ts +0 -560
  154. package/pi.dev-src/pi-mono/ai/test/openai-completions-tool-result-images.test.ts +0 -101
  155. package/pi.dev-src/pi-mono/ai/test/openai-responses-cache-affinity-e2e.test.ts +0 -32
  156. package/pi.dev-src/pi-mono/ai/test/openai-responses-copilot-provider.test.ts +0 -128
  157. package/pi.dev-src/pi-mono/ai/test/openai-responses-foreign-toolcall-id.test.ts +0 -66
  158. package/pi.dev-src/pi-mono/ai/test/openai-responses-partial-json-cleanup.test.ts +0 -101
  159. package/pi.dev-src/pi-mono/ai/test/openai-responses-reasoning-replay-e2e.test.ts +0 -292
  160. package/pi.dev-src/pi-mono/ai/test/openai-responses-tool-result-images.test.ts +0 -200
  161. package/pi.dev-src/pi-mono/ai/test/openrouter-cache-write-repro.test.ts +0 -78
  162. package/pi.dev-src/pi-mono/ai/test/overflow.test.ts +0 -64
  163. package/pi.dev-src/pi-mono/ai/test/responseid.test.ts +0 -145
  164. package/pi.dev-src/pi-mono/ai/test/stream.test.ts +0 -1405
  165. package/pi.dev-src/pi-mono/ai/test/supports-xhigh.test.ts +0 -34
  166. package/pi.dev-src/pi-mono/ai/test/tokens.test.ts +0 -304
  167. package/pi.dev-src/pi-mono/ai/test/tool-call-id-normalization.test.ts +0 -291
  168. package/pi.dev-src/pi-mono/ai/test/tool-call-without-result.test.ts +0 -313
  169. package/pi.dev-src/pi-mono/ai/test/total-tokens.test.ts +0 -695
  170. package/pi.dev-src/pi-mono/ai/test/transform-messages-copilot-openai-to-anthropic.test.ts +0 -191
  171. package/pi.dev-src/pi-mono/ai/test/unicode-surrogate.test.ts +0 -754
  172. package/pi.dev-src/pi-mono/ai/test/validation.test.ts +0 -116
  173. package/pi.dev-src/pi-mono/ai/test/xhigh.test.ts +0 -71
  174. package/pi.dev-src/pi-mono/ai/test/zen.test.ts +0 -25
  175. package/pi.dev-src/pi-mono/ai/vitest.config.ts +0 -9
  176. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/antigravity-image-gen.ts +0 -418
  177. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/auto-commit-on-exit.ts +0 -49
  178. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/bash-spawn-hook.ts +0 -30
  179. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/bookmark.ts +0 -50
  180. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/built-in-tool-renderer.ts +0 -249
  181. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/claude-rules.ts +0 -86
  182. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/commands.ts +0 -72
  183. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/confirm-destructive.ts +0 -59
  184. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/custom-compaction.ts +0 -127
  185. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/custom-footer.ts +0 -64
  186. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/custom-header.ts +0 -73
  187. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/custom-provider-anthropic/index.ts +0 -604
  188. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/custom-provider-anthropic/package-lock.json +0 -24
  189. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/custom-provider-gitlab-duo/index.ts +0 -349
  190. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/custom-provider-gitlab-duo/test.ts +0 -82
  191. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/custom-provider-qwen-cli/index.ts +0 -345
  192. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/dirty-repo-guard.ts +0 -56
  193. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/doom-overlay/doom/build.sh +0 -152
  194. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/doom-overlay/doom/doomgeneric_pi.c +0 -72
  195. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/doom-overlay/doom-component.ts +0 -132
  196. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/doom-overlay/doom-engine.ts +0 -173
  197. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/doom-overlay/doom-keys.ts +0 -104
  198. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/doom-overlay/index.ts +0 -74
  199. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/doom-overlay/wad-finder.ts +0 -51
  200. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/dynamic-resources/SKILL.md +0 -8
  201. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/dynamic-resources/dynamic.json +0 -79
  202. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/dynamic-resources/dynamic.md +0 -5
  203. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/dynamic-resources/index.ts +0 -15
  204. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/dynamic-tools.ts +0 -74
  205. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/event-bus.ts +0 -43
  206. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/file-trigger.ts +0 -41
  207. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/git-checkpoint.ts +0 -53
  208. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/github-issue-autocomplete.ts +0 -185
  209. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/handoff.ts +0 -153
  210. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/hello.ts +0 -26
  211. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/hidden-thinking-label.ts +0 -53
  212. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/inline-bash.ts +0 -94
  213. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/input-transform.ts +0 -43
  214. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/interactive-shell.ts +0 -196
  215. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/mac-system-theme.ts +0 -47
  216. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/message-renderer.ts +0 -59
  217. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/minimal-mode.ts +0 -426
  218. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/modal-editor.ts +0 -85
  219. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/model-status.ts +0 -31
  220. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/notify.ts +0 -55
  221. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/overlay-qa-tests.ts +0 -1348
  222. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/overlay-test.ts +0 -150
  223. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/permission-gate.ts +0 -34
  224. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/pirate.ts +0 -47
  225. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/plan-mode/index.ts +0 -340
  226. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/plan-mode/utils.ts +0 -168
  227. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/preset.ts +0 -430
  228. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/prompt-customizer.ts +0 -97
  229. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/protected-paths.ts +0 -30
  230. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/provider-payload.ts +0 -18
  231. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/qna.ts +0 -122
  232. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/question.ts +0 -264
  233. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/questionnaire.ts +0 -427
  234. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/rainbow-editor.ts +0 -88
  235. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/reload-runtime.ts +0 -37
  236. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/rpc-demo.ts +0 -118
  237. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/sandbox/index.ts +0 -321
  238. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/sandbox/package-lock.json +0 -92
  239. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/send-user-message.ts +0 -97
  240. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/session-name.ts +0 -27
  241. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/shutdown-command.ts +0 -63
  242. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/snake.ts +0 -343
  243. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/space-invaders.ts +0 -560
  244. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/ssh.ts +0 -220
  245. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/status-line.ts +0 -32
  246. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/structured-output.ts +0 -65
  247. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/subagent/agents/planner.md +0 -37
  248. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/subagent/agents/reviewer.md +0 -35
  249. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/subagent/agents/scout.md +0 -50
  250. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/subagent/agents/worker.md +0 -24
  251. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/subagent/agents.ts +0 -126
  252. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/subagent/index.ts +0 -987
  253. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/subagent/prompts/implement-and-review.md +0 -10
  254. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/subagent/prompts/implement.md +0 -10
  255. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/subagent/prompts/scout-and-plan.md +0 -9
  256. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/summarize.ts +0 -206
  257. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/system-prompt-header.ts +0 -17
  258. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/tic-tac-toe.ts +0 -1008
  259. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/timed-confirm.ts +0 -70
  260. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/titlebar-spinner.ts +0 -58
  261. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/todo.ts +0 -297
  262. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/tool-override.ts +0 -144
  263. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/tools.ts +0 -141
  264. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/trigger-compact.ts +0 -50
  265. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/truncated-tool.ts +0 -195
  266. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/widget-placement.ts +0 -9
  267. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/with-deps/index.ts +0 -32
  268. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/with-deps/package-lock.json +0 -31
  269. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/working-indicator.ts +0 -123
  270. package/pi.dev-src/pi-mono/coding-agent/examples/extensions/working-message-test.ts +0 -25
  271. package/pi.dev-src/pi-mono/coding-agent/examples/rpc-extension-ui.ts +0 -632
  272. package/pi.dev-src/pi-mono/coding-agent/examples/sdk/01-minimal.ts +0 -22
  273. package/pi.dev-src/pi-mono/coding-agent/examples/sdk/02-custom-model.ts +0 -49
  274. package/pi.dev-src/pi-mono/coding-agent/examples/sdk/03-custom-prompt.ts +0 -62
  275. package/pi.dev-src/pi-mono/coding-agent/examples/sdk/04-skills.ts +0 -55
  276. package/pi.dev-src/pi-mono/coding-agent/examples/sdk/05-tools.ts +0 -44
  277. package/pi.dev-src/pi-mono/coding-agent/examples/sdk/06-extensions.ts +0 -90
  278. package/pi.dev-src/pi-mono/coding-agent/examples/sdk/07-context-files.ts +0 -42
  279. package/pi.dev-src/pi-mono/coding-agent/examples/sdk/08-prompt-templates.ts +0 -51
  280. package/pi.dev-src/pi-mono/coding-agent/examples/sdk/09-api-keys-and-oauth.ts +0 -48
  281. package/pi.dev-src/pi-mono/coding-agent/examples/sdk/10-settings.ts +0 -53
  282. package/pi.dev-src/pi-mono/coding-agent/examples/sdk/11-sessions.ts +0 -48
  283. package/pi.dev-src/pi-mono/coding-agent/examples/sdk/12-full-control.ts +0 -73
  284. package/pi.dev-src/pi-mono/coding-agent/examples/sdk/13-session-runtime.ts +0 -67
  285. package/pi.dev-src/pi-mono/coding-agent/scripts/migrate-sessions.sh +0 -93
  286. package/pi.dev-src/pi-mono/coding-agent/src/bun/cli.ts +0 -6
  287. package/pi.dev-src/pi-mono/coding-agent/src/bun/register-bedrock.ts +0 -4
  288. package/pi.dev-src/pi-mono/coding-agent/src/cli/args.ts +0 -335
  289. package/pi.dev-src/pi-mono/coding-agent/src/cli/config-selector.ts +0 -52
  290. package/pi.dev-src/pi-mono/coding-agent/src/cli/file-processor.ts +0 -100
  291. package/pi.dev-src/pi-mono/coding-agent/src/cli/initial-message.ts +0 -43
  292. package/pi.dev-src/pi-mono/coding-agent/src/cli/list-models.ts +0 -110
  293. package/pi.dev-src/pi-mono/coding-agent/src/cli/session-picker.ts +0 -52
  294. package/pi.dev-src/pi-mono/coding-agent/src/cli.ts +0 -17
  295. package/pi.dev-src/pi-mono/coding-agent/src/config.ts +0 -261
  296. package/pi.dev-src/pi-mono/coding-agent/src/core/agent-session-runtime.ts +0 -394
  297. package/pi.dev-src/pi-mono/coding-agent/src/core/agent-session-services.ts +0 -196
  298. package/pi.dev-src/pi-mono/coding-agent/src/core/agent-session.ts +0 -3096
  299. package/pi.dev-src/pi-mono/coding-agent/src/core/auth-storage.ts +0 -493
  300. package/pi.dev-src/pi-mono/coding-agent/src/core/bash-executor.ts +0 -154
  301. package/pi.dev-src/pi-mono/coding-agent/src/core/compaction/branch-summarization.ts +0 -355
  302. package/pi.dev-src/pi-mono/coding-agent/src/core/compaction/compaction.ts +0 -839
  303. package/pi.dev-src/pi-mono/coding-agent/src/core/compaction/index.ts +0 -7
  304. package/pi.dev-src/pi-mono/coding-agent/src/core/compaction/utils.ts +0 -170
  305. package/pi.dev-src/pi-mono/coding-agent/src/core/defaults.ts +0 -3
  306. package/pi.dev-src/pi-mono/coding-agent/src/core/diagnostics.ts +0 -15
  307. package/pi.dev-src/pi-mono/coding-agent/src/core/event-bus.ts +0 -33
  308. package/pi.dev-src/pi-mono/coding-agent/src/core/exec.ts +0 -107
  309. package/pi.dev-src/pi-mono/coding-agent/src/core/export-html/ansi-to-html.ts +0 -258
  310. package/pi.dev-src/pi-mono/coding-agent/src/core/export-html/index.ts +0 -314
  311. package/pi.dev-src/pi-mono/coding-agent/src/core/export-html/template.css +0 -1017
  312. package/pi.dev-src/pi-mono/coding-agent/src/core/export-html/template.html +0 -55
  313. package/pi.dev-src/pi-mono/coding-agent/src/core/export-html/template.js +0 -1770
  314. package/pi.dev-src/pi-mono/coding-agent/src/core/export-html/tool-renderer.ts +0 -158
  315. package/pi.dev-src/pi-mono/coding-agent/src/core/export-html/vendor/highlight.min.js +0 -1213
  316. package/pi.dev-src/pi-mono/coding-agent/src/core/export-html/vendor/marked.min.js +0 -6
  317. package/pi.dev-src/pi-mono/coding-agent/src/core/extensions/index.ts +0 -171
  318. package/pi.dev-src/pi-mono/coding-agent/src/core/extensions/loader.ts +0 -606
  319. package/pi.dev-src/pi-mono/coding-agent/src/core/extensions/runner.ts +0 -1019
  320. package/pi.dev-src/pi-mono/coding-agent/src/core/extensions/types.ts +0 -1542
  321. package/pi.dev-src/pi-mono/coding-agent/src/core/extensions/wrapper.ts +0 -30
  322. package/pi.dev-src/pi-mono/coding-agent/src/core/footer-data-provider.ts +0 -354
  323. package/pi.dev-src/pi-mono/coding-agent/src/core/index.ts +0 -77
  324. package/pi.dev-src/pi-mono/coding-agent/src/core/keybindings.ts +0 -370
  325. package/pi.dev-src/pi-mono/coding-agent/src/core/messages.ts +0 -195
  326. package/pi.dev-src/pi-mono/coding-agent/src/core/model-registry.ts +0 -858
  327. package/pi.dev-src/pi-mono/coding-agent/src/core/model-resolver.ts +0 -629
  328. package/pi.dev-src/pi-mono/coding-agent/src/core/output-guard.ts +0 -74
  329. package/pi.dev-src/pi-mono/coding-agent/src/core/package-manager.ts +0 -2408
  330. package/pi.dev-src/pi-mono/coding-agent/src/core/prompt-templates.ts +0 -296
  331. package/pi.dev-src/pi-mono/coding-agent/src/core/resolve-config-value.ts +0 -142
  332. package/pi.dev-src/pi-mono/coding-agent/src/core/resource-loader.ts +0 -917
  333. package/pi.dev-src/pi-mono/coding-agent/src/core/sdk.ts +0 -380
  334. package/pi.dev-src/pi-mono/coding-agent/src/core/session-cwd.ts +0 -59
  335. package/pi.dev-src/pi-mono/coding-agent/src/core/session-manager.ts +0 -1425
  336. package/pi.dev-src/pi-mono/coding-agent/src/core/settings-manager.ts +0 -999
  337. package/pi.dev-src/pi-mono/coding-agent/src/core/skills.ts +0 -508
  338. package/pi.dev-src/pi-mono/coding-agent/src/core/slash-commands.ts +0 -39
  339. package/pi.dev-src/pi-mono/coding-agent/src/core/source-info.ts +0 -40
  340. package/pi.dev-src/pi-mono/coding-agent/src/core/system-prompt.ts +0 -172
  341. package/pi.dev-src/pi-mono/coding-agent/src/core/telemetry.ts +0 -13
  342. package/pi.dev-src/pi-mono/coding-agent/src/core/timings.ts +0 -31
  343. package/pi.dev-src/pi-mono/coding-agent/src/core/tools/bash.ts +0 -448
  344. package/pi.dev-src/pi-mono/coding-agent/src/core/tools/edit-diff.ts +0 -445
  345. package/pi.dev-src/pi-mono/coding-agent/src/core/tools/edit.ts +0 -487
  346. package/pi.dev-src/pi-mono/coding-agent/src/core/tools/file-mutation-queue.ts +0 -39
  347. package/pi.dev-src/pi-mono/coding-agent/src/core/tools/find.ts +0 -370
  348. package/pi.dev-src/pi-mono/coding-agent/src/core/tools/grep.ts +0 -384
  349. package/pi.dev-src/pi-mono/coding-agent/src/core/tools/index.ts +0 -196
  350. package/pi.dev-src/pi-mono/coding-agent/src/core/tools/ls.ts +0 -229
  351. package/pi.dev-src/pi-mono/coding-agent/src/core/tools/path-utils.ts +0 -94
  352. package/pi.dev-src/pi-mono/coding-agent/src/core/tools/read.ts +0 -273
  353. package/pi.dev-src/pi-mono/coding-agent/src/core/tools/render-utils.ts +0 -64
  354. package/pi.dev-src/pi-mono/coding-agent/src/core/tools/tool-definition-wrapper.ts +0 -45
  355. package/pi.dev-src/pi-mono/coding-agent/src/core/tools/truncate.ts +0 -265
  356. package/pi.dev-src/pi-mono/coding-agent/src/core/tools/write.ts +0 -281
  357. package/pi.dev-src/pi-mono/coding-agent/src/index.ts +0 -352
  358. package/pi.dev-src/pi-mono/coding-agent/src/main.ts +0 -731
  359. package/pi.dev-src/pi-mono/coding-agent/src/migrations.ts +0 -314
  360. package/pi.dev-src/pi-mono/coding-agent/src/modes/index.ts +0 -9
  361. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/assets/clankolas.png +0 -0
  362. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/armin.ts +0 -382
  363. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/assistant-message.ts +0 -147
  364. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/bash-execution.ts +0 -218
  365. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/bordered-loader.ts +0 -68
  366. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/branch-summary-message.ts +0 -58
  367. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/compaction-summary-message.ts +0 -59
  368. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/config-selector.ts +0 -592
  369. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/countdown-timer.ts +0 -38
  370. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/custom-editor.ts +0 -80
  371. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/custom-message.ts +0 -99
  372. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/daxnuts.ts +0 -164
  373. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/diff.ts +0 -147
  374. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/dynamic-border.ts +0 -25
  375. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/earendil-announcement.ts +0 -53
  376. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/extension-editor.ts +0 -147
  377. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/extension-input.ts +0 -87
  378. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/extension-selector.ts +0 -107
  379. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/footer.ts +0 -220
  380. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/index.ts +0 -32
  381. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/keybinding-hints.ts +0 -24
  382. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/login-dialog.ts +0 -178
  383. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/model-selector.ts +0 -338
  384. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/oauth-selector.ts +0 -121
  385. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/scoped-models-selector.ts +0 -355
  386. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/session-selector-search.ts +0 -194
  387. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/session-selector.ts +0 -1026
  388. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/settings-selector.ts +0 -456
  389. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/show-images-selector.ts +0 -50
  390. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/skill-invocation-message.ts +0 -55
  391. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/theme-selector.ts +0 -67
  392. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/thinking-selector.ts +0 -74
  393. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/tool-execution.ts +0 -352
  394. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/tree-selector.ts +0 -1246
  395. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/user-message-selector.ts +0 -155
  396. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/user-message.ts +0 -35
  397. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/visual-truncate.ts +0 -50
  398. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/interactive-mode.ts +0 -5155
  399. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/theme/dark.json +0 -85
  400. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/theme/light.json +0 -84
  401. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/theme/theme-schema.json +0 -335
  402. package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/theme/theme.ts +0 -1141
  403. package/pi.dev-src/pi-mono/coding-agent/src/modes/print-mode.ts +0 -158
  404. package/pi.dev-src/pi-mono/coding-agent/src/modes/rpc/jsonl.ts +0 -58
  405. package/pi.dev-src/pi-mono/coding-agent/src/modes/rpc/rpc-client.ts +0 -515
  406. package/pi.dev-src/pi-mono/coding-agent/src/modes/rpc/rpc-mode.ts +0 -745
  407. package/pi.dev-src/pi-mono/coding-agent/src/modes/rpc/rpc-types.ts +0 -264
  408. package/pi.dev-src/pi-mono/coding-agent/src/package-manager-cli.ts +0 -270
  409. package/pi.dev-src/pi-mono/coding-agent/src/utils/changelog.ts +0 -99
  410. package/pi.dev-src/pi-mono/coding-agent/src/utils/child-process.ts +0 -86
  411. package/pi.dev-src/pi-mono/coding-agent/src/utils/clipboard-image.ts +0 -300
  412. package/pi.dev-src/pi-mono/coding-agent/src/utils/clipboard-native.ts +0 -22
  413. package/pi.dev-src/pi-mono/coding-agent/src/utils/clipboard.ts +0 -81
  414. package/pi.dev-src/pi-mono/coding-agent/src/utils/exif-orientation.ts +0 -183
  415. package/pi.dev-src/pi-mono/coding-agent/src/utils/frontmatter.ts +0 -39
  416. package/pi.dev-src/pi-mono/coding-agent/src/utils/fs-watch.ts +0 -30
  417. package/pi.dev-src/pi-mono/coding-agent/src/utils/git.ts +0 -192
  418. package/pi.dev-src/pi-mono/coding-agent/src/utils/image-convert.ts +0 -41
  419. package/pi.dev-src/pi-mono/coding-agent/src/utils/image-resize.ts +0 -176
  420. package/pi.dev-src/pi-mono/coding-agent/src/utils/mime.ts +0 -30
  421. package/pi.dev-src/pi-mono/coding-agent/src/utils/paths.ts +0 -20
  422. package/pi.dev-src/pi-mono/coding-agent/src/utils/photon.ts +0 -139
  423. package/pi.dev-src/pi-mono/coding-agent/src/utils/shell.ts +0 -210
  424. package/pi.dev-src/pi-mono/coding-agent/src/utils/sleep.ts +0 -18
  425. package/pi.dev-src/pi-mono/coding-agent/src/utils/tools-manager.ts +0 -287
  426. package/pi.dev-src/pi-mono/coding-agent/test/agent-session-auto-compaction-queue.test.ts +0 -437
  427. package/pi.dev-src/pi-mono/coding-agent/test/agent-session-branching.test.ts +0 -156
  428. package/pi.dev-src/pi-mono/coding-agent/test/agent-session-compaction.test.ts +0 -208
  429. package/pi.dev-src/pi-mono/coding-agent/test/agent-session-concurrent.test.ts +0 -618
  430. package/pi.dev-src/pi-mono/coding-agent/test/agent-session-dynamic-provider.test.ts +0 -117
  431. package/pi.dev-src/pi-mono/coding-agent/test/agent-session-dynamic-tools.test.ts +0 -182
  432. package/pi.dev-src/pi-mono/coding-agent/test/agent-session-retry.test.ts +0 -318
  433. package/pi.dev-src/pi-mono/coding-agent/test/agent-session-runtime-events.test.ts +0 -208
  434. package/pi.dev-src/pi-mono/coding-agent/test/agent-session-stats.test.ts +0 -143
  435. package/pi.dev-src/pi-mono/coding-agent/test/agent-session-tree-navigation.test.ts +0 -323
  436. package/pi.dev-src/pi-mono/coding-agent/test/args.test.ts +0 -328
  437. package/pi.dev-src/pi-mono/coding-agent/test/assistant-message.test.ts +0 -57
  438. package/pi.dev-src/pi-mono/coding-agent/test/auth-storage.test.ts +0 -462
  439. package/pi.dev-src/pi-mono/coding-agent/test/bash-close-hang-windows.test.ts +0 -126
  440. package/pi.dev-src/pi-mono/coding-agent/test/bash-execution-width.test.ts +0 -80
  441. package/pi.dev-src/pi-mono/coding-agent/test/block-images.test.ts +0 -120
  442. package/pi.dev-src/pi-mono/coding-agent/test/clipboard-image-bmp-conversion.test.ts +0 -88
  443. package/pi.dev-src/pi-mono/coding-agent/test/clipboard-image.test.ts +0 -136
  444. package/pi.dev-src/pi-mono/coding-agent/test/compaction-extensions-example.test.ts +0 -66
  445. package/pi.dev-src/pi-mono/coding-agent/test/compaction-extensions.test.ts +0 -415
  446. package/pi.dev-src/pi-mono/coding-agent/test/compaction-serialization.test.ts +0 -79
  447. package/pi.dev-src/pi-mono/coding-agent/test/compaction-summary-reasoning.test.ts +0 -118
  448. package/pi.dev-src/pi-mono/coding-agent/test/compaction-thinking-model.test.ts +0 -223
  449. package/pi.dev-src/pi-mono/coding-agent/test/compaction.test.ts +0 -550
  450. package/pi.dev-src/pi-mono/coding-agent/test/config.test.ts +0 -30
  451. package/pi.dev-src/pi-mono/coding-agent/test/edit-tool-legacy-input.test.ts +0 -116
  452. package/pi.dev-src/pi-mono/coding-agent/test/edit-tool-no-full-redraw.test.ts +0 -235
  453. package/pi.dev-src/pi-mono/coding-agent/test/export-html-whitespace.test.ts +0 -12
  454. package/pi.dev-src/pi-mono/coding-agent/test/export-html-xss.test.ts +0 -28
  455. package/pi.dev-src/pi-mono/coding-agent/test/extensions-discovery.test.ts +0 -463
  456. package/pi.dev-src/pi-mono/coding-agent/test/extensions-input-event.test.ts +0 -112
  457. package/pi.dev-src/pi-mono/coding-agent/test/extensions-runner.test.ts +0 -805
  458. package/pi.dev-src/pi-mono/coding-agent/test/file-mutation-queue.test.ts +0 -163
  459. package/pi.dev-src/pi-mono/coding-agent/test/fixtures/assistant-message-with-thinking-code.json +0 -33
  460. package/pi.dev-src/pi-mono/coding-agent/test/fixtures/before-compaction.jsonl +0 -1003
  461. package/pi.dev-src/pi-mono/coding-agent/test/fixtures/empty-agent/.gitkeep +0 -0
  462. package/pi.dev-src/pi-mono/coding-agent/test/fixtures/empty-cwd/.gitkeep +0 -0
  463. package/pi.dev-src/pi-mono/coding-agent/test/fixtures/large-session.jsonl +0 -1019
  464. package/pi.dev-src/pi-mono/coding-agent/test/fixtures/skills/consecutive-hyphens/SKILL.md +0 -8
  465. package/pi.dev-src/pi-mono/coding-agent/test/fixtures/skills/disable-model-invocation/SKILL.md +0 -9
  466. package/pi.dev-src/pi-mono/coding-agent/test/fixtures/skills/invalid-name-chars/SKILL.md +0 -8
  467. package/pi.dev-src/pi-mono/coding-agent/test/fixtures/skills/invalid-yaml/SKILL.md +0 -8
  468. package/pi.dev-src/pi-mono/coding-agent/test/fixtures/skills/long-name/SKILL.md +0 -8
  469. package/pi.dev-src/pi-mono/coding-agent/test/fixtures/skills/missing-description/SKILL.md +0 -7
  470. package/pi.dev-src/pi-mono/coding-agent/test/fixtures/skills/multiline-description/SKILL.md +0 -11
  471. package/pi.dev-src/pi-mono/coding-agent/test/fixtures/skills/name-mismatch/SKILL.md +0 -8
  472. package/pi.dev-src/pi-mono/coding-agent/test/fixtures/skills/nested/child-skill/SKILL.md +0 -8
  473. package/pi.dev-src/pi-mono/coding-agent/test/fixtures/skills/no-frontmatter/SKILL.md +0 -3
  474. package/pi.dev-src/pi-mono/coding-agent/test/fixtures/skills/root-skill-preferred/SKILL.md +0 -3
  475. package/pi.dev-src/pi-mono/coding-agent/test/fixtures/skills/root-skill-preferred/nested-child/SKILL.md +0 -3
  476. package/pi.dev-src/pi-mono/coding-agent/test/fixtures/skills/unknown-field/SKILL.md +0 -10
  477. package/pi.dev-src/pi-mono/coding-agent/test/fixtures/skills/valid-skill/SKILL.md +0 -8
  478. package/pi.dev-src/pi-mono/coding-agent/test/fixtures/skills-collision/first/calendar/SKILL.md +0 -8
  479. package/pi.dev-src/pi-mono/coding-agent/test/fixtures/skills-collision/second/calendar/SKILL.md +0 -8
  480. package/pi.dev-src/pi-mono/coding-agent/test/footer-data-provider.test.ts +0 -265
  481. package/pi.dev-src/pi-mono/coding-agent/test/footer-width.test.ts +0 -115
  482. package/pi.dev-src/pi-mono/coding-agent/test/frontmatter.test.ts +0 -60
  483. package/pi.dev-src/pi-mono/coding-agent/test/git-ssh-url.test.ts +0 -78
  484. package/pi.dev-src/pi-mono/coding-agent/test/git-update.test.ts +0 -411
  485. package/pi.dev-src/pi-mono/coding-agent/test/image-processing.test.ts +0 -145
  486. package/pi.dev-src/pi-mono/coding-agent/test/image-resize-callers.test.ts +0 -53
  487. package/pi.dev-src/pi-mono/coding-agent/test/initial-message.test.ts +0 -48
  488. package/pi.dev-src/pi-mono/coding-agent/test/interactive-mode-anthropic-warning.test.ts +0 -73
  489. package/pi.dev-src/pi-mono/coding-agent/test/interactive-mode-clone-command.test.ts +0 -77
  490. package/pi.dev-src/pi-mono/coding-agent/test/interactive-mode-compaction.test.ts +0 -57
  491. package/pi.dev-src/pi-mono/coding-agent/test/interactive-mode-import-command.test.ts +0 -144
  492. package/pi.dev-src/pi-mono/coding-agent/test/interactive-mode-status.test.ts +0 -635
  493. package/pi.dev-src/pi-mono/coding-agent/test/interactive-mode-suspend.test.ts +0 -149
  494. package/pi.dev-src/pi-mono/coding-agent/test/keybindings-migration.test.ts +0 -88
  495. package/pi.dev-src/pi-mono/coding-agent/test/model-registry.test.ts +0 -1209
  496. package/pi.dev-src/pi-mono/coding-agent/test/model-resolver.test.ts +0 -436
  497. package/pi.dev-src/pi-mono/coding-agent/test/package-command-paths.test.ts +0 -144
  498. package/pi.dev-src/pi-mono/coding-agent/test/package-manager-ssh.test.ts +0 -97
  499. package/pi.dev-src/pi-mono/coding-agent/test/package-manager.test.ts +0 -1795
  500. package/pi.dev-src/pi-mono/coding-agent/test/path-utils.test.ts +0 -162
  501. package/pi.dev-src/pi-mono/coding-agent/test/plan-mode-utils.test.ts +0 -261
  502. package/pi.dev-src/pi-mono/coding-agent/test/print-mode.test.ts +0 -140
  503. package/pi.dev-src/pi-mono/coding-agent/test/prompt-templates.test.ts +0 -515
  504. package/pi.dev-src/pi-mono/coding-agent/test/resource-loader.test.ts +0 -576
  505. package/pi.dev-src/pi-mono/coding-agent/test/rpc-client-clone.test.ts +0 -29
  506. package/pi.dev-src/pi-mono/coding-agent/test/rpc-example.ts +0 -86
  507. package/pi.dev-src/pi-mono/coding-agent/test/rpc-jsonl.test.ts +0 -65
  508. package/pi.dev-src/pi-mono/coding-agent/test/rpc-prompt-response-semantics.test.ts +0 -285
  509. package/pi.dev-src/pi-mono/coding-agent/test/rpc.test.ts +0 -321
  510. package/pi.dev-src/pi-mono/coding-agent/test/sdk-codex-cache-probe-tool-loop.ts +0 -364
  511. package/pi.dev-src/pi-mono/coding-agent/test/sdk-openrouter-attribution.test.ts +0 -181
  512. package/pi.dev-src/pi-mono/coding-agent/test/sdk-session-manager.test.ts +0 -95
  513. package/pi.dev-src/pi-mono/coding-agent/test/sdk-skills.test.ts +0 -109
  514. package/pi.dev-src/pi-mono/coding-agent/test/session-cwd.test.ts +0 -91
  515. package/pi.dev-src/pi-mono/coding-agent/test/session-info-modified-timestamp.test.ts +0 -83
  516. package/pi.dev-src/pi-mono/coding-agent/test/session-manager/build-context.test.ts +0 -268
  517. package/pi.dev-src/pi-mono/coding-agent/test/session-manager/custom-session-id.test.ts +0 -109
  518. package/pi.dev-src/pi-mono/coding-agent/test/session-manager/file-operations.test.ts +0 -208
  519. package/pi.dev-src/pi-mono/coding-agent/test/session-manager/labels.test.ts +0 -198
  520. package/pi.dev-src/pi-mono/coding-agent/test/session-manager/migration.test.ts +0 -78
  521. package/pi.dev-src/pi-mono/coding-agent/test/session-manager/save-entry.test.ts +0 -55
  522. package/pi.dev-src/pi-mono/coding-agent/test/session-manager/tree-traversal.test.ts +0 -533
  523. package/pi.dev-src/pi-mono/coding-agent/test/session-selector-path-delete.test.ts +0 -315
  524. package/pi.dev-src/pi-mono/coding-agent/test/session-selector-rename.test.ts +0 -111
  525. package/pi.dev-src/pi-mono/coding-agent/test/session-selector-search.test.ts +0 -195
  526. package/pi.dev-src/pi-mono/coding-agent/test/settings-manager-bug.test.ts +0 -147
  527. package/pi.dev-src/pi-mono/coding-agent/test/settings-manager.test.ts +0 -319
  528. package/pi.dev-src/pi-mono/coding-agent/test/skills.test.ts +0 -432
  529. package/pi.dev-src/pi-mono/coding-agent/test/stdout-cleanliness.test.ts +0 -103
  530. package/pi.dev-src/pi-mono/coding-agent/test/streaming-render-debug.ts +0 -97
  531. package/pi.dev-src/pi-mono/coding-agent/test/suite/agent-session-bash-persistence.test.ts +0 -242
  532. package/pi.dev-src/pi-mono/coding-agent/test/suite/agent-session-compaction.test.ts +0 -343
  533. package/pi.dev-src/pi-mono/coding-agent/test/suite/agent-session-model-extension.test.ts +0 -325
  534. package/pi.dev-src/pi-mono/coding-agent/test/suite/agent-session-prompt.test.ts +0 -323
  535. package/pi.dev-src/pi-mono/coding-agent/test/suite/agent-session-queue.test.ts +0 -422
  536. package/pi.dev-src/pi-mono/coding-agent/test/suite/agent-session-retry-events.test.ts +0 -358
  537. package/pi.dev-src/pi-mono/coding-agent/test/suite/agent-session-runtime.test.ts +0 -553
  538. package/pi.dev-src/pi-mono/coding-agent/test/suite/harness.ts +0 -208
  539. package/pi.dev-src/pi-mono/coding-agent/test/suite/regressions/2023-queued-slash-command-followup.test.ts +0 -80
  540. package/pi.dev-src/pi-mono/coding-agent/test/suite/regressions/2753-reload-stale-resource-settings.test.ts +0 -100
  541. package/pi.dev-src/pi-mono/coding-agent/test/suite/regressions/2781-skill-collision-precedence.test.ts +0 -120
  542. package/pi.dev-src/pi-mono/coding-agent/test/suite/regressions/2791-fswatch-error-crash.test.ts +0 -106
  543. package/pi.dev-src/pi-mono/coding-agent/test/suite/regressions/2835-tools-allowlist-filters-extension-tools.test.ts +0 -94
  544. package/pi.dev-src/pi-mono/coding-agent/test/suite/regressions/2860-replaced-session-context.test.ts +0 -274
  545. package/pi.dev-src/pi-mono/coding-agent/test/suite/regressions/3217-scoped-model-order.test.ts +0 -104
  546. package/pi.dev-src/pi-mono/coding-agent/test/suite/regressions/3302-find-path-glob.test.ts +0 -72
  547. package/pi.dev-src/pi-mono/coding-agent/test/suite/regressions/3303-find-nested-gitignore.test.ts +0 -83
  548. package/pi.dev-src/pi-mono/coding-agent/test/suite/regressions/3317-network-connection-lost-retry.test.ts +0 -33
  549. package/pi.dev-src/pi-mono/coding-agent/test/system-prompt.test.ts +0 -102
  550. package/pi.dev-src/pi-mono/coding-agent/test/test-harness.test.ts +0 -321
  551. package/pi.dev-src/pi-mono/coding-agent/test/test-harness.ts +0 -446
  552. package/pi.dev-src/pi-mono/coding-agent/test/test-theme-colors.ts +0 -246
  553. package/pi.dev-src/pi-mono/coding-agent/test/theme-export.test.ts +0 -104
  554. package/pi.dev-src/pi-mono/coding-agent/test/tool-execution-component.test.ts +0 -331
  555. package/pi.dev-src/pi-mono/coding-agent/test/tools.test.ts +0 -889
  556. package/pi.dev-src/pi-mono/coding-agent/test/tree-selector.test.ts +0 -655
  557. package/pi.dev-src/pi-mono/coding-agent/test/trigger-compact-extension.test.ts +0 -57
  558. package/pi.dev-src/pi-mono/coding-agent/test/truncate-to-width.test.ts +0 -81
  559. package/pi.dev-src/pi-mono/coding-agent/test/user-message.test.ts +0 -25
  560. package/pi.dev-src/pi-mono/coding-agent/test/utilities.ts +0 -316
  561. package/pi.dev-src/pi-mono/coding-agent/tsconfig.examples.json +0 -16
  562. package/pi.dev-src/pi-mono/coding-agent/vitest.config.ts +0 -26
  563. package/pi.dev-src/pi-mono/mom/dev.sh +0 -30
  564. package/pi.dev-src/pi-mono/mom/docker.sh +0 -95
  565. package/pi.dev-src/pi-mono/mom/scripts/migrate-timestamps.ts +0 -121
  566. package/pi.dev-src/pi-mono/mom/src/agent.ts +0 -882
  567. package/pi.dev-src/pi-mono/mom/src/context.ts +0 -180
  568. package/pi.dev-src/pi-mono/mom/src/download.ts +0 -117
  569. package/pi.dev-src/pi-mono/mom/src/events.ts +0 -442
  570. package/pi.dev-src/pi-mono/mom/src/fs-watch.ts +0 -30
  571. package/pi.dev-src/pi-mono/mom/src/log.ts +0 -271
  572. package/pi.dev-src/pi-mono/mom/src/main.ts +0 -367
  573. package/pi.dev-src/pi-mono/mom/src/sandbox.ts +0 -221
  574. package/pi.dev-src/pi-mono/mom/src/slack.ts +0 -623
  575. package/pi.dev-src/pi-mono/mom/src/store.ts +0 -234
  576. package/pi.dev-src/pi-mono/mom/src/tools/attach.ts +0 -47
  577. package/pi.dev-src/pi-mono/mom/src/tools/bash.ts +0 -97
  578. package/pi.dev-src/pi-mono/mom/src/tools/edit.ts +0 -165
  579. package/pi.dev-src/pi-mono/mom/src/tools/index.ts +0 -19
  580. package/pi.dev-src/pi-mono/mom/src/tools/read.ts +0 -159
  581. package/pi.dev-src/pi-mono/mom/src/tools/truncate.ts +0 -236
  582. package/pi.dev-src/pi-mono/mom/src/tools/write.ts +0 -45
  583. package/pi.dev-src/pi-mono/mom/test/events.test.ts +0 -50
  584. package/pi.dev-src/pi-mono/pods/scripts/model_run.sh +0 -83
  585. package/pi.dev-src/pi-mono/pods/scripts/pod_setup.sh +0 -336
  586. package/pi.dev-src/pi-mono/pods/src/cli.ts +0 -360
  587. package/pi.dev-src/pi-mono/pods/src/commands/models.ts +0 -753
  588. package/pi.dev-src/pi-mono/pods/src/commands/pods.ts +0 -205
  589. package/pi.dev-src/pi-mono/pods/src/commands/prompt.ts +0 -84
  590. package/pi.dev-src/pi-mono/pods/src/config.ts +0 -80
  591. package/pi.dev-src/pi-mono/pods/src/index.ts +0 -2
  592. package/pi.dev-src/pi-mono/pods/src/model-configs.ts +0 -111
  593. package/pi.dev-src/pi-mono/pods/src/models.json +0 -295
  594. package/pi.dev-src/pi-mono/pods/src/ssh.ts +0 -151
  595. package/pi.dev-src/pi-mono/pods/src/types.ts +0 -27
  596. package/pi.dev-src/pi-mono/tui/src/autocomplete.ts +0 -783
  597. package/pi.dev-src/pi-mono/tui/src/components/box.ts +0 -137
  598. package/pi.dev-src/pi-mono/tui/src/components/cancellable-loader.ts +0 -40
  599. package/pi.dev-src/pi-mono/tui/src/components/editor.ts +0 -2280
  600. package/pi.dev-src/pi-mono/tui/src/components/image.ts +0 -104
  601. package/pi.dev-src/pi-mono/tui/src/components/input.ts +0 -503
  602. package/pi.dev-src/pi-mono/tui/src/components/loader.ts +0 -86
  603. package/pi.dev-src/pi-mono/tui/src/components/markdown.ts +0 -852
  604. package/pi.dev-src/pi-mono/tui/src/components/select-list.ts +0 -229
  605. package/pi.dev-src/pi-mono/tui/src/components/settings-list.ts +0 -250
  606. package/pi.dev-src/pi-mono/tui/src/components/spacer.ts +0 -28
  607. package/pi.dev-src/pi-mono/tui/src/components/text.ts +0 -106
  608. package/pi.dev-src/pi-mono/tui/src/components/truncated-text.ts +0 -65
  609. package/pi.dev-src/pi-mono/tui/src/editor-component.ts +0 -74
  610. package/pi.dev-src/pi-mono/tui/src/fuzzy.ts +0 -133
  611. package/pi.dev-src/pi-mono/tui/src/index.ts +0 -106
  612. package/pi.dev-src/pi-mono/tui/src/keybindings.ts +0 -244
  613. package/pi.dev-src/pi-mono/tui/src/keys.ts +0 -1400
  614. package/pi.dev-src/pi-mono/tui/src/kill-ring.ts +0 -46
  615. package/pi.dev-src/pi-mono/tui/src/stdin-buffer.ts +0 -386
  616. package/pi.dev-src/pi-mono/tui/src/terminal-image.ts +0 -414
  617. package/pi.dev-src/pi-mono/tui/src/terminal.ts +0 -373
  618. package/pi.dev-src/pi-mono/tui/src/tui.ts +0 -1243
  619. package/pi.dev-src/pi-mono/tui/src/undo-stack.ts +0 -28
  620. package/pi.dev-src/pi-mono/tui/src/utils.ts +0 -1085
  621. package/pi.dev-src/pi-mono/tui/test/autocomplete.test.ts +0 -542
  622. package/pi.dev-src/pi-mono/tui/test/bug-regression-isimageline-startswith-bug.test.ts +0 -237
  623. package/pi.dev-src/pi-mono/tui/test/chat-simple.ts +0 -129
  624. package/pi.dev-src/pi-mono/tui/test/editor.test.ts +0 -3812
  625. package/pi.dev-src/pi-mono/tui/test/fuzzy.test.ts +0 -98
  626. package/pi.dev-src/pi-mono/tui/test/image-test.ts +0 -56
  627. package/pi.dev-src/pi-mono/tui/test/input.test.ts +0 -580
  628. package/pi.dev-src/pi-mono/tui/test/key-tester.ts +0 -105
  629. package/pi.dev-src/pi-mono/tui/test/keybindings.test.ts +0 -38
  630. package/pi.dev-src/pi-mono/tui/test/keys.test.ts +0 -614
  631. package/pi.dev-src/pi-mono/tui/test/markdown.test.ts +0 -1236
  632. package/pi.dev-src/pi-mono/tui/test/overlay-non-capturing.test.ts +0 -609
  633. package/pi.dev-src/pi-mono/tui/test/overlay-options.test.ts +0 -538
  634. package/pi.dev-src/pi-mono/tui/test/overlay-short-content.test.ts +0 -56
  635. package/pi.dev-src/pi-mono/tui/test/regression-regional-indicator-width.test.ts +0 -52
  636. package/pi.dev-src/pi-mono/tui/test/select-list.test.ts +0 -116
  637. package/pi.dev-src/pi-mono/tui/test/stdin-buffer.test.ts +0 -422
  638. package/pi.dev-src/pi-mono/tui/test/terminal-image.test.ts +0 -279
  639. package/pi.dev-src/pi-mono/tui/test/test-themes.ts +0 -38
  640. package/pi.dev-src/pi-mono/tui/test/truncate-to-width.test.ts +0 -62
  641. package/pi.dev-src/pi-mono/tui/test/truncated-text.test.ts +0 -129
  642. package/pi.dev-src/pi-mono/tui/test/tui-cell-size-input.test.ts +0 -81
  643. package/pi.dev-src/pi-mono/tui/test/tui-overlay-style-leak.test.ts +0 -72
  644. package/pi.dev-src/pi-mono/tui/test/tui-render.test.ts +0 -509
  645. package/pi.dev-src/pi-mono/tui/test/viewport-overwrite-repro.ts +0 -106
  646. package/pi.dev-src/pi-mono/tui/test/virtual-terminal.ts +0 -218
  647. package/pi.dev-src/pi-mono/tui/test/wrap-ansi.test.ts +0 -207
  648. package/pi.dev-src/pi-mono/tui/vitest.config.ts +0 -7
  649. package/pi.dev-src/pi-mono/web-ui/example/index.html +0 -13
  650. package/pi.dev-src/pi-mono/web-ui/example/src/app.css +0 -1
  651. package/pi.dev-src/pi-mono/web-ui/example/src/custom-messages.ts +0 -99
  652. package/pi.dev-src/pi-mono/web-ui/example/src/main.ts +0 -421
  653. package/pi.dev-src/pi-mono/web-ui/example/tsconfig.json +0 -23
  654. package/pi.dev-src/pi-mono/web-ui/example/vite.config.ts +0 -6
  655. package/pi.dev-src/pi-mono/web-ui/scripts/count-prompt-tokens.ts +0 -88
  656. package/pi.dev-src/pi-mono/web-ui/src/ChatPanel.ts +0 -209
  657. package/pi.dev-src/pi-mono/web-ui/src/app.css +0 -68
  658. package/pi.dev-src/pi-mono/web-ui/src/components/AgentInterface.ts +0 -403
  659. package/pi.dev-src/pi-mono/web-ui/src/components/AttachmentTile.ts +0 -107
  660. package/pi.dev-src/pi-mono/web-ui/src/components/ConsoleBlock.ts +0 -72
  661. package/pi.dev-src/pi-mono/web-ui/src/components/CustomProviderCard.ts +0 -100
  662. package/pi.dev-src/pi-mono/web-ui/src/components/ExpandableSection.ts +0 -46
  663. package/pi.dev-src/pi-mono/web-ui/src/components/Input.ts +0 -113
  664. package/pi.dev-src/pi-mono/web-ui/src/components/MessageEditor.ts +0 -405
  665. package/pi.dev-src/pi-mono/web-ui/src/components/MessageList.ts +0 -98
  666. package/pi.dev-src/pi-mono/web-ui/src/components/Messages.ts +0 -383
  667. package/pi.dev-src/pi-mono/web-ui/src/components/ProviderKeyInput.ts +0 -153
  668. package/pi.dev-src/pi-mono/web-ui/src/components/SandboxedIframe.ts +0 -626
  669. package/pi.dev-src/pi-mono/web-ui/src/components/StreamingMessageContainer.ts +0 -103
  670. package/pi.dev-src/pi-mono/web-ui/src/components/ThinkingBlock.ts +0 -43
  671. package/pi.dev-src/pi-mono/web-ui/src/components/message-renderer-registry.ts +0 -28
  672. package/pi.dev-src/pi-mono/web-ui/src/components/sandbox/ArtifactsRuntimeProvider.ts +0 -220
  673. package/pi.dev-src/pi-mono/web-ui/src/components/sandbox/AttachmentsRuntimeProvider.ts +0 -66
  674. package/pi.dev-src/pi-mono/web-ui/src/components/sandbox/ConsoleRuntimeProvider.ts +0 -186
  675. package/pi.dev-src/pi-mono/web-ui/src/components/sandbox/FileDownloadRuntimeProvider.ts +0 -110
  676. package/pi.dev-src/pi-mono/web-ui/src/components/sandbox/RuntimeMessageBridge.ts +0 -82
  677. package/pi.dev-src/pi-mono/web-ui/src/components/sandbox/RuntimeMessageRouter.ts +0 -216
  678. package/pi.dev-src/pi-mono/web-ui/src/components/sandbox/SandboxRuntimeProvider.ts +0 -52
  679. package/pi.dev-src/pi-mono/web-ui/src/dialogs/ApiKeyPromptDialog.ts +0 -75
  680. package/pi.dev-src/pi-mono/web-ui/src/dialogs/AttachmentOverlay.ts +0 -636
  681. package/pi.dev-src/pi-mono/web-ui/src/dialogs/CustomProviderDialog.ts +0 -274
  682. package/pi.dev-src/pi-mono/web-ui/src/dialogs/ModelSelector.ts +0 -370
  683. package/pi.dev-src/pi-mono/web-ui/src/dialogs/PersistentStorageDialog.ts +0 -144
  684. package/pi.dev-src/pi-mono/web-ui/src/dialogs/ProvidersModelsTab.ts +0 -212
  685. package/pi.dev-src/pi-mono/web-ui/src/dialogs/SessionListDialog.ts +0 -150
  686. package/pi.dev-src/pi-mono/web-ui/src/dialogs/SettingsDialog.ts +0 -218
  687. package/pi.dev-src/pi-mono/web-ui/src/index.ts +0 -120
  688. package/pi.dev-src/pi-mono/web-ui/src/prompts/prompts.ts +0 -282
  689. package/pi.dev-src/pi-mono/web-ui/src/storage/app-storage.ts +0 -60
  690. package/pi.dev-src/pi-mono/web-ui/src/storage/backends/indexeddb-storage-backend.ts +0 -193
  691. package/pi.dev-src/pi-mono/web-ui/src/storage/store.ts +0 -33
  692. package/pi.dev-src/pi-mono/web-ui/src/storage/stores/custom-providers-store.ts +0 -62
  693. package/pi.dev-src/pi-mono/web-ui/src/storage/stores/provider-keys-store.ts +0 -33
  694. package/pi.dev-src/pi-mono/web-ui/src/storage/stores/sessions-store.ts +0 -136
  695. package/pi.dev-src/pi-mono/web-ui/src/storage/stores/settings-store.ts +0 -34
  696. package/pi.dev-src/pi-mono/web-ui/src/storage/types.ts +0 -206
  697. package/pi.dev-src/pi-mono/web-ui/src/tools/artifacts/ArtifactElement.ts +0 -14
  698. package/pi.dev-src/pi-mono/web-ui/src/tools/artifacts/ArtifactPill.ts +0 -26
  699. package/pi.dev-src/pi-mono/web-ui/src/tools/artifacts/Console.ts +0 -93
  700. package/pi.dev-src/pi-mono/web-ui/src/tools/artifacts/DocxArtifact.ts +0 -213
  701. package/pi.dev-src/pi-mono/web-ui/src/tools/artifacts/ExcelArtifact.ts +0 -231
  702. package/pi.dev-src/pi-mono/web-ui/src/tools/artifacts/GenericArtifact.ts +0 -117
  703. package/pi.dev-src/pi-mono/web-ui/src/tools/artifacts/HtmlArtifact.ts +0 -195
  704. package/pi.dev-src/pi-mono/web-ui/src/tools/artifacts/ImageArtifact.ts +0 -116
  705. package/pi.dev-src/pi-mono/web-ui/src/tools/artifacts/MarkdownArtifact.ts +0 -82
  706. package/pi.dev-src/pi-mono/web-ui/src/tools/artifacts/PdfArtifact.ts +0 -201
  707. package/pi.dev-src/pi-mono/web-ui/src/tools/artifacts/SvgArtifact.ts +0 -119
  708. package/pi.dev-src/pi-mono/web-ui/src/tools/artifacts/TextArtifact.ts +0 -148
  709. package/pi.dev-src/pi-mono/web-ui/src/tools/artifacts/artifacts-tool-renderer.ts +0 -310
  710. package/pi.dev-src/pi-mono/web-ui/src/tools/artifacts/artifacts.ts +0 -713
  711. package/pi.dev-src/pi-mono/web-ui/src/tools/artifacts/index.ts +0 -7
  712. package/pi.dev-src/pi-mono/web-ui/src/tools/extract-document.ts +0 -275
  713. package/pi.dev-src/pi-mono/web-ui/src/tools/index.ts +0 -46
  714. package/pi.dev-src/pi-mono/web-ui/src/tools/javascript-repl.ts +0 -293
  715. package/pi.dev-src/pi-mono/web-ui/src/tools/renderer-registry.ts +0 -130
  716. package/pi.dev-src/pi-mono/web-ui/src/tools/renderers/BashRenderer.ts +0 -52
  717. package/pi.dev-src/pi-mono/web-ui/src/tools/renderers/CalculateRenderer.ts +0 -58
  718. package/pi.dev-src/pi-mono/web-ui/src/tools/renderers/DefaultRenderer.ts +0 -103
  719. package/pi.dev-src/pi-mono/web-ui/src/tools/renderers/GetCurrentTimeRenderer.ts +0 -92
  720. package/pi.dev-src/pi-mono/web-ui/src/tools/types.ts +0 -15
  721. package/pi.dev-src/pi-mono/web-ui/src/utils/attachment-utils.ts +0 -472
  722. package/pi.dev-src/pi-mono/web-ui/src/utils/auth-token.ts +0 -22
  723. package/pi.dev-src/pi-mono/web-ui/src/utils/format.ts +0 -42
  724. package/pi.dev-src/pi-mono/web-ui/src/utils/i18n.ts +0 -653
  725. package/pi.dev-src/pi-mono/web-ui/src/utils/model-discovery.ts +0 -277
  726. package/pi.dev-src/pi-mono/web-ui/src/utils/proxy-utils.ts +0 -139
  727. package/pi.dev-src/pi-mono/web-ui/src/utils/test-sessions.ts +0 -2357
  728. package/pi.dev-src/pi-mono/web-ui/tsconfig.json +0 -7
  729. package/tests/attended-results-scenarios.ts +0 -648
  730. package/tests/attended-results.test.ts +0 -39
  731. package/tests/cli-command-option-parity.test.ts +0 -798
  732. package/tests/debug-extension-harness.test.ts +0 -466
  733. package/tests/extension-registration.test.ts +0 -6785
  734. package/tests/fixtures/fixture_c.c +0 -361
  735. package/tests/fixtures/fixture_cpp.cpp +0 -407
  736. package/tests/fixtures/fixture_csharp.cs +0 -411
  737. package/tests/fixtures/fixture_elixir.ex +0 -409
  738. package/tests/fixtures/fixture_go.go +0 -341
  739. package/tests/fixtures/fixture_haskell.hs +0 -250
  740. package/tests/fixtures/fixture_java.java +0 -430
  741. package/tests/fixtures/fixture_javascript.js +0 -383
  742. package/tests/fixtures/fixture_kotlin.kt +0 -451
  743. package/tests/fixtures/fixture_lua.lua +0 -276
  744. package/tests/fixtures/fixture_perl.pl +0 -310
  745. package/tests/fixtures/fixture_php.php +0 -433
  746. package/tests/fixtures/fixture_python.py +0 -502
  747. package/tests/fixtures/fixture_ruby.rb +0 -345
  748. package/tests/fixtures/fixture_rust.rs +0 -380
  749. package/tests/fixtures/fixture_scala.scala +0 -398
  750. package/tests/fixtures/fixture_shell.sh +0 -276
  751. package/tests/fixtures/fixture_swift.swift +0 -397
  752. package/tests/fixtures/fixture_typescript.ts +0 -434
  753. package/tests/fixtures/fixture_zig.zig +0 -295
  754. package/tests/fixtures_attended_results/project/compress-line-numbers.json +0 -5
  755. package/tests/fixtures_attended_results/project/compress.json +0 -5
  756. package/tests/fixtures_attended_results/project/enable-static-check-invalid-command.json +0 -5
  757. package/tests/fixtures_attended_results/project/enable-static-check-valid.json +0 -5
  758. package/tests/fixtures_attended_results/project/files-static-check.json +0 -5
  759. package/tests/fixtures_attended_results/project/find-line-numbers.json +0 -5
  760. package/tests/fixtures_attended_results/project/find.json +0 -5
  761. package/tests/fixtures_attended_results/project/get-base-path.json +0 -5
  762. package/tests/fixtures_attended_results/project/git-check-clean.json +0 -5
  763. package/tests/fixtures_attended_results/project/git-check-dirty.json +0 -5
  764. package/tests/fixtures_attended_results/project/git-path.json +0 -5
  765. package/tests/fixtures_attended_results/project/git-wt-create-invalid.json +0 -5
  766. package/tests/fixtures_attended_results/project/git-wt-create-valid.json +0 -5
  767. package/tests/fixtures_attended_results/project/git-wt-delete-nonexistent.json +0 -5
  768. package/tests/fixtures_attended_results/project/git-wt-delete-valid.json +0 -5
  769. package/tests/fixtures_attended_results/project/git-wt-name.json +0 -5
  770. package/tests/fixtures_attended_results/project/static-check.json +0 -5
  771. package/tests/fixtures_attended_results/project/summarize.json +0 -5
  772. package/tests/fixtures_attended_results/project/tokens.json +0 -5
  773. package/tests/fixtures_attended_results/standalone/files-compress/fixture_c.c.json +0 -5
  774. package/tests/fixtures_attended_results/standalone/files-compress/fixture_cpp.cpp.json +0 -5
  775. package/tests/fixtures_attended_results/standalone/files-compress/fixture_csharp.cs.json +0 -5
  776. package/tests/fixtures_attended_results/standalone/files-compress/fixture_elixir.ex.json +0 -5
  777. package/tests/fixtures_attended_results/standalone/files-compress/fixture_go.go.json +0 -5
  778. package/tests/fixtures_attended_results/standalone/files-compress/fixture_haskell.hs.json +0 -5
  779. package/tests/fixtures_attended_results/standalone/files-compress/fixture_java.java.json +0 -5
  780. package/tests/fixtures_attended_results/standalone/files-compress/fixture_javascript.js.json +0 -5
  781. package/tests/fixtures_attended_results/standalone/files-compress/fixture_kotlin.kt.json +0 -5
  782. package/tests/fixtures_attended_results/standalone/files-compress/fixture_lua.lua.json +0 -5
  783. package/tests/fixtures_attended_results/standalone/files-compress/fixture_perl.pl.json +0 -5
  784. package/tests/fixtures_attended_results/standalone/files-compress/fixture_php.php.json +0 -5
  785. package/tests/fixtures_attended_results/standalone/files-compress/fixture_python.py.json +0 -5
  786. package/tests/fixtures_attended_results/standalone/files-compress/fixture_ruby.rb.json +0 -5
  787. package/tests/fixtures_attended_results/standalone/files-compress/fixture_rust.rs.json +0 -5
  788. package/tests/fixtures_attended_results/standalone/files-compress/fixture_scala.scala.json +0 -5
  789. package/tests/fixtures_attended_results/standalone/files-compress/fixture_shell.sh.json +0 -5
  790. package/tests/fixtures_attended_results/standalone/files-compress/fixture_swift.swift.json +0 -5
  791. package/tests/fixtures_attended_results/standalone/files-compress/fixture_typescript.ts.json +0 -5
  792. package/tests/fixtures_attended_results/standalone/files-compress/fixture_zig.zig.json +0 -5
  793. package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_c.c.json +0 -5
  794. package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_cpp.cpp.json +0 -5
  795. package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_csharp.cs.json +0 -5
  796. package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_elixir.ex.json +0 -5
  797. package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_go.go.json +0 -5
  798. package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_haskell.hs.json +0 -5
  799. package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_java.java.json +0 -5
  800. package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_javascript.js.json +0 -5
  801. package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_kotlin.kt.json +0 -5
  802. package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_lua.lua.json +0 -5
  803. package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_perl.pl.json +0 -5
  804. package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_php.php.json +0 -5
  805. package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_python.py.json +0 -5
  806. package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_ruby.rb.json +0 -5
  807. package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_rust.rs.json +0 -5
  808. package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_scala.scala.json +0 -5
  809. package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_shell.sh.json +0 -5
  810. package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_swift.swift.json +0 -5
  811. package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_typescript.ts.json +0 -5
  812. package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_zig.zig.json +0 -5
  813. package/tests/fixtures_attended_results/standalone/files-find/fixture_c.c.json +0 -5
  814. package/tests/fixtures_attended_results/standalone/files-find/fixture_cpp.cpp.json +0 -5
  815. package/tests/fixtures_attended_results/standalone/files-find/fixture_csharp.cs.json +0 -5
  816. package/tests/fixtures_attended_results/standalone/files-find/fixture_elixir.ex.json +0 -5
  817. package/tests/fixtures_attended_results/standalone/files-find/fixture_go.go.json +0 -5
  818. package/tests/fixtures_attended_results/standalone/files-find/fixture_haskell.hs.json +0 -5
  819. package/tests/fixtures_attended_results/standalone/files-find/fixture_java.java.json +0 -5
  820. package/tests/fixtures_attended_results/standalone/files-find/fixture_javascript.js.json +0 -5
  821. package/tests/fixtures_attended_results/standalone/files-find/fixture_kotlin.kt.json +0 -5
  822. package/tests/fixtures_attended_results/standalone/files-find/fixture_lua.lua.json +0 -5
  823. package/tests/fixtures_attended_results/standalone/files-find/fixture_perl.pl.json +0 -5
  824. package/tests/fixtures_attended_results/standalone/files-find/fixture_php.php.json +0 -5
  825. package/tests/fixtures_attended_results/standalone/files-find/fixture_python.py.json +0 -5
  826. package/tests/fixtures_attended_results/standalone/files-find/fixture_ruby.rb.json +0 -5
  827. package/tests/fixtures_attended_results/standalone/files-find/fixture_rust.rs.json +0 -5
  828. package/tests/fixtures_attended_results/standalone/files-find/fixture_scala.scala.json +0 -5
  829. package/tests/fixtures_attended_results/standalone/files-find/fixture_shell.sh.json +0 -5
  830. package/tests/fixtures_attended_results/standalone/files-find/fixture_swift.swift.json +0 -5
  831. package/tests/fixtures_attended_results/standalone/files-find/fixture_typescript.ts.json +0 -5
  832. package/tests/fixtures_attended_results/standalone/files-find/fixture_zig.zig.json +0 -5
  833. package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_c.c.json +0 -5
  834. package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_cpp.cpp.json +0 -5
  835. package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_csharp.cs.json +0 -5
  836. package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_elixir.ex.json +0 -5
  837. package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_go.go.json +0 -5
  838. package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_haskell.hs.json +0 -5
  839. package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_java.java.json +0 -5
  840. package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_javascript.js.json +0 -5
  841. package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_kotlin.kt.json +0 -5
  842. package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_lua.lua.json +0 -5
  843. package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_perl.pl.json +0 -5
  844. package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_php.php.json +0 -5
  845. package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_python.py.json +0 -5
  846. package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_ruby.rb.json +0 -5
  847. package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_rust.rs.json +0 -5
  848. package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_scala.scala.json +0 -5
  849. package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_shell.sh.json +0 -5
  850. package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_swift.swift.json +0 -5
  851. package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_typescript.ts.json +0 -5
  852. package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_zig.zig.json +0 -5
  853. package/tests/fixtures_attended_results/standalone/files-summarize/fixture_c.c.json +0 -5
  854. package/tests/fixtures_attended_results/standalone/files-summarize/fixture_cpp.cpp.json +0 -5
  855. package/tests/fixtures_attended_results/standalone/files-summarize/fixture_csharp.cs.json +0 -5
  856. package/tests/fixtures_attended_results/standalone/files-summarize/fixture_elixir.ex.json +0 -5
  857. package/tests/fixtures_attended_results/standalone/files-summarize/fixture_go.go.json +0 -5
  858. package/tests/fixtures_attended_results/standalone/files-summarize/fixture_haskell.hs.json +0 -5
  859. package/tests/fixtures_attended_results/standalone/files-summarize/fixture_java.java.json +0 -5
  860. package/tests/fixtures_attended_results/standalone/files-summarize/fixture_javascript.js.json +0 -5
  861. package/tests/fixtures_attended_results/standalone/files-summarize/fixture_kotlin.kt.json +0 -5
  862. package/tests/fixtures_attended_results/standalone/files-summarize/fixture_lua.lua.json +0 -5
  863. package/tests/fixtures_attended_results/standalone/files-summarize/fixture_perl.pl.json +0 -5
  864. package/tests/fixtures_attended_results/standalone/files-summarize/fixture_php.php.json +0 -5
  865. package/tests/fixtures_attended_results/standalone/files-summarize/fixture_python.py.json +0 -5
  866. package/tests/fixtures_attended_results/standalone/files-summarize/fixture_ruby.rb.json +0 -5
  867. package/tests/fixtures_attended_results/standalone/files-summarize/fixture_rust.rs.json +0 -5
  868. package/tests/fixtures_attended_results/standalone/files-summarize/fixture_scala.scala.json +0 -5
  869. package/tests/fixtures_attended_results/standalone/files-summarize/fixture_shell.sh.json +0 -5
  870. package/tests/fixtures_attended_results/standalone/files-summarize/fixture_swift.swift.json +0 -5
  871. package/tests/fixtures_attended_results/standalone/files-summarize/fixture_typescript.ts.json +0 -5
  872. package/tests/fixtures_attended_results/standalone/files-summarize/fixture_zig.zig.json +0 -5
  873. package/tests/fixtures_attended_results/standalone/files-tokens/fixture_c.c.json +0 -5
  874. package/tests/fixtures_attended_results/standalone/files-tokens/fixture_cpp.cpp.json +0 -5
  875. package/tests/fixtures_attended_results/standalone/files-tokens/fixture_csharp.cs.json +0 -5
  876. package/tests/fixtures_attended_results/standalone/files-tokens/fixture_elixir.ex.json +0 -5
  877. package/tests/fixtures_attended_results/standalone/files-tokens/fixture_go.go.json +0 -5
  878. package/tests/fixtures_attended_results/standalone/files-tokens/fixture_haskell.hs.json +0 -5
  879. package/tests/fixtures_attended_results/standalone/files-tokens/fixture_java.java.json +0 -5
  880. package/tests/fixtures_attended_results/standalone/files-tokens/fixture_javascript.js.json +0 -5
  881. package/tests/fixtures_attended_results/standalone/files-tokens/fixture_kotlin.kt.json +0 -5
  882. package/tests/fixtures_attended_results/standalone/files-tokens/fixture_lua.lua.json +0 -5
  883. package/tests/fixtures_attended_results/standalone/files-tokens/fixture_perl.pl.json +0 -5
  884. package/tests/fixtures_attended_results/standalone/files-tokens/fixture_php.php.json +0 -5
  885. package/tests/fixtures_attended_results/standalone/files-tokens/fixture_python.py.json +0 -5
  886. package/tests/fixtures_attended_results/standalone/files-tokens/fixture_ruby.rb.json +0 -5
  887. package/tests/fixtures_attended_results/standalone/files-tokens/fixture_rust.rs.json +0 -5
  888. package/tests/fixtures_attended_results/standalone/files-tokens/fixture_scala.scala.json +0 -5
  889. package/tests/fixtures_attended_results/standalone/files-tokens/fixture_shell.sh.json +0 -5
  890. package/tests/fixtures_attended_results/standalone/files-tokens/fixture_swift.swift.json +0 -5
  891. package/tests/fixtures_attended_results/standalone/files-tokens/fixture_typescript.ts.json +0 -5
  892. package/tests/fixtures_attended_results/standalone/files-tokens/fixture_zig.zig.json +0 -5
  893. package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_c.c.json +0 -5
  894. package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_cpp.cpp.json +0 -5
  895. package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_csharp.cs.json +0 -5
  896. package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_elixir.ex.json +0 -5
  897. package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_go.go.json +0 -5
  898. package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_haskell.hs.json +0 -5
  899. package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_java.java.json +0 -5
  900. package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_javascript.js.json +0 -5
  901. package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_kotlin.kt.json +0 -5
  902. package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_lua.lua.json +0 -5
  903. package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_perl.pl.json +0 -5
  904. package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_php.php.json +0 -5
  905. package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_python.py.json +0 -5
  906. package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_ruby.rb.json +0 -5
  907. package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_rust.rs.json +0 -5
  908. package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_scala.scala.json +0 -5
  909. package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_shell.sh.json +0 -5
  910. package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_swift.swift.json +0 -5
  911. package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_typescript.ts.json +0 -5
  912. package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_zig.zig.json +0 -5
  913. package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_c.c.json +0 -5
  914. package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_cpp.cpp.json +0 -5
  915. package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_csharp.cs.json +0 -5
  916. package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_elixir.ex.json +0 -5
  917. package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_go.go.json +0 -5
  918. package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_haskell.hs.json +0 -5
  919. package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_java.java.json +0 -5
  920. package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_javascript.js.json +0 -5
  921. package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_kotlin.kt.json +0 -5
  922. package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_lua.lua.json +0 -5
  923. package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_perl.pl.json +0 -5
  924. package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_php.php.json +0 -5
  925. package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_python.py.json +0 -5
  926. package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_ruby.rb.json +0 -5
  927. package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_rust.rs.json +0 -5
  928. package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_scala.scala.json +0 -5
  929. package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_shell.sh.json +0 -5
  930. package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_swift.swift.json +0 -5
  931. package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_typescript.ts.json +0 -5
  932. package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_zig.zig.json +0 -5
  933. package/tests/helpers.ts +0 -236
  934. package/tests/oracle-project.test.ts +0 -67
  935. package/tests/oracle-standalone.test.ts +0 -68
  936. package/tests/prompt-command-summary.test.ts +0 -36
  937. package/tests/prompt-rendering.test.ts +0 -103
  938. package/tests/python_oracle_stubs/tiktoken.py +0 -76
  939. package/tests/release-workflow.test.ts +0 -195
  940. package/tests/static-check-bundled.test.ts +0 -332
@@ -1,5 +0,0 @@
1
- {
2
- "code": 0,
3
- "stdout": "@@@ tests/fixtures/fixture_javascript.js | javascript\n> Lines: 11-381\n```\nimport React from 'react';\nimport { useState, useEffect } from 'react';\nclass MyComponent {\n#instanceId;\nstatic #registry = new Map();\nstatic {\nconsole.log('MyComponent class loaded');\n}\nconstructor(id = 0) {\nthis.#instanceId = id;\nMyComponent.#registry.set(id, this);\n}\nrender() {\nreturn null;\n}\ngetId() {\nreturn this.#instanceId;\n}\nstatic has(id) {\nreturn MyComponent.#registry.has(id);\n}\n}\nclass EnhancedComponent extends MyComponent {\nrender() {\nsuper.render();\nreturn { type: 'div', children: [] };\n}\ncomponentDidMount() {\nconsole.log('mounted');\n}\n}\nfunction greet(name) {\nreturn \"Hello \" + name;\n}\nasync function fetchData() {\nreturn await fetch('/api');\n}\nconst handler = (event) => {\nevent.preventDefault();\nconsole.log(event.type);\n};\nconst processItems = ({ items, count }) => {\nreturn items.slice(0, count).map(i => i.toUpperCase());\n};\nconst MAX_SIZE = 100;\nconst PLUGIN_KEY = Symbol('plugin');\nconst MyWrapped = React.memo(() => {\nreturn null;\n});\nfunction* idGenerator() {\nlet id = 0;\nwhile (true) {\nyield id++;\n}\n}\nfunction* rangeGenerator(start, end) {\nfor (let i = start; i < end; i++) {\nyield i;\n}\n}\nasync function* asyncDataStream(url) {\nlet page = 0;\nwhile (true) {\nconst response = await fetch(`${url}?page=${page}`);\nconst data = await response.json();\nif (data.length === 0) {\nreturn;\n}\nyield data;\npage++;\n}\n}\nconst initResult = (() => {\nconst config = { debug: false };\nreturn Object.freeze(config);\n})();\nfunction createProxy(target) {\nreturn new Proxy(target, {\nget(obj, prop) {\nconsole.log(`Access: ${String(prop)}`);\nreturn Reflect.get(obj, prop);\n},\nset(obj, prop, value) {\nconsole.log(`Set: ${String(prop)} = ${value}`);\nreturn Reflect.set(obj, prop, value);\n},\n});\n}\nfunction buildDynamic(prefix) {\nreturn {\n[`${prefix}_name`]: 'value',\n[`${prefix}_id`]: 42,\n[Symbol.toPrimitive](hint) {\nreturn hint === 'string' ? prefix : 0;\n},\n};\n}\nfunction fetchAndProcess(url) {\nreturn fetch(url)\n.then(res => res.json())\n.then(data => {\nreturn { ...data, processed: true };\n})\n.catch(err => {\nconsole.error(err);\nreturn { error: true, processed: false };\n});\n}\nfunction configureApp({ host = 'localhost', port = 3000, db: { url: dbUrl = 'sqlite://' } = {} } = {}) {\nreturn { host, port, dbUrl };\n}\nconst fs = require('fs');\nconst _privateState = new WeakMap();\nfunction setPrivate(obj, data) {\n_privateState.set(obj, data);\n}\nasync function loadPlugin(name) {\nconst mod = await import(`./${name}.js`);\nreturn mod;\n}\nimport fs from 'fs';\nimport path from 'path';\nimport url from 'url';\nexport class ExtraService { constructor() { this.ready = true; } }\nclass HelperComponent { render() { return null; } }\nexport default class WidgetFactory { create() { return {}; } }\nconst BoundComponent = React.memo(() => null);\nconst ForwardedWidget = React.forwardRef((_, ref) => ({ ref }));\nconst LazyWidget = React.lazy(() => import('./Widget'));\nconst MemoPanel = memo(() => null);\nconst API_TOKEN = 'tok';\nconst CACHE_SIZE = 128;\nconst RETRY_LIMIT = 5;\nconst pathMod = require('path');\nconst cryptoMod = require('crypto');\nconst utilMod = require('util');\nconst osMod = require('os');\nfunction reqCoverJs1(value) { return value + 1; }\nfunction reqCoverJs2(value) { return value + 2; }\nfunction reqCoverJs3(value) { return value + 3; }\nfunction reqCoverJs4(value) { return value + 4; }\nfunction reqCoverJs5(value) { return value + 5; }\n```\n",
4
- "stderr": ""
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "code": 0,
3
- "stdout": "@@@ tests/fixtures/fixture_kotlin.kt | kotlin\n> Lines: 11-449\n```\nimport kotlin.collections.List\nimport kotlinx.coroutines.flow.Flow\nimport kotlinx.coroutines.flow.flow\n@Deprecated(\"Use UserV2 instead\", replaceWith = ReplaceWith(\"UserV2\"))\ndata class User(val name: String, val age: Int = 0)\nsealed class Result<out T> {\ndata class Success<T>(val value: T) : Result<T>()\ndata class Error(val message: String, val cause: Throwable? = null) : Result<Nothing>()\nobject Loading : Result<Nothing>()\nfun <R> map(transform: (T) -> R): Result<R> = when (this) {\nis Success -> Success(transform(value))\nis Error -> Error(message, cause)\nis Loading -> Loading\n}\n}\ninterface Repository<T> {\nfun findById(id: Int): T?\nfun save(entity: T): Boolean\nfun findAll(): Flow<T>\n}\nsealed interface Identifiable {\nval id: Int\n}\nenum class Color(val hex: String) {\nRED(\"#FF0000\"),\nGREEN(\"#00FF00\"),\nBLUE(\"#0000FF\");\ncompanion object {\nfun fromHex(hex: String): Color? = values().find { it.hex == hex }\n}\n}\ndata class Entity(\noverride val id: Int,\nval name: String,\nval status: String = \"active\",\n) : Identifiable\n@JvmInline\nvalue class EmailAddress(val value: String) {\ninit {\nrequire(value.contains('@')) { \"Invalid email: $value\" }\n}\nval domain: String get() = value.substringAfter('@')\n}\nfun greet(name: String): String {\nreturn \"Hello $name\"\n}\nsuspend fun fetchData(): String {\nreturn \"data\"\n}\nfun processItems(items: List<String>, transform: (String) -> String): List<String> {\nreturn items.map(transform)\n}\nfun String.wordCount(): Int {\nreturn this.trim().split(\"\\\\s+\".toRegex()).size\n}\nval String.lastChar: Char?\nget() = if (this.isEmpty()) null else this[this.length - 1]\ninline fun <reified T> filterByType(items: List<Any>): List<T> {\nreturn items.filterIsInstance<T>()\n}\ndata class Vector2(val x: Double, val y: Double) {\noperator fun plus(other: Vector2) = Vector2(x + other.x, y + other.y)\noperator fun unaryMinus() = Vector2(-x, -y)\noperator fun times(other: Vector2) = x * other.x + y * other.y\n}\nval PI = 3.14159265\nvar counter = 0\nobject Singleton {\nprivate val config = mutableMapOf<String, Any>()\nfun set(key: String, value: Any) {\nconfig[key] = value\n}\n@Suppress(\"UNCHECKED_CAST\")\nfun <T> get(key: String): T? = config[key] as? T\n}\ncompanion object Factory {\n}\nclass DelegatingList<T>(private val inner: MutableList<T>) : List<T> by inner {\nvar accessCount = 0\nprivate set\noverride val size: Int\nget() {\naccessCount++\nreturn inner.size\n}\n}\nclass Service {\nlateinit var dependency: Repository<Entity>\nval resource: String by lazy {\n\"expensive_resource\"\n}\nfun isReady(): Boolean = ::dependency.isInitialized\n}\nclass HtmlBuilder {\nprivate val elements = mutableListOf<String>()\nfun div(block: HtmlBuilder.() -> Unit) {\nval inner = HtmlBuilder()\ninner.block()\nelements.add(\"<div>${inner.build()}</div>\")\n}\nfun text(text: String) {\nelements.add(text)\n}\nfun build(): String = elements.joinToString(\"\")\n}\nfun html(block: HtmlBuilder.() -> Unit): String {\nval builder = HtmlBuilder()\nbuilder.block()\nreturn builder.build()\n}\nimport kotlin.math.max\nimport kotlin.math.min\ninterface Logger\ninterface Parser\ninterface Emitter\ninterface Formatter\nenum class ModeKt { FAST, SAFE }\nenum class PhaseKt { INIT, RUN }\nenum class StatusKt { READY, WAITING }\nenum class SignalKt { ON, OFF }\n@Synchronized\n@PublishedApi\nobject CacheStore\nvar retries = 0\nvar attempts = 0\nvar state = \"idle\"\nfun reqCoverKotlin1(value: Int): Int = value + 1\nfun reqCoverKotlin2(value: Int): Int = value + 2\nfun reqCoverKotlin3(value: Int): Int = value + 3\nfun reqCoverKotlin4(value: Int): Int = value + 4\nfun reqCoverKotlin5(value: Int): Int = value + 5\n```\n",
4
- "stderr": ""
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "code": 0,
3
- "stdout": "@@@ tests/fixtures/fixture_lua.lua | lua\n> Lines: 14-274\n```\nfunction globalFunc(x)\nreturn x + 1\nend\nlocal function localFunc(y)\nif type(y) ~= \"number\" then\nerror(\"expected number, got \" .. type(y))\nend\nreturn y * 2\nend\nlocal function sumAll(...)\nlocal total = 0\nlocal args = {...}\nfor _, v in ipairs(args) do\ntotal = total + v\nend\nreturn total\nend\nlocal myVar = 42\nlocal config = {\ndebug = false,\nmaxRetries = 3,\ntimeout = 30.0,\n}\nlocal handler = function(event)\nif event.type == \"click\" then\nprint(\"clicked at \" .. event.x .. \",\" .. event.y)\nelse\nprint(\"event: \" .. event.type)\nend\nend\nlocal MyModule = {}\nMyModule.__index = MyModule\nfunction MyModule.new(name)\nlocal self = setmetatable({}, MyModule)\nself.name = name\nself._items = {}\nreturn self\nend\nMyModule.method = function(self)\nreturn self.name\nend\nfunction MyModule:addItem(item)\ntable.insert(self._items, item)\nend\nfunction MyModule:count()\nreturn #self._items\nend\nlocal Animal = {}\nAnimal.__index = Animal\nfunction Animal.new(species)\nlocal self = setmetatable({}, Animal)\nself.species = species\nreturn self\nend\nfunction Animal:speak()\nreturn self.species .. \" says ...\"\nend\nlocal Dog = setmetatable({}, { __index = Animal })\nDog.__index = Dog\nfunction Dog.new(name)\nlocal self = Animal.new(\"Dog\")\nsetmetatable(self, Dog)\nself.dogName = name\nreturn self\nend\nfunction Dog:speak()\nreturn self.dogName .. \" says Woof!\"\nend\nlocal function makeCounter(step)\nlocal count = 0\nreturn function()\ncount = count + step\nreturn count\nend\nend\nlocal function fibonacci(limit)\nreturn coroutine.wrap(function()\nlocal a, b = 0, 1\nfor _ = 1, limit do\ncoroutine.yield(a)\na, b = b, a + b\nend\nend)\nend\nlocal function safeCall(fn, ...)\nlocal ok, result = pcall(fn, ...)\nif not ok then\nprint(\"Error: \" .. tostring(result))\nreturn false, nil\nend\nreturn true, result\nend\nlocal mixedTable = {\n\"first\",\n\"second\",\nname = \"test\",\ncount = 42,\n[math.pi] = \"pi\",\nnested = {\nx = 1,\ny = 2,\n},\n}\nlocal function range(from, to)\nlocal i = from - 1\nreturn function()\ni = i + 1\nif i <= to then\nreturn i\nend\nend\nend\nfunction req_cover_lua_1(value)\nreturn value + 1\nend\nfunction req_cover_lua_2(value)\nreturn value + 2\nend\nfunction req_cover_lua_3(value)\nreturn value + 3\nend\nfunction req_cover_lua_4(value)\nreturn value + 4\nend\nfunction req_cover_lua_5(value)\nreturn value + 5\nend\n```\n",
4
- "stderr": ""
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "code": 0,
3
- "stdout": "@@@ tests/fixtures/fixture_perl.pl | perl\n> Lines: 1-308\n```\n#!/usr/bin/perl\npackage MyPackage;\nuse strict;\nuse warnings;\nuse Carp qw(croak confess);\nrequire Exporter;\nuse constant MAX_SIZE => 100;\nuse constant {\nMIN_SIZE => 1,\nDEFAULT_NAME => 'unnamed',\n};\nour $VERSION = '1.0.0';\nour @EXPORT = qw(greet process);\nour @EXPORT_OK = qw(helper format_output);\nsub new {\nmy ($class, %args) = @_;\ncroak \"name is required\" unless $args{name};\nmy $self = bless {\nname => $args{name},\nage => $args{age} || 0,\n_items => [],\n_cache => {},\n}, $class;\nreturn $self;\n}\nsub name {\nmy ($self, $val) = @_;\nif (defined $val) {\n$self->{name} = $val;\nreturn $self;\n}\nreturn $self->{name};\n}\nsub is_valid {\nmy ($self) = @_;\nreturn defined($self->{name}) && length($self->{name}) > 0 ? 1 : 0;\n}\nsub greet {\nmy ($name) = @_;\nunless (defined $name) {\nwarn \"greet called without name\";\nreturn;\n}\nprint \"Hello $name\\n\";\n}\nsub process {\nreturn 1;\n}\nsub format_output {\nmy (@items) = @_;\nif (wantarray()) {\nreturn map { uc($_) } @items;\n} else {\nreturn scalar @items;\n}\n}\nsub helper {\nreturn \"ok\";\n}\nsub extract_emails {\nmy ($text) = @_;\nmy @emails;\nwhile ($text =~ /\\b([\\w.+-]+@[\\w-]+\\.[\\w.]+)\\b/g) {\npush @emails, $1;\n}\nreturn @emails;\n}\nsub replace_all {\nmy ($text, $pattern, $replacement) = @_;\n$text =~ s/$pattern/$replacement/g;\nreturn $text;\n}\nsub make_multiplier {\nmy ($factor) = @_;\nreturn sub {\nmy ($x) = @_;\nreturn $x * $factor;\n};\n}\nmy %dispatch = (\nadd => sub { $_[0] + $_[1] },\nsub => sub { $_[0] - $_[1] },\nmul => sub { $_[0] * $_[1] },\ndiv => sub {\ncroak \"Division by zero\" if $_[1] == 0;\nreturn $_[0] / $_[1];\n},\n);\nsub dispatch {\nmy ($op, $a, $b) = @_;\nmy $handler = $dispatch{$op}\nor croak \"Unknown operation: $op\";\nreturn $handler->($a, $b);\n}\nsub generate_template {\nmy ($name) = @_;\nreturn <<END_TEMPLATE;\nDear $name,\nThis is a generated template.\nVersion: $VERSION\nMax size: @{[ MAX_SIZE ]}\nRegards,\nThe System\nEND_TEMPLATE\n}\nsub AUTOLOAD {\nmy ($self, @args) = @_;\nour $AUTOLOAD;\nmy $method = $AUTOLOAD;\n$method =~ s/.*:://;\nreturn if $method eq 'DESTROY';\nif ($method =~ /^get_(\\w+)$/) {\nmy $attr = $1;\nreturn $self->{$attr};\n}\ncroak \"Undefined method: $method\";\n}\nsub safe_execute {\nmy ($code) = @_;\nmy $result = eval {\n$code->();\n};\nif ($@) {\nwarn \"Caught error: $@\";\nreturn undef;\n}\nreturn $result;\n}\n1;\npackage Extra::One;\npackage Extra::Two;\npackage Extra::Three;\npackage Extra::Four;\nuse constant RETRY_LIMIT => 5;\nuse constant API_HOST => 'localhost';\nuse constant FEATURE_FLAG => 1;\nuse constant CACHE_SIZE => 256;\nuse constant DEFAULT_USER => 'guest';\nuse lib 'lib';\nsub req_cover_perl_1 {\nmy ($value) = @_;\nreturn $value + 1;\n}\nsub req_cover_perl_2 {\nmy ($value) = @_;\nreturn $value + 2;\n}\nsub req_cover_perl_3 {\nmy ($value) = @_;\nreturn $value + 3;\n}\nsub req_cover_perl_4 {\nmy ($value) = @_;\nreturn $value + 4;\n}\nsub req_cover_perl_5 {\nmy ($value) = @_;\nreturn $value + 5;\n}\n```\n",
4
- "stderr": ""
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "code": 0,
3
- "stdout": "@@@ tests/fixtures/fixture_php.php | php\n> Lines: 1-431\n```\n<?php\nnamespace App\\Models;\nuse App\\Contracts\\Repository;\nuse App\\Events\\{ModelCreated, ModelDeleted};\nuse Psr\\Log\\LoggerInterface;\nrequire_once 'config.php';\nconst VERSION = \"1.0\";\nconst MAX_PER_PAGE = 50;\nenum Status: string {\ncase Draft = 'draft';\ncase Published = 'published';\ncase Archived = 'archived';\npublic function isActive(): bool {\nreturn $this === self::Published;\n}\npublic function label(): string {\nreturn match($this) {\nself::Draft => 'Draft',\nself::Published => 'Published',\nself::Archived => 'Archived',\n};\n}\n}\nabstract class BaseModel {\npublic function __construct(\npublic readonly int $id,\npublic readonly \\DateTimeImmutable $createdAt = new \\DateTimeImmutable(),\n) {}\npublic function save(): bool {\nif (!$this->validate()) {\nreturn false;\n}\nreturn true;\n}\nabstract protected function validate(): bool;\nprivate static function validateConstraints(): bool {\nreturn true;\n}\nabstract public function toArray(): array;\n}\nfinal class User extends BaseModel {\nprivate string $name;\nprivate ?string $email;\npublic function __construct(\nint $id,\nstring $name,\n?string $email = null,\n) {\nparent::__construct($id);\n$this->name = $name;\n$this->email = $email;\n}\npublic function getName(): string {\nreturn $this->name;\n}\npublic function getIdentifier(): string|int {\nreturn $this->email ?? $this->id;\n}\nprotected function validate(): bool {\nreturn strlen($this->name) > 0;\n}\npublic function toArray(): array {\nreturn [\n'id' => $this->id,\n'name' => $this->name,\n'email' => $this->email,\n];\n}\n}\ninterface Repo {\npublic function findAll(): iterable;\npublic function findById(int $id): ?BaseModel;\npublic function count(array $criteria = []): int;\n}\ntrait Cacheable {\nprotected int $cacheTtl = 3600;\npublic function cache(): bool {\nreturn true;\n}\npublic function invalidateCache(): void {\n}\nabstract public function cacheKey(): string;\n}\ntrait SoftDeletable {\nprotected ?\\DateTimeImmutable $deletedAt = null;\npublic function softDelete(): void {\n$this->deletedAt = new \\DateTimeImmutable();\n}\npublic function isDeleted(): bool {\nreturn $this->deletedAt !== null;\n}\n}\nfinal class CachedUser extends User {\nuse Cacheable;\nuse SoftDeletable;\npublic function cacheKey(): string {\nreturn \"user:{$this->id}\";\n}\n}\n#[\\Attribute(\\Attribute::TARGET_METHOD | \\Attribute::IS_REPEATABLE)]\nclass Route {\npublic function __construct(\npublic readonly string $path,\npublic readonly string $method = 'GET',\n) {}\n}\nfunction helper(): bool {\nreturn true;\n}\nfunction processData(mixed $data): string {\nreturn match(true) {\nis_string($data) => \"string: \" . strlen($data),\nis_int($data) => \"int: $data\",\nis_array($data) => \"array: \" . count($data),\n$data instanceof BaseModel => \"model: \" . $data->id,\ndefault => \"unknown\",\n};\n}\nfunction applyTransform(array $items, callable $fn): array {\nreturn array_map(fn(int $x): int => $fn($x), $items);\n}\nfunction createMultiplier(int $factor): \\Closure {\nreturn fn(int $x): int => $x * $factor;\n}\nfunction readFileContent(string $path): string|false {\nif (!file_exists($path)) {\nreturn false;\n}\nreturn file_get_contents($path);\n}\nnamespace App\\Services;\nnamespace App\\Http;\nnamespace App\\Domain;\nnamespace App\\Support;\ninterface ServiceContract {}\ninterface CacheContract {}\ninterface LoggerContract {}\ninterface EventContract {}\ntrait HandlesEvents {}\ntrait TracksChanges {}\ntrait AuthorizesRequests {}\nconst API_LIMIT = 50;\nconst DEFAULT_PAGE = 1;\nconst TIMEOUT = 30;\nfinal class ApiClient {}\nfunction req_cover_php_1(int $value): int { return $value + 1; }\nfunction req_cover_php_2(int $value): int { return $value + 2; }\nfunction req_cover_php_3(int $value): int { return $value + 3; }\nfunction req_cover_php_4(int $value): int { return $value + 4; }\nfunction req_cover_php_5(int $value): int { return $value + 5; }\n```\n",
4
- "stderr": ""
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "code": 0,
3
- "stdout": "@@@ tests/fixtures/fixture_python.py | python\n> Lines: 1-500\n```\n#!/usr/bin/env python3\nimport asyncio\nimport os\nimport sys\nfrom pathlib import Path\nfrom typing import (\n Optional, List, Dict, Union, Protocol,\n TypeVar, Generic, Iterator, AsyncIterator\n)\nfrom dataclasses import dataclass, field\nfrom abc import ABC, abstractmethod\nfrom contextlib import contextmanager\nMAX_RETRIES = 3\nDEFAULT_TIMEOUT = 30.0\n_INTERNAL_CACHE: Dict[str, int] = {}\nT = TypeVar(\"T\")\n@dataclass(slots=True)\nclass Config:\n name: str\n values: Dict[str, str] = field(default_factory=dict)\n debug: bool = False\n def get(self, key: str, default: str = \"\") -> str:\n if key in self.values:\n return self.values[key]\n return default\n def __post_init__(self) -> None:\n if not self.name.strip():\n raise ValueError(\"Config name cannot be empty\")\nclass MyClass:\n class InnerHelper:\n def __init__(self, tag: str):\n self.tag = tag\n def describe(self) -> str:\n return f\"Helper({self.tag})\"\n def __init__(self, name: str, retries: int = MAX_RETRIES):\n self._name = name\n self._retries = retries\n self._call_count = 0\n @property\n def name(self) -> str:\n return self._name\n @name.setter\n def name(self, value: str) -> None:\n if not value:\n raise ValueError(\"Name cannot be empty\")\n self._name = value\n @staticmethod\n def create_default() -> \"MyClass\":\n return MyClass(\"default\")\n @classmethod\n def from_dict(cls, data: dict) -> \"MyClass\":\n return cls(\n name=data[\"name\"],\n retries=data.get(\"retries\", MAX_RETRIES),\n )\n def process(self, items: List[str], *, verbose: bool = False) -> Optional[str]:\n self._call_count += 1\n for item in items:\n if not item.strip():\n continue\n if verbose:\n print(f\"Processing: {item}\")\n return item if len(item) > 1 else item.upper()\n return None\n def compute(self, x: int, y: int) -> int:\n return (x + y) if (x > 0 and y > 0) else abs(x - y)\nclass AbstractProcessor(ABC):\n @abstractmethod\n def execute(self, data: bytes) -> bool:\n ...\n @abstractmethod\n async def execute_async(self, data: bytes) -> bool:\n ...\nclass ConcreteProcessor(AbstractProcessor):\n def execute(self, data: bytes) -> bool:\n try:\n text = data.decode(\"utf-8\")\n return bool(text.strip())\n except UnicodeDecodeError:\n return False\n finally:\n pass\n async def execute_async(self, data: bytes) -> bool:\n return self.execute(data)\nclass GenericContainer(Generic[T]):\n def __init__(self) -> None:\n self._items: List[T] = []\n def add(self, item: T) -> None:\n self._items.append(item)\n def __iter__(self) -> Iterator[T]:\n yield from self._items\n def find(self, predicate) -> Optional[T]:\n for item in self._items:\n if predicate(item):\n return item\n return None\nclass Renderable(Protocol):\n def render(self) -> str:\n ...\n@property\ndef regular_function(x: int) -> int:\n return x\ndef function_with_walrus(data: List[int]) -> Optional[int]:\n if (n := next((x for x in data if x > 10), None)) is not None:\n return n\n return None\ndef multi_return_paths(value: int) -> Union[str, int, None]:\n match value:\n case 0:\n return \"zero\"\n case n if n < 0:\n return abs(n)\n case n if n > 100:\n return None\n case _:\n return str(value)\ndef generator_function(limit: int) -> Iterator[int]:\n for i in range(limit):\n yield i * i\nasync def async_generator(items: List[str]) -> AsyncIterator[str]:\n for item in items:\n if item.strip():\n yield item.upper()\n@contextmanager\ndef managed_resource(path: str):\n f = open(path, \"r\")\n try:\n yield f\n finally:\n f.close()\ndef closure_factory(multiplier: int):\n def inner(x: int) -> int:\n return x * multiplier\n return inner\ndef uses_unpacking(*args: int, **kwargs: str) -> Dict[str, Union[int, str]]:\n result: Dict[str, Union[int, str]] = {}\n for i, val in enumerate(args):\n result[f\"arg_{i}\"] = val\n result.update(kwargs)\n return result\ntransform = lambda x: x * 2 + 1\nEVEN_SQUARES = [x ** 2 for x in range(20) if x % 2 == 0]\nasync def async_function():\n await asyncio.sleep(0)\ndef deeply_nested_logic(matrix: List[List[int]]) -> int:\n total = 0\n for row in matrix:\n for val in row:\n if val > 0:\n if val % 2 == 0:\n total += val\n else:\n continue\n else:\n pass\n return total\ndef exception_handling_example(path: str) -> Optional[str]:\n try:\n with open(path, \"r\") as f:\n content = f.read()\n if not content:\n raise ValueError(\"Empty file\")\n return content\n except FileNotFoundError:\n return None\n except (PermissionError, OSError) as e:\n sys.exit(1)\n except Exception:\n raise\n finally:\n pass\nMAX_BATCH = 64\nCACHE_LIMIT = 128\nMAX_USERS = 500\ndef req_cover_py_1(value: int) -> int:\n return value + 1\ndef req_cover_py_2(value: int) -> int:\n return value + 2\ndef req_cover_py_3(value: int) -> int:\n return value + 3\ndef req_cover_py_4(value: int) -> int:\n return value + 4\ndef req_cover_py_5(value: int) -> int:\n return value + 5\n```\n",
4
- "stderr": ""
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "code": 0,
3
- "stdout": "@@@ tests/fixtures/fixture_ruby.rb | ruby\n> Lines: 10-343\n```\nrequire 'json'\nrequire 'set'\nrequire_relative 'helper'\nMAX_RETRIES = 42\nDEFAULT_ENCODING = 'utf-8'.freeze\nattr_accessor :name, :age\nmodule Loggable\ndef log(message)\nputs \"[#{self.class.name}] #{message}\"\nend\ndef log_error(error)\nputs \"[ERROR] #{error.message}\"\nputs error.backtrace.first(5).join(\"\\n\") if error.backtrace\nend\nend\nclass MyClass\ninclude Loggable\ninclude Comparable\nattr_accessor :name\nattr_reader :created_at\ndef initialize(name, **options)\n@name = name\n@options = options\n@created_at = Time.now\n@options[:retries] ||= MAX_RETRIES\nend\ndef self.create(attrs)\nnew(attrs[:name], **attrs.except(:name))\nend\ndef self.bulk_create(names)\nnames.map { |n| new(n) }\nend\ndef valid?\n!@name.nil? && !@name.empty?\nend\ndef matches?(pattern)\nreturn false if @name.nil?\npattern.match?(@name)\nend\ndef <=>(other)\n@name <=> other.name\nend\ndef +(other)\nself.class.new(\"#{@name}+#{other.name}\")\nend\ndef to_s\n\"MyClass(#{@name})\"\nend\ndef method_missing(method, *args, &block)\nif method.to_s.start_with?('find_by_')\nfield = method.to_s.sub('find_by_', '')\n\"Finding by #{field}: #{args.first}\"\nelse\nsuper\nend\nend\ndef respond_to_missing?(method, include_private = false)\nmethod.to_s.start_with?('find_by_') || super\nend\nprotected\ndef internal_config\n@options.dup\nend\nprivate\ndef validate!\nraise \"Invalid name\" unless valid?\nend\nend\nclass SpecialClass < MyClass\ndef initialize(name, priority: 0, **options)\nsuper(name, **options)\n@priority = priority\nend\ndef to_s\n\"SpecialClass(#{@name}, pri=#{@priority})\"\nend\nend\nmodule MyModule\ndef helper\ntrue\nend\ndef process_with_block(data)\nif block_given?\nyield(data)\nelse\ndata\nend\nend\ndef self.format_list(items)\nitems.map(&:to_s).join(', ')\nend\nend\nCoordinate = Struct.new(:x, :y) do\ndef distance_from_origin\nMath.sqrt(x**2 + y**2)\nend\nend\nclass DynamicModel\n%w[title body author].each do |field|\ndefine_method(field) do\ninstance_variable_get(\"@#{field}\")\nend\ndefine_method(\"#{field}=\") do |value|\ninstance_variable_set(\"@#{field}\", value)\nend\nend\nend\ndoubler = ->(x) { x * 2 }\ngreeting_proc = Proc.new { |name| \"Hello, #{name}!\" }\ndef with_retry(attempts: MAX_RETRIES)\ntries = 0\nbegin\ntries += 1\nyield\nrescue StandardError => e\nretry if tries < attempts\nraise \"Failed after #{attempts} attempts: #{e.message}\"\nensure\nputs \"Completed after #{tries} attempt(s)\"\nend\nend\nmodule StringExtensions\nrefine String do\ndef email?\nmatch?(/\\A[\\w+\\-.]+@[a-z\\d\\-]+(\\.[a-z\\d\\-]+)*\\.[a-z]+\\z/i)\nend\nend\nend\nclass ServiceObject; end\nclass ReportBuilder; end\nmodule Metrics; end\nmodule Extras; end\nMAX_LIMIT = 100\nAPI_VERSION = \"v2\"\nCACHE_SIZE = 1024\nattr_writer :token\nattr_reader :state\nrequire 'yaml'\nrequire 'logger'\ndef req_cover_ruby_1(value)\nvalue + 1\nend\ndef req_cover_ruby_2(value)\nvalue + 2\nend\ndef req_cover_ruby_3(value)\nvalue + 3\nend\ndef req_cover_ruby_4(value)\nvalue + 4\nend\ndef req_cover_ruby_5(value)\nvalue + 5\nend\n```\n",
4
- "stderr": ""
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "code": 0,
3
- "stdout": "@@@ tests/fixtures/fixture_rust.rs | rust\n> Lines: 9-378\n```\nuse std::io;\nuse std::collections::HashMap;\nuse std::fmt::{self, Display, Formatter};\nuse std::sync::{Arc, Mutex};\n#[derive(Debug, Clone, PartialEq)]\npub struct MyStruct {\nfield: i32,\n}\n#[derive(Debug)]\npub struct BorrowedData<'a> {\ncontent: &'a str,\ntag: u64,\n}\npub struct TypedMap<K: std::hash::Hash + Eq, V: Clone> {\ninner: HashMap<K, V>,\n}\npub enum MyEnum {\nA,\nB(String),\nC { x: i32, y: i32 },\n}\npub trait MyTrait {\nfn do_work(&self);\nfn do_work_with_ctx(&self, ctx: &str) -> bool {\nprintln!(\"ctx: {}\", ctx);\nself.do_work();\ntrue\n}\n}\npub trait Parser<'a> {\ntype Output;\nfn parse(&self, input: &'a [u8]) -> Result<Self::Output, io::Error>;\n}\nimpl MyStruct {\nfn new() -> Self {\nSelf { field: 0 }\n}\npub fn with_value(val: i32) -> Self {\nSelf { field: val }\n}\npub fn value(&self) -> i32 {\nself.field\n}\npub fn try_update(&mut self, new_val: i32) -> Option<i32> {\nif new_val == self.field {\nreturn None;\n}\nlet old = self.field;\nself.field = new_val;\nSome(old)\n}\n}\nimpl MyTrait for MyStruct {\nfn do_work(&self) {\nprintln!(\"{:?}\", self);\n}\n}\nimpl Display for MyStruct {\nfn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {\nwrite!(f, \"MyStruct({})\", self.field)\n}\n}\nimpl<K, V> TypedMap<K, V>\nwhere\nK: std::hash::Hash + Eq + Display,\nV: Clone + Default,\n{\npub fn insert(&mut self, key: K, value: V) -> Option<V> {\nself.inner.insert(key, value)\n}\npub fn get_or_default(&self, key: &K) -> V {\nmatch self.inner.get(key) {\nSome(v) => v.clone(),\nNone => V::default(),\n}\n}\n}\npub mod my_module;\npub(crate) mod internal {\npub(crate) static COUNTER: std::sync::atomic::AtomicUsize =\nstd::sync::atomic::AtomicUsize::new(0);\n}\nmacro_rules! hashmap {\n($($key:expr => $val:expr),* $(,)?) => {{\nlet mut map = HashMap::new();\n$(map.insert($key, $val);)*\nmap\n}};\n}\nmacro_rules! my_macro {\n() => {};\n($x:expr) => { println!(\"{}\", $x) };\n($x:expr, $($rest:expr),+) => {\nprint!(\"{}, \", $x);\nmy_macro!($($rest),+);\n};\n}\nconst MY_CONST: i32 = 42;\nstatic MY_STATIC: i32 = 0;\nstatic CONFIG: std::sync::LazyLock<HashMap<String, String>> =\nstd::sync::LazyLock::new(|| HashMap::new());\npub type IoResult<T> = Result<T, io::Error>;\npub type MyAlias = i32;\npub fn my_function(input: Option<&str>) -> String {\nlet text = match input {\nSome(s) if !s.is_empty() => s,\nSome(_) => return String::from(\"empty\"),\nNone => return String::from(\"none\"),\n};\ntext.to_uppercase()\n}\npub async fn async_function() -> String {\nString::from(\"hello async\")\n}\npub fn filter_with<F>(items: &[i32], predicate: F) -> Vec<i32>\nwhere\nF: Fn(&i32) -> bool,\n{\nitems.iter().copied().filter(|x| predicate(x)).collect()\n}\npub fn create_worker(use_struct: bool) -> Box<dyn MyTrait> {\nif use_struct {\nBox::new(MyStruct::new())\n} else {\npanic!(\"No alternative implementation available\");\n}\n}\npub unsafe fn read_raw(ptr: *const i32) -> i32 {\n*ptr\n}\npub extern \"C\" fn ffi_double(x: i32) -> i32 {\nx * 2\n}\npub fn describe_enum(val: &MyEnum) -> String {\nmatch val {\nMyEnum::A => String::from(\"unit\"),\nMyEnum::B(s) => format!(\"string: {}\", s),\nMyEnum::C { x, y } => {\nlet mag = ((x * x + y * y) as f64).sqrt();\nformat!(\"point({}, {}) mag={:.2}\", x, y, mag)\n}\n}\n}\nuse std::time::Duration;\npub mod ext_tools { pub fn id() -> i32 { 1 } }\nmod ext_local { pub fn ping() -> i32 { 2 } }\npub mod ext_api { pub fn pong() -> i32 { 3 } }\n#[inline]\n#[allow(dead_code)]\n#[cfg(test)]\npub enum Status { Ready, Busy }\npub enum Mode { Alpha, Beta }\npub enum Signal { On, Off }\npub enum ErrorKind { Io, Parse }\npub struct ExtraNode { pub id: i32 }\nstruct InnerNode { id: i32 }\npub trait Inspectable { fn inspect(&self) -> i32; }\ntrait Named { fn name(&self) -> &'static str; }\npub trait Executable { fn exec(&self) -> i32; }\nimpl Inspectable for ExtraNode { fn inspect(&self) -> i32 { self.id } }\nimpl Named for InnerNode { fn name(&self) -> &'static str { \"inner\" } }\nimpl Executable for MyEnum { fn exec(&self) -> i32 { 1 } }\nmacro_rules! ext_macro { () => { 42 } }\nmacro_rules! trace_macro { ($v:expr) => { $v }; }\nmacro_rules! build_pair { ($a:expr,$b:expr) => { ($a,$b) }; }\npub const LIMIT: usize = 8;\npub type ItemId = u64;\ntype AliasValue = i32;\nfn req_cover_rust_1(value: i32) -> i32 { value + 1 }\nfn req_cover_rust_2(value: i32) -> i32 { value + 2 }\nfn req_cover_rust_3(value: i32) -> i32 { value + 3 }\nfn req_cover_rust_4(value: i32) -> i32 { value + 4 }\nfn req_cover_rust_5(value: i32) -> i32 { value + 5 }\n```\n",
4
- "stderr": ""
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "code": 0,
3
- "stdout": "@@@ tests/fixtures/fixture_scala.scala | scala\n> Lines: 11-397\n```\nimport scala.collection.mutable\nimport scala.concurrent.{Future, ExecutionContext}\nimport scala.util.{Try, Success, Failure}\ncase class Person(name: String, age: Int) {\ndef isAdult: Boolean = age >= 18\ndef greet: String = s\"Hi, I'm $name, age $age\"\n}\nsealed trait Shape {\ndef area: Double\n}\ncase class Circle(radius: Double) extends Shape {\noverride def area: Double = math.Pi * radius * radius\n}\ncase class Rectangle(width: Double, height: Double) extends Shape {\noverride def area: Double = width * height\n}\nabstract class Animal {\ndef sound: String\ndef describe: String = s\"I am a ${getClass.getSimpleName} and I say $sound\"\n}\ntrait Drawable {\ndef draw(): Unit\n}\ntrait Logging { self: Drawable =>\ndef logAndDraw(): Unit = {\nprintln(\"About to draw\")\ndraw()\n}\n}\ntrait Serializable {\ndef serialize: Array[Byte]\n}\nobject Main {\ndef main(args: Array[String]): Unit = {\nval people = List(Person(\"Alice\", 30), Person(\"Bob\", 17))\nval adults = people.filter(_.isAdult)\nadults.foreach(p => println(p.greet))\n}\noverride def toString: String = \"Main\"\nval pi = 3.14159265\nvar counter = 0\ntype StringList = List[String]\ntype Transformer[A] = A => A\ndef describeShape(shape: Shape): String = shape match {\ncase Circle(r) => s\"Circle with radius $r, area=${shape.area}\"\ncase Rectangle(w, h) => s\"Rectangle ${w}x${h}, area=${shape.area}\"\n}\ndef classify(x: Int): String = x match {\ncase 0 => \"zero\"\ncase n if n < 0 => \"negative\"\ncase n if n > 100 => \"large\"\ncase _ => \"positive\"\n}\n}\nclass Config private (val entries: Map[String, String]) {\ndef get(key: String): Option[String] = entries.get(key)\n}\nobject Config {\ndef apply(entries: (String, String)*): Config = new Config(entries.toMap)\ndef empty: Config = new Config(Map.empty)\n}\nclass Container[+A](val value: A) {\ndef map[B](f: A => B): Container[B] = new Container(f(value))\ndef flatMap[B](f: A => Container[B]): Container[B] = f(value)\n}\nimplicit class RichInt(val n: Int) extends AnyVal {\ndef isEven: Boolean = n % 2 == 0\ndef times(s: String): String = s * n\n}\nobject ForCompExample {\ndef findPairs(range: Int, target: Int): List[(Int, Int)] = {\nfor {\nx <- (1 to range).toList\ny <- (x to range).toList\nif x + y == target\n} yield (x, y)\n}\n}\nobject FuncUtils {\ndef add(a: Int)(b: Int): Int = a + b\ndef twice[A](f: A => A)(x: A): A = f(f(x))\ndef compose[A, B, C](f: A => B, g: B => C): A => C = a => g(f(a))\n}\nimport scala.util.Random\nimport scala.concurrent.duration._\ntrait Runner\ntrait Parser\nobject Metrics\nval MaxUsers = 100\nval RetryLimit = 3\ntype UserKey = String\ntype ErrorCode = Int\ntype Mapper = String => String\nvar attempts = 0\nvar cursor = 1\nvar stage = \"init\"\nvar status = \"ready\"\nobject ReqCoverScala {\ndef reqCoverScala1(value: Int): Int = value + 1\ndef reqCoverScala2(value: Int): Int = value + 2\ndef reqCoverScala3(value: Int): Int = value + 3\ndef reqCoverScala4(value: Int): Int = value + 4\ndef reqCoverScala5(value: Int): Int = value + 5\n}\n```\n",
4
- "stderr": ""
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "code": 0,
3
- "stdout": "@@@ tests/fixtures/fixture_shell.sh | shell\n> Lines: 1-274\n```\n#!/bin/bash\nMY_VAR=\"hello\"\nexport PATH_EXT=\"/usr/local/bin\"\nreadonly MAX_COUNT=10\ndeclare -r BUILD_VERSION=\"1.0.0\"\nDEBUG_MODE=0\ndeclare -a LANGUAGES=(\"python\" \"rust\" \"go\" \"java\" \"typescript\")\ndeclare -A EXT_MAP=(\n[py]=\"python\"\n[rs]=\"rust\"\n[go]=\"go\"\n[java]=\"java\"\n[ts]=\"typescript\"\n)\nfunction greet() {\nlocal name=\"${1:?Name required}\"\nif [[ -z \"$name\" ]]; then\necho \"Error: empty name\" >&2\nreturn 1\nfi\necho \"Hello ${name}!\"\n}\ncleanup() {\nlocal tmp_dir=\"${TMPDIR:-/tmp}/myapp_$$\"\nif [[ -d \"$tmp_dir\" ]]; then\nrm -rf \"$tmp_dir\"\nfi\necho \"Cleanup complete\"\n}\nparse_args() {\nlocal opt\nwhile getopts \"vdhf:o:\" opt; do\ncase \"$opt\" in\nv)\nVERBOSE=1\n;;\nd)\nDEBUG_MODE=1\n;;\nf)\nINPUT_FILE=\"$OPTARG\"\n;;\no)\nOUTPUT_FILE=\"$OPTARG\"\n;;\nh)\necho \"Usage: $0 [-v] [-d] [-f file] [-o output] [-h]\"\nreturn 0\n;;\n*)\necho \"Unknown option: $opt\" >&2\nreturn 1\n;;\nesac\ndone\nshift $((OPTIND - 1))\n}\nprocess_file() {\nlocal input=\"$1\"\nlocal output=\"${2:-/dev/stdout}\"\nif [[ ! -f \"$input\" ]]; then\necho \"Error: file not found: $input\" >&2\nreturn 1\nfi\nif [[ ! -r \"$input\" ]]; then\necho \"Error: file not readable: $input\" >&2\nreturn 1\nfi\nlocal line_count\nline_count=$(wc -l < \"$input\")\necho \"Processing $input ($line_count lines)\" >&2\nwhile IFS= read -r line; do\n[[ -z \"$line\" || \"$line\" =~ ^[[:space:]]*\necho \"$line\"\ndone < \"$input\" > \"$output\"\nreturn 0\n}\nretry_command() {\nlocal max_attempts=\"$1\"\nshift\nlocal attempt=1\nwhile (( attempt <= max_attempts )); do\nif \"$@\"; then\nreturn 0\nfi\necho \"Attempt $attempt/$max_attempts failed\" >&2\n(( attempt++ ))\nsleep $(( 2 ** (attempt - 1) ))\ndone\necho \"All $max_attempts attempts failed\" >&2\nreturn 1\n}\nlog_message() {\nlocal level=\"$1\"\nshift\nlocal timestamp\ntimestamp=$(date '+%Y-%m-%d %H:%M:%S')\necho \"[$timestamp] [$level] $*\" >&2\n}\nmake_temp() {\nlocal tmpfile\ntmpfile=$(mktemp \"${TMPDIR:-/tmp}/myapp_XXXXXX\")\necho \"$tmpfile\"\n}\ntrap cleanup EXIT\ntrap 'echo \"Interrupted\"; exit 130' INT TERM\ngenerate_config() {\ncat <<EOF\nversion=${BUILD_VERSION}\ndebug=${DEBUG_MODE}\nmax_count=${MAX_COUNT}\nEOF\n}\nfactorial() {\nlocal n=\"${1:-1}\"\nlocal result=1\nlocal i\nfor (( i = 2; i <= n; i++ )); do\n(( result *= i ))\ndone\necho \"$result\"\n}\nif [[ -f ./config.sh ]]; then\nsource ./config.sh\nfi\nsource ./env.sh\n. ./helpers.sh\nsource ./shared.sh\n. ./paths.sh\nsource ./runtime.sh\n. ./exports.sh\nsource ./network.sh\nreq_cover_shell_1() {\necho \"$(( $1 + 1 ))\"\n}\nreq_cover_shell_2() {\necho \"$(( $1 + 2 ))\"\n}\nreq_cover_shell_3() {\necho \"$(( $1 + 3 ))\"\n}\nreq_cover_shell_4() {\necho \"$(( $1 + 4 ))\"\n}\nreq_cover_shell_5() {\necho \"$(( $1 + 5 ))\"\n}\n```\n",
4
- "stderr": ""
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "code": 0,
3
- "stdout": "@@@ tests/fixtures/fixture_swift.swift | swift\n> Lines: 8-395\n```\nimport Foundation\nimport Combine\nclass Animal {\nvar species: String\nvar legs: Int = 4 {\nwillSet {\nprint(\"Legs changing from \\(legs) to \\(newValue)\")\n}\ndidSet {\nif legs < 0 { legs = 0 }\n}\n}\nvar description: String {\nreturn \"\\(species) with \\(legs) legs\"\n}\ninit(species: String) {\nself.species = species\n}\nfunc speak() {\nprint(\"...\")\n}\nclass func createDefault() -> Animal {\nreturn Animal(species: \"Unknown\")\n}\ndeinit {\nprint(\"\\(species) deallocated\")\n}\n}\nclass Dog: Animal {\nlet name: String\ninit(name: String) {\nself.name = name\nsuper.init(species: \"Dog\")\n}\noverride func speak() {\nprint(\"\\(name) says: Woof!\")\n}\n}\nstruct Point: Equatable {\nvar x: Double = 0.0\nvar y: Double = 0.0\nstatic func + (lhs: Point, rhs: Point) -> Point {\nreturn Point(x: lhs.x + rhs.x, y: lhs.y + rhs.y)\n}\nvar magnitude: Double {\nreturn (x * x + y * y).squareRoot()\n}\n}\nstruct Matrix {\nprivate var data: [[Double]]\nlet rows: Int\nlet cols: Int\ninit(rows: Int, cols: Int) {\nself.rows = rows\nself.cols = cols\ndata = Array(repeating: Array(repeating: 0.0, count: cols), count: rows)\n}\nsubscript(row: Int, col: Int) -> Double {\nget { return data[row][col] }\nset { data[row][col] = newValue }\n}\n}\nenum Direction: String, CaseIterable {\ncase up = \"UP\"\ncase down = \"DOWN\"\ncase left = \"LEFT\"\ncase right = \"RIGHT\"\nvar opposite: Direction {\nswitch self {\ncase .up: return .down\ncase .down: return .up\ncase .left: return .right\ncase .right: return .left\n}\n}\n}\nenum AppResult<T> {\ncase success(T)\ncase failure(Error)\nfunc map<U>(_ transform: (T) -> U) -> AppResult<U> {\nswitch self {\ncase .success(let value):\nreturn .success(transform(value))\ncase .failure(let error):\nreturn .failure(error)\n}\n}\n}\nprotocol Drawable {\nfunc draw() -> String\nvar renderPriority: Int { get }\n}\nprotocol Container {\nassociatedtype Item\nmutating func add(_ item: Item)\nvar count: Int { get }\n}\nextension Drawable {\nvar renderPriority: Int { return 0 }\nfunc debugDraw() -> String {\nreturn \"[\\(renderPriority)] \\(draw())\"\n}\n}\nextension Animal: Drawable {\nfunc draw() -> String {\nreturn description\n}\nfunc describe() -> String {\nreturn \"Animal: \\(species)\"\n}\n}\n@propertyWrapper\nstruct Clamped<Value: Comparable> {\nlet min: Value\nlet max: Value\nprivate var value: Value\nvar wrappedValue: Value {\nget { return value }\nset { value = Swift.min(Swift.max(newValue, min), max) }\n}\ninit(wrappedValue: Value, min: Value, max: Value) {\nself.min = min\nself.max = max\nself.value = Swift.min(Swift.max(wrappedValue, min), max)\n}\n}\nactor Counter {\nprivate var value: Int = 0\nfunc increment() -> Int {\nvalue += 1\nreturn value\n}\nfunc reset() {\nvalue = 0\n}\n}\npublic func greet(name: String) {\nprint(\"Hello \\(name)\")\n}\nfunc makeDrawable() -> some Drawable {\nreturn Animal(species: \"Cat\")\n}\nfunc contains<T: Collection>(items: T, target: T.Element) -> Bool where T.Element: Equatable {\nreturn items.contains(target)\n}\nfunc deferred(_ action: @escaping () -> Void) -> () -> Void {\nreturn {\naction()\n}\n}\nlet MAX_SIZE = 1024\nprivate var counter = 0\nlet defaultConfig: [String: Any] = {\nvar config: [String: Any] = [:]\nconfig[\"debug\"] = false\nconfig[\"version\"] = \"1.0\"\nreturn config\n}()\nimport SwiftUI\nimport Combine\nimport Foundation\nimport Dispatch\nimport UIKit\nclass ServiceController {}\nfinal class CacheStore {}\nstruct Vector2 { let x: Int; let y: Int }\nstruct Limits { let max: Int }\nenum ModeSwift { case fast, safe }\nenum PhaseSwift { case initState, done }\nenum SignalSwift { case on, off }\nprotocol RunnerSwift { func run() }\nprotocol LoggerSwift { func log(_ msg: String) }\nprotocol ParserSwift { func parse(_ input: String) -> String }\nextension String { func trimmed2() -> String { self.trimmingCharacters(in: .whitespaces) } }\nextension Int { func doubled2() -> Int { self * 2 } }\nextension Array { var isNotEmpty: Bool { !self.isEmpty } }\nfunc reqCoverSwift1(_ value: Int) -> Int { value + 1 }\nfunc reqCoverSwift2(_ value: Int) -> Int { value + 2 }\nfunc reqCoverSwift3(_ value: Int) -> Int { value + 3 }\nfunc reqCoverSwift4(_ value: Int) -> Int { value + 4 }\nfunc reqCoverSwift5(_ value: Int) -> Int { value + 5 }\n```\n",
4
- "stderr": ""
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "code": 0,
3
- "stdout": "@@@ tests/fixtures/fixture_typescript.ts | typescript\n> Lines: 10-432\n```\nimport { Component } from 'react';\nimport type { ReactNode } from 'react';\ninterface User {\nname: string;\nage: number;\nemail?: string;\nreadonly id: string;\n}\ninterface Repository<T> {\nfindById(id: string): Promise<T | null>;\nsave(entity: T): Promise<T>;\ndelete(id: string): Promise<boolean>;\n}\ninterface Serializable {\ntoJSON(): string;\n}\ntype StringOrNumber = string | number;\ntype DeepReadonly<T> = {\nreadonly [P in keyof T]: T[P] extends object ? DeepReadonly<T[P]> : T[P];\n};\ntype Unwrap<T> = T extends Array<infer U> ? U : T;\ntype PixelValue = `${number}px`;\ntype ApiResponse<T> =\n| { status: 'success'; data: T }\n| { status: 'error'; message: string }\n| { status: 'loading' };\ntype KeysOfType<T, V> = {\n[K in keyof T]: T[K] extends V ? K : never;\n}[keyof T];\nconst enum Direction {\nUp = 'UP',\nDown = 'DOWN',\nLeft = 'LEFT',\nRight = 'RIGHT',\n}\nenum Color {\nRed,\nBlue,\nGreen = 10,\n}\nenum HttpStatus {\nOK = '200',\nNotFound = '404',\nServerError = '500',\n}\nexport abstract class Base {\nabstract render(): void;\nexecute(): void {\nconsole.log('before render');\nthis.render();\nconsole.log('after render');\n}\n}\nclass Derived extends Base {\nvalue: number = 0;\nlabel?: string;\nrender(): void {\nconsole.log(this.value);\n}\n}\nclass TypedContainer<T extends Serializable> {\nprivate items: T[] = [];\nadd(item: T): void {\nthis.items.push(item);\n}\ntoJSON(): string {\nreturn `[${this.items.map(i => i.toJSON()).join(',')}]`;\n}\nfind(predicate: (item: T) => boolean): T | undefined {\nfor (const item of this.items) {\nif (predicate(item)) {\nreturn item;\n}\n}\nreturn undefined;\n}\n}\nclass UserEntity implements User, Serializable {\nreadonly id: string;\nname: string;\nage: number;\nconstructor(id: string, name: string, age: number) {\nthis.id = id;\nthis.name = name;\nthis.age = age;\n}\ntoJSON(): string {\nreturn JSON.stringify({ id: this.id, name: this.name, age: this.age });\n}\n}\nexport function greet(name: string): void {\nconsole.log(`Hello, ${name}`);\n}\nfunction parse(input: string): number;\nfunction parse(input: number): string;\nfunction parse(input: string | number): string | number {\nif (typeof input === 'string') {\nreturn parseInt(input, 10);\n}\nreturn input.toString();\n}\nconst add = (a: number): number => a + 1;\nconst transform = <T extends { toString(): string }>(value: T): string => {\nreturn value.toString();\n};\nasync function fetchEntity<T>(url: string): Promise<T> {\nconst response = await fetch(url);\nreturn response.json() as Promise<T>;\n}\nexport namespace MyNS {\nexport const x = 1;\nexport function double(val: number): number {\nreturn val * 2;\n}\n}\ndeclare module MyMod {\nexport const version: string;\n}\n@Component\nclass Decorated {\ntemplate: string = '<div></div>';\n}\nfunction isUser(value: unknown): value is User {\nif (typeof value !== 'object' || value === null) {\nreturn false;\n}\nconst obj = value as Record<string, unknown>;\nreturn typeof obj.name === 'string' && typeof obj.age === 'number';\n}\nconst config = {\nwidth: '100px' as PixelValue,\nheight: '200px' as PixelValue,\n} satisfies Record<string, PixelValue>;\nfunction makeOptional<T extends object>(obj: T): Partial<T> {\nreturn { ...obj };\n}\nimport { Injectable } from 'inversify';\nimport { Observable } from 'rxjs';\nimport { FC } from 'react';\n@injectable\n@sealed\n@track\n@memoized\ninterface CacheEntry { key: string; value: string }\nexport interface Runner { run(): Promise<void> }\nenum ModeTs { Fast, Safe }\nenum StatusTs { Ready, Busy }\nnamespace ExtNSOne { export const v = 1; }\nnamespace ExtNSTwo { export const v = 2; }\nnamespace ExtNSThree { export const v = 3; }\nnamespace ExtNSFour { export const v = 4; }\ndeclare module ExtOne { export const one: number; }\nmodule ExtTwo { export const two = 2; }\nmodule ExtThree { export const three = 3; }\nmodule ExtFour { export const four = 4; }\nfunction reqCoverTs1(value: number): number { return value + 1; }\nfunction reqCoverTs2(value: number): number { return value + 2; }\nfunction reqCoverTs3(value: number): number { return value + 3; }\nfunction reqCoverTs4(value: number): number { return value + 4; }\nfunction reqCoverTs5(value: number): number { return value + 5; }\n```\n",
4
- "stderr": ""
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "code": 0,
3
- "stdout": "@@@ tests/fixtures/fixture_zig.zig | zig\n> Lines: 7-293\n```\nconst std = @import(\"std\");\nconst mem = @import(\"std\").mem;\nconst Allocator = std.mem.Allocator;\npub fn main() void {\nstd.debug.print(\"Hello\\n\", .{});\n}\npub fn add(a: i32, b: i32) i32 {\nreturn a + b;\n}\npub fn safeDivide(numerator: i32, denominator: i32) !i32 {\nif (denominator == 0) {\nreturn error.DivisionByZero;\n}\nreturn @divTrunc(numerator, denominator);\n}\npub fn max(comptime T: type, a: T, b: T) T {\nreturn if (a > b) a else b;\n}\npub fn indexOf(comptime T: type, haystack: []const T, needle: T) ?usize {\nfor (haystack, 0..) |item, i| {\nif (item == needle) {\nreturn i;\n}\n}\nreturn null;\n}\npub fn comptimeConcat(comptime a: []const u8, comptime b: []const u8) []const u8 {\nreturn a ++ b;\n}\npub fn createBuffer(allocator: Allocator) ![]u8 {\nconst buf = try allocator.alloc(u8, 1024);\nerrdefer allocator.free(buf);\n@memset(buf, 0);\nreturn buf;\n}\ninline fn fastSum(values: []const f32) f32 {\nvar total: f32 = 0.0;\nfor (values) |v| {\ntotal += v;\n}\nreturn total;\n}\nexport fn doubleValue(x: i32) i32 {\nreturn x * 2;\n}\nconst Point = struct {\nx: f64,\ny: f64,\npub fn distSquared(self: Point, other: Point) f64 {\nconst dx = self.x - other.x;\nconst dy = self.y - other.y;\nreturn dx * dx + dy * dy;\n}\npub fn origin() Point {\nreturn .{ .x = 0.0, .y = 0.0 };\n}\n};\nconst PackedFlags = packed struct {\nreadable: bool,\nwritable: bool,\nexecutable: bool,\nreserved: u5,\n};\nconst Config = struct {\nname: []const u8 = \"default\",\nmax_retries: u32 = 3,\ntimeout_ms: u64 = 5000,\ndebug: bool = false,\npub fn testing() Config {\nreturn .{ .debug = true, .name = \"test\" };\n}\n};\nconst Color = enum {\nred,\ngreen,\nblue,\npub fn toRgb(self: Color) u32 {\nreturn switch (self) {\n.red => 0xFF0000,\n.green => 0x00FF00,\n.blue => 0x0000FF,\n};\n}\n};\nconst Status = enum(u8) {\nidle = 0,\nrunning = 1,\nerror = 2,\ndone = 3,\n};\nconst Result = union(enum) {\nok: i32,\nerr: []const u8,\npub fn isOk(self: Result) bool {\nreturn self == .ok;\n}\n};\nconst ExternData = extern union {\nint_val: i32,\nfloat_val: f32,\nbytes: [4]u8,\n};\nconst MAX_SIZE: usize = 1024;\npub var global_state: i32 = 0;\nconst MAGIC_NUMBER: u32 = comptime blk: {\nvar x: u32 = 1;\nx *= 42;\nbreak :blk x;\n};\nconst ParseError = error{\nInvalidInput,\nUnexpectedToken,\nEndOfStream,\nBufferOverflow,\n};\ntest \"add returns correct sum\" {\nconst result = add(2, 3);\ntry std.testing.expectEqual(@as(i32, 5), result);\n}\ntest \"safeDivide handles zero\" {\nconst result = safeDivide(10, 0);\ntry std.testing.expectError(error.DivisionByZero, result);\n}\ntest \"indexOf finds element\" {\nconst items = [_]i32{ 1, 2, 3, 4, 5 };\nconst idx = indexOf(i32, &items, 3);\ntry std.testing.expectEqual(@as(?usize, 2), idx);\n}\nconst io = @import(\"std\");\nconst fs = @import(\"std\");\nconst mem = @import(\"std\");\nconst math = @import(\"std\");\nconst json = @import(\"std\");\nconst Mode = enum { fast, safe };\nconst Phase = enum { init, done };\nconst Signal = enum { on, off };\nconst Packet = struct { id: i32 };\nconst Limits = struct { max: i32 };\nconst Variant = union { i: i32, f: f32 };\nconst Payload = extern union { a: i32, b: i32 };\nconst Message = union { txt: [4]u8, len: u32 };\nvar retries: i32 = 0;\nvar pointer: usize = 0;\nfn reqCoverZig1(value: i32) i32 { return value + 1; }\nfn reqCoverZig2(value: i32) i32 { return value + 2; }\nfn reqCoverZig3(value: i32) i32 { return value + 3; }\nfn reqCoverZig4(value: i32) i32 { return value + 4; }\nfn reqCoverZig5(value: i32) i32 { return value + 5; }\n```\n",
4
- "stderr": ""
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "code": 0,
3
- "stdout": "@@@ tests/fixtures/fixture_c.c | c\n> Lines: 14-355\n```\n14: #include \"myheader.h\"\n15: #include <stdarg.h>\n16: #include <stdio.h>\n17: #include <stdlib.h>\n18: #include <string.h>\n22: #define MAX_SIZE 100\n31: #define CLAMP(val, lo, hi) ((val) < (lo) ? (lo) : ((val) > (hi) ? (hi) : (val)))\n34: #define STRINGIFY(x) #x\n40: #define CONCAT(a, b) a##b\n42: #ifdef DEBUG\n43: #define LOG(fmt, ...) fprintf(stderr, fmt, ##__VA_ARGS__)\n44: #else\n45: #define LOG(fmt, ...) ((void)0)\n46: #endif\n51: typedef int my_int;\n54: typedef unsigned char byte_t;\n62: struct Point {\n63: int x;\n64: int y;\n65: };\n71: struct PackedFlags {\n72: unsigned int readable : 1;\n73: unsigned int writable : 1;\n74: unsigned int executable : 1;\n75: unsigned int reserved : 5;\n76: };\n82: struct Node {\n84: union {\n85: int i_val;\n86: float f_val;\n87: } payload;\n88: struct Node *next;\n89: };\n97: union Data {\n98: int i;\n99: float f;\n100: char s[16];\n101: };\n109: enum Color {\n110: RED,\n111: GREEN,\n112: BLUE\n113: };\n124: typedef int (*comparator_fn)(const void *a, const void *b);\n130: typedef int (*transform_fn)(int value);\n138: typedef struct {\n139: const char *name;\n140: comparator_fn handler;\n141: int priority;\n142: } callback_entry_t;\n147: static int counter = 0;\n150: static char error_buffer[256] = {0};\n160: static inline int min_val(int a, int b) { return a < b ? a : b; }\n168: void greet(const char *name) {\n170: if (name == NULL) {\n171: return;\n172: }\n173: printf(\"Hello %s\\n\", name);\n174: }\n182: int main(int argc, char **argv) {\n183: if (argc < 2) {\n185: fprintf(stderr, \"Usage: %s <name>\\n\", argv[0]);\n186: return 1;\n187: }\n188: greet(argv[1]);\n189: return 0;\n190: }\n200: int sum_ints(int count, ...) {\n201: va_list ap;\n202: va_start(ap, count);\n203: int total = 0;\n205: for (int i = 0; i < count; i++) {\n206: total += va_arg(ap, int);\n207: }\n208: va_end(ap);\n209: return total;\n210: }\n220: void apply_transform(int *arr, size_t len, transform_fn fn) {\n221: for (size_t i = 0; i < len; i++) {\n223: arr[i] = fn(arr[i]);\n224: }\n225: }\n234: unsigned long factorial(unsigned int n) {\n236: if (n <= 1) {\n237: return 1;\n238: }\n240: return n * factorial(n - 1);\n241: }\n251: static void fast_copy(void *restrict dest, const void *restrict src, size_t n) {\n252: memcpy(dest, src, n);\n253: }\n260: static int read_volatile(volatile int *reg) { return *reg; }\n269: int sum_fixed(int arr[static 10]) {\n270: int s = 0;\n271: for (int i = 0; i < 10; i++) {\n272: s += arr[i];\n273: }\n274: return s;\n275: }\n278: struct Vector2 {\n279: int x;\n280: int y;\n281: };\n282: struct Matrix2 {\n283: int a11;\n284: int a22;\n285: };\n286: enum StatusCode { STATUS_OK, STATUS_ERR, STATUS_UNKNOWN };\n287: enum LevelCode { LEVEL_LOW, LEVEL_MEDIUM, LEVEL_HIGH };\n288: enum ModeCode { MODE_A, MODE_B };\n289: enum FlagCode { FLAG_ON, FLAG_OFF };\n290: union NumberValue {\n291: int i;\n292: float f;\n293: };\n294: union PtrValue {\n295: void *p;\n296: long l;\n297: };\n298: union StateValue {\n299: int s;\n300: char c;\n301: };\n302: union PairValue {\n303: int x;\n304: int y;\n305: };\n306: typedef long index_t;\n307: typedef float ratio_t;\n308: typedef struct Point point_t;\n309: typedef double score_t;\n319: int req_cover_c_1(int value) { return value + 1; }\n328: int req_cover_c_2(int value) { return value + 2; }\n337: int req_cover_c_3(int value) { return value + 3; }\n346: int req_cover_c_4(int value) { return value + 4; }\n355: int req_cover_c_5(int value) { return value + 5; }\n```\n",
4
- "stderr": ""
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "code": 0,
3
- "stdout": "@@@ tests/fixtures/fixture_cpp.cpp | cpp\n> Lines: 13-402\n```\n13: #include <concepts>\n14: #include <functional>\n15: #include <iostream>\n16: #include <memory>\n17: #include <optional>\n18: #include <string>\n19: #include <vector>\n21: #define VERSION 2\n24: #define LIKELY(x) __builtin_expect(!!(x), 1)\n28: namespace MyNS {\n36: template <typename T>\n37: concept Printable = requires(std::ostream &os, T val) {\n38: { os << val } -> std::same_as<std::ostream &>;\n39: };\n45: template <typename T>\n46: concept Numeric = std::integral<T> || std::floating_point<T>;\n55: template <Printable T> class Container {\n56: public:\n57: T value;\n63: explicit Container(T v) : value(std::move(v)) {}\n69: Container(const Container &other) = default;\n75: Container(Container &&other) noexcept = default;\n82: Container &operator=(const Container &other) = default;\n89: Container &operator=(Container &&other) noexcept = default;\n92: ~Container() = default;\n100: friend std::ostream &operator<<(std::ostream &os, const Container &c) {\n101: return os << c.value;\n102: }\n109: bool operator==(const Container &other) const { return value == other.value; }\n110: };\n118: struct Point {\n119: double x;\n120: double y;\n127: constexpr double dist_sq(const Point &other) const {\n129: double dx = x - other.x;\n130: double dy = y - other.y;\n131: return dx * dx + dy * dy;\n132: }\n139: constexpr Point operator+(const Point &rhs) const {\n140: return {x + rhs.x, y + rhs.y};\n141: }\n142: };\n150: enum class Direction {\n151: Up,\n152: Down,\n153: Left,\n154: Right\n155: };\n160: using StringVec = std::vector<std::string>;\n163: typedef int my_int_t;\n166: using Callback = std::function<void(int)>;\n175: template <typename Derived> class Cloneable {\n176: public:\n181: std::unique_ptr<Derived> clone() const {\n183: return std::make_unique<Derived>(static_cast<const Derived &>(*this));\n184: }\n185: };\n193: class Base {\n194: public:\n199: virtual const char *type_name() const = 0;\n200: virtual ~Base() = default;\n201: };\n207: class DerivedA : public virtual Base {\n208: public:\n209: const char *type_name() const override { return \"DerivedA\"; }\n210: };\n216: class DerivedB : public virtual Base {\n217: public:\n218: const char *type_name() const override { return \"DerivedB\"; }\n219: };\n225: class Diamond : public DerivedA, public DerivedB {\n226: public:\n227: const char *type_name() const override { return \"Diamond\"; }\n228: };\n237: constexpr unsigned long long constexpr_factorial(unsigned int n) {\n239: return n <= 1 ? 1ULL : n * constexpr_factorial(n - 1);\n240: }\n249: std::pair<std::string, std::string> parse_kv(const std::string &input) {\n250: auto pos = input.find('=');\n251: if (pos == std::string::npos) {\n253: return {\"\", \"\"};\n254: }\n255: return {input.substr(0, pos), input.substr(pos + 1)};\n256: }\n264: void greet(std::string name) { std::cout << \"Hello, \" << name << \"\\n\"; }\n270: int main() {\n272: auto [key, val] = parse_kv(\"lang=cpp\");\n273: greet(key);\n274: return 0;\n275: }\n284: constexpr auto square = [](auto x) { return x * x; };\n288: namespace Inner::Detail {\n295: inline std::string format_int(int v) { return std::to_string(v); }\n297: }\n299: }\n309: template <MyNS::Numeric T> std::string serialize(T value) {\n310: return std::to_string(value);\n311: }\n318: inline std::string serialize(const std::string &value) { return value; }\n321: struct Pixel {\n322: int r;\n323: int g;\n324: int b;\n325: };\n326: struct Size {\n327: int w;\n328: int h;\n329: };\n330: struct Bounds {\n331: int x;\n332: int y;\n333: int w;\n334: int h;\n335: };\n336: struct Marker {\n337: int id;\n338: };\n339: enum Mode { ModeA, ModeB };\n340: enum State { StateIdle, StateBusy };\n341: enum Grade { GradeA, GradeB };\n342: enum Severity { SevLow, SevHigh };\n343: namespace extns {\n344: inline int add_one(int v) { return v + 1; }\n345: }\n346: namespace ext_alpha {\n347: inline int ping() { return 1; }\n348: }\n349: namespace ext_beta {\n350: inline int pong() { return 2; }\n351: }\n352: #define FEATURE_ALPHA 1\n353: #define FEATURE_BETA 2\n354: #define FEATURE_GAMMA 3\n355: using NumberVec = std::vector<int>;\n356: typedef long LongId;\n366: int req_cover_cpp_1(int value) { return value + 1; }\n375: int req_cover_cpp_2(int value) { return value + 2; }\n384: int req_cover_cpp_3(int value) { return value + 3; }\n393: int req_cover_cpp_4(int value) { return value + 4; }\n402: int req_cover_cpp_5(int value) { return value + 5; }\n```\n",
4
- "stderr": ""
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "code": 0,
3
- "stdout": "@@@ tests/fixtures/fixture_csharp.cs | csharp\n> Lines: 9-410\n```\n9: using System;\n10: using System.Collections.Generic;\n11: using System.Linq;\n12: using System.Threading.Tasks;\n13: using System.Threading;\n15: namespace MyApp {\n24: public delegate void DataChangedHandler(object sender, string data);\n32: public delegate T Transform<T>(T value);\n39: [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]\n40: public class AuditableAttribute : Attribute {\n42: public int Level { get; set; } = 1;\n43: }\n51: [Serializable]\n52: [Auditable(Level = 2)]\n53: public class Person : IComparable<Person>, IDisposable {\n55: public const int MAX_AGE = 150;\n58: private static int _instanceCount = 0;\n61: private string _name;\n68: public string Name {\n69: get => _name;\n70: set {\n72: if (string.IsNullOrWhiteSpace(value))\n73: throw new ArgumentException(\"Name cannot be empty\");\n74: _name = value;\n75: }\n76: }\n79: public int Age { get; init; }\n82: public string? Email { get; set; }\n85: public Guid Id { get; } = Guid.NewGuid();\n90: public event DataChangedHandler? OnDataChanged;\n97: public Person(string name, int age) {\n98: _name = name;\n99: Age = age;\n100: Interlocked.Increment(ref _instanceCount);\n101: }\n106: public void Greet() {\n108: OnDataChanged?.Invoke(this, $\"Greeted {Name}\");\n109: Console.WriteLine($\"Hello, {Name}!\");\n110: }\n117: public static async Task<string> FetchAsync(CancellationToken token = default) {\n118: await Task.Delay(100, token);\n119: return \"data\";\n120: }\n127: public int CompareTo(Person? other) {\n128: if (other is null) return 1;\n129: return Age.CompareTo(other.Age);\n130: }\n135: public void Dispose() {\n137: Interlocked.Decrement(ref _instanceCount);\n138: GC.SuppressFinalize(this);\n139: }\n146: public object? this[string propertyName] {\n147: get {\n148: return propertyName switch {\n149: \"Name\" => Name,\n150: \"Age\" => Age,\n151: \"Email\" => Email,\n152: _ => null,\n153: };\n154: }\n155: }\n162: public void Deconstruct(out string name, out int age) {\n163: name = Name;\n164: age = Age;\n165: }\n171: public static int GetInstanceCount() => _instanceCount;\n172: }\n179: public interface IGreeter {\n184: void SayHello(string name);\n190: void SayGoodbye(string name) {\n191: Console.WriteLine($\"Goodbye, {name}\");\n192: }\n193: }\n199: public interface IRepository<T> where T : class, new() {\n201: Task<T?> FindByIdAsync(int id);\n204: IAsyncEnumerable<T> GetAllAsync(CancellationToken token = default);\n207: Task<bool> SaveAsync(T entity);\n208: }\n215: public readonly struct Point {\n217: public double X { get; init; }\n219: public double Y { get; init; }\n224: public static Point operator +(Point a, Point b) => new() { X = a.X + b.X, Y = a.Y + b.Y };\n229: public double Magnitude => Math.Sqrt(X * X + Y * Y);\n230: }\n237: [Flags]\n238: public enum Color {\n240: None = 0,\n242: Red = 1,\n244: Green = 2,\n246: Blue = 4,\n248: All = Red | Green | Blue,\n249: }\n258: public record ConfigEntry(string Key, string Value);\n265: public record struct Vector2(double X, double Y);\n272: public static class StringExtensions {\n279: public static string Truncate(this string str, int maxLength) {\n280: if (str.Length <= maxLength) return str;\n281: return str[..maxLength] + \"...\";\n282: }\n289: public static bool IsAscii(this string str) {\n290: return str.All(c => c < 128);\n291: }\n292: }\n300: public class SortedCollection<T> where T : IComparable<T> {\n301: private readonly List<T> _items = new();\n307: public void Add(T item) {\n309: var index = _items.BinarySearch(item);\n310: if (index < 0) index = ~index;\n311: _items.Insert(index, item);\n312: }\n319: public IEnumerable<T> Where(Func<T, bool> predicate) {\n320: return _items.Where(predicate);\n321: }\n322: }\n329: public static class PatternMatcher {\n335: public static string Describe(object? obj) {\n336: return obj switch {\n337: null => \"null\",\n338: int i when i > 0 => $\"positive int: {i}\",\n339: int i => $\"non-positive int: {i}\",\n340: string { Length: 0 } => \"empty string\",\n341: string s => $\"string({s.Length}): {s}\",\n342: Person { Age: >= 18 } p => $\"adult: {p.Name}\",\n343: Person p => $\"minor: {p.Name}\",\n344: _ => $\"unknown: {obj.GetType().Name}\",\n345: };\n346: }\n347: }\n349: }\n352: namespace MyApp.Services {}\n353: namespace MyApp.Core {}\n354: namespace MyApp.Data {}\n355: namespace MyApp.Api {}\n356: public interface ILogger {}\n357: public interface IParser {}\n358: public interface IRunner {}\n359: public enum ModeCs { Fast, Safe }\n360: public enum PhaseCs { Init, Done }\n361: public enum StateCs { Open, Closed }\n362: public enum SignalCs { On, Off }\n363: public struct Size { public int W; public int H; }\n364: public readonly struct Vector { public readonly int X; public readonly int Y; }\n365: public struct Limits { public int Max; }\n366: public struct Cursor { public int Index; }\n367: [DebuggerDisplay(\"{Value}\")]\n368: public const int MIN_AGE = 10;\n369: public const int RETRY_LIMIT = 3;\n370: public const int CACHE_SIZE = 128;\n371: public const int DEFAULT_PAGE = 1;\n374: public static class ReqCoverCsharp {\n380: public static int ReqCoverCsharp1(int value) { return value + 1; }\n387: public static int ReqCoverCsharp2(int value) { return value + 2; }\n394: public static int ReqCoverCsharp3(int value) { return value + 3; }\n401: public static int ReqCoverCsharp4(int value) { return value + 4; }\n408: public static int ReqCoverCsharp5(int value) { return value + 5; }\n410: }\n```\n",
4
- "stderr": ""
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "code": 0,
3
- "stdout": "@@@ tests/fixtures/fixture_elixir.ex | elixir\n> Lines: 10-408\n```\n10: defmodule MyApp.Server do\n11: @moduledoc \"\"\"\n12: GenServer implementation for managing application state.\n14: Handles synchronous calls, asynchronous casts, and info messages.\n15: Supports state initialization with validated options.\n16: \"\"\"\n18: use GenServer\n19: import Enum\n20: alias MyApp.Config\n21: alias MyApp.Server.State\n22: require Logger\n24: @behaviour GenServer\n29: @default_timeout 5_000\n32: @max_items 1_000\n36: @doc \"\"\"\n37: Internal state struct for the server.\n39: @field name Server instance name.\n40: @field port Listening port number.\n41: @field items List of stored items.\n42: @field started_at Timestamp of server start.\n43: \"\"\"\n44: defstruct [:name, :port, items: [], started_at: nil]\n48: @type t :: %__MODULE__{\n49: name: String.t(),\n50: port: non_neg_integer(),\n51: items: list(any()),\n52: started_at: DateTime.t() | nil\n53: }\n55: @type option :: {:name, String.t()} | {:port, non_neg_integer()}\n59: @doc \"\"\"\n60: Start a new server process linked to the caller.\n62: @param opts Keyword list of options (:name, :port).\n63: @return {:ok, pid} on success or {:error, reason} on failure.\n64: \"\"\"\n65: @spec start_link(keyword()) :: GenServer.on_start()\n66: def start_link(opts) do\n67: name = Keyword.get(opts, :name, \"default\")\n68: GenServer.start_link(__MODULE__, opts, name: via_tuple(name))\n69: end\n71: @doc \"\"\"\n72: Add an item to the server's collection.\n74: @param server The server PID or registered name.\n75: @param item The item to store.\n76: @return :ok\n77: \"\"\"\n78: @spec add_item(GenServer.server(), any()) :: :ok\n79: def add_item(server, item) do\n80: GenServer.call(server, {:add_item, item})\n81: end\n83: @doc \"\"\"\n84: Retrieve all stored items.\n86: @param server The server PID or registered name.\n87: @return List of stored items.\n88: \"\"\"\n89: @spec get_items(GenServer.server()) :: list(any())\n90: def get_items(server) do\n91: GenServer.call(server, :get_items)\n92: end\n94: @doc \"\"\"\n95: Asynchronously notify the server of an event.\n97: @param server The server PID.\n98: @param event The event data to process.\n99: @return :ok\n100: \"\"\"\n101: @spec notify(GenServer.server(), any()) :: :ok\n102: def notify(server, event) do\n103: GenServer.cast(server, {:notify, event})\n104: end\n111: defp via_tuple(name) do\n112: {:via, Registry, {MyApp.Registry, name}}\n113: end\n117: @impl true\n118: def init(opts) do\n120: name = Keyword.fetch!(opts, :name)\n121: port = Keyword.get(opts, :port, 4000)\n123: state = %__MODULE__{\n124: name: name,\n125: port: port,\n126: started_at: DateTime.utc_now()\n127: }\n129: Logger.info(\"Server #{name} started on port #{port}\")\n130: {:ok, state}\n131: end\n133: @impl true\n134: def handle_call({:add_item, item}, _from, state) do\n136: if length(state.items) >= @max_items do\n137: {:reply, {:error, :capacity_exceeded}, state}\n138: else\n139: new_state = %{state | items: [item | state.items]}\n140: {:reply, :ok, new_state}\n141: end\n142: end\n144: @impl true\n145: def handle_call(:get_items, _from, state) do\n146: {:reply, Enum.reverse(state.items), state}\n147: end\n149: @impl true\n150: def handle_cast({:notify, event}, state) do\n151: Logger.debug(\"Received event: #{inspect(event)}\")\n152: {:noreply, state}\n153: end\n155: @impl true\n156: def handle_info(:timeout, state) do\n157: Logger.warn(\"Server #{state.name} timed out\")\n158: {:noreply, state}\n159: end\n164: defp handle_internal(state) do\n166: pruned = Enum.take(state.items, @max_items)\n167: %{state | items: pruned}\n168: end\n170: @doc \"\"\"\n171: Define a macro for compile-time code generation.\n173: @param expr The expression to wrap.\n174: @return Quoted AST wrapping the expression.\n175: \"\"\"\n176: defmacro my_macro(expr) do\n177: quote do\n178: result = unquote(expr)\n179: Logger.debug(\"Macro result: #{inspect(result)}\")\n180: result\n181: end\n182: end\n183: end\n187: defprotocol Printable do\n188: @moduledoc \"\"\"\n189: Protocol for types that can be printed as formatted strings.\n190: \"\"\"\n192: @doc \"\"\"\n193: Convert a value to its formatted string representation.\n195: @param data The value to format.\n196: @return Formatted string.\n197: \"\"\"\n198: @spec print(t) :: String.t()\n199: def print(data)\n200: end\n204: defimpl Printable, for: MyApp.Server do\n205: @doc \"\"\"\n206: Format a server struct for display.\n208: @param server The server struct to format.\n209: @return String in format \"Server(name:port)\".\n210: \"\"\"\n211: def print(server) do\n212: \"Server(#{server.name}:#{server.port})\"\n213: end\n214: end\n216: defimpl Printable, for: BitString do\n217: def print(str) do\n218: \"String(#{str})\"\n219: end\n220: end\n224: defmodule MyApp.Utils do\n225: @moduledoc \"\"\"\n226: Utility functions demonstrating pattern matching, guards,\n227: pipe operators, and comprehensions.\n228: \"\"\"\n230: @doc \"\"\"\n231: Classify a value using guard clauses and pattern matching.\n233: @param value The value to classify.\n234: @return Atom describing the value's category.\n235: \"\"\"\n236: @spec classify(any()) :: atom()\n237: def classify(value) when is_integer(value) and value > 0, do: :positive\n238: def classify(value) when is_integer(value) and value < 0, do: :negative\n239: def classify(0), do: :zero\n240: def classify(value) when is_binary(value), do: :string\n241: def classify(value) when is_list(value), do: :list\n242: def classify(_), do: :unknown\n244: @doc \"\"\"\n245: Process a list using pipe operator for data transformation.\n247: @param items List of strings to process.\n248: @return Sorted list of unique uppercase strings.\n249: \"\"\"\n250: @spec process_list(list(String.t())) :: list(String.t())\n251: def process_list(items) do\n252: items\n253: |> Enum.map(&String.trim/1)\n254: |> Enum.reject(&(&1 == \"\"))\n255: |> Enum.map(&String.upcase/1)\n256: |> Enum.uniq()\n257: |> Enum.sort()\n258: end\n260: @doc \"\"\"\n261: Demonstrate for-comprehension with multiple generators and filters.\n263: @param range Upper bound for the search space.\n264: @return List of Pythagorean triples.\n265: \"\"\"\n266: @spec pythagorean_triples(pos_integer()) :: list(tuple())\n267: def pythagorean_triples(range) do\n268: for a <- 1..range,\n269: b <- a..range,\n270: c <- b..range,\n271: a * a + b * b == c * c do\n272: {a, b, c}\n273: end\n274: end\n276: @doc \"\"\"\n277: Safe division returning :error tuple on zero divisor.\n279: @param a Dividend.\n280: @param b Divisor.\n281: @return {:ok, result} or {:error, :division_by_zero}.\n282: \"\"\"\n283: @spec safe_divide(number(), number()) :: {:ok, float()} | {:error, atom()}\n284: def safe_divide(_, 0), do: {:error, :division_by_zero}\n285: def safe_divide(a, b), do: {:ok, a / b}\n287: @doc \"\"\"\n288: Recursively compute factorial with guard clause.\n290: @param n Non-negative integer.\n291: @return Factorial of n.\n292: \"\"\"\n293: @spec factorial(non_neg_integer()) :: pos_integer()\n294: def factorial(0), do: 1\n295: def factorial(n) when n > 0, do: n * factorial(n - 1)\n296: end\n300: defmodule MyApp.Plugin do\n301: @moduledoc \"\"\"\n302: Behaviour defining the plugin interface.\n303: \"\"\"\n305: @doc \"Initialize the plugin with configuration options.\"\n306: @callback init(opts :: keyword()) :: {:ok, any()} | {:error, String.t()}\n308: @doc \"Execute the plugin's main logic.\"\n309: @callback execute(state :: any()) :: :ok | {:error, String.t()}\n311: @doc \"Clean up plugin resources.\"\n312: @callback cleanup(state :: any()) :: :ok\n314: @optional_callbacks [cleanup: 1]\n315: end\n318: defmodule MyApp.Extra do\n320: defstruct [:name]\n321: end\n323: defmodule MyApp.Audit do\n324: defstruct [:id]\n325: end\n327: defmodule MyApp.State do\n328: defstruct [:status]\n329: end\n331: defmodule MyApp.Payload do\n332: defstruct [:value]\n333: end\n335: defmodule MyApp.Context do\n336: defstruct [:meta]\n337: end\n339: defprotocol Auditable do\n340: def audit(data)\n341: end\n343: defprotocol Renderable do\n344: def render(data)\n345: end\n347: defprotocol Parsable do\n348: def parse(data)\n349: end\n351: defprotocol Validatable do\n352: def validate(data)\n353: end\n355: defimpl Auditable, for: Any do\n356: def audit(data), do: data\n357: end\n359: defimpl Renderable, for: Any do\n360: def render(data), do: data\n361: end\n363: defimpl Parsable, for: Any do\n364: def parse(data), do: data\n365: end\n367: defimpl Validatable, for: Any do\n368: def validate(data), do: data\n369: end\n372: defmodule ReqCoverElixir do\n378: def req_cover_elixir_1(value), do: value + 1\n385: def req_cover_elixir_2(value), do: value + 2\n392: def req_cover_elixir_3(value), do: value + 3\n399: def req_cover_elixir_4(value), do: value + 4\n406: def req_cover_elixir_5(value), do: value + 5\n408: end\n```\n",
4
- "stderr": ""
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "code": 0,
3
- "stdout": "@@@ tests/fixtures/fixture_go.go | go\n> Lines: 12-339\n```\n12: package main\n14: import (\n15: \t\"context\"\n16: \t\"fmt\"\n17: \t\"io\"\n18: \t\"sync\"\n19: )\n24: const MaxSize = 100\n27: var globalVar = 0\n30: const (\n32: \tLogDebug = iota\n34: \tLogInfo\n36: \tLogError\n37: )\n43: type Server struct {\n44: \tPort int\n45: \tHost string\n46: \tsync.Mutex\n47: \thandlers map[string]HandlerFunc\n48: }\n51: type HandlerFunc func(ctx context.Context, req []byte) ([]byte, error)\n54: type Address struct {\n55: \tStreet string\n56: \tCity string\n57: \tZip string\n58: }\n61: type Employee struct {\n62: \tName string\n63: \tAge int\n64: \tAddress\n65: \tManager *Employee\n66: }\n71: type Handler interface {\n73: \tHandle(ctx context.Context, data []byte) error\n74: }\n77: type ReadWriteCloser interface {\n78: \tio.Reader\n79: \tio.Writer\n80: \tio.Closer\n81: }\n86: type MyInt int\n89: func (m MyInt) String() string {\n90: \treturn fmt.Sprintf(\"MyInt(%d)\", int(m))\n91: }\n98: type Pair[A any, B any] struct {\n99: \tFirst A\n100: \tSecond B\n101: }\n104: type Ordered interface {\n105: \t~int | ~float64 | ~string\n106: }\n111: func main() {\n112: \tfmt.Println(\"hello\")\n113: }\n116: func init() {\n118: \tglobalVar = 1\n119: }\n123: func (s *Server) Start() error {\n124: \ts.Lock()\n125: \tdefer s.Unlock()\n127: \tif s.Port <= 0 {\n128: \t\treturn fmt.Errorf(\"invalid port: %d\", s.Port)\n129: \t}\n130: \tfmt.Printf(\"Starting on %s:%d\\n\", s.Host, s.Port)\n131: \treturn nil\n132: }\n138: func (s *Server) Register(path string, handler HandlerFunc) {\n139: \tif s.handlers == nil {\n140: \t\ts.handlers = make(map[string]HandlerFunc)\n141: \t}\n142: \ts.handlers[path] = handler\n143: }\n152: func Max[T Ordered](a, b T) T {\n153: \tif a > b {\n154: \t\treturn a\n155: \t}\n156: \treturn b\n157: }\n164: func Filter[T any](items []T, pred func(T) bool) []T {\n165: \tresult := make([]T, 0)\n166: \tfor _, item := range items {\n167: \t\tif pred(item) {\n168: \t\t\tresult = append(result, item)\n169: \t\t}\n170: \t}\n171: \treturn result\n172: }\n180: func Divide(a, b int) (int, int, error) {\n181: \tif b == 0 {\n182: \t\treturn 0, 0, fmt.Errorf(\"division by zero\")\n183: \t}\n184: \treturn a / b, a % b, nil\n185: }\n192: func ParseConfig(input string) (host string, port int, err error) {\n194: \t_, scanErr := fmt.Sscanf(input, \"%s:%d\", &host, &port)\n195: \tif scanErr != nil {\n196: \t\terr = scanErr\n197: \t\treturn\n198: \t}\n199: \treturn\n200: }\n206: func Counter() func() int {\n207: \tcount := 0\n208: \treturn func() int {\n210: \t\tcount++\n211: \t\treturn count\n212: \t}\n213: }\n221: func FanOut(items []string, workers int) <-chan string {\n222: \tresults := make(chan string, len(items))\n223: \tvar wg sync.WaitGroup\n225: \tfor i := 0; i < workers; i++ {\n226: \t\twg.Add(1)\n227: \t\tgo func(id int) {\n228: \t\t\tdefer wg.Done()\n230: \t\t\tfor _, item := range items {\n231: \t\t\t\tresults <- fmt.Sprintf(\"[%d] %s\", id, item)\n232: \t\t\t}\n233: \t\t}(i)\n234: \t}\n237: \tgo func() {\n238: \t\twg.Wait()\n239: \t\tclose(results)\n240: \t}()\n242: \treturn results\n243: }\n250: func Describe(v interface{}) string {\n251: \tswitch val := v.(type) {\n252: \tcase int:\n253: \t\treturn fmt.Sprintf(\"int: %d\", val)\n254: \tcase string:\n255: \t\treturn fmt.Sprintf(\"string: %q\", val)\n256: \tcase bool:\n257: \t\tif val {\n258: \t\t\treturn \"bool: true\"\n259: \t\t}\n260: \t\treturn \"bool: false\"\n261: \tcase nil:\n262: \t\treturn \"nil\"\n263: \tdefault:\n264: \t\treturn fmt.Sprintf(\"unknown: %T\", val)\n265: \t}\n266: }\n273: func SafeExecute(fn func()) (err error) {\n274: \tdefer func() {\n275: \t\tif r := recover(); r != nil {\n277: \t\t\terr = fmt.Errorf(\"panic: %v\", r)\n278: \t\t}\n279: \t}()\n280: \tfn()\n281: \treturn nil\n282: }\n285: package utilx\n286: package configx\n287: package jobsx\n288: package metricx\n289: import \"os\"\n290: import \"time\"\n291: import \"strings\"\n292: import \"bytes\"\n293: func (s *Server) Stop() {}\n294: func (s *Server) Reset() {}\n295: type Session struct { Id string }\n296: type Bucket struct { Name string }\n297: type Closer interface { Close() error }\n298: type Starter interface { Start() error }\n299: type UserAlias string\n300: type Amount int\n301: type Resolver func(string) error\n302: const RetryCount = 3\n303: var LastError error\n311: func reqCoverGo1(value int) int { return value + 1 }\n318: func reqCoverGo2(value int) int { return value + 2 }\n325: func reqCoverGo3(value int) int { return value + 3 }\n332: func reqCoverGo4(value int) int { return value + 4 }\n339: func reqCoverGo5(value int) int { return value + 5 }\n```\n",
4
- "stderr": ""
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "code": 0,
3
- "stdout": "@@@ tests/fixtures/fixture_haskell.hs | haskell\n> Lines: 11-248\n```\n11: module MyModule\n12: ( Name\n13: , Person(..)\n14: , Printable(..)\n15: , Expr(..)\n16: , greet\n17: , safeDiv\n18: , processList\n19: , fibonacci\n20: ) where\n22: import Data.List (sort, nub, intercalate)\n23: import Data.Maybe (fromMaybe, isJust)\n24: import qualified Data.Map as Map\n25: import Control.Monad (when, unless, forM_)\n30: type Name = String\n33: type Config = Map.Map String Int\n36: type Transform a = a -> a\n42: data Person = Person\n43: { personName :: String\n44: , personAge :: Int\n45: } deriving (Show, Eq, Ord)\n49: data Tree a\n50: = Leaf\n51: | Node a (Tree a) (Tree a)\n52: deriving (Show, Eq)\n56: data Expr\n57: = Lit Double\n58: | Add Expr Expr\n59: | Mul Expr Expr\n60: | Neg Expr\n61: deriving (Show)\n64: data Result a\n65: = Ok a\n66: | Err String\n67: deriving (Show)\n72: class Printable a where\n74: printIt :: a -> String\n77: debugPrint :: a -> String\n78: debugPrint x = \"Debug: \" ++ printIt x\n81: class Serializable a where\n83: serialize :: a -> [(String, String)]\n88: instance Printable Person where\n89: printIt p = personName p ++ \" (\" ++ show (personAge p) ++ \")\"\n92: instance Serializable Person where\n93: serialize p =\n94: [ (\"name\", personName p)\n95: , (\"age\", show (personAge p))\n96: ]\n99: instance Functor Tree where\n100: fmap _ Leaf = Leaf\n101: fmap f (Node x l r) = Node (f x) (fmap f l) (fmap f r)\n104: instance Functor Result where\n105: fmap f (Ok a) = Ok (f a)\n106: fmap _ (Err e) = Err e\n112: greet :: String -> String\n113: greet name = \"Hello \" ++ name\n117: safeDiv :: Double -> Double -> Maybe Double\n118: safeDiv _ 0 = Nothing\n119: safeDiv x y = Just (x / y)\n123: eval :: Expr -> Double\n124: eval (Lit n) = n\n125: eval (Add a b) = eval a + eval b\n126: eval (Mul a b) = eval a * eval b\n127: eval (Neg e) = -(eval e)\n131: processList :: [Int] -> [Int]\n132: processList xs = result\n133: where\n135: unique = nub xs\n137: sorted = sort unique\n139: result = filter (> 0) sorted\n143: fibonacci :: Int -> Integer\n144: fibonacci n\n145: | n < 0 = error \"negative input\"\n146: | n == 0 = 0\n147: | n == 1 = 1\n148: | otherwise = go n 0 1\n149: where\n150: go 0 a _ = a\n151: go k a b = go (k - 1) b (a + b)\n155: insertTree :: (Ord a) => a -> Tree a -> Tree a\n156: insertTree x Leaf = Node x Leaf Leaf\n157: insertTree x (Node y left right)\n158: | x < y = Node y (insertTree x left) right\n159: | x > y = Node y left (insertTree x right)\n160: | otherwise = Node y left right\n164: foldTree :: (b -> a -> b) -> b -> Tree a -> b\n165: foldTree _ acc Leaf = acc\n166: foldTree f acc (Node x l r) =\n167: let leftAcc = foldTree f acc l\n168: midAcc = f leftAcc x\n169: in foldTree f midAcc r\n173: lookupConfig :: Config -> String -> Int -> Int\n174: lookupConfig cfg key def = fromMaybe def (Map.lookup key cfg)\n178: applyN :: Int -> Transform a -> a -> a\n179: applyN 0 _ x = x\n180: applyN n f x = applyN (n - 1) f (f x)\n184: formatPersons :: (Printable a) => [a] -> String\n185: formatPersons ps = intercalate \", \" (map printIt ps)\n189: safeCompute :: Double -> Double -> Double -> Maybe Double\n190: safeCompute x y z = do\n192: a <- safeDiv x y\n193: b <- safeDiv a z\n194: return (a + b)\n197: module Extra.One where\n198: module Extra.Two where\n199: module Extra.Three where\n200: module Extra.Four where\n201: import qualified Data.Set as Set\n202: type RequestId = Int\n203: type ResponseId = Int\n204: class Renderable a where\n205: class Parsable a where\n206: class Executable a where\n207: data Envelope = Envelope String\n215: reqCoverHaskell1 :: Int -> Int\n216: reqCoverHaskell1 value = value + 1\n223: reqCoverHaskell2 :: Int -> Int\n224: reqCoverHaskell2 value = value + 2\n231: reqCoverHaskell3 :: Int -> Int\n232: reqCoverHaskell3 value = value + 3\n239: reqCoverHaskell4 :: Int -> Int\n240: reqCoverHaskell4 value = value + 4\n247: reqCoverHaskell5 :: Int -> Int\n248: reqCoverHaskell5 value = value + 5\n```\n",
4
- "stderr": ""
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "code": 0,
3
- "stdout": "@@@ tests/fixtures/fixture_java.java | java\n> Lines: 11-429\n```\n11: package com.example.app;\n13: import java.util.List;\n14: import java.util.Map;\n15: import java.util.Optional;\n16: import java.util.function.Function;\n17: import java.util.function.Predicate;\n18: import java.util.stream.Collectors;\n19: import static java.lang.Math.PI;\n27: @interface RequiresAuth {\n28: String role() default \"user\";\n29: }\n38: @SuppressWarnings(\"unchecked\")\n39: public class MyClass<T extends Comparable<T>> {\n42: public static final int MAX_SIZE = 100;\n45: private List<T> items;\n51: public MyClass(List<T> items) {\n52: this.items = items;\n53: }\n59: public void greet(String name) {\n61: if (name == null) {\n62: return;\n63: }\n64: System.out.println(\"Hello, \" + name);\n65: }\n71: private static String helper() {\n72: return \"ok\";\n73: }\n80: public Optional<T> findFirst(Predicate<T> predicate) {\n81: for (T item : items) {\n83: if (predicate.test(item)) {\n84: return Optional.of(item);\n85: }\n86: }\n87: return Optional.empty();\n88: }\n96: public <R> List<R> map(Function<T, R> mapper) {\n97: return items.stream()\n98: .map(mapper)\n99: .collect(Collectors.toList());\n100: }\n107: public double sumWildcard(List<? extends Number> source) {\n108: double total = 0.0;\n109: for (Number n : source) {\n110: total += n.doubleValue();\n111: }\n112: return total;\n113: }\n121: public class Builder {\n122: private List<T> pending;\n129: public Builder add(T item) {\n130: pending.add(item);\n131: return this;\n132: }\n138: public MyClass<T> build() {\n139: return new MyClass<>(pending);\n140: }\n141: }\n149: public static class Config {\n151: public final String key;\n153: public final Object value;\n160: public Config(String key, Object value) {\n161: this.key = key;\n162: this.value = value;\n163: }\n164: }\n165: }\n173: public interface Greeter {\n178: void sayHello(String name);\n184: default void sayGoodbye(String name) {\n185: System.out.println(\"Goodbye, \" + name);\n186: }\n192: static Greeter simple() {\n194: return name -> System.out.println(\"Hi, \" + name);\n195: }\n196: }\n204: public enum Color {\n206: RED(\"#FF0000\"),\n208: GREEN(\"#00FF00\"),\n210: BLUE(\"#0000FF\");\n213: private final String hex;\n219: Color(String hex) {\n220: this.hex = hex;\n221: }\n227: public String getHex() {\n228: return hex;\n229: }\n230: }\n240: public record Point(double x, double y) {\n245: public Point {\n246: if (Double.isNaN(x) || Double.isNaN(y)) {\n247: throw new IllegalArgumentException(\"NaN coordinates\");\n248: }\n249: }\n256: public double distanceTo(Point other) {\n257: double dx = this.x - other.x;\n258: double dy = this.y - other.y;\n259: return Math.sqrt(dx * dx + dy * dy);\n260: }\n261: }\n269: public sealed class Shape permits Circle, Rectangle {\n274: public double area() {\n275: return 0.0;\n276: }\n277: }\n284: public final class Circle extends Shape {\n286: private final double radius;\n292: public Circle(double radius) {\n293: this.radius = radius;\n294: }\n300: @Override\n301: public double area() {\n302: return PI * radius * radius;\n303: }\n304: }\n311: public final class Rectangle extends Shape {\n312: private final double width;\n313: private final double height;\n315: public Rectangle(double width, double height) {\n316: this.width = width;\n317: this.height = height;\n318: }\n320: @Override\n321: public double area() {\n322: return width * height;\n323: }\n324: }\n332: public class Evaluator {\n339: public static String describe(Shape shape) {\n341: return switch (shape) {\n342: case Circle c -> \"Circle with radius \" + c.area();\n343: case Rectangle r -> \"Rectangle with area \" + r.area();\n344: default -> \"Unknown shape\";\n345: };\n346: }\n354: @RequiresAuth(role = \"admin\")\n355: public static String readFile(String path) throws java.io.IOException {\n357: try (var reader = new java.io.BufferedReader(new java.io.FileReader(path))) {\n358: return reader.lines().collect(Collectors.joining(\"\\n\"));\n359: }\n360: }\n361: }\n364: package com.example.extra.one;\n365: package com.example.extra.two;\n366: package com.example.extra.three;\n367: package com.example.extra.four;\n368: interface Runner {}\n369: public interface Mapper {}\n370: public interface Handler {}\n371: public interface Auditor {}\n372: enum ModeJava { FAST, SAFE }\n373: enum PhaseJava { INIT, RUN }\n374: enum StatusJava { OPEN, CLOSED }\n375: enum KindJava { A, B }\n376: public static final int DEFAULT_LIMIT = 10;\n377: public static final int RETRY_LIMIT = 3;\n378: public static final int BUFFER_SIZE = 512;\n379: public static final int MAX_USERS = 99;\n380: @Trace\n383: class ReqCoverJava {\n391: static int reqCoverJava1(int value) { return value + 1; }\n400: static int reqCoverJava2(int value) { return value + 2; }\n409: static int reqCoverJava3(int value) { return value + 3; }\n418: static int reqCoverJava4(int value) { return value + 4; }\n427: static int reqCoverJava5(int value) { return value + 5; }\n429: }\n```\n",
4
- "stderr": ""
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "code": 0,
3
- "stdout": "@@@ tests/fixtures/fixture_javascript.js | javascript\n> Lines: 11-381\n```\n11: import React from 'react';\n12: import { useState, useEffect } from 'react';\n20: class MyComponent {\n22: #instanceId;\n25: static #registry = new Map();\n28: static {\n29: console.log('MyComponent class loaded');\n30: }\n36: constructor(id = 0) {\n37: this.#instanceId = id;\n38: MyComponent.#registry.set(id, this);\n39: }\n45: render() {\n47: return null;\n48: }\n54: getId() {\n55: return this.#instanceId;\n56: }\n63: static has(id) {\n64: return MyComponent.#registry.has(id);\n65: }\n66: }\n75: class EnhancedComponent extends MyComponent {\n80: render() {\n82: super.render();\n83: return { type: 'div', children: [] };\n84: }\n90: componentDidMount() {\n91: console.log('mounted');\n92: }\n93: }\n103: function greet(name) {\n104: return \"Hello \" + name;\n105: }\n112: async function fetchData() {\n114: return await fetch('/api');\n115: }\n122: const handler = (event) => {\n124: event.preventDefault();\n125: console.log(event.type);\n126: };\n134: const processItems = ({ items, count }) => {\n135: return items.slice(0, count).map(i => i.toUpperCase());\n136: };\n141: const MAX_SIZE = 100;\n144: const PLUGIN_KEY = Symbol('plugin');\n153: const MyWrapped = React.memo(() => {\n154: return null;\n155: });\n164: function* idGenerator() {\n165: let id = 0;\n166: while (true) {\n168: yield id++;\n169: }\n170: }\n179: function* rangeGenerator(start, end) {\n180: for (let i = start; i < end; i++) {\n181: yield i;\n182: }\n183: }\n194: async function* asyncDataStream(url) {\n195: let page = 0;\n196: while (true) {\n197: const response = await fetch(`${url}?page=${page}`);\n198: const data = await response.json();\n199: if (data.length === 0) {\n201: return;\n202: }\n203: yield data;\n204: page++;\n205: }\n206: }\n213: const initResult = (() => {\n215: const config = { debug: false };\n216: return Object.freeze(config);\n217: })();\n227: function createProxy(target) {\n228: return new Proxy(target, {\n229: get(obj, prop) {\n231: console.log(`Access: ${String(prop)}`);\n232: return Reflect.get(obj, prop);\n233: },\n234: set(obj, prop, value) {\n236: console.log(`Set: ${String(prop)} = ${value}`);\n237: return Reflect.set(obj, prop, value);\n238: },\n239: });\n240: }\n250: function buildDynamic(prefix) {\n251: return {\n252: [`${prefix}_name`]: 'value',\n253: [`${prefix}_id`]: 42,\n254: [Symbol.toPrimitive](hint) {\n255: return hint === 'string' ? prefix : 0;\n256: },\n257: };\n258: }\n268: function fetchAndProcess(url) {\n269: return fetch(url)\n270: .then(res => res.json())\n271: .then(data => {\n273: return { ...data, processed: true };\n274: })\n275: .catch(err => {\n277: console.error(err);\n278: return { error: true, processed: false };\n279: });\n280: }\n290: function configureApp({ host = 'localhost', port = 3000, db: { url: dbUrl = 'sqlite://' } = {} } = {}) {\n291: return { host, port, dbUrl };\n292: }\n297: const fs = require('fs');\n302: const _privateState = new WeakMap();\n310: function setPrivate(obj, data) {\n311: _privateState.set(obj, data);\n312: }\n322: async function loadPlugin(name) {\n324: const mod = await import(`./${name}.js`);\n325: return mod;\n326: }\n329: import fs from 'fs';\n330: import path from 'path';\n331: import url from 'url';\n332: export class ExtraService { constructor() { this.ready = true; } }\n333: class HelperComponent { render() { return null; } }\n334: export default class WidgetFactory { create() { return {}; } }\n335: const BoundComponent = React.memo(() => null);\n336: const ForwardedWidget = React.forwardRef((_, ref) => ({ ref }));\n337: const LazyWidget = React.lazy(() => import('./Widget'));\n338: const MemoPanel = memo(() => null);\n339: const API_TOKEN = 'tok';\n340: const CACHE_SIZE = 128;\n341: const RETRY_LIMIT = 5;\n342: const pathMod = require('path');\n343: const cryptoMod = require('crypto');\n344: const utilMod = require('util');\n345: const osMod = require('os');\n353: function reqCoverJs1(value) { return value + 1; }\n360: function reqCoverJs2(value) { return value + 2; }\n367: function reqCoverJs3(value) { return value + 3; }\n374: function reqCoverJs4(value) { return value + 4; }\n381: function reqCoverJs5(value) { return value + 5; }\n```\n",
4
- "stderr": ""
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "code": 0,
3
- "stdout": "@@@ tests/fixtures/fixture_kotlin.kt | kotlin\n> Lines: 11-449\n```\n11: import kotlin.collections.List\n12: import kotlinx.coroutines.flow.Flow\n13: import kotlinx.coroutines.flow.flow\n18: @Deprecated(\"Use UserV2 instead\", replaceWith = ReplaceWith(\"UserV2\"))\n19: data class User(val name: String, val age: Int = 0)\n28: sealed class Result<out T> {\n34: data class Success<T>(val value: T) : Result<T>()\n42: data class Error(val message: String, val cause: Throwable? = null) : Result<Nothing>()\n48: object Loading : Result<Nothing>()\n56: fun <R> map(transform: (T) -> R): Result<R> = when (this) {\n57: is Success -> Success(transform(value))\n58: is Error -> Error(message, cause)\n59: is Loading -> Loading\n60: }\n61: }\n70: interface Repository<T> {\n76: fun findById(id: Int): T?\n83: fun save(entity: T): Boolean\n89: fun findAll(): Flow<T>\n90: }\n96: sealed interface Identifiable {\n98: val id: Int\n99: }\n107: enum class Color(val hex: String) {\n109: RED(\"#FF0000\"),\n111: GREEN(\"#00FF00\"),\n113: BLUE(\"#0000FF\");\n115: companion object {\n121: fun fromHex(hex: String): Color? = values().find { it.hex == hex }\n122: }\n123: }\n134: data class Entity(\n135: override val id: Int,\n136: val name: String,\n137: val status: String = \"active\",\n138: ) : Identifiable\n147: @JvmInline\n148: value class EmailAddress(val value: String) {\n149: init {\n150: require(value.contains('@')) { \"Invalid email: $value\" }\n151: }\n154: val domain: String get() = value.substringAfter('@')\n155: }\n165: fun greet(name: String): String {\n166: return \"Hello $name\"\n167: }\n174: suspend fun fetchData(): String {\n176: return \"data\"\n177: }\n186: fun processItems(items: List<String>, transform: (String) -> String): List<String> {\n187: return items.map(transform)\n188: }\n197: fun String.wordCount(): Int {\n198: return this.trim().split(\"\\\\s+\".toRegex()).size\n199: }\n205: val String.lastChar: Char?\n206: get() = if (this.isEmpty()) null else this[this.length - 1]\n217: inline fun <reified T> filterByType(items: List<Any>): List<T> {\n218: return items.filterIsInstance<T>()\n219: }\n229: data class Vector2(val x: Double, val y: Double) {\n235: operator fun plus(other: Vector2) = Vector2(x + other.x, y + other.y)\n241: operator fun unaryMinus() = Vector2(-x, -y)\n248: operator fun times(other: Vector2) = x * other.x + y * other.y\n249: }\n254: val PI = 3.14159265\n257: var counter = 0\n265: object Singleton {\n267: private val config = mutableMapOf<String, Any>()\n274: fun set(key: String, value: Any) {\n275: config[key] = value\n276: }\n284: @Suppress(\"UNCHECKED_CAST\")\n285: fun <T> get(key: String): T? = config[key] as? T\n286: }\n292: companion object Factory {\n293: }\n303: class DelegatingList<T>(private val inner: MutableList<T>) : List<T> by inner {\n305: var accessCount = 0\n306: private set\n311: override val size: Int\n312: get() {\n313: accessCount++\n314: return inner.size\n315: }\n316: }\n324: class Service {\n326: lateinit var dependency: Repository<Entity>\n329: val resource: String by lazy {\n331: \"expensive_resource\"\n332: }\n338: fun isReady(): Boolean = ::dependency.isInitialized\n339: }\n347: class HtmlBuilder {\n348: private val elements = mutableListOf<String>()\n354: fun div(block: HtmlBuilder.() -> Unit) {\n355: val inner = HtmlBuilder()\n356: inner.block()\n357: elements.add(\"<div>${inner.build()}</div>\")\n358: }\n364: fun text(text: String) {\n365: elements.add(text)\n366: }\n372: fun build(): String = elements.joinToString(\"\")\n373: }\n381: fun html(block: HtmlBuilder.() -> Unit): String {\n382: val builder = HtmlBuilder()\n383: builder.block()\n384: return builder.build()\n385: }\n388: import kotlin.math.max\n389: import kotlin.math.min\n390: interface Logger\n391: interface Parser\n392: interface Emitter\n393: interface Formatter\n394: enum class ModeKt { FAST, SAFE }\n395: enum class PhaseKt { INIT, RUN }\n396: enum class StatusKt { READY, WAITING }\n397: enum class SignalKt { ON, OFF }\n398: @Synchronized\n399: @PublishedApi\n400: object CacheStore\n401: var retries = 0\n402: var attempts = 0\n403: var state = \"idle\"\n413: fun reqCoverKotlin1(value: Int): Int = value + 1\n422: fun reqCoverKotlin2(value: Int): Int = value + 2\n431: fun reqCoverKotlin3(value: Int): Int = value + 3\n440: fun reqCoverKotlin4(value: Int): Int = value + 4\n449: fun reqCoverKotlin5(value: Int): Int = value + 5\n```\n",
4
- "stderr": ""
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "code": 0,
3
- "stdout": "@@@ tests/fixtures/fixture_lua.lua | lua\n> Lines: 14-274\n```\n14: function globalFunc(x)\n15: return x + 1\n16: end\n22: local function localFunc(y)\n23: if type(y) ~= \"number\" then\n24: error(\"expected number, got \" .. type(y))\n25: end\n27: return y * 2\n28: end\n33: local function sumAll(...)\n34: local total = 0\n35: local args = {...}\n36: for _, v in ipairs(args) do\n38: total = total + v\n39: end\n40: return total\n41: end\n46: local myVar = 42\n49: local config = {\n50: debug = false,\n51: maxRetries = 3,\n52: timeout = 30.0,\n53: }\n59: local handler = function(event)\n61: if event.type == \"click\" then\n62: print(\"clicked at \" .. event.x .. \",\" .. event.y)\n63: else\n64: print(\"event: \" .. event.type)\n65: end\n66: end\n72: local MyModule = {}\n73: MyModule.__index = MyModule\n78: function MyModule.new(name)\n79: local self = setmetatable({}, MyModule)\n80: self.name = name\n81: self._items = {}\n82: return self\n83: end\n88: MyModule.method = function(self)\n89: return self.name\n90: end\n94: function MyModule:addItem(item)\n96: table.insert(self._items, item)\n97: end\n101: function MyModule:count()\n102: return #self._items\n103: end\n109: local Animal = {}\n110: Animal.__index = Animal\n115: function Animal.new(species)\n116: local self = setmetatable({}, Animal)\n117: self.species = species\n118: return self\n119: end\n123: function Animal:speak()\n124: return self.species .. \" says ...\"\n125: end\n129: local Dog = setmetatable({}, { __index = Animal })\n130: Dog.__index = Dog\n135: function Dog.new(name)\n136: local self = Animal.new(\"Dog\")\n137: setmetatable(self, Dog)\n138: self.dogName = name\n139: return self\n140: end\n144: function Dog:speak()\n145: return self.dogName .. \" says Woof!\"\n146: end\n153: local function makeCounter(step)\n154: local count = 0\n155: return function()\n157: count = count + step\n158: return count\n159: end\n160: end\n167: local function fibonacci(limit)\n168: return coroutine.wrap(function()\n169: local a, b = 0, 1\n170: for _ = 1, limit do\n171: coroutine.yield(a)\n173: a, b = b, a + b\n174: end\n175: end)\n176: end\n184: local function safeCall(fn, ...)\n185: local ok, result = pcall(fn, ...)\n186: if not ok then\n188: print(\"Error: \" .. tostring(result))\n189: return false, nil\n190: end\n191: return true, result\n192: end\n197: local mixedTable = {\n199: \"first\",\n200: \"second\",\n202: name = \"test\",\n203: count = 42,\n205: [math.pi] = \"pi\",\n207: nested = {\n208: x = 1,\n209: y = 2,\n210: },\n211: }\n219: local function range(from, to)\n220: local i = from - 1\n221: return function()\n222: i = i + 1\n223: if i <= to then\n224: return i\n225: end\n227: end\n228: end\n236: function req_cover_lua_1(value)\n237: return value + 1\n238: end\n245: function req_cover_lua_2(value)\n246: return value + 2\n247: end\n254: function req_cover_lua_3(value)\n255: return value + 3\n256: end\n263: function req_cover_lua_4(value)\n264: return value + 4\n265: end\n272: function req_cover_lua_5(value)\n273: return value + 5\n274: end\n```\n",
4
- "stderr": ""
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "code": 0,
3
- "stdout": "@@@ tests/fixtures/fixture_perl.pl | perl\n> Lines: 1-308\n```\n1: #!/usr/bin/perl\n16: package MyPackage;\n18: use strict;\n19: use warnings;\n20: use Carp qw(croak confess);\n21: require Exporter;\n22: use constant MAX_SIZE => 100;\n23: use constant {\n24: MIN_SIZE => 1,\n25: DEFAULT_NAME => 'unnamed',\n26: };\n29: our $VERSION = '1.0.0';\n32: our @EXPORT = qw(greet process);\n35: our @EXPORT_OK = qw(helper format_output);\n48: sub new {\n49: my ($class, %args) = @_;\n50: croak \"name is required\" unless $args{name};\n51: my $self = bless {\n52: name => $args{name},\n53: age => $args{age} || 0,\n54: _items => [],\n55: _cache => {},\n56: }, $class;\n57: return $self;\n58: }\n62: sub name {\n63: my ($self, $val) = @_;\n64: if (defined $val) {\n66: $self->{name} = $val;\n67: return $self;\n68: }\n69: return $self->{name};\n70: }\n74: sub is_valid {\n75: my ($self) = @_;\n76: return defined($self->{name}) && length($self->{name}) > 0 ? 1 : 0;\n77: }\n83: sub greet {\n84: my ($name) = @_;\n86: unless (defined $name) {\n87: warn \"greet called without name\";\n88: return;\n89: }\n90: print \"Hello $name\\n\";\n91: }\n95: sub process {\n96: return 1;\n97: }\n102: sub format_output {\n103: my (@items) = @_;\n104: if (wantarray()) {\n106: return map { uc($_) } @items;\n107: } else {\n109: return scalar @items;\n110: }\n111: }\n115: sub helper {\n116: return \"ok\";\n117: }\n124: sub extract_emails {\n125: my ($text) = @_;\n126: my @emails;\n128: while ($text =~ /\\b([\\w.+-]+@[\\w-]+\\.[\\w.]+)\\b/g) {\n129: push @emails, $1;\n130: }\n131: return @emails;\n132: }\n139: sub replace_all {\n140: my ($text, $pattern, $replacement) = @_;\n141: $text =~ s/$pattern/$replacement/g;\n142: return $text;\n143: }\n150: sub make_multiplier {\n151: my ($factor) = @_;\n153: return sub {\n154: my ($x) = @_;\n155: return $x * $factor;\n156: };\n157: }\n162: my %dispatch = (\n163: add => sub { $_[0] + $_[1] },\n164: sub => sub { $_[0] - $_[1] },\n165: mul => sub { $_[0] * $_[1] },\n166: div => sub {\n167: croak \"Division by zero\" if $_[1] == 0;\n168: return $_[0] / $_[1];\n169: },\n170: );\n178: sub dispatch {\n179: my ($op, $a, $b) = @_;\n180: my $handler = $dispatch{$op}\n181: or croak \"Unknown operation: $op\";\n182: return $handler->($a, $b);\n183: }\n190: sub generate_template {\n191: my ($name) = @_;\n192: return <<END_TEMPLATE;\n193: Dear $name,\n195: This is a generated template.\n196: Version: $VERSION\n197: Max size: @{[ MAX_SIZE ]}\n199: Regards,\n200: The System\n201: END_TEMPLATE\n202: }\n210: sub AUTOLOAD {\n211: my ($self, @args) = @_;\n212: our $AUTOLOAD;\n214: my $method = $AUTOLOAD;\n215: $method =~ s/.*:://;\n216: return if $method eq 'DESTROY';\n218: if ($method =~ /^get_(\\w+)$/) {\n219: my $attr = $1;\n220: return $self->{$attr};\n221: }\n222: croak \"Undefined method: $method\";\n223: }\n230: sub safe_execute {\n231: my ($code) = @_;\n232: my $result = eval {\n233: $code->();\n234: };\n235: if ($@) {\n237: warn \"Caught error: $@\";\n238: return undef;\n239: }\n240: return $result;\n241: }\n243: 1;\n248: package Extra::One;\n249: package Extra::Two;\n250: package Extra::Three;\n251: package Extra::Four;\n252: use constant RETRY_LIMIT => 5;\n253: use constant API_HOST => 'localhost';\n254: use constant FEATURE_FLAG => 1;\n255: use constant CACHE_SIZE => 256;\n256: use constant DEFAULT_USER => 'guest';\n257: use lib 'lib';\n265: sub req_cover_perl_1 {\n266: my ($value) = @_;\n267: return $value + 1;\n268: }\n275: sub req_cover_perl_2 {\n276: my ($value) = @_;\n277: return $value + 2;\n278: }\n285: sub req_cover_perl_3 {\n286: my ($value) = @_;\n287: return $value + 3;\n288: }\n295: sub req_cover_perl_4 {\n296: my ($value) = @_;\n297: return $value + 4;\n298: }\n305: sub req_cover_perl_5 {\n306: my ($value) = @_;\n307: return $value + 5;\n308: }\n```\n",
4
- "stderr": ""
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "code": 0,
3
- "stdout": "@@@ tests/fixtures/fixture_php.php | php\n> Lines: 1-431\n```\n1: <?php\n12: namespace App\\Models;\n14: use App\\Contracts\\Repository;\n15: use App\\Events\\{ModelCreated, ModelDeleted};\n16: use Psr\\Log\\LoggerInterface;\n17: require_once 'config.php';\n22: const VERSION = \"1.0\";\n25: const MAX_PER_PAGE = 50;\n33: enum Status: string {\n35: case Draft = 'draft';\n37: case Published = 'published';\n39: case Archived = 'archived';\n45: public function isActive(): bool {\n46: return $this === self::Published;\n47: }\n53: public function label(): string {\n54: return match($this) {\n55: self::Draft => 'Draft',\n56: self::Published => 'Published',\n57: self::Archived => 'Archived',\n58: };\n59: }\n60: }\n69: abstract class BaseModel {\n75: public function __construct(\n76: public readonly int $id,\n77: public readonly \\DateTimeImmutable $createdAt = new \\DateTimeImmutable(),\n78: ) {}\n84: public function save(): bool {\n86: if (!$this->validate()) {\n87: return false;\n88: }\n89: return true;\n90: }\n96: abstract protected function validate(): bool;\n102: private static function validateConstraints(): bool {\n103: return true;\n104: }\n110: abstract public function toArray(): array;\n111: }\n120: final class User extends BaseModel {\n122: private string $name;\n125: private ?string $email;\n133: public function __construct(\n134: int $id,\n135: string $name,\n136: ?string $email = null,\n137: ) {\n138: parent::__construct($id);\n139: $this->name = $name;\n140: $this->email = $email;\n141: }\n147: public function getName(): string {\n148: return $this->name;\n149: }\n155: public function getIdentifier(): string|int {\n157: return $this->email ?? $this->id;\n158: }\n164: protected function validate(): bool {\n165: return strlen($this->name) > 0;\n166: }\n172: public function toArray(): array {\n173: return [\n174: 'id' => $this->id,\n175: 'name' => $this->name,\n176: 'email' => $this->email,\n177: ];\n178: }\n179: }\n187: interface Repo {\n192: public function findAll(): iterable;\n199: public function findById(int $id): ?BaseModel;\n206: public function count(array $criteria = []): int;\n207: }\n215: trait Cacheable {\n217: protected int $cacheTtl = 3600;\n223: public function cache(): bool {\n225: return true;\n226: }\n232: public function invalidateCache(): void {\n234: }\n240: abstract public function cacheKey(): string;\n241: }\n247: trait SoftDeletable {\n249: protected ?\\DateTimeImmutable $deletedAt = null;\n255: public function softDelete(): void {\n256: $this->deletedAt = new \\DateTimeImmutable();\n257: }\n263: public function isDeleted(): bool {\n264: return $this->deletedAt !== null;\n265: }\n266: }\n275: final class CachedUser extends User {\n276: use Cacheable;\n277: use SoftDeletable;\n283: public function cacheKey(): string {\n284: return \"user:{$this->id}\";\n285: }\n286: }\n294: #[\\Attribute(\\Attribute::TARGET_METHOD | \\Attribute::IS_REPEATABLE)]\n295: class Route {\n301: public function __construct(\n302: public readonly string $path,\n303: public readonly string $method = 'GET',\n304: ) {}\n305: }\n314: function helper(): bool {\n315: return true;\n316: }\n324: function processData(mixed $data): string {\n326: return match(true) {\n327: is_string($data) => \"string: \" . strlen($data),\n328: is_int($data) => \"int: $data\",\n329: is_array($data) => \"array: \" . count($data),\n330: $data instanceof BaseModel => \"model: \" . $data->id,\n331: default => \"unknown\",\n332: };\n333: }\n342: function applyTransform(array $items, callable $fn): array {\n343: return array_map(fn(int $x): int => $fn($x), $items);\n344: }\n352: function createMultiplier(int $factor): \\Closure {\n354: return fn(int $x): int => $x * $factor;\n355: }\n363: function readFileContent(string $path): string|false {\n364: if (!file_exists($path)) {\n365: return false;\n366: }\n367: return file_get_contents($path);\n368: }\n371: namespace App\\Services;\n372: namespace App\\Http;\n373: namespace App\\Domain;\n374: namespace App\\Support;\n375: interface ServiceContract {}\n376: interface CacheContract {}\n377: interface LoggerContract {}\n378: interface EventContract {}\n379: trait HandlesEvents {}\n380: trait TracksChanges {}\n381: trait AuthorizesRequests {}\n382: const API_LIMIT = 50;\n383: const DEFAULT_PAGE = 1;\n384: const TIMEOUT = 30;\n385: final class ApiClient {}\n395: function req_cover_php_1(int $value): int { return $value + 1; }\n404: function req_cover_php_2(int $value): int { return $value + 2; }\n413: function req_cover_php_3(int $value): int { return $value + 3; }\n422: function req_cover_php_4(int $value): int { return $value + 4; }\n431: function req_cover_php_5(int $value): int { return $value + 5; }\n```\n",
4
- "stderr": ""
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "code": 0,
3
- "stdout": "@@@ tests/fixtures/fixture_python.py | python\n> Lines: 1-500\n```\n1: #!/usr/bin/env python3\n7: import asyncio\n8: import os\n9: import sys\n10: from pathlib import Path\n11: from typing import (\n12: Optional, List, Dict, Union, Protocol,\n13: TypeVar, Generic, Iterator, AsyncIterator\n14: )\n15: from dataclasses import dataclass, field\n16: from abc import ABC, abstractmethod\n17: from contextlib import contextmanager\n19: MAX_RETRIES = 3\n20: DEFAULT_TIMEOUT = 30.0\n21: _INTERNAL_CACHE: Dict[str, int] = {}\n23: T = TypeVar(\"T\")\n26: @dataclass(slots=True)\n27: class Config:\n35: name: str\n36: values: Dict[str, str] = field(default_factory=dict)\n37: debug: bool = False\n39: def get(self, key: str, default: str = \"\") -> str:\n47: if key in self.values:\n48: return self.values[key]\n50: return default\n52: def __post_init__(self) -> None:\n58: if not self.name.strip():\n59: raise ValueError(\"Config name cannot be empty\")\n62: class MyClass:\n69: class InnerHelper:\n74: def __init__(self, tag: str):\n79: self.tag = tag\n81: def describe(self) -> str:\n86: return f\"Helper({self.tag})\"\n88: def __init__(self, name: str, retries: int = MAX_RETRIES):\n94: self._name = name\n95: self._retries = retries\n97: self._call_count = 0\n99: @property\n100: def name(self) -> str:\n105: return self._name\n107: @name.setter\n108: def name(self, value: str) -> None:\n114: if not value:\n115: raise ValueError(\"Name cannot be empty\")\n116: self._name = value\n118: @staticmethod\n119: def create_default() -> \"MyClass\":\n124: return MyClass(\"default\")\n126: @classmethod\n127: def from_dict(cls, data: dict) -> \"MyClass\":\n134: return cls(\n135: name=data[\"name\"],\n136: retries=data.get(\"retries\", MAX_RETRIES),\n137: )\n139: def process(self, items: List[str], *, verbose: bool = False) -> Optional[str]:\n146: self._call_count += 1\n147: for item in items:\n149: if not item.strip():\n150: continue\n151: if verbose:\n152: print(f\"Processing: {item}\")\n154: return item if len(item) > 1 else item.upper()\n155: return None\n157: def compute(self, x: int, y: int) -> int:\n165: return (x + y) if (x > 0 and y > 0) else abs(x - y)\n168: class AbstractProcessor(ABC):\n178: @abstractmethod\n179: def execute(self, data: bytes) -> bool:\n185: ...\n187: @abstractmethod\n188: async def execute_async(self, data: bytes) -> bool:\n194: ...\n197: class ConcreteProcessor(AbstractProcessor):\n206: def execute(self, data: bytes) -> bool:\n213: try:\n214: text = data.decode(\"utf-8\")\n216: return bool(text.strip())\n217: except UnicodeDecodeError:\n218: return False\n219: finally:\n221: pass\n223: async def execute_async(self, data: bytes) -> bool:\n229: return self.execute(data)\n232: class GenericContainer(Generic[T]):\n242: def __init__(self) -> None:\n244: self._items: List[T] = []\n246: def add(self, item: T) -> None:\n251: self._items.append(item)\n253: def __iter__(self) -> Iterator[T]:\n258: yield from self._items\n260: def find(self, predicate) -> Optional[T]:\n266: for item in self._items:\n267: if predicate(item):\n268: return item\n269: return None\n272: class Renderable(Protocol):\n278: def render(self) -> str:\n283: ...\n286: @property\n287: def regular_function(x: int) -> int:\n293: return x\n296: def function_with_walrus(data: List[int]) -> Optional[int]:\n303: if (n := next((x for x in data if x > 10), None)) is not None:\n304: return n\n305: return None\n308: def multi_return_paths(value: int) -> Union[str, int, None]:\n314: match value:\n315: case 0:\n316: return \"zero\"\n317: case n if n < 0:\n319: return abs(n)\n320: case n if n > 100:\n321: return None\n322: case _:\n323: return str(value)\n326: def generator_function(limit: int) -> Iterator[int]:\n332: for i in range(limit):\n334: yield i * i\n337: async def async_generator(items: List[str]) -> AsyncIterator[str]:\n343: for item in items:\n344: if item.strip():\n345: yield item.upper()\n348: @contextmanager\n349: def managed_resource(path: str):\n356: f = open(path, \"r\")\n357: try:\n358: yield f\n359: finally:\n360: f.close()\n363: def closure_factory(multiplier: int):\n369: def inner(x: int) -> int:\n376: return x * multiplier\n377: return inner\n380: def uses_unpacking(*args: int, **kwargs: str) -> Dict[str, Union[int, str]]:\n387: result: Dict[str, Union[int, str]] = {}\n388: for i, val in enumerate(args):\n389: result[f\"arg_{i}\"] = val\n390: result.update(kwargs)\n391: return result\n395: transform = lambda x: x * 2 + 1\n398: EVEN_SQUARES = [x ** 2 for x in range(20) if x % 2 == 0]\n401: async def async_function():\n406: await asyncio.sleep(0)\n409: def deeply_nested_logic(matrix: List[List[int]]) -> int:\n415: total = 0\n416: for row in matrix:\n417: for val in row:\n418: if val > 0:\n419: if val % 2 == 0:\n421: total += val\n422: else:\n423: continue\n424: else:\n426: pass\n427: return total\n430: def exception_handling_example(path: str) -> Optional[str]:\n436: try:\n437: with open(path, \"r\") as f:\n438: content = f.read()\n439: if not content:\n440: raise ValueError(\"Empty file\")\n441: return content\n442: except FileNotFoundError:\n444: return None\n445: except (PermissionError, OSError) as e:\n447: sys.exit(1)\n448: except Exception:\n449: raise\n450: finally:\n452: pass\n455: MAX_BATCH = 64\n457: CACHE_LIMIT = 128\n459: MAX_USERS = 500\n467: def req_cover_py_1(value: int) -> int:\n468: return value + 1\n475: def req_cover_py_2(value: int) -> int:\n476: return value + 2\n483: def req_cover_py_3(value: int) -> int:\n484: return value + 3\n491: def req_cover_py_4(value: int) -> int:\n492: return value + 4\n499: def req_cover_py_5(value: int) -> int:\n500: return value + 5\n```\n",
4
- "stderr": ""
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "code": 0,
3
- "stdout": "@@@ tests/fixtures/fixture_ruby.rb | ruby\n> Lines: 10-343\n```\n10: require 'json'\n11: require 'set'\n12: require_relative 'helper'\n15: MAX_RETRIES = 42\n18: DEFAULT_ENCODING = 'utf-8'.freeze\n20: attr_accessor :name, :age\n26: module Loggable\n29: def log(message)\n30: puts \"[#{self.class.name}] #{message}\"\n31: end\n35: def log_error(error)\n36: puts \"[ERROR] #{error.message}\"\n37: puts error.backtrace.first(5).join(\"\\n\") if error.backtrace\n38: end\n39: end\n47: class MyClass\n48: include Loggable\n49: include Comparable\n52: attr_accessor :name\n55: attr_reader :created_at\n60: def initialize(name, **options)\n61: @name = name\n62: @options = options\n63: @created_at = Time.now\n65: @options[:retries] ||= MAX_RETRIES\n66: end\n71: def self.create(attrs)\n72: new(attrs[:name], **attrs.except(:name))\n73: end\n78: def self.bulk_create(names)\n79: names.map { |n| new(n) }\n80: end\n84: def valid?\n85: !@name.nil? && !@name.empty?\n86: end\n91: def matches?(pattern)\n92: return false if @name.nil?\n93: pattern.match?(@name)\n94: end\n99: def <=>(other)\n100: @name <=> other.name\n101: end\n106: def +(other)\n107: self.class.new(\"#{@name}+#{other.name}\")\n108: end\n112: def to_s\n113: \"MyClass(#{@name})\"\n114: end\n121: def method_missing(method, *args, &block)\n122: if method.to_s.start_with?('find_by_')\n123: field = method.to_s.sub('find_by_', '')\n124: \"Finding by #{field}: #{args.first}\"\n125: else\n126: super\n127: end\n128: end\n134: def respond_to_missing?(method, include_private = false)\n135: method.to_s.start_with?('find_by_') || super\n136: end\n138: protected\n142: def internal_config\n143: @options.dup\n144: end\n146: private\n150: def validate!\n151: raise \"Invalid name\" unless valid?\n152: end\n153: end\n160: class SpecialClass < MyClass\n164: def initialize(name, priority: 0, **options)\n165: super(name, **options)\n166: @priority = priority\n167: end\n171: def to_s\n172: \"SpecialClass(#{@name}, pri=#{@priority})\"\n173: end\n174: end\n180: module MyModule\n183: def helper\n184: true\n185: end\n191: def process_with_block(data)\n192: if block_given?\n193: yield(data)\n194: else\n195: data\n196: end\n197: end\n204: def self.format_list(items)\n205: items.map(&:to_s).join(', ')\n206: end\n207: end\n213: Coordinate = Struct.new(:x, :y) do\n216: def distance_from_origin\n217: Math.sqrt(x**2 + y**2)\n218: end\n219: end\n225: class DynamicModel\n227: %w[title body author].each do |field|\n229: define_method(field) do\n230: instance_variable_get(\"@#{field}\")\n231: end\n234: define_method(\"#{field}=\") do |value|\n235: instance_variable_set(\"@#{field}\", value)\n236: end\n237: end\n238: end\n243: doubler = ->(x) { x * 2 }\n246: greeting_proc = Proc.new { |name| \"Hello, #{name}!\" }\n255: def with_retry(attempts: MAX_RETRIES)\n256: tries = 0\n257: begin\n258: tries += 1\n259: yield\n260: rescue StandardError => e\n262: retry if tries < attempts\n263: raise \"Failed after #{attempts} attempts: #{e.message}\"\n264: ensure\n266: puts \"Completed after #{tries} attempt(s)\"\n267: end\n268: end\n274: module StringExtensions\n275: refine String do\n278: def email?\n279: match?(/\\A[\\w+\\-.]+@[a-z\\d\\-]+(\\.[a-z\\d\\-]+)*\\.[a-z]+\\z/i)\n280: end\n281: end\n282: end\n287: class ServiceObject; end\n288: class ReportBuilder; end\n289: module Metrics; end\n290: module Extras; end\n291: MAX_LIMIT = 100\n292: API_VERSION = \"v2\"\n293: CACHE_SIZE = 1024\n294: attr_writer :token\n295: attr_reader :state\n296: require 'yaml'\n297: require 'logger'\n305: def req_cover_ruby_1(value)\n306: value + 1\n307: end\n314: def req_cover_ruby_2(value)\n315: value + 2\n316: end\n323: def req_cover_ruby_3(value)\n324: value + 3\n325: end\n332: def req_cover_ruby_4(value)\n333: value + 4\n334: end\n341: def req_cover_ruby_5(value)\n342: value + 5\n343: end\n```\n",
4
- "stderr": ""
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "code": 0,
3
- "stdout": "@@@ tests/fixtures/fixture_rust.rs | rust\n> Lines: 9-378\n```\n9: use std::io;\n10: use std::collections::HashMap;\n11: use std::fmt::{self, Display, Formatter};\n12: use std::sync::{Arc, Mutex};\n19: #[derive(Debug, Clone, PartialEq)]\n20: pub struct MyStruct {\n22: field: i32,\n23: }\n29: #[derive(Debug)]\n30: pub struct BorrowedData<'a> {\n32: content: &'a str,\n34: tag: u64,\n35: }\n41: pub struct TypedMap<K: std::hash::Hash + Eq, V: Clone> {\n43: inner: HashMap<K, V>,\n44: }\n51: pub enum MyEnum {\n53: A,\n55: B(String),\n57: C { x: i32, y: i32 },\n58: }\n65: pub trait MyTrait {\n67: fn do_work(&self);\n73: fn do_work_with_ctx(&self, ctx: &str) -> bool {\n75: println!(\"ctx: {}\", ctx);\n76: self.do_work();\n77: true\n78: }\n79: }\n85: pub trait Parser<'a> {\n87: type Output;\n93: fn parse(&self, input: &'a [u8]) -> Result<Self::Output, io::Error>;\n94: }\n96: impl MyStruct {\n100: fn new() -> Self {\n101: Self { field: 0 }\n102: }\n108: pub fn with_value(val: i32) -> Self {\n109: Self { field: val }\n110: }\n115: pub fn value(&self) -> i32 {\n116: self.field\n117: }\n123: pub fn try_update(&mut self, new_val: i32) -> Option<i32> {\n124: if new_val == self.field {\n125: return None;\n126: }\n127: let old = self.field;\n128: self.field = new_val;\n130: Some(old)\n131: }\n132: }\n134: impl MyTrait for MyStruct {\n136: fn do_work(&self) {\n137: println!(\"{:?}\", self);\n138: }\n139: }\n141: impl Display for MyStruct {\n146: fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {\n147: write!(f, \"MyStruct({})\", self.field)\n148: }\n149: }\n153: impl<K, V> TypedMap<K, V>\n154: where\n155: K: std::hash::Hash + Eq + Display,\n156: V: Clone + Default,\n157: {\n163: pub fn insert(&mut self, key: K, value: V) -> Option<V> {\n164: self.inner.insert(key, value)\n165: }\n171: pub fn get_or_default(&self, key: &K) -> V {\n172: match self.inner.get(key) {\n173: Some(v) => v.clone(),\n174: None => V::default(),\n175: }\n176: }\n177: }\n182: pub mod my_module;\n185: pub(crate) mod internal {\n187: pub(crate) static COUNTER: std::sync::atomic::AtomicUsize =\n188: std::sync::atomic::AtomicUsize::new(0);\n189: }\n196: macro_rules! hashmap {\n197: ($($key:expr => $val:expr),* $(,)?) => {{\n198: let mut map = HashMap::new();\n199: $(map.insert($key, $val);)*\n200: map\n201: }};\n202: }\n205: macro_rules! my_macro {\n206: () => {};\n207: ($x:expr) => { println!(\"{}\", $x) };\n208: ($x:expr, $($rest:expr),+) => {\n209: print!(\"{}, \", $x);\n210: my_macro!($($rest),+);\n211: };\n212: }\n217: const MY_CONST: i32 = 42;\n220: static MY_STATIC: i32 = 0;\n223: static CONFIG: std::sync::LazyLock<HashMap<String, String>> =\n224: std::sync::LazyLock::new(|| HashMap::new());\n229: pub type IoResult<T> = Result<T, io::Error>;\n232: pub type MyAlias = i32;\n240: pub fn my_function(input: Option<&str>) -> String {\n242: let text = match input {\n243: Some(s) if !s.is_empty() => s,\n244: Some(_) => return String::from(\"empty\"),\n245: None => return String::from(\"none\"),\n246: };\n248: text.to_uppercase()\n249: }\n254: pub async fn async_function() -> String {\n256: String::from(\"hello async\")\n257: }\n264: pub fn filter_with<F>(items: &[i32], predicate: F) -> Vec<i32>\n265: where\n266: F: Fn(&i32) -> bool,\n267: {\n268: items.iter().copied().filter(|x| predicate(x)).collect()\n269: }\n275: pub fn create_worker(use_struct: bool) -> Box<dyn MyTrait> {\n276: if use_struct {\n277: Box::new(MyStruct::new())\n278: } else {\n279: panic!(\"No alternative implementation available\");\n280: }\n281: }\n288: pub unsafe fn read_raw(ptr: *const i32) -> i32 {\n290: *ptr\n291: }\n297: pub extern \"C\" fn ffi_double(x: i32) -> i32 {\n298: x * 2\n299: }\n305: pub fn describe_enum(val: &MyEnum) -> String {\n306: match val {\n307: MyEnum::A => String::from(\"unit\"),\n308: MyEnum::B(s) => format!(\"string: {}\", s),\n309: MyEnum::C { x, y } => {\n311: let mag = ((x * x + y * y) as f64).sqrt();\n312: format!(\"point({}, {}) mag={:.2}\", x, y, mag)\n313: }\n314: }\n315: }\n318: use std::time::Duration;\n319: pub mod ext_tools { pub fn id() -> i32 { 1 } }\n320: mod ext_local { pub fn ping() -> i32 { 2 } }\n321: pub mod ext_api { pub fn pong() -> i32 { 3 } }\n322: #[inline]\n323: #[allow(dead_code)]\n324: #[cfg(test)]\n325: pub enum Status { Ready, Busy }\n326: pub enum Mode { Alpha, Beta }\n327: pub enum Signal { On, Off }\n328: pub enum ErrorKind { Io, Parse }\n329: pub struct ExtraNode { pub id: i32 }\n330: struct InnerNode { id: i32 }\n331: pub trait Inspectable { fn inspect(&self) -> i32; }\n332: trait Named { fn name(&self) -> &'static str; }\n333: pub trait Executable { fn exec(&self) -> i32; }\n334: impl Inspectable for ExtraNode { fn inspect(&self) -> i32 { self.id } }\n335: impl Named for InnerNode { fn name(&self) -> &'static str { \"inner\" } }\n336: impl Executable for MyEnum { fn exec(&self) -> i32 { 1 } }\n337: macro_rules! ext_macro { () => { 42 } }\n338: macro_rules! trace_macro { ($v:expr) => { $v }; }\n339: macro_rules! build_pair { ($a:expr,$b:expr) => { ($a,$b) }; }\n340: pub const LIMIT: usize = 8;\n341: pub type ItemId = u64;\n342: type AliasValue = i32;\n350: fn req_cover_rust_1(value: i32) -> i32 { value + 1 }\n357: fn req_cover_rust_2(value: i32) -> i32 { value + 2 }\n364: fn req_cover_rust_3(value: i32) -> i32 { value + 3 }\n371: fn req_cover_rust_4(value: i32) -> i32 { value + 4 }\n378: fn req_cover_rust_5(value: i32) -> i32 { value + 5 }\n```\n",
4
- "stderr": ""
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "code": 0,
3
- "stdout": "@@@ tests/fixtures/fixture_scala.scala | scala\n> Lines: 11-397\n```\n11: import scala.collection.mutable\n12: import scala.concurrent.{Future, ExecutionContext}\n13: import scala.util.{Try, Success, Failure}\n23: case class Person(name: String, age: Int) {\n28: def isAdult: Boolean = age >= 18\n34: def greet: String = s\"Hi, I'm $name, age $age\"\n35: }\n43: sealed trait Shape {\n48: def area: Double\n49: }\n56: case class Circle(radius: Double) extends Shape {\n57: override def area: Double = math.Pi * radius * radius\n58: }\n66: case class Rectangle(width: Double, height: Double) extends Shape {\n67: override def area: Double = width * height\n68: }\n76: abstract class Animal {\n81: def sound: String\n87: def describe: String = s\"I am a ${getClass.getSimpleName} and I say $sound\"\n88: }\n96: trait Drawable {\n101: def draw(): Unit\n102: }\n109: trait Logging { self: Drawable =>\n113: def logAndDraw(): Unit = {\n114: println(\"About to draw\")\n115: draw()\n116: }\n117: }\n123: trait Serializable {\n128: def serialize: Array[Byte]\n129: }\n137: object Main {\n142: def main(args: Array[String]): Unit = {\n143: val people = List(Person(\"Alice\", 30), Person(\"Bob\", 17))\n145: val adults = people.filter(_.isAdult)\n146: adults.foreach(p => println(p.greet))\n147: }\n153: override def toString: String = \"Main\"\n156: val pi = 3.14159265\n159: var counter = 0\n164: type StringList = List[String]\n169: type Transformer[A] = A => A\n176: def describeShape(shape: Shape): String = shape match {\n177: case Circle(r) => s\"Circle with radius $r, area=${shape.area}\"\n178: case Rectangle(w, h) => s\"Rectangle ${w}x${h}, area=${shape.area}\"\n179: }\n186: def classify(x: Int): String = x match {\n187: case 0 => \"zero\"\n188: case n if n < 0 => \"negative\"\n189: case n if n > 100 => \"large\"\n190: case _ => \"positive\"\n191: }\n192: }\n201: class Config private (val entries: Map[String, String]) {\n207: def get(key: String): Option[String] = entries.get(key)\n208: }\n214: object Config {\n220: def apply(entries: (String, String)*): Config = new Config(entries.toMap)\n226: def empty: Config = new Config(Map.empty)\n227: }\n236: class Container[+A](val value: A) {\n243: def map[B](f: A => B): Container[B] = new Container(f(value))\n251: def flatMap[B](f: A => Container[B]): Container[B] = f(value)\n252: }\n261: implicit class RichInt(val n: Int) extends AnyVal {\n266: def isEven: Boolean = n % 2 == 0\n273: def times(s: String): String = s * n\n274: }\n282: object ForCompExample {\n289: def findPairs(range: Int, target: Int): List[(Int, Int)] = {\n290: for {\n291: x <- (1 to range).toList\n292: y <- (x to range).toList\n293: if x + y == target\n294: } yield (x, y)\n295: }\n296: }\n304: object FuncUtils {\n311: def add(a: Int)(b: Int): Int = a + b\n320: def twice[A](f: A => A)(x: A): A = f(f(x))\n331: def compose[A, B, C](f: A => B, g: B => C): A => C = a => g(f(a))\n332: }\n335: import scala.util.Random\n336: import scala.concurrent.duration._\n337: trait Runner\n338: trait Parser\n339: object Metrics\n340: val MaxUsers = 100\n341: val RetryLimit = 3\n342: type UserKey = String\n343: type ErrorCode = Int\n344: type Mapper = String => String\n345: var attempts = 0\n346: var cursor = 1\n347: var stage = \"init\"\n348: var status = \"ready\"\n351: object ReqCoverScala {\n359: def reqCoverScala1(value: Int): Int = value + 1\n368: def reqCoverScala2(value: Int): Int = value + 2\n377: def reqCoverScala3(value: Int): Int = value + 3\n386: def reqCoverScala4(value: Int): Int = value + 4\n395: def reqCoverScala5(value: Int): Int = value + 5\n397: }\n```\n",
4
- "stderr": ""
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "code": 0,
3
- "stdout": "@@@ tests/fixtures/fixture_shell.sh | shell\n> Lines: 1-274\n```\n1: #!/bin/bash\n12: MY_VAR=\"hello\"\n15: export PATH_EXT=\"/usr/local/bin\"\n18: readonly MAX_COUNT=10\n21: declare -r BUILD_VERSION=\"1.0.0\"\n24: DEBUG_MODE=0\n29: declare -a LANGUAGES=(\"python\" \"rust\" \"go\" \"java\" \"typescript\")\n32: declare -A EXT_MAP=(\n33: [py]=\"python\"\n34: [rs]=\"rust\"\n35: [go]=\"go\"\n36: [java]=\"java\"\n37: [ts]=\"typescript\"\n38: )\n44: function greet() {\n45: local name=\"${1:?Name required}\"\n47: if [[ -z \"$name\" ]]; then\n48: echo \"Error: empty name\" >&2\n49: return 1\n50: fi\n51: echo \"Hello ${name}!\"\n52: }\n56: cleanup() {\n57: local tmp_dir=\"${TMPDIR:-/tmp}/myapp_$$\"\n58: if [[ -d \"$tmp_dir\" ]]; then\n60: rm -rf \"$tmp_dir\"\n61: fi\n62: echo \"Cleanup complete\"\n63: }\n68: parse_args() {\n69: local opt\n70: while getopts \"vdhf:o:\" opt; do\n71: case \"$opt\" in\n72: v)\n74: VERBOSE=1\n75: ;;\n76: d)\n78: DEBUG_MODE=1\n79: ;;\n80: f)\n82: INPUT_FILE=\"$OPTARG\"\n83: ;;\n84: o)\n86: OUTPUT_FILE=\"$OPTARG\"\n87: ;;\n88: h)\n89: echo \"Usage: $0 [-v] [-d] [-f file] [-o output] [-h]\"\n90: return 0\n91: ;;\n92: *)\n93: echo \"Unknown option: $opt\" >&2\n94: return 1\n95: ;;\n96: esac\n97: done\n98: shift $((OPTIND - 1))\n99: }\n105: process_file() {\n106: local input=\"$1\"\n107: local output=\"${2:-/dev/stdout}\"\n110: if [[ ! -f \"$input\" ]]; then\n111: echo \"Error: file not found: $input\" >&2\n112: return 1\n113: fi\n115: if [[ ! -r \"$input\" ]]; then\n116: echo \"Error: file not readable: $input\" >&2\n117: return 1\n118: fi\n121: local line_count\n122: line_count=$(wc -l < \"$input\")\n123: echo \"Processing $input ($line_count lines)\" >&2\n126: while IFS= read -r line; do\n128: [[ -z \"$line\" || \"$line\" =~ ^[[:space:]]*\n129: echo \"$line\"\n130: done < \"$input\" > \"$output\"\n132: return 0\n133: }\n139: retry_command() {\n140: local max_attempts=\"$1\"\n141: shift\n142: local attempt=1\n144: while (( attempt <= max_attempts )); do\n146: if \"$@\"; then\n147: return 0\n148: fi\n149: echo \"Attempt $attempt/$max_attempts failed\" >&2\n150: (( attempt++ ))\n152: sleep $(( 2 ** (attempt - 1) ))\n153: done\n155: echo \"All $max_attempts attempts failed\" >&2\n156: return 1\n157: }\n162: log_message() {\n163: local level=\"$1\"\n164: shift\n165: local timestamp\n166: timestamp=$(date '+%Y-%m-%d %H:%M:%S')\n167: echo \"[$timestamp] [$level] $*\" >&2\n168: }\n172: make_temp() {\n173: local tmpfile\n174: tmpfile=$(mktemp \"${TMPDIR:-/tmp}/myapp_XXXXXX\")\n175: echo \"$tmpfile\"\n176: }\n181: trap cleanup EXIT\n184: trap 'echo \"Interrupted\"; exit 130' INT TERM\n189: generate_config() {\n190: cat <<EOF\n192: version=${BUILD_VERSION}\n193: debug=${DEBUG_MODE}\n194: max_count=${MAX_COUNT}\n195: EOF\n196: }\n203: factorial() {\n204: local n=\"${1:-1}\"\n205: local result=1\n206: local i\n207: for (( i = 2; i <= n; i++ )); do\n209: (( result *= i ))\n210: done\n211: echo \"$result\"\n212: }\n217: if [[ -f ./config.sh ]]; then\n218: source ./config.sh\n219: fi\n222: source ./env.sh\n223: . ./helpers.sh\n224: source ./shared.sh\n225: . ./paths.sh\n226: source ./runtime.sh\n227: . ./exports.sh\n228: source ./network.sh\n236: req_cover_shell_1() {\n237: echo \"$(( $1 + 1 ))\"\n238: }\n245: req_cover_shell_2() {\n246: echo \"$(( $1 + 2 ))\"\n247: }\n254: req_cover_shell_3() {\n255: echo \"$(( $1 + 3 ))\"\n256: }\n263: req_cover_shell_4() {\n264: echo \"$(( $1 + 4 ))\"\n265: }\n272: req_cover_shell_5() {\n273: echo \"$(( $1 + 5 ))\"\n274: }\n```\n",
4
- "stderr": ""
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "code": 0,
3
- "stdout": "@@@ tests/fixtures/fixture_swift.swift | swift\n> Lines: 8-395\n```\n8: import Foundation\n9: import Combine\n16: class Animal {\n18: var species: String\n21: var legs: Int = 4 {\n22: willSet {\n24: print(\"Legs changing from \\(legs) to \\(newValue)\")\n25: }\n26: didSet {\n28: if legs < 0 { legs = 0 }\n29: }\n30: }\n33: var description: String {\n34: return \"\\(species) with \\(legs) legs\"\n35: }\n39: init(species: String) {\n40: self.species = species\n41: }\n44: func speak() {\n45: print(\"...\")\n46: }\n50: class func createDefault() -> Animal {\n51: return Animal(species: \"Unknown\")\n52: }\n55: deinit {\n56: print(\"\\(species) deallocated\")\n57: }\n58: }\n63: class Dog: Animal {\n65: let name: String\n69: init(name: String) {\n70: self.name = name\n71: super.init(species: \"Dog\")\n72: }\n75: override func speak() {\n76: print(\"\\(name) says: Woof!\")\n77: }\n78: }\n85: struct Point: Equatable {\n86: var x: Double = 0.0\n87: var y: Double = 0.0\n93: static func + (lhs: Point, rhs: Point) -> Point {\n94: return Point(x: lhs.x + rhs.x, y: lhs.y + rhs.y)\n95: }\n99: var magnitude: Double {\n100: return (x * x + y * y).squareRoot()\n101: }\n102: }\n107: struct Matrix {\n109: private var data: [[Double]]\n112: let rows: Int\n114: let cols: Int\n119: init(rows: Int, cols: Int) {\n120: self.rows = rows\n121: self.cols = cols\n122: data = Array(repeating: Array(repeating: 0.0, count: cols), count: rows)\n123: }\n129: subscript(row: Int, col: Int) -> Double {\n130: get { return data[row][col] }\n131: set { data[row][col] = newValue }\n132: }\n133: }\n140: enum Direction: String, CaseIterable {\n141: case up = \"UP\"\n142: case down = \"DOWN\"\n143: case left = \"LEFT\"\n144: case right = \"RIGHT\"\n148: var opposite: Direction {\n149: switch self {\n150: case .up: return .down\n151: case .down: return .up\n152: case .left: return .right\n153: case .right: return .left\n154: }\n155: }\n156: }\n162: enum AppResult<T> {\n164: case success(T)\n166: case failure(Error)\n171: func map<U>(_ transform: (T) -> U) -> AppResult<U> {\n172: switch self {\n173: case .success(let value):\n174: return .success(transform(value))\n175: case .failure(let error):\n176: return .failure(error)\n177: }\n178: }\n179: }\n186: protocol Drawable {\n189: func draw() -> String\n192: var renderPriority: Int { get }\n193: }\n198: protocol Container {\n200: associatedtype Item\n204: mutating func add(_ item: Item)\n207: var count: Int { get }\n208: }\n212: extension Drawable {\n214: var renderPriority: Int { return 0 }\n218: func debugDraw() -> String {\n219: return \"[\\(renderPriority)] \\(draw())\"\n220: }\n221: }\n226: extension Animal: Drawable {\n229: func draw() -> String {\n230: return description\n231: }\n235: func describe() -> String {\n236: return \"Animal: \\(species)\"\n237: }\n238: }\n246: @propertyWrapper\n247: struct Clamped<Value: Comparable> {\n249: let min: Value\n251: let max: Value\n253: private var value: Value\n256: var wrappedValue: Value {\n257: get { return value }\n258: set { value = Swift.min(Swift.max(newValue, min), max) }\n259: }\n262: init(wrappedValue: Value, min: Value, max: Value) {\n263: self.min = min\n264: self.max = max\n266: self.value = Swift.min(Swift.max(wrappedValue, min), max)\n267: }\n268: }\n275: actor Counter {\n277: private var value: Int = 0\n281: func increment() -> Int {\n282: value += 1\n283: return value\n284: }\n287: func reset() {\n288: value = 0\n289: }\n290: }\n296: public func greet(name: String) {\n297: print(\"Hello \\(name)\")\n298: }\n302: func makeDrawable() -> some Drawable {\n303: return Animal(species: \"Cat\")\n304: }\n311: func contains<T: Collection>(items: T, target: T.Element) -> Bool where T.Element: Equatable {\n312: return items.contains(target)\n313: }\n318: func deferred(_ action: @escaping () -> Void) -> () -> Void {\n319: return {\n321: action()\n322: }\n323: }\n328: let MAX_SIZE = 1024\n331: private var counter = 0\n334: let defaultConfig: [String: Any] = {\n335: var config: [String: Any] = [:]\n336: config[\"debug\"] = false\n337: config[\"version\"] = \"1.0\"\n338: return config\n339: }()\n342: import SwiftUI\n343: import Combine\n344: import Foundation\n345: import Dispatch\n346: import UIKit\n347: class ServiceController {}\n348: final class CacheStore {}\n349: struct Vector2 { let x: Int; let y: Int }\n350: struct Limits { let max: Int }\n351: enum ModeSwift { case fast, safe }\n352: enum PhaseSwift { case initState, done }\n353: enum SignalSwift { case on, off }\n354: protocol RunnerSwift { func run() }\n355: protocol LoggerSwift { func log(_ msg: String) }\n356: protocol ParserSwift { func parse(_ input: String) -> String }\n357: extension String { func trimmed2() -> String { self.trimmingCharacters(in: .whitespaces) } }\n358: extension Int { func doubled2() -> Int { self * 2 } }\n359: extension Array { var isNotEmpty: Bool { !self.isEmpty } }\n367: func reqCoverSwift1(_ value: Int) -> Int { value + 1 }\n374: func reqCoverSwift2(_ value: Int) -> Int { value + 2 }\n381: func reqCoverSwift3(_ value: Int) -> Int { value + 3 }\n388: func reqCoverSwift4(_ value: Int) -> Int { value + 4 }\n395: func reqCoverSwift5(_ value: Int) -> Int { value + 5 }\n```\n",
4
- "stderr": ""
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "code": 0,
3
- "stdout": "@@@ tests/fixtures/fixture_typescript.ts | typescript\n> Lines: 10-432\n```\n10: import { Component } from 'react';\n11: import type { ReactNode } from 'react';\n19: interface User {\n21: name: string;\n23: age: number;\n25: email?: string;\n27: readonly id: string;\n28: }\n35: interface Repository<T> {\n37: findById(id: string): Promise<T | null>;\n39: save(entity: T): Promise<T>;\n41: delete(id: string): Promise<boolean>;\n42: }\n48: interface Serializable {\n50: toJSON(): string;\n51: }\n56: type StringOrNumber = string | number;\n59: type DeepReadonly<T> = {\n60: readonly [P in keyof T]: T[P] extends object ? DeepReadonly<T[P]> : T[P];\n61: };\n64: type Unwrap<T> = T extends Array<infer U> ? U : T;\n67: type PixelValue = `${number}px`;\n70: type ApiResponse<T> =\n71: | { status: 'success'; data: T }\n72: | { status: 'error'; message: string }\n73: | { status: 'loading' };\n76: type KeysOfType<T, V> = {\n77: [K in keyof T]: T[K] extends V ? K : never;\n78: }[keyof T];\n86: const enum Direction {\n87: Up = 'UP',\n88: Down = 'DOWN',\n89: Left = 'LEFT',\n90: Right = 'RIGHT',\n91: }\n97: enum Color {\n99: Red,\n101: Blue,\n103: Green = 10,\n104: }\n110: enum HttpStatus {\n111: OK = '200',\n112: NotFound = '404',\n113: ServerError = '500',\n114: }\n122: export abstract class Base {\n127: abstract render(): void;\n132: execute(): void {\n134: console.log('before render');\n135: this.render();\n137: console.log('after render');\n138: }\n139: }\n148: class Derived extends Base {\n150: value: number = 0;\n153: label?: string;\n158: render(): void {\n159: console.log(this.value);\n160: }\n161: }\n168: class TypedContainer<T extends Serializable> {\n170: private items: T[] = [];\n176: add(item: T): void {\n177: this.items.push(item);\n178: }\n184: toJSON(): string {\n185: return `[${this.items.map(i => i.toJSON()).join(',')}]`;\n186: }\n193: find(predicate: (item: T) => boolean): T | undefined {\n194: for (const item of this.items) {\n195: if (predicate(item)) {\n196: return item;\n197: }\n198: }\n199: return undefined;\n200: }\n201: }\n210: class UserEntity implements User, Serializable {\n211: readonly id: string;\n212: name: string;\n213: age: number;\n215: constructor(id: string, name: string, age: number) {\n216: this.id = id;\n217: this.name = name;\n218: this.age = age;\n219: }\n225: toJSON(): string {\n226: return JSON.stringify({ id: this.id, name: this.name, age: this.age });\n227: }\n228: }\n237: export function greet(name: string): void {\n238: console.log(`Hello, ${name}`);\n239: }\n249: function parse(input: string): number;\n250: function parse(input: number): string;\n251: function parse(input: string | number): string | number {\n252: if (typeof input === 'string') {\n253: return parseInt(input, 10);\n254: }\n255: return input.toString();\n256: }\n266: const add = (a: number): number => a + 1;\n275: const transform = <T extends { toString(): string }>(value: T): string => {\n276: return value.toString();\n277: };\n288: async function fetchEntity<T>(url: string): Promise<T> {\n289: const response = await fetch(url);\n291: return response.json() as Promise<T>;\n292: }\n300: export namespace MyNS {\n302: export const x = 1;\n309: export function double(val: number): number {\n310: return val * 2;\n311: }\n312: }\n320: declare module MyMod {\n322: export const version: string;\n323: }\n331: @Component\n332: class Decorated {\n334: template: string = '<div></div>';\n335: }\n345: function isUser(value: unknown): value is User {\n346: if (typeof value !== 'object' || value === null) {\n347: return false;\n348: }\n349: const obj = value as Record<string, unknown>;\n350: return typeof obj.name === 'string' && typeof obj.age === 'number';\n351: }\n359: const config = {\n360: width: '100px' as PixelValue,\n361: height: '200px' as PixelValue,\n362: } satisfies Record<string, PixelValue>;\n373: function makeOptional<T extends object>(obj: T): Partial<T> {\n374: return { ...obj };\n375: }\n378: import { Injectable } from 'inversify';\n379: import { Observable } from 'rxjs';\n380: import { FC } from 'react';\n381: @injectable\n382: @sealed\n383: @track\n384: @memoized\n385: interface CacheEntry { key: string; value: string }\n386: export interface Runner { run(): Promise<void> }\n387: enum ModeTs { Fast, Safe }\n388: enum StatusTs { Ready, Busy }\n389: namespace ExtNSOne { export const v = 1; }\n390: namespace ExtNSTwo { export const v = 2; }\n391: namespace ExtNSThree { export const v = 3; }\n392: namespace ExtNSFour { export const v = 4; }\n393: declare module ExtOne { export const one: number; }\n394: module ExtTwo { export const two = 2; }\n395: module ExtThree { export const three = 3; }\n396: module ExtFour { export const four = 4; }\n404: function reqCoverTs1(value: number): number { return value + 1; }\n411: function reqCoverTs2(value: number): number { return value + 2; }\n418: function reqCoverTs3(value: number): number { return value + 3; }\n425: function reqCoverTs4(value: number): number { return value + 4; }\n432: function reqCoverTs5(value: number): number { return value + 5; }\n```\n",
4
- "stderr": ""
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "code": 0,
3
- "stdout": "@@@ tests/fixtures/fixture_zig.zig | zig\n> Lines: 7-293\n```\n7: const std = @import(\"std\");\n8: const mem = @import(\"std\").mem;\n9: const Allocator = std.mem.Allocator;\n14: pub fn main() void {\n15: std.debug.print(\"Hello\\n\", .{});\n16: }\n22: pub fn add(a: i32, b: i32) i32 {\n23: return a + b;\n24: }\n30: pub fn safeDivide(numerator: i32, denominator: i32) !i32 {\n31: if (denominator == 0) {\n32: return error.DivisionByZero;\n33: }\n34: return @divTrunc(numerator, denominator);\n35: }\n42: pub fn max(comptime T: type, a: T, b: T) T {\n43: return if (a > b) a else b;\n44: }\n51: pub fn indexOf(comptime T: type, haystack: []const T, needle: T) ?usize {\n52: for (haystack, 0..) |item, i| {\n53: if (item == needle) {\n54: return i;\n55: }\n56: }\n58: return null;\n59: }\n65: pub fn comptimeConcat(comptime a: []const u8, comptime b: []const u8) []const u8 {\n66: return a ++ b;\n67: }\n72: pub fn createBuffer(allocator: Allocator) ![]u8 {\n73: const buf = try allocator.alloc(u8, 1024);\n74: errdefer allocator.free(buf);\n76: @memset(buf, 0);\n77: return buf;\n78: }\n83: inline fn fastSum(values: []const f32) f32 {\n84: var total: f32 = 0.0;\n85: for (values) |v| {\n86: total += v;\n87: }\n88: return total;\n89: }\n94: export fn doubleValue(x: i32) i32 {\n95: return x * 2;\n96: }\n102: const Point = struct {\n103: x: f64,\n104: y: f64,\n110: pub fn distSquared(self: Point, other: Point) f64 {\n111: const dx = self.x - other.x;\n112: const dy = self.y - other.y;\n113: return dx * dx + dy * dy;\n114: }\n118: pub fn origin() Point {\n119: return .{ .x = 0.0, .y = 0.0 };\n120: }\n121: };\n125: const PackedFlags = packed struct {\n126: readable: bool,\n127: writable: bool,\n128: executable: bool,\n129: reserved: u5,\n130: };\n133: const Config = struct {\n134: name: []const u8 = \"default\",\n135: max_retries: u32 = 3,\n136: timeout_ms: u64 = 5000,\n137: debug: bool = false,\n141: pub fn testing() Config {\n142: return .{ .debug = true, .name = \"test\" };\n143: }\n144: };\n149: const Color = enum {\n150: red,\n151: green,\n152: blue,\n157: pub fn toRgb(self: Color) u32 {\n158: return switch (self) {\n159: .red => 0xFF0000,\n160: .green => 0x00FF00,\n161: .blue => 0x0000FF,\n162: };\n163: }\n164: };\n167: const Status = enum(u8) {\n168: idle = 0,\n169: running = 1,\n170: error = 2,\n171: done = 3,\n172: };\n177: const Result = union(enum) {\n178: ok: i32,\n179: err: []const u8,\n184: pub fn isOk(self: Result) bool {\n185: return self == .ok;\n186: }\n187: };\n190: const ExternData = extern union {\n191: int_val: i32,\n192: float_val: f32,\n193: bytes: [4]u8,\n194: };\n199: const MAX_SIZE: usize = 1024;\n202: pub var global_state: i32 = 0;\n205: const MAGIC_NUMBER: u32 = comptime blk: {\n206: var x: u32 = 1;\n207: x *= 42;\n208: break :blk x;\n209: };\n214: const ParseError = error{\n215: InvalidInput,\n216: UnexpectedToken,\n217: EndOfStream,\n218: BufferOverflow,\n219: };\n224: test \"add returns correct sum\" {\n225: const result = add(2, 3);\n226: try std.testing.expectEqual(@as(i32, 5), result);\n227: }\n230: test \"safeDivide handles zero\" {\n231: const result = safeDivide(10, 0);\n232: try std.testing.expectError(error.DivisionByZero, result);\n233: }\n236: test \"indexOf finds element\" {\n237: const items = [_]i32{ 1, 2, 3, 4, 5 };\n238: const idx = indexOf(i32, &items, 3);\n239: try std.testing.expectEqual(@as(?usize, 2), idx);\n240: }\n243: const io = @import(\"std\");\n244: const fs = @import(\"std\");\n245: const mem = @import(\"std\");\n246: const math = @import(\"std\");\n247: const json = @import(\"std\");\n248: const Mode = enum { fast, safe };\n249: const Phase = enum { init, done };\n250: const Signal = enum { on, off };\n251: const Packet = struct { id: i32 };\n252: const Limits = struct { max: i32 };\n253: const Variant = union { i: i32, f: f32 };\n254: const Payload = extern union { a: i32, b: i32 };\n255: const Message = union { txt: [4]u8, len: u32 };\n256: var retries: i32 = 0;\n257: var pointer: usize = 0;\n265: fn reqCoverZig1(value: i32) i32 { return value + 1; }\n272: fn reqCoverZig2(value: i32) i32 { return value + 2; }\n279: fn reqCoverZig3(value: i32) i32 { return value + 3; }\n286: fn reqCoverZig4(value: i32) i32 { return value + 4; }\n293: fn reqCoverZig5(value: i32) i32 { return value + 5; }\n```\n",
4
- "stderr": ""
5
- }