@runchr/gstack-antigravity 0.1.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.

Potentially problematic release.


This version of @runchr/gstack-antigravity might be problematic. Click here for more details.

Files changed (297) hide show
  1. package/.agents/rules/ETHOS.md +129 -0
  2. package/.agents/rules/global-gstack.md +117 -0
  3. package/.agents/rules/persona-gstack-autoplan.md +14 -0
  4. package/.agents/rules/persona-gstack-benchmark.md +14 -0
  5. package/.agents/rules/persona-gstack-browse.md +14 -0
  6. package/.agents/rules/persona-gstack-canary.md +14 -0
  7. package/.agents/rules/persona-gstack-careful.md +14 -0
  8. package/.agents/rules/persona-gstack-codex.md +14 -0
  9. package/.agents/rules/persona-gstack-cso.md +14 -0
  10. package/.agents/rules/persona-gstack-design-consultation.md +14 -0
  11. package/.agents/rules/persona-gstack-design-review.md +14 -0
  12. package/.agents/rules/persona-gstack-document-release.md +14 -0
  13. package/.agents/rules/persona-gstack-freeze.md +14 -0
  14. package/.agents/rules/persona-gstack-gstack-upgrade.md +14 -0
  15. package/.agents/rules/persona-gstack-guard.md +14 -0
  16. package/.agents/rules/persona-gstack-investigate.md +14 -0
  17. package/.agents/rules/persona-gstack-land-and-deploy.md +14 -0
  18. package/.agents/rules/persona-gstack-office-hours.md +14 -0
  19. package/.agents/rules/persona-gstack-plan-ceo-review.md +14 -0
  20. package/.agents/rules/persona-gstack-plan-design-review.md +14 -0
  21. package/.agents/rules/persona-gstack-plan-eng-review.md +14 -0
  22. package/.agents/rules/persona-gstack-qa-only.md +14 -0
  23. package/.agents/rules/persona-gstack-qa.md +14 -0
  24. package/.agents/rules/persona-gstack-retro.md +14 -0
  25. package/.agents/rules/persona-gstack-review.md +14 -0
  26. package/.agents/rules/persona-gstack-setup-browser-cookies.md +14 -0
  27. package/.agents/rules/persona-gstack-setup-deploy.md +14 -0
  28. package/.agents/rules/persona-gstack-ship.md +14 -0
  29. package/.agents/rules/persona-gstack-unfreeze.md +14 -0
  30. package/.agents/rules/persona-gstack.md +40 -0
  31. package/.agents/rules/recursive-identities.md +22 -0
  32. package/.agents/workflows/autoplan.md +30 -0
  33. package/.agents/workflows/benchmark.md +31 -0
  34. package/.agents/workflows/browse.md +26 -0
  35. package/.agents/workflows/canary.md +33 -0
  36. package/.agents/workflows/careful.md +22 -0
  37. package/.agents/workflows/codex.md +36 -0
  38. package/.agents/workflows/cso.md +29 -0
  39. package/.agents/workflows/design-consultation.md +28 -0
  40. package/.agents/workflows/design-review.md +28 -0
  41. package/.agents/workflows/document-release.md +32 -0
  42. package/.agents/workflows/freeze.md +17 -0
  43. package/.agents/workflows/gstack-upgrade.md +54 -0
  44. package/.agents/workflows/gstack.md +56 -0
  45. package/.agents/workflows/guard.md +18 -0
  46. package/.agents/workflows/investigate.md +37 -0
  47. package/.agents/workflows/land-and-deploy.md +35 -0
  48. package/.agents/workflows/office-hours.md +27 -0
  49. package/.agents/workflows/plan-ceo-review.md +34 -0
  50. package/.agents/workflows/plan-design-review.md +31 -0
  51. package/.agents/workflows/plan-eng-review.md +28 -0
  52. package/.agents/workflows/qa-only.md +28 -0
  53. package/.agents/workflows/qa.md +73 -0
  54. package/.agents/workflows/retro.md +34 -0
  55. package/.agents/workflows/review.md +30 -0
  56. package/.agents/workflows/setup-browser-cookies.md +15 -0
  57. package/.agents/workflows/setup-cookies.md +8 -0
  58. package/.agents/workflows/setup-deploy.md +21 -0
  59. package/.agents/workflows/ship.md +93 -0
  60. package/.agents/workflows/unfreeze.md +12 -0
  61. package/LICENSE +22 -0
  62. package/README.md +189 -0
  63. package/README_KO.md +191 -0
  64. package/bin/install.js +105 -0
  65. package/gstack-origin/.agents/skills/gstack/SKILL.md +651 -0
  66. package/gstack-origin/.agents/skills/gstack-autoplan/SKILL.md +678 -0
  67. package/gstack-origin/.agents/skills/gstack-benchmark/SKILL.md +482 -0
  68. package/gstack-origin/.agents/skills/gstack-browse/SKILL.md +511 -0
  69. package/gstack-origin/.agents/skills/gstack-canary/SKILL.md +486 -0
  70. package/gstack-origin/.agents/skills/gstack-careful/SKILL.md +50 -0
  71. package/gstack-origin/.agents/skills/gstack-cso/SKILL.md +607 -0
  72. package/gstack-origin/.agents/skills/gstack-design-consultation/SKILL.md +615 -0
  73. package/gstack-origin/.agents/skills/gstack-design-review/SKILL.md +988 -0
  74. package/gstack-origin/.agents/skills/gstack-document-release/SKILL.md +604 -0
  75. package/gstack-origin/.agents/skills/gstack-freeze/SKILL.md +67 -0
  76. package/gstack-origin/.agents/skills/gstack-guard/SKILL.md +62 -0
  77. package/gstack-origin/.agents/skills/gstack-investigate/SKILL.md +415 -0
  78. package/gstack-origin/.agents/skills/gstack-land-and-deploy/SKILL.md +873 -0
  79. package/gstack-origin/.agents/skills/gstack-office-hours/SKILL.md +986 -0
  80. package/gstack-origin/.agents/skills/gstack-plan-ceo-review/SKILL.md +1268 -0
  81. package/gstack-origin/.agents/skills/gstack-plan-design-review/SKILL.md +668 -0
  82. package/gstack-origin/.agents/skills/gstack-plan-eng-review/SKILL.md +826 -0
  83. package/gstack-origin/.agents/skills/gstack-qa/SKILL.md +1006 -0
  84. package/gstack-origin/.agents/skills/gstack-qa-only/SKILL.md +626 -0
  85. package/gstack-origin/.agents/skills/gstack-retro/SKILL.md +1065 -0
  86. package/gstack-origin/.agents/skills/gstack-review/SKILL.md +704 -0
  87. package/gstack-origin/.agents/skills/gstack-setup-browser-cookies/SKILL.md +325 -0
  88. package/gstack-origin/.agents/skills/gstack-setup-deploy/SKILL.md +450 -0
  89. package/gstack-origin/.agents/skills/gstack-ship/SKILL.md +1312 -0
  90. package/gstack-origin/.agents/skills/gstack-unfreeze/SKILL.md +36 -0
  91. package/gstack-origin/.agents/skills/gstack-upgrade/SKILL.md +220 -0
  92. package/gstack-origin/.env.example +5 -0
  93. package/gstack-origin/.github/workflows/skill-docs.yml +17 -0
  94. package/gstack-origin/AGENTS.md +49 -0
  95. package/gstack-origin/ARCHITECTURE.md +359 -0
  96. package/gstack-origin/BROWSER.md +271 -0
  97. package/gstack-origin/CHANGELOG.md +800 -0
  98. package/gstack-origin/CLAUDE.md +284 -0
  99. package/gstack-origin/CONTRIBUTING.md +370 -0
  100. package/gstack-origin/ETHOS.md +129 -0
  101. package/gstack-origin/LICENSE +21 -0
  102. package/gstack-origin/README.md +228 -0
  103. package/gstack-origin/SKILL.md +657 -0
  104. package/gstack-origin/SKILL.md.tmpl +281 -0
  105. package/gstack-origin/TODOS.md +564 -0
  106. package/gstack-origin/VERSION +1 -0
  107. package/gstack-origin/autoplan/SKILL.md +689 -0
  108. package/gstack-origin/autoplan/SKILL.md.tmpl +416 -0
  109. package/gstack-origin/benchmark/SKILL.md +489 -0
  110. package/gstack-origin/benchmark/SKILL.md.tmpl +233 -0
  111. package/gstack-origin/bin/dev-setup +68 -0
  112. package/gstack-origin/bin/dev-teardown +56 -0
  113. package/gstack-origin/bin/gstack-analytics +191 -0
  114. package/gstack-origin/bin/gstack-community-dashboard +113 -0
  115. package/gstack-origin/bin/gstack-config +38 -0
  116. package/gstack-origin/bin/gstack-diff-scope +71 -0
  117. package/gstack-origin/bin/gstack-global-discover.ts +591 -0
  118. package/gstack-origin/bin/gstack-repo-mode +93 -0
  119. package/gstack-origin/bin/gstack-review-log +9 -0
  120. package/gstack-origin/bin/gstack-review-read +12 -0
  121. package/gstack-origin/bin/gstack-slug +15 -0
  122. package/gstack-origin/bin/gstack-telemetry-log +158 -0
  123. package/gstack-origin/bin/gstack-telemetry-sync +127 -0
  124. package/gstack-origin/bin/gstack-update-check +196 -0
  125. package/gstack-origin/browse/SKILL.md +517 -0
  126. package/gstack-origin/browse/SKILL.md.tmpl +141 -0
  127. package/gstack-origin/browse/bin/find-browse +21 -0
  128. package/gstack-origin/browse/bin/remote-slug +14 -0
  129. package/gstack-origin/browse/scripts/build-node-server.sh +48 -0
  130. package/gstack-origin/browse/src/browser-manager.ts +634 -0
  131. package/gstack-origin/browse/src/buffers.ts +137 -0
  132. package/gstack-origin/browse/src/bun-polyfill.cjs +109 -0
  133. package/gstack-origin/browse/src/cli.ts +420 -0
  134. package/gstack-origin/browse/src/commands.ts +111 -0
  135. package/gstack-origin/browse/src/config.ts +150 -0
  136. package/gstack-origin/browse/src/cookie-import-browser.ts +417 -0
  137. package/gstack-origin/browse/src/cookie-picker-routes.ts +207 -0
  138. package/gstack-origin/browse/src/cookie-picker-ui.ts +541 -0
  139. package/gstack-origin/browse/src/find-browse.ts +61 -0
  140. package/gstack-origin/browse/src/meta-commands.ts +269 -0
  141. package/gstack-origin/browse/src/platform.ts +17 -0
  142. package/gstack-origin/browse/src/read-commands.ts +335 -0
  143. package/gstack-origin/browse/src/server.ts +369 -0
  144. package/gstack-origin/browse/src/snapshot.ts +398 -0
  145. package/gstack-origin/browse/src/url-validation.ts +91 -0
  146. package/gstack-origin/browse/src/write-commands.ts +352 -0
  147. package/gstack-origin/browse/test/bun-polyfill.test.ts +72 -0
  148. package/gstack-origin/browse/test/commands.test.ts +1836 -0
  149. package/gstack-origin/browse/test/config.test.ts +250 -0
  150. package/gstack-origin/browse/test/cookie-import-browser.test.ts +397 -0
  151. package/gstack-origin/browse/test/cookie-picker-routes.test.ts +205 -0
  152. package/gstack-origin/browse/test/find-browse.test.ts +50 -0
  153. package/gstack-origin/browse/test/fixtures/basic.html +33 -0
  154. package/gstack-origin/browse/test/fixtures/cursor-interactive.html +22 -0
  155. package/gstack-origin/browse/test/fixtures/dialog.html +15 -0
  156. package/gstack-origin/browse/test/fixtures/empty.html +2 -0
  157. package/gstack-origin/browse/test/fixtures/forms.html +55 -0
  158. package/gstack-origin/browse/test/fixtures/qa-eval-checkout.html +108 -0
  159. package/gstack-origin/browse/test/fixtures/qa-eval-spa.html +98 -0
  160. package/gstack-origin/browse/test/fixtures/qa-eval.html +51 -0
  161. package/gstack-origin/browse/test/fixtures/responsive.html +49 -0
  162. package/gstack-origin/browse/test/fixtures/snapshot.html +55 -0
  163. package/gstack-origin/browse/test/fixtures/spa.html +24 -0
  164. package/gstack-origin/browse/test/fixtures/states.html +17 -0
  165. package/gstack-origin/browse/test/fixtures/upload.html +25 -0
  166. package/gstack-origin/browse/test/gstack-config.test.ts +125 -0
  167. package/gstack-origin/browse/test/gstack-update-check.test.ts +467 -0
  168. package/gstack-origin/browse/test/handoff.test.ts +235 -0
  169. package/gstack-origin/browse/test/path-validation.test.ts +63 -0
  170. package/gstack-origin/browse/test/platform.test.ts +37 -0
  171. package/gstack-origin/browse/test/snapshot.test.ts +467 -0
  172. package/gstack-origin/browse/test/test-server.ts +57 -0
  173. package/gstack-origin/browse/test/url-validation.test.ts +72 -0
  174. package/gstack-origin/canary/SKILL.md +493 -0
  175. package/gstack-origin/canary/SKILL.md.tmpl +220 -0
  176. package/gstack-origin/careful/SKILL.md +59 -0
  177. package/gstack-origin/careful/SKILL.md.tmpl +57 -0
  178. package/gstack-origin/careful/bin/check-careful.sh +112 -0
  179. package/gstack-origin/codex/SKILL.md +677 -0
  180. package/gstack-origin/codex/SKILL.md.tmpl +356 -0
  181. package/gstack-origin/conductor.json +6 -0
  182. package/gstack-origin/cso/SKILL.md +615 -0
  183. package/gstack-origin/cso/SKILL.md.tmpl +376 -0
  184. package/gstack-origin/design-consultation/SKILL.md +625 -0
  185. package/gstack-origin/design-consultation/SKILL.md.tmpl +369 -0
  186. package/gstack-origin/design-review/SKILL.md +998 -0
  187. package/gstack-origin/design-review/SKILL.md.tmpl +262 -0
  188. package/gstack-origin/docs/images/github-2013.png +0 -0
  189. package/gstack-origin/docs/images/github-2026.png +0 -0
  190. package/gstack-origin/docs/skills.md +877 -0
  191. package/gstack-origin/document-release/SKILL.md +613 -0
  192. package/gstack-origin/document-release/SKILL.md.tmpl +357 -0
  193. package/gstack-origin/freeze/SKILL.md +82 -0
  194. package/gstack-origin/freeze/SKILL.md.tmpl +80 -0
  195. package/gstack-origin/freeze/bin/check-freeze.sh +68 -0
  196. package/gstack-origin/gstack-upgrade/SKILL.md +226 -0
  197. package/gstack-origin/gstack-upgrade/SKILL.md.tmpl +224 -0
  198. package/gstack-origin/guard/SKILL.md +82 -0
  199. package/gstack-origin/guard/SKILL.md.tmpl +80 -0
  200. package/gstack-origin/investigate/SKILL.md +435 -0
  201. package/gstack-origin/investigate/SKILL.md.tmpl +196 -0
  202. package/gstack-origin/land-and-deploy/SKILL.md +880 -0
  203. package/gstack-origin/land-and-deploy/SKILL.md.tmpl +575 -0
  204. package/gstack-origin/office-hours/SKILL.md +996 -0
  205. package/gstack-origin/office-hours/SKILL.md.tmpl +624 -0
  206. package/gstack-origin/package.json +55 -0
  207. package/gstack-origin/plan-ceo-review/SKILL.md +1277 -0
  208. package/gstack-origin/plan-ceo-review/SKILL.md.tmpl +838 -0
  209. package/gstack-origin/plan-design-review/SKILL.md +676 -0
  210. package/gstack-origin/plan-design-review/SKILL.md.tmpl +314 -0
  211. package/gstack-origin/plan-eng-review/SKILL.md +836 -0
  212. package/gstack-origin/plan-eng-review/SKILL.md.tmpl +279 -0
  213. package/gstack-origin/qa/SKILL.md +1016 -0
  214. package/gstack-origin/qa/SKILL.md.tmpl +316 -0
  215. package/gstack-origin/qa/references/issue-taxonomy.md +85 -0
  216. package/gstack-origin/qa/templates/qa-report-template.md +126 -0
  217. package/gstack-origin/qa-only/SKILL.md +633 -0
  218. package/gstack-origin/qa-only/SKILL.md.tmpl +101 -0
  219. package/gstack-origin/retro/SKILL.md +1072 -0
  220. package/gstack-origin/retro/SKILL.md.tmpl +833 -0
  221. package/gstack-origin/review/SKILL.md +849 -0
  222. package/gstack-origin/review/SKILL.md.tmpl +259 -0
  223. package/gstack-origin/review/TODOS-format.md +62 -0
  224. package/gstack-origin/review/checklist.md +190 -0
  225. package/gstack-origin/review/design-checklist.md +132 -0
  226. package/gstack-origin/review/greptile-triage.md +220 -0
  227. package/gstack-origin/scripts/analytics.ts +190 -0
  228. package/gstack-origin/scripts/dev-skill.ts +82 -0
  229. package/gstack-origin/scripts/eval-compare.ts +96 -0
  230. package/gstack-origin/scripts/eval-list.ts +116 -0
  231. package/gstack-origin/scripts/eval-select.ts +86 -0
  232. package/gstack-origin/scripts/eval-summary.ts +187 -0
  233. package/gstack-origin/scripts/eval-watch.ts +172 -0
  234. package/gstack-origin/scripts/gen-skill-docs.ts +2414 -0
  235. package/gstack-origin/scripts/skill-check.ts +167 -0
  236. package/gstack-origin/setup +269 -0
  237. package/gstack-origin/setup-browser-cookies/SKILL.md +330 -0
  238. package/gstack-origin/setup-browser-cookies/SKILL.md.tmpl +74 -0
  239. package/gstack-origin/setup-deploy/SKILL.md +459 -0
  240. package/gstack-origin/setup-deploy/SKILL.md.tmpl +220 -0
  241. package/gstack-origin/ship/SKILL.md +1457 -0
  242. package/gstack-origin/ship/SKILL.md.tmpl +528 -0
  243. package/gstack-origin/supabase/config.sh +10 -0
  244. package/gstack-origin/supabase/functions/community-pulse/index.ts +59 -0
  245. package/gstack-origin/supabase/functions/telemetry-ingest/index.ts +135 -0
  246. package/gstack-origin/supabase/functions/update-check/index.ts +37 -0
  247. package/gstack-origin/supabase/migrations/001_telemetry.sql +89 -0
  248. package/gstack-origin/test/analytics.test.ts +277 -0
  249. package/gstack-origin/test/codex-e2e.test.ts +197 -0
  250. package/gstack-origin/test/fixtures/coverage-audit-fixture.ts +76 -0
  251. package/gstack-origin/test/fixtures/eval-baselines.json +7 -0
  252. package/gstack-origin/test/fixtures/qa-eval-checkout-ground-truth.json +43 -0
  253. package/gstack-origin/test/fixtures/qa-eval-ground-truth.json +43 -0
  254. package/gstack-origin/test/fixtures/qa-eval-spa-ground-truth.json +43 -0
  255. package/gstack-origin/test/fixtures/review-eval-design-slop.css +86 -0
  256. package/gstack-origin/test/fixtures/review-eval-design-slop.html +41 -0
  257. package/gstack-origin/test/fixtures/review-eval-enum-diff.rb +30 -0
  258. package/gstack-origin/test/fixtures/review-eval-enum.rb +27 -0
  259. package/gstack-origin/test/fixtures/review-eval-vuln.rb +14 -0
  260. package/gstack-origin/test/gemini-e2e.test.ts +173 -0
  261. package/gstack-origin/test/gen-skill-docs.test.ts +1049 -0
  262. package/gstack-origin/test/global-discover.test.ts +187 -0
  263. package/gstack-origin/test/helpers/codex-session-runner.ts +282 -0
  264. package/gstack-origin/test/helpers/e2e-helpers.ts +239 -0
  265. package/gstack-origin/test/helpers/eval-store.test.ts +548 -0
  266. package/gstack-origin/test/helpers/eval-store.ts +689 -0
  267. package/gstack-origin/test/helpers/gemini-session-runner.test.ts +104 -0
  268. package/gstack-origin/test/helpers/gemini-session-runner.ts +201 -0
  269. package/gstack-origin/test/helpers/llm-judge.ts +130 -0
  270. package/gstack-origin/test/helpers/observability.test.ts +283 -0
  271. package/gstack-origin/test/helpers/session-runner.test.ts +96 -0
  272. package/gstack-origin/test/helpers/session-runner.ts +357 -0
  273. package/gstack-origin/test/helpers/skill-parser.ts +206 -0
  274. package/gstack-origin/test/helpers/touchfiles.ts +260 -0
  275. package/gstack-origin/test/hook-scripts.test.ts +373 -0
  276. package/gstack-origin/test/skill-e2e-browse.test.ts +293 -0
  277. package/gstack-origin/test/skill-e2e-deploy.test.ts +279 -0
  278. package/gstack-origin/test/skill-e2e-design.test.ts +614 -0
  279. package/gstack-origin/test/skill-e2e-plan.test.ts +538 -0
  280. package/gstack-origin/test/skill-e2e-qa-bugs.test.ts +194 -0
  281. package/gstack-origin/test/skill-e2e-qa-workflow.test.ts +412 -0
  282. package/gstack-origin/test/skill-e2e-review.test.ts +535 -0
  283. package/gstack-origin/test/skill-e2e-workflow.test.ts +586 -0
  284. package/gstack-origin/test/skill-e2e.test.ts +3325 -0
  285. package/gstack-origin/test/skill-llm-eval.test.ts +787 -0
  286. package/gstack-origin/test/skill-parser.test.ts +179 -0
  287. package/gstack-origin/test/skill-routing-e2e.test.ts +605 -0
  288. package/gstack-origin/test/skill-validation.test.ts +1520 -0
  289. package/gstack-origin/test/telemetry.test.ts +278 -0
  290. package/gstack-origin/test/touchfiles.test.ts +262 -0
  291. package/gstack-origin/unfreeze/SKILL.md +40 -0
  292. package/gstack-origin/unfreeze/SKILL.md.tmpl +38 -0
  293. package/package.json +38 -0
  294. package/scripts/install-antigravity-skill.ps1 +33 -0
  295. package/scripts/install-antigravity-skill.sh +41 -0
  296. package/scripts/sync-gstack-origin.ps1 +37 -0
  297. package/scripts/sync-gstack-origin.sh +35 -0
@@ -0,0 +1,49 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>Test Page - Responsive</title>
7
+ <style>
8
+ body { font-family: sans-serif; margin: 0; padding: 20px; }
9
+ .container { max-width: 1200px; margin: 0 auto; }
10
+ .grid { display: grid; gap: 16px; }
11
+ .card { padding: 16px; border: 1px solid #ddd; border-radius: 8px; }
12
+
13
+ /* Mobile: single column */
14
+ .grid { grid-template-columns: 1fr; }
15
+
16
+ /* Tablet: two columns */
17
+ @media (min-width: 768px) {
18
+ .grid { grid-template-columns: 1fr 1fr; }
19
+ .mobile-only { display: none; }
20
+ }
21
+
22
+ /* Desktop: three columns */
23
+ @media (min-width: 1024px) {
24
+ .grid { grid-template-columns: 1fr 1fr 1fr; }
25
+ }
26
+
27
+ .mobile-only { color: red; }
28
+ .desktop-indicator { display: none; }
29
+ @media (min-width: 1024px) {
30
+ .desktop-indicator { display: block; color: green; }
31
+ }
32
+ </style>
33
+ </head>
34
+ <body>
35
+ <div class="container">
36
+ <h1>Responsive Layout Test</h1>
37
+ <p class="mobile-only">You are on mobile</p>
38
+ <p class="desktop-indicator">You are on desktop</p>
39
+ <div class="grid">
40
+ <div class="card">Card 1</div>
41
+ <div class="card">Card 2</div>
42
+ <div class="card">Card 3</div>
43
+ <div class="card">Card 4</div>
44
+ <div class="card">Card 5</div>
45
+ <div class="card">Card 6</div>
46
+ </div>
47
+ </div>
48
+ </body>
49
+ </html>
@@ -0,0 +1,55 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>Snapshot Test Page</title>
6
+ <style>
7
+ body { font-family: sans-serif; padding: 20px; }
8
+ form { margin: 10px 0; }
9
+ input, select, button { margin: 5px; padding: 5px; }
10
+ #main { border: 1px solid #ccc; padding: 10px; }
11
+ .empty-div { }
12
+ .hidden { display: none; }
13
+ </style>
14
+ </head>
15
+ <body>
16
+ <h1>Snapshot Test</h1>
17
+ <h2>Subheading</h2>
18
+
19
+ <nav>
20
+ <a href="/page1">Internal Link</a>
21
+ <a href="https://external.com">External Link</a>
22
+ </nav>
23
+
24
+ <div id="main">
25
+ <h3>Form Section</h3>
26
+ <form id="test-form">
27
+ <input type="text" id="username" placeholder="Username" aria-label="Username">
28
+ <input type="email" id="email" placeholder="Email" aria-label="Email">
29
+ <input type="password" id="pass" placeholder="Password" aria-label="Password">
30
+ <label><input type="checkbox" id="agree"> I agree</label>
31
+ <select id="role" aria-label="Role">
32
+ <option value="">Choose...</option>
33
+ <option value="admin">Admin</option>
34
+ <option value="user">User</option>
35
+ </select>
36
+ <button type="submit" id="submit-btn">Submit</button>
37
+ <button type="button" id="cancel-btn">Cancel</button>
38
+ </form>
39
+ </div>
40
+
41
+ <div class="empty-div">
42
+ <div class="empty-div">
43
+ <button id="nested-btn">Nested Button</button>
44
+ </div>
45
+ </div>
46
+
47
+ <p>Some paragraph text that is not interactive.</p>
48
+
49
+ <script>
50
+ document.getElementById('test-form').addEventListener('submit', (e) => {
51
+ e.preventDefault();
52
+ });
53
+ </script>
54
+ </body>
55
+ </html>
@@ -0,0 +1,24 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>Test Page - SPA</title>
6
+ <style>
7
+ body { font-family: sans-serif; }
8
+ #app { padding: 20px; }
9
+ .loaded { color: green; }
10
+ </style>
11
+ </head>
12
+ <body>
13
+ <div id="app">Loading...</div>
14
+ <script>
15
+ console.log('[SPA] Starting render');
16
+ console.warn('[SPA] This is a warning');
17
+ console.error('[SPA] This is an error');
18
+ setTimeout(() => {
19
+ document.getElementById('app').innerHTML = '<h1 class="loaded">SPA Content Loaded</h1><p>Rendered by JavaScript</p>';
20
+ console.log('[SPA] Render complete');
21
+ }, 500);
22
+ </script>
23
+ </body>
24
+ </html>
@@ -0,0 +1,17 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>Test Page - Element States</title>
6
+ </head>
7
+ <body>
8
+ <h1>Element States Test</h1>
9
+ <input type="text" id="enabled-input" value="enabled" />
10
+ <input type="text" id="disabled-input" value="disabled" disabled />
11
+ <input type="checkbox" id="checked-box" checked />
12
+ <input type="checkbox" id="unchecked-box" />
13
+ <div id="visible-div">Visible</div>
14
+ <div id="hidden-div" style="display: none;">Hidden</div>
15
+ <input type="text" id="readonly-input" readonly value="readonly" />
16
+ </body>
17
+ </html>
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>Test Page - Upload</title>
6
+ </head>
7
+ <body>
8
+ <h1>Upload Test</h1>
9
+ <input type="file" id="file-input" />
10
+ <input type="file" id="multi-input" multiple />
11
+ <p id="upload-result"></p>
12
+ <script>
13
+ document.getElementById('file-input').addEventListener('change', function(e) {
14
+ const files = e.target.files;
15
+ const names = Array.from(files).map(f => f.name).join(', ');
16
+ document.getElementById('upload-result').textContent = 'Uploaded: ' + names;
17
+ });
18
+ document.getElementById('multi-input').addEventListener('change', function(e) {
19
+ const files = e.target.files;
20
+ const names = Array.from(files).map(f => f.name).join(', ');
21
+ document.getElementById('upload-result').textContent = 'Multi: ' + names;
22
+ });
23
+ </script>
24
+ </body>
25
+ </html>
@@ -0,0 +1,125 @@
1
+ /**
2
+ * Tests for bin/gstack-config bash script.
3
+ *
4
+ * Uses Bun.spawnSync to invoke the script with temp dirs and
5
+ * GSTACK_STATE_DIR env override for full isolation.
6
+ */
7
+
8
+ import { describe, test, expect, beforeEach, afterEach } from 'bun:test';
9
+ import { mkdtempSync, writeFileSync, rmSync, readFileSync, existsSync } from 'fs';
10
+ import { join } from 'path';
11
+ import { tmpdir } from 'os';
12
+
13
+ const SCRIPT = join(import.meta.dir, '..', '..', 'bin', 'gstack-config');
14
+
15
+ let stateDir: string;
16
+
17
+ function run(args: string[] = [], extraEnv: Record<string, string> = {}) {
18
+ const result = Bun.spawnSync(['bash', SCRIPT, ...args], {
19
+ env: {
20
+ ...process.env,
21
+ GSTACK_STATE_DIR: stateDir,
22
+ ...extraEnv,
23
+ },
24
+ stdout: 'pipe',
25
+ stderr: 'pipe',
26
+ });
27
+ return {
28
+ exitCode: result.exitCode,
29
+ stdout: result.stdout.toString().trim(),
30
+ stderr: result.stderr.toString().trim(),
31
+ };
32
+ }
33
+
34
+ beforeEach(() => {
35
+ stateDir = mkdtempSync(join(tmpdir(), 'gstack-config-test-'));
36
+ });
37
+
38
+ afterEach(() => {
39
+ rmSync(stateDir, { recursive: true, force: true });
40
+ });
41
+
42
+ describe('gstack-config', () => {
43
+ // ─── get ──────────────────────────────────────────────────
44
+ test('get on missing file returns empty, exit 0', () => {
45
+ const { exitCode, stdout } = run(['get', 'auto_upgrade']);
46
+ expect(exitCode).toBe(0);
47
+ expect(stdout).toBe('');
48
+ });
49
+
50
+ test('get existing key returns value', () => {
51
+ writeFileSync(join(stateDir, 'config.yaml'), 'auto_upgrade: true\n');
52
+ const { exitCode, stdout } = run(['get', 'auto_upgrade']);
53
+ expect(exitCode).toBe(0);
54
+ expect(stdout).toBe('true');
55
+ });
56
+
57
+ test('get missing key returns empty', () => {
58
+ writeFileSync(join(stateDir, 'config.yaml'), 'auto_upgrade: true\n');
59
+ const { exitCode, stdout } = run(['get', 'nonexistent']);
60
+ expect(exitCode).toBe(0);
61
+ expect(stdout).toBe('');
62
+ });
63
+
64
+ test('get returns last value when key appears multiple times', () => {
65
+ writeFileSync(join(stateDir, 'config.yaml'), 'foo: bar\nfoo: baz\n');
66
+ const { exitCode, stdout } = run(['get', 'foo']);
67
+ expect(exitCode).toBe(0);
68
+ expect(stdout).toBe('baz');
69
+ });
70
+
71
+ // ─── set ──────────────────────────────────────────────────
72
+ test('set creates file and writes key on missing file', () => {
73
+ const { exitCode } = run(['set', 'auto_upgrade', 'true']);
74
+ expect(exitCode).toBe(0);
75
+ const content = readFileSync(join(stateDir, 'config.yaml'), 'utf-8');
76
+ expect(content).toContain('auto_upgrade: true');
77
+ });
78
+
79
+ test('set appends new key to existing file', () => {
80
+ writeFileSync(join(stateDir, 'config.yaml'), 'foo: bar\n');
81
+ const { exitCode } = run(['set', 'auto_upgrade', 'true']);
82
+ expect(exitCode).toBe(0);
83
+ const content = readFileSync(join(stateDir, 'config.yaml'), 'utf-8');
84
+ expect(content).toContain('foo: bar');
85
+ expect(content).toContain('auto_upgrade: true');
86
+ });
87
+
88
+ test('set replaces existing key in-place', () => {
89
+ writeFileSync(join(stateDir, 'config.yaml'), 'auto_upgrade: false\n');
90
+ const { exitCode } = run(['set', 'auto_upgrade', 'true']);
91
+ expect(exitCode).toBe(0);
92
+ const content = readFileSync(join(stateDir, 'config.yaml'), 'utf-8');
93
+ expect(content).toContain('auto_upgrade: true');
94
+ expect(content).not.toContain('auto_upgrade: false');
95
+ });
96
+
97
+ test('set creates state dir if missing', () => {
98
+ const nestedDir = join(stateDir, 'nested', 'dir');
99
+ const { exitCode } = run(['set', 'foo', 'bar'], { GSTACK_STATE_DIR: nestedDir });
100
+ expect(exitCode).toBe(0);
101
+ expect(existsSync(join(nestedDir, 'config.yaml'))).toBe(true);
102
+ });
103
+
104
+ // ─── list ─────────────────────────────────────────────────
105
+ test('list shows all keys', () => {
106
+ writeFileSync(join(stateDir, 'config.yaml'), 'auto_upgrade: true\nupdate_check: false\n');
107
+ const { exitCode, stdout } = run(['list']);
108
+ expect(exitCode).toBe(0);
109
+ expect(stdout).toContain('auto_upgrade: true');
110
+ expect(stdout).toContain('update_check: false');
111
+ });
112
+
113
+ test('list on missing file returns empty, exit 0', () => {
114
+ const { exitCode, stdout } = run(['list']);
115
+ expect(exitCode).toBe(0);
116
+ expect(stdout).toBe('');
117
+ });
118
+
119
+ // ─── usage ────────────────────────────────────────────────
120
+ test('no args shows usage and exits 1', () => {
121
+ const { exitCode, stdout } = run([]);
122
+ expect(exitCode).toBe(1);
123
+ expect(stdout).toContain('Usage');
124
+ });
125
+ });