@hasna/terminal 2.0.5 → 2.3.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 (263) hide show
  1. package/dist/cli.js +52 -21
  2. package/package.json +1 -1
  3. package/src/ai.ts +77 -130
  4. package/src/cli.tsx +51 -21
  5. package/src/command-validator.ts +11 -0
  6. package/src/context-hints.ts +291 -0
  7. package/src/discover.ts +238 -0
  8. package/src/economy.ts +53 -0
  9. package/src/output-processor.ts +7 -18
  10. package/src/output-store.ts +65 -0
  11. package/src/providers/base.ts +3 -1
  12. package/src/providers/groq.ts +108 -0
  13. package/src/providers/index.ts +26 -2
  14. package/src/providers/providers.test.ts +4 -2
  15. package/src/providers/xai.ts +108 -0
  16. package/src/sessions-db.ts +81 -0
  17. package/temp/rtk/.claude/agents/code-reviewer.md +221 -0
  18. package/temp/rtk/.claude/agents/debugger.md +519 -0
  19. package/temp/rtk/.claude/agents/rtk-testing-specialist.md +461 -0
  20. package/temp/rtk/.claude/agents/rust-rtk.md +511 -0
  21. package/temp/rtk/.claude/agents/technical-writer.md +355 -0
  22. package/temp/rtk/.claude/commands/diagnose.md +352 -0
  23. package/temp/rtk/.claude/commands/test-routing.md +362 -0
  24. package/temp/rtk/.claude/hooks/bash/pre-commit-format.sh +16 -0
  25. package/temp/rtk/.claude/hooks/rtk-rewrite.sh +70 -0
  26. package/temp/rtk/.claude/hooks/rtk-suggest.sh +152 -0
  27. package/temp/rtk/.claude/rules/cli-testing.md +526 -0
  28. package/temp/rtk/.claude/skills/issue-triage/SKILL.md +348 -0
  29. package/temp/rtk/.claude/skills/issue-triage/templates/issue-comment.md +134 -0
  30. package/temp/rtk/.claude/skills/performance.md +435 -0
  31. package/temp/rtk/.claude/skills/pr-triage/SKILL.md +315 -0
  32. package/temp/rtk/.claude/skills/pr-triage/templates/review-comment.md +71 -0
  33. package/temp/rtk/.claude/skills/repo-recap.md +206 -0
  34. package/temp/rtk/.claude/skills/rtk-tdd/SKILL.md +78 -0
  35. package/temp/rtk/.claude/skills/rtk-tdd/references/testing-patterns.md +124 -0
  36. package/temp/rtk/.claude/skills/security-guardian.md +503 -0
  37. package/temp/rtk/.claude/skills/ship.md +404 -0
  38. package/temp/rtk/.github/workflows/benchmark.yml +34 -0
  39. package/temp/rtk/.github/workflows/dco-check.yaml +12 -0
  40. package/temp/rtk/.github/workflows/release-please.yml +51 -0
  41. package/temp/rtk/.github/workflows/release.yml +343 -0
  42. package/temp/rtk/.github/workflows/security-check.yml +135 -0
  43. package/temp/rtk/.github/workflows/validate-docs.yml +78 -0
  44. package/temp/rtk/.release-please-manifest.json +3 -0
  45. package/temp/rtk/ARCHITECTURE.md +1491 -0
  46. package/temp/rtk/CHANGELOG.md +640 -0
  47. package/temp/rtk/CLAUDE.md +605 -0
  48. package/temp/rtk/CONTRIBUTING.md +199 -0
  49. package/temp/rtk/Cargo.lock +1668 -0
  50. package/temp/rtk/Cargo.toml +64 -0
  51. package/temp/rtk/Formula/rtk.rb +43 -0
  52. package/temp/rtk/INSTALL.md +390 -0
  53. package/temp/rtk/LICENSE +21 -0
  54. package/temp/rtk/README.md +386 -0
  55. package/temp/rtk/README_es.md +159 -0
  56. package/temp/rtk/README_fr.md +197 -0
  57. package/temp/rtk/README_ja.md +159 -0
  58. package/temp/rtk/README_ko.md +159 -0
  59. package/temp/rtk/README_zh.md +167 -0
  60. package/temp/rtk/ROADMAP.md +15 -0
  61. package/temp/rtk/SECURITY.md +217 -0
  62. package/temp/rtk/TEST_EXEC_TIME.md +102 -0
  63. package/temp/rtk/build.rs +57 -0
  64. package/temp/rtk/docs/AUDIT_GUIDE.md +432 -0
  65. package/temp/rtk/docs/FEATURES.md +1410 -0
  66. package/temp/rtk/docs/TROUBLESHOOTING.md +309 -0
  67. package/temp/rtk/docs/filter-workflow.md +102 -0
  68. package/temp/rtk/docs/images/gain-dashboard.jpg +0 -0
  69. package/temp/rtk/docs/tracking.md +583 -0
  70. package/temp/rtk/hooks/opencode-rtk.ts +39 -0
  71. package/temp/rtk/hooks/rtk-awareness.md +29 -0
  72. package/temp/rtk/hooks/rtk-rewrite.sh +61 -0
  73. package/temp/rtk/hooks/test-rtk-rewrite.sh +442 -0
  74. package/temp/rtk/install.sh +124 -0
  75. package/temp/rtk/release-please-config.json +10 -0
  76. package/temp/rtk/scripts/benchmark.sh +592 -0
  77. package/temp/rtk/scripts/check-installation.sh +162 -0
  78. package/temp/rtk/scripts/install-local.sh +37 -0
  79. package/temp/rtk/scripts/rtk-economics.sh +137 -0
  80. package/temp/rtk/scripts/test-all.sh +561 -0
  81. package/temp/rtk/scripts/test-aristote.sh +227 -0
  82. package/temp/rtk/scripts/test-tracking.sh +79 -0
  83. package/temp/rtk/scripts/update-readme-metrics.sh +32 -0
  84. package/temp/rtk/scripts/validate-docs.sh +73 -0
  85. package/temp/rtk/src/aws_cmd.rs +880 -0
  86. package/temp/rtk/src/binlog.rs +1645 -0
  87. package/temp/rtk/src/cargo_cmd.rs +1727 -0
  88. package/temp/rtk/src/cc_economics.rs +1157 -0
  89. package/temp/rtk/src/ccusage.rs +340 -0
  90. package/temp/rtk/src/config.rs +187 -0
  91. package/temp/rtk/src/container.rs +855 -0
  92. package/temp/rtk/src/curl_cmd.rs +134 -0
  93. package/temp/rtk/src/deps.rs +268 -0
  94. package/temp/rtk/src/diff_cmd.rs +367 -0
  95. package/temp/rtk/src/discover/mod.rs +274 -0
  96. package/temp/rtk/src/discover/provider.rs +388 -0
  97. package/temp/rtk/src/discover/registry.rs +2022 -0
  98. package/temp/rtk/src/discover/report.rs +202 -0
  99. package/temp/rtk/src/discover/rules.rs +667 -0
  100. package/temp/rtk/src/display_helpers.rs +402 -0
  101. package/temp/rtk/src/dotnet_cmd.rs +1771 -0
  102. package/temp/rtk/src/dotnet_format_report.rs +133 -0
  103. package/temp/rtk/src/dotnet_trx.rs +593 -0
  104. package/temp/rtk/src/env_cmd.rs +204 -0
  105. package/temp/rtk/src/filter.rs +462 -0
  106. package/temp/rtk/src/filters/README.md +52 -0
  107. package/temp/rtk/src/filters/ansible-playbook.toml +34 -0
  108. package/temp/rtk/src/filters/basedpyright.toml +47 -0
  109. package/temp/rtk/src/filters/biome.toml +45 -0
  110. package/temp/rtk/src/filters/brew-install.toml +37 -0
  111. package/temp/rtk/src/filters/composer-install.toml +40 -0
  112. package/temp/rtk/src/filters/df.toml +16 -0
  113. package/temp/rtk/src/filters/dotnet-build.toml +64 -0
  114. package/temp/rtk/src/filters/du.toml +16 -0
  115. package/temp/rtk/src/filters/fail2ban-client.toml +15 -0
  116. package/temp/rtk/src/filters/gcc.toml +49 -0
  117. package/temp/rtk/src/filters/gcloud.toml +22 -0
  118. package/temp/rtk/src/filters/hadolint.toml +24 -0
  119. package/temp/rtk/src/filters/helm.toml +29 -0
  120. package/temp/rtk/src/filters/iptables.toml +27 -0
  121. package/temp/rtk/src/filters/jj.toml +28 -0
  122. package/temp/rtk/src/filters/jq.toml +24 -0
  123. package/temp/rtk/src/filters/make.toml +41 -0
  124. package/temp/rtk/src/filters/markdownlint.toml +24 -0
  125. package/temp/rtk/src/filters/mix-compile.toml +27 -0
  126. package/temp/rtk/src/filters/mix-format.toml +15 -0
  127. package/temp/rtk/src/filters/mvn-build.toml +44 -0
  128. package/temp/rtk/src/filters/oxlint.toml +43 -0
  129. package/temp/rtk/src/filters/ping.toml +63 -0
  130. package/temp/rtk/src/filters/pio-run.toml +40 -0
  131. package/temp/rtk/src/filters/poetry-install.toml +50 -0
  132. package/temp/rtk/src/filters/pre-commit.toml +35 -0
  133. package/temp/rtk/src/filters/ps.toml +16 -0
  134. package/temp/rtk/src/filters/quarto-render.toml +41 -0
  135. package/temp/rtk/src/filters/rsync.toml +48 -0
  136. package/temp/rtk/src/filters/shellcheck.toml +27 -0
  137. package/temp/rtk/src/filters/shopify-theme.toml +29 -0
  138. package/temp/rtk/src/filters/skopeo.toml +45 -0
  139. package/temp/rtk/src/filters/sops.toml +16 -0
  140. package/temp/rtk/src/filters/ssh.toml +44 -0
  141. package/temp/rtk/src/filters/stat.toml +34 -0
  142. package/temp/rtk/src/filters/swift-build.toml +41 -0
  143. package/temp/rtk/src/filters/systemctl-status.toml +33 -0
  144. package/temp/rtk/src/filters/terraform-plan.toml +35 -0
  145. package/temp/rtk/src/filters/tofu-fmt.toml +16 -0
  146. package/temp/rtk/src/filters/tofu-init.toml +38 -0
  147. package/temp/rtk/src/filters/tofu-plan.toml +35 -0
  148. package/temp/rtk/src/filters/tofu-validate.toml +17 -0
  149. package/temp/rtk/src/filters/trunk-build.toml +39 -0
  150. package/temp/rtk/src/filters/ty.toml +50 -0
  151. package/temp/rtk/src/filters/uv-sync.toml +37 -0
  152. package/temp/rtk/src/filters/xcodebuild.toml +99 -0
  153. package/temp/rtk/src/filters/yamllint.toml +25 -0
  154. package/temp/rtk/src/find_cmd.rs +598 -0
  155. package/temp/rtk/src/format_cmd.rs +386 -0
  156. package/temp/rtk/src/gain.rs +723 -0
  157. package/temp/rtk/src/gh_cmd.rs +1651 -0
  158. package/temp/rtk/src/git.rs +2012 -0
  159. package/temp/rtk/src/go_cmd.rs +592 -0
  160. package/temp/rtk/src/golangci_cmd.rs +254 -0
  161. package/temp/rtk/src/grep_cmd.rs +288 -0
  162. package/temp/rtk/src/gt_cmd.rs +810 -0
  163. package/temp/rtk/src/hook_audit_cmd.rs +283 -0
  164. package/temp/rtk/src/hook_check.rs +171 -0
  165. package/temp/rtk/src/init.rs +1859 -0
  166. package/temp/rtk/src/integrity.rs +537 -0
  167. package/temp/rtk/src/json_cmd.rs +231 -0
  168. package/temp/rtk/src/learn/detector.rs +628 -0
  169. package/temp/rtk/src/learn/mod.rs +119 -0
  170. package/temp/rtk/src/learn/report.rs +184 -0
  171. package/temp/rtk/src/lint_cmd.rs +694 -0
  172. package/temp/rtk/src/local_llm.rs +316 -0
  173. package/temp/rtk/src/log_cmd.rs +248 -0
  174. package/temp/rtk/src/ls.rs +324 -0
  175. package/temp/rtk/src/main.rs +2482 -0
  176. package/temp/rtk/src/mypy_cmd.rs +389 -0
  177. package/temp/rtk/src/next_cmd.rs +241 -0
  178. package/temp/rtk/src/npm_cmd.rs +236 -0
  179. package/temp/rtk/src/parser/README.md +267 -0
  180. package/temp/rtk/src/parser/error.rs +46 -0
  181. package/temp/rtk/src/parser/formatter.rs +336 -0
  182. package/temp/rtk/src/parser/mod.rs +311 -0
  183. package/temp/rtk/src/parser/types.rs +119 -0
  184. package/temp/rtk/src/pip_cmd.rs +302 -0
  185. package/temp/rtk/src/playwright_cmd.rs +479 -0
  186. package/temp/rtk/src/pnpm_cmd.rs +573 -0
  187. package/temp/rtk/src/prettier_cmd.rs +221 -0
  188. package/temp/rtk/src/prisma_cmd.rs +482 -0
  189. package/temp/rtk/src/psql_cmd.rs +382 -0
  190. package/temp/rtk/src/pytest_cmd.rs +384 -0
  191. package/temp/rtk/src/read.rs +217 -0
  192. package/temp/rtk/src/rewrite_cmd.rs +50 -0
  193. package/temp/rtk/src/ruff_cmd.rs +402 -0
  194. package/temp/rtk/src/runner.rs +271 -0
  195. package/temp/rtk/src/summary.rs +297 -0
  196. package/temp/rtk/src/tee.rs +405 -0
  197. package/temp/rtk/src/telemetry.rs +248 -0
  198. package/temp/rtk/src/toml_filter.rs +1655 -0
  199. package/temp/rtk/src/tracking.rs +1416 -0
  200. package/temp/rtk/src/tree.rs +209 -0
  201. package/temp/rtk/src/tsc_cmd.rs +259 -0
  202. package/temp/rtk/src/utils.rs +432 -0
  203. package/temp/rtk/src/verify_cmd.rs +47 -0
  204. package/temp/rtk/src/vitest_cmd.rs +385 -0
  205. package/temp/rtk/src/wc_cmd.rs +401 -0
  206. package/temp/rtk/src/wget_cmd.rs +260 -0
  207. package/temp/rtk/tests/fixtures/dotnet/build_failed.txt +11 -0
  208. package/temp/rtk/tests/fixtures/dotnet/format_changes.json +31 -0
  209. package/temp/rtk/tests/fixtures/dotnet/format_empty.json +1 -0
  210. package/temp/rtk/tests/fixtures/dotnet/format_success.json +12 -0
  211. package/temp/rtk/tests/fixtures/dotnet/test_failed.txt +18 -0
  212. package/dist/App.js +0 -404
  213. package/dist/Browse.js +0 -79
  214. package/dist/FuzzyPicker.js +0 -47
  215. package/dist/Onboarding.js +0 -51
  216. package/dist/Spinner.js +0 -12
  217. package/dist/StatusBar.js +0 -49
  218. package/dist/ai.js +0 -368
  219. package/dist/cache.js +0 -41
  220. package/dist/command-rewriter.js +0 -64
  221. package/dist/command-validator.js +0 -77
  222. package/dist/compression.js +0 -107
  223. package/dist/diff-cache.js +0 -107
  224. package/dist/economy.js +0 -79
  225. package/dist/expand-store.js +0 -38
  226. package/dist/file-cache.js +0 -72
  227. package/dist/file-index.js +0 -62
  228. package/dist/history.js +0 -62
  229. package/dist/lazy-executor.js +0 -54
  230. package/dist/line-dedup.js +0 -59
  231. package/dist/loop-detector.js +0 -75
  232. package/dist/mcp/install.js +0 -98
  233. package/dist/mcp/server.js +0 -569
  234. package/dist/noise-filter.js +0 -86
  235. package/dist/output-processor.js +0 -136
  236. package/dist/output-router.js +0 -41
  237. package/dist/parsers/base.js +0 -2
  238. package/dist/parsers/build.js +0 -64
  239. package/dist/parsers/errors.js +0 -101
  240. package/dist/parsers/files.js +0 -78
  241. package/dist/parsers/git.js +0 -99
  242. package/dist/parsers/index.js +0 -48
  243. package/dist/parsers/tests.js +0 -89
  244. package/dist/providers/anthropic.js +0 -39
  245. package/dist/providers/base.js +0 -4
  246. package/dist/providers/cerebras.js +0 -95
  247. package/dist/providers/index.js +0 -49
  248. package/dist/recipes/model.js +0 -20
  249. package/dist/recipes/storage.js +0 -136
  250. package/dist/search/content-search.js +0 -68
  251. package/dist/search/file-search.js +0 -61
  252. package/dist/search/filters.js +0 -34
  253. package/dist/search/index.js +0 -5
  254. package/dist/search/semantic.js +0 -320
  255. package/dist/session-boot.js +0 -59
  256. package/dist/session-context.js +0 -55
  257. package/dist/sessions-db.js +0 -120
  258. package/dist/smart-display.js +0 -286
  259. package/dist/snapshots.js +0 -51
  260. package/dist/supervisor.js +0 -112
  261. package/dist/test-watchlist.js +0 -131
  262. package/dist/tree.js +0 -94
  263. package/dist/usage-cache.js +0 -65
@@ -0,0 +1,27 @@
1
+ [filters.mix-compile]
2
+ description = "Compact mix compile output"
3
+ match_command = "^mix\\s+compile(\\s|$)"
4
+ strip_ansi = true
5
+ strip_lines_matching = [
6
+ "^Compiling \\d+ file",
7
+ "^\\s*$",
8
+ "^Generated\\s",
9
+ ]
10
+ max_lines = 40
11
+ on_empty = "mix compile: ok"
12
+
13
+ [[tests.mix-compile]]
14
+ name = "strips compile noise, preserves warnings"
15
+ input = """
16
+ Compiling 12 files (.ex)
17
+ Generated my_app app
18
+
19
+ warning: variable "conn" is unused
20
+ lib/router.ex:42
21
+ """
22
+ expected = "warning: variable \"conn\" is unused\n lib/router.ex:42"
23
+
24
+ [[tests.mix-compile]]
25
+ name = "on_empty when only noise"
26
+ input = "Compiling 3 files (.ex)\nGenerated my_app app\n"
27
+ expected = "mix compile: ok"
@@ -0,0 +1,15 @@
1
+ [filters.mix-format]
2
+ description = "Compact mix format output"
3
+ match_command = "^mix\\s+format(\\s|$)"
4
+ on_empty = "mix format: ok"
5
+ max_lines = 20
6
+
7
+ [[tests.mix-format]]
8
+ name = "empty output returns ok"
9
+ input = ""
10
+ expected = "mix format: ok"
11
+
12
+ [[tests.mix-format]]
13
+ name = "changed files pass through"
14
+ input = "lib/my_app.ex\ntest/my_app_test.exs"
15
+ expected = "lib/my_app.ex\ntest/my_app_test.exs"
@@ -0,0 +1,44 @@
1
+ [filters.mvn-build]
2
+ description = "Compact Maven build output"
3
+ match_command = "^mvn\\s+(compile|package|clean|install)\\b"
4
+ strip_ansi = true
5
+ strip_lines_matching = [
6
+ "^\\[INFO\\] ---",
7
+ "^\\[INFO\\] Building\\s",
8
+ "^\\[INFO\\] Downloading\\s",
9
+ "^\\[INFO\\] Downloaded\\s",
10
+ "^\\[INFO\\]\\s*$",
11
+ "^\\s*$",
12
+ "^Downloading:",
13
+ "^Downloaded:",
14
+ "^Progress",
15
+ ]
16
+ max_lines = 50
17
+ on_empty = "mvn: ok"
18
+
19
+ [[tests.mvn-build]]
20
+ name = "strips INFO noise, preserves errors and summary"
21
+ input = """
22
+ [INFO] ---
23
+ [INFO] Building myapp 1.0-SNAPSHOT
24
+ [INFO] Downloading org.apache.maven.plugins:maven-compiler-plugin:3.11.0
25
+ [INFO] Downloaded org.apache.maven.plugins:maven-compiler-plugin:3.11.0
26
+ [INFO]
27
+ [ERROR] /src/main/java/Main.java:[10,5] cannot find symbol
28
+ symbol: method foo()
29
+ [INFO] BUILD FAILURE
30
+ [INFO] Total time: 2.543 s
31
+ """
32
+ expected = "[ERROR] /src/main/java/Main.java:[10,5] cannot find symbol\n symbol: method foo()\n[INFO] BUILD FAILURE\n[INFO] Total time: 2.543 s"
33
+
34
+ [[tests.mvn-build]]
35
+ name = "successful build keeps BUILD SUCCESS line"
36
+ input = """
37
+ [INFO] ---
38
+ [INFO] Building myapp 1.0-SNAPSHOT
39
+ [INFO]
40
+ [INFO] BUILD SUCCESS
41
+ [INFO] Total time: 4.123 s
42
+ [INFO] Finished at: 2024-01-15T10:30:00Z
43
+ """
44
+ expected = "[INFO] BUILD SUCCESS\n[INFO] Total time: 4.123 s\n[INFO] Finished at: 2024-01-15T10:30:00Z"
@@ -0,0 +1,43 @@
1
+ [filters.oxlint]
2
+ description = "Compact oxlint output — strip blank lines, keep diagnostics"
3
+ match_command = "^oxlint\\b"
4
+ strip_ansi = true
5
+ strip_lines_matching = [
6
+ "^\\s*$",
7
+ "^Finished in \\d+",
8
+ "^Found \\d+ warning",
9
+ ]
10
+ max_lines = 50
11
+ on_empty = "oxlint: ok"
12
+
13
+ [[tests.oxlint]]
14
+ name = "strips noise, keeps diagnostics"
15
+ input = """
16
+ × eslint(no-console): Unexpected console statement.
17
+ ╭─[src/app.ts:5:3]
18
+ 5 │ console.log("debug");
19
+ │ ^^^^^^^^^^^
20
+ ╰────
21
+
22
+ × eslint(no-unused-vars): 'x' is defined but never used.
23
+ ╭─[src/utils.ts:2:7]
24
+ 2 │ let x = 42;
25
+ │ ^
26
+ ╰────
27
+
28
+ Found 2 warnings on 2 files.
29
+ Finished in 12ms on 100 files.
30
+ """
31
+ expected = " × eslint(no-console): Unexpected console statement.\n ╭─[src/app.ts:5:3]\n 5 │ console.log(\"debug\");\n │ ^^^^^^^^^^^\n ╰────\n × eslint(no-unused-vars): 'x' is defined but never used.\n ╭─[src/utils.ts:2:7]\n 2 │ let x = 42;\n │ ^\n ╰────"
32
+
33
+ [[tests.oxlint]]
34
+ name = "clean output"
35
+ input = """
36
+ Finished in 5ms on 100 files.
37
+ """
38
+ expected = "oxlint: ok"
39
+
40
+ [[tests.oxlint]]
41
+ name = "empty input passes through"
42
+ input = ""
43
+ expected = ""
@@ -0,0 +1,63 @@
1
+ [filters.ping]
2
+ description = "Compact ping output — strip per-packet lines, keep summary"
3
+ match_command = "^ping\\b"
4
+ strip_ansi = true
5
+ strip_lines_matching = [
6
+ "^PING ",
7
+ "^Pinging ",
8
+ "^\\d+ bytes from ",
9
+ "^Reply from .+: bytes=",
10
+ "^\\s*$",
11
+ ]
12
+ tail_lines = 4
13
+
14
+ [[tests.ping]]
15
+ name = "success keeps summary only"
16
+ input = """
17
+ PING example.com (93.184.216.34): 56 data bytes
18
+ 64 bytes from 93.184.216.34: icmp_seq=0 ttl=56 time=14.2 ms
19
+ 64 bytes from 93.184.216.34: icmp_seq=1 ttl=56 time=13.8 ms
20
+ 64 bytes from 93.184.216.34: icmp_seq=2 ttl=56 time=14.1 ms
21
+ 64 bytes from 93.184.216.34: icmp_seq=3 ttl=56 time=13.9 ms
22
+
23
+ --- example.com ping statistics ---
24
+ 4 packets transmitted, 4 packets received, 0.0% packet loss
25
+ round-trip min/avg/max/stddev = 13.8/14.0/14.2/0.2 ms
26
+ """
27
+ expected = """--- example.com ping statistics ---
28
+ 4 packets transmitted, 4 packets received, 0.0% packet loss
29
+ round-trip min/avg/max/stddev = 13.8/14.0/14.2/0.2 ms"""
30
+
31
+ [[tests.ping]]
32
+ name = "windows format keeps stats block only"
33
+ input = """
34
+ Pinging 192.0.2.1 with 32 bytes of data:
35
+ Reply from 192.0.2.1: bytes=32 time=14ms TTL=56
36
+ Reply from 192.0.2.1: bytes=32 time=13ms TTL=56
37
+ Reply from 192.0.2.1: bytes=32 time=14ms TTL=56
38
+ Reply from 192.0.2.1: bytes=32 time=13ms TTL=56
39
+
40
+ Ping statistics for 192.0.2.1:
41
+ Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
42
+ Approximate round trip times in milli-seconds:
43
+ Minimum = 13ms, Maximum = 14ms, Average = 13ms
44
+ """
45
+ expected = """Ping statistics for 192.0.2.1:
46
+ Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
47
+ Approximate round trip times in milli-seconds:
48
+ Minimum = 13ms, Maximum = 14ms, Average = 13ms"""
49
+
50
+ [[tests.ping]]
51
+ name = "unreachable host passes error through"
52
+ input = """
53
+ PING unreachable.example.com (192.0.2.1): 56 data bytes
54
+ Request timeout for icmp_seq 0
55
+ Request timeout for icmp_seq 1
56
+
57
+ --- unreachable.example.com ping statistics ---
58
+ 2 packets transmitted, 0 packets received, 100.0% packet loss
59
+ """
60
+ expected = """Request timeout for icmp_seq 0
61
+ Request timeout for icmp_seq 1
62
+ --- unreachable.example.com ping statistics ---
63
+ 2 packets transmitted, 0 packets received, 100.0% packet loss"""
@@ -0,0 +1,40 @@
1
+ [filters.pio-run]
2
+ description = "Compact PlatformIO build output"
3
+ match_command = "^pio\\s+run"
4
+ strip_ansi = true
5
+ strip_lines_matching = [
6
+ "^\\s*$",
7
+ "^Verbose mode",
8
+ "^CONFIGURATION:",
9
+ "^LDF:",
10
+ "^Library Manager:",
11
+ "^Compiling\\s",
12
+ "^Linking\\s",
13
+ "^Building\\s",
14
+ "^Checking size",
15
+ ]
16
+ max_lines = 30
17
+ on_empty = "pio run: ok"
18
+
19
+ [[tests.pio-run]]
20
+ name = "strips build noise, preserves errors"
21
+ input = """
22
+ Verbose mode can be enabled via `-v, --verbose` option
23
+ CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
24
+ LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
25
+ Compiling .pio/build/esp32dev/src/main.cpp.o
26
+ Building .pio/build/esp32dev/firmware.elf
27
+ Linking .pio/build/esp32dev/firmware.elf
28
+ Checking size .pio/build/esp32dev/firmware.elf
29
+ src/main.cpp:10:3: error: 'LED_BUILTINN' was not declared
30
+ """
31
+ expected = "src/main.cpp:10:3: error: 'LED_BUILTINN' was not declared"
32
+
33
+ [[tests.pio-run]]
34
+ name = "on_empty when clean build with only noise"
35
+ input = """
36
+ Verbose mode can be enabled via `-v, --verbose` option
37
+ Compiling .pio/build/esp32dev/src/main.cpp.o
38
+ Linking .pio/build/esp32dev/firmware.elf
39
+ """
40
+ expected = "pio run: ok"
@@ -0,0 +1,50 @@
1
+ [filters.poetry-install]
2
+ description = "Compact poetry install/lock/update output — strip downloads, short-circuit when up-to-date"
3
+ match_command = "^poetry\\s+(install|lock|update)\\b"
4
+ strip_ansi = true
5
+ strip_lines_matching = [
6
+ "^\\s*$",
7
+ "^ [-•] Downloading ",
8
+ "^ [-•] Installing .* \\(",
9
+ "^Creating virtualenv",
10
+ "^Using virtualenv",
11
+ ]
12
+ match_output = [
13
+ { pattern = "No dependencies to install or update|No changes\\.", message = "ok (up to date)" },
14
+ ]
15
+ max_lines = 30
16
+
17
+ [[tests.poetry-install]]
18
+ name = "up to date short-circuits"
19
+ input = """
20
+ Installing dependencies from lock file
21
+
22
+ No dependencies to install or update
23
+ """
24
+ expected = "ok (up to date)"
25
+
26
+ [[tests.poetry-install]]
27
+ name = "poetry 2.x bullet syntax short-circuits to ok"
28
+ input = """
29
+ • Installing requests (2.31.0)
30
+ • Installing certifi (2023.11.17)
31
+
32
+ No changes.
33
+ """
34
+ expected = "ok (up to date)"
35
+
36
+ [[tests.poetry-install]]
37
+ name = "install strips download lines"
38
+ input = """
39
+ Installing dependencies from lock file
40
+
41
+ - Downloading requests-2.31.0-py3-none-any.whl (62.6 kB)
42
+ - Installing certifi (2023.11.17)
43
+ - Installing charset-normalizer (3.3.2)
44
+ - Installing idna (3.6)
45
+ - Installing urllib3 (2.1.0)
46
+ - Installing requests (2.31.0)
47
+
48
+ Writing lock file
49
+ """
50
+ expected = "Installing dependencies from lock file\nWriting lock file"
@@ -0,0 +1,35 @@
1
+ [filters.pre-commit]
2
+ description = "Compact pre-commit output"
3
+ match_command = "^pre-commit\\b"
4
+ strip_ansi = true
5
+ strip_lines_matching = [
6
+ "^\\[INFO\\] Installing environment",
7
+ "^\\[INFO\\] Once installed this environment will be reused",
8
+ "^\\[INFO\\] This may take a few minutes",
9
+ "^\\s*$",
10
+ ]
11
+ max_lines = 40
12
+
13
+ [[tests.pre-commit]]
14
+ name = "strips INFO install noise, keeps hook results"
15
+ input = """
16
+ [INFO] Installing environment for https://github.com/psf/black.
17
+ [INFO] Once installed this environment will be reused.
18
+ [INFO] This may take a few minutes...
19
+ Trim Trailing Whitespace.................................................Passed
20
+ Fix End of Files.........................................................Passed
21
+ Check Yaml...............................................................Failed
22
+ - hook id: check-yaml
23
+ - exit code: 1
24
+ """
25
+ expected = "Trim Trailing Whitespace.................................................Passed\nFix End of Files.........................................................Passed\nCheck Yaml...............................................................Failed\n- hook id: check-yaml\n- exit code: 1"
26
+
27
+ [[tests.pre-commit]]
28
+ name = "all passed — no INFO noise"
29
+ input = """
30
+ [INFO] Installing environment for https://github.com/pre-commit/mirrors-isort.
31
+ [INFO] Once installed this environment will be reused.
32
+ isort....................................................................Passed
33
+ black....................................................................Passed
34
+ """
35
+ expected = "isort....................................................................Passed\nblack....................................................................Passed"
@@ -0,0 +1,16 @@
1
+ [filters.ps]
2
+ description = "Compact ps output — truncate wide lines, limit rows"
3
+ match_command = "^ps(\\s|$)"
4
+ strip_ansi = true
5
+ truncate_lines_at = 120
6
+ max_lines = 30
7
+
8
+ [[tests.ps]]
9
+ name = "short process list passes through unchanged"
10
+ input = "USER PID %CPU %MEM COMMAND\nroot 1 0.0 0.0 /sbin/launchd\nflorian 42 0.1 0.2 bash"
11
+ expected = "USER PID %CPU %MEM COMMAND\nroot 1 0.0 0.0 /sbin/launchd\nflorian 42 0.1 0.2 bash"
12
+
13
+ [[tests.ps]]
14
+ name = "empty input passes through"
15
+ input = ""
16
+ expected = ""
@@ -0,0 +1,41 @@
1
+ [filters.quarto-render]
2
+ description = "Compact quarto render output"
3
+ match_command = "^quarto\\s+render"
4
+ strip_ansi = true
5
+ strip_lines_matching = [
6
+ "^\\s*$",
7
+ "^\\s*processing file:",
8
+ "^\\s*\\d+/\\d+\\s",
9
+ "^\\s*running",
10
+ "^\\s*Rendering",
11
+ "^pandoc ",
12
+ "^ Validating",
13
+ "^ Resolving",
14
+ ]
15
+ match_output = [
16
+ { pattern = "Output created:", message = "ok (output created)" },
17
+ ]
18
+ max_lines = 20
19
+
20
+ [[tests.quarto-render]]
21
+ name = "success short-circuits to ok"
22
+ input = """
23
+ processing file: index.qmd
24
+ Validating schema
25
+ Resolving resources
26
+ pandoc to html5
27
+ Output created: _site/index.html
28
+ """
29
+ expected = "ok (output created)"
30
+
31
+ [[tests.quarto-render]]
32
+ name = "error passes through"
33
+ input = """
34
+ processing file: broken.qmd
35
+ Validating schema
36
+ ERROR: Render failed
37
+
38
+ caused by:
39
+ syntax error at line 10
40
+ """
41
+ expected = "ERROR: Render failed\ncaused by:\n syntax error at line 10"
@@ -0,0 +1,48 @@
1
+ [filters.rsync]
2
+ description = "Compact rsync output — short-circuit on success, strip progress"
3
+ match_command = "^rsync\\b"
4
+ strip_ansi = true
5
+ strip_lines_matching = [
6
+ "^\\s*$",
7
+ "^sending incremental file list",
8
+ "^sent \\d",
9
+ ]
10
+ match_output = [
11
+ { pattern = "total size is", message = "ok (synced)", unless = "error|failed|No such file" },
12
+ ]
13
+ max_lines = 20
14
+
15
+ [[tests.rsync]]
16
+ name = "successful sync short-circuits to ok"
17
+ input = """
18
+ sending incremental file list
19
+ ./
20
+ file1.txt
21
+ file2.txt
22
+
23
+ sent 1,234 bytes received 42 bytes 2,552.00 bytes/sec
24
+ total size is 98,765 speedup is 77.31
25
+ """
26
+ expected = "ok (synced)"
27
+
28
+ [[tests.rsync]]
29
+ name = "error lines pass through"
30
+ input = """
31
+ sending incremental file list
32
+ rsync: [Receiver] mkdir "/remote/path" failed: Permission denied (13)
33
+ rsync error: error in file system (code 11) at receiver.c(741) [Receiver=3.2.7]
34
+ """
35
+ expected = """rsync: [Receiver] mkdir "/remote/path" failed: Permission denied (13)
36
+ rsync error: error in file system (code 11) at receiver.c(741) [Receiver=3.2.7]"""
37
+
38
+ [[tests.rsync]]
39
+ name = "errors not swallowed when total size present"
40
+ input = """
41
+ rsync: [sender] error
42
+ error in rsync protocol data stream (code 12)
43
+ sent 100 bytes received 200 bytes 60.00 bytes/sec
44
+ total size is 1000 speedup is 3.33
45
+ """
46
+ expected = """rsync: [sender] error
47
+ error in rsync protocol data stream (code 12)
48
+ total size is 1000 speedup is 3.33"""
@@ -0,0 +1,27 @@
1
+ [filters.shellcheck]
2
+ description = "Compact shellcheck output — strip blank lines, keep caret indicators for error position"
3
+ match_command = "^shellcheck\\b"
4
+ strip_ansi = true
5
+ strip_lines_matching = [
6
+ "^\\s*$",
7
+ ]
8
+ max_lines = 50
9
+
10
+ [[tests.shellcheck]]
11
+ name = "multi-warning output stripped of blank lines only"
12
+ input = """
13
+ In script.sh line 3:
14
+ if [[ $1 == "" ]]
15
+ ^-- SC2236: Use -z instead of ! -n.
16
+
17
+ In script.sh line 7:
18
+ echo $var
19
+ ^-- SC2086: Double quote to prevent globbing.
20
+
21
+ """
22
+ expected = "In script.sh line 3:\nif [[ $1 == \"\" ]]\n ^-- SC2236: Use -z instead of ! -n.\nIn script.sh line 7:\necho $var\n ^-- SC2086: Double quote to prevent globbing."
23
+
24
+ [[tests.shellcheck]]
25
+ name = "empty input passes through"
26
+ input = ""
27
+ expected = ""
@@ -0,0 +1,29 @@
1
+ [filters.shopify-theme]
2
+ description = "Compact shopify theme push/pull output"
3
+ match_command = "^shopify\\s+theme\\s+(push|pull)"
4
+ strip_ansi = true
5
+ strip_lines_matching = [
6
+ "^\\s*$",
7
+ "^\\s*Uploading",
8
+ "^\\s*Downloading",
9
+ ]
10
+ tail_lines = 5
11
+ max_lines = 15
12
+ on_empty = "shopify theme: ok"
13
+
14
+ [[tests.shopify-theme]]
15
+ name = "strips upload/download lines, keeps tail"
16
+ input = """
17
+ Uploading assets/app.css
18
+ Uploading assets/app.js
19
+ Uploading templates/index.liquid
20
+ Downloading assets/old.css
21
+
22
+ Theme 'Development' (id: 12345) pushed to store.example.myshopify.com
23
+ """
24
+ expected = "Theme 'Development' (id: 12345) pushed to store.example.myshopify.com"
25
+
26
+ [[tests.shopify-theme]]
27
+ name = "on_empty when all stripped"
28
+ input = "Uploading assets/app.css\nDownloading assets/base.css\n"
29
+ expected = "shopify theme: ok"
@@ -0,0 +1,45 @@
1
+ [filters.skopeo]
2
+ description = "Compact skopeo output — truncate large manifests, strip verbosity"
3
+ match_command = "^skopeo\\b"
4
+ strip_ansi = true
5
+ strip_lines_matching = [
6
+ "^\\s*$",
7
+ "^Getting image source signatures",
8
+ "^Copying blob",
9
+ "^Copying config",
10
+ "^Writing manifest",
11
+ "^Storing signatures",
12
+ ]
13
+ max_lines = 30
14
+ truncate_lines_at = 120
15
+ on_empty = "skopeo: ok"
16
+
17
+ [[tests.skopeo]]
18
+ name = "copy strips progress, keeps result"
19
+ input = """
20
+ Getting image source signatures
21
+ Copying blob sha256:abc123 done
22
+ Copying blob sha256:def456 done
23
+ Copying config sha256:789ghi done
24
+ Writing manifest to image destination
25
+ Storing signatures
26
+ """
27
+ expected = "skopeo: ok"
28
+
29
+ [[tests.skopeo]]
30
+ name = "inspect keeps output"
31
+ input = """
32
+ {
33
+ "Name": "docker.io/library/nginx",
34
+ "Tag": "latest",
35
+ "Digest": "sha256:abc123",
36
+ "RepoTags": ["latest", "1.25"],
37
+ "Created": "2026-01-01T00:00:00Z"
38
+ }
39
+ """
40
+ expected = "{\n \"Name\": \"docker.io/library/nginx\",\n \"Tag\": \"latest\",\n \"Digest\": \"sha256:abc123\",\n \"RepoTags\": [\"latest\", \"1.25\"],\n \"Created\": \"2026-01-01T00:00:00Z\"\n}"
41
+
42
+ [[tests.skopeo]]
43
+ name = "empty input passes through"
44
+ input = ""
45
+ expected = ""
@@ -0,0 +1,16 @@
1
+ [filters.sops]
2
+ description = "Compact sops output"
3
+ match_command = "^sops\\b"
4
+ strip_ansi = true
5
+ strip_lines_matching = ["^\\s*$"]
6
+ max_lines = 40
7
+
8
+ [[tests.sops]]
9
+ name = "strips blank lines"
10
+ input = "mac: xyz123\n\nversion: 3.8.1"
11
+ expected = "mac: xyz123\nversion: 3.8.1"
12
+
13
+ [[tests.sops]]
14
+ name = "preserves non-blank output unchanged"
15
+ input = "mac: abc123\nversion: 3.8.1"
16
+ expected = "mac: abc123\nversion: 3.8.1"
@@ -0,0 +1,44 @@
1
+ [filters.ssh]
2
+ description = "Compact ssh output — strip connection banners, keep command output"
3
+ match_command = "^ssh\\b"
4
+ strip_ansi = true
5
+ strip_lines_matching = [
6
+ "^\\s*$",
7
+ "^Warning: Permanently added",
8
+ "^Connection to .+ closed",
9
+ "^Authenticated to",
10
+ "^debug1:",
11
+ "^OpenSSH_",
12
+ "^Pseudo-terminal",
13
+ ]
14
+ max_lines = 200
15
+ truncate_lines_at = 120
16
+
17
+ [[tests.ssh]]
18
+ name = "strips connection banners, keeps command output"
19
+ input = """
20
+ Warning: Permanently added '192.168.1.10' (ED25519) to the list of known hosts.
21
+
22
+ total 32
23
+ drwxr-xr-x 4 user user 4096 Mar 10 12:00 app
24
+ -rw-r--r-- 1 user user 1234 Mar 10 11:00 config.yaml
25
+
26
+ Connection to 192.168.1.10 closed.
27
+ """
28
+ expected = "total 32\ndrwxr-xr-x 4 user user 4096 Mar 10 12:00 app\n-rw-r--r-- 1 user user 1234 Mar 10 11:00 config.yaml"
29
+
30
+ [[tests.ssh]]
31
+ name = "verbose debug lines stripped"
32
+ input = """
33
+ debug1: Connecting to host.example.com port 22.
34
+ debug1: Connection established.
35
+ Authenticated to host.example.com ([1.2.3.4]:22).
36
+ uptime: 12:00:00 up 42 days, load average: 0.10, 0.15, 0.12
37
+ Connection to host.example.com closed.
38
+ """
39
+ expected = "uptime: 12:00:00 up 42 days, load average: 0.10, 0.15, 0.12"
40
+
41
+ [[tests.ssh]]
42
+ name = "empty input passes through"
43
+ input = ""
44
+ expected = ""
@@ -0,0 +1,34 @@
1
+ [filters.stat]
2
+ description = "Compact stat output — strip blank lines"
3
+ match_command = "^stat\\b"
4
+ strip_ansi = true
5
+ strip_lines_matching = [
6
+ "^\\s*$",
7
+ ]
8
+ max_lines = 30
9
+
10
+ [[tests.stat]]
11
+ name = "macOS stat output kept"
12
+ input = """
13
+ 16777234 8690244974 -rw-r--r-- 1 patrick staff 0 12345 "Mar 10 12:00:00 2026" "Mar 10 11:00:00 2026" "Mar 10 11:00:00 2026" "Mar 9 10:00:00 2026" 4096 24 0 file.txt
14
+ """
15
+ expected = "16777234 8690244974 -rw-r--r-- 1 patrick staff 0 12345 \"Mar 10 12:00:00 2026\" \"Mar 10 11:00:00 2026\" \"Mar 10 11:00:00 2026\" \"Mar 9 10:00:00 2026\" 4096 24 0 file.txt"
16
+
17
+ [[tests.stat]]
18
+ name = "linux stat output kept"
19
+ input = """
20
+ File: main.rs
21
+ Size: 12345 Blocks: 24 IO Block: 4096 regular file
22
+ Device: 801h/2049d Inode: 1234567 Links: 1
23
+ Access: (0644/-rw-r--r--) Uid: ( 1000/ patrick) Gid: ( 1000/ patrick)
24
+ Access: 2026-03-10 12:00:00.000000000 +0100
25
+ Modify: 2026-03-10 11:00:00.000000000 +0100
26
+ Change: 2026-03-10 11:00:00.000000000 +0100
27
+ Birth: 2026-03-09 10:00:00.000000000 +0100
28
+ """
29
+ expected = " File: main.rs\n Size: 12345 Blocks: 24 IO Block: 4096 regular file\nDevice: 801h/2049d Inode: 1234567 Links: 1\nAccess: (0644/-rw-r--r--) Uid: ( 1000/ patrick) Gid: ( 1000/ patrick)\nAccess: 2026-03-10 12:00:00.000000000 +0100\nModify: 2026-03-10 11:00:00.000000000 +0100\nChange: 2026-03-10 11:00:00.000000000 +0100\n Birth: 2026-03-09 10:00:00.000000000 +0100"
30
+
31
+ [[tests.stat]]
32
+ name = "empty input passes through"
33
+ input = ""
34
+ expected = ""
@@ -0,0 +1,41 @@
1
+ [filters.swift-build]
2
+ description = "Compact swift build output — short-circuit on success, strip Compiling/Linking"
3
+ match_command = "^swift\\s+build\\b"
4
+ strip_ansi = true
5
+ strip_lines_matching = [
6
+ "^\\s*$",
7
+ "^Compiling ",
8
+ "^Linking ",
9
+ ]
10
+ match_output = [
11
+ { pattern = "Build complete!", message = "ok (build complete)", unless = "warning:|error:" },
12
+ ]
13
+ max_lines = 40
14
+
15
+ [[tests.swift-build]]
16
+ name = "successful build short-circuits to ok"
17
+ input = """
18
+ Build complete!
19
+ """
20
+ expected = "ok (build complete)"
21
+
22
+ [[tests.swift-build]]
23
+ name = "build errors pass through after stripping noise"
24
+ input = """
25
+ Compiling MyApp MyApp.swift
26
+ /home/user/MyApp/Sources/MyApp/main.swift:5:1: error: use of unresolved identifier 'foo'
27
+ foo()
28
+ ^~~
29
+ Linking MyApp
30
+ error: build had 1 command failure
31
+ """
32
+ expected = "/home/user/MyApp/Sources/MyApp/main.swift:5:1: error: use of unresolved identifier 'foo'\nfoo()\n^~~\nerror: build had 1 command failure"
33
+
34
+ [[tests.swift-build]]
35
+ name = "warnings not swallowed when Build complete present"
36
+ input = """
37
+ CompileSwift normal x86_64 MyFile.swift
38
+ /path/to/MyFile.swift:42:10: warning: unused variable 'x'
39
+ Build complete! (with warnings)
40
+ """
41
+ expected = "CompileSwift normal x86_64 MyFile.swift\n/path/to/MyFile.swift:42:10: warning: unused variable 'x'\nBuild complete! (with warnings)"