fixparser-plugin-mcp 9.1.7-edd3725d → 9.1.7-edd9ee17
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/build/cjs/MCPLocal.js +1265 -631
- package/build/cjs/MCPLocal.js.map +4 -4
- package/build/cjs/MCPRemote.js +1328 -435
- package/build/cjs/MCPRemote.js.map +4 -4
- package/build/cjs/index.js +1627 -0
- package/build/cjs/index.js.map +7 -0
- package/build/esm/MCPLocal.mjs +1255 -646
- package/build/esm/MCPLocal.mjs.map +4 -4
- package/build/esm/MCPRemote.mjs +1318 -444
- package/build/esm/MCPRemote.mjs.map +4 -4
- package/build/esm/index.mjs +1589 -0
- package/build/esm/index.mjs.map +7 -0
- package/build-examples/cjs/example_mcp_local.js +14 -4
- package/build-examples/cjs/example_mcp_local.js.map +4 -4
- package/build-examples/cjs/example_mcp_remote.js +16 -0
- package/build-examples/cjs/example_mcp_remote.js.map +7 -0
- package/build-examples/esm/example_mcp_local.mjs +14 -4
- package/build-examples/esm/example_mcp_local.mjs.map +4 -4
- package/build-examples/esm/example_mcp_remote.mjs +16 -0
- package/build-examples/esm/example_mcp_remote.mjs.map +7 -0
- package/package.json +10 -10
- package/types/MCPBase.d.ts +49 -0
- package/types/MCPLocal.d.ts +25 -7
- package/types/MCPRemote.d.ts +25 -27
- package/types/schemas/index.d.ts +16 -0
- package/types/schemas/marketData.d.ts +48 -0
- package/types/schemas/schemas.d.ts +168 -0
- package/types/tools/index.d.ts +8 -0
- package/types/tools/marketData.d.ts +19 -0
- package/types/tools/order.d.ts +12 -0
- package/types/tools/parse.d.ts +5 -0
- package/types/tools/parseToJSON.d.ts +5 -0
- package/types/utils/messageHandler.d.ts +12 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
export declare const toolSchemas: {
|
|
2
|
+
parse: {
|
|
3
|
+
description: string;
|
|
4
|
+
schema: {
|
|
5
|
+
type: string;
|
|
6
|
+
properties: {
|
|
7
|
+
fixString: {
|
|
8
|
+
type: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
required: string[];
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
parseToJSON: {
|
|
15
|
+
description: string;
|
|
16
|
+
schema: {
|
|
17
|
+
type: string;
|
|
18
|
+
properties: {
|
|
19
|
+
fixString: {
|
|
20
|
+
type: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
required: string[];
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
verifyOrder: {
|
|
27
|
+
description: string;
|
|
28
|
+
schema: {
|
|
29
|
+
type: string;
|
|
30
|
+
properties: {
|
|
31
|
+
clOrdID: {
|
|
32
|
+
type: string;
|
|
33
|
+
};
|
|
34
|
+
handlInst: {
|
|
35
|
+
type: string;
|
|
36
|
+
enum: string[];
|
|
37
|
+
description: string;
|
|
38
|
+
};
|
|
39
|
+
quantity: {
|
|
40
|
+
type: string;
|
|
41
|
+
};
|
|
42
|
+
price: {
|
|
43
|
+
type: string;
|
|
44
|
+
};
|
|
45
|
+
ordType: {
|
|
46
|
+
type: string;
|
|
47
|
+
enum: string[];
|
|
48
|
+
description: string;
|
|
49
|
+
};
|
|
50
|
+
side: {
|
|
51
|
+
type: string;
|
|
52
|
+
enum: string[];
|
|
53
|
+
description: string;
|
|
54
|
+
};
|
|
55
|
+
symbol: {
|
|
56
|
+
type: string;
|
|
57
|
+
};
|
|
58
|
+
timeInForce: {
|
|
59
|
+
type: string;
|
|
60
|
+
enum: string[];
|
|
61
|
+
description: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
required: string[];
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
executeOrder: {
|
|
68
|
+
description: string;
|
|
69
|
+
schema: {
|
|
70
|
+
type: string;
|
|
71
|
+
properties: {
|
|
72
|
+
clOrdID: {
|
|
73
|
+
type: string;
|
|
74
|
+
};
|
|
75
|
+
handlInst: {
|
|
76
|
+
type: string;
|
|
77
|
+
enum: string[];
|
|
78
|
+
description: string;
|
|
79
|
+
};
|
|
80
|
+
quantity: {
|
|
81
|
+
type: string;
|
|
82
|
+
};
|
|
83
|
+
price: {
|
|
84
|
+
type: string;
|
|
85
|
+
};
|
|
86
|
+
ordType: {
|
|
87
|
+
type: string;
|
|
88
|
+
enum: string[];
|
|
89
|
+
description: string;
|
|
90
|
+
};
|
|
91
|
+
side: {
|
|
92
|
+
type: string;
|
|
93
|
+
enum: string[];
|
|
94
|
+
description: string;
|
|
95
|
+
};
|
|
96
|
+
symbol: {
|
|
97
|
+
type: string;
|
|
98
|
+
};
|
|
99
|
+
timeInForce: {
|
|
100
|
+
type: string;
|
|
101
|
+
enum: string[];
|
|
102
|
+
description: string;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
required: string[];
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
marketDataRequest: {
|
|
109
|
+
description: string;
|
|
110
|
+
schema: {
|
|
111
|
+
type: string;
|
|
112
|
+
properties: {
|
|
113
|
+
mdUpdateType: {
|
|
114
|
+
type: string;
|
|
115
|
+
enum: string[];
|
|
116
|
+
description: string;
|
|
117
|
+
};
|
|
118
|
+
symbols: {
|
|
119
|
+
type: string;
|
|
120
|
+
items: {
|
|
121
|
+
type: string;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
mdReqID: {
|
|
125
|
+
type: string;
|
|
126
|
+
};
|
|
127
|
+
subscriptionRequestType: {
|
|
128
|
+
type: string;
|
|
129
|
+
enum: string[];
|
|
130
|
+
description: string;
|
|
131
|
+
};
|
|
132
|
+
mdEntryTypes: {
|
|
133
|
+
type: string;
|
|
134
|
+
items: {
|
|
135
|
+
type: string;
|
|
136
|
+
enum: string[];
|
|
137
|
+
};
|
|
138
|
+
description: string;
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
required: string[];
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
getStockGraph: {
|
|
145
|
+
description: string;
|
|
146
|
+
schema: {
|
|
147
|
+
type: string;
|
|
148
|
+
properties: {
|
|
149
|
+
symbol: {
|
|
150
|
+
type: string;
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
required: string[];
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
getStockPriceHistory: {
|
|
157
|
+
description: string;
|
|
158
|
+
schema: {
|
|
159
|
+
type: string;
|
|
160
|
+
properties: {
|
|
161
|
+
symbol: {
|
|
162
|
+
type: string;
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
required: string[];
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IFIXParser, Message } from 'fixparser';
|
|
2
|
+
import type { MarketDataEntry, ToolHandlers, VerifiedOrder } from '../schemas';
|
|
3
|
+
export declare const createToolHandlers: (
|
|
4
|
+
parser: IFIXParser,
|
|
5
|
+
verifiedOrders: Map<string, VerifiedOrder>,
|
|
6
|
+
pendingRequests: Map<string, (data: Message) => void>,
|
|
7
|
+
marketDataPrices: Map<string, MarketDataEntry[]>,
|
|
8
|
+
) => ToolHandlers;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
+
import { type IFIXParser, type Message } from 'fixparser';
|
|
3
|
+
import type { MarketDataEntry } from '../schemas';
|
|
4
|
+
export declare const createMarketDataRequestHandler: (
|
|
5
|
+
parser: IFIXParser,
|
|
6
|
+
pendingRequests: Map<string, (data: Message) => void>,
|
|
7
|
+
) => (args: {
|
|
8
|
+
mdUpdateType: string;
|
|
9
|
+
symbols: string[];
|
|
10
|
+
mdReqID: string;
|
|
11
|
+
subscriptionRequestType: string;
|
|
12
|
+
mdEntryTypes?: string[];
|
|
13
|
+
}) => Promise<CallToolResult>;
|
|
14
|
+
export declare const createGetStockGraphHandler: (marketDataPrices: Map<string, MarketDataEntry[]>) => (args: {
|
|
15
|
+
symbol: string;
|
|
16
|
+
}) => Promise<CallToolResult>;
|
|
17
|
+
export declare const createGetStockPriceHistoryHandler: (marketDataPrices: Map<string, MarketDataEntry[]>) => (args: {
|
|
18
|
+
symbol: string;
|
|
19
|
+
}) => Promise<CallToolResult>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
+
import { type IFIXParser, type Message } from 'fixparser';
|
|
3
|
+
import type { VerifiedOrder } from '../schemas';
|
|
4
|
+
export declare const createVerifyOrderHandler: (
|
|
5
|
+
parser: IFIXParser,
|
|
6
|
+
verifiedOrders: Map<string, VerifiedOrder>,
|
|
7
|
+
) => (args: VerifiedOrder) => Promise<CallToolResult>;
|
|
8
|
+
export declare const createExecuteOrderHandler: (
|
|
9
|
+
parser: IFIXParser,
|
|
10
|
+
verifiedOrders: Map<string, VerifiedOrder>,
|
|
11
|
+
pendingRequests: Map<string, (data: Message) => void>,
|
|
12
|
+
) => (args: VerifiedOrder) => Promise<CallToolResult>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type IFIXParser, type Message } from 'fixparser';
|
|
2
|
+
import type { MarketDataEntry } from '../schemas/marketData.ts';
|
|
3
|
+
export type PendingRequests = Map<string, (data: Message) => void>;
|
|
4
|
+
export type MarketDataPrices = Map<string, MarketDataEntry[]>;
|
|
5
|
+
export declare function handleMessage(
|
|
6
|
+
message: Message,
|
|
7
|
+
parser: IFIXParser,
|
|
8
|
+
pendingRequests: PendingRequests,
|
|
9
|
+
marketDataPrices: MarketDataPrices,
|
|
10
|
+
maxPriceHistory: number,
|
|
11
|
+
onPriceUpdate?: (symbol: string, data: MarketDataEntry) => void,
|
|
12
|
+
): void;
|