@liquiditytech/rapidx-cli 1.0.34 → 1.0.35

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.
@@ -92,7 +92,7 @@ export function evaluateSafety(capability, input, policy, state = makeSafetyStat
92
92
  }
93
93
  }
94
94
  const clientOrderId = typeof input.clientOrderId === "string" ? input.clientOrderId : undefined;
95
- if (clientOrderId) {
95
+ if (clientOrderId && tracksDuplicateClientOrderId(capability)) {
96
96
  const now = state.nowMs();
97
97
  const seenAt = state.recentClientOrderIds.get(clientOrderId);
98
98
  if (seenAt && now - seenAt < policy.duplicateWindowMs) {
@@ -168,6 +168,11 @@ function requiresNotionalLimit(capability) {
168
168
  || capability.capabilityId === "algo.place"
169
169
  || capability.capabilityId === "position.close";
170
170
  }
171
+ function tracksDuplicateClientOrderId(capability) {
172
+ return capability.capabilityId === "order.place-preview"
173
+ || capability.capabilityId === "order.place"
174
+ || capability.capabilityId === "algo.place";
175
+ }
171
176
  function estimateDirectNotional(input) {
172
177
  const symbol = typeof input.symbol === "string" ? input.symbol : "";
173
178
  if (!symbol.startsWith("BINANCE_")) {
@@ -170,7 +170,11 @@ function validateQuantity(input, rules) {
170
170
  const quantityText = String(quantityValue);
171
171
  const quantity = positiveNumber(quantityText);
172
172
  if (quantity === undefined) {
173
- return;
173
+ throw new ProductError({
174
+ code: "RCORE24006",
175
+ status: "BLOCKED",
176
+ message: `INVALID_QUANTITY: quantity ${quantityText} must be a positive finite number.`
177
+ });
174
178
  }
175
179
  const minSize = positiveNumber(rules.minSize);
176
180
  if (minSize !== undefined && quantity < minSize - 1e-12) {
@@ -204,7 +208,11 @@ function validatePrice(input, rules) {
204
208
  const priceText = String(input.price);
205
209
  const price = positiveNumber(priceText);
206
210
  if (price === undefined) {
207
- return;
211
+ throw new ProductError({
212
+ code: "RCORE24007",
213
+ status: "BLOCKED",
214
+ message: `INVALID_PRICE: price ${priceText} must be a positive finite number.`
215
+ });
208
216
  }
209
217
  const tickSize = positiveNumber(rules.tickSize);
210
218
  if (tickSize !== undefined && !isAlignedToStep(price, tickSize)) {
@@ -1 +1 @@
1
- export const RAPIDX_VERSION = "1.0.34";
1
+ export const RAPIDX_VERSION = "1.0.35";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liquiditytech/rapidx-cli",
3
- "version": "1.0.34",
3
+ "version": "1.0.35",
4
4
  "description": "RapidX CLI, MCP server mode, registry, and release assets.",
5
5
  "type": "module",
6
6
  "private": false,
@@ -1,11 +1,11 @@
1
1
  {
2
- "version": "1.0.34",
2
+ "version": "1.0.35",
3
3
  "artifacts": [
4
4
  {
5
5
  "name": "rapidx-mcp-registry",
6
6
  "path": "packages/distribution/registry/rapidx.mcp.json",
7
7
  "channel": "offline",
8
- "checksum": "sha256:0a21dd7e9627c0996ed56d7409f28f0ca0d30de9d13c6b10650a7ef3fb67505b",
8
+ "checksum": "sha256:d0ec01cb3ae6023075b50726f01f9cc8bbcccf6f626cdf7dc4d07d17d48808ba",
9
9
  "status": "ready"
10
10
  },
11
11
  {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rapidx",
3
3
  "packageName": "@liquiditytech/rapidx-cli",
4
- "version": "1.0.34",
4
+ "version": "1.0.35",
5
5
  "command": "rapidx",
6
6
  "args": ["mcp", "serve"],
7
7
  "launchCommand": "rapidx",