@atrib/annotate 0.2.29 → 0.2.30
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 +1 -1
- package/dist/index.js +13 -2
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export interface AtribAnnotateServer {
|
|
|
30
30
|
}
|
|
31
31
|
export interface CreateAtribAnnotateServerOptions {
|
|
32
32
|
/** Override the resolved key (primarily for testing). */
|
|
33
|
-
key?: ResolvedKey;
|
|
33
|
+
key?: ResolvedKey | null | undefined;
|
|
34
34
|
/** Override the log endpoint (defaults to env or @atrib/mcp default). */
|
|
35
35
|
logEndpoint?: string | undefined;
|
|
36
36
|
/**
|
package/dist/index.js
CHANGED
|
@@ -49,7 +49,7 @@ export const AnnotateInput = z.object({
|
|
|
49
49
|
* byte-identical regardless of which tool produced them.
|
|
50
50
|
*/
|
|
51
51
|
export async function createAtribAnnotateServer(options = {}) {
|
|
52
|
-
const
|
|
52
|
+
const resolveServerKey = createServerKeyResolver(options);
|
|
53
53
|
const logEndpoint = options.logEndpoint ?? process.env['ATRIB_LOG_ENDPOINT'];
|
|
54
54
|
const queue = createSubmissionQueue(logEndpoint);
|
|
55
55
|
const localSubstrate = options.localSubstrate === false
|
|
@@ -82,7 +82,7 @@ export async function createAtribAnnotateServer(options = {}) {
|
|
|
82
82
|
...(input.context_id ? { context_id: input.context_id } : {}),
|
|
83
83
|
...(input.informed_by ? { informed_by: input.informed_by } : {}),
|
|
84
84
|
},
|
|
85
|
-
key,
|
|
85
|
+
key: await resolveServerKey(),
|
|
86
86
|
queue,
|
|
87
87
|
producer: 'atrib-annotate',
|
|
88
88
|
localSubstrate,
|
|
@@ -103,3 +103,14 @@ export async function createAtribAnnotateServer(options = {}) {
|
|
|
103
103
|
flush: () => queue.flush(),
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
|
+
function createServerKeyResolver(options) {
|
|
107
|
+
if (Object.prototype.hasOwnProperty.call(options, 'key')) {
|
|
108
|
+
const fixed = options.key ?? null;
|
|
109
|
+
return async () => fixed;
|
|
110
|
+
}
|
|
111
|
+
let resolved = null;
|
|
112
|
+
return async () => {
|
|
113
|
+
resolved ??= resolveKey();
|
|
114
|
+
return resolved;
|
|
115
|
+
};
|
|
116
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atrib/annotate",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.30",
|
|
4
4
|
"description": "MCP server for atrib. Lets agents mark a past record's importance and meaning. Adds an ANNOTATES graph edge so recall surfaces weighted annotations ahead of flat scans.",
|
|
5
5
|
"author": "atrib <hello@atrib.dev>",
|
|
6
6
|
"keywords": [
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
27
27
|
"zod": "^3.25.76",
|
|
28
|
-
"@atrib/emit": "0.14.
|
|
28
|
+
"@atrib/emit": "0.14.21",
|
|
29
29
|
"@atrib/mcp": "0.17.5"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|