@mangrove-ai/sdk 1.1.0 → 1.3.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 +37 -8
- package/dist/contract.generated.d.ts +843 -125
- package/dist/contract.generated.js +673 -276
- package/dist/contract.generated.js.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.js +24 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,17 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
Server-side `@mangrove-ai/sdk` for Node.js 20+, imported as
|
|
4
4
|
`import { MangroveAI } from '@mangrove-ai/sdk'`. This is the MangroveAI API
|
|
5
|
-
client in version 1.x. The separate Markets client
|
|
5
|
+
client in version 1.x. The separate Markets client is published as `@mangrove-ai/markets`;
|
|
6
6
|
Python MangroveAI uses the PyPI distribution `mangroveai` and import `mangrove_ai`.
|
|
7
7
|
|
|
8
8
|
**Major product migration:** `@mangrove-ai/sdk` 0.1.2, 0.2.0 and 0.3.0 are
|
|
9
9
|
historical Markets packages. Version 1.0.0 is the MangroveAI SDK and does not
|
|
10
10
|
provide their `MangroveClient` API. Markets applications must install
|
|
11
|
-
`@mangrove-ai/markets` 0.4.0
|
|
12
|
-
archive. Read the [migration notice](https://github.com/MangroveTechnologies/MangroveAI-SDK/blob/main/docs/typescript-package-migration.md)
|
|
11
|
+
published `@mangrove-ai/markets` 0.4.0. Read the [migration notice](https://github.com/MangroveTechnologies/MangroveAI-SDK/blob/main/docs/typescript-package-migration.md)
|
|
13
12
|
before changing a pin. The old `@mangrove-ai/client` candidate was never published
|
|
14
13
|
and will not become a registry alias.
|
|
15
14
|
|
|
15
|
+
Published checkpoint: November 24, 2026: AI 1.2.0 and Markets 0.4.0 are available.
|
|
16
|
+
This source prepares AI 1.3.0, which adds the declared exit-quote operation and the
|
|
17
|
+
execution cost fields on backtest results; the local-deployment helper requires backend 7.11.0 or later
|
|
18
|
+
and actual capability serving acceptance, not merely an installed package.
|
|
19
|
+
|
|
16
20
|
Check the [dated repository release status](https://github.com/MangroveTechnologies/MangroveAI-SDK/blob/main/docs/issue-66-release-handoff.md)
|
|
17
21
|
for registry availability and verified versions. Source, a local package and a
|
|
18
22
|
published npm release are separate states. For evaluation before a registry
|
|
@@ -28,7 +32,7 @@ is written there, with a name based on that revision's `package.json` version.
|
|
|
28
32
|
Then install that reviewed archive in the consuming project, using its actual path:
|
|
29
33
|
|
|
30
34
|
```sh
|
|
31
|
-
npm install /path/to/reviewed/mangrove-ai-sdk-1.
|
|
35
|
+
npm install /path/to/reviewed/mangrove-ai-sdk-1.3.0.tgz
|
|
32
36
|
```
|
|
33
37
|
|
|
34
38
|
When installing a registry release, verify its exact version and package identity
|
|
@@ -61,14 +65,31 @@ try {
|
|
|
61
65
|
This sends one Bearer-authenticated usage read. It does not create a wallet,
|
|
62
66
|
launch compute, connect a broker, invoke an MCP tool or send a payment.
|
|
63
67
|
|
|
68
|
+
## Local deployment snapshot (1.2.0 and later)
|
|
69
|
+
|
|
70
|
+
```typescript
|
|
71
|
+
const snapshot = await client.strategies.localDeployment(strategyId, {
|
|
72
|
+
assetClass: 'crypto',
|
|
73
|
+
timeoutMs: 15_000,
|
|
74
|
+
});
|
|
75
|
+
console.log({ ready: snapshot.activation_ready, blocker: snapshot.activation_blocker });
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
This makes one authenticated, billable read of the versioned server snapshot.
|
|
79
|
+
Pass `crypto` or `equity` explicitly. The helper preserves the service's decision,
|
|
80
|
+
errors and full snapshot; it does not activate a runner or implement risk policy.
|
|
81
|
+
A server conflict remains an `APIError` with its HTTP status and diagnostics.
|
|
82
|
+
The generated generic operation supports the same path/query/response contract.
|
|
83
|
+
No automatic retry or payment is added.
|
|
84
|
+
|
|
64
85
|
## Supported surface
|
|
65
86
|
|
|
66
|
-
The named helpers are `users`, `signals`, `strategyWorkflow` and `backtesting`.
|
|
87
|
+
The named helpers are `users`, `signals`, `strategies`, `strategyWorkflow` and `backtesting`.
|
|
67
88
|
Other declared REST operations use `client.request(operation, options)`, with
|
|
68
89
|
generated path, parameter, body and response types. This is not Python helper
|
|
69
|
-
parity. The current classification has
|
|
70
|
-
including
|
|
71
|
-
|
|
90
|
+
parity. The current classification has 276 core/Oracle proxy method/path keys,
|
|
91
|
+
including 12 v2 operations: 272 JSON/no-content, one separate redirect flow and
|
|
92
|
+
three streaming/non-JSON operations. Counts describe pinned declarations, not live
|
|
72
93
|
endpoint acceptance. The JSON transport does not perform the redirect or consume
|
|
73
94
|
those streams. Operation keys include the HTTP method and exact versioned path:
|
|
74
95
|
|
|
@@ -85,6 +106,12 @@ Unmodelled responses and legacy Raw JSON fields remain `unknown`. The transport
|
|
|
85
106
|
checks status, JSON, size and deadline; the metrics and pagination helpers also
|
|
86
107
|
validate their envelopes. Application code must narrow an opaque result.
|
|
87
108
|
|
|
109
|
+
To quote a protected long-spot exit, use
|
|
110
|
+
`client.request('POST /api/v1/execution/exit-quote', { body })`. The declared
|
|
111
|
+
body requires decimal strings for the confirmed position, bid, and venue fee
|
|
112
|
+
bounds. The response returns the server's limit, safe sale quantity, and
|
|
113
|
+
profitability decision. It does not submit an order.
|
|
114
|
+
|
|
88
115
|
The server's canonical strategy workflow schemas generate method names such as
|
|
89
116
|
`client.strategyWorkflow.getStrategy({ body: { strategy_id } })` and
|
|
90
117
|
`client.strategyWorkflow.saveStrategy({ body: ... })`. These helpers pass requests
|
|
@@ -218,3 +245,5 @@ For a new unpublished version, the selected source must still be fresh `main`
|
|
|
218
245
|
immediately before publishing. An older main ancestor is accepted only to finish
|
|
219
246
|
an already published artifact whose exact source and bytes were verified. It
|
|
220
247
|
cannot start a new publication or move npm `latest` back to stale source.
|
|
248
|
+
|
|
249
|
+
The canonical inventory excludes one deprecated SDK compatibility alias, `POST /api/v1/backtests/`, retained from TypeScript1.1.0. It inherits the canonical backtest contract while preserving its original HTTP path; new callers should use `POST /api/v1/backtests`.
|