@coinrithm/mcp-trading 0.7.14 → 0.7.16
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/CHANGELOG.md +811 -613
- package/README.md +415 -366
- package/dist/agent/bench/bench.d.ts +59 -0
- package/dist/agent/bench/bench.js +319 -0
- package/dist/agent/bench/cassette.d.ts +97 -0
- package/dist/agent/bench/cassette.js +181 -0
- package/dist/agent/bench/costs.d.ts +28 -0
- package/dist/agent/bench/costs.js +60 -0
- package/dist/agent/bench/labelBuilder.d.ts +123 -0
- package/dist/agent/bench/labelBuilder.js +282 -0
- package/dist/agent/bench/labels.d.ts +75 -0
- package/dist/agent/bench/labels.js +259 -0
- package/dist/agent/bench/recordingClient.d.ts +51 -0
- package/dist/agent/bench/recordingClient.js +193 -0
- package/dist/agent/bench/replayClient.d.ts +41 -0
- package/dist/agent/bench/replayClient.js +262 -0
- package/dist/agent/bench/report.d.ts +115 -0
- package/dist/agent/bench/report.js +435 -0
- package/dist/agent/cli.d.ts +25 -0
- package/dist/agent/cli.js +300 -2
- package/dist/agent/client.d.ts +14 -0
- package/dist/agent/client.js +113 -4
- package/dist/agent/configurationWarnings.js +11 -0
- package/dist/agent/decision.d.ts +3 -0
- package/dist/agent/decision.js +85 -3
- package/dist/agent/decisionReceipt.d.ts +5 -1
- package/dist/agent/decisionReceipt.js +52 -3
- package/dist/agent/decisionValidator.d.ts +30 -0
- package/dist/agent/decisionValidator.js +147 -2
- package/dist/agent/engine.d.ts +3 -3
- package/dist/agent/engine.js +3 -3
- package/dist/agent/futuresEligibility.d.ts +36 -0
- package/dist/agent/futuresEligibility.js +90 -0
- package/dist/agent/observe.d.ts +35 -2
- package/dist/agent/observe.js +969 -128
- package/dist/agent/pmContext.d.ts +10 -1
- package/dist/agent/pmContext.js +163 -1
- package/dist/agent/prompt.d.ts +18 -1
- package/dist/agent/prompt.js +229 -33
- package/dist/agent/promptTables.d.ts +1 -0
- package/dist/agent/promptTables.js +33 -0
- package/dist/agent/providerCapabilities.d.ts +9 -0
- package/dist/agent/providerCapabilities.js +57 -4
- package/dist/agent/providers.d.ts +28 -7
- package/dist/agent/providers.js +200 -50
- package/dist/agent/resolve.js +3 -0
- package/dist/agent/runner.d.ts +8 -0
- package/dist/agent/runner.js +159 -26
- package/dist/agent/setups.d.ts +2 -1
- package/dist/agent/setups.js +17 -16
- package/dist/agent/signals.d.ts +33 -0
- package/dist/agent/signals.js +89 -0
- package/dist/agent/skill.js +37 -0
- package/dist/agent/skillValidator.js +33 -0
- package/dist/agent/strictLint.js +29 -0
- package/dist/agent/templates.js +30 -30
- package/dist/agent/types.d.ts +266 -13
- package/dist/agent/types.js +4 -0
- package/dist/agent/universe.d.ts +78 -0
- package/dist/agent/universe.js +215 -0
- package/dist/client.d.ts +9 -2
- package/dist/client.js +22 -10
- package/dist/http.d.ts +1 -0
- package/dist/http.js +17 -2
- package/dist/httpCompletion.d.ts +1 -1
- package/dist/httpCompletion.js +1 -0
- package/dist/index.js +2 -1
- package/dist/instructions.d.ts +1 -0
- package/dist/instructions.js +16 -0
- package/dist/tools.d.ts +1 -0
- package/dist/tools.js +150 -66
- package/package.json +98 -97
package/dist/agent/observe.d.ts
CHANGED
|
@@ -1,11 +1,44 @@
|
|
|
1
1
|
import { CoinRithmClient } from "./client.js";
|
|
2
|
-
import { AgentSpec, RunState, Observation, AgentTrace } from "./types.js";
|
|
2
|
+
import { AgentSpec, RunState, Observation, OpenInterestContext, PositioningContext, LiquidationContext, MacroContext, ChainTvlContext, StablecoinSupplyContext, DepthContext, FundingByVenueContext, AgentTrace, PmCalibration, WhaleContext } from "./types.js";
|
|
3
3
|
export interface ObserveOutput {
|
|
4
4
|
observation: Observation;
|
|
5
5
|
skip?: string;
|
|
6
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* Add bounded public whale context after the deterministic gate. This is
|
|
9
|
+
* deliberately separate from observe(): a skipped or mechanical cycle never
|
|
10
|
+
* pays for the public reads, and this context cannot widen candidate selection.
|
|
11
|
+
*/
|
|
12
|
+
export declare function enrichWhaleContext(client: CoinRithmClient, observation: Observation): Promise<WhaleContext>;
|
|
13
|
+
export declare function clearPmCalibrationCache(): void;
|
|
14
|
+
export declare function readPmCalibration(client: CoinRithmClient, trace?: AgentTrace, nowMs?: number): Promise<PmCalibration | undefined>;
|
|
7
15
|
export declare function isCalibrationChurnMarket(market: {
|
|
8
16
|
slug?: string;
|
|
9
17
|
title?: string;
|
|
10
18
|
}): boolean;
|
|
11
|
-
export declare function
|
|
19
|
+
export declare function openInterestOf(m: Record<string, unknown>, nowMs?: number): OpenInterestContext | undefined;
|
|
20
|
+
export declare function positioningOf(m: Record<string, unknown>, nowMs?: number): PositioningContext | undefined;
|
|
21
|
+
export declare function liquidationsOf(m: Record<string, unknown>, nowMs?: number): LiquidationContext | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* `{ coins }` from an additive `relatedCoins` array (direct coin slugs), or
|
|
24
|
+
* nothing: non-arrays and non-string/blank entries are dropped, duplicates
|
|
25
|
+
* merged. Every valid slug is kept: the API never truncates the list, and
|
|
26
|
+
* dropping a linked coin could let a bet bypass that coin's cap. An empty
|
|
27
|
+
* result adds no field.
|
|
28
|
+
*/
|
|
29
|
+
export declare function coinsField(value: unknown): {
|
|
30
|
+
coins?: string[];
|
|
31
|
+
};
|
|
32
|
+
export declare function fundingByVenueOf(m: Record<string, unknown>, nowMs?: number): FundingByVenueContext | undefined;
|
|
33
|
+
export declare function depthOf(m: Record<string, unknown>, nowMs?: number): DepthContext | undefined;
|
|
34
|
+
export declare function chainTvlOf(m: Record<string, unknown>, nowMs?: number): ChainTvlContext | undefined;
|
|
35
|
+
export declare function stablecoinSupplyOf(m: Record<string, unknown>, nowMs?: number): StablecoinSupplyContext | undefined;
|
|
36
|
+
export declare function macroOf(m: Record<string, unknown>, nowMs?: number): MacroContext | undefined;
|
|
37
|
+
/** Bench-only observation overrides; live callers pass none. */
|
|
38
|
+
export interface ObserveOptions {
|
|
39
|
+
/** Read the curated PM board (depth 30, churn removed, calibration read)
|
|
40
|
+
* even for a mechanical spec, so a bench baseline sees the recorded
|
|
41
|
+
* agent opportunity set. Default: non-mechanical only. */
|
|
42
|
+
curatedPmBoard?: boolean;
|
|
43
|
+
}
|
|
44
|
+
export declare function observe(client: CoinRithmClient, spec: AgentSpec, state: RunState, trace?: AgentTrace, options?: ObserveOptions): Promise<ObserveOutput>;
|