synthesisui 0.16.358 → 0.16.359

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.
package/dist/claude-md.js CHANGED
@@ -636,6 +636,37 @@ export async function syncClaudeMd(projectRoot) {
636
636
  * Um repo com `AGENTS.md` e `.cursor/` ganhou governança nos três lugares e não tinha como saber -
637
637
  * e o que não se diz não é adotado.
638
638
  */
639
+ /**
640
+ * O COMANDO QUE ABRE CADA AGENTE - derivado de qual casa do bloco existe, nunca de uma lista fixa.
641
+ *
642
+ * O QUE O CLIENTE GANHA: o fim de um comando mostra o comando literal que abre o agente DELE, então
643
+ * "abra uma sessão nova" deixa de ser uma instrução que ele precisa traduzir (dono, 03/09: "seria
644
+ * legal ter os comandos para abrir, apenas para ficar fácil").
645
+ *
646
+ * MORA AO LADO DE `HOMES` de propósito. A mesma tabela que sabe onde o bloco vive é a que sabe como
647
+ * aquele agente abre - um agente novo entra em UM lugar. Se as duas listas morassem separadas, a
648
+ * segunda envelheceria calada no dia em que a primeira crescesse.
649
+ *
650
+ * O CURSOR NÃO TEM LINHA AQUI, e a ausência é a resposta certa: ele é um editor que se abre, não um
651
+ * comando de terminal. Inventar um `cursor .` mandaria alguém rodar o que talvez não exista no PATH
652
+ * dele.
653
+ *
654
+ * AS FLAGS SÃO AS QUE DISPENSAM APROVAR CADA ESCRITA, e o import escreve muito. Elas são DITAS na
655
+ * saída - o que a flag dispensa aparece em uma linha ao lado -, porque um comando cujo próprio nome
656
+ * carrega "dangerously" impresso sem uma palavra seria a gente escondendo o que ele faz.
657
+ */
658
+ const OPENS = {
659
+ "CLAUDE.md": "claude --dangerously-skip-permissions",
660
+ "AGENTS.md": "codex --yolo",
661
+ };
662
+ /**
663
+ * Os comandos que abrem os agentes que ESTE repositório mostra ter - vazio quando nenhum deles
664
+ * carrega o bloco, e aí a saída não fala de abrir nada.
665
+ */
666
+ export async function agentOpenCommands(projectRoot) {
667
+ const homes = await blockHomes(projectRoot);
668
+ return homes.map((h) => OPENS[h]).filter((c) => Boolean(c));
669
+ }
639
670
  export async function blockHomes(projectRoot) {
640
671
  const found = [];
641
672
  for (const home of HOMES) {
@@ -2,6 +2,7 @@ import { readdir, readFile } from "node:fs/promises";
2
2
  import { homedir } from "node:os";
3
3
  import { join, resolve } from "node:path";
4
4
  import { pinnedHookVersion } from "../agent-wiring.js";
5
+ import { agentOpenCommands } from "../claude-md.js";
5
6
  import { isOlderCli } from "../cli-version.js";
6
7
  import { readToken, resolveRegistry } from "../config.js";
7
8
  import { unsentEvents } from "../doctor/ledger.js";
@@ -633,7 +634,8 @@ export async function nextStepFor(root) {
633
634
  }
634
635
  : {
635
636
  sentence: 'This repo has no design system contract yet. Ask me: "import my design system."',
636
- headline: "Open a new agent session in this repo and say:",
637
+ headline: "Open a new agent session in this repo",
638
+ open: await agentOpenCommands(root).catch(() => []),
637
639
  say: "import my design system",
638
640
  why: "I read what is already in your code - the colours, the type, the shapes, the components. Nothing is invented.",
639
641
  };
@@ -646,12 +648,36 @@ export async function nextStepFor(root) {
646
648
  * traz as linhas em branco de graça, que é o "respiro" pedido.
647
649
  */
648
650
  export function renderNextStep(next, freshSession) {
649
- const lines = [section("Do this next"), body(next.headline), ""];
650
- if (next.say)
651
+ const lines = [section("Do this next")];
652
+ /**
653
+ * NUMERA SÓ QUANDO SÃO DOIS PASSOS. Abrir o agente e falar com ele são duas coisas, e sem o "1" e
654
+ * o "2" a pessoa lê dois blocos azuis e não sabe se escolhe um ou faz os dois. Com um passo só, o
655
+ * número seria decoração.
656
+ */
657
+ const numbered = Boolean(next.open?.length && next.say);
658
+ if (next.open?.length) {
659
+ lines.push(body(numbered ? `1 ${next.headline}` : next.headline), "");
660
+ lines.push(paint.blue(snippet(next.open)), "");
661
+ }
662
+ if (next.say) {
663
+ if (next.open?.length)
664
+ lines.push(body(numbered ? "2 and say" : "and say"), "");
665
+ else
666
+ lines.push(body(`${next.headline} and say:`), "");
651
667
  lines.push(paint.blue(snippet([next.say])), "");
652
- if (next.run?.length)
668
+ }
669
+ if (next.run?.length) {
670
+ lines.push(body(next.headline), "");
653
671
  lines.push(paint.blue(snippet(next.run)), "");
672
+ }
654
673
  lines.push(...bodyWrapped(next.why).map(paint.dim));
674
+ /** O que a flag dispensa, dito - ver `OPENS` em `claude-md.ts`. E concordando: um repo com um
675
+ * agente só recebe uma linha no singular, porque "those flags" sobre um comando lê como se a
676
+ * pessoa tivesse perdido uma opção da tela. */
677
+ if (next.open?.length)
678
+ lines.push(...bodyWrapped(next.open.length === 1
679
+ ? "That flag lets it write without asking each time. Drop it to approve every change yourself."
680
+ : "Those flags let it write without asking each time. Drop them to approve every change yourself.").map(paint.dim));
655
681
  if (freshSession)
656
682
  lines.push(...bodyWrapped(freshSession.mcp
657
683
  ? "A new session is what loads the skills and tools just installed, and the project's tools ask for approval once - say yes."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "synthesisui",
3
- "version": "0.16.358",
3
+ "version": "0.16.359",
4
4
  "description": "Bring SynthesisUI design systems into any project - tokens, typed components, whole pages and an agent-ready CLAUDE.md manifest.",
5
5
  "type": "module",
6
6
  "bin": {