@atrib/annotate 0.2.27 → 0.2.29
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 +2 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.js +9 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -61,6 +61,8 @@ Or run as a one-off subprocess via `pnpm --filter @atrib/annotate start`.
|
|
|
61
61
|
- `ATRIB_AUTOCHAIN_SOURCE`: optional cross-producer chain inheritance source.
|
|
62
62
|
- `ATRIB_LOG_ENDPOINT`: log.atrib.dev override (e.g. for self-hosted log nodes).
|
|
63
63
|
- `ATRIB_CONTEXT_ID`: default context_id per [D078](https://github.com/creatornader/atrib/blob/main/DECISIONS.md#d078-mcp-servers-honor-atrib_context_id-env-as-context_id-default).
|
|
64
|
+
- `ATRIB_LOCAL_SUBSTRATE_ENDPOINT` + `ATRIB_LOCAL_SUBSTRATE_MODE=shadow`: opt-in P042 local-substrate shadow probe inherited from `@atrib/emit`. The annotation is still signed, mirrored, and queued locally.
|
|
65
|
+
- `ATRIB_LOCAL_SUBSTRATE_TIMEOUT_MS`: optional timeout for that shadow probe.
|
|
64
66
|
|
|
65
67
|
## Relationship to @atrib/emit
|
|
66
68
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { type ResolvedKey } from '@atrib/emit';
|
|
3
|
+
import { type EmitLocalSubstrateShadowOptions, type ResolvedKey } from '@atrib/emit';
|
|
4
4
|
export declare const Importance: z.ZodEnum<{
|
|
5
5
|
critical: "critical";
|
|
6
6
|
high: "high";
|
|
@@ -33,6 +33,11 @@ export interface CreateAtribAnnotateServerOptions {
|
|
|
33
33
|
key?: ResolvedKey;
|
|
34
34
|
/** Override the log endpoint (defaults to env or @atrib/mcp default). */
|
|
35
35
|
logEndpoint?: string | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Optional long-lived-agent local substrate shadow probe. `undefined` reads
|
|
38
|
+
* opt-in env config; `false` disables env config for this server.
|
|
39
|
+
*/
|
|
40
|
+
localSubstrate?: EmitLocalSubstrateShadowOptions | false | undefined;
|
|
36
41
|
}
|
|
37
42
|
/**
|
|
38
43
|
* Wire up the atrib-annotate MCP server with one `atrib-annotate` tool.
|
package/dist/index.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
// - Persists to the same JSONL mirror convention as atrib-emit
|
|
17
17
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
18
18
|
import { z } from 'zod';
|
|
19
|
-
import { handleEmit, resolveKey, } from '@atrib/emit';
|
|
19
|
+
import { resolveEmitLocalSubstrateShadowFromEnv, handleEmit, resolveKey, } from '@atrib/emit';
|
|
20
20
|
import { createSubmissionQueue, EVENT_TYPE_ANNOTATION_URI, } from '@atrib/mcp';
|
|
21
21
|
const SHA256_REF_PATTERN = /^sha256:[0-9a-f]{64}$/;
|
|
22
22
|
const HEX_32_PATTERN = /^[0-9a-f]{32}$/;
|
|
@@ -52,6 +52,13 @@ export async function createAtribAnnotateServer(options = {}) {
|
|
|
52
52
|
const key = options.key ?? (await resolveKey());
|
|
53
53
|
const logEndpoint = options.logEndpoint ?? process.env['ATRIB_LOG_ENDPOINT'];
|
|
54
54
|
const queue = createSubmissionQueue(logEndpoint);
|
|
55
|
+
const localSubstrate = options.localSubstrate === false
|
|
56
|
+
? undefined
|
|
57
|
+
: (options.localSubstrate ??
|
|
58
|
+
resolveEmitLocalSubstrateShadowFromEnv({
|
|
59
|
+
producer: 'atrib-annotate',
|
|
60
|
+
transport: 'stdio-mcp-server',
|
|
61
|
+
}));
|
|
55
62
|
const mcp = new McpServer({ name: 'atrib-annotate', version: '0.1.0' });
|
|
56
63
|
mcp.registerTool('atrib-annotate', {
|
|
57
64
|
description: 'Mark a past record\'s importance and meaning without superseding it. ' +
|
|
@@ -78,6 +85,7 @@ export async function createAtribAnnotateServer(options = {}) {
|
|
|
78
85
|
key,
|
|
79
86
|
queue,
|
|
80
87
|
producer: 'atrib-annotate',
|
|
88
|
+
localSubstrate,
|
|
81
89
|
});
|
|
82
90
|
const out = {
|
|
83
91
|
record_hash: result.record_hash,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atrib/annotate",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.29",
|
|
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,8 +25,8 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
27
27
|
"zod": "^3.25.76",
|
|
28
|
-
"@atrib/emit": "0.14.
|
|
29
|
-
"@atrib/mcp": "0.17.
|
|
28
|
+
"@atrib/emit": "0.14.20",
|
|
29
|
+
"@atrib/mcp": "0.17.5"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^25.9.2",
|