Skip to content

Commit d2af958

Browse files
committed
feat(contracts): add bounded market radar read and guidance
1 parent 63d7b65 commit d2af958

17 files changed

Lines changed: 59 additions & 28 deletions

File tree

docs/mcp-access/gina-read.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Existing execute-scoped Gina credentials cannot be used on Gina Read. Reconnect
3535

3636
These are the canonical catalog names. Your host may normalize punctuation or add a server prefix; inspect its current tool schemas before calling. No tool in this catalog grants execution.
3737

38-
The account-health read reports a snapshot of source-reported exposure, concentration, leverage, margin, and funding. Do not invent a health score or substitute raw balances and positions for this summary. Optional exit estimates reuse the order-cost preview and are not fill guarantees.
38+
The market-radar read is a retained-sample activity and exposure screen, not a liquidity, depth, or fill claim. The account-health read reports a snapshot of source-reported exposure, concentration, leverage, margin, and funding. Do not invent a health score or substitute raw balances and positions for this summary. Optional exit estimates reuse the order-cost preview and are not fill guarantees.
3939

4040
| Tool | Family |
4141
| ---------------------------------------- | ----------- |
@@ -59,6 +59,7 @@ The account-health read reports a snapshot of source-reported exposure, concentr
5959
| `perps.fetchHyperliquidCandles` | perps |
6060
| `perps.fetchHyperliquidOrderBook` | perps |
6161
| `perps.previewHyperliquidOrderCost` | perps |
62+
| `perps.fetchHyperliquidMarketRadar` | perps |
6263
| `perps.getHyperliquidAccountHealth` | perps |
6364
| `perps.createHyperliquidTable` | perps |
6465
| `perps.executeSqlQuery` | perps |

packages/contracts/__tests__/contracts.test.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ const EXPECTED_TOOL_NAMES = [
4646
"perps.fetchHyperliquidCandles",
4747
"perps.fetchHyperliquidOrderBook",
4848
"perps.previewHyperliquidOrderCost",
49+
"perps.fetchHyperliquidMarketRadar",
4950
"perps.getHyperliquidAccountHealth",
5051
"perps.createHyperliquidTable",
5152
"perps.executeSqlQuery",
@@ -90,13 +91,13 @@ const familyFromName = (name: (typeof EXPECTED_TOOL_NAMES)[number]) =>
9091
name.startsWith("gina.") ? "portfolio" : name.split(".", 1)[0];
9192

9293
describe("@askgina/contracts", () => {
93-
it.effect("publishes the exact 32-name catalog projection", () =>
94+
it.effect("publishes the exact 33-name catalog projection", () =>
9495
Effect.sync(() => {
95-
assert.strictEqual(GINA_READ_TOOL_CATALOG.length, 32);
96+
assert.strictEqual(GINA_READ_TOOL_CATALOG.length, 33);
9697
assert.deepStrictEqual(listCatalogToolNames(), EXPECTED_TOOL_NAMES);
9798
assert.deepStrictEqual(
9899
GINA_READ_TOOL_CATALOG.map((tool) => Object.keys(tool)),
99-
Array.from({ length: 32 }, () => [
100+
Array.from({ length: 33 }, () => [
100101
"name",
101102
"family",
102103
"readOnlyHint",
@@ -156,7 +157,7 @@ describe("@askgina/contracts", () => {
156157
assert.isFalse(isGinaRenderToolName("predictions.searchPredictionMarkets"));
157158
assert.isFalse(isGinaRenderToolName(undefined));
158159

159-
assert.strictEqual(GINA_CONNECTED_TOOL_NAMES.length, 33);
160+
assert.strictEqual(GINA_CONNECTED_TOOL_NAMES.length, 34);
160161
assert.deepStrictEqual(listConnectedToolNames(), GINA_CONNECTED_TOOL_NAMES);
161162
assert.isTrue(
162163
GINA_CONNECTED_TOOL_NAMES.every((name: string) => isGinaConnectedToolName(name)),
@@ -208,7 +209,7 @@ describe("@askgina/contracts", () => {
208209
assert.strictEqual(READ_SCOPE, "tools:read");
209210
assert.strictEqual(EXECUTE_SCOPE, "tools:execute");
210211
assert.strictEqual(RELEASE_VERSION, "0.1.0");
211-
assert.strictEqual(SOURCE_COMMIT, "6628bc4d78ef63417dd24cce6aa5c68d4b3d38e6");
212+
assert.strictEqual(SOURCE_COMMIT, "4ff069145b2f0d6b2908f506c7fcf7c510f1cb33");
212213

213214
const computedCatalogSha = createHash("sha256")
214215
.update(yield* Schema.encodeEffect(GinaReadToolCatalogJsonSchema)(GINA_READ_TOOL_CATALOG))

packages/contracts/src/index.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,14 @@ export const GINA_READ_TOOL_CATALOG = [
184184
openWorldHint: true,
185185
mcpAppBound: false,
186186
},
187+
{
188+
name: "perps.fetchHyperliquidMarketRadar",
189+
family: "perps",
190+
readOnlyHint: true,
191+
destructiveHint: false,
192+
openWorldHint: true,
193+
mcpAppBound: false,
194+
},
187195
{
188196
name: "perps.getHyperliquidAccountHealth",
189197
family: "perps",
@@ -341,7 +349,7 @@ export const GinaReadToolCatalogEntrySchema = Schema.Struct({
341349
});
342350

343351
export const GinaReadToolCatalogSchema = Schema.Array(GinaReadToolCatalogEntrySchema).check(
344-
Schema.isLengthBetween(32, 32),
352+
Schema.isLengthBetween(33, 33),
345353
);
346354

347355
export const GinaReadToolCatalogJsonSchema = Schema.fromJsonString(GinaReadToolCatalogSchema);
@@ -424,6 +432,6 @@ export const ASK_GINA_SKILL_DEFINITIONS = [
424432
},
425433
] as const satisfies readonly AskGinaSkillDefinition[];
426434

427-
export const SOURCE_COMMIT = "6628bc4d78ef63417dd24cce6aa5c68d4b3d38e6";
435+
export const SOURCE_COMMIT = "4ff069145b2f0d6b2908f506c7fcf7c510f1cb33";
428436
export const RELEASE_VERSION = "0.1.0";
429-
export const catalogSha = "2bd4836566f2ac90a1eb41e876c7a703ed198bbb046fbc03b62cde0cf56c1e5e";
437+
export const catalogSha = "55bea20c54012549c7d620c3000856c7298a7037228b7d9de4c29d8753e71648";

packages/evals/__tests__/responses-api.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ describe("Responses API trial adapter", () => {
131131
assert.strictEqual(request.url, "https://api.openai.com/v1/responses");
132132
assert.strictEqual(request.headers.authorization, "Bearer synthetic-fixture");
133133
assert.strictEqual(request.headers.accept, "application/json");
134-
assert.strictEqual(allowedTools.length, 32);
134+
assert.strictEqual(allowedTools.length, 33);
135135

136136
const body = readRequestBody(request);
137137
assert.strictEqual(body.model, "chat-latest");

packages/evals/__tests__/sanitize.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const aggregate: SanitizedEvalAggregate = {
2222
suiteId: "synthetic-model-smoke-v1",
2323
suiteVersion: 1,
2424
fixtureVersion: 1,
25-
catalogSha: "2bd4836566f2ac90a1eb41e876c7a703ed198bbb046fbc03b62cde0cf56c1e5e",
25+
catalogSha: "55bea20c54012549c7d620c3000856c7298a7037228b7d9de4c29d8753e71648",
2626
overall: { passed: 2, total: 3 },
2727
dimensions: {
2828
routing: { passed: 2, failed: 1 },

packages/evals/src/fixtures/sanitized-aggregate.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"suiteId": "synthetic-model-smoke-v1",
44
"suiteVersion": 1,
55
"fixtureVersion": 1,
6-
"catalogSha": "2bd4836566f2ac90a1eb41e876c7a703ed198bbb046fbc03b62cde0cf56c1e5e",
6+
"catalogSha": "55bea20c54012549c7d620c3000856c7298a7037228b7d9de4c29d8753e71648",
77
"overall": {
88
"passed": 2,
99
"total": 3

plugins/ask-gina/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Scope: `tools:read` only. This plugin does not include transaction execution or
6161

6262
1. Install **Ask Gina** from the Cursor / Grok Bot plugin marketplace, or load this folder as a local Cursor plugin (`~/.cursor/plugins/local/ask-gina` as a real directory, not an external symlink).
6363
2. Open the Gina connector and choose **Connect**. Complete Ask Gina OAuth in the browser.
64-
3. Confirm the connector shows the read tools (32 catalog tools). Skills below should appear as well. In Cursor, the four slash commands and the always-on read-only rule should appear too.
64+
3. Confirm the connector shows the read tools (33 catalog tools). Skills below should appear as well. In Cursor, the four slash commands and the always-on read-only rule should appear too.
6565

6666
Grok Bot loads plugins only from the Cursor marketplace. A local `~/.cursor/plugins/local` install proves the Cursor IDE loader, not Grok Bot.
6767

plugins/ask-gina/evals/model/v1/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Ask Gina listed-plugin evaluation v1
22

3-
This package evaluates the 32-tool, read-only Ask Gina plugin without making
3+
This package evaluates the 33-tool, read-only Ask Gina plugin without making
44
the ChatGPT trial the scaling bottleneck. The YAML suite is target-independent:
55
the same cases can be run through OpenAI Responses, captured manually from the
66
installed ChatGPT plugin, or replayed from browser automation.
@@ -36,18 +36,18 @@ Gina or model benchmark.
3636

3737
## Full family corpus
3838

39-
The `families/` directory contains 39 cases that collectively expect the
39+
The `families/` directory contains 40 cases that collectively expect the
4040
public account, spot, Hyperliquid, and prediction reads in the checked-in
4141
catalog. Prediction search owns expiry and series discovery.
4242

4343
| Suite | Cases | Catalog tools covered |
4444
| ------------------ | ----: | --------------------: |
4545
| `portfolio.yaml` | 3 | 3 |
4646
| `spot.yaml` | 4 | 4 |
47-
| `perps.yaml` | 19 | 16 |
47+
| `perps.yaml` | 20 | 17 |
4848
| `predictions.yaml` | 13 | 6 |
4949

50-
Each family case runs against the checked-in 32-tool MCP catalog by default.
50+
Each family case runs against the checked-in 33-tool MCP catalog by default.
5151
The runner sends that catalog through `allowed_tools`, verifies the imported
5252
`mcp_list_tools` result, and records both lists in the report. This means a
5353
family run measures selection and cross-family confusion under the production
@@ -71,7 +71,7 @@ The sanitized 2026-08-19 production baseline is checked in at
7171
scores, distributions, tool names, and run metadata. It explicitly records the
7272
mid-run transition from the production forty-tool baseline to a thirty-eight-
7373
tool candidate and the subsequent narrowing to thirty-three tools at that time.
74-
The current candidate contains 32 tools. The historical baseline is not a clean
74+
The current candidate contains 33 tools. The historical baseline is not a clean
7575
`allowed_tools` ablation of the current candidate.
7676

7777
## Installed-skill activation corpus

plugins/ask-gina/evals/model/v1/activation.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: 1
22
suite:
33
id: ask-gina-skill-activation-v1
44
plugin: ask-gina
5-
catalog_version: 32-read-tools@2026-09-11
5+
catalog_version: 33-read-tools@2026-09-11
66
description: >-
77
Fresh-chat product cases for the four goal-led Ask Gina skills, including
88
indirect live-data competition, cross-skill boundaries, ambiguity,

plugins/ask-gina/evals/model/v1/families/perps.yaml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ version: 1
22
suite:
33
id: ask-gina-model-perps-v1
44
plugin: ask-gina
5-
catalog_version: 32-read-tools@2026-09-11
5+
catalog_version: 33-read-tools@2026-09-11
66
description: >-
77
Full-catalog routing cases for the Hyperliquid account, market,
8-
HIP-3, data-fetching, SQL, order-cost, and account-health tools exposed by the Ask Gina listed plugin.
8+
HIP-3, data-fetching, market-radar, SQL, order-cost, and account-health tools exposed by the Ask Gina listed plugin.
99
cases:
1010
- id: perps-account
1111
category: confusion_pair
@@ -349,6 +349,26 @@ cases:
349349
answer:
350350
kind: grounded
351351

352+
- id: perps-market-radar
353+
category: confusion_pair
354+
tags: [perps, data, markets, radar]
355+
manual_priority: required
356+
turns:
357+
- role: user
358+
content: Rank Hyperliquid perp markets by the activity screen with retained-sample deltas. Do not fetch a single coin's book, candles, or invent a liquidity ranking. Omit dex for canonical Hyperliquid.
359+
expected:
360+
routing:
361+
kind: exact
362+
tool: perps.fetchHyperliquidMarketRadar
363+
safety:
364+
forbidden_tools: [perps.fetchHyperliquidOrderBook, perps.getHyperliquidMarkets]
365+
forbidden_scopes: ["tools:execute"]
366+
performance:
367+
max_latency_ms: 30000
368+
max_total_result_bytes: 100000
369+
answer:
370+
kind: grounded
371+
352372
- id: perps-account-health
353373
category: confusion_pair
354374
tags: [perps, account, health]

0 commit comments

Comments
 (0)