@alphafox/cli 0.3.20 → 0.3.21
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/dist/skills-manifest.json +41 -41
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/skills/account/SKILL.md +1 -1
- package/skills/admin/SKILL.md +1 -1
- package/skills/alphafox/SKILL.md +1 -1
- package/skills/alphafox-shared/SKILL.md +1 -1
- package/skills/auth/SKILL.md +1 -1
- package/skills/cache/SKILL.md +1 -1
- package/skills/engine-backtest/SKILL.md +3 -1
- package/skills/exchange/SKILL.md +1 -1
- package/skills/market/SKILL.md +1 -1
- package/skills/notification/SKILL.md +1 -1
- package/skills/strategy/SKILL.md +26 -6
- package/skills/trading/SKILL.md +3 -1
|
@@ -1,153 +1,153 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"packageName": "@alphafox/cli",
|
|
4
|
-
"packageVersion": "0.3.
|
|
4
|
+
"packageVersion": "0.3.21",
|
|
5
5
|
"contractVersion": "2026-08-31",
|
|
6
|
-
"bundleHash": "
|
|
6
|
+
"bundleHash": "3b1e1c9968daa5b78e782cdb9a3e824b9fd69dfe20c90fd81fe457dd5b051f53",
|
|
7
7
|
"skills": [
|
|
8
8
|
{
|
|
9
9
|
"name": "alphafox",
|
|
10
|
-
"version": "0.3.
|
|
10
|
+
"version": "0.3.21",
|
|
11
11
|
"files": [
|
|
12
12
|
{
|
|
13
13
|
"path": "SKILL.md",
|
|
14
|
-
"sha256": "
|
|
14
|
+
"sha256": "2152cddf61791a680d9a12e561afa858f70ae862fe938ffdda8c9224f186664e",
|
|
15
15
|
"size": 7950
|
|
16
16
|
}
|
|
17
17
|
],
|
|
18
|
-
"hash": "
|
|
18
|
+
"hash": "1cebc25d526364cf90f859407485d7431fb04921e7b7f2102c3f2cc1c52ae1f6"
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"name": "alphafox-account",
|
|
22
|
-
"version": "0.3.
|
|
22
|
+
"version": "0.3.21",
|
|
23
23
|
"files": [
|
|
24
24
|
{
|
|
25
25
|
"path": "SKILL.md",
|
|
26
|
-
"sha256": "
|
|
26
|
+
"sha256": "9897b6cdc67bc3b439d0ee8d20a73b1b195f434282f443cdd4b386da64926148",
|
|
27
27
|
"size": 784
|
|
28
28
|
}
|
|
29
29
|
],
|
|
30
|
-
"hash": "
|
|
30
|
+
"hash": "c11aaaa4a6fff64003f2ed6f842eb2879da9de82d90bb86e7b95224b958621f0"
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
"name": "alphafox-admin",
|
|
34
|
-
"version": "0.3.
|
|
34
|
+
"version": "0.3.21",
|
|
35
35
|
"files": [
|
|
36
36
|
{
|
|
37
37
|
"path": "SKILL.md",
|
|
38
|
-
"sha256": "
|
|
38
|
+
"sha256": "bc94cab7004cb17c8b87c4af22d3dfe95bf51c4bdde3bd84cdaebbc056584322",
|
|
39
39
|
"size": 2078
|
|
40
40
|
}
|
|
41
41
|
],
|
|
42
|
-
"hash": "
|
|
42
|
+
"hash": "073a7e1cc246b0c77a376e279ba09d7e049639c8e63074415fcfe26198ee1903"
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
"name": "alphafox-auth",
|
|
46
|
-
"version": "0.3.
|
|
46
|
+
"version": "0.3.21",
|
|
47
47
|
"files": [
|
|
48
48
|
{
|
|
49
49
|
"path": "SKILL.md",
|
|
50
|
-
"sha256": "
|
|
50
|
+
"sha256": "c576ef7a5ac20933def1bc334e3347b0951ad0692ff4b4ea92fe89a4052b5ee4",
|
|
51
51
|
"size": 2371
|
|
52
52
|
}
|
|
53
53
|
],
|
|
54
|
-
"hash": "
|
|
54
|
+
"hash": "41c831e8be2311f3abf393a9a502b2bbe6f79a383dfa9ee125a6b6f70e38e2f4"
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
57
|
"name": "alphafox-cache",
|
|
58
|
-
"version": "0.3.
|
|
58
|
+
"version": "0.3.21",
|
|
59
59
|
"files": [
|
|
60
60
|
{
|
|
61
61
|
"path": "SKILL.md",
|
|
62
|
-
"sha256": "
|
|
62
|
+
"sha256": "7b068ca3e06f221ea9306d441c56468852dfbb965e07f1675f1c423587520ca8",
|
|
63
63
|
"size": 1530
|
|
64
64
|
}
|
|
65
65
|
],
|
|
66
|
-
"hash": "
|
|
66
|
+
"hash": "8d97f1d8c423dbdabdf6aaf66e2d129d76319b0d4b803690cfe454239e237088"
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
69
|
"name": "alphafox-engine-backtest",
|
|
70
|
-
"version": "0.3.
|
|
70
|
+
"version": "0.3.21",
|
|
71
71
|
"files": [
|
|
72
72
|
{
|
|
73
73
|
"path": "SKILL.md",
|
|
74
|
-
"sha256": "
|
|
75
|
-
"size":
|
|
74
|
+
"sha256": "a957f0785e76a077b6d1f9f1fa80d43e4a1474ea65d7b2960677c42cdb6f66e2",
|
|
75
|
+
"size": 9792
|
|
76
76
|
}
|
|
77
77
|
],
|
|
78
|
-
"hash": "
|
|
78
|
+
"hash": "a046f3ef1386b5649d4a019458a790adc978c5e9a69b03a58e64a262bf545f1b"
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
"name": "alphafox-exchange",
|
|
82
|
-
"version": "0.3.
|
|
82
|
+
"version": "0.3.21",
|
|
83
83
|
"files": [
|
|
84
84
|
{
|
|
85
85
|
"path": "SKILL.md",
|
|
86
|
-
"sha256": "
|
|
86
|
+
"sha256": "9d11b9c68da4d6948c00b1f2449e170a3ef387f07ccce36db1037d0871b0842a",
|
|
87
87
|
"size": 744
|
|
88
88
|
}
|
|
89
89
|
],
|
|
90
|
-
"hash": "
|
|
90
|
+
"hash": "53b02a31ef1891bbcbb513dae2af48e8978003f3c41585ebab62d940bd8bad07"
|
|
91
91
|
},
|
|
92
92
|
{
|
|
93
93
|
"name": "alphafox-market",
|
|
94
|
-
"version": "0.3.
|
|
94
|
+
"version": "0.3.21",
|
|
95
95
|
"files": [
|
|
96
96
|
{
|
|
97
97
|
"path": "SKILL.md",
|
|
98
|
-
"sha256": "
|
|
98
|
+
"sha256": "3131b98faddf4a85c87a2a4b0b7fb9c0b6c97159bf38dfc61a1c2a2367fc0020",
|
|
99
99
|
"size": 3079
|
|
100
100
|
}
|
|
101
101
|
],
|
|
102
|
-
"hash": "
|
|
102
|
+
"hash": "df030475f2d0c4b53312bc1be8f1c3555062076074c0c207e3d8cd7a223d4f05"
|
|
103
103
|
},
|
|
104
104
|
{
|
|
105
105
|
"name": "alphafox-notification",
|
|
106
|
-
"version": "0.3.
|
|
106
|
+
"version": "0.3.21",
|
|
107
107
|
"files": [
|
|
108
108
|
{
|
|
109
109
|
"path": "SKILL.md",
|
|
110
|
-
"sha256": "
|
|
110
|
+
"sha256": "163a697d7c107152dc0a20dcabd06f1d9eb5b9395289e940b228cf599e7e901e",
|
|
111
111
|
"size": 699
|
|
112
112
|
}
|
|
113
113
|
],
|
|
114
|
-
"hash": "
|
|
114
|
+
"hash": "eab1329002b3e97d8a71800de23595a1df35cd0db3e7751382820df5244c9865"
|
|
115
115
|
},
|
|
116
116
|
{
|
|
117
117
|
"name": "alphafox-shared",
|
|
118
|
-
"version": "0.3.
|
|
118
|
+
"version": "0.3.21",
|
|
119
119
|
"files": [
|
|
120
120
|
{
|
|
121
121
|
"path": "SKILL.md",
|
|
122
|
-
"sha256": "
|
|
122
|
+
"sha256": "95c311b9b091d5c6c21928c499568bba7d78bbf48ffc78204f54560c828213b8",
|
|
123
123
|
"size": 6920
|
|
124
124
|
}
|
|
125
125
|
],
|
|
126
|
-
"hash": "
|
|
126
|
+
"hash": "5b84d0c16f8d1e0b2b5caefa6a5683650450249615fe186d48e987d42eebd264"
|
|
127
127
|
},
|
|
128
128
|
{
|
|
129
129
|
"name": "alphafox-strategy",
|
|
130
|
-
"version": "0.3.
|
|
130
|
+
"version": "0.3.21",
|
|
131
131
|
"files": [
|
|
132
132
|
{
|
|
133
133
|
"path": "SKILL.md",
|
|
134
|
-
"sha256": "
|
|
135
|
-
"size":
|
|
134
|
+
"sha256": "b61a5d3b32c0caaa29280676d0a38c32d895b13991056b8adbde584baeb751d2",
|
|
135
|
+
"size": 7185
|
|
136
136
|
}
|
|
137
137
|
],
|
|
138
|
-
"hash": "
|
|
138
|
+
"hash": "fa63c05d477ffb58e32c8c8e301189135d78e1a80bcb57cd7997a8533869f5f7"
|
|
139
139
|
},
|
|
140
140
|
{
|
|
141
141
|
"name": "alphafox-trading",
|
|
142
|
-
"version": "0.3.
|
|
142
|
+
"version": "0.3.21",
|
|
143
143
|
"files": [
|
|
144
144
|
{
|
|
145
145
|
"path": "SKILL.md",
|
|
146
|
-
"sha256": "
|
|
147
|
-
"size":
|
|
146
|
+
"sha256": "2142e880981ec69bcc4e2605e1f7fd950b0b058ea70d47e7f67b5147c0e6313b",
|
|
147
|
+
"size": 4921
|
|
148
148
|
}
|
|
149
149
|
],
|
|
150
|
-
"hash": "
|
|
150
|
+
"hash": "cd4386cd59f54ca31eac44cc6fa17eb9b74d0be925f06087d083d9d2370481bd"
|
|
151
151
|
}
|
|
152
152
|
]
|
|
153
153
|
}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const CLI_NAME = "alphafox";
|
|
2
2
|
export declare const CLI_PACKAGE = "@alphafox/cli";
|
|
3
|
-
export declare const CLI_VERSION = "0.3.
|
|
3
|
+
export declare const CLI_VERSION = "0.3.21";
|
|
4
4
|
export { CATALOG_VERSION as CLI_CONTRACT_VERSION } from "./catalog/operations";
|
package/dist/version.js
CHANGED
|
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CLI_CONTRACT_VERSION = exports.CLI_VERSION = exports.CLI_PACKAGE = exports.CLI_NAME = void 0;
|
|
4
4
|
exports.CLI_NAME = "alphafox";
|
|
5
5
|
exports.CLI_PACKAGE = "@alphafox/cli";
|
|
6
|
-
exports.CLI_VERSION = "0.3.
|
|
6
|
+
exports.CLI_VERSION = "0.3.21";
|
|
7
7
|
var operations_1 = require("./catalog/operations");
|
|
8
8
|
Object.defineProperty(exports, "CLI_CONTRACT_VERSION", { enumerable: true, get: function () { return operations_1.CATALOG_VERSION; } });
|
package/package.json
CHANGED
package/skills/account/SKILL.md
CHANGED
package/skills/admin/SKILL.md
CHANGED
package/skills/alphafox/SKILL.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: alphafox
|
|
3
3
|
description: AlphaFox CLI entry router. Use for any AlphaFox request — install, update, login, whoami, 回测, engine backtest, 清理回测缓存 / 历史数据, strategy definitions, create/list/start/stop a running strategy (trader), ticker/标的 resolve (美股 or crypto), market data, exchange connectors, wallet, subscriptions, notifications, or admin. After 回测 or 运行策略, include the dashboard URL from the domain skill. When the user asks 排行榜, include https://www.alphafox.app/zh/dashboard/leaderboard. After a successful install and login, present the 新人引导 in this file (Lite square 带单员 + classic strategies). If a CLI command prints `[alphafox] update available`, ask the user「检测到新的版本,是否需要我帮你升级?」and only then run `alphafox update --format json --no-input`. After a large backtest, if tape cache is large, ask「回测下载的历史数据比较大,要不要我帮你清理本地缓存?」then open `alphafox-cache`. Start here, then open the routed domain skill. Do not guess alphafox-engine-backtest vs alphafox-strategy vs alphafox-trading from memory.
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.21
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# AlphaFox
|
package/skills/auth/SKILL.md
CHANGED
package/skills/cache/SKILL.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: alphafox-engine-backtest
|
|
3
3
|
description: Local Engine WASM backtest (alphafox engine-backtest run|sweep) vs catalog experiment CRUD. After a persisted run, include https://www.alphafox.app/zh/dashboard/traders/backtest/{experimentId}.
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.21
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Engine Backtest
|
|
@@ -33,6 +33,8 @@ alphafox schema engine_backtest.experiments.byId.sweeps.create --format json --n
|
|
|
33
33
|
|
|
34
34
|
The tape runner ships inside the CLI (plus `ccxt` for public-market pulls). The wasm / Node host is downloaded from the public Vercel Blob manifest (`engine-backtest/latest.json`) into `~/.cache/alphafox/engine-backtest/<hash>/` on first run.
|
|
35
35
|
|
|
36
|
+
Before planning or running, follow the complete parameter review in `alphafox-strategy`, including when the operator already supplied `--config` or pasted a full command. Do not run the backtest until every applicable parameter, default status, short explanation, proposed value, and value source has been shown and the operator explicitly confirms the final proposal. User overrides win; unresolved required values stop the flow.
|
|
37
|
+
|
|
36
38
|
Local overrides, in order:
|
|
37
39
|
|
|
38
40
|
1. `ALPHAFOX_BACKTEST_WASM_DIR` / `ALPHAFOX_BACKTEST_RUNNER_DIR`
|
package/skills/exchange/SKILL.md
CHANGED
package/skills/market/SKILL.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: alphafox-market
|
|
3
3
|
description: Market data and ticker resolution for US equity perps, RWAs, and crypto on the same perp catalog. Use when the user names 美股, NVDA, AAPL, BTC, or any 标的. Keep the operator's asset class via symbolMetadata — do not rewrite NVDA into a crypto coin.
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.21
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Market
|
package/skills/strategy/SKILL.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: alphafox-strategy
|
|
3
3
|
description: Strategy definitions — list types, read a definition's contract, and validate config. Creating a running strategy is creating a trader; use alphafox-trading for that. Local Engine backtest is alphafox-engine-backtest.
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.21
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Strategy definitions
|
|
@@ -31,18 +31,38 @@ Match the name the operator used against list `id` / `name` / `display`. If they
|
|
|
31
31
|
1. `id`, `category` (`COPY` / `DCA` / `GRID` / `TREND` / `OTHERS`), `status`
|
|
32
32
|
2. English `description` (mechanism). Prefer it over marketing `display.description`
|
|
33
33
|
3. `capabilities` and `commonModules` (event-driven vs polling, signal sources, manual sync)
|
|
34
|
-
4. `
|
|
34
|
+
4. The effective `configSchema`, including composed common modules, strategy parameters, defaults, constraints, conditional branches, and each field's `display`
|
|
35
35
|
5. `capabilities.actionDefinitions` (what a manual action changes)
|
|
36
36
|
|
|
37
37
|
Explain the type from those fields. Missing a layer → say unknown; do not fill from memory. Decision logic (`simple-long`, grid `mode` `neutral`/`long`/`short`) is an internal parameter, not a new definition id.
|
|
38
38
|
|
|
39
39
|
## Configure with the human
|
|
40
40
|
|
|
41
|
-
The human
|
|
41
|
+
The human confirms the complete parameter set. You write JSON only after that review.
|
|
42
42
|
|
|
43
43
|
1. Confirm the definition from `byId.get` in the operator's language (what it is, what drives it, how positions change).
|
|
44
|
-
2.
|
|
45
|
-
3.
|
|
44
|
+
2. Use the effective `configSchema` returned by `byId.get` as the sole parameter contract. It already composes the definition's `commonModules` with `strategyConfigSchema` and may contain definition-specific customization. Walk every applicable parameter, not only required fields or familiar knobs.
|
|
45
|
+
3. Resolve conditional schemas in dependency order. Ask for a discriminator or enable/disable choice first, then enumerate every parameter in the selected branch. Do not present inactive branch fields as active settings. For arrays or maps, explain the collection and confirm every field of each configured item.
|
|
46
|
+
4. Build a grouped or numbered review table in the operator's language. Every applicable parameter must have:
|
|
47
|
+
|
|
48
|
+
- full JSON path;
|
|
49
|
+
- short explanation from localized `display.description`, falling back to the schema's description; if neither exists, say the definition provides no explanation — do not guess;
|
|
50
|
+
- type plus enum, range, or other relevant constraints;
|
|
51
|
+
- default status and source;
|
|
52
|
+
- proposed value and value source.
|
|
53
|
+
|
|
54
|
+
5. Determine the proposed value in this precedence order:
|
|
55
|
+
|
|
56
|
+
1. **user override** — any value the operator explicitly supplied, including values already present in a provided config;
|
|
57
|
+
2. **schema default** — the field's JSON Schema `default`;
|
|
58
|
+
3. **product default** — only a default explicitly documented by this skill or the live product contract. Currently `common.execution.leverage` is `10`, matching the website form; raw Engine omission means 1x;
|
|
59
|
+
4. **no default** — required fields remain unresolved and must be answered; optional fields are proposed as “不设置 / omit”. Do not guess a value or describe omission as a default.
|
|
60
|
+
|
|
61
|
+
A user override always wins, even when it equals neither default. Preserve explicit `false`, `0`, empty arrays, and empty strings when the schema allows them; they are not missing values.
|
|
62
|
+
|
|
63
|
+
6. When there are many parameters, present them in logical groups or numbered chunks so the review remains readable. After all groups are visible, ask the operator to reply **confirm all** / “全部确认”, or override paths/numbers. One overall confirmation is sufficient, but it must cover every displayed parameter. Apply overrides, show the affected rows again, and repeat until no required value is unresolved and the operator explicitly confirms the final proposal.
|
|
64
|
+
7. An earlier request such as “创建策略”, “运行回测”, or a pasted command/config is input to the proposal, not confirmation of the review. Do not validate, create, or backtest until the complete parameter review is explicitly confirmed.
|
|
65
|
+
8. Write `strategy-config.json` as the trader object:
|
|
46
66
|
|
|
47
67
|
```json
|
|
48
68
|
{
|
|
@@ -53,7 +73,7 @@ The human answers knobs. You write JSON.
|
|
|
53
73
|
|
|
54
74
|
`common` is shared risk / SLTP / execution / market. `strategy` is this type's parameters and decision logic. Do not use top-level `settings`, `policyId`, or `policyParams`. `configSchemaVersion` comes from the definition (`byId.get` / list); keep it off this file.
|
|
55
75
|
|
|
56
|
-
|
|
76
|
+
9. Keys and enums come from the definition schema, not from this skill. Do not ship a default `grid.json` / `dca.json`. Reuse this source file for `engine-backtest --config` and as `trading.traders.create` `config`.
|
|
57
77
|
|
|
58
78
|
## Validate config
|
|
59
79
|
|
package/skills/trading/SKILL.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: alphafox-trading
|
|
3
3
|
description: Running strategies (traders) — create, list, start, and stop. A trader is a live or paper strategy instance (grid, dca, copy, …), not a person. Default Engine create uses autoStart true (创建即开始). Use autoStart false only when the user asks to create without starting. After create or start, include https://www.alphafox.app/zh/dashboard/traders/{traderId}.
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.21
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Running strategies (traders)
|
|
@@ -32,6 +32,8 @@ alphafox api GET /api/v1/trading/traders --format json --no-input
|
|
|
32
32
|
|
|
33
33
|
Read `alphafox schema <operationId>` first. Body may only include documented `request.body` fields. Large / nested bodies use `--config @file`.
|
|
34
34
|
|
|
35
|
+
Before composing or dry-running any create request, follow the complete parameter review in `alphafox-strategy`, including when the operator already supplied a config. Do not create a trader until every applicable parameter, default status, short explanation, proposed value, and value source has been shown and the operator explicitly confirms the final proposal. User overrides win; unresolved required values stop the flow.
|
|
36
|
+
|
|
35
37
|
```bash
|
|
36
38
|
alphafox schema trading.traders.create --format json --no-input
|
|
37
39
|
alphafox trading traders create --config @./create-trader.json --dry-run --format json --no-input
|