wendkeep 0.70.0 → 0.71.1
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 +29 -0
- package/README.en.md +2 -2
- package/README.md +2 -2
- package/docs/en/commands/observer.md +54 -28
- package/docs/pt-BR/commands/observer.md +56 -30
- package/package.json +3 -2
- package/src/observer-memory-publish.mjs +334 -0
- package/src/observer-memory.mjs +308 -0
- package/src/observer-publish.mjs +20 -8
- package/src/observer-server.mjs +145 -15
- package/src/observer.mjs +54 -16
- package/web/observer/app.mjs +611 -0
- package/web/observer/favicon.svg +5 -0
- package/web/observer/index.html +125 -0
- package/web/observer/styles.css +229 -0
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.71.1] — 2026-08-17
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **Observer memory authority.** O container local agora recebe a cópia integral das sessões,
|
|
12
|
+
decisões, bugs, aprendizados, specs, changes, CORE, DIGEST, SHARED_MEMORY e estado do brain.
|
|
13
|
+
A API oferece árvore, leitura completa, busca por corpo, sincronização, modos
|
|
14
|
+
`mirror`/`container-read`/`container-authority` e exportação read-only.
|
|
15
|
+
- **Workspace de memória no navegador.** O painel local navega por projeto, sessões, memória,
|
|
16
|
+
changes, sincronização e leitor Markdown completo, sem formulário ou token no loopback.
|
|
17
|
+
- **Importação do WendKeep.** `observer memory import` registra a carga inicial e informa paridade
|
|
18
|
+
por arquivo e hash; o volume Docker permanece preservado em rebuild e reinício.
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- **Observer local abre diretamente.** O dashboard não exige mais token, formulário ou
|
|
23
|
+
`Authorization` para consultar a projeção no loopback; o compose também inicia sem variável de
|
|
24
|
+
token obrigatória.
|
|
25
|
+
|
|
26
|
+
## [0.71.0] — 2026-08-17
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
|
|
30
|
+
- **Painel web local do Observer.** O servidor agora entrega uma interface read-only no navegador
|
|
31
|
+
para consultar projetos, saúde, sessões, changes e snapshots sanitizados da última captura. A interface é empacotada no
|
|
32
|
+
npm e na imagem Docker, exige o token local para consultar `/v1`, mantém o token somente no
|
|
33
|
+
`sessionStorage` da aba e
|
|
34
|
+
não amplia o contrato de dados sanitizados.
|
|
35
|
+
|
|
7
36
|
## [0.70.0] — 2026-08-17
|
|
8
37
|
|
|
9
38
|
### Added
|
package/README.en.md
CHANGED
|
@@ -78,7 +78,7 @@ npx wendkeep import # backfill past Claude + Codex sess
|
|
|
78
78
|
|
|
79
79
|
## The problem: the context dies when the window closes
|
|
80
80
|
|
|
81
|
-
Decisions, dead ends, the reason you chose X over Y — gone next session. The pieces to fix that exist but are scattered (qmd‑sessions, memsearch, Nexus, hand‑written hooks). wendkeep ships
|
|
81
|
+
Decisions, dead ends, the reason you chose X over Y — gone next session. The pieces to fix that exist but are scattered (qmd‑sessions, memsearch, Nexus, hand‑written hooks). wendkeep ships local capture plus an optional Docker Observer that keeps complete memory browsable without depending on Obsidian.
|
|
82
82
|
|
|
83
83
|
| | |
|
|
84
84
|
|---|---|
|
|
@@ -88,7 +88,7 @@ Decisions, dead ends, the reason you chose X over Y — gone next session. The p
|
|
|
88
88
|
| **Cost** — what it all cost | Per‑model, cache‑aware token pricing per session — plus `cost --trend` with a run‑rate projection across the whole vault; research previews without a final rate remain unestimated. |
|
|
89
89
|
| **Multi‑agent** — one vault, both agents | `init` wires the session hooks into `.claude/settings.json` *and* `.codex/hooks.json`, and every note is tagged with the agent that wrote it: Claude Code is detected from its environment, anything else is recorded as Codex. One shared graph, whichever agent you are in. |
|
|
90
90
|
| **Local‑first** — no cloud, no account | Everything is plain Markdown on your disk. An optional MCP server (`@bitbonsai/mcpvault`) lets the agent read/write the vault. |
|
|
91
|
-
| **Local Observer** — many projects, one view | `wendkeep observer` keeps a
|
|
91
|
+
| **Local Observer** — many projects, one view | `wendkeep observer` keeps snapshots plus a complete copy of sessions, decisions, bugs, learnings, specs, and changes in the Docker volume; the read-only dashboard opens directly at `http://127.0.0.1:8787/`, local mode has no token, and unavailable hooks use an outbox without blocking the session. |
|
|
92
92
|
|
|
93
93
|
## Requirements
|
|
94
94
|
|
package/README.md
CHANGED
|
@@ -78,7 +78,7 @@ npx wendkeep import # backfill past Claude + Codex sess
|
|
|
78
78
|
|
|
79
79
|
## The problem: the context dies when the window closes
|
|
80
80
|
|
|
81
|
-
Decisions, dead ends, the reason you chose X over Y — gone next session. The pieces to fix that exist but are scattered (qmd‑sessions, memsearch, Nexus, hand‑written hooks). wendkeep ships
|
|
81
|
+
Decisions, dead ends, the reason you chose X over Y — gone next session. The pieces to fix that exist but are scattered (qmd‑sessions, memsearch, Nexus, hand‑written hooks). wendkeep ships local capture plus an optional Docker Observer that keeps complete memory browsable without depending on Obsidian.
|
|
82
82
|
|
|
83
83
|
| | |
|
|
84
84
|
|---|---|
|
|
@@ -88,7 +88,7 @@ Decisions, dead ends, the reason you chose X over Y — gone next session. The p
|
|
|
88
88
|
| **Cost** — what it all cost | Per‑model, cache‑aware token pricing per session — plus `cost --trend` with a run‑rate projection across the whole vault; research previews without a final rate remain unestimated. |
|
|
89
89
|
| **Multi‑agent** — one vault, both agents | `init` wires the session hooks into `.claude/settings.json` *and* `.codex/hooks.json`, and every note is tagged with the agent that wrote it: Claude Code is detected from its environment, anything else is recorded as Codex. One shared graph, whichever agent you are in. |
|
|
90
90
|
| **Local‑first** — no cloud, no account | Everything is plain Markdown on your disk. An optional MCP server (`@bitbonsai/mcpvault`) lets the agent read/write the vault. |
|
|
91
|
-
| **Local Observer** — many projects, one view | `wendkeep observer` keeps a
|
|
91
|
+
| **Local Observer** — many projects, one view | `wendkeep observer` keeps snapshots plus a complete copy of sessions, decisions, bugs, learnings, specs, and changes in the Docker volume; the read-only dashboard opens directly at `http://127.0.0.1:8787/`, local mode has no token, and unavailable hooks use an outbox without blocking the session. |
|
|
92
92
|
|
|
93
93
|
## Requirements
|
|
94
94
|
|
|
@@ -4,23 +4,25 @@
|
|
|
4
4
|
|
|
5
5
|
## Purpose
|
|
6
6
|
|
|
7
|
-
The Observer consolidates observability for multiple WendKeep projects in a local service
|
|
8
|
-
|
|
7
|
+
The Observer consolidates observability for multiple WendKeep projects in a local service and
|
|
8
|
+
stores a complete copy of the memory published by hooks in the Docker volume. The content can be
|
|
9
|
+
browsed and searched in the container without depending on Obsidian for queries.
|
|
9
10
|
|
|
10
11
|
## When to use
|
|
11
12
|
|
|
12
|
-
Use it to query
|
|
13
|
-
|
|
13
|
+
Use it to query changes, sessions, decisions, bugs, learnings, specs, brain documents, and health
|
|
14
|
+
across projects through one local memory. During the transition, the vault is preserved as a
|
|
15
|
+
recovery copy; the Observer is authoritative for queries made through its container.
|
|
14
16
|
|
|
15
17
|
## When not to use
|
|
16
18
|
|
|
17
19
|
Do not use the Observer to edit, complete, or archive changes, curate memory, store transcripts,
|
|
18
|
-
or
|
|
20
|
+
or expose the service to the network. Edits still go through local WendKeep hooks.
|
|
19
21
|
|
|
20
22
|
## Prerequisites
|
|
21
23
|
|
|
22
|
-
Initialize projects with WendKeep
|
|
23
|
-
|
|
24
|
+
Initialize projects with WendKeep and explicitly register each project before starting the HTTP
|
|
25
|
+
server. The default local mode has no token to configure.
|
|
24
26
|
|
|
25
27
|
## Syntax
|
|
26
28
|
|
|
@@ -28,6 +30,7 @@ starting the HTTP server.
|
|
|
28
30
|
npx wendkeep observer status --data-dir <directory> --json
|
|
29
31
|
npx wendkeep observer register --project <project> --vault <vault> --data-dir <directory>
|
|
30
32
|
npx wendkeep observer publish --project <project> --vault <vault> --data-dir <directory>
|
|
33
|
+
npx wendkeep observer memory import --project <project> --vault <vault> --url http://127.0.0.1:8787 --json
|
|
31
34
|
npx wendkeep observer serve --host 127.0.0.1 --port 8787 --data-dir <directory>
|
|
32
35
|
```
|
|
33
36
|
|
|
@@ -35,17 +38,17 @@ npx wendkeep observer serve --host 127.0.0.1 --port 8787 --data-dir <directory>
|
|
|
35
38
|
|
|
36
39
|
- `--data-dir` selects the local event and index directory; the default is
|
|
37
40
|
`WENDKEEP_OBSERVER_DATA_DIR` or `~/.wendkeep-observer`.
|
|
38
|
-
- `--project` and `--vault` identify a project
|
|
41
|
+
- `--project` and `--vault` identify a project for `register`, `publish`, and `memory import`.
|
|
39
42
|
- `--host` accepts only `127.0.0.1`, `localhost`, or `::1`; other hosts are rejected before
|
|
40
43
|
listening.
|
|
41
|
-
-
|
|
44
|
+
- `/v1` is open in the default local mode; keep `--host 127.0.0.1` and do not publish the port on
|
|
45
|
+
a network address.
|
|
42
46
|
- Exit `0` means success; exit `1` means configuration or operation failure; the publisher hook
|
|
43
47
|
also returns `0` when the Observer is unavailable.
|
|
44
48
|
|
|
45
49
|
## Examples
|
|
46
50
|
|
|
47
51
|
```powershell
|
|
48
|
-
$env:WENDKEEP_OBSERVER_TOKEN = '<local-token>'
|
|
49
52
|
npx wendkeep observer register --project C:\GitHub\WendKeep --vault C:\GitHub\WendKeep\.WendKeep-vault --data-dir C:\WendKeepObserver
|
|
50
53
|
npx wendkeep observer serve --host 127.0.0.1 --port 8787 --data-dir C:\WendKeepObserver
|
|
51
54
|
$env:WENDKEEP_OBSERVER_URL = 'http://127.0.0.1:8787'
|
|
@@ -54,30 +57,46 @@ $env:WENDKEEP_OBSERVER_URL = 'http://127.0.0.1:8787'
|
|
|
54
57
|
For local Docker:
|
|
55
58
|
|
|
56
59
|
```powershell
|
|
57
|
-
$env:WENDKEEP_OBSERVER_TOKEN = '<local-token>'
|
|
58
60
|
docker compose -f docker/wendkeep-observer/compose.yaml up -d --build
|
|
59
61
|
```
|
|
60
62
|
|
|
63
|
+
## Local web dashboard
|
|
64
|
+
|
|
65
|
+
With the server running, open [http://127.0.0.1:8787/](http://127.0.0.1:8787/) in a browser. The
|
|
66
|
+
dashboard is served by the same process and opens directly, without a form or token. Keep the port
|
|
67
|
+
bound to the computer loopback; do not expose this address on a network interface.
|
|
68
|
+
|
|
69
|
+
The dashboard shows the multi-project list, version, health, latest session, active change, change
|
|
70
|
+
count, and last capture time. Opening a project exposes Overview, Sessions, Memory, Changes, and
|
|
71
|
+
Sync screens. Each list opens the complete Markdown document in a read-only reader, with local
|
|
72
|
+
filtering, body search, and a source toggle. Loading, empty, unavailable-server, conflict, and
|
|
73
|
+
stale-data states are visible, with manual refresh and an automatic 15-second refresh.
|
|
74
|
+
|
|
75
|
+
If the browser shows the shell but the list fails, check the service health at
|
|
76
|
+
`http://127.0.0.1:8787/healthz` and confirm that the container is running.
|
|
77
|
+
|
|
61
78
|
## Expected result
|
|
62
79
|
|
|
63
|
-
`register` stores
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
80
|
+
`register` stores `project_id`, name, version, and registration time. `publish` reads the local
|
|
81
|
+
vault, produces the snapshot, and also sends idempotent events containing the complete content of
|
|
82
|
+
sessions, decisions, bugs, learnings, specs, changes, CORE, DIGEST, SHARED_MEMORY, and brain
|
|
83
|
+
state. The container stores Markdown under `/data/memory` plus `MEMORY_EVENTS.jsonl` and
|
|
84
|
+
`MEMORY_INDEX.json` in the `observer-data` volume; it does not mount `C:\GitHub` or any
|
|
85
|
+
`.WendKeep-vault`. `memory import` performs the initial load and returns file/hash parity.
|
|
67
86
|
|
|
68
87
|
`init` projects `observer-publish` into `SessionStart` and `Stop` after the primary hooks. Without
|
|
69
|
-
`WENDKEEP_OBSERVER_URL`, the hook is a no-op. When the server is stopped, it writes to
|
|
70
|
-
`.brain/observer-outbox/` and
|
|
88
|
+
`WENDKEEP_OBSERVER_URL`, the hook is a no-op. When the server is stopped, it writes snapshots to
|
|
89
|
+
`.brain/observer-outbox/` and complete memory to `.brain/observer-memory-outbox/` without blocking
|
|
90
|
+
the session; a later run retries both event types.
|
|
71
91
|
|
|
72
92
|
## Common errors and diagnosis
|
|
73
93
|
|
|
74
94
|
- `project_not_registered`: run `observer register` before publishing.
|
|
75
|
-
- `unauthorized`: check `Authorization: Bearer <token>` and `WENDKEEP_OBSERVER_TOKEN`.
|
|
76
95
|
- `host loopback`: replace `0.0.0.0` or a LAN address with `127.0.0.1`.
|
|
77
96
|
- Pending outbox: the service was unavailable; preserve `.brain/observer-outbox/` and rerun the
|
|
78
97
|
publisher. Do not delete events manually.
|
|
79
|
-
-
|
|
80
|
-
|
|
98
|
+
- If memory is incomplete, check the Sync screen, preserve the outbox, and run
|
|
99
|
+
`observer memory import` to rebuild the copy from the vault.
|
|
81
100
|
|
|
82
101
|
## Next steps
|
|
83
102
|
|
|
@@ -87,9 +106,9 @@ projection.
|
|
|
87
106
|
|
|
88
107
|
## Data authority
|
|
89
108
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
109
|
+
The container is canonical for Observer queries and stores the complete published content. The
|
|
110
|
+
vault remains preserved locally during migration as a transition and recovery copy; Observer
|
|
111
|
+
screens do not complete, archive, repair, or promote state.
|
|
93
112
|
|
|
94
113
|
## Minimal API
|
|
95
114
|
|
|
@@ -97,8 +116,15 @@ promote state in a vault.
|
|
|
97
116
|
- `GET /v1/projects` — projects with an accepted snapshot.
|
|
98
117
|
- `GET /v1/projects/:project_id` — the latest project snapshot.
|
|
99
118
|
- `GET /v1/projects/:project_id/changes` — change summary from the snapshot.
|
|
100
|
-
- `PUT /v1/projects/:project_id` —
|
|
101
|
-
- `POST /v1/projects/:project_id/snapshot` —
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
memory
|
|
119
|
+
- `PUT /v1/projects/:project_id` — explicit local registration.
|
|
120
|
+
- `POST /v1/projects/:project_id/snapshot` — idempotent local ingestion.
|
|
121
|
+
- `GET /v1/projects/:project_id/memory/tree` — document tree and metadata.
|
|
122
|
+
- `GET /v1/projects/:project_id/memory/document?path=...` — complete Markdown content.
|
|
123
|
+
- `GET /v1/projects/:project_id/memory/search?q=...` — path and body search.
|
|
124
|
+
- `GET /v1/projects/:project_id/sync` — mode, counts, conflicts, and latest event.
|
|
125
|
+
- `PUT /v1/projects/:project_id/sync` — explicitly changes the local mode.
|
|
126
|
+
- `GET /v1/projects/:project_id/memory/export` — read-only export with complete content.
|
|
127
|
+
- `POST /v1/projects/:project_id/memory/events` — idempotent batch ingestion.
|
|
128
|
+
|
|
129
|
+
The `/v1` routes reject oversized bodies and validate project, path, revision, hash, and
|
|
130
|
+
isolation before writing content to the volume.
|
|
@@ -4,23 +4,26 @@
|
|
|
4
4
|
|
|
5
5
|
## Objetivo
|
|
6
6
|
|
|
7
|
-
O Observer consolida a observabilidade de vários projetos WendKeep em um serviço local
|
|
8
|
-
|
|
7
|
+
O Observer consolida a observabilidade de vários projetos WendKeep em um serviço local e grava no
|
|
8
|
+
volume Docker uma cópia integral da memória publicada pelos hooks. O conteúdo fica disponível
|
|
9
|
+
para navegação e busca no próprio container, sem depender do Obsidian para consulta.
|
|
9
10
|
|
|
10
11
|
## Quando usar
|
|
11
12
|
|
|
12
|
-
Use para consultar changes, sessões,
|
|
13
|
-
|
|
13
|
+
Use para consultar changes, sessões, decisões, bugs, aprendizados, specs, documentos do brain e
|
|
14
|
+
saúde de vários projetos em uma única memória local. Durante a transição, o vault continua sendo
|
|
15
|
+
preservado como cópia de origem para recuperação; o Observer é a autoridade de consulta do seu
|
|
16
|
+
container.
|
|
14
17
|
|
|
15
18
|
## Quando não usar
|
|
16
19
|
|
|
17
20
|
Não use o Observer para editar, concluir ou arquivar changes, curar memória, armazenar transcripts
|
|
18
|
-
ou
|
|
21
|
+
ou expor o serviço na rede. As edições continuam passando pelos hooks e pelo WendKeep local.
|
|
19
22
|
|
|
20
23
|
## Pré-requisitos
|
|
21
24
|
|
|
22
|
-
Tenha os projetos inicializados com WendKeep
|
|
23
|
-
|
|
25
|
+
Tenha os projetos inicializados com WendKeep e registre explicitamente cada projeto antes de
|
|
26
|
+
iniciar o servidor HTTP. No modo local padrão não há token para configurar.
|
|
24
27
|
|
|
25
28
|
## Sintaxe
|
|
26
29
|
|
|
@@ -28,6 +31,7 @@ token local antes de iniciar o servidor HTTP.
|
|
|
28
31
|
npx wendkeep observer status --data-dir <diretório> --json
|
|
29
32
|
npx wendkeep observer register --project <projeto> --vault <vault> --data-dir <diretório>
|
|
30
33
|
npx wendkeep observer publish --project <projeto> --vault <vault> --data-dir <diretório>
|
|
34
|
+
npx wendkeep observer memory import --project <projeto> --vault <vault> --url http://127.0.0.1:8787 --json
|
|
31
35
|
npx wendkeep observer serve --host 127.0.0.1 --port 8787 --data-dir <diretório>
|
|
32
36
|
```
|
|
33
37
|
|
|
@@ -35,18 +39,17 @@ npx wendkeep observer serve --host 127.0.0.1 --port 8787 --data-dir <diretório>
|
|
|
35
39
|
|
|
36
40
|
- `--data-dir` escolhe o diretório local de eventos e índice; o padrão é
|
|
37
41
|
`WENDKEEP_OBSERVER_DATA_DIR` ou `~/.wendkeep-observer`.
|
|
38
|
-
- `--project` e `--vault` identificam o projeto
|
|
42
|
+
- `--project` e `--vault` identificam o projeto nos comandos `register`, `publish` e `memory import`.
|
|
39
43
|
- `--host` aceita somente `127.0.0.1`, `localhost` ou `::1`; outros hosts são recusados antes do
|
|
40
44
|
listen.
|
|
41
|
-
-
|
|
42
|
-
|
|
45
|
+
- as rotas `/v1` ficam abertas no modo local padrão; mantenha `--host 127.0.0.1` e não publique a
|
|
46
|
+
porta em um endereço de rede.
|
|
43
47
|
- Exit `0` indica sucesso; exit `1` indica falha de configuração ou operação; o hook publisher
|
|
44
48
|
também retorna `0` quando o Observer está indisponível.
|
|
45
49
|
|
|
46
50
|
## Exemplos
|
|
47
51
|
|
|
48
52
|
```powershell
|
|
49
|
-
$env:WENDKEEP_OBSERVER_TOKEN = '<token-local>'
|
|
50
53
|
npx wendkeep observer register --project C:\GitHub\WendKeep --vault C:\GitHub\WendKeep\.WendKeep-vault --data-dir C:\WendKeepObserver
|
|
51
54
|
npx wendkeep observer serve --host 127.0.0.1 --port 8787 --data-dir C:\WendKeepObserver
|
|
52
55
|
$env:WENDKEEP_OBSERVER_URL = 'http://127.0.0.1:8787'
|
|
@@ -55,31 +58,47 @@ $env:WENDKEEP_OBSERVER_URL = 'http://127.0.0.1:8787'
|
|
|
55
58
|
Para Docker local:
|
|
56
59
|
|
|
57
60
|
```powershell
|
|
58
|
-
$env:WENDKEEP_OBSERVER_TOKEN = '<token-local>'
|
|
59
61
|
docker compose -f docker/wendkeep-observer/compose.yaml up -d --build
|
|
60
62
|
```
|
|
61
63
|
|
|
64
|
+
## Painel web local
|
|
65
|
+
|
|
66
|
+
Com o servidor em execução, abra [http://127.0.0.1:8787/](http://127.0.0.1:8787/) no navegador.
|
|
67
|
+
O painel é servido pelo mesmo processo e abre diretamente, sem formulário ou token. A porta fica
|
|
68
|
+
presa ao loopback do computador; não coloque o endereço em uma interface de rede.
|
|
69
|
+
|
|
70
|
+
O painel mostra a lista multi-projeto, versão, saúde, sessão mais recente, change ativa, contagem
|
|
71
|
+
de changes e data da última captura. Ao abrir um projeto, o workspace oferece as telas Overview,
|
|
72
|
+
Sessões, Memória, Changes e Sincronização. Cada lista abre o documento Markdown completo em um
|
|
73
|
+
leitor read-only, com filtro local, busca no corpo e alternância para a fonte. Os estados de
|
|
74
|
+
carregamento, vazio, servidor indisponível, conflito e dados desatualizados ficam visíveis, e a
|
|
75
|
+
atualização pode ser manual ou automática a cada 15 segundos.
|
|
76
|
+
|
|
77
|
+
Se o navegador mostrar a tela mas a lista falhar, confirme a saúde em
|
|
78
|
+
`http://127.0.0.1:8787/healthz` e verifique se o container está em execução.
|
|
79
|
+
|
|
62
80
|
## Resultado esperado
|
|
63
81
|
|
|
64
|
-
`register` grava
|
|
65
|
-
produz
|
|
66
|
-
|
|
67
|
-
|
|
82
|
+
`register` grava `project_id`, nome, versão e data de registro. `publish` lê o vault local,
|
|
83
|
+
produz o snapshot e também envia eventos idempotentes com o conteúdo integral das sessões,
|
|
84
|
+
decisões, bugs, aprendizados, specs, changes, CORE, DIGEST, SHARED_MEMORY e estado do brain. O
|
|
85
|
+
container grava os Markdown em `/data/memory` e mantém `MEMORY_EVENTS.jsonl` e
|
|
86
|
+
`MEMORY_INDEX.json` no volume `observer-data`; não monta `C:\GitHub` nem qualquer
|
|
87
|
+
`.WendKeep-vault`. `memory import` faz a carga inicial e retorna a paridade por arquivo e hash.
|
|
68
88
|
|
|
69
89
|
O `init` projeta `observer-publish` para `SessionStart` e `Stop` depois dos hooks principais. Sem
|
|
70
|
-
`WENDKEEP_OBSERVER_URL`, o hook é no-op. Com o servidor parado, ele grava em
|
|
71
|
-
`.brain/observer-outbox/` e
|
|
72
|
-
|
|
90
|
+
`WENDKEEP_OBSERVER_URL`, o hook é no-op. Com o servidor parado, ele grava os snapshots em
|
|
91
|
+
`.brain/observer-outbox/` e a memória integral em `.brain/observer-memory-outbox/`, sem bloquear a
|
|
92
|
+
sessão; uma execução posterior tenta reenviar os dois tipos de evento.
|
|
73
93
|
|
|
74
94
|
## Erros comuns e diagnóstico
|
|
75
95
|
|
|
76
96
|
- `project_not_registered`: rode `observer register` antes de publicar.
|
|
77
|
-
- `unauthorized`: confira `Authorization: Bearer <token>` e `WENDKEEP_OBSERVER_TOKEN`.
|
|
78
97
|
- `host loopback`: troque `0.0.0.0` ou endereço LAN por `127.0.0.1`.
|
|
79
98
|
- Outbox pendente: o serviço estava indisponível; preserve `.brain/observer-outbox/` e repita o
|
|
80
99
|
publisher. Não apague eventos manualmente.
|
|
81
|
-
-
|
|
82
|
-
|
|
100
|
+
- Se a memória ficar incompleta, verifique a tela Sincronização, preserve o outbox e rode
|
|
101
|
+
`observer memory import` para reconstruir a cópia a partir do vault.
|
|
83
102
|
|
|
84
103
|
## Próximos passos
|
|
85
104
|
|
|
@@ -88,9 +107,9 @@ removido com `docker compose down -v` durante a operação normal, pois isso apa
|
|
|
88
107
|
|
|
89
108
|
## Autoridade dos dados
|
|
90
109
|
|
|
91
|
-
O
|
|
92
|
-
|
|
93
|
-
arquivam, reparam ou promovem estado
|
|
110
|
+
O container é a memória canônica para consultas do Observer e guarda o conteúdo integral
|
|
111
|
+
publicado. O vault continua preservado localmente durante a migração como cópia de transição e
|
|
112
|
+
fonte de recuperação; as telas do Observer não concluem, arquivam, reparam ou promovem estado.
|
|
94
113
|
|
|
95
114
|
## API mínima
|
|
96
115
|
|
|
@@ -98,8 +117,15 @@ arquivam, reparam ou promovem estado no vault.
|
|
|
98
117
|
- `GET /v1/projects` — projetos com snapshot aceito.
|
|
99
118
|
- `GET /v1/projects/:project_id` — último snapshot do projeto.
|
|
100
119
|
- `GET /v1/projects/:project_id/changes` — resumo das changes do snapshot.
|
|
101
|
-
- `PUT /v1/projects/:project_id` — registro explícito
|
|
102
|
-
- `POST /v1/projects/:project_id/snapshot` — ingestão
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
120
|
+
- `PUT /v1/projects/:project_id` — registro explícito local.
|
|
121
|
+
- `POST /v1/projects/:project_id/snapshot` — ingestão local idempotente.
|
|
122
|
+
- `GET /v1/projects/:project_id/memory/tree` — árvore e metadados dos documentos.
|
|
123
|
+
- `GET /v1/projects/:project_id/memory/document?path=...` — conteúdo Markdown integral.
|
|
124
|
+
- `GET /v1/projects/:project_id/memory/search?q=...` — busca no caminho e no corpo.
|
|
125
|
+
- `GET /v1/projects/:project_id/sync` — modo, contagem, conflitos e último evento.
|
|
126
|
+
- `PUT /v1/projects/:project_id/sync` — altera explicitamente o modo local.
|
|
127
|
+
- `GET /v1/projects/:project_id/memory/export` — exportação read-only com conteúdo completo.
|
|
128
|
+
- `POST /v1/projects/:project_id/memory/events` — ingestão idempotente em lote.
|
|
129
|
+
|
|
130
|
+
As rotas `/v1` rejeitam corpo acima do limite e validam projeto, caminho, revisão, hash e
|
|
131
|
+
isolamento antes de gravar o conteúdo no volume.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wendkeep",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.71.1",
|
|
4
4
|
"description": "Vault-first persistent memory for AI coding agents, with an optional profile-aware governance runtime: OFF, FLOW, GUIDE, GOVERN, or ASSURE. Local-first and agent-agnostic (Claude Code, Codex, Cursor…).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"workspaces": [
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"hooks",
|
|
31
31
|
"packages",
|
|
32
32
|
"schema",
|
|
33
|
+
"web/observer",
|
|
33
34
|
"docs/pt-BR/commands/*.md",
|
|
34
35
|
"docs/en/commands/*.md",
|
|
35
36
|
"README.md",
|
|
@@ -40,7 +41,7 @@
|
|
|
40
41
|
"node": ">=18"
|
|
41
42
|
},
|
|
42
43
|
"scripts": {
|
|
43
|
-
"check": "node --check scripts/release.mjs && node --check scripts/release-plan.mjs && node --check bin/wendkeep.mjs && node --check packages/cli/src/index.mjs && node --check src/init.mjs && node --check src/doctor.mjs && node --check src/project-vault.mjs && node --check src/observer-snapshot.mjs && node --check src/observer-store.mjs && node --check src/observer-server.mjs && node --check src/observer.mjs && node --check src/observer-publish.mjs && node --check src/operating-profile.mjs && node --check src/profile.mjs && node --check src/flow.mjs && node --check hooks/observer-publish.mjs && node --check hooks/operating-profile-runtime.mjs && node --check hooks/operating-profile-task-store.mjs && node --check hooks/flow-core.mjs && node --check hooks/flow-protected-policy.mjs && node --check hooks/git-snapshot.mjs && node --check hooks/vault-path-safety.mjs && node --check hooks/vault-runtime-store.mjs && node --check packages/harness/src/index.mjs && node --check packages/harness/src/flow-store.mjs && node --check packages/harness/src/operating-profile.mjs && node --check packages/harness/src/sensors-core.mjs && node --check packages/integrations/src/host-hooks.mjs && node --check packages/integrations/src/hook-envelope.mjs && node --check packages/integrations/src/prompt-content.mjs && node --check packages/integrations/src/transcript-usage.mjs && node --check packages/integrations/src/transcripts.mjs && node --check packages/integrations/src/session-identity.mjs && node --check packages/integrations/src/index.mjs && node --check packages/mcp/src/config.mjs && node --check packages/mcp/src/index.mjs && node --check packages/vault/src/index.mjs && node --check packages/vault/src/project-vault.mjs && node --check packages/vault/src/vault-path-safety.mjs && node --check packages/vault/src/locale.mjs && node --check packages/vault/src/memory-schema.mjs && node --check packages/vault/src/memory-mode.mjs && node --check packages/vault/src/memory-handoff.mjs && node --check packages/vault/src/memory-store.mjs && node --check packages/vault/src/validate-core.mjs && node --check packages/vault/src/validate-memory.mjs",
|
|
44
|
+
"check": "node --check scripts/release.mjs && node --check scripts/release-plan.mjs && node --check bin/wendkeep.mjs && node --check packages/cli/src/index.mjs && node --check src/init.mjs && node --check src/doctor.mjs && node --check src/project-vault.mjs && node --check src/observer-snapshot.mjs && node --check src/observer-store.mjs && node --check src/observer-memory.mjs && node --check src/observer-memory-publish.mjs && node --check src/observer-server.mjs && node --check src/observer.mjs && node --check src/observer-publish.mjs && node --check src/operating-profile.mjs && node --check src/profile.mjs && node --check src/flow.mjs && node --check web/observer/app.mjs && node --check hooks/observer-publish.mjs && node --check hooks/operating-profile-runtime.mjs && node --check hooks/operating-profile-task-store.mjs && node --check hooks/flow-core.mjs && node --check hooks/flow-protected-policy.mjs && node --check hooks/git-snapshot.mjs && node --check hooks/vault-path-safety.mjs && node --check hooks/vault-runtime-store.mjs && node --check packages/harness/src/index.mjs && node --check packages/harness/src/flow-store.mjs && node --check packages/harness/src/operating-profile.mjs && node --check packages/harness/src/sensors-core.mjs && node --check packages/integrations/src/host-hooks.mjs && node --check packages/integrations/src/hook-envelope.mjs && node --check packages/integrations/src/prompt-content.mjs && node --check packages/integrations/src/transcript-usage.mjs && node --check packages/integrations/src/transcripts.mjs && node --check packages/integrations/src/session-identity.mjs && node --check packages/integrations/src/index.mjs && node --check packages/mcp/src/config.mjs && node --check packages/mcp/src/index.mjs && node --check packages/vault/src/index.mjs && node --check packages/vault/src/project-vault.mjs && node --check packages/vault/src/vault-path-safety.mjs && node --check packages/vault/src/locale.mjs && node --check packages/vault/src/memory-schema.mjs && node --check packages/vault/src/memory-mode.mjs && node --check packages/vault/src/memory-handoff.mjs && node --check packages/vault/src/memory-store.mjs && node --check packages/vault/src/validate-core.mjs && node --check packages/vault/src/validate-memory.mjs",
|
|
44
45
|
"test": "node --test --test-concurrency=2",
|
|
45
46
|
"release": "node scripts/release.mjs",
|
|
46
47
|
"release:dry": "node scripts/release.mjs --dry-run",
|