@atrib/recall 0.12.14 → 0.12.16
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/dist/index.d.ts +37 -0
- package/dist/index.js +563 -550
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,36 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* @atrib/recall - local signed-record recall MCP server.
|
|
4
|
+
*
|
|
5
|
+
* Exposes the base recall tool plus sibling query-shape tools to the host agent.
|
|
6
|
+
* Reads signed-record jsonl mirrors (per spec §5.9), VERIFIES the Ed25519
|
|
7
|
+
* signature on each record before returning it, and tags every entry with
|
|
8
|
+
* signature_verified so the agent can distinguish provable past from tampered
|
|
9
|
+
* or partial mirror state.
|
|
10
|
+
*
|
|
11
|
+
* Mirror discovery (in priority order):
|
|
12
|
+
* 1. ATRIB_RECORD_FILE - single explicit jsonl file. Back-compat with
|
|
13
|
+
* pre-0.4.0 callers that pinned a specific producer's mirror.
|
|
14
|
+
* 2. ATRIB_MIRROR_DIR - directory; recall reads every `*.jsonl` inside.
|
|
15
|
+
* Default: ~/.atrib/records (the spec §5.9 well-known mirror namespace).
|
|
16
|
+
*
|
|
17
|
+
* Two on-disk shapes are accepted, matching D062 / spec §5.9:
|
|
18
|
+
* - Bare AtribRecord (legacy producers): {spec_version, ...}
|
|
19
|
+
* - Envelope (D062 sidecar form): {record: {...}, proof?, _local?}
|
|
20
|
+
* Both round-trip through verifyRecord; the parser picks the right inner shape.
|
|
21
|
+
*
|
|
22
|
+
* Trust scope: signature verification is local-only. A passing signature_verified
|
|
23
|
+
* proves the record was signed by the named creator_key; it does NOT prove the
|
|
24
|
+
* record was committed to log.atrib.dev. To confirm log inclusion, the caller
|
|
25
|
+
* should fetch the inclusion proof from the log API.
|
|
26
|
+
*
|
|
27
|
+
* Configuration via environment variables:
|
|
28
|
+
* ATRIB_RECORD_FILE - single explicit file (overrides directory scan).
|
|
29
|
+
* ATRIB_MIRROR_DIR - directory to scan. Default: ~/.atrib/records.
|
|
30
|
+
* ATRIB_LOG_ORIGIN - origin used in human-readable messages.
|
|
31
|
+
* Default: log.atrib.dev
|
|
32
|
+
*/
|
|
33
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
34
|
import type { AtribRecord, EventTypeShortName } from '@atrib/mcp';
|
|
3
35
|
export type ImportanceLabel = 'critical' | 'high' | 'medium' | 'low' | 'noise';
|
|
4
36
|
export declare const IMPORTANCE_NUMERIC: Record<ImportanceLabel, number>;
|
|
@@ -277,4 +309,9 @@ export declare function discoverRecords(recordFile?: string): {
|
|
|
277
309
|
files: string[];
|
|
278
310
|
};
|
|
279
311
|
export declare function recall(args: RecallArgs, recordFile?: string): Promise<RecallResult>;
|
|
312
|
+
export interface AtribRecallServer {
|
|
313
|
+
mcp: McpServer;
|
|
314
|
+
}
|
|
315
|
+
export declare function registerAtribRecallTools(server: McpServer): void;
|
|
316
|
+
export declare function createAtribRecallServer(): AtribRecallServer;
|
|
280
317
|
export {};
|