@trinaryex/mcp 3.3.1 → 3.5.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/README.md +23 -2
- package/dist/context.d.ts +9 -0
- package/dist/context.js +6 -0
- package/dist/context.js.map +1 -1
- package/dist/registry.d.ts +10 -0
- package/dist/registry.js +22 -2
- package/dist/registry.js.map +1 -1
- package/dist/schemas.d.ts +19 -2
- package/dist/schemas.js +29 -1
- package/dist/schemas.js.map +1 -1
- package/dist/tools/keyspace.d.ts +2 -0
- package/dist/tools/keyspace.js +55 -0
- package/dist/tools/keyspace.js.map +1 -0
- package/dist/tools/read.js +15 -9
- package/dist/tools/read.js.map +1 -1
- package/dist/tools/types.d.ts +14 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -22,6 +22,12 @@ docker run -p 8080:8080 \
|
|
|
22
22
|
|
|
23
23
|
Point an MCP client at `POST /mcp` and send your API key as `x-api-key`.
|
|
24
24
|
|
|
25
|
+
The image is published to GHCR by the release workflow, tagged with the version
|
|
26
|
+
it wraps and `latest`, and built for `linux/amd64` and `linux/arm64`. It runs
|
|
27
|
+
unprivileged as `node`, carries a `/healthz` HEALTHCHECK, and ships with SBOM
|
|
28
|
+
and provenance attestations — the same supply-chain posture as the npm package.
|
|
29
|
+
Build it yourself with `docker build -t triex-mcp mcp/` from the repo root.
|
|
30
|
+
|
|
25
31
|
## Configuration
|
|
26
32
|
|
|
27
33
|
All configuration is **non-secret** — note the absence of any key, address, or database setting.
|
|
@@ -116,19 +122,34 @@ npm run build && npm start
|
|
|
116
122
|
|
|
117
123
|
### Lock-step with the SDK
|
|
118
124
|
|
|
119
|
-
The tool surface is checked against the SDK's **shipped type declarations**, not against a hand-maintained list. `scripts/sdk-surface.mjs` parses `@trinaryex/sdk`'s `.d.ts` with the TypeScript compiler, which gives
|
|
125
|
+
The tool surface is checked against the SDK's **shipped type declarations**, not against a hand-maintained list. `scripts/sdk-surface.mjs` parses `@trinaryex/sdk`'s `.d.ts` with the TypeScript compiler, which gives four things for free:
|
|
120
126
|
|
|
121
127
|
- `private` helpers are excluded **structurally** — nothing to keep in sync;
|
|
122
128
|
- each method's **return type classifies it**: `Promise<TxResult>` (or `EnsureAccountResult`) is a write, everything else is a read;
|
|
129
|
+
- each method's **parameter types resolve** to the property names it accepts, following them into sibling declaration files;
|
|
123
130
|
- it describes the **published contract**, which is what consumers actually see.
|
|
124
131
|
|
|
125
|
-
|
|
132
|
+
Lock-step is enforced in two dimensions.
|
|
133
|
+
|
|
134
|
+
**Coverage.** Every SDK method is either wrapped by a tool **of the matching kind** — writes by a `prepare_*` tool, reads by a read tool — or listed in `EXCLUDED_SDK_PATHS` with a reason. Covering a write with a read tool fails just as loudly as not covering it at all.
|
|
135
|
+
|
|
136
|
+
**Arguments.** Every tool input must be a parameter its SDK method actually accepts. This catches the quieter drift: an unrecognised property is not refused anywhere, it is dropped in transit, so the tool answers successfully while ignoring what it was asked. A `hubId` filter on a method that filters by `storageUnitIds` returned the entire market; a `cursor` on a timestamp-windowed read paged forever over page one. Both type-checked, and both passed a coverage-only gate.
|
|
137
|
+
|
|
138
|
+
Two escape hatches exist, and each demands a written reason:
|
|
139
|
+
|
|
140
|
+
- `GLOBAL_SYNTHETIC_PARAMS`, or a tool's `syntheticParams` — inputs that are genuinely MCP-level rather than SDK-level. `sender` is the only global one, and it exists precisely because this server is keyless.
|
|
141
|
+
- a tool's `derivedParams` — required SDK parameters the handler supplies itself instead of accepting from the caller.
|
|
142
|
+
|
|
143
|
+
The waivers are themselves checked: one naming a real SDK parameter, or one the tool no longer declares, fails as a stale claim.
|
|
144
|
+
|
|
145
|
+
Read tools resolve against `ReadOnlyClient` as well as the namespaced APIs, since that is the client they actually call.
|
|
126
146
|
|
|
127
147
|
`npm run check:parity` prints the full report:
|
|
128
148
|
|
|
129
149
|
```
|
|
130
150
|
SDK surface: 25 methods (14 read, 11 write)
|
|
131
151
|
MCP tools: 23 · explicitly excluded: 2
|
|
152
|
+
Parameters: 74 across the surface · waivers: 1 global + 0 per-tool
|
|
132
153
|
|
|
133
154
|
✓ write orders.limit prepare_limit_order
|
|
134
155
|
✓ read market.orderbook market_orderbook
|
package/dist/context.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ClientWithCoreApi } from '@mysten/sui/client';
|
|
2
|
+
import { ReadOnlyAclClient } from '@trinaryex/keyspace';
|
|
2
3
|
import { ReadOnlyClient, TriexClient } from '@trinaryex/sdk';
|
|
3
4
|
import type { ServerConfig } from './env.js';
|
|
4
5
|
/**
|
|
@@ -16,6 +17,14 @@ export interface RequestContext {
|
|
|
16
17
|
* capture executor, so it can build but never submit.
|
|
17
18
|
*/
|
|
18
19
|
writeClient(sender: string): TriexClient;
|
|
20
|
+
/**
|
|
21
|
+
* A Keyspace lookup client bound to this caller's key.
|
|
22
|
+
*
|
|
23
|
+
* Read-only by construction: it carries no `sealClient`, `executor` or
|
|
24
|
+
* `storageAdapter`, so the write and decrypt surfaces are unreachable.
|
|
25
|
+
* Decryption needs a wallet signature and belongs with whoever holds the key.
|
|
26
|
+
*/
|
|
27
|
+
keyspaceClient(): ReadOnlyAclClient;
|
|
19
28
|
/** The shared, credential-free Sui client used for PTB resolution. */
|
|
20
29
|
suiClient(): ClientWithCoreApi;
|
|
21
30
|
}
|
package/dist/context.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SuiGrpcClient } from '@mysten/sui/grpc';
|
|
2
|
+
import { ReadOnlyAclClient } from '@trinaryex/keyspace';
|
|
2
3
|
import { ReadOnlyClient, TriexClient } from '@trinaryex/sdk';
|
|
3
4
|
import { captureExecutor } from './capture.js';
|
|
4
5
|
/**
|
|
@@ -26,6 +27,11 @@ export function createContext(apiKey, config, suiClientOverride) {
|
|
|
26
27
|
apiKey,
|
|
27
28
|
config,
|
|
28
29
|
suiClient: sui,
|
|
30
|
+
keyspaceClient: () => new ReadOnlyAclClient({
|
|
31
|
+
suiClient: sui(),
|
|
32
|
+
apiKey,
|
|
33
|
+
...(config.indexerUrl ? { indexerUrl: config.indexerUrl } : {}),
|
|
34
|
+
}),
|
|
29
35
|
readClient: () => new ReadOnlyClient({
|
|
30
36
|
apiKey,
|
|
31
37
|
network: config.network,
|
package/dist/context.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAEhD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAEhD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AA8B9C;;;;GAIG;AACH,IAAI,eAAe,GAA6B,IAAI,CAAA;AAEpD,MAAM,UAAU,YAAY,CAAC,MAAoB;IAC/C,IAAI,CAAC,eAAe,EAAE,CAAC;QACrB,eAAe,GAAG,IAAI,aAAa,CAAC;YAClC,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,OAAO,EAAE,MAAM,CAAC,OAAO;SACxB,CAAiC,CAAA;IACpC,CAAC;IACD,OAAO,eAAe,CAAA;AACxB,CAAC;AAED,wEAAwE;AACxE,MAAM,UAAU,cAAc;IAC5B,eAAe,GAAG,IAAI,CAAA;AACxB,CAAC;AAED,MAAM,UAAU,aAAa,CAC3B,MAAc,EACd,MAAoB,EACpB,iBAAqC;IAErC,MAAM,GAAG,GAAG,GAAG,EAAE,CAAC,iBAAiB,IAAI,YAAY,CAAC,MAAM,CAAC,CAAA;IAC3D,OAAO;QACL,MAAM;QACN,MAAM;QACN,SAAS,EAAE,GAAG;QACd,cAAc,EAAE,GAAG,EAAE,CACnB,IAAI,iBAAiB,CAAC;YACpB,SAAS,EAAE,GAAG,EAAW;YACzB,MAAM;YACN,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAChE,CAAC;QACJ,UAAU,EAAE,GAAG,EAAE,CACf,IAAI,cAAc,CAAC;YACjB,MAAM;YACN,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAChE,CAAC;QACJ,WAAW,EAAE,CAAC,MAAc,EAAE,EAAE,CAC9B,IAAI,WAAW,CAAC;YACd,SAAS,EAAE,GAAG,EAAE;YAChB,MAAM;YACN,OAAO,EAAE,MAAM;YACf,QAAQ,EAAE,eAAe;YACzB,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAChE,CAAC;KACL,CAAA;AACH,CAAC"}
|
package/dist/registry.d.ts
CHANGED
|
@@ -2,6 +2,16 @@ import type { ToolDef } from './tools/types.js';
|
|
|
2
2
|
import type { ServerMode } from './env.js';
|
|
3
3
|
/** Every tool this server can expose, in a stable order. */
|
|
4
4
|
export declare const ALL_TOOLS: ToolDef[];
|
|
5
|
+
/**
|
|
6
|
+
* Inputs any tool may declare without an SDK counterpart.
|
|
7
|
+
*
|
|
8
|
+
* `sender` is the only word this server adds to the SDK's vocabulary, and it
|
|
9
|
+
* exists precisely because the server is keyless: the SDK takes the signing
|
|
10
|
+
* address from client configuration, whereas here every request names the
|
|
11
|
+
* address its transaction is built for. That is what lets one instance serve a
|
|
12
|
+
* whole fleet without holding anyone's key.
|
|
13
|
+
*/
|
|
14
|
+
export declare const GLOBAL_SYNTHETIC_PARAMS: Record<string, string>;
|
|
5
15
|
/**
|
|
6
16
|
* SDK client methods deliberately not exposed as tools, with the reason.
|
|
7
17
|
*
|
package/dist/registry.js
CHANGED
|
@@ -1,7 +1,24 @@
|
|
|
1
|
+
import { keyspaceTools } from './tools/keyspace.js';
|
|
1
2
|
import { prepareTools } from './tools/prepare.js';
|
|
2
3
|
import { readTools } from './tools/read.js';
|
|
3
4
|
/** Every tool this server can expose, in a stable order. */
|
|
4
|
-
export const ALL_TOOLS = [
|
|
5
|
+
export const ALL_TOOLS = [
|
|
6
|
+
...readTools,
|
|
7
|
+
...keyspaceTools,
|
|
8
|
+
...prepareTools,
|
|
9
|
+
];
|
|
10
|
+
/**
|
|
11
|
+
* Inputs any tool may declare without an SDK counterpart.
|
|
12
|
+
*
|
|
13
|
+
* `sender` is the only word this server adds to the SDK's vocabulary, and it
|
|
14
|
+
* exists precisely because the server is keyless: the SDK takes the signing
|
|
15
|
+
* address from client configuration, whereas here every request names the
|
|
16
|
+
* address its transaction is built for. That is what lets one instance serve a
|
|
17
|
+
* whole fleet without holding anyone's key.
|
|
18
|
+
*/
|
|
19
|
+
export const GLOBAL_SYNTHETIC_PARAMS = {
|
|
20
|
+
sender: 'The address a prepared transaction is built for; per-request because this server is keyless and multi-tenant.',
|
|
21
|
+
};
|
|
5
22
|
/**
|
|
6
23
|
* SDK client methods deliberately not exposed as tools, with the reason.
|
|
7
24
|
*
|
|
@@ -11,6 +28,9 @@ export const ALL_TOOLS = [...readTools, ...prepareTools];
|
|
|
11
28
|
*/
|
|
12
29
|
export const EXCLUDED_SDK_PATHS = {
|
|
13
30
|
'market.resolvePool': 'Internal plumbing — pool ids are resolved inside the tools that need them.',
|
|
31
|
+
'keyspace.hasAccess': 'A membership check callable from the readPrincipals that keyspace_get_acl already returns; add a tool if callers want it server-side.',
|
|
32
|
+
'keyspace.getStaleEntries': 'Staleness is already reported per entry by keyspace_get_acl, which returns EntryMeta.isStale for every entry.',
|
|
33
|
+
'keyspace.isEntryStale': 'Single-entry form of keyspace.getStaleEntries; same reason — keyspace_get_acl already carries isStale.',
|
|
14
34
|
'balances.currency': 'Wallet CRED balance is a plain Sui coin read; account_balances_at_hub covers the trading-account view.',
|
|
15
35
|
};
|
|
16
36
|
/**
|
|
@@ -19,6 +39,6 @@ export const EXCLUDED_SDK_PATHS = {
|
|
|
19
39
|
* `tools/list` says so.
|
|
20
40
|
*/
|
|
21
41
|
export function toolsForMode(mode) {
|
|
22
|
-
return mode === 'read' ? readTools : ALL_TOOLS;
|
|
42
|
+
return mode === 'read' ? [...readTools, ...keyspaceTools] : ALL_TOOLS;
|
|
23
43
|
}
|
|
24
44
|
//# sourceMappingURL=registry.js.map
|
package/dist/registry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAI3C,4DAA4D;AAC5D,MAAM,CAAC,MAAM,SAAS,GAAc,
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAI3C,4DAA4D;AAC5D,MAAM,CAAC,MAAM,SAAS,GAAc;IAClC,GAAG,SAAS;IACZ,GAAG,aAAa;IAChB,GAAG,YAAY;CAChB,CAAA;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAA2B;IAC7D,MAAM,EACJ,+GAA+G;CAClH,CAAA;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAA2B;IACxD,oBAAoB,EAClB,4EAA4E;IAC9E,oBAAoB,EAClB,uIAAuI;IACzI,0BAA0B,EACxB,+GAA+G;IACjH,uBAAuB,EACrB,wGAAwG;IAC1G,mBAAmB,EACjB,wGAAwG;CAC3G,CAAA;AAED;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,IAAgB;IAC3C,OAAO,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,EAAE,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;AACvE,CAAC"}
|
package/dist/schemas.d.ts
CHANGED
|
@@ -21,9 +21,26 @@ export declare const hubAssetShape: {
|
|
|
21
21
|
storageUnitId: z.ZodString;
|
|
22
22
|
assetId: z.ZodString;
|
|
23
23
|
};
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Paging comes in two flavours and they are not interchangeable.
|
|
26
|
+
*
|
|
27
|
+
* Discovery is cursor-paged; order history is windowed by timestamp. Offering
|
|
28
|
+
* a `cursor` on a history read is worse than offering no paging at all — the
|
|
29
|
+
* SDK drops the property it does not recognise, so a caller that pages by
|
|
30
|
+
* cursor re-reads page one forever and nothing reports a problem.
|
|
31
|
+
*/
|
|
32
|
+
export declare const cursorPagingShape: {
|
|
26
33
|
cursor: z.ZodOptional<z.ZodString>;
|
|
34
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
};
|
|
36
|
+
export declare const historyPagingShape: {
|
|
37
|
+
before: z.ZodOptional<z.ZodNumber>;
|
|
38
|
+
after: z.ZodOptional<z.ZodNumber>;
|
|
39
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
40
|
+
};
|
|
41
|
+
/** Item search takes a limit and nothing else. */
|
|
42
|
+
export declare const searchPagingShape: {
|
|
43
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
27
44
|
};
|
|
28
45
|
/** Parse a decimal string into a bigint after zod has validated its shape. */
|
|
29
46
|
export declare function big(value: string): bigint;
|
package/dist/schemas.js
CHANGED
|
@@ -22,10 +22,38 @@ export const hubAssetShape = {
|
|
|
22
22
|
storageUnitId: objectId.describe('Trade hub / storage unit object id.'),
|
|
23
23
|
assetId: z.string().describe('EVE Frontier item asset id, e.g. "70810".'),
|
|
24
24
|
};
|
|
25
|
-
|
|
25
|
+
const limitShape = {
|
|
26
26
|
limit: z.number().int().positive().max(200).optional(),
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Paging comes in two flavours and they are not interchangeable.
|
|
30
|
+
*
|
|
31
|
+
* Discovery is cursor-paged; order history is windowed by timestamp. Offering
|
|
32
|
+
* a `cursor` on a history read is worse than offering no paging at all — the
|
|
33
|
+
* SDK drops the property it does not recognise, so a caller that pages by
|
|
34
|
+
* cursor re-reads page one forever and nothing reports a problem.
|
|
35
|
+
*/
|
|
36
|
+
export const cursorPagingShape = {
|
|
37
|
+
...limitShape,
|
|
27
38
|
cursor: z.string().optional(),
|
|
28
39
|
};
|
|
40
|
+
export const historyPagingShape = {
|
|
41
|
+
...limitShape,
|
|
42
|
+
before: z
|
|
43
|
+
.number()
|
|
44
|
+
.int()
|
|
45
|
+
.positive()
|
|
46
|
+
.optional()
|
|
47
|
+
.describe('Unix ms upper bound, exclusive.'),
|
|
48
|
+
after: z
|
|
49
|
+
.number()
|
|
50
|
+
.int()
|
|
51
|
+
.positive()
|
|
52
|
+
.optional()
|
|
53
|
+
.describe('Unix ms lower bound, exclusive.'),
|
|
54
|
+
};
|
|
55
|
+
/** Item search takes a limit and nothing else. */
|
|
56
|
+
export const searchPagingShape = limitShape;
|
|
29
57
|
/** Parse a decimal string into a bigint after zod has validated its shape. */
|
|
30
58
|
export function big(value) {
|
|
31
59
|
return BigInt(value);
|
package/dist/schemas.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC;KACjB,MAAM,EAAE;KACR,KAAK,CAAC,OAAO,EAAE,qDAAqD,CAAC,CAAA;AAExE,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC;KACxB,MAAM,EAAE;KACR,KAAK,CAAC,uBAAuB,EAAE,oCAAoC,CAAC,CAAA;AAEvE,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAA;AAElC,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAA;AAEhD,8EAA8E;AAC9E,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,MAAM,EAAE,UAAU,CAAC,QAAQ,CACzB,kFAAkF,CACnF;CACF,CAAA;AAED,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,aAAa,EAAE,QAAQ,CAAC,QAAQ,CAAC,qCAAqC,CAAC;IACvE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2CAA2C,CAAC;CAC1E,CAAA;AAED,MAAM,
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC;KACjB,MAAM,EAAE;KACR,KAAK,CAAC,OAAO,EAAE,qDAAqD,CAAC,CAAA;AAExE,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC;KACxB,MAAM,EAAE;KACR,KAAK,CAAC,uBAAuB,EAAE,oCAAoC,CAAC,CAAA;AAEvE,MAAM,CAAC,M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ACtB,CAAC;AAED,gEAAgE;AAChE,MAAM,UAAU,MAAM,CAAC,KAAyB;IAC9C,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACxD,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { ok } from '../result.js';
|
|
2
|
+
import { objectId, suiAddress } from '../schemas.js';
|
|
3
|
+
/**
|
|
4
|
+
* Keyspace lookup tools.
|
|
5
|
+
*
|
|
6
|
+
* Keyspace is end-to-end encrypted: ciphertext lives off-chain, the Read set
|
|
7
|
+
* lives on Sui, and Seal key servers release decryption shares only after
|
|
8
|
+
* `keyspace::seal_approve` verifies membership — against a session key the
|
|
9
|
+
* *wallet* signed. That signature is unavailable here by design, so this
|
|
10
|
+
* server covers exactly the half that needs no key: discovering which
|
|
11
|
+
* Keyspaces an address can read, and reading their public metadata.
|
|
12
|
+
*
|
|
13
|
+
* Decryption belongs wherever the private key already lives.
|
|
14
|
+
*/
|
|
15
|
+
const NO_DECRYPT_NOTE = ' This returns metadata only — never plaintext. Decrypting an entry requires a wallet signature for a Seal session key, which this server cannot produce; do that where the private key lives.';
|
|
16
|
+
export const keyspaceTools = [
|
|
17
|
+
{
|
|
18
|
+
name: 'keyspace_list_accessible',
|
|
19
|
+
title: 'List accessible Keyspaces',
|
|
20
|
+
description: 'List the Keyspace ids an address holds any role on — the starting point for reading shared hub locations.' +
|
|
21
|
+
NO_DECRYPT_NOTE,
|
|
22
|
+
kind: 'read',
|
|
23
|
+
sdkPath: 'keyspace.getAccessibleAcls',
|
|
24
|
+
inputShape: {
|
|
25
|
+
address: suiAddress.describe('Sui address to look up. Public data; no signature involved.'),
|
|
26
|
+
},
|
|
27
|
+
handler: async (ctx, args) => {
|
|
28
|
+
const aclIds = await ctx.keyspaceClient().getAccessibleAcls(args.address);
|
|
29
|
+
return ok({ address: args.address, aclIds, count: aclIds.length });
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: 'keyspace_get_acl',
|
|
34
|
+
title: 'Get Keyspace detail',
|
|
35
|
+
description: 'Read one Keyspace: its role principals, epoch, and the encrypted entries it holds (id, uri, description, epoch, staleness). Use readPrincipals to check whether an address can decrypt before paying for a signature, and the per-entry fingerprint to skip re-decrypting unchanged data.' +
|
|
36
|
+
NO_DECRYPT_NOTE,
|
|
37
|
+
kind: 'read',
|
|
38
|
+
sdkPath: 'keyspace.getAcl',
|
|
39
|
+
inputShape: {
|
|
40
|
+
aclId: objectId.describe('Keyspace object id.'),
|
|
41
|
+
},
|
|
42
|
+
handler: async (ctx, args) => {
|
|
43
|
+
const acl = await ctx.keyspaceClient().getAcl(args.aclId);
|
|
44
|
+
// Cache fingerprint per the Keyspace docs: an entry is unchanged while
|
|
45
|
+
// the acl epoch, entry count, uri and entry epoch all hold. Comparing it
|
|
46
|
+
// lets a caller skip both the wallet signature and the Seal round-trip.
|
|
47
|
+
const entries = acl.entries.map((entry) => ({
|
|
48
|
+
...entry,
|
|
49
|
+
fingerprint: `${acl.epoch}:${acl.entryCount}:${entry.uri}:${entry.epoch}`,
|
|
50
|
+
}));
|
|
51
|
+
return ok({ ...acl, entries });
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
];
|
|
55
|
+
//# sourceMappingURL=keyspace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyspace.js","sourceRoot":"","sources":["../../src/tools/keyspace.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAA;AACjC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAGpD;;;;;;;;;;;GAWG;AACH,MAAM,eAAe,GACnB,+LAA+L,CAAA;AAEjM,MAAM,CAAC,MAAM,aAAa,GAAc;IACtC;QACE,IAAI,EAAE,0BAA0B;QAChC,KAAK,EAAE,2BAA2B;QAClC,WAAW,EACT,2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ChC,CAAC;KACF;CACF,CAAA"}
|
package/dist/tools/read.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ok } from '../result.js';
|
|
3
|
-
import { objectId,
|
|
3
|
+
import { cursorPagingShape, historyPagingShape, objectId, searchPagingShape, suiAddress, } from '../schemas.js';
|
|
4
4
|
/**
|
|
5
5
|
* Read tools. Every one of these is a thin delegation to the SDK's read
|
|
6
6
|
* surface, authenticated by the caller's own API key. No key material, no
|
|
@@ -10,13 +10,20 @@ export const readTools = [
|
|
|
10
10
|
{
|
|
11
11
|
name: 'market_discover',
|
|
12
12
|
title: 'Discover markets',
|
|
13
|
-
description: 'List active orders across trade hubs, optionally filtered. Use this to find where an item is trading.',
|
|
13
|
+
description: 'List active orders across trade hubs, optionally filtered. Use this to find where an item is trading, or to scan several hubs in one call.',
|
|
14
14
|
kind: 'read',
|
|
15
15
|
sdkPath: 'market.discover',
|
|
16
16
|
inputShape: {
|
|
17
17
|
assetId: z.string().optional(),
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
storageUnitIds: z
|
|
19
|
+
.array(objectId)
|
|
20
|
+
.min(1)
|
|
21
|
+
.max(20)
|
|
22
|
+
.optional()
|
|
23
|
+
.describe('Restrict to these trade hubs. Omit to scan every hub.'),
|
|
24
|
+
side: z.enum(['buy', 'sell', 'both']).optional(),
|
|
25
|
+
publicOnly: z.boolean().optional(),
|
|
26
|
+
...cursorPagingShape,
|
|
20
27
|
},
|
|
21
28
|
handler: async (ctx, args) => ok(await ctx.readClient().discover(args)),
|
|
22
29
|
},
|
|
@@ -28,7 +35,7 @@ export const readTools = [
|
|
|
28
35
|
sdkPath: 'market.searchItems',
|
|
29
36
|
inputShape: {
|
|
30
37
|
query: z.string().min(1).describe('Item name or partial name.'),
|
|
31
|
-
...
|
|
38
|
+
...searchPagingShape,
|
|
32
39
|
},
|
|
33
40
|
handler: async (ctx, args) => {
|
|
34
41
|
const { query, ...rest } = args;
|
|
@@ -62,7 +69,6 @@ export const readTools = [
|
|
|
62
69
|
inputShape: {
|
|
63
70
|
storageUnitId: objectId,
|
|
64
71
|
assetId: z.string(),
|
|
65
|
-
depth: z.number().int().positive().max(200).optional(),
|
|
66
72
|
},
|
|
67
73
|
handler: async (ctx, args) => ok(await ctx.readClient().orderbook(args)),
|
|
68
74
|
},
|
|
@@ -118,7 +124,7 @@ export const readTools = [
|
|
|
118
124
|
description: 'Resting orders for a trading account.',
|
|
119
125
|
kind: 'read',
|
|
120
126
|
sdkPath: 'orders.openOrders',
|
|
121
|
-
inputShape: { balanceManagerId: objectId, ...
|
|
127
|
+
inputShape: { balanceManagerId: objectId, ...historyPagingShape },
|
|
122
128
|
handler: async (ctx, args) => {
|
|
123
129
|
const { balanceManagerId, ...rest } = args;
|
|
124
130
|
return ok(await ctx.readClient().openOrders(balanceManagerId, rest));
|
|
@@ -130,7 +136,7 @@ export const readTools = [
|
|
|
130
136
|
description: "This account's side of each match, most recent first.",
|
|
131
137
|
kind: 'read',
|
|
132
138
|
sdkPath: 'orders.fills',
|
|
133
|
-
inputShape: { balanceManagerId: objectId, ...
|
|
139
|
+
inputShape: { balanceManagerId: objectId, ...historyPagingShape },
|
|
134
140
|
handler: async (ctx, args) => {
|
|
135
141
|
const { balanceManagerId, ...rest } = args;
|
|
136
142
|
return ok(await ctx.readClient().fills(balanceManagerId, rest));
|
|
@@ -142,7 +148,7 @@ export const readTools = [
|
|
|
142
148
|
description: 'Completed trades for a trading account.',
|
|
143
149
|
kind: 'read',
|
|
144
150
|
sdkPath: 'orders.trades',
|
|
145
|
-
inputShape: { balanceManagerId: objectId, ...
|
|
151
|
+
inputShape: { balanceManagerId: objectId, ...historyPagingShape },
|
|
146
152
|
handler: async (ctx, args) => {
|
|
147
153
|
const { balanceManagerId, ...rest } = args;
|
|
148
154
|
return ok(await ctx.readClient().trades(balanceManagerId, rest));
|
package/dist/tools/read.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read.js","sourceRoot":"","sources":["../../src/tools/read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAA;AACjC,OAAO,
|
|
1
|
+
{"version":3,"file":"read.js","sourceRoot":"","sources":["../../src/tools/read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAA;AACjC,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,QAAQ,EACR,iBAAiB,EACjB,UAAU,GACX,MAAM,eAAe,CAAA;AAGtB;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAc;IAClC;QACE,IAAI,EAAE,iBAAiB;QACvB,KAAK,EAAE,kBAAkB;QACzB,WAAW,EACT,4IAA4I;QAC9I,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,iBAAiB;QAC1B,UAAU,EAAE;YACV,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAC9B,cAAc,EAAE,CAAC;iBACd,KAAK,CAAC,QAAQ,CAAC;iBACf,GAAG,CAAC,CAAC,CAAC;iBACN,GAAG,CAAC,EAAE,CAAC;iBACP,QAAQ,EAAE;iBACV,QAAQ,CAAC,uDAAuD,CAAC;YACpE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE;YAChD,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;YAClC,GAAG,iBAAiB;SACrB;QACD,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,MAAM,GAAG,CAAC,UAAU,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;KACxE;IACD;QACE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;QACE,IAAI,EAAE,cAAc;QACpB,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,uDAAuD;QACpE,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,cAAc;QACvB,UAAU,EAAE,EAAE,gBAAgB,EAAE,QAAQ,EAAE,GAAG,kBAAkB,EAAE;QACjE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;YAC3B,MAAM,EAAE,gBAAgB,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAA;YAC1C,OAAO,EAAE,CAAC,MAAM,GAAG,CAAC,UAAU,EAAE,CAAC,KAAK,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC,CAAA;QACjE,CAAC;KACF;IACD;QACE,IAAI,EAAE,eAAe;QACrB,KAAK,EAAE,aAAa;QACpB,WAAW,EAAE,yCAAyC;QACtD,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,eAAe;QACxB,UAAU,EAAE,EAAE,gBAAgB,EAAE,QAAQ,EAAE,GAAG,kBAAkB,EAAE;QACjE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;YAC3B,MAAM,EAAE,gBAAgB,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAA;YAC1C,OAAO,EAAE,CAAC,MAAM,GAAG,CAAC,UAAU,EAAE,CAAC,MAAM,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC,CAAA;QAClE,CAAC;KACF;CACF,CAAA"}
|
package/dist/tools/types.d.ts
CHANGED
|
@@ -16,5 +16,19 @@ export interface ToolDef {
|
|
|
16
16
|
/** Dotted path of the SDK method this delegates to, e.g. `orders.limit`. */
|
|
17
17
|
sdkPath: string;
|
|
18
18
|
inputShape: ZodRawShape;
|
|
19
|
+
/**
|
|
20
|
+
* Inputs with no SDK counterpart, each mapped to why it exists.
|
|
21
|
+
*
|
|
22
|
+
* The parity gate rejects any input its SDK method does not accept, because
|
|
23
|
+
* an unrecognised property is dropped in transit rather than refused — the
|
|
24
|
+
* caller gets a cheerful, silently unfiltered answer. Anything legitimately
|
|
25
|
+
* MCP-level belongs here, in writing.
|
|
26
|
+
*/
|
|
27
|
+
syntheticParams?: Record<string, string>;
|
|
28
|
+
/**
|
|
29
|
+
* Required SDK parameters the handler supplies itself instead of accepting
|
|
30
|
+
* from the caller, each mapped to where the value comes from.
|
|
31
|
+
*/
|
|
32
|
+
derivedParams?: Record<string, string>;
|
|
19
33
|
handler: (ctx: RequestContext, args: any) => Promise<ToolResponse>;
|
|
20
34
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trinaryex/mcp",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"description": "Keyless, multi-tenant MCP server for Trinary Exchange — market reads and unsigned transaction preparation for EVE Frontier trading agents.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -42,7 +42,8 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
44
44
|
"@mysten/sui": "^2.16.0",
|
|
45
|
-
"@trinaryex/
|
|
45
|
+
"@trinaryex/keyspace": "^8.3.1",
|
|
46
|
+
"@trinaryex/sdk": "3.5.0",
|
|
46
47
|
"express": "^5.2.1",
|
|
47
48
|
"zod": "^4.4.3"
|
|
48
49
|
},
|