vault-go 0.2.0 → 0.3.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 +1 -0
- package/dist/cloud.d.ts +2 -0
- package/dist/cloud.js +3 -0
- package/dist/server.js +11 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -66,6 +66,7 @@ renovação automática da sessão.
|
|
|
66
66
|
- `vault_go_search`: busca textual com ranking e trechos.
|
|
67
67
|
- `vault_go_timeline`: contexto anterior e posterior a uma memória.
|
|
68
68
|
- `vault_go_context`: contexto progressivo com limite de caracteres.
|
|
69
|
+
- `vault_go_file_context`: histórico ligado aos arquivos lidos ou modificados.
|
|
69
70
|
- `vault_go_stats`: contagens isoladas da conta.
|
|
70
71
|
- `vault_go_forget`: exclusão explícita de uma memória.
|
|
71
72
|
|
package/dist/cloud.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export interface VaultMemoryApi {
|
|
|
10
10
|
search(input: Record<string, unknown>): Promise<unknown>;
|
|
11
11
|
timeline(input: Record<string, unknown>): Promise<unknown>;
|
|
12
12
|
context(input: Record<string, unknown>): Promise<unknown>;
|
|
13
|
+
fileContext(input: Record<string, unknown>): Promise<unknown>;
|
|
13
14
|
stats(): Promise<unknown>;
|
|
14
15
|
}
|
|
15
16
|
export declare class VaultCloudClient implements VaultMemoryApi {
|
|
@@ -27,6 +28,7 @@ export declare class VaultCloudClient implements VaultMemoryApi {
|
|
|
27
28
|
search(input: Record<string, unknown>): Promise<unknown>;
|
|
28
29
|
timeline(input: Record<string, unknown>): Promise<unknown>;
|
|
29
30
|
context(input: Record<string, unknown>): Promise<unknown>;
|
|
31
|
+
fileContext(input: Record<string, unknown>): Promise<unknown>;
|
|
30
32
|
stats(): Promise<unknown>;
|
|
31
33
|
private endpoint;
|
|
32
34
|
private accessToken;
|
package/dist/cloud.js
CHANGED
|
@@ -40,6 +40,9 @@ export class VaultCloudClient {
|
|
|
40
40
|
async context(input) {
|
|
41
41
|
return this.request('/memory/context', { method: 'POST', body: input });
|
|
42
42
|
}
|
|
43
|
+
async fileContext(input) {
|
|
44
|
+
return this.request('/memory/files/context', { method: 'POST', body: input });
|
|
45
|
+
}
|
|
43
46
|
async stats() {
|
|
44
47
|
return this.request('/memory/stats');
|
|
45
48
|
}
|
package/dist/server.js
CHANGED
|
@@ -141,6 +141,17 @@ export function createVaultGoServer(home = vaultHome(), cloud = new VaultCloudCl
|
|
|
141
141
|
},
|
|
142
142
|
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
|
|
143
143
|
}, async (input) => run(() => cloud.context(input)));
|
|
144
|
+
server.registerTool('vault_go_file_context', {
|
|
145
|
+
title: 'Contexto de arquivos',
|
|
146
|
+
description: 'Recupera memórias anteriores associadas a um ou mais arquivos do projeto.',
|
|
147
|
+
inputSchema: {
|
|
148
|
+
projectId: uuid,
|
|
149
|
+
paths: z.array(z.string().trim().min(1).max(2_000)).min(1).max(20),
|
|
150
|
+
limit: z.number().int().min(1).max(100).default(20),
|
|
151
|
+
maxChars: z.number().int().min(1_000).max(100_000).default(16_000),
|
|
152
|
+
},
|
|
153
|
+
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
|
|
154
|
+
}, async (input) => run(() => cloud.fileContext(input)));
|
|
144
155
|
server.registerTool('vault_go_stats', {
|
|
145
156
|
title: 'Estatísticas do Vault',
|
|
146
157
|
description: 'Mostra contagens da conta autenticada.',
|