@bastani/atomic 0.9.5-alpha.8 → 0.9.5-alpha.9

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 (207) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/builtin/cursor/package.json +2 -2
  3. package/dist/builtin/intercom/package.json +1 -1
  4. package/dist/builtin/mcp/CHANGELOG.md +11 -0
  5. package/dist/builtin/mcp/README.md +6 -6
  6. package/dist/builtin/mcp/direct-tools.ts +41 -23
  7. package/dist/builtin/mcp/index.ts +31 -4
  8. package/dist/builtin/mcp/init.ts +4 -43
  9. package/dist/builtin/mcp/metadata-hydration.ts +37 -0
  10. package/dist/builtin/mcp/package.json +1 -1
  11. package/dist/builtin/mcp/proxy-info-modes.ts +67 -14
  12. package/dist/builtin/mcp/startup-warmup.ts +98 -0
  13. package/dist/builtin/mcp/tool-result-renderer.ts +3 -3
  14. package/dist/builtin/subagents/CHANGELOG.md +12 -0
  15. package/dist/builtin/subagents/package.json +1 -1
  16. package/dist/builtin/subagents/src/extension/index.ts +14 -25
  17. package/dist/builtin/subagents/src/extension/startup-maintenance.ts +89 -0
  18. package/dist/builtin/subagents/src/runs/background/async-execution-common.ts +23 -18
  19. package/dist/builtin/subagents/src/runs/background/result-watcher.ts +20 -10
  20. package/dist/builtin/subagents/src/runs/background/subagent-runner-streaming.ts +13 -3
  21. package/dist/builtin/subagents/src/runs/foreground/execution-attempt.ts +10 -2
  22. package/dist/builtin/subagents/src/runs/shared/pi-spawn.ts +28 -1
  23. package/dist/builtin/subagents/src/tui/render-widget.ts +29 -0
  24. package/dist/builtin/web-access/package.json +1 -1
  25. package/dist/builtin/workflows/CHANGELOG.md +18 -0
  26. package/dist/builtin/workflows/README.md +1 -1
  27. package/dist/builtin/workflows/builtin/goal-runner.ts +39 -1
  28. package/dist/builtin/workflows/package.json +1 -1
  29. package/dist/builtin/workflows/skills/impeccable/SKILL.md +16 -13
  30. package/dist/builtin/workflows/skills/impeccable/reference/adapt.md +1 -0
  31. package/dist/builtin/workflows/skills/impeccable/reference/adapt.native.md +58 -0
  32. package/dist/builtin/workflows/skills/impeccable/reference/android.md +40 -0
  33. package/dist/builtin/workflows/skills/impeccable/reference/animate.md +2 -0
  34. package/dist/builtin/workflows/skills/impeccable/reference/audit.md +2 -0
  35. package/dist/builtin/workflows/skills/impeccable/reference/audit.native.md +139 -0
  36. package/dist/builtin/workflows/skills/impeccable/reference/bolder.md +69 -62
  37. package/dist/builtin/workflows/skills/impeccable/reference/critique.md +21 -7
  38. package/dist/builtin/workflows/skills/impeccable/reference/document.md +1 -1
  39. package/dist/builtin/workflows/skills/impeccable/reference/hooks.md +92 -0
  40. package/dist/builtin/workflows/skills/impeccable/reference/init.md +29 -7
  41. package/dist/builtin/workflows/skills/impeccable/reference/ios.md +45 -0
  42. package/dist/builtin/workflows/skills/impeccable/reference/layout.md +25 -1
  43. package/dist/builtin/workflows/skills/impeccable/reference/typeset.md +23 -1
  44. package/dist/builtin/workflows/skills/impeccable/scripts/context-signals.mjs +2 -1
  45. package/dist/builtin/workflows/skills/impeccable/scripts/context.mjs +75 -14
  46. package/dist/builtin/workflows/skills/impeccable/scripts/detector/browser/injected/index.mjs +1 -1
  47. package/dist/builtin/workflows/skills/impeccable/scripts/detector/cli/main.mjs +31 -0
  48. package/dist/builtin/workflows/skills/impeccable/scripts/detector/design-system.mjs +64 -0
  49. package/dist/builtin/workflows/skills/impeccable/scripts/detector/detect-antipatterns-browser.js +118 -11
  50. package/dist/builtin/workflows/skills/impeccable/scripts/detector/engines/regex/detect-text.mjs +16 -11
  51. package/dist/builtin/workflows/skills/impeccable/scripts/detector/registry/antipatterns.mjs +66 -0
  52. package/dist/builtin/workflows/skills/impeccable/scripts/detector/rules/checks.mjs +42 -10
  53. package/dist/builtin/workflows/skills/impeccable/scripts/detector/shared/fonts.mjs +30 -0
  54. package/dist/builtin/workflows/skills/impeccable/scripts/detector/shared/page.mjs +4 -6
  55. package/dist/builtin/workflows/skills/impeccable/scripts/hook-admin.mjs +660 -0
  56. package/dist/builtin/workflows/skills/impeccable/scripts/hook-before-edit.mjs +516 -0
  57. package/dist/builtin/workflows/skills/impeccable/scripts/hook-lib.mjs +1764 -0
  58. package/dist/builtin/workflows/skills/impeccable/scripts/hook.mjs +61 -0
  59. package/dist/builtin/workflows/skills/impeccable/scripts/lib/impeccable-config.mjs +4 -2
  60. package/dist/builtin/workflows/skills/impeccable/scripts/lib/is-generated.mjs +2 -2
  61. package/dist/builtin/workflows/skills/impeccable/scripts/live/svelte-component.mjs +13 -16
  62. package/dist/builtin/workflows/skills/impeccable/scripts/live-accept.mjs +17 -11
  63. package/dist/builtin/workflows/skills/impeccable/scripts/live-browser.js +104 -37
  64. package/dist/builtin/workflows/skills/impeccable/scripts/live-wrap.mjs +9 -0
  65. package/dist/builtin/workflows/src/durable/backend.ts +12 -0
  66. package/dist/builtin/workflows/src/durable/dbos-backend.ts +17 -1
  67. package/dist/builtin/workflows/src/durable/resume-catalog.ts +12 -0
  68. package/dist/builtin/workflows/src/durable/resume-runtime.ts +5 -2
  69. package/dist/builtin/workflows/src/durable/types.ts +16 -0
  70. package/dist/builtin/workflows/src/engine/primitives/task.ts +1 -0
  71. package/dist/builtin/workflows/src/engine/run-durable-finalize.ts +1 -2
  72. package/dist/builtin/workflows/src/engine/run-returned-status.ts +50 -16
  73. package/dist/builtin/workflows/src/engine/run.ts +20 -19
  74. package/dist/builtin/workflows/src/engine/runtime.ts +5 -0
  75. package/dist/builtin/workflows/src/extension/extension-factory.ts +3 -0
  76. package/dist/builtin/workflows/src/extension/extension-lifecycle.ts +9 -2
  77. package/dist/builtin/workflows/src/extension/extension-runtime-state.ts +137 -27
  78. package/dist/builtin/workflows/src/extension/lifecycle-notifications.ts +22 -6
  79. package/dist/builtin/workflows/src/extension/public-types.ts +1 -1
  80. package/dist/builtin/workflows/src/extension/workflow-command-completions.ts +13 -1
  81. package/dist/builtin/workflows/src/extension/workflow-command-registration.ts +19 -4
  82. package/dist/builtin/workflows/src/extension/workflow-command-surfaces.ts +9 -0
  83. package/dist/builtin/workflows/src/extension/workflow-run-control-command.ts +48 -23
  84. package/dist/builtin/workflows/src/extension/workflow-tool-control.ts +20 -8
  85. package/dist/builtin/workflows/src/extension/workflow-tool.ts +24 -8
  86. package/dist/builtin/workflows/src/runs/background/status.ts +4 -3
  87. package/dist/builtin/workflows/src/runs/foreground/executor-direct-helpers.ts +29 -8
  88. package/dist/builtin/workflows/src/runs/foreground/executor-hil.ts +2 -1
  89. package/dist/builtin/workflows/src/runs/foreground/executor-stage-factory.ts +3 -2
  90. package/dist/builtin/workflows/src/runs/shared/worktree-git.ts +155 -20
  91. package/dist/builtin/workflows/src/runs/shared/worktree-types.ts +6 -0
  92. package/dist/builtin/workflows/src/runs/shared/worktree.ts +2 -1
  93. package/dist/builtin/workflows/src/shared/returned-run-status.ts +116 -0
  94. package/dist/builtin/workflows/src/shared/workflow-failures-decisions.ts +2 -0
  95. package/dist/builtin/workflows/src/tui/graph-view-render-helpers.ts +21 -3
  96. package/dist/builtin/workflows/src/tui/graph-view-state.ts +3 -0
  97. package/dist/builtin/workflows/src/tui/graph-view-types.ts +3 -0
  98. package/dist/builtin/workflows/src/tui/status-list.ts +22 -15
  99. package/dist/builtin/workflows/src/tui/workflow-attach-pane.ts +4 -4
  100. package/dist/core/agent-session-auto-compaction.d.ts +23 -3
  101. package/dist/core/agent-session-auto-compaction.d.ts.map +1 -1
  102. package/dist/core/agent-session-auto-compaction.js +129 -17
  103. package/dist/core/agent-session-auto-compaction.js.map +1 -1
  104. package/dist/core/agent-session-events.d.ts.map +1 -1
  105. package/dist/core/agent-session-events.js +7 -0
  106. package/dist/core/agent-session-events.js.map +1 -1
  107. package/dist/core/agent-session-methods.d.ts +6 -3
  108. package/dist/core/agent-session-methods.d.ts.map +1 -1
  109. package/dist/core/agent-session-methods.js.map +1 -1
  110. package/dist/core/agent-session-prompt.d.ts.map +1 -1
  111. package/dist/core/agent-session-prompt.js +1 -1
  112. package/dist/core/agent-session-prompt.js.map +1 -1
  113. package/dist/core/agent-session.d.ts +4 -2
  114. package/dist/core/agent-session.d.ts.map +1 -1
  115. package/dist/core/agent-session.js +4 -2
  116. package/dist/core/agent-session.js.map +1 -1
  117. package/dist/core/extensions/loader-virtual-modules.d.ts +8 -1
  118. package/dist/core/extensions/loader-virtual-modules.d.ts.map +1 -1
  119. package/dist/core/extensions/loader-virtual-modules.js +2 -1
  120. package/dist/core/extensions/loader-virtual-modules.js.map +1 -1
  121. package/dist/core/footer-data-provider.d.ts +6 -0
  122. package/dist/core/footer-data-provider.d.ts.map +1 -1
  123. package/dist/core/footer-data-provider.js +72 -29
  124. package/dist/core/footer-data-provider.js.map +1 -1
  125. package/dist/core/openai-responses-payload-sanitizer.d.ts +1 -0
  126. package/dist/core/openai-responses-payload-sanitizer.d.ts.map +1 -1
  127. package/dist/core/openai-responses-payload-sanitizer.js +24 -9
  128. package/dist/core/openai-responses-payload-sanitizer.js.map +1 -1
  129. package/dist/core/slash-commands.d.ts +2 -0
  130. package/dist/core/slash-commands.d.ts.map +1 -1
  131. package/dist/core/slash-commands.js +141 -0
  132. package/dist/core/slash-commands.js.map +1 -1
  133. package/dist/index.d.ts +1 -0
  134. package/dist/index.d.ts.map +1 -1
  135. package/dist/index.js +1 -0
  136. package/dist/index.js.map +1 -1
  137. package/dist/main-deferred-startup.d.ts.map +1 -1
  138. package/dist/main-deferred-startup.js +2 -2
  139. package/dist/main-deferred-startup.js.map +1 -1
  140. package/dist/main-early-input.d.ts.map +1 -1
  141. package/dist/main-early-input.js +7 -0
  142. package/dist/main-early-input.js.map +1 -1
  143. package/dist/main.d.ts.map +1 -1
  144. package/dist/main.js +1 -1
  145. package/dist/main.js.map +1 -1
  146. package/dist/modes/interactive/components/chat-session-host-actions.d.ts.map +1 -1
  147. package/dist/modes/interactive/components/chat-session-host-actions.js +0 -1
  148. package/dist/modes/interactive/components/chat-session-host-actions.js.map +1 -1
  149. package/dist/modes/interactive/interactive-agent-events.d.ts.map +1 -1
  150. package/dist/modes/interactive/interactive-agent-events.js +1 -0
  151. package/dist/modes/interactive/interactive-agent-events.js.map +1 -1
  152. package/dist/modes/interactive/interactive-autocomplete.d.ts.map +1 -1
  153. package/dist/modes/interactive/interactive-autocomplete.js +21 -9
  154. package/dist/modes/interactive/interactive-autocomplete.js.map +1 -1
  155. package/dist/modes/interactive/interactive-deferred-startup.d.ts.map +1 -1
  156. package/dist/modes/interactive/interactive-deferred-startup.js +41 -28
  157. package/dist/modes/interactive/interactive-deferred-startup.js.map +1 -1
  158. package/dist/modes/interactive/interactive-hotkeys-debug.d.ts.map +1 -1
  159. package/dist/modes/interactive/interactive-hotkeys-debug.js +1 -0
  160. package/dist/modes/interactive/interactive-hotkeys-debug.js.map +1 -1
  161. package/dist/modes/interactive/interactive-input-handling.d.ts.map +1 -1
  162. package/dist/modes/interactive/interactive-input-handling.js +41 -6
  163. package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
  164. package/dist/modes/interactive/interactive-mode-base.d.ts +3 -0
  165. package/dist/modes/interactive/interactive-mode-base.d.ts.map +1 -1
  166. package/dist/modes/interactive/interactive-mode-base.js +3 -0
  167. package/dist/modes/interactive/interactive-mode-base.js.map +1 -1
  168. package/dist/modes/interactive/interactive-mode-deps.d.ts +1 -1
  169. package/dist/modes/interactive/interactive-mode-deps.d.ts.map +1 -1
  170. package/dist/modes/interactive/interactive-mode-deps.js +1 -1
  171. package/dist/modes/interactive/interactive-mode-deps.js.map +1 -1
  172. package/dist/modes/interactive/interactive-mode-surface.d.ts +2 -2
  173. package/dist/modes/interactive/interactive-mode-surface.d.ts.map +1 -1
  174. package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
  175. package/dist/modes/interactive/interactive-model-routing.d.ts.map +1 -1
  176. package/dist/modes/interactive/interactive-model-routing.js +3 -1
  177. package/dist/modes/interactive/interactive-model-routing.js.map +1 -1
  178. package/dist/modes/interactive/interactive-process-lifecycle.d.ts.map +1 -1
  179. package/dist/modes/interactive/interactive-process-lifecycle.js +0 -3
  180. package/dist/modes/interactive/interactive-process-lifecycle.js.map +1 -1
  181. package/dist/modes/interactive/interactive-render-chat.d.ts.map +1 -1
  182. package/dist/modes/interactive/interactive-render-chat.js +15 -1
  183. package/dist/modes/interactive/interactive-render-chat.js.map +1 -1
  184. package/dist/modes/interactive/interactive-session-routing.d.ts.map +1 -1
  185. package/dist/modes/interactive/interactive-session-routing.js +5 -1
  186. package/dist/modes/interactive/interactive-session-routing.js.map +1 -1
  187. package/dist/modes/interactive/interactive-startup.d.ts.map +1 -1
  188. package/dist/modes/interactive/interactive-startup.js +20 -21
  189. package/dist/modes/interactive/interactive-startup.js.map +1 -1
  190. package/dist/modes/interactive/theme/global-theme.d.ts.map +1 -1
  191. package/dist/modes/interactive/theme/global-theme.js +26 -2
  192. package/dist/modes/interactive/theme/global-theme.js.map +1 -1
  193. package/dist/utils/fs-watch.d.ts +24 -1
  194. package/dist/utils/fs-watch.d.ts.map +1 -1
  195. package/dist/utils/fs-watch.js +60 -5
  196. package/dist/utils/fs-watch.js.map +1 -1
  197. package/docs/compaction.md +5 -1
  198. package/docs/development.md +4 -0
  199. package/docs/extensions.md +5 -0
  200. package/docs/json.md +1 -1
  201. package/docs/quickstart.md +1 -1
  202. package/docs/settings.md +1 -1
  203. package/docs/subagents.md +4 -0
  204. package/docs/windows.md +4 -0
  205. package/docs/workflows.md +8 -6
  206. package/npm-shrinkwrap.json +23 -23
  207. package/package.json +2 -2
@@ -18,6 +18,7 @@ import {
18
18
  parseRgb,
19
19
  relativeLuminance,
20
20
  } from '../shared/color.mjs';
21
+ import { extractGoogleFontFamilies } from '../shared/fonts.mjs';
21
22
 
22
23
  const DETECTOR_IS_BROWSER = typeof window !== 'undefined';
23
24
 
@@ -573,13 +574,49 @@ function checkHtmlPatterns(html) {
573
574
  findings.push({ id: 'repeating-stripes-gradient', snippet: 'repeating-gradient decorative stripes' });
574
575
  }
575
576
 
577
+ // --- Provider tells (gated): two-axis grid-line background (Codex/GPT) ---
578
+ // The Codex grid tell is two hairline `linear-gradient(... <color> 1px,
579
+ // transparent 1px)` layers (one per axis) tiled by a repeating
580
+ // `background-size` cell. Both signals must co-occur in the SAME style block
581
+ // (a CSS rule body or one inline `style="..."`): two hairline stops WITHOUT a
582
+ // tiling background-size is a fixed crosshair, not a grid, and a single
583
+ // hairline is a legitimate ruled line. Scoping to one block also stops
584
+ // unrelated single-axis rules on separate elements from adding up across the
585
+ // page. Count hairlines only inside `background`/`background-image` values so
586
+ // a hairline in an unrelated property (mask-image, border-image) can't stand
587
+ // in for the second axis. Colors like `oklch(96% 0.012 82 / 0.055)` carry
588
+ // nested parens, so match the hairline stop directly rather than parsing
589
+ // whole gradient layers.
590
+ {
591
+ const hairlineRe = /\b\d{1,3}px\s*,\s*transparent\s+\d{1,3}px/gi;
592
+ const gridSizeRe = /background-size\s*:[^;{}"']*\b\d{1,3}px\b/i;
593
+ const bgDeclRe = /\bbackground(?:-image)?\s*:\s*([^;{}"']*)/gi;
594
+ const blockRe = /\{([^{}]*)\}|style\s*=\s*"([^"]*)"|style\s*=\s*'([^']*)'/gi;
595
+ let blk;
596
+ while ((blk = blockRe.exec(html)) !== null) {
597
+ const block = blk[1] || blk[2] || blk[3] || '';
598
+ if (!gridSizeRe.test(block)) continue;
599
+ let hairlineCount = 0;
600
+ let bm;
601
+ bgDeclRe.lastIndex = 0;
602
+ while ((bm = bgDeclRe.exec(block)) !== null) {
603
+ const stops = bm[1].match(hairlineRe);
604
+ if (stops) hairlineCount += stops.length;
605
+ }
606
+ if (hairlineCount >= 2) {
607
+ findings.push({ id: 'codex-grid-background', snippet: 'two-axis grid-line gradient background' });
608
+ break;
609
+ }
610
+ }
611
+ }
612
+
576
613
  // --- Provider tells (gated): "X theater" framing copy (GPT) ---
577
614
  // Lives here (regex-on-HTML) rather than in the text-content analyzers so it
578
615
  // runs in the bundled browser path too, not just the CLI/static path.
579
616
  {
580
617
  const bodyText = html
581
- .replace(/<script\b[^>]*>[\s\S]*?<\/script[^>]*>/gi, ' ')
582
- .replace(/<style\b[^>]*>[\s\S]*?<\/style[^>]*>/gi, ' ')
618
+ .replace(/<script\b[^>]*>[\s\S]*?<\/script\b[^>]*>/gi, ' ')
619
+ .replace(/<style\b[^>]*>[\s\S]*?<\/style\b[^>]*>/gi, ' ')
583
620
  .replace(/<[^>]+>/g, ' ');
584
621
  const tm = /\b(\w+)\s+theater\b/i.exec(bodyText);
585
622
  if (tm) findings.push({ id: 'theater-slop-phrase', snippet: `"${tm[0].trim()}"` });
@@ -2036,14 +2073,9 @@ function checkPageTypography(doc, win) {
2036
2073
 
2037
2074
  // Check Google Fonts links in HTML
2038
2075
  const html = doc.documentElement?.outerHTML || '';
2039
- const gfRe = /fonts\.googleapis\.com\/css2?\?family=([^&"'\s]+)/gi;
2040
- let m;
2041
- while ((m = gfRe.exec(html)) !== null) {
2042
- const families = m[1].split('|').map(f => f.split(':')[0].replace(/\+/g, ' ').toLowerCase());
2043
- for (const f of families) {
2044
- fonts.add(f);
2045
- if (OVERUSED_FONTS.has(f)) overusedFound.add(f);
2046
- }
2076
+ for (const f of extractGoogleFontFamilies(html)) {
2077
+ fonts.add(f);
2078
+ if (OVERUSED_FONTS.has(f)) overusedFound.add(f);
2047
2079
  }
2048
2080
 
2049
2081
  // Also parse raw HTML/style content for font-family (jsdom may not expose all via CSSOM)
@@ -0,0 +1,30 @@
1
+ const GOOGLE_FONTS_URL_RE = /fonts\.googleapis\.com\/css2?\?[^"'\s)<>]*/gi;
2
+
3
+ function normalizeGoogleFontFamilyParam(value) {
4
+ return String(value || '')
5
+ .split('|')
6
+ .map(part => part.split(':')[0].trim().toLowerCase())
7
+ .filter(Boolean);
8
+ }
9
+
10
+ function extractGoogleFontFamilies(text) {
11
+ const families = [];
12
+ if (!text) return families;
13
+
14
+ GOOGLE_FONTS_URL_RE.lastIndex = 0;
15
+ let urlMatch;
16
+ while ((urlMatch = GOOGLE_FONTS_URL_RE.exec(text)) !== null) {
17
+ const url = urlMatch[0];
18
+ const queryStart = url.indexOf('?');
19
+ if (queryStart === -1) continue;
20
+
21
+ const params = new URLSearchParams(url.slice(queryStart + 1).replace(/&amp;/g, '&'));
22
+ for (const value of params.getAll('family')) {
23
+ families.push(...normalizeGoogleFontFamilyParam(value));
24
+ }
25
+ }
26
+
27
+ return families;
28
+ }
29
+
30
+ export { extractGoogleFontFamilies };
@@ -1,13 +1,11 @@
1
1
  /** Check if content looks like a full page (not a component/partial) */
2
2
  function isFullPage(content) {
3
- // Strip comments to a fixpoint so nested/overlapping comment markers cannot
4
- // survive a single pass (CodeQL: complete sanitization).
5
- let stripped = String(content);
6
- let prev;
3
+ let stripped = String(content || '');
4
+ let previous;
7
5
  do {
8
- prev = stripped;
6
+ previous = stripped;
9
7
  stripped = stripped.replace(/<!--[\s\S]*?-->/g, '');
10
- } while (stripped !== prev);
8
+ } while (stripped !== previous);
11
9
  return /<!doctype\s|<html[\s>]|<head[\s>]/i.test(stripped);
12
10
  }
13
11