brito-cli 0.7.0 → 0.7.2

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.
@@ -188,7 +188,7 @@ export function aliasCandidates(set, spec) {
188
188
  for (const r of matches) {
189
189
  const captured = r.wildcard ? spec.slice(r.prefix.length, spec.length - r.suffix.length) : "";
190
190
  for (const t of r.targets)
191
- out.push(clean(t.replace("*", captured)));
191
+ out.push(clean(t.split("*").join(captured)));
192
192
  }
193
193
  if (set.baseUrl !== null && !spec.startsWith("."))
194
194
  out.push(clean(px.join(set.baseUrl, spec)));
package/dist/graph/sfc.js CHANGED
@@ -8,7 +8,7 @@ const JS_TYPES = /^(module|(text|application)\/(javascript|typescript|ecmascript
8
8
  export function splitSfc(src, ext) {
9
9
  const ranges = [];
10
10
  let tsx = false;
11
- for (const m of src.matchAll(/<script\b([^>]*)>([\s\S]*?)<\/script\s*>/gi)) {
11
+ for (const m of src.matchAll(/<script\b([^>]*)>([\s\S]*?)<\/script[^>]*>/gi)) {
12
12
  const attrs = m[1] ?? "";
13
13
  const type = /\btype\s*=\s*["']?([^"'\s>]+)/i.exec(attrs)?.[1]?.toLowerCase();
14
14
  if (type && !JS_TYPES.test(type))
@@ -105,7 +105,7 @@ export class GraphStore {
105
105
  catch { /* idem */ } }
106
106
  /** Para tarefas longas (indexação): se outro processo está esperando o banco, solta e dá a vez a ele. Barato quando ninguém espera. */
107
107
  async yieldIfWaited() {
108
- let age = Infinity;
108
+ let age;
109
109
  try {
110
110
  age = Date.now() - fs.statSync(this.waitingFile).mtimeMs;
111
111
  }
@@ -17,8 +17,13 @@ export function entryFromTurn(turn, saved, date = new Date().toISOString().slice
17
17
  /** Os arquivos locais do Brito não devem ir para o git por acidente. */
18
18
  function ensureIgnore(root) {
19
19
  const f = path.join(dirOf(root), ".gitignore");
20
- if (!fs.existsSync(f))
21
- fs.writeFileSync(f, ".journal.jsonl\n.pending/\n.trash/\n");
20
+ try {
21
+ fs.writeFileSync(f, ".journal.jsonl\n.pending/\n.trash/\n", { flag: "wx" });
22
+ }
23
+ catch (e) {
24
+ if (e.code !== "EEXIST")
25
+ throw e;
26
+ }
22
27
  }
23
28
  export function readJournal(root) {
24
29
  try {
package/dist/ui/banner.js CHANGED
@@ -37,7 +37,6 @@ function listLine(label, items, width) {
37
37
  }
38
38
  /** Linhas livres embaixo da janela: moldura (2) + dock com status e prompt. */
39
39
  const BELOW_BANNER = 7;
40
- const clamp = (n, lo, hi) => Math.max(lo, Math.min(hi, n));
41
40
  /** BRITO_BANNER=compact força o banner pequeno; =full força a tela cheia; sem nada, é tela cheia em janela grande. */
42
41
  function wantsFull() {
43
42
  const mode = process.env.BRITO_BANNER;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brito-cli",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "description": "Coding-agent CLI with a code knowledge graph, memory and reviewable skills / CLI de agente de código com grafo de conhecimento, memória e skills revisáveis",
5
5
  "type": "module",
6
6
  "bin": {
@@ -20,7 +20,7 @@
20
20
  "desktop:dmg": "npm run build && npm run bundle && npm --prefix desktop install --no-audit --no-fund && node desktop/package.mjs --dmg"
21
21
  },
22
22
  "dependencies": {
23
- "@anthropic-ai/sdk": "^0.131.0",
23
+ "@anthropic-ai/sdk": "^0.137.0",
24
24
  "@ladybugdb/core": "0.21.2",
25
25
  "@modelcontextprotocol/sdk": "^1.32.0",
26
26
  "commander": "^14.0.3",