@atrib/revise 0.2.28 → 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 CHANGED
@@ -18,7 +18,7 @@ export interface AtribReviseServer {
18
18
  }
19
19
  export interface CreateAtribReviseServerOptions {
20
20
  /** Override the resolved key (primarily for testing). */
21
- key?: ResolvedKey;
21
+ key?: ResolvedKey | null | undefined;
22
22
  /** Override the log endpoint (defaults to env or @atrib/mcp default). */
23
23
  logEndpoint?: string | undefined;
24
24
  /**
package/dist/index.js CHANGED
@@ -51,7 +51,7 @@ export const ReviseInput = z.object({
51
51
  * byte-identical regardless of which tool produced them.
52
52
  */
53
53
  export async function createAtribReviseServer(options = {}) {
54
- const key = options.key ?? (await resolveKey());
54
+ const resolveServerKey = createServerKeyResolver(options);
55
55
  const logEndpoint = options.logEndpoint ?? process.env['ATRIB_LOG_ENDPOINT'];
56
56
  const queue = createSubmissionQueue(logEndpoint);
57
57
  const localSubstrate = options.localSubstrate === false
@@ -85,7 +85,7 @@ export async function createAtribReviseServer(options = {}) {
85
85
  ...(input.context_id ? { context_id: input.context_id } : {}),
86
86
  ...(input.informed_by ? { informed_by: input.informed_by } : {}),
87
87
  },
88
- key,
88
+ key: await resolveServerKey(),
89
89
  queue,
90
90
  producer: 'atrib-revise',
91
91
  localSubstrate,
@@ -106,3 +106,14 @@ export async function createAtribReviseServer(options = {}) {
106
106
  flush: () => queue.flush(),
107
107
  };
108
108
  }
109
+ function createServerKeyResolver(options) {
110
+ if (Object.prototype.hasOwnProperty.call(options, 'key')) {
111
+ const fixed = options.key ?? null;
112
+ return async () => fixed;
113
+ }
114
+ let resolved = null;
115
+ return async () => {
116
+ resolved ??= resolveKey();
117
+ return resolved;
118
+ };
119
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atrib/revise",
3
- "version": "0.2.28",
3
+ "version": "0.2.30",
4
4
  "description": "MCP server for atrib. Lets agents supersede a prior signed position with a stated reason. Adds a REVISES graph edge so the contradiction is a first-class node rather than a silent edit.",
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.19",
29
- "@atrib/mcp": "0.17.4"
28
+ "@atrib/mcp": "0.17.5",
29
+ "@atrib/emit": "0.14.21"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/node": "^25.9.2",