@liquiditytech/rapidx-cli 1.0.34 → 1.0.36
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 +8 -0
- package/dist/cli/commands/automation.js +36 -0
- package/dist/cli/commands/index.js +4 -0
- package/dist/cli/commands/order.js +54 -6
- package/dist/cli/help.js +2 -1
- package/dist/cli/parser.js +1 -1
- package/dist/core/automation/session.js +455 -0
- package/dist/core/contracts/capabilities.js +5 -0
- package/dist/core/contracts/compatibility.js +1 -1
- package/dist/core/contracts/input-schema.js +35 -0
- package/dist/core/index.js +1 -0
- package/dist/core/safety/policy.js +6 -1
- package/dist/core/trading/preview-preflight.js +10 -2
- package/dist/core/trading/preview.js +69 -40
- package/dist/core/version.js +1 -1
- package/dist/mcp/tool-registry.js +8 -3
- package/dist/mcp/tool-runner.js +91 -8
- package/package.json +1 -1
- package/packages/distribution/docs/cli.md +3 -4
- package/packages/distribution/docs/mcp.md +2 -2
- package/packages/distribution/docs/quickstart.md +7 -1
- package/packages/distribution/docs/tools.md +9 -2
- package/packages/distribution/manifests/offline-manifest.json +4 -4
- package/packages/distribution/registry/rapidx.mcp.json +1 -1
|
@@ -15,6 +15,14 @@ The canonical source is `rapidx schema --json` or `rapidx/tools`.
|
|
|
15
15
|
- `rapidx/order/cancel-preview`: explicit alias for `order.cancel` preview. Submit `rapidx/order/cancel` with unchanged parameters, `previewId`, and `continueConsentId=confirmation.submitToken`.
|
|
16
16
|
- `rapidx/trade/preview`: generic preview for write operations without a dedicated order preview command, including position writes, portfolio writes, and algo writes. Pass `targetCapabilityId`, then submit the target tool with unchanged parameters, `previewId`, and `continueConsentId`.
|
|
17
17
|
|
|
18
|
+
## Automation Session Tools
|
|
19
|
+
|
|
20
|
+
- `rapidx/automation/start`: create a bounded local automation session after the user authorizes symbols, per-order max notional, total max notional, duration, actions, and order types. Input must include `explicitUserConsent=true` and `acceptedRiskText` from the user's authorization.
|
|
21
|
+
- `rapidx/automation/list`: list local automation sessions in the current workspace.
|
|
22
|
+
- `rapidx/automation/status`: read one automation session by `automationSessionId`.
|
|
23
|
+
- `rapidx/automation/extend`: extend an active session after user authorization. Input must include `explicitUserConsent=true` and `acceptedRiskText`; it cannot expand symbols, actions, order types, or notional limits.
|
|
24
|
+
- `rapidx/automation/stop`: stop a session. It blocks future automation previews/submits and does not cancel existing orders.
|
|
25
|
+
|
|
18
26
|
## Read Tools
|
|
19
27
|
|
|
20
28
|
- Market reads: ticker, orderbook, klines, funding rate, mark price, symbol info, and open interest.
|
|
@@ -59,8 +67,7 @@ Preview ids are runtime-local. A preview created by MCP must be submitted throug
|
|
|
59
67
|
|
|
60
68
|
Order identifiers use two validation layers. If `orderId` is provided, RapidX validates it locally as a 16-digit numeric id and returns `INVALID_INPUT` before any upstream call when the format is wrong. If `clientOrderId` is provided instead, do not apply `orderId` validation. For `order.query`, `order.replace-preview`, and `order.cancel-preview`, a syntactically valid `orderId` or `clientOrderId` is checked through RapidX readback; missing or non-open orders return `NOT_FOUND` or `BLOCKED` depending on the observed state.
|
|
61
69
|
|
|
62
|
-
For automation, keep preview-first execution.
|
|
63
|
-
Automation support is verified at the preview layer: valid automation input returns an `automation` object with `confirmationMode="automation-preview"`, while missing or generic `automationConsentText` is blocked before submission.
|
|
70
|
+
For automation, keep preview-first execution. Create an automation session with `rapidx/automation/start` after the user authorizes the scope, then pass `automationSessionId` into `rapidx/order/place-preview`, `rapidx/order/replace-preview`, or `rapidx/order/cancel-preview`. A valid automation preview returns `automationSession.confirmationMode="automation-session"` plus `confirmation.submitToken`; the agent may submit that preview without asking for another per-order chat confirmation. The submit call still uses the same business parameters plus `previewId` and `continueConsentId=confirmation.submitToken`. Automation sessions cover the order lifecycle when `allowedActions` includes `order.place`, `order.replace`, and `order.cancel`: place consumes notional by `maxNotional`, replace consumes the replacement order notional, and cancel consumes no notional.
|
|
64
71
|
|
|
65
72
|
For TPSL or conditional algo orders, use `rapidx/trade/preview` with `targetCapabilityId="algo.place"`, then submit `rapidx/algo/place`. `conditionType="ENTIRE_CLOSE_POSITION"` may use `orderType="MARKET"` without `quantity` or `amount`; provide at least one take-profit or stop-loss trigger and verify with `rapidx/algo/open-orders`.
|
|
66
73
|
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.0.
|
|
2
|
+
"version": "1.0.36",
|
|
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:
|
|
8
|
+
"checksum": "sha256:c4ad866ffd5864306ee2e2676042190594404b0731360bbb29e2bd8361f62857",
|
|
9
9
|
"status": "ready"
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
12
|
"name": "rapidx-quickstart-doc",
|
|
13
13
|
"path": "packages/distribution/docs/quickstart.md",
|
|
14
14
|
"channel": "offline",
|
|
15
|
-
"checksum": "sha256:
|
|
15
|
+
"checksum": "sha256:6dfc7d5efad6dce3bd52d27735fd0d3e57420cffa4d48a432f8d4e35058e6741",
|
|
16
16
|
"status": "ready"
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
"name": "rapidx-tools-doc",
|
|
20
20
|
"path": "packages/distribution/docs/tools.md",
|
|
21
21
|
"channel": "offline",
|
|
22
|
-
"checksum": "sha256:
|
|
22
|
+
"checksum": "sha256:bb5387983966306379001228b99e959cd80b7835ca615d8d567b3fddb7e129c8",
|
|
23
23
|
"status": "ready"
|
|
24
24
|
}
|
|
25
25
|
]
|