@stratabook/mcp 0.1.4 → 0.1.5

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.
@@ -3,11 +3,13 @@ export declare const STRATA_AGENT_HARNESS: {
3
3
  readonly harness_version: "1.0";
4
4
  readonly contract_version: "1.1";
5
5
  readonly name: "Strata Agent Harness";
6
- readonly summary: "A capability-gated workflow and executable action graph for agents that discover, quote, prepare, externally sign, and submit Strata operations.";
6
+ readonly summary: "A capability-gated workflow and executable action graph for agents that discover, read market and account state, quote, prepare, externally sign, and submit Strata operations.";
7
7
  readonly entrypoints: {
8
8
  readonly documentation: "https://stratabook.org/docs/agent-harness/";
9
9
  readonly capabilities: "https://api.stratabook.app/sonar/capabilities";
10
10
  readonly markets: "https://api.stratabook.app/sonar/markets";
11
+ readonly platform_capabilities: "https://api.stratabook.app/v2/capabilities";
12
+ readonly platform_markets: "https://api.stratabook.app/v2/markets";
11
13
  readonly action_graph: "https://api.stratabook.app/sonar/action-graph";
12
14
  readonly mcp: "https://api.stratabook.app/mcp";
13
15
  readonly manifest: "https://api.stratabook.app/.well-known/strata-agent.json";
@@ -28,6 +30,12 @@ export declare const STRATA_AGENT_HARNESS: {
28
30
  }, {
29
31
  readonly id: "discover_market";
30
32
  readonly instruction: "List markets, select one marked ready, and use its discovered base and quote decimals. Do not guess market identifiers or token decimals.";
33
+ }, {
34
+ readonly id: "read_market_data";
35
+ readonly instruction: "When books.read is live, use the opaque market ID to read the Strata book, status, fees, and recent trades. Subscribe to the market stream for changes and recover from any sequence gap with a fresh snapshot.";
36
+ }, {
37
+ readonly id: "read_account";
38
+ readonly instruction: "When account.read is live, use the owner-configured signer to authorize the exact wallet, market, request time, and fill limit. Read or stream only the sanitized orders and fills returned by the official SDK, and recover stream gaps from a fresh signed snapshot.";
31
39
  }, {
32
40
  readonly id: "preserve_atoms";
33
41
  readonly instruction: "Represent token amounts as unsigned base-10 atomic strings. Never pass settlement amounts through floating-point arithmetic.";
@@ -39,7 +47,7 @@ export declare const STRATA_AGENT_HARNESS: {
39
47
  readonly instruction: "Verify the quote binds to the selected market, side, and input. Check labelled fees, minimum output, price impact, server time, and expiry.";
40
48
  }, {
41
49
  readonly id: "report_result";
42
- readonly instruction: "Report consumed input, expected output, minimum output, fees by asset side, price impact, and remaining validity without inventing private route composition.";
50
+ readonly instruction: "Report consumed input, expected output, minimum output, fees by asset side, price impact, and remaining validity.";
43
51
  }, {
44
52
  readonly id: "authorize_writes";
45
53
  readonly instruction: "When prepare and submit are exposed, keep signing external to Strata: request canonical authorization bytes, sign them with the owner-configured signer, verify the prepared transaction preserves the quote, then submit the externally signed transaction with idempotency.";
@@ -94,6 +102,112 @@ export declare const STRATA_ACTION_GRAPH: {
94
102
  readonly path: "/sonar/action-graph";
95
103
  readonly mcp_tool: "strata_action_graph";
96
104
  };
105
+ }, {
106
+ readonly id: "discover_platform_capabilities";
107
+ readonly kind: "discovery";
108
+ readonly summary: "Read the versioned capabilities available through the official SDK.";
109
+ readonly required_capabilities: readonly [];
110
+ readonly available: true;
111
+ readonly operation: {
112
+ readonly method: "GET";
113
+ readonly path: "/v2/capabilities";
114
+ };
115
+ }, {
116
+ readonly id: "discover_platform_markets";
117
+ readonly kind: "discovery";
118
+ readonly summary: "Discover opaque market IDs and current market status.";
119
+ readonly required_capabilities: readonly ["markets.read"];
120
+ readonly available: true;
121
+ readonly operation: {
122
+ readonly method: "GET";
123
+ readonly path: "/v2/markets";
124
+ };
125
+ }, {
126
+ readonly id: "read_book";
127
+ readonly kind: "read";
128
+ readonly summary: "Read a sequenced Strata book snapshot.";
129
+ readonly required_capabilities: readonly ["books.read"];
130
+ readonly available: true;
131
+ readonly operation: {
132
+ readonly method: "GET";
133
+ readonly path: "/v2/markets/{market_id}/book";
134
+ };
135
+ }, {
136
+ readonly id: "read_market_status";
137
+ readonly kind: "read";
138
+ readonly summary: "Read tick size, minimum order size, and current market status.";
139
+ readonly required_capabilities: readonly ["books.read"];
140
+ readonly available: true;
141
+ readonly operation: {
142
+ readonly method: "GET";
143
+ readonly path: "/v2/markets/{market_id}/status";
144
+ };
145
+ }, {
146
+ readonly id: "read_best_bid_ask";
147
+ readonly kind: "read";
148
+ readonly summary: "Read the current best bid and ask.";
149
+ readonly required_capabilities: readonly ["books.read"];
150
+ readonly available: true;
151
+ readonly operation: {
152
+ readonly method: "GET";
153
+ readonly path: "/v2/markets/{market_id}/bbo";
154
+ };
155
+ }, {
156
+ readonly id: "read_fees";
157
+ readonly kind: "read";
158
+ readonly summary: "Read the market fee schedule.";
159
+ readonly required_capabilities: readonly ["books.read"];
160
+ readonly available: true;
161
+ readonly operation: {
162
+ readonly method: "GET";
163
+ readonly path: "/v2/markets/{market_id}/fees";
164
+ };
165
+ }, {
166
+ readonly id: "read_trades";
167
+ readonly kind: "read";
168
+ readonly summary: "Read recent anonymized trades.";
169
+ readonly required_capabilities: readonly ["books.read"];
170
+ readonly available: true;
171
+ readonly operation: {
172
+ readonly method: "GET";
173
+ readonly path: "/v2/markets/{market_id}/trades";
174
+ };
175
+ }, {
176
+ readonly id: "stream_market";
177
+ readonly kind: "read";
178
+ readonly summary: "Subscribe to book changes, trades, and heartbeats with automatic recovery.";
179
+ readonly required_capabilities: readonly ["books.read"];
180
+ readonly available: true;
181
+ readonly operation: {
182
+ readonly method: "WEBSOCKET";
183
+ readonly path: "/v2/markets/{market_id}/stream";
184
+ };
185
+ }, {
186
+ readonly id: "authorize_account_read";
187
+ readonly kind: "external_signature";
188
+ readonly summary: "The agent owner's configured signer authorizes the exact account request or stream challenge.";
189
+ readonly required_capabilities: readonly [];
190
+ readonly available: true;
191
+ }, {
192
+ readonly id: "read_account";
193
+ readonly kind: "read";
194
+ readonly summary: "Read the owner's sanitized open orders and fills for a Strata market.";
195
+ readonly required_capabilities: readonly ["account.read"];
196
+ readonly available: true;
197
+ readonly operation: {
198
+ readonly method: "GET";
199
+ readonly path: "/v2/markets/{market_id}/account/{wallet_address}";
200
+ };
201
+ }, {
202
+ readonly id: "stream_account";
203
+ readonly kind: "read";
204
+ readonly summary: "Subscribe to signed, sequenced order and fill state for the owner.";
205
+ readonly required_capabilities: readonly ["account.read"];
206
+ readonly available: true;
207
+ readonly operation: {
208
+ readonly method: "WEBSOCKET";
209
+ readonly path: "/v2/markets/{market_id}/account/{wallet_address}/stream";
210
+ };
97
211
  }, {
98
212
  readonly id: "request_quote";
99
213
  readonly kind: "read";
@@ -165,6 +279,50 @@ export declare const STRATA_ACTION_GRAPH: {
165
279
  readonly from: "discover_action_graph";
166
280
  readonly to: "discover_markets";
167
281
  readonly condition: "markets.read is enabled";
282
+ }, {
283
+ readonly from: "discover_action_graph";
284
+ readonly to: "discover_platform_capabilities";
285
+ readonly condition: "the versioned SDK contract is supported";
286
+ }, {
287
+ readonly from: "discover_platform_capabilities";
288
+ readonly to: "discover_platform_markets";
289
+ readonly condition: "markets.read is enabled";
290
+ }, {
291
+ readonly from: "discover_platform_markets";
292
+ readonly to: "read_book";
293
+ readonly condition: "books.read is enabled and the market is active";
294
+ }, {
295
+ readonly from: "discover_platform_markets";
296
+ readonly to: "read_market_status";
297
+ readonly condition: "books.read is enabled";
298
+ }, {
299
+ readonly from: "discover_platform_markets";
300
+ readonly to: "read_best_bid_ask";
301
+ readonly condition: "books.read is enabled";
302
+ }, {
303
+ readonly from: "discover_platform_markets";
304
+ readonly to: "read_fees";
305
+ readonly condition: "books.read is enabled";
306
+ }, {
307
+ readonly from: "discover_platform_markets";
308
+ readonly to: "read_trades";
309
+ readonly condition: "books.read is enabled";
310
+ }, {
311
+ readonly from: "read_book";
312
+ readonly to: "stream_market";
313
+ readonly condition: "books.read is enabled and the snapshot sequence is accepted";
314
+ }, {
315
+ readonly from: "discover_platform_markets";
316
+ readonly to: "authorize_account_read";
317
+ readonly condition: "account.read is enabled and the owner-configured signer is available";
318
+ }, {
319
+ readonly from: "authorize_account_read";
320
+ readonly to: "read_account";
321
+ readonly condition: "the signature binds the wallet, market, request time, and fill limit";
322
+ }, {
323
+ readonly from: "read_account";
324
+ readonly to: "stream_account";
325
+ readonly condition: "the stream challenge is signed by the same owner-configured signer";
168
326
  }, {
169
327
  readonly from: "discover_markets";
170
328
  readonly to: "request_quote";
@@ -4,11 +4,13 @@ export const STRATA_AGENT_HARNESS = {
4
4
  "harness_version": "1.0",
5
5
  "contract_version": "1.1",
6
6
  "name": "Strata Agent Harness",
7
- "summary": "A capability-gated workflow and executable action graph for agents that discover, quote, prepare, externally sign, and submit Strata operations.",
7
+ "summary": "A capability-gated workflow and executable action graph for agents that discover, read market and account state, quote, prepare, externally sign, and submit Strata operations.",
8
8
  "entrypoints": {
9
9
  "documentation": "https://stratabook.org/docs/agent-harness/",
10
10
  "capabilities": "https://api.stratabook.app/sonar/capabilities",
11
11
  "markets": "https://api.stratabook.app/sonar/markets",
12
+ "platform_capabilities": "https://api.stratabook.app/v2/capabilities",
13
+ "platform_markets": "https://api.stratabook.app/v2/markets",
12
14
  "action_graph": "https://api.stratabook.app/sonar/action-graph",
13
15
  "mcp": "https://api.stratabook.app/mcp",
14
16
  "manifest": "https://api.stratabook.app/.well-known/strata-agent.json"
@@ -47,6 +49,14 @@ export const STRATA_AGENT_HARNESS = {
47
49
  "id": "discover_market",
48
50
  "instruction": "List markets, select one marked ready, and use its discovered base and quote decimals. Do not guess market identifiers or token decimals."
49
51
  },
52
+ {
53
+ "id": "read_market_data",
54
+ "instruction": "When books.read is live, use the opaque market ID to read the Strata book, status, fees, and recent trades. Subscribe to the market stream for changes and recover from any sequence gap with a fresh snapshot."
55
+ },
56
+ {
57
+ "id": "read_account",
58
+ "instruction": "When account.read is live, use the owner-configured signer to authorize the exact wallet, market, request time, and fill limit. Read or stream only the sanitized orders and fills returned by the official SDK, and recover stream gaps from a fresh signed snapshot."
59
+ },
50
60
  {
51
61
  "id": "preserve_atoms",
52
62
  "instruction": "Represent token amounts as unsigned base-10 atomic strings. Never pass settlement amounts through floating-point arithmetic."
@@ -61,7 +71,7 @@ export const STRATA_AGENT_HARNESS = {
61
71
  },
62
72
  {
63
73
  "id": "report_result",
64
- "instruction": "Report consumed input, expected output, minimum output, fees by asset side, price impact, and remaining validity without inventing private route composition."
74
+ "instruction": "Report consumed input, expected output, minimum output, fees by asset side, price impact, and remaining validity."
65
75
  },
66
76
  {
67
77
  "id": "authorize_writes",
@@ -139,6 +149,141 @@ export const STRATA_ACTION_GRAPH = {
139
149
  "mcp_tool": "strata_action_graph"
140
150
  }
141
151
  },
152
+ {
153
+ "id": "discover_platform_capabilities",
154
+ "kind": "discovery",
155
+ "summary": "Read the versioned capabilities available through the official SDK.",
156
+ "required_capabilities": [],
157
+ "available": true,
158
+ "operation": {
159
+ "method": "GET",
160
+ "path": "/v2/capabilities"
161
+ }
162
+ },
163
+ {
164
+ "id": "discover_platform_markets",
165
+ "kind": "discovery",
166
+ "summary": "Discover opaque market IDs and current market status.",
167
+ "required_capabilities": [
168
+ "markets.read"
169
+ ],
170
+ "available": true,
171
+ "operation": {
172
+ "method": "GET",
173
+ "path": "/v2/markets"
174
+ }
175
+ },
176
+ {
177
+ "id": "read_book",
178
+ "kind": "read",
179
+ "summary": "Read a sequenced Strata book snapshot.",
180
+ "required_capabilities": [
181
+ "books.read"
182
+ ],
183
+ "available": true,
184
+ "operation": {
185
+ "method": "GET",
186
+ "path": "/v2/markets/{market_id}/book"
187
+ }
188
+ },
189
+ {
190
+ "id": "read_market_status",
191
+ "kind": "read",
192
+ "summary": "Read tick size, minimum order size, and current market status.",
193
+ "required_capabilities": [
194
+ "books.read"
195
+ ],
196
+ "available": true,
197
+ "operation": {
198
+ "method": "GET",
199
+ "path": "/v2/markets/{market_id}/status"
200
+ }
201
+ },
202
+ {
203
+ "id": "read_best_bid_ask",
204
+ "kind": "read",
205
+ "summary": "Read the current best bid and ask.",
206
+ "required_capabilities": [
207
+ "books.read"
208
+ ],
209
+ "available": true,
210
+ "operation": {
211
+ "method": "GET",
212
+ "path": "/v2/markets/{market_id}/bbo"
213
+ }
214
+ },
215
+ {
216
+ "id": "read_fees",
217
+ "kind": "read",
218
+ "summary": "Read the market fee schedule.",
219
+ "required_capabilities": [
220
+ "books.read"
221
+ ],
222
+ "available": true,
223
+ "operation": {
224
+ "method": "GET",
225
+ "path": "/v2/markets/{market_id}/fees"
226
+ }
227
+ },
228
+ {
229
+ "id": "read_trades",
230
+ "kind": "read",
231
+ "summary": "Read recent anonymized trades.",
232
+ "required_capabilities": [
233
+ "books.read"
234
+ ],
235
+ "available": true,
236
+ "operation": {
237
+ "method": "GET",
238
+ "path": "/v2/markets/{market_id}/trades"
239
+ }
240
+ },
241
+ {
242
+ "id": "stream_market",
243
+ "kind": "read",
244
+ "summary": "Subscribe to book changes, trades, and heartbeats with automatic recovery.",
245
+ "required_capabilities": [
246
+ "books.read"
247
+ ],
248
+ "available": true,
249
+ "operation": {
250
+ "method": "WEBSOCKET",
251
+ "path": "/v2/markets/{market_id}/stream"
252
+ }
253
+ },
254
+ {
255
+ "id": "authorize_account_read",
256
+ "kind": "external_signature",
257
+ "summary": "The agent owner's configured signer authorizes the exact account request or stream challenge.",
258
+ "required_capabilities": [],
259
+ "available": true
260
+ },
261
+ {
262
+ "id": "read_account",
263
+ "kind": "read",
264
+ "summary": "Read the owner's sanitized open orders and fills for a Strata market.",
265
+ "required_capabilities": [
266
+ "account.read"
267
+ ],
268
+ "available": true,
269
+ "operation": {
270
+ "method": "GET",
271
+ "path": "/v2/markets/{market_id}/account/{wallet_address}"
272
+ }
273
+ },
274
+ {
275
+ "id": "stream_account",
276
+ "kind": "read",
277
+ "summary": "Subscribe to signed, sequenced order and fill state for the owner.",
278
+ "required_capabilities": [
279
+ "account.read"
280
+ ],
281
+ "available": true,
282
+ "operation": {
283
+ "method": "WEBSOCKET",
284
+ "path": "/v2/markets/{market_id}/account/{wallet_address}/stream"
285
+ }
286
+ },
142
287
  {
143
288
  "id": "request_quote",
144
289
  "kind": "read",
@@ -228,6 +373,61 @@ export const STRATA_ACTION_GRAPH = {
228
373
  "to": "discover_markets",
229
374
  "condition": "markets.read is enabled"
230
375
  },
376
+ {
377
+ "from": "discover_action_graph",
378
+ "to": "discover_platform_capabilities",
379
+ "condition": "the versioned SDK contract is supported"
380
+ },
381
+ {
382
+ "from": "discover_platform_capabilities",
383
+ "to": "discover_platform_markets",
384
+ "condition": "markets.read is enabled"
385
+ },
386
+ {
387
+ "from": "discover_platform_markets",
388
+ "to": "read_book",
389
+ "condition": "books.read is enabled and the market is active"
390
+ },
391
+ {
392
+ "from": "discover_platform_markets",
393
+ "to": "read_market_status",
394
+ "condition": "books.read is enabled"
395
+ },
396
+ {
397
+ "from": "discover_platform_markets",
398
+ "to": "read_best_bid_ask",
399
+ "condition": "books.read is enabled"
400
+ },
401
+ {
402
+ "from": "discover_platform_markets",
403
+ "to": "read_fees",
404
+ "condition": "books.read is enabled"
405
+ },
406
+ {
407
+ "from": "discover_platform_markets",
408
+ "to": "read_trades",
409
+ "condition": "books.read is enabled"
410
+ },
411
+ {
412
+ "from": "read_book",
413
+ "to": "stream_market",
414
+ "condition": "books.read is enabled and the snapshot sequence is accepted"
415
+ },
416
+ {
417
+ "from": "discover_platform_markets",
418
+ "to": "authorize_account_read",
419
+ "condition": "account.read is enabled and the owner-configured signer is available"
420
+ },
421
+ {
422
+ "from": "authorize_account_read",
423
+ "to": "read_account",
424
+ "condition": "the signature binds the wallet, market, request time, and fill limit"
425
+ },
426
+ {
427
+ "from": "read_account",
428
+ "to": "stream_account",
429
+ "condition": "the stream challenge is signed by the same owner-configured signer"
430
+ },
231
431
  {
232
432
  "from": "discover_markets",
233
433
  "to": "request_quote",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stratabook/mcp",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Connect AI agents to Strata markets and Sonar quotes with MCP.",
5
5
  "type": "module",
6
6
  "license": "MIT OR Apache-2.0",
@@ -44,7 +44,7 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "@modelcontextprotocol/sdk": "1.30.0",
47
- "@stratabook/sdk": "0.1.3",
47
+ "@stratabook/sdk": "0.1.4",
48
48
  "zod": "^3.25.76"
49
49
  },
50
50
  "devDependencies": {