@bastani/atomic 0.9.20-alpha.4 → 0.9.20-alpha.5

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 (245) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/builtin/intercom/CHANGELOG.md +6 -0
  3. package/dist/builtin/intercom/package.json +1 -1
  4. package/dist/builtin/intercom/skills/intercom/SKILL.md +32 -1
  5. package/dist/builtin/mcp/package.json +1 -1
  6. package/dist/builtin/subagents/CHANGELOG.md +12 -0
  7. package/dist/builtin/subagents/README.md +2 -0
  8. package/dist/builtin/subagents/agents/code-simplifier.md +1 -1
  9. package/dist/builtin/subagents/agents/codebase-analyzer.md +1 -1
  10. package/dist/builtin/subagents/agents/codebase-online-researcher.md +3 -3
  11. package/dist/builtin/subagents/agents/debugger.md +7 -5
  12. package/dist/builtin/subagents/agents/worker.md +4 -2
  13. package/dist/builtin/subagents/package.json +1 -1
  14. package/dist/builtin/subagents/skills/agent-browser/SKILL.md +56 -0
  15. package/dist/builtin/subagents/skills/subagent/SKILL.md +32 -8
  16. package/dist/builtin/subagents/src/extension/index.bundle.mjs +7 -4
  17. package/dist/builtin/web-access/package.json +1 -1
  18. package/dist/builtin/workflows/CHANGELOG.md +30 -0
  19. package/dist/builtin/workflows/README.md +4 -2
  20. package/dist/builtin/workflows/builtin/adversarial-verification.js +3 -3
  21. package/dist/builtin/workflows/builtin/{chunk-n8g2da69.js → chunk-00ywx588.js} +1 -1
  22. package/dist/builtin/workflows/builtin/{chunk-d1xqh1rd.js → chunk-55p5dxjk.js} +1 -1
  23. package/dist/builtin/workflows/builtin/{chunk-1dydq7w3.js → chunk-7f381xnq.js} +62 -24
  24. package/dist/builtin/workflows/builtin/{chunk-k18g9me8.js → chunk-7h7s5xdj.js} +1 -1
  25. package/dist/builtin/workflows/builtin/{chunk-n4yxrsm9.js → chunk-e83tc6nr.js} +1 -1
  26. package/dist/builtin/workflows/builtin/{chunk-sn5mchnx.js → chunk-evfb0312.js} +1 -1
  27. package/dist/builtin/workflows/builtin/{chunk-scgprmdj.js → chunk-ne6vh5ct.js} +1 -1
  28. package/dist/builtin/workflows/builtin/{chunk-119kxb28.js → chunk-pfm1kgqz.js} +62 -43
  29. package/dist/builtin/workflows/builtin/{chunk-hnbbb5r0.js → chunk-tdqvdrg1.js} +4 -4
  30. package/dist/builtin/workflows/builtin/{chunk-kf5xpbkz.js → chunk-tvcydq13.js} +1 -1
  31. package/dist/builtin/workflows/builtin/{chunk-9y0f90rd.js → chunk-x2nftpgj.js} +1 -1
  32. package/dist/builtin/workflows/builtin/{chunk-vt9zgr9d.js → chunk-zj5162bh.js} +4 -4
  33. package/dist/builtin/workflows/builtin/classify-and-act.js +3 -3
  34. package/dist/builtin/workflows/builtin/fan-out-and-synthesize.js +3 -3
  35. package/dist/builtin/workflows/builtin/generate-and-filter.js +3 -3
  36. package/dist/builtin/workflows/builtin/goal.js +4 -4
  37. package/dist/builtin/workflows/builtin/index.d.ts +1 -1
  38. package/dist/builtin/workflows/builtin/index.js +12 -12
  39. package/dist/builtin/workflows/builtin/loop-until-done.js +3 -3
  40. package/dist/builtin/workflows/builtin/open-claude-design.d.ts +1 -1
  41. package/dist/builtin/workflows/builtin/open-claude-design.js +3 -3
  42. package/dist/builtin/workflows/builtin/ralph.js +4 -4
  43. package/dist/builtin/workflows/builtin/steering-context.js +1 -1
  44. package/dist/builtin/workflows/builtin/tournament.js +3 -3
  45. package/dist/builtin/workflows/package.json +1 -1
  46. package/dist/builtin/workflows/skills/impeccable/SKILL.md +18 -11
  47. package/dist/builtin/workflows/skills/impeccable/reference/adapt.md +1 -1
  48. package/dist/builtin/workflows/skills/impeccable/reference/adapt.native.md +1 -1
  49. package/dist/builtin/workflows/skills/impeccable/reference/animate.md +1 -1
  50. package/dist/builtin/workflows/skills/impeccable/reference/audit.md +5 -5
  51. package/dist/builtin/workflows/skills/impeccable/reference/audit.native.md +6 -6
  52. package/dist/builtin/workflows/skills/impeccable/reference/bolder.md +2 -2
  53. package/dist/builtin/workflows/skills/impeccable/reference/clarify.md +1 -1
  54. package/dist/builtin/workflows/skills/impeccable/reference/colorize.md +1 -1
  55. package/dist/builtin/workflows/skills/impeccable/reference/craft-floor.md +0 -6
  56. package/dist/builtin/workflows/skills/impeccable/reference/critique.md +19 -41
  57. package/dist/builtin/workflows/skills/impeccable/reference/degraded/asset-producer.md +11 -65
  58. package/dist/builtin/workflows/skills/impeccable/reference/degraded/documenter.md +3 -3
  59. package/dist/builtin/workflows/skills/impeccable/reference/degraded/finish-reviewer.md +4 -4
  60. package/dist/builtin/workflows/skills/impeccable/reference/degraded/manual-edit-applier.md +1 -1
  61. package/dist/builtin/workflows/skills/impeccable/reference/delight.md +1 -1
  62. package/dist/builtin/workflows/skills/impeccable/reference/distill.md +2 -2
  63. package/dist/builtin/workflows/skills/impeccable/reference/doctor.md +4 -4
  64. package/dist/builtin/workflows/skills/impeccable/reference/document.md +4 -4
  65. package/dist/builtin/workflows/skills/impeccable/reference/extract.md +1 -1
  66. package/dist/builtin/workflows/skills/impeccable/reference/harden.md +1 -1
  67. package/dist/builtin/workflows/skills/impeccable/reference/hooks.md +21 -21
  68. package/dist/builtin/workflows/skills/impeccable/reference/init.md +8 -8
  69. package/dist/builtin/workflows/skills/impeccable/reference/layout.md +2 -2
  70. package/dist/builtin/workflows/skills/impeccable/reference/live-setup.md +10 -8
  71. package/dist/builtin/workflows/skills/impeccable/reference/live.md +39 -38
  72. package/dist/builtin/workflows/skills/impeccable/reference/new-work.md +48 -21
  73. package/dist/builtin/workflows/skills/impeccable/reference/onboard.md +1 -1
  74. package/dist/builtin/workflows/skills/impeccable/reference/optimize.md +1 -1
  75. package/dist/builtin/workflows/skills/impeccable/reference/overdrive.md +1 -1
  76. package/dist/builtin/workflows/skills/impeccable/reference/polish.md +11 -3
  77. package/dist/builtin/workflows/skills/impeccable/reference/quieter.md +2 -2
  78. package/dist/builtin/workflows/skills/impeccable/reference/routing.md +13 -7
  79. package/dist/builtin/workflows/skills/impeccable/reference/typeset.md +2 -2
  80. package/dist/builtin/workflows/skills/impeccable/reference/visualize.md +13 -19
  81. package/dist/builtin/workflows/skills/impeccable/scripts/VERSION +1 -0
  82. package/dist/builtin/workflows/skills/impeccable/scripts/data/font-index-failures.json +121 -0
  83. package/dist/builtin/workflows/skills/impeccable/scripts/data/font-index.json +1 -0
  84. package/dist/builtin/workflows/skills/impeccable/scripts/impeccable +212 -0
  85. package/dist/builtin/workflows/skills/impeccable/scripts/impeccable.cmd +218 -0
  86. package/dist/builtin/workflows/skills/impeccable/scripts/live-browser-dom.js +21 -0
  87. package/dist/builtin/workflows/skills/impeccable/scripts/live-browser-ignores.js +242 -0
  88. package/dist/builtin/workflows/skills/impeccable/scripts/live-browser-session.js +25 -4
  89. package/dist/builtin/workflows/skills/impeccable/scripts/live-browser.js +666 -197
  90. package/dist/builtin/workflows/skills/research-codebase/SKILL.md +1 -1
  91. package/dist/builtin/workflows/src/extension/index.bundle.mjs +156 -84
  92. package/dist/builtin/workflows/src/index.js +62 -24
  93. package/dist/core/execution-model-router.d.ts +2 -0
  94. package/dist/core/execution-model-router.d.ts.map +1 -1
  95. package/dist/core/execution-model-router.js +30 -4
  96. package/dist/core/execution-model-router.js.map +1 -1
  97. package/dist/core/model-routing-task.d.ts +1 -1
  98. package/dist/core/model-routing-task.d.ts.map +1 -1
  99. package/dist/core/model-routing-task.js +4 -3
  100. package/dist/core/model-routing-task.js.map +1 -1
  101. package/dist/core/system-prompt.d.ts.map +1 -1
  102. package/dist/core/system-prompt.js +2 -1
  103. package/dist/core/system-prompt.js.map +1 -1
  104. package/dist/index.d.ts +1 -1
  105. package/dist/index.d.ts.map +1 -1
  106. package/dist/index.js +1 -1
  107. package/dist/index.js.map +1 -1
  108. package/dist/modes/interactive/components/chat-message-renderer.d.ts.map +1 -1
  109. package/dist/modes/interactive/components/chat-message-renderer.js +4 -0
  110. package/dist/modes/interactive/components/chat-message-renderer.js.map +1 -1
  111. package/docs/computer-use.md +22 -21
  112. package/docs/getting-started/first-session.md +2 -2
  113. package/docs/getting-started/installation.md +6 -2
  114. package/docs/intercom.md +6 -1
  115. package/docs/models/model-selection.md +11 -7
  116. package/docs/quickstart.md +1 -1
  117. package/docs/skills.md +1 -1
  118. package/docs/subagents/reference.md +2 -2
  119. package/docs/subagents.md +7 -1
  120. package/docs/usage.md +2 -0
  121. package/docs/windows.md +1 -1
  122. package/docs/workflows/api-reference.md +3 -4
  123. package/docs/workflows/builtins.md +2 -2
  124. package/docs/workflows/operations.md +1 -1
  125. package/docs/workflows/reliable-design.md +12 -1
  126. package/docs/workflows/verification.md +8 -8
  127. package/npm-shrinkwrap.json +32 -32
  128. package/package.json +3 -3
  129. package/dist/builtin/subagents/skills/playwright-cli/SKILL.md +0 -420
  130. package/dist/builtin/subagents/skills/playwright-cli/references/element-attributes.md +0 -23
  131. package/dist/builtin/subagents/skills/playwright-cli/references/playwright-tests.md +0 -39
  132. package/dist/builtin/subagents/skills/playwright-cli/references/request-mocking.md +0 -87
  133. package/dist/builtin/subagents/skills/playwright-cli/references/running-code.md +0 -241
  134. package/dist/builtin/subagents/skills/playwright-cli/references/session-management.md +0 -225
  135. package/dist/builtin/subagents/skills/playwright-cli/references/storage-state.md +0 -275
  136. package/dist/builtin/subagents/skills/playwright-cli/references/test-generation.md +0 -433
  137. package/dist/builtin/subagents/skills/playwright-cli/references/tracing.md +0 -139
  138. package/dist/builtin/subagents/skills/playwright-cli/references/video-recording.md +0 -143
  139. package/dist/builtin/workflows/skills/impeccable/agents/impeccable_asset_producer.toml +0 -94
  140. package/dist/builtin/workflows/skills/impeccable/agents/impeccable_documenter.toml +0 -27
  141. package/dist/builtin/workflows/skills/impeccable/agents/impeccable_finish_reviewer.toml +0 -41
  142. package/dist/builtin/workflows/skills/impeccable/agents/impeccable_manual_edit_applier.toml +0 -95
  143. package/dist/builtin/workflows/skills/impeccable/agents/openai.yaml +0 -4
  144. package/dist/builtin/workflows/skills/impeccable/scripts/concept-seed.mjs +0 -695
  145. package/dist/builtin/workflows/skills/impeccable/scripts/context-signals.mjs +0 -325
  146. package/dist/builtin/workflows/skills/impeccable/scripts/context.mjs +0 -1503
  147. package/dist/builtin/workflows/skills/impeccable/scripts/critique-storage.mjs +0 -222
  148. package/dist/builtin/workflows/skills/impeccable/scripts/detect-csp.mjs +0 -198
  149. package/dist/builtin/workflows/skills/impeccable/scripts/detect.mjs +0 -21
  150. package/dist/builtin/workflows/skills/impeccable/scripts/detector/browser/injected/index.mjs +0 -2073
  151. package/dist/builtin/workflows/skills/impeccable/scripts/detector/cli/main.mjs +0 -432
  152. package/dist/builtin/workflows/skills/impeccable/scripts/detector/design-system.mjs +0 -1121
  153. package/dist/builtin/workflows/skills/impeccable/scripts/detector/detect-antipatterns-browser.js +0 -8746
  154. package/dist/builtin/workflows/skills/impeccable/scripts/detector/detect-antipatterns.mjs +0 -51
  155. package/dist/builtin/workflows/skills/impeccable/scripts/detector/engines/browser/detect-url.mjs +0 -376
  156. package/dist/builtin/workflows/skills/impeccable/scripts/detector/engines/regex/detect-text.mjs +0 -1168
  157. package/dist/builtin/workflows/skills/impeccable/scripts/detector/engines/static-html/css-cascade.mjs +0 -1192
  158. package/dist/builtin/workflows/skills/impeccable/scripts/detector/engines/static-html/detect-html.mjs +0 -290
  159. package/dist/builtin/workflows/skills/impeccable/scripts/detector/engines/visual/screenshot-contrast.mjs +0 -189
  160. package/dist/builtin/workflows/skills/impeccable/scripts/detector/findings.mjs +0 -18
  161. package/dist/builtin/workflows/skills/impeccable/scripts/detector/node/file-system.mjs +0 -213
  162. package/dist/builtin/workflows/skills/impeccable/scripts/detector/profile/profiler.mjs +0 -166
  163. package/dist/builtin/workflows/skills/impeccable/scripts/detector/registry/antipatterns.mjs +0 -617
  164. package/dist/builtin/workflows/skills/impeccable/scripts/detector/rules/checks.mjs +0 -5534
  165. package/dist/builtin/workflows/skills/impeccable/scripts/detector/shared/color.mjs +0 -588
  166. package/dist/builtin/workflows/skills/impeccable/scripts/detector/shared/constants.mjs +0 -112
  167. package/dist/builtin/workflows/skills/impeccable/scripts/detector/shared/fonts.mjs +0 -30
  168. package/dist/builtin/workflows/skills/impeccable/scripts/detector/shared/inline-ignores.mjs +0 -148
  169. package/dist/builtin/workflows/skills/impeccable/scripts/detector/shared/page.mjs +0 -35
  170. package/dist/builtin/workflows/skills/impeccable/scripts/doctor.mjs +0 -338
  171. package/dist/builtin/workflows/skills/impeccable/scripts/embed-prompt.mjs +0 -270
  172. package/dist/builtin/workflows/skills/impeccable/scripts/generate-image.mjs +0 -277
  173. package/dist/builtin/workflows/skills/impeccable/scripts/hook-admin.mjs +0 -783
  174. package/dist/builtin/workflows/skills/impeccable/scripts/hook-lib.mjs +0 -2305
  175. package/dist/builtin/workflows/skills/impeccable/scripts/hook.mjs +0 -78
  176. package/dist/builtin/workflows/skills/impeccable/scripts/lib/artifact-schema.mjs +0 -93
  177. package/dist/builtin/workflows/skills/impeccable/scripts/lib/composition-catalog.mjs +0 -200
  178. package/dist/builtin/workflows/skills/impeccable/scripts/lib/concept-catalog.mjs +0 -395
  179. package/dist/builtin/workflows/skills/impeccable/scripts/lib/design-parser.mjs +0 -925
  180. package/dist/builtin/workflows/skills/impeccable/scripts/lib/impeccable-config.mjs +0 -640
  181. package/dist/builtin/workflows/skills/impeccable/scripts/lib/impeccable-paths.mjs +0 -137
  182. package/dist/builtin/workflows/skills/impeccable/scripts/lib/is-generated.mjs +0 -72
  183. package/dist/builtin/workflows/skills/impeccable/scripts/lib/open-system-browser.mjs +0 -57
  184. package/dist/builtin/workflows/skills/impeccable/scripts/lib/provider.mjs +0 -5
  185. package/dist/builtin/workflows/skills/impeccable/scripts/lib/roll-selection.mjs +0 -369
  186. package/dist/builtin/workflows/skills/impeccable/scripts/lib/staleness-deep.mjs +0 -483
  187. package/dist/builtin/workflows/skills/impeccable/scripts/lib/staleness-notice.mjs +0 -169
  188. package/dist/builtin/workflows/skills/impeccable/scripts/lib/staleness.mjs +0 -528
  189. package/dist/builtin/workflows/skills/impeccable/scripts/lib/surface-briefs.mjs +0 -151
  190. package/dist/builtin/workflows/skills/impeccable/scripts/lib/target-args.mjs +0 -42
  191. package/dist/builtin/workflows/skills/impeccable/scripts/lib/target-slug.mjs +0 -33
  192. package/dist/builtin/workflows/skills/impeccable/scripts/lib/template-extensions.mjs +0 -146
  193. package/dist/builtin/workflows/skills/impeccable/scripts/live/accept-css.mjs +0 -617
  194. package/dist/builtin/workflows/skills/impeccable/scripts/live/accept-verify.mjs +0 -71
  195. package/dist/builtin/workflows/skills/impeccable/scripts/live/browser-script-parts.mjs +0 -77
  196. package/dist/builtin/workflows/skills/impeccable/scripts/live/completion.mjs +0 -28
  197. package/dist/builtin/workflows/skills/impeccable/scripts/live/event-validation.mjs +0 -199
  198. package/dist/builtin/workflows/skills/impeccable/scripts/live/frameworks/astro.mjs +0 -47
  199. package/dist/builtin/workflows/skills/impeccable/scripts/live/frameworks/detect-utils.mjs +0 -157
  200. package/dist/builtin/workflows/skills/impeccable/scripts/live/frameworks/index.mjs +0 -143
  201. package/dist/builtin/workflows/skills/impeccable/scripts/live/frameworks/journal.mjs +0 -205
  202. package/dist/builtin/workflows/skills/impeccable/scripts/live/frameworks/nextjs.mjs +0 -49
  203. package/dist/builtin/workflows/skills/impeccable/scripts/live/frameworks/nuxt.mjs +0 -170
  204. package/dist/builtin/workflows/skills/impeccable/scripts/live/frameworks/script-src.mjs +0 -26
  205. package/dist/builtin/workflows/skills/impeccable/scripts/live/frameworks/static-html.mjs +0 -26
  206. package/dist/builtin/workflows/skills/impeccable/scripts/live/frameworks/sveltekit.mjs +0 -71
  207. package/dist/builtin/workflows/skills/impeccable/scripts/live/frameworks/tag-strategy.mjs +0 -247
  208. package/dist/builtin/workflows/skills/impeccable/scripts/live/frameworks/tanstack-start.mjs +0 -70
  209. package/dist/builtin/workflows/skills/impeccable/scripts/live/frameworks/vite-generic.mjs +0 -42
  210. package/dist/builtin/workflows/skills/impeccable/scripts/live/generation-preflight.mjs +0 -149
  211. package/dist/builtin/workflows/skills/impeccable/scripts/live/insert-ui.mjs +0 -458
  212. package/dist/builtin/workflows/skills/impeccable/scripts/live/instructions.mjs +0 -169
  213. package/dist/builtin/workflows/skills/impeccable/scripts/live/manual-apply.mjs +0 -939
  214. package/dist/builtin/workflows/skills/impeccable/scripts/live/manual-edit-routes.mjs +0 -357
  215. package/dist/builtin/workflows/skills/impeccable/scripts/live/manual-edits-buffer.mjs +0 -152
  216. package/dist/builtin/workflows/skills/impeccable/scripts/live/poll-lanes.mjs +0 -14
  217. package/dist/builtin/workflows/skills/impeccable/scripts/live/roots.mjs +0 -670
  218. package/dist/builtin/workflows/skills/impeccable/scripts/live/session-store.mjs +0 -563
  219. package/dist/builtin/workflows/skills/impeccable/scripts/live/source-lock.mjs +0 -105
  220. package/dist/builtin/workflows/skills/impeccable/scripts/live/source-search.mjs +0 -105
  221. package/dist/builtin/workflows/skills/impeccable/scripts/live/svelte-ast.mjs +0 -969
  222. package/dist/builtin/workflows/skills/impeccable/scripts/live/svelte-component.mjs +0 -1401
  223. package/dist/builtin/workflows/skills/impeccable/scripts/live/sveltekit-adapter.mjs +0 -314
  224. package/dist/builtin/workflows/skills/impeccable/scripts/live/tanstack-adapter.mjs +0 -280
  225. package/dist/builtin/workflows/skills/impeccable/scripts/live/ui-surfaces.mjs +0 -75
  226. package/dist/builtin/workflows/skills/impeccable/scripts/live/vocabulary.mjs +0 -171
  227. package/dist/builtin/workflows/skills/impeccable/scripts/live-accept.mjs +0 -961
  228. package/dist/builtin/workflows/skills/impeccable/scripts/live-commit-manual-edits.mjs +0 -1244
  229. package/dist/builtin/workflows/skills/impeccable/scripts/live-complete.mjs +0 -107
  230. package/dist/builtin/workflows/skills/impeccable/scripts/live-copy-edit-agent.mjs +0 -800
  231. package/dist/builtin/workflows/skills/impeccable/scripts/live-discard-manual-edits.mjs +0 -51
  232. package/dist/builtin/workflows/skills/impeccable/scripts/live-inject.mjs +0 -515
  233. package/dist/builtin/workflows/skills/impeccable/scripts/live-insert.mjs +0 -292
  234. package/dist/builtin/workflows/skills/impeccable/scripts/live-manual-edit-evidence.mjs +0 -371
  235. package/dist/builtin/workflows/skills/impeccable/scripts/live-poll.mjs +0 -427
  236. package/dist/builtin/workflows/skills/impeccable/scripts/live-resume.mjs +0 -123
  237. package/dist/builtin/workflows/skills/impeccable/scripts/live-server.mjs +0 -1675
  238. package/dist/builtin/workflows/skills/impeccable/scripts/live-status.mjs +0 -71
  239. package/dist/builtin/workflows/skills/impeccable/scripts/live-target.mjs +0 -30
  240. package/dist/builtin/workflows/skills/impeccable/scripts/live-wrap.mjs +0 -927
  241. package/dist/builtin/workflows/skills/impeccable/scripts/live.mjs +0 -365
  242. package/dist/builtin/workflows/skills/impeccable/scripts/palette.mjs +0 -628
  243. package/dist/builtin/workflows/skills/impeccable/scripts/pin.mjs +0 -224
  244. package/dist/builtin/workflows/skills/impeccable/scripts/serve-question.mjs +0 -1540
  245. package/dist/builtin/workflows/skills/impeccable/scripts/surface-brief.mjs +0 -74
@@ -0,0 +1,212 @@
1
+ #!/bin/sh
2
+ # Impeccable launcher. Runs the platform binary shipped next to this script:
3
+ # <this dir>/bin/<os>-<arch>/impeccable
4
+ # Order: $IMPECCABLE_BIN, the sibling binary, ~/.impeccable/bin/impeccable,
5
+ # the version-pinned cache, then `impeccable` on PATH. Never needs Node.
6
+ # The unversioned home binary and the PATH candidate are validated with the
7
+ # engine-probe handshake first: the retired 3.x npm CLI also installed a bin
8
+ # named `impeccable`, and exec'ing it would fail every verb with
9
+ # "Unknown command". Trusted candidates (IMPECCABLE_BIN, the sibling binary,
10
+ # the version-pinned cache) are exec'd without a probe: hooks run them on
11
+ # every edit and must stay fast.
12
+ set -eu
13
+
14
+ # True when the candidate answers the engine handshake (prints
15
+ # "impeccable-engine <version>", exit 0). Quiet and fast (<100ms).
16
+ # IMPECCABLE_LAUNCHER_PROBE marks the child as a probe: a copy of this
17
+ # launcher reached recursively (e.g. symlinked onto PATH as `impeccable`)
18
+ # then skips its own probes and refuses to download, so probing stays cheap
19
+ # and can never loop.
20
+ probe_ok() {
21
+ case "$(IMPECCABLE_LAUNCHER_PROBE=1 "$1" engine-probe 2>/dev/null || true)" in
22
+ impeccable-engine*) return 0 ;;
23
+ esac
24
+ return 1
25
+ }
26
+ probing=${IMPECCABLE_LAUNCHER_PROBE:-}
27
+
28
+ dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
29
+
30
+ # What the binary needs to know about its home: the skill directory (for
31
+ # reference/*.md and command-metadata.json) and how to name itself in the
32
+ # commands it prints. Exported BEFORE any exec below, including the
33
+ # IMPECCABLE_BIN override: an engine binary reached with no IMPECCABLE_SKILL_DIR
34
+ # cannot find reference/*.md (so native platform refs never inline) or read its
35
+ # own version (so UPDATE_AVAILABLE never fires). Setting it here covers every
36
+ # candidate the launcher can exec.
37
+ : "${IMPECCABLE_SKILL_DIR:=$(CDPATH= cd -- "$dir/.." && pwd)}"
38
+ : "${IMPECCABLE_SELF:=$0}"
39
+ export IMPECCABLE_SKILL_DIR IMPECCABLE_SELF
40
+
41
+ # Atomic ships this skill inside its own release and cannot self-update, so the
42
+ # engine's daily update check and its anonymous concept-roll ping stay off.
43
+ : "${IMPECCABLE_NO_TELEMETRY:=1}"
44
+ : "${IMPECCABLE_NO_UPDATE_CHECK:=1}"
45
+ export IMPECCABLE_NO_TELEMETRY IMPECCABLE_NO_UPDATE_CHECK
46
+
47
+ if [ -n "${IMPECCABLE_BIN:-}" ] && [ -x "${IMPECCABLE_BIN}" ]; then
48
+ exec "${IMPECCABLE_BIN}" "$@"
49
+ fi
50
+
51
+ case "$(uname -s 2>/dev/null || echo unknown)" in
52
+ Darwin) os=darwin ;;
53
+ Linux) os=linux ;;
54
+ MINGW*|MSYS*|CYGWIN*|Windows_NT) os=windows ;;
55
+ *) os=unknown ;;
56
+ esac
57
+ case "$(uname -m 2>/dev/null || echo unknown)" in
58
+ arm64|aarch64) arch=arm64 ;;
59
+ x86_64|amd64) arch=x64 ;;
60
+ *) arch=unknown ;;
61
+ esac
62
+
63
+ bin="$dir/bin/$os-$arch/impeccable"
64
+ [ "$os" = windows ] && bin="$bin.exe"
65
+
66
+ if [ -x "$bin" ]; then
67
+ exec "$bin" "$@"
68
+ fi
69
+ if [ -f "$bin" ]; then
70
+ # Lost the executable bit in transit (zip extraction, some copiers).
71
+ chmod +x "$bin" 2>/dev/null && exec "$bin" "$@"
72
+ fi
73
+ # On Windows (an MSYS/Git Bash shell) the cached names carry .exe so this
74
+ # launcher and impeccable.cmd share one cache.
75
+ exe=""
76
+ [ "$os" = windows ] && exe=".exe"
77
+ home_bin="${HOME:-/nonexistent}/.impeccable/bin/impeccable$exe"
78
+ if [ -z "$probing" ] && [ -x "$home_bin" ] && probe_ok "$home_bin"; then
79
+ exec "$home_bin" "$@"
80
+ fi
81
+ # Version-pinned user cache, filled by the download below or by `impeccable update`.
82
+ version=""
83
+ [ -f "$dir/VERSION" ] && version=$(tr -d '[:space:]' < "$dir/VERSION")
84
+ cache_root="${IMPECCABLE_HOME:-${HOME:-/nonexistent}/.impeccable}"
85
+ cached="$cache_root/bin/$version/impeccable$exe"
86
+ if [ -n "$version" ] && [ -x "$cached" ]; then
87
+ exec "$cached" "$@"
88
+ fi
89
+ if [ -z "$probing" ] && command -v impeccable >/dev/null 2>&1 && probe_ok impeccable; then
90
+ exec impeccable "$@"
91
+ fi
92
+
93
+ # Last resort: fetch this version's binary for the current platform from the
94
+ # public release channel into the user cache. Needs network; sandboxes without
95
+ # egress preinstall the binary on PATH instead.
96
+ setup_help() {
97
+ echo "Engine $version setup needs network access and write permission to $cache_root/bin/$version." >&2
98
+ echo "Run this launcher ($0) with engine-probe in a terminal that has those permissions, then retry the original command." >&2
99
+ echo "Alternatively, set IMPECCABLE_HOME to a writable cache location, or IMPECCABLE_BIN to a preinstalled engine binary." >&2
100
+ }
101
+ fetch_url() {
102
+ if command -v curl >/dev/null 2>&1; then
103
+ curl -fsSL --retry 2 -o "$tmp" "$1" 2>/dev/null
104
+ elif command -v wget >/dev/null 2>&1; then
105
+ wget -q -O "$tmp" "$1" 2>/dev/null
106
+ else
107
+ return 1
108
+ fi
109
+ }
110
+ check_download() {
111
+ download_file=${1:-$tmp}
112
+ if [ ! -f "$download_file" ]; then
113
+ rm -f "$tmp.sha256"
114
+ echo "impeccable: download completed but the file was removed before execution: $url; check your antivirus quarantine or logs. Refusing to continue; do not disable protection." >&2
115
+ exit 127
116
+ fi
117
+ if [ ! -s "$download_file" ]; then
118
+ rm -f "$download_file" "$tmp.sha256"
119
+ echo "impeccable: downloaded file is empty: $url; refusing the unverified download" >&2
120
+ exit 127
121
+ fi
122
+ }
123
+ if [ -n "$probing" ]; then
124
+ # Inside another launcher's probe: no download, fail fast and quiet.
125
+ exit 127
126
+ fi
127
+ if [ -n "$version" ] && [ "$os" != unknown ] && [ "$arch" != unknown ]; then
128
+ base="${IMPECCABLE_DOWNLOAD_BASE:-https://github.com/pbakaus/impeccable/releases/download}"
129
+ asset="impeccable-$os-$arch"
130
+ [ "$os" = windows ] && asset="$asset.exe"
131
+ url="$base/engine-v$version/$asset"
132
+ tmp="$cache_root/bin/$version/.impeccable.part.$$"
133
+ if ! mkdir -p "$cache_root/bin/$version" 2>/dev/null; then
134
+ echo "impeccable: engine $version is not installed; cannot create cache directory: $cache_root/bin/$version" >&2
135
+ setup_help
136
+ exit 127
137
+ fi
138
+ # Check the actual staging file, not just directory existence: a cache from
139
+ # an earlier run can be readable but no longer writable inside a sandbox.
140
+ if ! (umask 077; : > "$tmp") 2>/dev/null; then
141
+ echo "impeccable: engine $version is not installed; cannot write to cache directory: $cache_root/bin/$version" >&2
142
+ setup_help
143
+ exit 127
144
+ fi
145
+ fetched=0
146
+ if fetch_url "$url"; then
147
+ fetched=1
148
+ elif [ "$os" = windows ] && [ "$arch" = arm64 ]; then
149
+ # Windows on ARM runs x64 binaries; fall back when no arm64 asset exists.
150
+ url="$base/engine-v$version/impeccable-windows-x64.exe"
151
+ fetch_url "$url" && fetched=1
152
+ fi
153
+ if [ "$fetched" = 1 ]; then
154
+ check_download
155
+ # Fail closed: a freshly downloaded binary runs only after verifying
156
+ # against its .sha256 sidecar. A sidecar that cannot be fetched, or a
157
+ # machine with no sha256 tool, refuses the download instead of exec'ing
158
+ # an unverified binary. (A binary already on PATH or in the cache that
159
+ # passes engine-probe is unaffected.)
160
+ sidecar_ok=0
161
+ if command -v curl >/dev/null 2>&1; then
162
+ curl -fsSL --retry 2 -o "$tmp.sha256" "$url.sha256" 2>/dev/null && sidecar_ok=1
163
+ elif command -v wget >/dev/null 2>&1; then
164
+ wget -q -O "$tmp.sha256" "$url.sha256" 2>/dev/null && sidecar_ok=1
165
+ fi
166
+ check_download
167
+ expected=""
168
+ [ "$sidecar_ok" = 1 ] && expected=$(cut -d' ' -f1 < "$tmp.sha256")
169
+ actual=""
170
+ if command -v shasum >/dev/null 2>&1; then
171
+ if digest=$(shasum -a 256 "$tmp" 2>/dev/null); then actual=${digest%% *}; fi
172
+ elif command -v sha256sum >/dev/null 2>&1; then
173
+ if digest=$(sha256sum "$tmp" 2>/dev/null); then actual=${digest%% *}; fi
174
+ fi
175
+ check_download
176
+ rm -f "$tmp.sha256"
177
+ if [ -z "$expected" ] || [ -z "$actual" ]; then
178
+ rm -f "$tmp"
179
+ echo "impeccable: cannot verify $url against $url.sha256 (sidecar unavailable or hashing failed); refusing the unverified download" >&2
180
+ exit 127
181
+ fi
182
+ if [ "$actual" != "$expected" ]; then
183
+ rm -f "$tmp"
184
+ echo "impeccable: checksum mismatch downloading $url" >&2
185
+ exit 127
186
+ fi
187
+ check_download
188
+ if ! chmod +x "$tmp" 2>/dev/null; then
189
+ check_download
190
+ rm -f "$tmp"
191
+ echo "impeccable: could not make the verified download executable: $url" >&2
192
+ exit 127
193
+ fi
194
+ check_download
195
+ if ! mv -f "$tmp" "$cached" 2>/dev/null; then
196
+ check_download
197
+ rm -f "$tmp"
198
+ echo "impeccable: could not cache the verified download: $url" >&2
199
+ exit 127
200
+ fi
201
+ check_download "$cached"
202
+ exec "$cached" "$@"
203
+ fi
204
+ rm -f "$tmp" 2>/dev/null
205
+ echo "impeccable: could not download engine $version from $url; check network access, the release URL, and curl or wget availability." >&2
206
+ setup_help
207
+ exit 127
208
+ fi
209
+
210
+ echo "impeccable: no engine binary for $os-$arch found (looked in $bin, $cached, PATH)." >&2
211
+ echo "Download impeccable-$os-$arch from https://github.com/pbakaus/impeccable/releases (tag engine-v$version) into $cache_root/bin/$version/impeccable$exe (then chmod +x), or set IMPECCABLE_BIN to a preinstalled engine binary. Docs: https://impeccable.style" >&2
212
+ exit 127
@@ -0,0 +1,218 @@
1
+ @echo off
2
+ setlocal
3
+ rem Impeccable launcher (Windows). Runs bin\windows-<arch>\impeccable.exe next
4
+ rem to this file, else a cached or freshly downloaded engine binary.
5
+ rem
6
+ rem Structure notes (this file is exercised by dry parsing and string-level
7
+ rem tests, not yet on a real Windows machine):
8
+ rem - No multi-line parenthesized blocks: cmd expands %var% at block parse
9
+ rem time, which made the old download path read back empty %url%/%cached%.
10
+ rem Linear goto flow keeps every expansion on its own line, and avoids
11
+ rem delayed expansion eating ! characters in user arguments.
12
+ rem - The unversioned user binary and the PATH candidate are validated with
13
+ rem the engine-probe handshake (see :probe) so the retired 3.x npm CLI,
14
+ rem whose bin is also named impeccable, is never exec'd. IMPECCABLE_BIN,
15
+ rem the sibling binary, and the version-pinned cache stay trusted.
16
+ rem - Downloads are verified against the .sha256 sidecar via certutil and
17
+ rem fail closed: a missing sidecar or hash tool refuses the download. On
18
+ rem ARM64 the arm64 asset is tried first and the x64 asset is the
19
+ rem fallback (Windows on ARM runs x64 binaries).
20
+ if not defined IMPECCABLE_SKILL_DIR set "IMPECCABLE_SKILL_DIR=%~dp0.."
21
+ if not defined IMPECCABLE_SELF set "IMPECCABLE_SELF=%~f0"
22
+ rem Atomic ships this skill inside its own release and cannot self-update, so
23
+ rem the engine's daily update check and its anonymous concept-roll ping stay off.
24
+ if not defined IMPECCABLE_NO_TELEMETRY set "IMPECCABLE_NO_TELEMETRY=1"
25
+ if not defined IMPECCABLE_NO_UPDATE_CHECK set "IMPECCABLE_NO_UPDATE_CHECK=1"
26
+ set "arch=x64"
27
+ if /I "%PROCESSOR_ARCHITECTURE%"=="ARM64" set "arch=arm64"
28
+
29
+ if not defined IMPECCABLE_BIN goto no_env_bin
30
+ if not exist "%IMPECCABLE_BIN%" goto no_env_bin
31
+ set "run=%IMPECCABLE_BIN%"
32
+ goto run
33
+ :no_env_bin
34
+
35
+ set "bin=%~dp0bin\windows-%arch%\impeccable.exe"
36
+ if not exist "%bin%" goto no_sibling
37
+ set "run=%bin%"
38
+ goto run
39
+ :no_sibling
40
+
41
+ set "home_bin=%USERPROFILE%\.impeccable\bin\impeccable.exe"
42
+ if not exist "%home_bin%" goto no_home_bin
43
+ if defined IMPECCABLE_LAUNCHER_PROBE goto no_home_bin
44
+ call :probe "%home_bin%"
45
+ if not "%probe_ok%"=="1" goto no_home_bin
46
+ set "run=%home_bin%"
47
+ goto run
48
+ :no_home_bin
49
+
50
+ set "version="
51
+ if exist "%~dp0VERSION" set /p version=<"%~dp0VERSION"
52
+ if not defined IMPECCABLE_HOME set "IMPECCABLE_HOME=%USERPROFILE%\.impeccable"
53
+ set "cached=%IMPECCABLE_HOME%\bin\%version%\impeccable.exe"
54
+ if not defined version goto no_cache
55
+ if not exist "%cached%" goto no_cache
56
+ set "run=%cached%"
57
+ goto run
58
+ :no_cache
59
+
60
+ if defined IMPECCABLE_LAUNCHER_PROBE goto download
61
+ where impeccable >nul 2>nul
62
+ if errorlevel 1 goto download
63
+ call :probe impeccable
64
+ if not "%probe_ok%"=="1" goto download
65
+ impeccable %*
66
+ exit /b
67
+
68
+ :download
69
+ rem Last resort: fetch this version's binary from the release channel into
70
+ rem the version-pinned user cache, verify it, then run it. Never inside
71
+ rem another launcher's probe: fail fast and quiet instead.
72
+ if defined IMPECCABLE_LAUNCHER_PROBE exit /b 127
73
+ if not defined version goto fail
74
+ where curl.exe >nul 2>nul
75
+ if errorlevel 1 goto curl_missing
76
+ if not defined IMPECCABLE_DOWNLOAD_BASE set "IMPECCABLE_DOWNLOAD_BASE=https://github.com/pbakaus/impeccable/releases/download"
77
+ if exist "%IMPECCABLE_HOME%\bin\%version%\" goto cache_ready
78
+ mkdir "%IMPECCABLE_HOME%\bin\%version%" >nul 2>nul
79
+ if errorlevel 1 goto cache_directory_failed
80
+ :cache_ready
81
+ rem Check the staging file too: an existing directory may be read-only.
82
+ rem Redirection failures do not reliably update ERRORLEVEL in cmd.exe;
83
+ rem branch on the command's failure directly. Never treat a directory as a
84
+ rem staging file (later del cleanup would prompt to delete its contents).
85
+ if exist "%cached%.part\" goto cache_write_failed
86
+ (type nul >"%cached%.part") 2>nul || goto cache_write_failed
87
+ set "asset=impeccable-windows-%arch%.exe"
88
+ set "url=%IMPECCABLE_DOWNLOAD_BASE%/engine-v%version%/%asset%"
89
+ curl.exe -fsSL -o "%cached%.part" "%url%" >nul 2>nul
90
+ if not errorlevel 1 goto verify
91
+ if not "%arch%"=="arm64" goto download_failed
92
+ set "asset=impeccable-windows-x64.exe"
93
+ set "url=%IMPECCABLE_DOWNLOAD_BASE%/engine-v%version%/%asset%"
94
+ curl.exe -fsSL -o "%cached%.part" "%url%" >nul 2>nul
95
+ if errorlevel 1 goto download_failed
96
+
97
+ :verify
98
+ call :check_download
99
+ if errorlevel 1 exit /b 127
100
+ rem Mirrors the sh launcher and fails closed: a freshly downloaded binary
101
+ rem runs only after verifying against its .sha256 sidecar. A sidecar that
102
+ rem cannot be fetched, or an empty certutil result, refuses the download
103
+ rem instead of running an unverified binary.
104
+ curl.exe -fsSL -o "%cached%.sha256" "%url%.sha256" >nul 2>nul
105
+ if errorlevel 1 goto verify_refuse
106
+ set "expected="
107
+ set /p expected=<"%cached%.sha256"
108
+ for /f "tokens=1" %%h in ("%expected%") do set "expected=%%h"
109
+ call :check_download
110
+ if errorlevel 1 exit /b 127
111
+ set "actual="
112
+ rem Reuse the sidecar staging file after reading expected. Check certutil's
113
+ rem status before parsing: its error text on stdout is not a digest.
114
+ certutil -hashfile "%cached%.part" SHA256 >"%cached%.sha256" 2>nul
115
+ if errorlevel 1 goto verify_refuse
116
+ call :check_download
117
+ if errorlevel 1 exit /b 127
118
+ for /f "usebackq skip=1 delims=" %%h in ("%cached%.sha256") do if not defined actual set "actual=%%h"
119
+ del "%cached%.sha256" >nul 2>nul
120
+ if not defined expected goto verify_refuse
121
+ if not defined actual goto verify_refuse
122
+ set "actual=%actual: =%"
123
+ if /I "%actual%"=="%expected%" goto place
124
+ del "%cached%.part" >nul 2>nul
125
+ echo impeccable: checksum mismatch downloading %url% 1>&2
126
+ exit /b 127
127
+
128
+ :verify_refuse
129
+ call :check_download
130
+ if errorlevel 1 exit /b 127
131
+ del "%cached%.part" >nul 2>nul
132
+ del "%cached%.sha256" >nul 2>nul
133
+ echo impeccable: cannot verify %url% against %url%.sha256; refusing the unverified download 1>&2
134
+ exit /b 127
135
+
136
+ :check_download
137
+ set "download_file=%~1"
138
+ if not defined download_file set "download_file=%cached%.part"
139
+ if not exist "%download_file%" goto download_missing
140
+ for %%f in ("%download_file%") do if %%~zf==0 goto download_empty
141
+ exit /b 0
142
+
143
+ :download_missing
144
+ del "%cached%.sha256" >nul 2>nul
145
+ echo impeccable: download completed but the file was removed before execution: %url%; check your antivirus quarantine or logs. Refusing to continue; do not disable protection. 1>&2
146
+ exit /b 127
147
+
148
+ :download_empty
149
+ del "%download_file%" >nul 2>nul
150
+ del "%cached%.sha256" >nul 2>nul
151
+ echo impeccable: downloaded file is empty: %url%; refusing the unverified download 1>&2
152
+ exit /b 127
153
+
154
+ :place
155
+ call :check_download
156
+ if errorlevel 1 exit /b 127
157
+ move /y "%cached%.part" "%cached%" >nul 2>nul
158
+ if errorlevel 1 goto place_failed
159
+ call :check_download "%cached%"
160
+ if errorlevel 1 exit /b 127
161
+ set "run=%cached%"
162
+ goto run
163
+
164
+ :place_failed
165
+ call :check_download
166
+ if errorlevel 1 exit /b 127
167
+ del "%cached%.part" >nul 2>nul
168
+ echo impeccable: could not cache the verified download: %url% 1>&2
169
+ exit /b 127
170
+
171
+ :run
172
+ "%run%" %*
173
+ exit /b
174
+
175
+ :probe
176
+ rem Sets probe_ok=1 when %1 answers the engine handshake: prints
177
+ rem "impeccable-engine <version>" and exits 0. The 3.x npm CLI answers any
178
+ rem unknown verb with "Unknown command", exit 1, so it never passes.
179
+ set "probe_ok="
180
+ set "probe_tmp=%TEMP%\impeccable-probe-%RANDOM%%RANDOM%.txt"
181
+ set "IMPECCABLE_LAUNCHER_PROBE=1"
182
+ "%~1" engine-probe >"%probe_tmp%" 2>nul
183
+ set "probe_err=%ERRORLEVEL%"
184
+ set "IMPECCABLE_LAUNCHER_PROBE="
185
+ if not "%probe_err%"=="0" goto probe_done
186
+ findstr /b /c:"impeccable-engine" "%probe_tmp%" >nul 2>nul
187
+ if not errorlevel 1 set "probe_ok=1"
188
+ :probe_done
189
+ del "%probe_tmp%" >nul 2>nul
190
+ exit /b 0
191
+
192
+ :cache_directory_failed
193
+ echo impeccable: engine %version% is not installed; cannot create cache directory: "%IMPECCABLE_HOME%\bin\%version%" 1>&2
194
+ goto setup_failed
195
+
196
+ :cache_write_failed
197
+ echo impeccable: engine %version% is not installed; cannot write to cache directory: "%IMPECCABLE_HOME%\bin\%version%" 1>&2
198
+ goto setup_failed
199
+
200
+ :curl_missing
201
+ echo impeccable: cannot download engine %version%; curl.exe is unavailable. 1>&2
202
+ goto setup_failed
203
+
204
+ :download_failed
205
+ del "%cached%.part" >nul 2>nul
206
+ echo impeccable: could not download engine %version% from %url%; check network access and the release URL. 1>&2
207
+
208
+ :setup_failed
209
+ echo Engine %version% setup needs network access and write permission to "%IMPECCABLE_HOME%\bin\%version%". 1>&2
210
+ echo Run this launcher ("%~f0") with engine-probe in a terminal that has those permissions, then retry the original command. 1>&2
211
+ echo Alternatively, set IMPECCABLE_HOME to a writable cache location, or IMPECCABLE_BIN to a preinstalled engine binary. 1>&2
212
+ exit /b 127
213
+
214
+ :fail
215
+ del "%cached%.part" >nul 2>nul
216
+ echo impeccable: no engine binary found (looked in %bin%, %cached%, PATH). 1>&2
217
+ echo Download impeccable-windows-%arch%.exe from https://github.com/pbakaus/impeccable/releases (tag engine-v%version%) and save it as %cached%, or set IMPECCABLE_BIN to a preinstalled engine binary. Docs: https://impeccable.style 1>&2
218
+ exit /b 127
@@ -64,6 +64,26 @@
64
64
  };
65
65
  }
66
66
 
67
+ function hasFrameworkHmrOwnership(el) {
68
+ for (let node = el; node; node = node.parentElement) {
69
+ let keys = [];
70
+ try { keys = Object.getOwnPropertyNames(node); } catch {}
71
+ if (keys.some((key) => (
72
+ key.startsWith('__reactFiber$')
73
+ || key.startsWith('__reactProps$')
74
+ || key.startsWith('__reactContainer$')
75
+ || key === '_reactRootContainer'
76
+ || key === '__vueParentComponent'
77
+ || key === '__vue_app__'
78
+ || key === '__vnode'
79
+ || key === '__svelte_meta'
80
+ ))) {
81
+ return true;
82
+ }
83
+ }
84
+ return false;
85
+ }
86
+
67
87
  function id8() {
68
88
  if (crypto?.randomUUID) return crypto.randomUUID().replace(/-/g, '').slice(0, 8);
69
89
  // Insecure-context fallback (plain-http LAN preview): still draw from the
@@ -132,6 +152,7 @@
132
152
  desc,
133
153
  rectIsUsableAnchor,
134
154
  makeFrozenAnchor,
155
+ hasFrameworkHmrOwnership,
135
156
  id8,
136
157
  cssId,
137
158
  liveUiRoot,