@atrib/attest 0.3.1 → 0.4.1
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/annotate.d.ts +1 -1
- package/dist/annotate.js +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.js +4 -2
- package/dist/main.js +2 -3
- package/dist/revise.d.ts +1 -1
- package/dist/revise.js +1 -1
- package/package.json +4 -3
package/dist/annotate.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { McpServer } from '@modelcontextprotocol/
|
|
1
|
+
import { McpServer } from '@modelcontextprotocol/server';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { type EmitLocalSubstrateShadowOptions, type WriteToolDeps } from './index.js';
|
|
4
4
|
import { type ResolvedKey } from './keys.js';
|
package/dist/annotate.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// composition path is byte-identical to `attest` with ref.kind='annotates';
|
|
7
7
|
// a verifier MUST NOT distinguish annotation records by the tool name that
|
|
8
8
|
// signed them.
|
|
9
|
-
import { McpServer } from '@modelcontextprotocol/
|
|
9
|
+
import { McpServer } from '@modelcontextprotocol/server';
|
|
10
10
|
import { z } from 'zod';
|
|
11
11
|
import { createSubmissionQueue, EVENT_TYPE_ANNOTATION_URI } from '@atrib/mcp';
|
|
12
12
|
import { handleEmit, registerAttestTool, resolveEmitLocalSubstrateShadowFromEnv, } from './index.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { McpServer } from '@modelcontextprotocol/
|
|
1
|
+
import { McpServer } from '@modelcontextprotocol/server';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { type LocalSubstrateCoordinatorTransport, type LocalSubstrateDegradationPolicy, type LocalSubstrateHarnessClass, type LocalSubstrateProducer, type LocalSubstrateWalJoin, type ProofBundle, type SubmissionQueue, type TryLocalSubstrateCoordinatorResult } from '@atrib/mcp';
|
|
3
|
+
import { type AtribRecord, type LocalSubstrateCoordinatorTransport, type LocalSubstrateDegradationPolicy, type LocalSubstrateHarnessClass, type LocalSubstrateProducer, type LocalSubstrateWalJoin, type ProofBundle, type SubmissionQueue, type TryLocalSubstrateCoordinatorResult } from '@atrib/mcp';
|
|
4
4
|
import { type ResolvedKey } from './keys.js';
|
|
5
5
|
import { type RecordReferenceResolver } from './reference-resolution.js';
|
|
6
6
|
import { resolveMirrorWritePath } from './storage.js';
|
|
@@ -25,6 +25,7 @@ declare const EmitInput: z.ZodObject<{
|
|
|
25
25
|
}, z.core.$strip>;
|
|
26
26
|
type EmitSignedOutput = {
|
|
27
27
|
signed: true;
|
|
28
|
+
record: AtribRecord;
|
|
28
29
|
record_hash: string;
|
|
29
30
|
log_index: number | null;
|
|
30
31
|
inclusion_proof: ProofBundle['inclusion_proof'] | null;
|
|
@@ -168,7 +169,7 @@ export declare function createAtribAttestServer(options?: CreateAtribAttestServe
|
|
|
168
169
|
* Wire up the legacy atrib-emit MCP server. Mounts `emit` plus `attest`
|
|
169
170
|
* (alias-window rule W1: every existing server also serves the new verb).
|
|
170
171
|
* Returns an AtribEmitServer handle whose `.mcp` is ready to attach to a
|
|
171
|
-
* transport (
|
|
172
|
+
* transport (serveStdio for the standalone binary; in-process
|
|
172
173
|
* transport for tests).
|
|
173
174
|
*/
|
|
174
175
|
export declare function createAtribEmitServer(options?: CreateAtribEmitServerOptions): Promise<AtribEmitServer>;
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
// - Persists to the same JSONL convention as the wrapper; the default
|
|
15
15
|
// mirror filename pattern `atrib-emit-<agent>.jsonl` is frozen (L3):
|
|
16
16
|
// existing files keep their names forever
|
|
17
|
-
import { McpServer } from '@modelcontextprotocol/
|
|
17
|
+
import { McpServer } from '@modelcontextprotocol/server';
|
|
18
18
|
import { z } from 'zod';
|
|
19
19
|
import { randomBytes } from 'node:crypto';
|
|
20
20
|
import { EVENT_TYPE_ANNOTATION_URI, EVENT_TYPE_REVISION_URI, LOCAL_SUBSTRATE_DEFAULT_TIMEOUT_MS, LOCAL_SUBSTRATE_REQUEST_SCHEMA, canonicalRecord, createHttpLocalSubstrateTransport, createSubmissionQueue, genesisChainRoot, hexEncode, inheritChainContext, isValidEventTypeUri, normalizeEventType, parentRecordHashFromEnv, resolveEnvContextId, SHA256_REF_PATTERN, sha256, tryLocalSubstrateCoordinator, } from '@atrib/mcp';
|
|
@@ -292,7 +292,7 @@ export async function createAtribAttestServer(options = {}) {
|
|
|
292
292
|
* Wire up the legacy atrib-emit MCP server. Mounts `emit` plus `attest`
|
|
293
293
|
* (alias-window rule W1: every existing server also serves the new verb).
|
|
294
294
|
* Returns an AtribEmitServer handle whose `.mcp` is ready to attach to a
|
|
295
|
-
* transport (
|
|
295
|
+
* transport (serveStdio for the standalone binary; in-process
|
|
296
296
|
* transport for tests).
|
|
297
297
|
*/
|
|
298
298
|
export async function createAtribEmitServer(options = {}) {
|
|
@@ -562,6 +562,7 @@ async function handleEmit({ input, key, queue, producer, logEndpoint, mirrorPath
|
|
|
562
562
|
}
|
|
563
563
|
return {
|
|
564
564
|
signed: true,
|
|
565
|
+
record,
|
|
565
566
|
record_hash: recordHash,
|
|
566
567
|
log_index: proof?.log_index ?? null,
|
|
567
568
|
inclusion_proof: proof?.inclusion_proof ?? null,
|
|
@@ -601,6 +602,7 @@ function emitRefusalToolResult(result) {
|
|
|
601
602
|
function emitSuccessToolResult(result) {
|
|
602
603
|
return {
|
|
603
604
|
content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
|
|
605
|
+
_meta: { 'dev.atrib/internal-record': result.record },
|
|
604
606
|
};
|
|
605
607
|
}
|
|
606
608
|
function randomContextId() {
|
package/dist/main.js
CHANGED
|
@@ -4,12 +4,11 @@
|
|
|
4
4
|
// launched as a subprocess by an MCP host (Claude Code, Claude Desktop,
|
|
5
5
|
// etc.). All four names dispatch to one handleEmit funnel; records are
|
|
6
6
|
// byte-identical regardless of which name signed them.
|
|
7
|
-
import {
|
|
7
|
+
import { serveStdio } from '@modelcontextprotocol/server/stdio';
|
|
8
8
|
import { createAtribAttestServer } from './index.js';
|
|
9
9
|
async function main() {
|
|
10
10
|
const { mcp } = await createAtribAttestServer();
|
|
11
|
-
|
|
12
|
-
await mcp.connect(transport);
|
|
11
|
+
serveStdio(() => mcp);
|
|
13
12
|
// Stays alive on the stdio transport until the host closes it.
|
|
14
13
|
}
|
|
15
14
|
main().catch((e) => {
|
package/dist/revise.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { McpServer } from '@modelcontextprotocol/
|
|
1
|
+
import { McpServer } from '@modelcontextprotocol/server';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { type EmitLocalSubstrateShadowOptions, type WriteToolDeps } from './index.js';
|
|
4
4
|
import { type ResolvedKey } from './keys.js';
|
package/dist/revise.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// signing + chain composition path is byte-identical to `attest` with
|
|
7
7
|
// ref.kind='revises'; a verifier MUST NOT distinguish revision records by
|
|
8
8
|
// the tool name that signed them.
|
|
9
|
-
import { McpServer } from '@modelcontextprotocol/
|
|
9
|
+
import { McpServer } from '@modelcontextprotocol/server';
|
|
10
10
|
import { z } from 'zod';
|
|
11
11
|
import { createSubmissionQueue, EVENT_TYPE_REVISION_URI } from '@atrib/mcp';
|
|
12
12
|
import { handleEmit, registerAttestTool, resolveEmitLocalSubstrateShadowFromEnv, } from './index.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atrib/attest",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "MCP server for atrib's write verb. One attest tool signs observations, annotations, and revisions; the legacy emit, atrib-annotate, and atrib-revise tool names stay mounted as aliases over the same handler.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"atrib",
|
|
@@ -40,12 +40,13 @@
|
|
|
40
40
|
"atrib-attest-cli": "./dist/cli.js"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@modelcontextprotocol/
|
|
43
|
+
"@modelcontextprotocol/client": "^2.0.0",
|
|
44
|
+
"@modelcontextprotocol/server": "^2.0.0",
|
|
44
45
|
"@noble/ed25519": "^3.1.0",
|
|
45
46
|
"@noble/hashes": "^2.2.0",
|
|
46
47
|
"canonicalize": "^3.0.0",
|
|
47
48
|
"zod": "^3.25.76",
|
|
48
|
-
"@atrib/mcp": "0.
|
|
49
|
+
"@atrib/mcp": "0.24.0"
|
|
49
50
|
},
|
|
50
51
|
"devDependencies": {
|
|
51
52
|
"@types/node": "^26.1.1",
|