@quantbrasil/cli 0.1.0-beta.1 → 0.1.0-beta.11

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.
Files changed (77) hide show
  1. package/README.md +64 -11
  2. package/dist/cli/client.js +4 -0
  3. package/dist/cli/index.d.ts +14 -4
  4. package/dist/cli/index.d.ts.map +1 -1
  5. package/dist/cli/index.js +72 -14
  6. package/dist/cli/prompt.d.ts +1 -0
  7. package/dist/cli/prompt.d.ts.map +1 -1
  8. package/dist/cli/prompt.js +17 -0
  9. package/dist/cli/skills.d.ts +9 -0
  10. package/dist/cli/skills.d.ts.map +1 -1
  11. package/dist/cli/skills.js +68 -4
  12. package/dist/commands/auth.d.ts +18 -0
  13. package/dist/commands/auth.d.ts.map +1 -1
  14. package/dist/commands/auth.js +49 -0
  15. package/dist/commands/cointegration.d.ts +52 -0
  16. package/dist/commands/cointegration.d.ts.map +1 -0
  17. package/dist/commands/cointegration.js +118 -0
  18. package/dist/commands/market.d.ts +1 -0
  19. package/dist/commands/market.d.ts.map +1 -1
  20. package/dist/commands/market.js +17 -1
  21. package/dist/commands/portfolios.d.ts +148 -8
  22. package/dist/commands/portfolios.d.ts.map +1 -1
  23. package/dist/commands/portfolios.js +557 -55
  24. package/dist/commands/rankings.d.ts +82 -0
  25. package/dist/commands/rankings.d.ts.map +1 -0
  26. package/dist/commands/rankings.js +235 -0
  27. package/dist/commands/screening.d.ts +120 -0
  28. package/dist/commands/screening.d.ts.map +1 -0
  29. package/dist/commands/screening.js +361 -0
  30. package/dist/commands/skills.js +7 -7
  31. package/dist/commands/update.d.ts +23 -0
  32. package/dist/commands/update.d.ts.map +1 -0
  33. package/dist/commands/update.js +209 -0
  34. package/dist/index.d.ts +3 -1
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +3 -1
  37. package/dist/vendor/core/capabilities/cointegration.d.ts +52 -0
  38. package/dist/vendor/core/capabilities/cointegration.d.ts.map +1 -0
  39. package/dist/vendor/core/capabilities/cointegration.js +63 -0
  40. package/dist/vendor/core/capabilities/index.d.ts +3 -1
  41. package/dist/vendor/core/capabilities/index.d.ts.map +1 -1
  42. package/dist/vendor/core/capabilities/index.js +3 -1
  43. package/dist/vendor/core/capabilities/market.d.ts +9 -1
  44. package/dist/vendor/core/capabilities/market.d.ts.map +1 -1
  45. package/dist/vendor/core/capabilities/market.js +10 -0
  46. package/dist/vendor/core/capabilities/portfolios.d.ts +452 -56
  47. package/dist/vendor/core/capabilities/portfolios.d.ts.map +1 -1
  48. package/dist/vendor/core/capabilities/portfolios.js +434 -116
  49. package/dist/vendor/core/capabilities/rankings.d.ts +83 -0
  50. package/dist/vendor/core/capabilities/rankings.d.ts.map +1 -0
  51. package/dist/vendor/core/capabilities/rankings.js +96 -0
  52. package/dist/vendor/core/capabilities/registry.d.ts +1380 -414
  53. package/dist/vendor/core/capabilities/registry.d.ts.map +1 -1
  54. package/dist/vendor/core/capabilities/registry.js +6 -2
  55. package/dist/vendor/core/capabilities/screening.d.ts +136 -0
  56. package/dist/vendor/core/capabilities/screening.d.ts.map +1 -0
  57. package/dist/vendor/core/capabilities/screening.js +155 -0
  58. package/dist/vendor/core/capabilities/types.d.ts +1 -1
  59. package/dist/vendor/core/capabilities/types.d.ts.map +1 -1
  60. package/package.json +3 -3
  61. package/skills/quantbrasil/SKILL.md +31 -11
  62. package/skills/quantbrasil/references/cli.md +112 -19
  63. package/skills/quantbrasil/references/cointegration.md +40 -0
  64. package/skills/quantbrasil/references/costs.md +10 -4
  65. package/skills/quantbrasil/references/errors.md +16 -5
  66. package/skills/quantbrasil/references/portfolios.md +114 -0
  67. package/skills/quantbrasil/references/quality-eval-queries.json +147 -0
  68. package/skills/quantbrasil/references/rankings.md +64 -0
  69. package/skills/quantbrasil/references/screening.md +212 -0
  70. package/skills/quantbrasil/references/unsupported.md +9 -2
  71. package/skills/quantbrasil/references/workflows.md +117 -23
  72. package/dist/commands/analytics.d.ts +0 -131
  73. package/dist/commands/analytics.d.ts.map +0 -1
  74. package/dist/commands/analytics.js +0 -291
  75. package/dist/vendor/core/capabilities/analytics.d.ts +0 -187
  76. package/dist/vendor/core/capabilities/analytics.d.ts.map +0 -1
  77. package/dist/vendor/core/capabilities/analytics.js +0 -214
@@ -0,0 +1,83 @@
1
+ export declare const rankingsCapabilities: readonly [{
2
+ readonly id: "rankings.list";
3
+ readonly kind: "read";
4
+ readonly visibility: readonly ["cli", "opencode"];
5
+ readonly description: "Lista rankings do sistema e rankings do usuário disponíveis para consulta atual.";
6
+ readonly http: {
7
+ readonly method: "GET";
8
+ readonly path: "/api/desk/tools/rankings/list";
9
+ readonly inputMode: "none";
10
+ readonly schemas: {
11
+ readonly request: null;
12
+ readonly response: "RankingsListResponse";
13
+ };
14
+ };
15
+ readonly cli: {
16
+ readonly group: "rankings";
17
+ readonly command: "list";
18
+ readonly summary: "Lista rankings do sistema e rankings do usuário.";
19
+ readonly positional: readonly [];
20
+ readonly options: readonly [];
21
+ readonly examples: readonly ["quantbrasil rankings list"];
22
+ };
23
+ readonly tool: {
24
+ readonly name: "qb_rankings_list";
25
+ readonly title: "Listar rankings";
26
+ };
27
+ readonly outputModes: readonly ["json", "human"];
28
+ }, {
29
+ readonly id: "rankings.current";
30
+ readonly kind: "read";
31
+ readonly visibility: readonly ["cli", "opencode"];
32
+ readonly description: "Retorna os ativos atuais no topo de um ranking do sistema ou ranking do usuário.";
33
+ readonly http: {
34
+ readonly method: "POST";
35
+ readonly path: "/api/desk/tools/rankings/current";
36
+ readonly inputMode: "json_body";
37
+ readonly schemas: {
38
+ readonly request: "RankingCurrentRequest";
39
+ readonly response: "RankingCurrentResponse";
40
+ };
41
+ };
42
+ readonly cli: {
43
+ readonly group: "rankings";
44
+ readonly command: "current";
45
+ readonly summary: "Consulta o topo atual de um ranking.";
46
+ readonly positional: readonly [];
47
+ readonly options: readonly [{
48
+ readonly kind: "option";
49
+ readonly flag: "--system";
50
+ readonly name: "system_id";
51
+ readonly type: "string";
52
+ readonly required: false;
53
+ readonly placeholder: "SLUG";
54
+ readonly exclusiveGroup: "ranking_selector";
55
+ readonly description: "Slug de ranking do sistema retornado por `rankings list`, por exemplo momentum-90d ou low-risk.";
56
+ }, {
57
+ readonly kind: "option";
58
+ readonly flag: "--id";
59
+ readonly name: "user_ranking_id";
60
+ readonly type: "integer";
61
+ readonly required: false;
62
+ readonly placeholder: "ID";
63
+ readonly exclusiveGroup: "ranking_selector";
64
+ readonly description: "ID numérico de ranking do usuário retornado por `rankings list`.";
65
+ }, {
66
+ readonly kind: "option";
67
+ readonly flag: "--top";
68
+ readonly name: "top_n";
69
+ readonly type: "integer";
70
+ readonly required: false;
71
+ readonly placeholder: "N";
72
+ readonly defaultValue: 20;
73
+ readonly description: "Número de ativos do topo do ranking a retornar.";
74
+ }];
75
+ readonly examples: readonly ["quantbrasil rankings current --system momentum-90d --top 20", "quantbrasil rankings current --system magic-formula --top 10", "quantbrasil rankings current --system low-risk --top 30", "quantbrasil rankings current --id 123 --top 20"];
76
+ };
77
+ readonly tool: {
78
+ readonly name: "qb_rankings_current";
79
+ readonly title: "Consultar ranking atual";
80
+ };
81
+ readonly outputModes: readonly ["json", "human"];
82
+ }];
83
+ //# sourceMappingURL=rankings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rankings.d.ts","sourceRoot":"","sources":["../../src/capabilities/rankings.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiGmB,CAAC"}
@@ -0,0 +1,96 @@
1
+ import { publicRuntimeVisibility, standardOutputModes } from "./shared.js";
2
+ const rankingSelectorExclusiveGroup = "ranking_selector";
3
+ export const rankingsCapabilities = [
4
+ {
5
+ id: "rankings.list",
6
+ kind: "read",
7
+ visibility: publicRuntimeVisibility,
8
+ description: "Lista rankings do sistema e rankings do usuário disponíveis para consulta atual.",
9
+ http: {
10
+ method: "GET",
11
+ path: "/api/desk/tools/rankings/list",
12
+ inputMode: "none",
13
+ schemas: {
14
+ request: null,
15
+ response: "RankingsListResponse",
16
+ },
17
+ },
18
+ cli: {
19
+ group: "rankings",
20
+ command: "list",
21
+ summary: "Lista rankings do sistema e rankings do usuário.",
22
+ positional: [],
23
+ options: [],
24
+ examples: ["quantbrasil rankings list"],
25
+ },
26
+ tool: {
27
+ name: "qb_rankings_list",
28
+ title: "Listar rankings",
29
+ },
30
+ outputModes: standardOutputModes,
31
+ },
32
+ {
33
+ id: "rankings.current",
34
+ kind: "read",
35
+ visibility: publicRuntimeVisibility,
36
+ description: "Retorna os ativos atuais no topo de um ranking do sistema ou ranking do usuário.",
37
+ http: {
38
+ method: "POST",
39
+ path: "/api/desk/tools/rankings/current",
40
+ inputMode: "json_body",
41
+ schemas: {
42
+ request: "RankingCurrentRequest",
43
+ response: "RankingCurrentResponse",
44
+ },
45
+ },
46
+ cli: {
47
+ group: "rankings",
48
+ command: "current",
49
+ summary: "Consulta o topo atual de um ranking.",
50
+ positional: [],
51
+ options: [
52
+ {
53
+ kind: "option",
54
+ flag: "--system",
55
+ name: "system_id",
56
+ type: "string",
57
+ required: false,
58
+ placeholder: "SLUG",
59
+ exclusiveGroup: rankingSelectorExclusiveGroup,
60
+ description: "Slug de ranking do sistema retornado por `rankings list`, por exemplo momentum-90d ou low-risk.",
61
+ },
62
+ {
63
+ kind: "option",
64
+ flag: "--id",
65
+ name: "user_ranking_id",
66
+ type: "integer",
67
+ required: false,
68
+ placeholder: "ID",
69
+ exclusiveGroup: rankingSelectorExclusiveGroup,
70
+ description: "ID numérico de ranking do usuário retornado por `rankings list`.",
71
+ },
72
+ {
73
+ kind: "option",
74
+ flag: "--top",
75
+ name: "top_n",
76
+ type: "integer",
77
+ required: false,
78
+ placeholder: "N",
79
+ defaultValue: 20,
80
+ description: "Número de ativos do topo do ranking a retornar.",
81
+ },
82
+ ],
83
+ examples: [
84
+ "quantbrasil rankings current --system momentum-90d --top 20",
85
+ "quantbrasil rankings current --system magic-formula --top 10",
86
+ "quantbrasil rankings current --system low-risk --top 30",
87
+ "quantbrasil rankings current --id 123 --top 20",
88
+ ],
89
+ },
90
+ tool: {
91
+ name: "qb_rankings_current",
92
+ title: "Consultar ranking atual",
93
+ },
94
+ outputModes: standardOutputModes,
95
+ },
96
+ ];