@peac/mcp-server 0.10.13

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.
Files changed (61) hide show
  1. package/LICENSE +190 -0
  2. package/README.md +229 -0
  3. package/dist/cli.cjs +1708 -0
  4. package/dist/cli.cjs.map +1 -0
  5. package/dist/cli.d.ts +9 -0
  6. package/dist/cli.d.ts.map +1 -0
  7. package/dist/cli.mjs +1687 -0
  8. package/dist/cli.mjs.map +1 -0
  9. package/dist/handlers/bundle.d.ts +10 -0
  10. package/dist/handlers/bundle.d.ts.map +1 -0
  11. package/dist/handlers/decode.d.ts +10 -0
  12. package/dist/handlers/decode.d.ts.map +1 -0
  13. package/dist/handlers/guards.d.ts +60 -0
  14. package/dist/handlers/guards.d.ts.map +1 -0
  15. package/dist/handlers/index.d.ts +8 -0
  16. package/dist/handlers/index.d.ts.map +1 -0
  17. package/dist/handlers/inspect.d.ts +10 -0
  18. package/dist/handlers/inspect.d.ts.map +1 -0
  19. package/dist/handlers/issue.d.ts +10 -0
  20. package/dist/handlers/issue.d.ts.map +1 -0
  21. package/dist/handlers/types.d.ts +31 -0
  22. package/dist/handlers/types.d.ts.map +1 -0
  23. package/dist/handlers/verify.d.ts +12 -0
  24. package/dist/handlers/verify.d.ts.map +1 -0
  25. package/dist/index.cjs +1685 -0
  26. package/dist/index.cjs.map +1 -0
  27. package/dist/index.d.ts +37 -0
  28. package/dist/index.d.ts.map +1 -0
  29. package/dist/index.mjs +1623 -0
  30. package/dist/index.mjs.map +1 -0
  31. package/dist/infra/constants.d.ts +14 -0
  32. package/dist/infra/constants.d.ts.map +1 -0
  33. package/dist/infra/errors.d.ts +36 -0
  34. package/dist/infra/errors.d.ts.map +1 -0
  35. package/dist/infra/index.d.ts +7 -0
  36. package/dist/infra/index.d.ts.map +1 -0
  37. package/dist/infra/jwks-loader.d.ts +13 -0
  38. package/dist/infra/jwks-loader.d.ts.map +1 -0
  39. package/dist/infra/key-loader.d.ts +14 -0
  40. package/dist/infra/key-loader.d.ts.map +1 -0
  41. package/dist/infra/path-safety.d.ts +35 -0
  42. package/dist/infra/path-safety.d.ts.map +1 -0
  43. package/dist/infra/policy.d.ts +130 -0
  44. package/dist/infra/policy.d.ts.map +1 -0
  45. package/dist/schemas/bundle.d.ts +71 -0
  46. package/dist/schemas/bundle.d.ts.map +1 -0
  47. package/dist/schemas/decode.d.ts +50 -0
  48. package/dist/schemas/decode.d.ts.map +1 -0
  49. package/dist/schemas/index.d.ts +6 -0
  50. package/dist/schemas/index.d.ts.map +1 -0
  51. package/dist/schemas/inspect.d.ts +94 -0
  52. package/dist/schemas/inspect.d.ts.map +1 -0
  53. package/dist/schemas/issue.d.ts +123 -0
  54. package/dist/schemas/issue.d.ts.map +1 -0
  55. package/dist/schemas/verify.d.ts +94 -0
  56. package/dist/schemas/verify.d.ts.map +1 -0
  57. package/dist/server.d.ts +19 -0
  58. package/dist/server.d.ts.map +1 -0
  59. package/dist/stdout-fence.d.ts +11 -0
  60. package/dist/stdout-fence.d.ts.map +1 -0
  61. package/package.json +66 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../../src/infra/policy.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiCxB,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOvB,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAmBxD,wBAAgB,gBAAgB,IAAI,YAAY,CAE/C;AAoBD;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,CAGrF;AAED,wBAAsB,UAAU,CAC9B,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC;IAAE,MAAM,EAAE,YAAY,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAsCjD"}
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Bundle tool schemas -- ZERO MCP SDK imports (DD-57)
3
+ */
4
+ import { z } from 'zod';
5
+ export declare const BundleInputSchema: z.ZodObject<{
6
+ receipts: z.ZodArray<z.ZodString, "many">;
7
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
8
+ output_path: z.ZodOptional<z.ZodString>;
9
+ }, "strip", z.ZodTypeAny, {
10
+ receipts: string[];
11
+ metadata?: Record<string, unknown> | undefined;
12
+ output_path?: string | undefined;
13
+ }, {
14
+ receipts: string[];
15
+ metadata?: Record<string, unknown> | undefined;
16
+ output_path?: string | undefined;
17
+ }>;
18
+ export type BundleInput = z.infer<typeof BundleInputSchema>;
19
+ export declare const BundleOutputSchema: z.ZodObject<{
20
+ _meta: z.ZodObject<{
21
+ serverVersion: z.ZodString;
22
+ policyHash: z.ZodString;
23
+ protocolVersion: z.ZodString;
24
+ }, "strip", z.ZodTypeAny, {
25
+ serverVersion: string;
26
+ policyHash: string;
27
+ protocolVersion: string;
28
+ }, {
29
+ serverVersion: string;
30
+ policyHash: string;
31
+ protocolVersion: string;
32
+ }>;
33
+ ok: z.ZodBoolean;
34
+ bundleId: z.ZodString;
35
+ bundleName: z.ZodString;
36
+ receiptCount: z.ZodNumber;
37
+ fileCount: z.ZodNumber;
38
+ totalBytes: z.ZodNumber;
39
+ createdAt: z.ZodString;
40
+ manifestSha256: z.ZodString;
41
+ }, "strip", z.ZodTypeAny, {
42
+ _meta: {
43
+ serverVersion: string;
44
+ policyHash: string;
45
+ protocolVersion: string;
46
+ };
47
+ ok: boolean;
48
+ bundleId: string;
49
+ bundleName: string;
50
+ receiptCount: number;
51
+ fileCount: number;
52
+ totalBytes: number;
53
+ createdAt: string;
54
+ manifestSha256: string;
55
+ }, {
56
+ _meta: {
57
+ serverVersion: string;
58
+ policyHash: string;
59
+ protocolVersion: string;
60
+ };
61
+ ok: boolean;
62
+ bundleId: string;
63
+ bundleName: string;
64
+ receiptCount: number;
65
+ fileCount: number;
66
+ totalBytes: number;
67
+ createdAt: string;
68
+ manifestSha256: string;
69
+ }>;
70
+ export type BundleOutput = z.infer<typeof BundleOutputSchema>;
71
+ //# sourceMappingURL=bundle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../../src/schemas/bundle.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;EAe5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAQ5D,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAU7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Decode tool schemas -- ZERO MCP SDK imports (DD-57)
3
+ */
4
+ import { z } from 'zod';
5
+ export declare const DecodeInputSchema: z.ZodObject<{
6
+ jws: z.ZodString;
7
+ }, "strip", z.ZodTypeAny, {
8
+ jws: string;
9
+ }, {
10
+ jws: string;
11
+ }>;
12
+ export type DecodeInput = z.infer<typeof DecodeInputSchema>;
13
+ export declare const DecodeOutputSchema: z.ZodObject<{
14
+ _meta: z.ZodObject<{
15
+ serverVersion: z.ZodString;
16
+ policyHash: z.ZodString;
17
+ protocolVersion: z.ZodString;
18
+ }, "strip", z.ZodTypeAny, {
19
+ serverVersion: string;
20
+ policyHash: string;
21
+ protocolVersion: string;
22
+ }, {
23
+ serverVersion: string;
24
+ policyHash: string;
25
+ protocolVersion: string;
26
+ }>;
27
+ header: z.ZodRecord<z.ZodString, z.ZodUnknown>;
28
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
29
+ verified: z.ZodLiteral<false>;
30
+ }, "strip", z.ZodTypeAny, {
31
+ _meta: {
32
+ serverVersion: string;
33
+ policyHash: string;
34
+ protocolVersion: string;
35
+ };
36
+ header: Record<string, unknown>;
37
+ verified: false;
38
+ payload: Record<string, unknown>;
39
+ }, {
40
+ _meta: {
41
+ serverVersion: string;
42
+ policyHash: string;
43
+ protocolVersion: string;
44
+ };
45
+ header: Record<string, unknown>;
46
+ verified: false;
47
+ payload: Record<string, unknown>;
48
+ }>;
49
+ export type DecodeOutput = z.infer<typeof DecodeOutputSchema>;
50
+ //# sourceMappingURL=decode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decode.d.ts","sourceRoot":"","sources":["../../src/schemas/decode.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,iBAAiB;;;;;;EAE5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAQ5D,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export * from './verify.js';
2
+ export * from './inspect.js';
3
+ export * from './decode.js';
4
+ export * from './issue.js';
5
+ export * from './bundle.js';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC"}
@@ -0,0 +1,94 @@
1
+ /**
2
+ * Inspect tool schemas -- ZERO MCP SDK imports (DD-57)
3
+ */
4
+ import { z } from 'zod';
5
+ export declare const InspectInputSchema: z.ZodObject<{
6
+ jws: z.ZodString;
7
+ full_claims: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ jws: string;
10
+ full_claims: boolean;
11
+ }, {
12
+ jws: string;
13
+ full_claims?: boolean | undefined;
14
+ }>;
15
+ export type InspectInput = z.infer<typeof InspectInputSchema>;
16
+ export declare const InspectOutputSchema: z.ZodObject<{
17
+ _meta: z.ZodObject<{
18
+ serverVersion: z.ZodString;
19
+ policyHash: z.ZodString;
20
+ protocolVersion: z.ZodString;
21
+ }, "strip", z.ZodTypeAny, {
22
+ serverVersion: string;
23
+ policyHash: string;
24
+ protocolVersion: string;
25
+ }, {
26
+ serverVersion: string;
27
+ policyHash: string;
28
+ protocolVersion: string;
29
+ }>;
30
+ header: z.ZodRecord<z.ZodString, z.ZodUnknown>;
31
+ payloadMeta: z.ZodObject<{
32
+ variant: z.ZodString;
33
+ issuer: z.ZodOptional<z.ZodString>;
34
+ audience: z.ZodOptional<z.ZodString>;
35
+ issuedAt: z.ZodOptional<z.ZodString>;
36
+ expiresAt: z.ZodOptional<z.ZodString>;
37
+ receiptId: z.ZodOptional<z.ZodString>;
38
+ }, "strip", z.ZodTypeAny, {
39
+ variant: string;
40
+ issuer?: string | undefined;
41
+ audience?: string | undefined;
42
+ issuedAt?: string | undefined;
43
+ expiresAt?: string | undefined;
44
+ receiptId?: string | undefined;
45
+ }, {
46
+ variant: string;
47
+ issuer?: string | undefined;
48
+ audience?: string | undefined;
49
+ issuedAt?: string | undefined;
50
+ expiresAt?: string | undefined;
51
+ receiptId?: string | undefined;
52
+ }>;
53
+ fullPayload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
54
+ redacted: z.ZodBoolean;
55
+ verified: z.ZodLiteral<false>;
56
+ }, "strip", z.ZodTypeAny, {
57
+ _meta: {
58
+ serverVersion: string;
59
+ policyHash: string;
60
+ protocolVersion: string;
61
+ };
62
+ header: Record<string, unknown>;
63
+ payloadMeta: {
64
+ variant: string;
65
+ issuer?: string | undefined;
66
+ audience?: string | undefined;
67
+ issuedAt?: string | undefined;
68
+ expiresAt?: string | undefined;
69
+ receiptId?: string | undefined;
70
+ };
71
+ redacted: boolean;
72
+ verified: false;
73
+ fullPayload?: Record<string, unknown> | undefined;
74
+ }, {
75
+ _meta: {
76
+ serverVersion: string;
77
+ policyHash: string;
78
+ protocolVersion: string;
79
+ };
80
+ header: Record<string, unknown>;
81
+ payloadMeta: {
82
+ variant: string;
83
+ issuer?: string | undefined;
84
+ audience?: string | undefined;
85
+ issuedAt?: string | undefined;
86
+ expiresAt?: string | undefined;
87
+ receiptId?: string | undefined;
88
+ };
89
+ redacted: boolean;
90
+ verified: false;
91
+ fullPayload?: Record<string, unknown> | undefined;
92
+ }>;
93
+ export type InspectOutput = z.infer<typeof InspectOutputSchema>;
94
+ //# sourceMappingURL=inspect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../../src/schemas/inspect.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,kBAAkB;;;;;;;;;EAO7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAQ9D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAc9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
@@ -0,0 +1,123 @@
1
+ /**
2
+ * Issue tool schemas -- ZERO MCP SDK imports (DD-57)
3
+ */
4
+ import { z } from 'zod';
5
+ export declare const IssueInputSchema: z.ZodObject<{
6
+ aud: z.ZodString;
7
+ amt: z.ZodNumber;
8
+ cur: z.ZodString;
9
+ rail: z.ZodString;
10
+ reference: z.ZodString;
11
+ asset: z.ZodOptional<z.ZodString>;
12
+ env: z.ZodDefault<z.ZodEnum<["live", "test"]>>;
13
+ network: z.ZodOptional<z.ZodString>;
14
+ evidence: z.ZodOptional<z.ZodUnknown>;
15
+ subject: z.ZodOptional<z.ZodString>;
16
+ ttl_seconds: z.ZodOptional<z.ZodNumber>;
17
+ kind: z.ZodOptional<z.ZodString>;
18
+ }, "strip", z.ZodTypeAny, {
19
+ aud: string;
20
+ amt: number;
21
+ cur: string;
22
+ rail: string;
23
+ reference: string;
24
+ env: "live" | "test";
25
+ subject?: string | undefined;
26
+ evidence?: unknown;
27
+ asset?: string | undefined;
28
+ network?: string | undefined;
29
+ ttl_seconds?: number | undefined;
30
+ kind?: string | undefined;
31
+ }, {
32
+ aud: string;
33
+ amt: number;
34
+ cur: string;
35
+ rail: string;
36
+ reference: string;
37
+ subject?: string | undefined;
38
+ evidence?: unknown;
39
+ asset?: string | undefined;
40
+ env?: "live" | "test" | undefined;
41
+ network?: string | undefined;
42
+ ttl_seconds?: number | undefined;
43
+ kind?: string | undefined;
44
+ }>;
45
+ export type IssueInput = z.infer<typeof IssueInputSchema>;
46
+ export declare const IssueOutputSchema: z.ZodObject<{
47
+ _meta: z.ZodObject<{
48
+ serverVersion: z.ZodString;
49
+ policyHash: z.ZodString;
50
+ protocolVersion: z.ZodString;
51
+ }, "strip", z.ZodTypeAny, {
52
+ serverVersion: string;
53
+ policyHash: string;
54
+ protocolVersion: string;
55
+ }, {
56
+ serverVersion: string;
57
+ policyHash: string;
58
+ protocolVersion: string;
59
+ }>;
60
+ ok: z.ZodBoolean;
61
+ jws: z.ZodString;
62
+ claimsSummary: z.ZodObject<{
63
+ iss: z.ZodString;
64
+ aud: z.ZodString;
65
+ iat: z.ZodNumber;
66
+ exp: z.ZodOptional<z.ZodNumber>;
67
+ rid: z.ZodString;
68
+ amt: z.ZodNumber;
69
+ cur: z.ZodString;
70
+ }, "strip", z.ZodTypeAny, {
71
+ iss: string;
72
+ aud: string;
73
+ rid: string;
74
+ amt: number;
75
+ cur: string;
76
+ iat: number;
77
+ exp?: number | undefined;
78
+ }, {
79
+ iss: string;
80
+ aud: string;
81
+ rid: string;
82
+ amt: number;
83
+ cur: string;
84
+ iat: number;
85
+ exp?: number | undefined;
86
+ }>;
87
+ }, "strip", z.ZodTypeAny, {
88
+ jws: string;
89
+ _meta: {
90
+ serverVersion: string;
91
+ policyHash: string;
92
+ protocolVersion: string;
93
+ };
94
+ ok: boolean;
95
+ claimsSummary: {
96
+ iss: string;
97
+ aud: string;
98
+ rid: string;
99
+ amt: number;
100
+ cur: string;
101
+ iat: number;
102
+ exp?: number | undefined;
103
+ };
104
+ }, {
105
+ jws: string;
106
+ _meta: {
107
+ serverVersion: string;
108
+ policyHash: string;
109
+ protocolVersion: string;
110
+ };
111
+ ok: boolean;
112
+ claimsSummary: {
113
+ iss: string;
114
+ aud: string;
115
+ rid: string;
116
+ amt: number;
117
+ cur: string;
118
+ iat: number;
119
+ exp?: number | undefined;
120
+ };
121
+ }>;
122
+ export type IssueOutput = z.infer<typeof IssueOutputSchema>;
123
+ //# sourceMappingURL=issue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"issue.d.ts","sourceRoot":"","sources":["../../src/schemas/issue.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqB3B,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAkB1D,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
@@ -0,0 +1,94 @@
1
+ /**
2
+ * Verify tool schemas -- ZERO MCP SDK imports (DD-57)
3
+ */
4
+ import { z } from 'zod';
5
+ export declare const VerifyInputSchema: z.ZodObject<{
6
+ jws: z.ZodString;
7
+ public_key_base64url: z.ZodOptional<z.ZodString>;
8
+ jwks: z.ZodOptional<z.ZodString>;
9
+ issuer: z.ZodOptional<z.ZodString>;
10
+ audience: z.ZodOptional<z.ZodString>;
11
+ }, "strip", z.ZodTypeAny, {
12
+ jws: string;
13
+ jwks?: string | undefined;
14
+ public_key_base64url?: string | undefined;
15
+ issuer?: string | undefined;
16
+ audience?: string | undefined;
17
+ }, {
18
+ jws: string;
19
+ jwks?: string | undefined;
20
+ public_key_base64url?: string | undefined;
21
+ issuer?: string | undefined;
22
+ audience?: string | undefined;
23
+ }>;
24
+ export type VerifyInput = z.infer<typeof VerifyInputSchema>;
25
+ export declare const VerifyOutputSchema: z.ZodObject<{
26
+ _meta: z.ZodObject<{
27
+ serverVersion: z.ZodString;
28
+ policyHash: z.ZodString;
29
+ protocolVersion: z.ZodString;
30
+ }, "strip", z.ZodTypeAny, {
31
+ serverVersion: string;
32
+ policyHash: string;
33
+ protocolVersion: string;
34
+ }, {
35
+ serverVersion: string;
36
+ policyHash: string;
37
+ protocolVersion: string;
38
+ }>;
39
+ ok: z.ZodBoolean;
40
+ code: z.ZodOptional<z.ZodString>;
41
+ message: z.ZodOptional<z.ZodString>;
42
+ variant: z.ZodOptional<z.ZodString>;
43
+ checks: z.ZodArray<z.ZodObject<{
44
+ name: z.ZodString;
45
+ passed: z.ZodBoolean;
46
+ message: z.ZodOptional<z.ZodString>;
47
+ }, "strip", z.ZodTypeAny, {
48
+ name: string;
49
+ passed: boolean;
50
+ message?: string | undefined;
51
+ }, {
52
+ name: string;
53
+ passed: boolean;
54
+ message?: string | undefined;
55
+ }>, "many">;
56
+ claimsSummary: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
57
+ keySource: z.ZodOptional<z.ZodString>;
58
+ }, "strip", z.ZodTypeAny, {
59
+ _meta: {
60
+ serverVersion: string;
61
+ policyHash: string;
62
+ protocolVersion: string;
63
+ };
64
+ ok: boolean;
65
+ checks: {
66
+ name: string;
67
+ passed: boolean;
68
+ message?: string | undefined;
69
+ }[];
70
+ code?: string | undefined;
71
+ message?: string | undefined;
72
+ variant?: string | undefined;
73
+ claimsSummary?: Record<string, unknown> | undefined;
74
+ keySource?: string | undefined;
75
+ }, {
76
+ _meta: {
77
+ serverVersion: string;
78
+ policyHash: string;
79
+ protocolVersion: string;
80
+ };
81
+ ok: boolean;
82
+ checks: {
83
+ name: string;
84
+ passed: boolean;
85
+ message?: string | undefined;
86
+ }[];
87
+ code?: string | undefined;
88
+ message?: string | undefined;
89
+ variant?: string | undefined;
90
+ claimsSummary?: Record<string, unknown> | undefined;
91
+ keySource?: string | undefined;
92
+ }>;
93
+ export type VerifyOutput = z.infer<typeof VerifyOutputSchema>;
94
+ //# sourceMappingURL=verify.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../src/schemas/verify.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;EAS5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAc5D,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * MCP Server binding -- ONLY file importing @modelcontextprotocol/sdk
3
+ *
4
+ * Registers pure tool handlers with the MCP server.
5
+ * Injects _meta audit block into every response.
6
+ */
7
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
8
+ import type { PolicyConfig } from './infra/policy.js';
9
+ import type { ServerContext } from './handlers/types.js';
10
+ export interface ServerOptions {
11
+ version: string;
12
+ policy: PolicyConfig;
13
+ policyHash: string;
14
+ protocolVersion: string;
15
+ context: ServerContext;
16
+ }
17
+ export declare function createPeacMcpServer(options: ServerOptions): McpServer;
18
+ export { McpServer };
19
+ //# sourceMappingURL=server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAiB,MAAM,qBAAqB,CAAC;AAkBxE,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,YAAY,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,aAAa,CAAC;CACxB;AAsFD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,aAAa,GAAG,SAAS,CAgQrE;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Stdout fence (DD-58: line-buffered JSON-RPC validator)
3
+ *
4
+ * Monkey-patches process.stdout.write at startup.
5
+ * Buffers bytes, splits on newline, validates each complete line
6
+ * as JSON-RPC 2.0. Invalid lines cause a fail-fast throw.
7
+ *
8
+ * Returns a teardown function that restores the original write.
9
+ */
10
+ export declare function installStdoutFence(): () => void;
11
+ //# sourceMappingURL=stdout-fence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stdout-fence.d.ts","sourceRoot":"","sources":["../src/stdout-fence.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAUH,wBAAgB,kBAAkB,IAAI,MAAM,IAAI,CAgI/C"}
package/package.json ADDED
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "@peac/mcp-server",
3
+ "version": "0.10.13",
4
+ "description": "PEAC receipt operations as MCP tools (verify, inspect, decode)",
5
+ "main": "dist/index.cjs",
6
+ "types": "dist/index.d.ts",
7
+ "bin": {
8
+ "peac-mcp-server": "./dist/cli.cjs"
9
+ },
10
+ "sideEffects": false,
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "import": "./dist/index.mjs",
15
+ "require": "./dist/index.cjs",
16
+ "default": "./dist/index.mjs"
17
+ },
18
+ "./package.json": "./package.json"
19
+ },
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "https://github.com/peacprotocol/peac.git",
23
+ "directory": "packages/mcp-server"
24
+ },
25
+ "author": "jithinraj <7850727+jithinraj@users.noreply.github.com>",
26
+ "license": "Apache-2.0",
27
+ "bugs": {
28
+ "url": "https://github.com/peacprotocol/peac/issues"
29
+ },
30
+ "homepage": "https://github.com/peacprotocol/peac#readme",
31
+ "engines": {
32
+ "node": ">=22.0.0"
33
+ },
34
+ "files": [
35
+ "dist",
36
+ "README.md"
37
+ ],
38
+ "publishConfig": {
39
+ "access": "public",
40
+ "provenance": true
41
+ },
42
+ "dependencies": {
43
+ "@modelcontextprotocol/sdk": "~1.27.0",
44
+ "commander": "^11.0.0",
45
+ "zod": "^3.22.4",
46
+ "@peac/schema": "0.10.13",
47
+ "@peac/protocol": "0.10.13",
48
+ "@peac/crypto": "0.10.13"
49
+ },
50
+ "devDependencies": {
51
+ "@types/node": "^22.0.0",
52
+ "typescript": "^5.3.3",
53
+ "vitest": "^4.0.0",
54
+ "tsup": "^8.0.0"
55
+ },
56
+ "scripts": {
57
+ "prebuild": "rm -rf dist",
58
+ "build": "pnpm run build:js && pnpm run build:types",
59
+ "test": "pnpm -w vitest run packages/mcp-server/tests",
60
+ "test:watch": "pnpm -w vitest packages/mcp-server/tests",
61
+ "lint": "eslint src/",
62
+ "clean": "rm -rf dist",
63
+ "build:js": "node scripts/build-js.mjs",
64
+ "build:types": "rm -f dist/.tsbuildinfo && tsc && rm -f dist/.tsbuildinfo"
65
+ }
66
+ }