vault-go 0.7.0 → 0.8.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/README.md CHANGED
@@ -104,6 +104,8 @@ limitados.
104
104
  - `vault_go_event`: eventos de prompt, ferramenta e resultado.
105
105
  - `vault_go_remember`: observações, decisões, descobertas e resumos.
106
106
  - `vault_go_search`: busca textual com ranking e trechos.
107
+ - `vault_go_search_index`: índice compacto com filtros, trechos e custo estimado.
108
+ - `vault_go_observations`: carrega em lote somente os IDs selecionados.
107
109
  - `vault_go_timeline`: contexto anterior e posterior a uma memória.
108
110
  - `vault_go_context`: contexto progressivo com limite de caracteres.
109
111
  - `vault_go_file_context`: histórico ligado aos arquivos lidos ou modificados.
@@ -121,6 +123,15 @@ limitados.
121
123
 
122
124
  O recurso `vault-go://status` fornece o resumo sanitizado em JSON.
123
125
 
126
+ Para reduzir o uso de contexto, prefira a recuperação em três camadas:
127
+
128
+ 1. Pesquise com `vault_go_search_index`, usando projeto, origem, conceitos,
129
+ arquivos e intervalo de datas quando conhecidos.
130
+ 2. Abra `vault_go_timeline` somente para os resultados que precisam de
131
+ contexto cronológico.
132
+ 3. Envie os IDs escolhidos a `vault_go_observations` para carregar o conteúdo
133
+ completo em um único lote tenant-scoped.
134
+
124
135
  As bases, filtros, vínculos e feed ficam exclusivamente no PostgreSQL da
125
136
  plataforma. A consulta retorna evidências e `synthesisAvailable: false`; o
126
137
  cliente MCP faz a síntese, evitando respostas inventadas e chaves ocultas no
package/dist/cloud.d.ts CHANGED
@@ -8,6 +8,8 @@ export interface VaultMemoryApi {
8
8
  remember(input: Record<string, unknown>): Promise<unknown>;
9
9
  forget(id: string): Promise<unknown>;
10
10
  search(input: Record<string, unknown>): Promise<unknown>;
11
+ searchIndex(input: Record<string, unknown>): Promise<unknown>;
12
+ observations(ids: string[]): Promise<unknown>;
11
13
  timeline(input: Record<string, unknown>): Promise<unknown>;
12
14
  context(input: Record<string, unknown>): Promise<unknown>;
13
15
  fileContext(input: Record<string, unknown>): Promise<unknown>;
@@ -40,6 +42,8 @@ export declare class VaultCloudClient implements VaultMemoryApi {
40
42
  remember(input: Record<string, unknown>): Promise<unknown>;
41
43
  forget(id: string): Promise<unknown>;
42
44
  search(input: Record<string, unknown>): Promise<unknown>;
45
+ searchIndex(input: Record<string, unknown>): Promise<unknown>;
46
+ observations(ids: string[]): Promise<unknown>;
43
47
  timeline(input: Record<string, unknown>): Promise<unknown>;
44
48
  context(input: Record<string, unknown>): Promise<unknown>;
45
49
  fileContext(input: Record<string, unknown>): Promise<unknown>;
package/dist/cloud.js CHANGED
@@ -34,6 +34,12 @@ export class VaultCloudClient {
34
34
  async search(input) {
35
35
  return this.request('/memory/search', { method: 'POST', body: input });
36
36
  }
37
+ async searchIndex(input) {
38
+ return this.request('/memory/search/index', { method: 'POST', body: input });
39
+ }
40
+ async observations(ids) {
41
+ return this.request('/memory/memories/batch', { method: 'POST', body: { ids } });
42
+ }
37
43
  async timeline(input) {
38
44
  return this.request('/memory/timeline', { method: 'POST', body: input });
39
45
  }
package/dist/server.js CHANGED
@@ -127,10 +127,40 @@ export function createVaultGoServer(home = vaultHome(), cloud = new VaultCloudCl
127
127
  projectId: uuid.optional(),
128
128
  kind: z.string().trim().max(100).optional(),
129
129
  memoryType: z.string().trim().max(100).optional(),
130
+ platformSource: z.string().trim().max(100).optional(),
131
+ concepts: z.array(z.string().trim().min(1).max(500)).max(50).default([]),
132
+ files: z.array(z.string().trim().min(1).max(2_000)).max(50).default([]),
133
+ dateStartEpoch: z.number().int().positive().optional(),
134
+ dateEndEpoch: z.number().int().positive().optional(),
130
135
  limit: z.number().int().min(1).max(200).default(20),
131
136
  },
132
137
  annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
133
138
  }, async (input) => run(() => cloud.search(input)));
139
+ server.registerTool('vault_go_search_index', {
140
+ title: 'Pesquisar índice compacto',
141
+ description: 'Primeira camada de recuperação: retorna metadados, trechos e custo estimado sem carregar o conteúdo completo.',
142
+ inputSchema: {
143
+ query: z.string().trim().min(1).max(1_000),
144
+ projectId: uuid.optional(),
145
+ kind: z.string().trim().max(100).optional(),
146
+ memoryType: z.string().trim().max(100).optional(),
147
+ platformSource: z.string().trim().max(100).optional(),
148
+ concepts: z.array(z.string().trim().min(1).max(500)).max(50).default([]),
149
+ files: z.array(z.string().trim().min(1).max(2_000)).max(50).default([]),
150
+ dateStartEpoch: z.number().int().positive().optional(),
151
+ dateEndEpoch: z.number().int().positive().optional(),
152
+ limit: z.number().int().min(1).max(200).default(20),
153
+ },
154
+ annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
155
+ }, async (input) => run(() => cloud.searchIndex(input)));
156
+ server.registerTool('vault_go_observations', {
157
+ title: 'Carregar observações por ID',
158
+ description: 'Terceira camada de recuperação: carrega em lote somente as observações escolhidas no índice ou na linha do tempo.',
159
+ inputSchema: {
160
+ ids: z.array(uuid).min(1).max(100),
161
+ },
162
+ annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
163
+ }, async ({ ids }) => run(() => cloud.observations(ids)));
134
164
  server.registerTool('vault_go_timeline', {
135
165
  title: 'Abrir linha do tempo',
136
166
  description: 'Retorna memórias anteriores e posteriores a uma memória âncora.',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vault-go",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Servidor MCP Bun para pesquisar e registrar memória na plataforma Vault.",
5
5
  "type": "module",
6
6
  "bin": {