@atrib/attest 0.3.1 → 0.4.0
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 +3 -2
- package/dist/index.js +3 -1
- package/dist/main.js +1 -1
- 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;
|
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';
|
|
@@ -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,7 +4,7 @@
|
|
|
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 { StdioServerTransport } from '@modelcontextprotocol/
|
|
7
|
+
import { StdioServerTransport } from '@modelcontextprotocol/server/stdio';
|
|
8
8
|
import { createAtribAttestServer } from './index.js';
|
|
9
9
|
async function main() {
|
|
10
10
|
const { mcp } = await createAtribAttestServer();
|
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.0",
|
|
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",
|