wendkeep 0.62.0 → 0.63.0

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/CHANGELOG.md CHANGED
@@ -4,6 +4,35 @@ All notable changes to **wendkeep** are documented here. Format based on
4
4
  [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); this project follows
5
5
  [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [0.63.0] — 2026-07-28
8
+
9
+ ### Added
10
+
11
+ - **O Vault público passa a expor locale e taxonomia de pastas, e o Harness passa a expor o
12
+ store durável de FLOW.** As novas superfícies canônicas estão disponíveis por
13
+ wendkeep/vault e wendkeep/harness e são validadas a partir de um tarball instalado em consumidor
14
+ isolado, inclusive com um ciclo persistido completo.
15
+
16
+ ### Changed
17
+
18
+ - **Locale agora pertence a packages/vault/src e o store de FLOW a packages/harness/src.**
19
+ hooks/locale.mjs e hooks/vault-runtime-store.mjs permanecem como fachadas puras, preservando por
20
+ identidade todas as constantes e funções usadas por consumidores existentes.
21
+ - **A extração stateful não exige migração.** Paths em .brain/runtime, schemas, ids, locks,
22
+ tentativas, recibos, reservas, promoções, atomicidade, contenção multiprocesso e validação física
23
+ de paths mantêm o contrato anterior.
24
+ - **A direção Harness → Vault é verificada pelo índice público canônico.** Vault continua proibido
25
+ de depender do Harness, enquanto CLI, MCP, Integrations, Pi e flow-core permanecem fora deste
26
+ corte modular.
27
+
28
+ ### Fixed
29
+
30
+ - **Promoções concorrentes no Windows/Node 22 não confundem a liberação transitória do lock com
31
+ um path inseguro.** O Vault agora revalida, com backoff curto e limitado, o lock público que
32
+ desaparece entre `lstat` e `realpath` e leituras `ENOENT` de owner/lease. A aquisição compartilha
33
+ um único budget/deadline e a liberação limpa o lock sem resíduo; junctions, reparse points, links
34
+ dangling, erros não transitórios e locks privados `.pending` continuam falhando fechado.
35
+
7
36
  ## [0.62.0] — 2026-07-28
8
37
 
9
38
  ### Added
package/README.en.md CHANGED
@@ -23,6 +23,16 @@ Project Memory v2 kernel, respectively. The root package exposes those surfaces
23
23
  facades and no session data needs migration;
24
24
  see the [modular architecture](docs/en/architecture.md).
25
25
 
26
+ In the **0.63 Harness FLOW Store** phase, `packages/vault/src/locale.mjs` becomes the canonical
27
+ source for Vault locale and taxonomy, while `packages/harness/src/flow-store.mjs` becomes the
28
+ canonical durable FLOW store. The historical `hooks/locale.mjs` and
29
+ `hooks/vault-runtime-store.mjs` facades preserve export identity. Harness depends only on Vault's
30
+ public index — never the reverse — with no migration of paths, schemas, or locks; the tarball
31
+ remains a single artifact published by the root `wendkeep` package.
32
+ Under multiprocess contention, transient release of the public lock and its owner/lease metadata
33
+ is revalidated with a bounded budget/deadline, including final cleanup; junctions, reparse points,
34
+ dangling locks, and non-transient errors are still rejected before any write.
35
+
26
36
  ```bash
27
37
  npm i -D wendkeep && npx wendkeep init # captures from the next session on
28
38
  npx wendkeep import # backfill past Claude + Codex sessions
package/README.md CHANGED
@@ -23,6 +23,16 @@ Project Memory v2 kernel, respectively. The root package exposes those surfaces
23
23
  facades and no session data needs migration;
24
24
  see the [modular architecture](docs/en/architecture.md).
25
25
 
26
+ In the **0.63 Harness FLOW Store** phase, `packages/vault/src/locale.mjs` becomes the canonical
27
+ source for Vault locale and taxonomy, while `packages/harness/src/flow-store.mjs` becomes the
28
+ canonical durable FLOW store. The historical `hooks/locale.mjs` and
29
+ `hooks/vault-runtime-store.mjs` facades preserve export identity. Harness depends only on Vault's
30
+ public index — never the reverse — with no migration of paths, schemas, or locks; the tarball
31
+ remains a single artifact published by the root `wendkeep` package.
32
+ Under multiprocess contention, transient release of the public lock and its owner/lease metadata
33
+ is revalidated with a bounded budget/deadline, including final cleanup; junctions, reparse points,
34
+ dangling locks, and non-transient errors are still rejected before any write.
35
+
26
36
  ```bash
27
37
  npm i -D wendkeep && npx wendkeep init # captures from the next session on
28
38
  npx wendkeep import # backfill past Claude + Codex sessions
package/hooks/locale.mjs CHANGED
@@ -1,73 +1 @@
1
- // hooks/locale.mjs vault locale (i18n, 0.8.0). The locale is a property of the VAULT,
2
- // stored at <vault>/.brain/config.json ({ "locale": "en" }); absent = pt-BR (full backward
3
- // compat). Parsers stay bilingual everywhere; only RENDERING follows the locale.
4
- import { readFileSync } from 'node:fs';
5
- import { join } from 'node:path';
6
-
7
- export const LOCALES = {
8
- 'pt-BR': {
9
- id: 'pt-BR',
10
- folders: {
11
- inbox: '00-Inbox',
12
- project: '01-Projeto',
13
- sessions: '02-Sessões',
14
- linear: '03-Linear',
15
- decisions: '04-Decisões',
16
- bugs: '05-Bugs',
17
- learnings: '06-Aprendizados',
18
- specs: '07-Specs',
19
- changes: '08-Mudanças',
20
- },
21
- months: ['01-JAN', '02-FEV', '03-MAR', '04-ABR', '05-MAI', '06-JUN', '07-JUL', '08-AGO', '09-SET', '10-OUT', '11-NOV', '12-DEZ'],
22
- reqHeading: 'Requisito',
23
- fixTaskVerb: 'mata mutante',
24
- coreSections: ['Preferências do Usuário', 'Padrões Ativos', 'Pendências Abertas'],
25
- },
26
- en: {
27
- id: 'en',
28
- folders: {
29
- inbox: '00-Inbox',
30
- project: '01-Project',
31
- sessions: '02-Sessions',
32
- linear: '03-Linear',
33
- decisions: '04-Decisions',
34
- bugs: '05-Bugs',
35
- learnings: '06-Learnings',
36
- specs: '07-Specs',
37
- changes: '08-Changes',
38
- },
39
- months: ['01-JAN', '02-FEB', '03-MAR', '04-APR', '05-MAY', '06-JUN', '07-JUL', '08-AUG', '09-SEP', '10-OCT', '11-NOV', '12-DEC'],
40
- reqHeading: 'Requirement',
41
- fixTaskVerb: 'kill mutant',
42
- coreSections: ['User Preferences', 'Active Patterns', 'Open Items'],
43
- },
44
- };
45
-
46
- export const DEFAULT_LOCALE = 'pt-BR';
47
-
48
- // Per-process cache: one vault per process (hooks + CLI), reads are hot paths.
49
- const cache = new Map();
50
-
51
- export function getLocale(vaultBase) {
52
- if (!vaultBase) return LOCALES[DEFAULT_LOCALE];
53
- const key = String(vaultBase);
54
- if (cache.has(key)) return cache.get(key);
55
- let id = DEFAULT_LOCALE;
56
- try {
57
- const data = JSON.parse(readFileSync(join(key, '.brain', 'config.json'), 'utf8'));
58
- if (data.locale && LOCALES[data.locale]) id = data.locale;
59
- } catch { /* sem config = pt-BR */ }
60
- const loc = LOCALES[id];
61
- cache.set(key, loc);
62
- return loc;
63
- }
64
-
65
- // Test hook: drop the memoized entry (tests rewrite config.json under one tmpdir).
66
- export function clearLocaleCache() {
67
- cache.clear();
68
- }
69
-
70
- // The full vault taxonomy for a locale (folders + fixed entries), in creation order.
71
- export function vaultFolders(loc) {
72
- return [...Object.values(loc.folders), 'Templates', '.brain'];
73
- }
1
+ export * from '../packages/vault/src/locale.mjs';