sovr-mcp-server 0.1.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.
Potentially problematic release.
This version of sovr-mcp-server might be problematic. Click here for more details.
- package/LICENSE +21 -0
- package/README.md +341 -0
- package/dist/api/client.d.ts +59 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/client.js +162 -0
- package/dist/api/client.js.map +1 -0
- package/dist/auth/apiKey.d.ts +53 -0
- package/dist/auth/apiKey.d.ts.map +1 -0
- package/dist/auth/apiKey.js +146 -0
- package/dist/auth/apiKey.js.map +1 -0
- package/dist/cli.d.ts +10 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +59 -0
- package/dist/cli.js.map +1 -0
- package/dist/crypto/ed25519.d.ts +46 -0
- package/dist/crypto/ed25519.d.ts.map +1 -0
- package/dist/crypto/ed25519.js +144 -0
- package/dist/crypto/ed25519.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +335 -0
- package/dist/index.js.map +1 -0
- package/dist/local/client.d.ts +74 -0
- package/dist/local/client.d.ts.map +1 -0
- package/dist/local/client.js +118 -0
- package/dist/local/client.js.map +1 -0
- package/dist/local/store.d.ts +127 -0
- package/dist/local/store.d.ts.map +1 -0
- package/dist/local/store.js +384 -0
- package/dist/local/store.js.map +1 -0
- package/dist/tools/auditQuery.d.ts +101 -0
- package/dist/tools/auditQuery.d.ts.map +1 -0
- package/dist/tools/auditQuery.js +136 -0
- package/dist/tools/auditQuery.js.map +1 -0
- package/dist/tools/gateCheck.d.ts +61 -0
- package/dist/tools/gateCheck.d.ts.map +1 -0
- package/dist/tools/gateCheck.js +96 -0
- package/dist/tools/gateCheck.js.map +1 -0
- package/dist/tools/grantPermit.d.ts +45 -0
- package/dist/tools/grantPermit.d.ts.map +1 -0
- package/dist/tools/grantPermit.js +121 -0
- package/dist/tools/grantPermit.js.map +1 -0
- package/dist/tools/index.d.ts +163 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +31 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/killSwitch.d.ts +52 -0
- package/dist/tools/killSwitch.d.ts.map +1 -0
- package/dist/tools/killSwitch.js +85 -0
- package/dist/tools/killSwitch.js.map +1 -0
- package/dist/tools/policyList.d.ts +68 -0
- package/dist/tools/policyList.d.ts.map +1 -0
- package/dist/tools/policyList.js +96 -0
- package/dist/tools/policyList.js.map +1 -0
- package/dist/tools/requestApproval.d.ts +56 -0
- package/dist/tools/requestApproval.d.ts.map +1 -0
- package/dist/tools/requestApproval.js +97 -0
- package/dist/tools/requestApproval.js.map +1 -0
- package/dist/tools/submitReceipt.d.ts +145 -0
- package/dist/tools/submitReceipt.d.ts.map +1 -0
- package/dist/tools/submitReceipt.js +162 -0
- package/dist/tools/submitReceipt.js.map +1 -0
- package/dist/tools/systemStatus.d.ts +32 -0
- package/dist/tools/systemStatus.d.ts.map +1 -0
- package/dist/tools/systemStatus.js +67 -0
- package/dist/tools/systemStatus.js.map +1 -0
- package/dist/types/index.d.ts +146 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +33 -0
- package/dist/types/index.js.map +1 -0
- package/package.json +71 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"submitReceipt.d.ts","sourceRoot":"","sources":["../../src/tools/submitReceipt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAMvD,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBnC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAM1E,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgG7B,CAAC;AAMF,wBAAsB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC,CAShF;AAMD,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAenE"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* submit_receipt MCP Tool
|
|
3
|
+
*
|
|
4
|
+
* Records execution evidence to complete the audit trail.
|
|
5
|
+
* This closes the loop: gate_check → permit → execute → receipt.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
import { getClient } from '../api/client.js';
|
|
9
|
+
// ==========================================================================
|
|
10
|
+
// Input Schema
|
|
11
|
+
// ==========================================================================
|
|
12
|
+
export const submitReceiptInputSchema = z.object({
|
|
13
|
+
// Required fields
|
|
14
|
+
decision_id: z.string().describe('The decision_id from gate_check'),
|
|
15
|
+
permit_id: z.string().describe('The permit_id from grant_permit'),
|
|
16
|
+
external_ref: z.string().describe('Your execution task/job ID'),
|
|
17
|
+
status: z.enum(['success', 'failure', 'blocked', 'timeout']).describe('Execution outcome'),
|
|
18
|
+
started_at: z.number().describe('Unix timestamp when execution started'),
|
|
19
|
+
finished_at: z.number().describe('Unix timestamp when execution finished'),
|
|
20
|
+
output_hash: z.string().describe('SHA-512 hash of execution output/result'),
|
|
21
|
+
artifact_refs: z.array(z.string()).min(1).describe('URLs or storage keys to logs, screenshots, diffs'),
|
|
22
|
+
idempotency_key: z.string().describe('Unique key to prevent duplicate receipts'),
|
|
23
|
+
// Optional fields
|
|
24
|
+
error_code: z.string().optional().describe('Error code if status is failure'),
|
|
25
|
+
error_message: z.string().optional().describe('Error message if status is failure'),
|
|
26
|
+
resource_fingerprint: z.string().optional().describe('Stable hash of the resource (avoids leaking sensitive data)'),
|
|
27
|
+
execution_metrics: z.object({
|
|
28
|
+
duration_ms: z.number(),
|
|
29
|
+
retry_count: z.number(),
|
|
30
|
+
}).passthrough().optional().describe('Performance metrics'),
|
|
31
|
+
});
|
|
32
|
+
// ==========================================================================
|
|
33
|
+
// Tool Definition
|
|
34
|
+
// ==========================================================================
|
|
35
|
+
export const submitReceiptTool = {
|
|
36
|
+
name: 'submit_receipt',
|
|
37
|
+
description: `Submit execution evidence to complete the audit trail.
|
|
38
|
+
|
|
39
|
+
This is the final step in the SOVR responsibility flow.
|
|
40
|
+
The receipt creates an immutable record linking:
|
|
41
|
+
- The original decision (gate_check)
|
|
42
|
+
- The execution permit (grant_permit)
|
|
43
|
+
- The actual execution outcome and artifacts
|
|
44
|
+
|
|
45
|
+
Required fields:
|
|
46
|
+
- decision_id: From gate_check
|
|
47
|
+
- permit_id: From grant_permit
|
|
48
|
+
- external_ref: Your task/job ID
|
|
49
|
+
- status: success | failure | blocked | timeout
|
|
50
|
+
- started_at/finished_at: Unix timestamps
|
|
51
|
+
- output_hash: SHA-512 of output
|
|
52
|
+
- artifact_refs: At least one URL/key to evidence
|
|
53
|
+
- idempotency_key: Prevents duplicates
|
|
54
|
+
|
|
55
|
+
The receipt is written to the audit chain and cannot be modified.`,
|
|
56
|
+
inputSchema: {
|
|
57
|
+
type: 'object',
|
|
58
|
+
properties: {
|
|
59
|
+
decision_id: {
|
|
60
|
+
type: 'string',
|
|
61
|
+
description: 'The decision_id from gate_check',
|
|
62
|
+
},
|
|
63
|
+
permit_id: {
|
|
64
|
+
type: 'string',
|
|
65
|
+
description: 'The permit_id from grant_permit',
|
|
66
|
+
},
|
|
67
|
+
external_ref: {
|
|
68
|
+
type: 'string',
|
|
69
|
+
description: 'Your execution task/job ID',
|
|
70
|
+
},
|
|
71
|
+
status: {
|
|
72
|
+
type: 'string',
|
|
73
|
+
enum: ['success', 'failure', 'blocked', 'timeout'],
|
|
74
|
+
description: 'Execution outcome',
|
|
75
|
+
},
|
|
76
|
+
started_at: {
|
|
77
|
+
type: 'number',
|
|
78
|
+
description: 'Unix timestamp when execution started',
|
|
79
|
+
},
|
|
80
|
+
finished_at: {
|
|
81
|
+
type: 'number',
|
|
82
|
+
description: 'Unix timestamp when execution finished',
|
|
83
|
+
},
|
|
84
|
+
output_hash: {
|
|
85
|
+
type: 'string',
|
|
86
|
+
description: 'SHA-512 hash of execution output/result',
|
|
87
|
+
},
|
|
88
|
+
artifact_refs: {
|
|
89
|
+
type: 'array',
|
|
90
|
+
items: { type: 'string' },
|
|
91
|
+
minItems: 1,
|
|
92
|
+
description: 'URLs or storage keys to logs, screenshots, diffs',
|
|
93
|
+
},
|
|
94
|
+
idempotency_key: {
|
|
95
|
+
type: 'string',
|
|
96
|
+
description: 'Unique key to prevent duplicate receipts',
|
|
97
|
+
},
|
|
98
|
+
error_code: {
|
|
99
|
+
type: 'string',
|
|
100
|
+
description: 'Error code if status is failure',
|
|
101
|
+
},
|
|
102
|
+
error_message: {
|
|
103
|
+
type: 'string',
|
|
104
|
+
description: 'Error message if status is failure',
|
|
105
|
+
},
|
|
106
|
+
resource_fingerprint: {
|
|
107
|
+
type: 'string',
|
|
108
|
+
description: 'Stable hash of the resource',
|
|
109
|
+
},
|
|
110
|
+
execution_metrics: {
|
|
111
|
+
type: 'object',
|
|
112
|
+
properties: {
|
|
113
|
+
duration_ms: { type: 'number' },
|
|
114
|
+
retry_count: { type: 'number' },
|
|
115
|
+
},
|
|
116
|
+
description: 'Performance metrics',
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
required: [
|
|
120
|
+
'decision_id',
|
|
121
|
+
'permit_id',
|
|
122
|
+
'external_ref',
|
|
123
|
+
'status',
|
|
124
|
+
'started_at',
|
|
125
|
+
'finished_at',
|
|
126
|
+
'output_hash',
|
|
127
|
+
'artifact_refs',
|
|
128
|
+
'idempotency_key',
|
|
129
|
+
],
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
// ==========================================================================
|
|
133
|
+
// Handler
|
|
134
|
+
// ==========================================================================
|
|
135
|
+
export async function handleSubmitReceipt(input) {
|
|
136
|
+
// Validate input
|
|
137
|
+
const validated = submitReceiptInputSchema.parse(input);
|
|
138
|
+
// Call SOVR API
|
|
139
|
+
const client = getClient();
|
|
140
|
+
const result = await client.submitReceipt(validated);
|
|
141
|
+
return result;
|
|
142
|
+
}
|
|
143
|
+
// ==========================================================================
|
|
144
|
+
// Response Formatter
|
|
145
|
+
// ==========================================================================
|
|
146
|
+
export function formatReceiptResponse(result) {
|
|
147
|
+
return `📋 Receipt Recorded
|
|
148
|
+
|
|
149
|
+
**Receipt ID:** ${result.receipt_id}
|
|
150
|
+
**Trust Hash:** ${result.trust_hash.slice(0, 32)}...
|
|
151
|
+
**Evidence Hash:** ${result.evidence_hash.slice(0, 32)}...
|
|
152
|
+
**Chain Position:** #${result.chain_position}
|
|
153
|
+
**Recorded At:** ${new Date(result.recorded_at * 1000).toISOString()}
|
|
154
|
+
|
|
155
|
+
✅ Audit trail complete. This execution is now part of the immutable evidence chain.
|
|
156
|
+
|
|
157
|
+
The trust_hash can be used to:
|
|
158
|
+
- Verify the execution in external audits
|
|
159
|
+
- Export as part of a Trust Bundle
|
|
160
|
+
- Reference in compliance reports`;
|
|
161
|
+
}
|
|
162
|
+
//# sourceMappingURL=submitReceipt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"submitReceipt.js","sourceRoot":"","sources":["../../src/tools/submitReceipt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAG7C,6EAA6E;AAC7E,eAAe;AACf,6EAA6E;AAE7E,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,kBAAkB;IAClB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;IACnE,SAAS,EA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
+
*
|
|
4
|
+
* Get the current status of the SOVR system.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
import type { SystemStatus } from '../types/index.js';
|
|
8
|
+
export declare const systemStatusInputSchema: z.ZodObject<{
|
|
9
|
+
include_services: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
include_services: boolean;
|
|
12
|
+
}, {
|
|
13
|
+
include_services?: boolean | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
export type SystemStatusInput = z.infer<typeof systemStatusInputSchema>;
|
|
16
|
+
export declare const systemStatusTool: {
|
|
17
|
+
name: string;
|
|
18
|
+
description: string;
|
|
19
|
+
inputSchema: {
|
|
20
|
+
type: "object";
|
|
21
|
+
properties: {
|
|
22
|
+
include_services: {
|
|
23
|
+
type: string;
|
|
24
|
+
description: string;
|
|
25
|
+
default: boolean;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
required: never[];
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export declare function formatSystemStatusResponse(status: SystemStatus): string;
|
|
32
|
+
//# sourceMappingURL=systemStatus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"systemStatus.d.ts","sourceRoot":"","sources":["../../src/tools/systemStatus.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAMtD,eAAO,MAAM,uBAAuB;;;;;;EAElC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAMxE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;CAsB5B,CAAC;AAMF,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CA4BvE"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* system_status MCP Tool
|
|
3
|
+
*
|
|
4
|
+
* Get the current status of the SOVR system.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
// ==========================================================================
|
|
8
|
+
// Input Schema
|
|
9
|
+
// ==========================================================================
|
|
10
|
+
export const systemStatusInputSchema = z.object({
|
|
11
|
+
include_services: z.boolean().optional().default(true).describe('Include service health details'),
|
|
12
|
+
});
|
|
13
|
+
// ==========================================================================
|
|
14
|
+
// Tool Definition
|
|
15
|
+
// ==========================================================================
|
|
16
|
+
export const systemStatusTool = {
|
|
17
|
+
name: 'system_status',
|
|
18
|
+
description: `Get the current status of the SOVR responsibility layer.
|
|
19
|
+
|
|
20
|
+
Returns:
|
|
21
|
+
- System health status
|
|
22
|
+
- Kill switch state
|
|
23
|
+
- API and policy versions
|
|
24
|
+
- Service health (gate, approval, audit)
|
|
25
|
+
|
|
26
|
+
Use this to check if the system is operational before performing actions.`,
|
|
27
|
+
inputSchema: {
|
|
28
|
+
type: 'object',
|
|
29
|
+
properties: {
|
|
30
|
+
include_services: {
|
|
31
|
+
type: 'boolean',
|
|
32
|
+
description: 'Include service health details',
|
|
33
|
+
default: true,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
required: [],
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
// ==========================================================================
|
|
40
|
+
// Response Formatter
|
|
41
|
+
// ==========================================================================
|
|
42
|
+
export function formatSystemStatusResponse(status) {
|
|
43
|
+
const healthIcon = status.healthy ? '✅' : '❌';
|
|
44
|
+
const killSwitchIcon = status.kill_switch_active ? '🔴 ACTIVE' : '🟢 Inactive';
|
|
45
|
+
let response = `${healthIcon} SOVR System Status
|
|
46
|
+
|
|
47
|
+
**Health:** ${status.healthy ? 'Operational' : 'Degraded'}
|
|
48
|
+
**Kill Switch:** ${killSwitchIcon}
|
|
49
|
+
**API Version:** ${status.api_version}
|
|
50
|
+
**Policy Version:** ${status.policy_version}
|
|
51
|
+
**Last Updated:** ${new Date(status.last_updated).toISOString()}`;
|
|
52
|
+
if (status.services) {
|
|
53
|
+
response += `
|
|
54
|
+
|
|
55
|
+
**Services:**
|
|
56
|
+
- Gate: ${status.services.gate === 'up' ? '✅' : '❌'} ${status.services.gate}
|
|
57
|
+
- Approval: ${status.services.approval === 'up' ? '✅' : '❌'} ${status.services.approval}
|
|
58
|
+
- Audit: ${status.services.audit === 'up' ? '✅' : '❌'} ${status.services.audit}`;
|
|
59
|
+
}
|
|
60
|
+
if (status.kill_switch_active) {
|
|
61
|
+
response += `
|
|
62
|
+
|
|
63
|
+
⚠️ **WARNING:** Kill switch is active. All irreversible operations are blocked.`;
|
|
64
|
+
}
|
|
65
|
+
return response;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=systemStatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"systemStatus.js","sourceRoot":"","sources":["../../src/tools/systemStatus.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,6EAA6E;AAC7E,eAAe;AACf,6EAA6E;AAE7E,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,gBAAgB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,gCAAgC,CAAC;CAClG,CAAC,CAAC;AAIH,6EAA6E;AAC7E,kBAAkB;AAClB,6EAA6E;AAE7E,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE;;;;;;;;0EAQ2D;IACxE,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,gBAAgB,EAAE;gBAChB,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,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CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SOVR MCP Server Types
|
|
3
|
+
*
|
|
4
|
+
* Core types for the responsibility layer protocol
|
|
5
|
+
*/
|
|
6
|
+
export interface ApiKey {
|
|
7
|
+
key_id: string;
|
|
8
|
+
tenant_id: string;
|
|
9
|
+
role: 'owner' | 'admin' | 'operator' | 'readonly';
|
|
10
|
+
scopes: Scope[];
|
|
11
|
+
rate_limit: number;
|
|
12
|
+
created_at: number;
|
|
13
|
+
expires_at: number | null;
|
|
14
|
+
}
|
|
15
|
+
export type Scope = 'gate:check' | 'permit:grant' | 'receipt:submit' | 'approval:request' | 'audit:read' | 'status:read';
|
|
16
|
+
export interface GateCheckInput {
|
|
17
|
+
action: string;
|
|
18
|
+
resource: string;
|
|
19
|
+
context?: Record<string, unknown>;
|
|
20
|
+
tenant_id?: string;
|
|
21
|
+
idempotency_key?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface GateCheckResult {
|
|
24
|
+
decision_id: string;
|
|
25
|
+
allowed: boolean;
|
|
26
|
+
requires_approval: boolean;
|
|
27
|
+
reason: string;
|
|
28
|
+
risk_score: number;
|
|
29
|
+
value_score: number;
|
|
30
|
+
policy_version: string;
|
|
31
|
+
checked_at: number;
|
|
32
|
+
}
|
|
33
|
+
export type ApprovalUrgency = 'low' | 'medium' | 'high' | 'critical';
|
|
34
|
+
export type ApprovalStatus = 'pending' | 'approved' | 'rejected' | 'expired' | 'cancelled';
|
|
35
|
+
export interface RequestApprovalInput {
|
|
36
|
+
decision_id: string;
|
|
37
|
+
justification: string;
|
|
38
|
+
urgency?: ApprovalUrgency;
|
|
39
|
+
metadata?: Record<string, unknown>;
|
|
40
|
+
}
|
|
41
|
+
export interface ApprovalResult {
|
|
42
|
+
approval_id: string;
|
|
43
|
+
status: ApprovalStatus;
|
|
44
|
+
approval_url: string;
|
|
45
|
+
estimated_wait_seconds: number;
|
|
46
|
+
created_at: number;
|
|
47
|
+
expires_at: number;
|
|
48
|
+
}
|
|
49
|
+
export interface GrantPermitInput {
|
|
50
|
+
decision_id: string;
|
|
51
|
+
ttl_seconds?: number;
|
|
52
|
+
}
|
|
53
|
+
export interface ExecutionPermit {
|
|
54
|
+
permit_id: string;
|
|
55
|
+
jti: string;
|
|
56
|
+
decision_id: string;
|
|
57
|
+
tenant_id: string;
|
|
58
|
+
action: string;
|
|
59
|
+
resource: string;
|
|
60
|
+
scope: string[];
|
|
61
|
+
issued_at: number;
|
|
62
|
+
expires_at: number;
|
|
63
|
+
signature: string;
|
|
64
|
+
public_key: string;
|
|
65
|
+
}
|
|
66
|
+
export interface PermitPayload {
|
|
67
|
+
jti: string;
|
|
68
|
+
decision_id: string;
|
|
69
|
+
tenant_id: string;
|
|
70
|
+
action: string;
|
|
71
|
+
resource: string;
|
|
72
|
+
scope: string[];
|
|
73
|
+
iat: number;
|
|
74
|
+
exp: number;
|
|
75
|
+
}
|
|
76
|
+
export type ExecutionStatus = 'success' | 'failure' | 'blocked' | 'timeout';
|
|
77
|
+
export interface SubmitReceiptInput {
|
|
78
|
+
decision_id: string;
|
|
79
|
+
permit_id: string;
|
|
80
|
+
external_ref: string;
|
|
81
|
+
status: ExecutionStatus;
|
|
82
|
+
started_at: number;
|
|
83
|
+
finished_at: number;
|
|
84
|
+
output_hash: string;
|
|
85
|
+
artifact_refs: string[];
|
|
86
|
+
idempotency_key: string;
|
|
87
|
+
error_code?: string;
|
|
88
|
+
error_message?: string;
|
|
89
|
+
resource_fingerprint?: string;
|
|
90
|
+
execution_metrics?: {
|
|
91
|
+
duration_ms: number;
|
|
92
|
+
retry_count: number;
|
|
93
|
+
[key: string]: unknown;
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
export interface ReceiptResult {
|
|
97
|
+
receipt_id: string;
|
|
98
|
+
trust_hash: string;
|
|
99
|
+
evidence_hash: string;
|
|
100
|
+
chain_position: number;
|
|
101
|
+
recorded_at: number;
|
|
102
|
+
}
|
|
103
|
+
export interface SystemStatus {
|
|
104
|
+
healthy: boolean;
|
|
105
|
+
kill_switch_active: boolean;
|
|
106
|
+
api_version: string;
|
|
107
|
+
policy_version: string;
|
|
108
|
+
last_updated: number;
|
|
109
|
+
services: {
|
|
110
|
+
gate: 'up' | 'degraded' | 'down';
|
|
111
|
+
approval: 'up' | 'degraded' | 'down';
|
|
112
|
+
audit: 'up' | 'degraded' | 'down';
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
export interface AuditEvent {
|
|
116
|
+
event_id: string;
|
|
117
|
+
event_type: 'gate_check' | 'approval_request' | 'permit_grant' | 'receipt_submit';
|
|
118
|
+
tenant_id: string;
|
|
119
|
+
key_id: string;
|
|
120
|
+
trace_id: string;
|
|
121
|
+
decision_id?: string;
|
|
122
|
+
permit_id?: string;
|
|
123
|
+
receipt_id?: string;
|
|
124
|
+
timestamp: number;
|
|
125
|
+
metadata: Record<string, unknown>;
|
|
126
|
+
}
|
|
127
|
+
export declare class SovrError extends Error {
|
|
128
|
+
code: string;
|
|
129
|
+
details?: Record<string, unknown> | undefined;
|
|
130
|
+
constructor(code: string, message: string, details?: Record<string, unknown> | undefined);
|
|
131
|
+
}
|
|
132
|
+
export declare const ErrorCodes: {
|
|
133
|
+
readonly UNAUTHORIZED: "UNAUTHORIZED";
|
|
134
|
+
readonly FORBIDDEN: "FORBIDDEN";
|
|
135
|
+
readonly INVALID_INPUT: "INVALID_INPUT";
|
|
136
|
+
readonly DECISION_NOT_FOUND: "DECISION_NOT_FOUND";
|
|
137
|
+
readonly PERMIT_EXPIRED: "PERMIT_EXPIRED";
|
|
138
|
+
readonly PERMIT_INVALID: "PERMIT_INVALID";
|
|
139
|
+
readonly APPROVAL_REQUIRED: "APPROVAL_REQUIRED";
|
|
140
|
+
readonly APPROVAL_PENDING: "APPROVAL_PENDING";
|
|
141
|
+
readonly APPROVAL_REJECTED: "APPROVAL_REJECTED";
|
|
142
|
+
readonly RATE_LIMITED: "RATE_LIMITED";
|
|
143
|
+
readonly KILL_SWITCH_ACTIVE: "KILL_SWITCH_ACTIVE";
|
|
144
|
+
readonly SERVICE_UNAVAILABLE: "SERVICE_UNAVAILABLE";
|
|
145
|
+
};
|
|
146
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,MAAM,WAAW,MAAM;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,CAAC;IAClD,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,MAAM,KAAK,GACb,YAAY,GACZ,cAAc,GACd,gBAAgB,GAChB,kBAAkB,GAClB,YAAY,GACZ,aAAa,CAAC;AAMlB,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;CACpB;AAMD,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,QAA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C;KACnC,CAAC;CACH;AAMD,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,YAAY,GAAG,kBAAkB,GAAG,cAAc,GAAG,gBAAgB,CAAC;IAClF,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAMD,qBAAa,SAAU,SAAQ,KAAK;IAEzB,IAAI,EAAE,MAAM;IAEZ,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;gBAFjC,IAAI,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EACR,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,YAAA;CAK3C;AAED,eAAO,MAAM,UAAU;;;;;;;;;;;;;CAab,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SOVR MCP Server Types
|
|
3
|
+
*
|
|
4
|
+
* Core types for the responsibility layer protocol
|
|
5
|
+
*/
|
|
6
|
+
// ============================================================================
|
|
7
|
+
// Error Types
|
|
8
|
+
// ============================================================================
|
|
9
|
+
export class SovrError extends Error {
|
|
10
|
+
code;
|
|
11
|
+
details;
|
|
12
|
+
constructor(code, message, details) {
|
|
13
|
+
super(message);
|
|
14
|
+
this.code = code;
|
|
15
|
+
this.details = details;
|
|
16
|
+
this.name = 'SovrError';
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export const ErrorCodes = {
|
|
20
|
+
UNAUTHORIZED: 'UNAUTHORIZED',
|
|
21
|
+
FORBIDDEN: 'FORBIDDEN',
|
|
22
|
+
INVALID_INPUT: 'INVALID_INPUT',
|
|
23
|
+
DECISION_NOT_FOUND: 'DECISION_NOT_FOUND',
|
|
24
|
+
PERMIT_EXPIRED: 'PERMIT_EXPIRED',
|
|
25
|
+
PERMIT_INVALID: 'PERMIT_INVALID',
|
|
26
|
+
APPROVAL_REQUIRED: 'APPROVAL_REQUIRED',
|
|
27
|
+
APPROVAL_PENDING: 'APPROVAL_PENDING',
|
|
28
|
+
APPROVAL_REJECTED: 'APPROVAL_REJECTED',
|
|
29
|
+
RATE_LIMITED: 'RATE_LIMITED',
|
|
30
|
+
KILL_SWITCH_ACTIVE: 'KILL_SWITCH_ACTIVE',
|
|
31
|
+
SERVICE_UNAVAILABLE: 'SERVICE_UNAVAILABLE',
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA6KH,+EAA+E;AAC/E,cAAc;AACd,+EAA+E;AAE/E,MAAM,OAAO,SAAU,SAAQ,KAAK;IAEzB;IAEA;IAHT,YACS,IAAY,EACnB,OAAe,EACR,OAAiC;QAExC,KAAK,CAAC,OAAO,CAAC,CAAC;QAJR,SAAI,GAAJ,IAAI,CAAQ;QAEZ,YAAO,GAAP,OAAO,CAA0B;QAGxC,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;IAC1B,CAAC;CACF;AAED,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,YAAY,EAAE,cAAc;IAC5B,SAAS,EAAE,WAAW;IACtB,aAAa,EAAE,eAAe;IAC9B,kBAAkB,EAAE,oBAAoB;IACxC,cAAc,EAAE,gBAAgB;IAChC,cAAc,EAAE,gBAAgB;IAChC,iBAAiB,EAAE,mBAAmB;IACtC,gBAAgB,EAAE,kBAAkB;IACpC,iBAAiB,EAAE,mBAAmB;IACtC,YAAY,EAAE,cAAc;IAC5B,kBAAkB,EAAE,oBAAoB;IACxC,mBAAmB,EAAE,qBAAqB;CAClC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "sovr-mcp-server",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "SOVR MCP Server - Responsibility layer for AI agents. No irreversible action without a verifiable permit, audit trail, and evidence bundle.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"sovr-mcp-server": "./dist/cli.js"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist",
|
|
13
|
+
"README.md",
|
|
14
|
+
"LICENSE"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "tsc",
|
|
18
|
+
"dev": "tsx watch src/index.ts",
|
|
19
|
+
"start": "node dist/index.js",
|
|
20
|
+
"test": "vitest run",
|
|
21
|
+
"test:watch": "vitest",
|
|
22
|
+
"test:e2e": "vitest run tests/e2e.test.ts",
|
|
23
|
+
"lint": "eslint src/",
|
|
24
|
+
"prepublishOnly": "npm run build && npm run test"
|
|
25
|
+
},
|
|
26
|
+
"keywords": [
|
|
27
|
+
"mcp",
|
|
28
|
+
"model-context-protocol",
|
|
29
|
+
"sovr",
|
|
30
|
+
"ai",
|
|
31
|
+
"ai-governance",
|
|
32
|
+
"ai-safety",
|
|
33
|
+
"responsibility-layer",
|
|
34
|
+
"audit",
|
|
35
|
+
"trust",
|
|
36
|
+
"ed25519",
|
|
37
|
+
"claude",
|
|
38
|
+
"cursor",
|
|
39
|
+
"windsurf"
|
|
40
|
+
],
|
|
41
|
+
"author": "SOVR <team@sovr.inc>",
|
|
42
|
+
"license": "MIT",
|
|
43
|
+
"homepage": "https://sovr.inc",
|
|
44
|
+
"repository": {
|
|
45
|
+
"type": "git",
|
|
46
|
+
"url": "https://github.com/sovr-ai/sovr-mcp-server"
|
|
47
|
+
},
|
|
48
|
+
"bugs": {
|
|
49
|
+
"url": "https://github.com/sovr-ai/sovr-mcp-server/issues"
|
|
50
|
+
},
|
|
51
|
+
"engines": {
|
|
52
|
+
"node": ">=18.0.0"
|
|
53
|
+
},
|
|
54
|
+
"publishConfig": {
|
|
55
|
+
"access": "public",
|
|
56
|
+
"registry": "https://registry.npmjs.org/"
|
|
57
|
+
},
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
60
|
+
"@noble/ed25519": "^2.1.0",
|
|
61
|
+
"@noble/hashes": "^2.0.1",
|
|
62
|
+
"nanoid": "^5.0.0",
|
|
63
|
+
"zod": "^3.23.0"
|
|
64
|
+
},
|
|
65
|
+
"devDependencies": {
|
|
66
|
+
"@types/node": "^20.0.0",
|
|
67
|
+
"tsx": "^4.0.0",
|
|
68
|
+
"typescript": "^5.0.0",
|
|
69
|
+
"vitest": "^2.0.0"
|
|
70
|
+
}
|
|
71
|
+
}
|