synthesisui 0.16.242 → 0.16.243

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.
@@ -5,6 +5,7 @@ import { pinnedHookVersion } from "../agent-wiring.js";
5
5
  import { isOlderCli } from "../cli-version.js";
6
6
  import { readToken, resolveRegistry } from "../config.js";
7
7
  import { unsentEvents } from "../doctor/ledger.js";
8
+ import { readRequests } from "../doctor/requests.js";
8
9
  import { CHECKER_SINCE, installedBehind, MATERIALISER_SINCE, READER_SINCE, } from "../install-marks.js";
9
10
  import { measuredScope } from "../measured-scope.js";
10
11
  import { body } from "../output.js";
@@ -314,6 +315,32 @@ export function repairSaid(body, lock) {
314
315
  then: "claude --continue --dangerously-skip-permissions",
315
316
  };
316
317
  }
318
+ /**
319
+ * QUANTAS RESPOSTAS ESTÃO ESPERANDO PARA SEREM BUSCADAS - o cruzamento das duas listas.
320
+ *
321
+ * A plataforma manda os ids que ela já decidiu; o arquivo local diz o que ainda está aberto AQUI.
322
+ * A interseção é a notícia: pedidos que foram respondidos e cuja resposta esta máquina nunca viu.
323
+ *
324
+ * `null` quando não há nada, quando o arquivo não existe, ou quando a plataforma é velha demais para
325
+ * mandar o campo - um CLI novo contra um servidor antigo fica exatamente como estava, calado.
326
+ */
327
+ async function decidedWaiting(root, decided) {
328
+ if (!decided || decided.length === 0)
329
+ return null;
330
+ const open = await readRequests(root).catch(() => []);
331
+ if (open.length === 0)
332
+ return null;
333
+ const answered = new Set(decided);
334
+ const n = open.filter((r) => answered.has(r.id)).length;
335
+ if (n === 0)
336
+ return null;
337
+ return {
338
+ says: n === 1
339
+ ? "A request you filed has been answered on the platform, and this machine has not picked it up yet."
340
+ : `${n} requests you filed have been answered on the platform, and this machine has not picked them up yet.`,
341
+ run: "npx synthesisui sync",
342
+ };
343
+ }
317
344
  export async function versionBehind(root, opts = {}) {
318
345
  const locks = (await locksIn(root)).filter((l) => l.slug && !l.adopted);
319
346
  const lock = locks[0];
@@ -351,6 +378,24 @@ export async function versionBehind(root, opts = {}) {
351
378
  * a versão é a consequência - dizer a consequência primeiro manda a pessoa rodar o comando sem
352
379
  * saber por quê.
353
380
  */
381
+ /**
382
+ * ALGUÉM JÁ RESPONDEU UM PEDIDO SEU, E VOCÊ NÃO TEM COMO SABER.
383
+ *
384
+ * O agente arquiva a lacuna, a pessoa decide na plataforma - e a decisão fica lá. O arquivo local
385
+ * nunca é tocado por design: o próximo `sync` lê o status, fecha o pedido na máquina e imprime o
386
+ * próximo passo. O buraco está no "próximo": até alguém rodar o comando, uma resposta dada há dias
387
+ * não existe deste lado, e quem esperava por ela descobre por acaso.
388
+ *
389
+ * O cruzamento tem que ser AQUI, e é por isso que a plataforma manda ids em vez de uma frase: só
390
+ * esta máquina sabe o que ainda está ABERTO na fila local. Um pedido decidido que já foi fechado
391
+ * aqui não é notícia, e contá-lo faria o hook cobrar para sempre um trabalho já feito.
392
+ *
393
+ * Vem antes da versão e do reparo porque é a única linha desta lista sobre uma pergunta que a
394
+ * PESSOA fez - e uma resposta que ela pediu vale mais que uma novidade que ela não pediu.
395
+ */
396
+ const waiting = await decidedWaiting(root, body.decided);
397
+ if (waiting)
398
+ return waiting;
354
399
  const repaired = repairSaid(body, lock);
355
400
  if (repaired)
356
401
  return repaired;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "synthesisui",
3
- "version": "0.16.242",
3
+ "version": "0.16.243",
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": {