@quantbrasil/cli 0.1.0-beta.7 → 0.1.0-beta.9
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 +12 -0
- package/dist/cli/index.d.ts +8 -2
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +22 -3
- package/dist/cli/prompt.d.ts +1 -0
- package/dist/cli/prompt.d.ts.map +1 -1
- package/dist/cli/prompt.js +17 -0
- package/dist/cli/skills.d.ts +9 -0
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +68 -4
- package/dist/commands/rankings.d.ts +82 -0
- package/dist/commands/rankings.d.ts.map +1 -0
- package/dist/commands/rankings.js +202 -0
- package/dist/commands/screening.d.ts +44 -0
- package/dist/commands/screening.d.ts.map +1 -1
- package/dist/commands/screening.js +63 -0
- package/dist/commands/skills.js +7 -7
- package/dist/commands/update.d.ts +23 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +209 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/vendor/core/capabilities/index.d.ts +1 -0
- package/dist/vendor/core/capabilities/index.d.ts.map +1 -1
- package/dist/vendor/core/capabilities/index.js +1 -0
- package/dist/vendor/core/capabilities/rankings.d.ts +83 -0
- package/dist/vendor/core/capabilities/rankings.d.ts.map +1 -0
- package/dist/vendor/core/capabilities/rankings.js +95 -0
- package/dist/vendor/core/capabilities/registry.d.ts +216 -0
- package/dist/vendor/core/capabilities/registry.d.ts.map +1 -1
- package/dist/vendor/core/capabilities/registry.js +2 -0
- package/dist/vendor/core/capabilities/screening.d.ts +27 -0
- package/dist/vendor/core/capabilities/screening.d.ts.map +1 -1
- package/dist/vendor/core/capabilities/screening.js +31 -0
- package/dist/vendor/core/capabilities/types.d.ts +1 -1
- package/dist/vendor/core/capabilities/types.d.ts.map +1 -1
- package/package.json +3 -3
- package/skills/quantbrasil/SKILL.md +10 -5
- package/skills/quantbrasil/references/cli.md +26 -0
- package/skills/quantbrasil/references/costs.md +2 -0
- package/skills/quantbrasil/references/quality-eval-queries.json +5 -0
- package/skills/quantbrasil/references/rankings.md +60 -0
- package/skills/quantbrasil/references/screening.md +212 -0
- package/skills/quantbrasil/references/workflows.md +29 -3
|
@@ -138,6 +138,87 @@ export declare const capabilityRegistry: readonly [{
|
|
|
138
138
|
readonly title: "Get asset overview";
|
|
139
139
|
};
|
|
140
140
|
readonly outputModes: readonly ["json", "human"];
|
|
141
|
+
}, {
|
|
142
|
+
readonly id: "rankings.list";
|
|
143
|
+
readonly kind: "read";
|
|
144
|
+
readonly visibility: readonly ["cli", "opencode"];
|
|
145
|
+
readonly description: "Lista rankings do sistema e rankings do usuário disponíveis para consulta atual.";
|
|
146
|
+
readonly http: {
|
|
147
|
+
readonly method: "GET";
|
|
148
|
+
readonly path: "/api/desk/tools/rankings/list";
|
|
149
|
+
readonly inputMode: "none";
|
|
150
|
+
readonly schemas: {
|
|
151
|
+
readonly request: null;
|
|
152
|
+
readonly response: "RankingsListResponse";
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
readonly cli: {
|
|
156
|
+
readonly group: "rankings";
|
|
157
|
+
readonly command: "list";
|
|
158
|
+
readonly summary: "Lista rankings do sistema e rankings do usuário.";
|
|
159
|
+
readonly positional: readonly [];
|
|
160
|
+
readonly options: readonly [];
|
|
161
|
+
readonly examples: readonly ["quantbrasil rankings list"];
|
|
162
|
+
};
|
|
163
|
+
readonly tool: {
|
|
164
|
+
readonly name: "qb_rankings_list";
|
|
165
|
+
readonly title: "Listar rankings";
|
|
166
|
+
};
|
|
167
|
+
readonly outputModes: readonly ["json", "human"];
|
|
168
|
+
}, {
|
|
169
|
+
readonly id: "rankings.current";
|
|
170
|
+
readonly kind: "read";
|
|
171
|
+
readonly visibility: readonly ["cli", "opencode"];
|
|
172
|
+
readonly description: "Retorna os ativos atuais no topo de um ranking do sistema ou ranking do usuário.";
|
|
173
|
+
readonly http: {
|
|
174
|
+
readonly method: "POST";
|
|
175
|
+
readonly path: "/api/desk/tools/rankings/current";
|
|
176
|
+
readonly inputMode: "json_body";
|
|
177
|
+
readonly schemas: {
|
|
178
|
+
readonly request: "RankingCurrentRequest";
|
|
179
|
+
readonly response: "RankingCurrentResponse";
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
readonly cli: {
|
|
183
|
+
readonly group: "rankings";
|
|
184
|
+
readonly command: "current";
|
|
185
|
+
readonly summary: "Consulta o topo atual de um ranking.";
|
|
186
|
+
readonly positional: readonly [];
|
|
187
|
+
readonly options: readonly [{
|
|
188
|
+
readonly kind: "option";
|
|
189
|
+
readonly flag: "--system";
|
|
190
|
+
readonly name: "system_id";
|
|
191
|
+
readonly type: "string";
|
|
192
|
+
readonly required: false;
|
|
193
|
+
readonly placeholder: "ID";
|
|
194
|
+
readonly exclusiveGroup: "ranking_selector";
|
|
195
|
+
readonly description: "ID de ranking do sistema retornado por `rankings list`, por exemplo momentum-90d.";
|
|
196
|
+
}, {
|
|
197
|
+
readonly kind: "option";
|
|
198
|
+
readonly flag: "--user";
|
|
199
|
+
readonly name: "user_ranking_id";
|
|
200
|
+
readonly type: "integer";
|
|
201
|
+
readonly required: false;
|
|
202
|
+
readonly placeholder: "ID";
|
|
203
|
+
readonly exclusiveGroup: "ranking_selector";
|
|
204
|
+
readonly description: "ID numérico de ranking do usuário retornado por `rankings list`.";
|
|
205
|
+
}, {
|
|
206
|
+
readonly kind: "option";
|
|
207
|
+
readonly flag: "--top";
|
|
208
|
+
readonly name: "top_n";
|
|
209
|
+
readonly type: "integer";
|
|
210
|
+
readonly required: false;
|
|
211
|
+
readonly placeholder: "N";
|
|
212
|
+
readonly defaultValue: 20;
|
|
213
|
+
readonly description: "Número de ativos do topo do ranking a retornar.";
|
|
214
|
+
}];
|
|
215
|
+
readonly examples: readonly ["quantbrasil rankings current --system momentum-90d --top 20", "quantbrasil rankings current --system magic-formula --top 10", "quantbrasil rankings current --user 123 --top 20"];
|
|
216
|
+
};
|
|
217
|
+
readonly tool: {
|
|
218
|
+
readonly name: "qb_rankings_current";
|
|
219
|
+
readonly title: "Consultar ranking atual";
|
|
220
|
+
};
|
|
221
|
+
readonly outputModes: readonly ["json", "human"];
|
|
141
222
|
}, {
|
|
142
223
|
readonly id: "screening.universes";
|
|
143
224
|
readonly kind: "read";
|
|
@@ -165,6 +246,33 @@ export declare const capabilityRegistry: readonly [{
|
|
|
165
246
|
readonly title: "Listar universos de screening";
|
|
166
247
|
};
|
|
167
248
|
readonly outputModes: readonly ["json", "human"];
|
|
249
|
+
}, {
|
|
250
|
+
readonly id: "screening.indicators";
|
|
251
|
+
readonly kind: "read";
|
|
252
|
+
readonly visibility: readonly ["cli", "opencode"];
|
|
253
|
+
readonly description: "Lista indicadores, parâmetros e operadores disponíveis para screening.";
|
|
254
|
+
readonly http: {
|
|
255
|
+
readonly method: "GET";
|
|
256
|
+
readonly path: "/api/desk/tools/screening/indicators";
|
|
257
|
+
readonly inputMode: "none";
|
|
258
|
+
readonly schemas: {
|
|
259
|
+
readonly request: null;
|
|
260
|
+
readonly response: "ScreeningIndicatorsResponse";
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
readonly cli: {
|
|
264
|
+
readonly group: "screening";
|
|
265
|
+
readonly command: "indicators";
|
|
266
|
+
readonly summary: "Lista indicadores, parâmetros e exemplos disponíveis para screening.";
|
|
267
|
+
readonly positional: readonly [];
|
|
268
|
+
readonly options: readonly [];
|
|
269
|
+
readonly examples: readonly ["quantbrasil screening indicators", "quantbrasil screening indicators --json"];
|
|
270
|
+
};
|
|
271
|
+
readonly tool: {
|
|
272
|
+
readonly name: "qb_screening_indicators";
|
|
273
|
+
readonly title: "Listar indicadores de screening";
|
|
274
|
+
};
|
|
275
|
+
readonly outputModes: readonly ["json", "human"];
|
|
168
276
|
}, {
|
|
169
277
|
readonly id: "screening.run";
|
|
170
278
|
readonly kind: "read";
|
|
@@ -1005,6 +1113,87 @@ export declare function getCapabilityById(id: CapabilityId): {
|
|
|
1005
1113
|
readonly title: "Get asset overview";
|
|
1006
1114
|
};
|
|
1007
1115
|
readonly outputModes: readonly ["json", "human"];
|
|
1116
|
+
} | {
|
|
1117
|
+
readonly id: "rankings.list";
|
|
1118
|
+
readonly kind: "read";
|
|
1119
|
+
readonly visibility: readonly ["cli", "opencode"];
|
|
1120
|
+
readonly description: "Lista rankings do sistema e rankings do usuário disponíveis para consulta atual.";
|
|
1121
|
+
readonly http: {
|
|
1122
|
+
readonly method: "GET";
|
|
1123
|
+
readonly path: "/api/desk/tools/rankings/list";
|
|
1124
|
+
readonly inputMode: "none";
|
|
1125
|
+
readonly schemas: {
|
|
1126
|
+
readonly request: null;
|
|
1127
|
+
readonly response: "RankingsListResponse";
|
|
1128
|
+
};
|
|
1129
|
+
};
|
|
1130
|
+
readonly cli: {
|
|
1131
|
+
readonly group: "rankings";
|
|
1132
|
+
readonly command: "list";
|
|
1133
|
+
readonly summary: "Lista rankings do sistema e rankings do usuário.";
|
|
1134
|
+
readonly positional: readonly [];
|
|
1135
|
+
readonly options: readonly [];
|
|
1136
|
+
readonly examples: readonly ["quantbrasil rankings list"];
|
|
1137
|
+
};
|
|
1138
|
+
readonly tool: {
|
|
1139
|
+
readonly name: "qb_rankings_list";
|
|
1140
|
+
readonly title: "Listar rankings";
|
|
1141
|
+
};
|
|
1142
|
+
readonly outputModes: readonly ["json", "human"];
|
|
1143
|
+
} | {
|
|
1144
|
+
readonly id: "rankings.current";
|
|
1145
|
+
readonly kind: "read";
|
|
1146
|
+
readonly visibility: readonly ["cli", "opencode"];
|
|
1147
|
+
readonly description: "Retorna os ativos atuais no topo de um ranking do sistema ou ranking do usuário.";
|
|
1148
|
+
readonly http: {
|
|
1149
|
+
readonly method: "POST";
|
|
1150
|
+
readonly path: "/api/desk/tools/rankings/current";
|
|
1151
|
+
readonly inputMode: "json_body";
|
|
1152
|
+
readonly schemas: {
|
|
1153
|
+
readonly request: "RankingCurrentRequest";
|
|
1154
|
+
readonly response: "RankingCurrentResponse";
|
|
1155
|
+
};
|
|
1156
|
+
};
|
|
1157
|
+
readonly cli: {
|
|
1158
|
+
readonly group: "rankings";
|
|
1159
|
+
readonly command: "current";
|
|
1160
|
+
readonly summary: "Consulta o topo atual de um ranking.";
|
|
1161
|
+
readonly positional: readonly [];
|
|
1162
|
+
readonly options: readonly [{
|
|
1163
|
+
readonly kind: "option";
|
|
1164
|
+
readonly flag: "--system";
|
|
1165
|
+
readonly name: "system_id";
|
|
1166
|
+
readonly type: "string";
|
|
1167
|
+
readonly required: false;
|
|
1168
|
+
readonly placeholder: "ID";
|
|
1169
|
+
readonly exclusiveGroup: "ranking_selector";
|
|
1170
|
+
readonly description: "ID de ranking do sistema retornado por `rankings list`, por exemplo momentum-90d.";
|
|
1171
|
+
}, {
|
|
1172
|
+
readonly kind: "option";
|
|
1173
|
+
readonly flag: "--user";
|
|
1174
|
+
readonly name: "user_ranking_id";
|
|
1175
|
+
readonly type: "integer";
|
|
1176
|
+
readonly required: false;
|
|
1177
|
+
readonly placeholder: "ID";
|
|
1178
|
+
readonly exclusiveGroup: "ranking_selector";
|
|
1179
|
+
readonly description: "ID numérico de ranking do usuário retornado por `rankings list`.";
|
|
1180
|
+
}, {
|
|
1181
|
+
readonly kind: "option";
|
|
1182
|
+
readonly flag: "--top";
|
|
1183
|
+
readonly name: "top_n";
|
|
1184
|
+
readonly type: "integer";
|
|
1185
|
+
readonly required: false;
|
|
1186
|
+
readonly placeholder: "N";
|
|
1187
|
+
readonly defaultValue: 20;
|
|
1188
|
+
readonly description: "Número de ativos do topo do ranking a retornar.";
|
|
1189
|
+
}];
|
|
1190
|
+
readonly examples: readonly ["quantbrasil rankings current --system momentum-90d --top 20", "quantbrasil rankings current --system magic-formula --top 10", "quantbrasil rankings current --user 123 --top 20"];
|
|
1191
|
+
};
|
|
1192
|
+
readonly tool: {
|
|
1193
|
+
readonly name: "qb_rankings_current";
|
|
1194
|
+
readonly title: "Consultar ranking atual";
|
|
1195
|
+
};
|
|
1196
|
+
readonly outputModes: readonly ["json", "human"];
|
|
1008
1197
|
} | {
|
|
1009
1198
|
readonly id: "screening.universes";
|
|
1010
1199
|
readonly kind: "read";
|
|
@@ -1032,6 +1221,33 @@ export declare function getCapabilityById(id: CapabilityId): {
|
|
|
1032
1221
|
readonly title: "Listar universos de screening";
|
|
1033
1222
|
};
|
|
1034
1223
|
readonly outputModes: readonly ["json", "human"];
|
|
1224
|
+
} | {
|
|
1225
|
+
readonly id: "screening.indicators";
|
|
1226
|
+
readonly kind: "read";
|
|
1227
|
+
readonly visibility: readonly ["cli", "opencode"];
|
|
1228
|
+
readonly description: "Lista indicadores, parâmetros e operadores disponíveis para screening.";
|
|
1229
|
+
readonly http: {
|
|
1230
|
+
readonly method: "GET";
|
|
1231
|
+
readonly path: "/api/desk/tools/screening/indicators";
|
|
1232
|
+
readonly inputMode: "none";
|
|
1233
|
+
readonly schemas: {
|
|
1234
|
+
readonly request: null;
|
|
1235
|
+
readonly response: "ScreeningIndicatorsResponse";
|
|
1236
|
+
};
|
|
1237
|
+
};
|
|
1238
|
+
readonly cli: {
|
|
1239
|
+
readonly group: "screening";
|
|
1240
|
+
readonly command: "indicators";
|
|
1241
|
+
readonly summary: "Lista indicadores, parâmetros e exemplos disponíveis para screening.";
|
|
1242
|
+
readonly positional: readonly [];
|
|
1243
|
+
readonly options: readonly [];
|
|
1244
|
+
readonly examples: readonly ["quantbrasil screening indicators", "quantbrasil screening indicators --json"];
|
|
1245
|
+
};
|
|
1246
|
+
readonly tool: {
|
|
1247
|
+
readonly name: "qb_screening_indicators";
|
|
1248
|
+
readonly title: "Listar indicadores de screening";
|
|
1249
|
+
};
|
|
1250
|
+
readonly outputModes: readonly ["json", "human"];
|
|
1035
1251
|
} | {
|
|
1036
1252
|
readonly id: "screening.run";
|
|
1037
1253
|
readonly kind: "read";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/capabilities/registry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/capabilities/registry.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEjD"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { assetCapabilities } from "./assets.js";
|
|
2
2
|
import { marketCapabilities } from "./market.js";
|
|
3
3
|
import { portfolioCapabilities } from "./portfolios.js";
|
|
4
|
+
import { rankingsCapabilities } from "./rankings.js";
|
|
4
5
|
import { screeningCapabilities } from "./screening.js";
|
|
5
6
|
export const capabilityRegistry = [
|
|
6
7
|
...marketCapabilities,
|
|
7
8
|
...assetCapabilities,
|
|
9
|
+
...rankingsCapabilities,
|
|
8
10
|
...screeningCapabilities,
|
|
9
11
|
...portfolioCapabilities,
|
|
10
12
|
];
|
|
@@ -26,6 +26,33 @@ export declare const screeningCapabilities: readonly [{
|
|
|
26
26
|
readonly title: "Listar universos de screening";
|
|
27
27
|
};
|
|
28
28
|
readonly outputModes: readonly ["json", "human"];
|
|
29
|
+
}, {
|
|
30
|
+
readonly id: "screening.indicators";
|
|
31
|
+
readonly kind: "read";
|
|
32
|
+
readonly visibility: readonly ["cli", "opencode"];
|
|
33
|
+
readonly description: "Lista indicadores, parâmetros e operadores disponíveis para screening.";
|
|
34
|
+
readonly http: {
|
|
35
|
+
readonly method: "GET";
|
|
36
|
+
readonly path: "/api/desk/tools/screening/indicators";
|
|
37
|
+
readonly inputMode: "none";
|
|
38
|
+
readonly schemas: {
|
|
39
|
+
readonly request: null;
|
|
40
|
+
readonly response: "ScreeningIndicatorsResponse";
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
readonly cli: {
|
|
44
|
+
readonly group: "screening";
|
|
45
|
+
readonly command: "indicators";
|
|
46
|
+
readonly summary: "Lista indicadores, parâmetros e exemplos disponíveis para screening.";
|
|
47
|
+
readonly positional: readonly [];
|
|
48
|
+
readonly options: readonly [];
|
|
49
|
+
readonly examples: readonly ["quantbrasil screening indicators", "quantbrasil screening indicators --json"];
|
|
50
|
+
};
|
|
51
|
+
readonly tool: {
|
|
52
|
+
readonly name: "qb_screening_indicators";
|
|
53
|
+
readonly title: "Listar indicadores de screening";
|
|
54
|
+
};
|
|
55
|
+
readonly outputModes: readonly ["json", "human"];
|
|
29
56
|
}, {
|
|
30
57
|
readonly id: "screening.run";
|
|
31
58
|
readonly kind: "read";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screening.d.ts","sourceRoot":"","sources":["../../src/capabilities/screening.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,mBAAmB,8BAA+B,CAAC;AAEhE,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"screening.d.ts","sourceRoot":"","sources":["../../src/capabilities/screening.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,mBAAmB,8BAA+B,CAAC;AAEhE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiKkB,CAAC"}
|
|
@@ -30,6 +30,37 @@ export const screeningCapabilities = [
|
|
|
30
30
|
},
|
|
31
31
|
outputModes: standardOutputModes,
|
|
32
32
|
},
|
|
33
|
+
{
|
|
34
|
+
id: "screening.indicators",
|
|
35
|
+
kind: "read",
|
|
36
|
+
visibility: publicRuntimeVisibility,
|
|
37
|
+
description: "Lista indicadores, parâmetros e operadores disponíveis para screening.",
|
|
38
|
+
http: {
|
|
39
|
+
method: "GET",
|
|
40
|
+
path: "/api/desk/tools/screening/indicators",
|
|
41
|
+
inputMode: "none",
|
|
42
|
+
schemas: {
|
|
43
|
+
request: null,
|
|
44
|
+
response: "ScreeningIndicatorsResponse",
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
cli: {
|
|
48
|
+
group: "screening",
|
|
49
|
+
command: "indicators",
|
|
50
|
+
summary: "Lista indicadores, parâmetros e exemplos disponíveis para screening.",
|
|
51
|
+
positional: [],
|
|
52
|
+
options: [],
|
|
53
|
+
examples: [
|
|
54
|
+
"quantbrasil screening indicators",
|
|
55
|
+
"quantbrasil screening indicators --json",
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
tool: {
|
|
59
|
+
name: "qb_screening_indicators",
|
|
60
|
+
title: "Listar indicadores de screening",
|
|
61
|
+
},
|
|
62
|
+
outputModes: standardOutputModes,
|
|
63
|
+
},
|
|
33
64
|
{
|
|
34
65
|
id: "screening.run",
|
|
35
66
|
kind: "read",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type CapabilityVisibility = "cli" | "opencode";
|
|
2
2
|
export type CapabilityKind = "read" | "mutation";
|
|
3
|
-
export type CapabilityGroup = "market" | "assets" | "screening" | "watchlists" | "holdings";
|
|
3
|
+
export type CapabilityGroup = "market" | "assets" | "rankings" | "screening" | "watchlists" | "holdings";
|
|
4
4
|
export type CapabilityHttpMethod = "GET" | "POST";
|
|
5
5
|
export type CapabilityInputMode = "none" | "query" | "json_body";
|
|
6
6
|
export type CapabilityOutputMode = "json" | "human";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/capabilities/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,oBAAoB,GAAG,KAAK,GAAG,UAAU,CAAC;AACtD,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,UAAU,CAAC;AACjD,MAAM,MAAM,eAAe,GACvB,QAAQ,GACR,QAAQ,GACR,WAAW,GACX,YAAY,GACZ,UAAU,CAAC;AACf,MAAM,MAA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AE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,gCACf,SAAQ,0BAA0B;IAClC,IAAI,EAAE,YAAY,CAAC;CACpB;AAED,MAAM,WAAW,4BACf,SAAQ,0BAA0B;IAClC,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,KAAK,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,MAAM,sBAAsB,GAC9B,gCAAgC,GAChC,4BAA4B,CAAC;AAEjC,wDAAwD;AACxD,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,eAAe,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,SAAS,gCAAgC,EAAE,CAAC;IACxD,OAAO,EAAE,SAAS,4BAA4B,EAAE,CAAC;IACjD;;;;OAIG;IACH,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7B;AAED,uDAAuD;AACvD,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,8EAA8E;AAC9E,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,cAAc,CAAC;IACrB,UAAU,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAC5C,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,sBAAsB,CAAC;IAC7B,GAAG,EAAE,qBAAqB,CAAC;IAC3B,IAAI,EAAE,sBAAsB,CAAC;IAC7B,WAAW,EAAE,SAAS,oBAAoB,EAAE,CAAC;CAC9C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quantbrasil/cli",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Public QuantBrasil CLI for deterministic operations",
|
|
6
6
|
"repository": {
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"typescript": "^5.3.3",
|
|
42
42
|
"vitest": "^3.2.4",
|
|
43
43
|
"@repo/core": "0.0.0",
|
|
44
|
-
"@repo/
|
|
45
|
-
"@repo/
|
|
44
|
+
"@repo/typescript-config": "0.0.0",
|
|
45
|
+
"@repo/eslint-config": "0.0.0"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
48
|
"build": "pnpm --filter @repo/core build && pnpm run clean && tsc && node scripts/vendor-core.mjs",
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: quantbrasil
|
|
3
|
-
description: Use this skill when a user asks for QuantBrasil-supported market or investing data/actions through the QuantBrasil CLI, including asset lookup, prices, asset analysis, watchlists, holdings, screening, historical return, beta, and VaR, even if they do not explicitly mention QuantBrasil.
|
|
3
|
+
description: Use this skill when a user asks for QuantBrasil-supported market or investing data/actions through the QuantBrasil CLI, including asset lookup, prices, asset analysis, rankings, watchlists, holdings, screening, historical return, beta, and VaR, even if they do not explicitly mention QuantBrasil.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# QuantBrasil CLI
|
|
7
7
|
|
|
8
|
-
Use this skill when the user asks for market or investing data/actions that QuantBrasil supports, including asset lookup, prices, asset analysis, watchlists, holdings, screening, and holding metrics.
|
|
8
|
+
Use this skill when the user asks for market or investing data/actions that QuantBrasil supports, including asset lookup, prices, asset analysis, rankings, watchlists, holdings, screening, and holding metrics.
|
|
9
9
|
|
|
10
10
|
## Routing
|
|
11
11
|
|
|
12
12
|
- Use this skill even when the user does not say "QuantBrasil" if the request fits the supported market or investing surface.
|
|
13
|
-
- Most end-user QuantBrasil requests are expected in pt-BR; Portuguese prompts about ativos, carteiras, cotações, screening, retorno, beta, VaR, watchlists, or Ibovespa should trigger this skill when they map to the supported CLI surface.
|
|
14
|
-
- For QuantBrasil-supported market, asset, screening, watchlist, holding, or holding metric data, use the CLI before generic web or finance search.
|
|
13
|
+
- Most end-user QuantBrasil requests are expected in pt-BR; Portuguese prompts about ativos, rankings, Magic Formula, momentum, ranking fatorial, carteiras, cotações, screening, retorno, beta, VaR, watchlists, or Ibovespa should trigger this skill when they map to the supported CLI surface.
|
|
14
|
+
- For QuantBrasil-supported market, asset, ranking, screening, watchlist, holding, or holding metric data, use the CLI before generic web or finance search.
|
|
15
15
|
- When the request mentions portfolios, carteiras, watchlists, holdings, target weights, positions, historical return, beta, VaR, screening universes, or saved compositions, load [`references/portfolios.md`](./references/portfolios.md) before choosing commands.
|
|
16
|
+
- When the request asks for Magic Formula, momentum rankings, top ranked assets, ranking fatorial, rankings do usuário, or ordered asset lists, load [`references/rankings.md`](./references/rankings.md) before choosing commands.
|
|
17
|
+
- When the request mentions IFR/RSI filters, sobrevendido, sobrecomprado, indicator screening, technical screening rules, or screening indicators, load [`references/screening.md`](./references/screening.md) before building the request JSON.
|
|
16
18
|
- Use `quantbrasil` when available on PATH.
|
|
17
19
|
- If `quantbrasil` is not found, report that the CLI binary is not on PATH and ask the user to install it or fix PATH.
|
|
18
20
|
- Check readiness first: `quantbrasil --status`
|
|
@@ -22,9 +24,10 @@ Use this skill when the user asks for market or investing data/actions that Quan
|
|
|
22
24
|
- asset discovery: `quantbrasil market assets`
|
|
23
25
|
- price lookup: `quantbrasil market price <ticker>`
|
|
24
26
|
- richer asset analysis: `quantbrasil assets overview <ticker> --sections ...`
|
|
27
|
+
- ranked asset lists: `quantbrasil rankings list|current ...`
|
|
25
28
|
- watchlist details and changes: `quantbrasil watchlists ...`
|
|
26
29
|
- holding details and historical return: `quantbrasil holdings ...`
|
|
27
|
-
- indicator screening over saved universes: `quantbrasil screening ...`
|
|
30
|
+
- indicator screening over saved universes: `quantbrasil screening universes|indicators|run ...`
|
|
28
31
|
- holding metrics: `quantbrasil holdings historical-return|beta|var ...`
|
|
29
32
|
- Use `--json` when output will be parsed by agent or script
|
|
30
33
|
- Use generic web or finance search only if the CLI is unavailable, the requested data is outside the QuantBrasil-supported surface, or the user explicitly asks for an external source.
|
|
@@ -34,7 +37,9 @@ Use this skill when the user asks for market or investing data/actions that Quan
|
|
|
34
37
|
|
|
35
38
|
- Load [`references/workflows.md`](./references/workflows.md) when the user describes an investing task but does not name an exact command, or when a task spans discovery plus a follow-up action.
|
|
36
39
|
- Load [`references/cli.md`](./references/cli.md) when you need exact command syntax, flags, examples, or supported `--sections` values.
|
|
40
|
+
- Load [`references/rankings.md`](./references/rankings.md) when the user asks for Magic Formula, momentum rankings, top ranked assets, ranking fatorial, rankings do usuário, or current ordered lists.
|
|
37
41
|
- Load [`references/portfolios.md`](./references/portfolios.md) when the request mentions portfolios, carteiras, watchlists, holdings, target weights, positions, historical return, beta, VaR, screening universes, or saved compositions.
|
|
42
|
+
- Load [`references/screening.md`](./references/screening.md) when the user asks for IFR/RSI filters, sobrevendido/sobrecomprado assets, indicator screening, technical filter JSON, screening indicators, or examples of `ScreenerRequest`.
|
|
38
43
|
- Load [`references/costs.md`](./references/costs.md) before chaining heavy reads, choosing between overview/screening/holding metrics, or answering cost-sensitive agent workflow questions.
|
|
39
44
|
- Load [`references/errors.md`](./references/errors.md) when a CLI command fails, auth/config is unclear, or the user asks how to fix a QuantBrasil CLI error.
|
|
40
45
|
- Load [`references/unsupported.md`](./references/unsupported.md) when the user asks for deletion, file export, ad-hoc ticker-list screening, unsupported commands, or a capability that may not be public yet.
|
|
@@ -46,6 +46,27 @@ Valid `--sections`:
|
|
|
46
46
|
- `fundamentals`
|
|
47
47
|
- `rankings`
|
|
48
48
|
|
|
49
|
+
## Rankings
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
quantbrasil rankings list
|
|
53
|
+
quantbrasil rankings list --json
|
|
54
|
+
quantbrasil rankings current --system momentum-90d --top 20
|
|
55
|
+
quantbrasil rankings current --system magic-formula --top 10
|
|
56
|
+
quantbrasil rankings current --user 123 --top 20
|
|
57
|
+
quantbrasil rankings current --system momentum-90d --top 20 --json
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Rules:
|
|
61
|
+
|
|
62
|
+
- use `rankings list` to discover rankings before using ids
|
|
63
|
+
- system rankings use stable ids such as `magic-formula`, `momentum-90d`, `dividend-yield`, and `momentum-double`
|
|
64
|
+
- user rankings use the numeric id returned by `rankings list`
|
|
65
|
+
- use exactly one selector: `--system` or `--user`
|
|
66
|
+
- `--top` controls how many ranked assets are returned
|
|
67
|
+
- `current` returns the ordered rows and the metric used to order the ranking
|
|
68
|
+
- use `--json` when the result will be parsed by an agent or script
|
|
69
|
+
|
|
49
70
|
## Watchlists and holdings
|
|
50
71
|
|
|
51
72
|
Watchlists:
|
|
@@ -82,6 +103,7 @@ Use `--json` on any holding metric command when machine parsing needed.
|
|
|
82
103
|
|
|
83
104
|
```bash
|
|
84
105
|
quantbrasil screening universes
|
|
106
|
+
quantbrasil screening indicators
|
|
85
107
|
quantbrasil screening run --system acoes-mais-liquidas --query-file ./screening.json
|
|
86
108
|
quantbrasil screening run --watchlist 93 --query-file ./screening.json --limit 25
|
|
87
109
|
quantbrasil screening run --holding 182 --query-file ./screening.json --sort ticker
|
|
@@ -96,6 +118,10 @@ Rules:
|
|
|
96
118
|
- `--query-file` must contain the full backend `ScreenerRequest` JSON shape
|
|
97
119
|
- `--query-file -` reads the same JSON shape from stdin
|
|
98
120
|
- `--limit` and `--sort` override only top-level fields from the query JSON
|
|
121
|
+
- use `screening indicators` to discover supported indicator names, params, examples, timeframes, and operators
|
|
122
|
+
|
|
123
|
+
Load [`screening.md`](./screening.md) for detailed screening examples, including
|
|
124
|
+
IFR14, IFR2, and logical `AND` JSON payloads.
|
|
99
125
|
|
|
100
126
|
Example query JSON:
|
|
101
127
|
|
|
@@ -14,6 +14,7 @@ Current guidance uses backend qualitative classes only:
|
|
|
14
14
|
- `market price` is narrow read path
|
|
15
15
|
- `assets overview` is richer and should use minimal `--sections`
|
|
16
16
|
- `screening universes` is a discovery path for saved screening universes
|
|
17
|
+
- `screening indicators` is a discovery path for supported screening JSON
|
|
17
18
|
- `screening run` is a heavy read and should be targeted to one selected universe
|
|
18
19
|
- holding metrics (`historical-return`, `beta`, `var`) are heaviest current public reads
|
|
19
20
|
|
|
@@ -22,6 +23,7 @@ Current guidance uses backend qualitative classes only:
|
|
|
22
23
|
- prefer narrow command that answers question
|
|
23
24
|
- prefer `market price` over `assets overview` for quote-only requests
|
|
24
25
|
- run `screening universes` before `screening run` when the universe selector is not known
|
|
26
|
+
- run `screening indicators` before `screening run` when the indicator JSON is not known
|
|
25
27
|
- prefer one holding metric call targeted to actual question
|
|
26
28
|
- do not chain multiple heavy holding metric or screening calls unless user asked for them
|
|
27
29
|
- use `--json` only when structured output needed
|
|
@@ -44,6 +44,11 @@
|
|
|
44
44
|
"should_trigger": true,
|
|
45
45
|
"expected_behavior": "Use screening universes and present system portfolios, watchlists, and holdings."
|
|
46
46
|
},
|
|
47
|
+
{
|
|
48
|
+
"query": "Quais indicadores posso usar no screening?",
|
|
49
|
+
"should_trigger": true,
|
|
50
|
+
"expected_behavior": "Use screening indicators and present supported indicator names, params, examples, timeframes, and operators."
|
|
51
|
+
},
|
|
47
52
|
{
|
|
48
53
|
"query": "Rode um screening de IFR na carteira do sistema Ações Mais Líquidas.",
|
|
49
54
|
"should_trigger": true,
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Rankings
|
|
2
|
+
|
|
3
|
+
Use rankings for order-first questions: Magic Formula, momentum leaders,
|
|
4
|
+
dividend-yield leaders, Momentum Double, or saved user rankings. A ranking
|
|
5
|
+
returns an ordered asset list plus the metric used to order it.
|
|
6
|
+
|
|
7
|
+
## Discovery
|
|
8
|
+
|
|
9
|
+
Always discover ids before running a ranking unless the user already gave an
|
|
10
|
+
exact id.
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
quantbrasil rankings list
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
The list is grouped into:
|
|
17
|
+
|
|
18
|
+
- system rankings: platform-provided rankings with stable ids
|
|
19
|
+
- user rankings: saved rankings owned by the authenticated user
|
|
20
|
+
|
|
21
|
+
## Current ranking
|
|
22
|
+
|
|
23
|
+
System ranking:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
quantbrasil rankings current --system momentum-90d --top 20
|
|
27
|
+
quantbrasil rankings current --system magic-formula --top 10
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
User ranking:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
quantbrasil rankings current --user 123 --top 20
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Rules:
|
|
37
|
+
|
|
38
|
+
- use exactly one selector: `--system` or `--user`
|
|
39
|
+
- `--top` is the number of ranked assets to return
|
|
40
|
+
- use `--json` when another step needs to parse tickers, rank, score, or metric values
|
|
41
|
+
- do not use `factor:<id>` in command syntax; ranking fatorial is a saved user ranking and uses `--user <id>`
|
|
42
|
+
|
|
43
|
+
## Ranking vs screening
|
|
44
|
+
|
|
45
|
+
Use rankings when the user starts from an ordered list:
|
|
46
|
+
|
|
47
|
+
- "top 20 do momentum"
|
|
48
|
+
- "top 10 Magic Formula"
|
|
49
|
+
- "meu ranking de qualidade"
|
|
50
|
+
- "ativos com maior dividend yield"
|
|
51
|
+
|
|
52
|
+
Use screening when the user starts from a condition:
|
|
53
|
+
|
|
54
|
+
- "IFR14 abaixo de 30"
|
|
55
|
+
- "ativos sobrevendidos"
|
|
56
|
+
- "preço acima da média móvel"
|
|
57
|
+
|
|
58
|
+
If the user wants both ranking and a condition, keep the steps explicit. First
|
|
59
|
+
get the ranking with `--json`, then apply the follow-up workflow only if the CLI
|
|
60
|
+
surface supports that next step. Do not invent ranking-specific screening flags.
|