@quantbrasil/cli 0.1.0-beta.0

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 (102) hide show
  1. package/README.md +272 -0
  2. package/bin/quantbrasil.js +4 -0
  3. package/dist/cli/auth.d.ts +20 -0
  4. package/dist/cli/auth.d.ts.map +1 -0
  5. package/dist/cli/auth.js +76 -0
  6. package/dist/cli/client.d.ts +17 -0
  7. package/dist/cli/client.d.ts.map +1 -0
  8. package/dist/cli/client.js +112 -0
  9. package/dist/cli/config.d.ts +33 -0
  10. package/dist/cli/config.d.ts.map +1 -0
  11. package/dist/cli/config.js +148 -0
  12. package/dist/cli/errors.d.ts +40 -0
  13. package/dist/cli/errors.d.ts.map +1 -0
  14. package/dist/cli/errors.js +122 -0
  15. package/dist/cli/index.d.ts +30 -0
  16. package/dist/cli/index.d.ts.map +1 -0
  17. package/dist/cli/index.js +112 -0
  18. package/dist/cli/prompt.d.ts +2 -0
  19. package/dist/cli/prompt.d.ts.map +1 -0
  20. package/dist/cli/prompt.js +40 -0
  21. package/dist/cli/skills.d.ts +26 -0
  22. package/dist/cli/skills.d.ts.map +1 -0
  23. package/dist/cli/skills.js +94 -0
  24. package/dist/cli/terminal.d.ts +18 -0
  25. package/dist/cli/terminal.d.ts.map +1 -0
  26. package/dist/cli/terminal.js +43 -0
  27. package/dist/commands/analytics.d.ts +131 -0
  28. package/dist/commands/analytics.d.ts.map +1 -0
  29. package/dist/commands/analytics.js +291 -0
  30. package/dist/commands/assets.d.ts +69 -0
  31. package/dist/commands/assets.d.ts.map +1 -0
  32. package/dist/commands/assets.js +350 -0
  33. package/dist/commands/auth.d.ts +17 -0
  34. package/dist/commands/auth.d.ts.map +1 -0
  35. package/dist/commands/auth.js +48 -0
  36. package/dist/commands/capabilities.d.ts +25 -0
  37. package/dist/commands/capabilities.d.ts.map +1 -0
  38. package/dist/commands/capabilities.js +61 -0
  39. package/dist/commands/init.d.ts +17 -0
  40. package/dist/commands/init.d.ts.map +1 -0
  41. package/dist/commands/init.js +89 -0
  42. package/dist/commands/market.d.ts +45 -0
  43. package/dist/commands/market.d.ts.map +1 -0
  44. package/dist/commands/market.js +162 -0
  45. package/dist/commands/portfolios.d.ts +60 -0
  46. package/dist/commands/portfolios.d.ts.map +1 -0
  47. package/dist/commands/portfolios.js +298 -0
  48. package/dist/commands/skills.d.ts +17 -0
  49. package/dist/commands/skills.d.ts.map +1 -0
  50. package/dist/commands/skills.js +38 -0
  51. package/dist/commands/status.d.ts +15 -0
  52. package/dist/commands/status.d.ts.map +1 -0
  53. package/dist/commands/status.js +52 -0
  54. package/dist/index.d.ts +14 -0
  55. package/dist/index.d.ts.map +1 -0
  56. package/dist/index.js +13 -0
  57. package/dist/vendor/core/capabilities/analytics.d.ts +187 -0
  58. package/dist/vendor/core/capabilities/analytics.d.ts.map +1 -0
  59. package/dist/vendor/core/capabilities/analytics.js +214 -0
  60. package/dist/vendor/core/capabilities/assets.d.ts +48 -0
  61. package/dist/vendor/core/capabilities/assets.d.ts.map +1 -0
  62. package/dist/vendor/core/capabilities/assets.js +66 -0
  63. package/dist/vendor/core/capabilities/index.d.ts +8 -0
  64. package/dist/vendor/core/capabilities/index.d.ts.map +1 -0
  65. package/dist/vendor/core/capabilities/index.js +7 -0
  66. package/dist/vendor/core/capabilities/market.d.ts +90 -0
  67. package/dist/vendor/core/capabilities/market.d.ts.map +1 -0
  68. package/dist/vendor/core/capabilities/market.js +114 -0
  69. package/dist/vendor/core/capabilities/portfolios.d.ts +224 -0
  70. package/dist/vendor/core/capabilities/portfolios.d.ts.map +1 -0
  71. package/dist/vendor/core/capabilities/portfolios.js +244 -0
  72. package/dist/vendor/core/capabilities/registry.d.ts +1083 -0
  73. package/dist/vendor/core/capabilities/registry.d.ts.map +1 -0
  74. package/dist/vendor/core/capabilities/registry.js +14 -0
  75. package/dist/vendor/core/capabilities/shared.d.ts +3 -0
  76. package/dist/vendor/core/capabilities/shared.d.ts.map +1 -0
  77. package/dist/vendor/core/capabilities/shared.js +2 -0
  78. package/dist/vendor/core/capabilities/types.d.ts +75 -0
  79. package/dist/vendor/core/capabilities/types.d.ts.map +1 -0
  80. package/dist/vendor/core/capabilities/types.js +1 -0
  81. package/dist/vendor/core/errors.d.ts +22 -0
  82. package/dist/vendor/core/errors.d.ts.map +1 -0
  83. package/dist/vendor/core/errors.js +42 -0
  84. package/dist/vendor/core/http/client.d.ts +45 -0
  85. package/dist/vendor/core/http/client.d.ts.map +1 -0
  86. package/dist/vendor/core/http/client.js +170 -0
  87. package/dist/vendor/core/http/index.d.ts +2 -0
  88. package/dist/vendor/core/http/index.d.ts.map +1 -0
  89. package/dist/vendor/core/http/index.js +1 -0
  90. package/dist/vendor/core/index.d.ts +5 -0
  91. package/dist/vendor/core/index.d.ts.map +1 -0
  92. package/dist/vendor/core/index.js +4 -0
  93. package/dist/vendor/core/invoke.d.ts +17 -0
  94. package/dist/vendor/core/invoke.d.ts.map +1 -0
  95. package/dist/vendor/core/invoke.js +70 -0
  96. package/package.json +57 -0
  97. package/skills/quantbrasil/SKILL.md +29 -0
  98. package/skills/quantbrasil/references/cli.md +77 -0
  99. package/skills/quantbrasil/references/costs.md +30 -0
  100. package/skills/quantbrasil/references/errors.md +128 -0
  101. package/skills/quantbrasil/references/unsupported.md +20 -0
  102. package/skills/quantbrasil/references/workflows.md +99 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,13 @@
1
+ export * from "./cli/auth.js";
2
+ export * from "./cli/client.js";
3
+ export * from "./cli/errors.js";
4
+ export * from "./cli/index.js";
5
+ export * from "./commands/analytics.js";
6
+ export * from "./commands/assets.js";
7
+ export * from "./commands/auth.js";
8
+ export * from "./commands/capabilities.js";
9
+ export * from "./commands/init.js";
10
+ export * from "./commands/market.js";
11
+ export * from "./commands/portfolios.js";
12
+ export * from "./commands/skills.js";
13
+ export * from "./commands/status.js";
@@ -0,0 +1,187 @@
1
+ export declare const analyticsCapabilities: readonly [{
2
+ readonly id: "analytics.historical-return";
3
+ readonly kind: "read";
4
+ readonly visibility: readonly ["cli", "opencode"];
5
+ readonly description: "Calculate historical return for a saved portfolio or an ad-hoc weighted basket.";
6
+ readonly http: {
7
+ readonly method: "POST";
8
+ readonly path: "/api/desk/tools/portfolio/historical_return";
9
+ readonly inputMode: "json_body";
10
+ readonly schemas: {
11
+ readonly request: "PortfolioHistoricalReturnRequest";
12
+ readonly response: "HistoricalReturnResponse";
13
+ };
14
+ };
15
+ readonly cli: {
16
+ readonly group: "analytics";
17
+ readonly command: "historical-return";
18
+ readonly summary: "Calculate historical return for a saved portfolio or repeated --asset inputs.";
19
+ readonly positional: readonly [];
20
+ readonly options: readonly [{
21
+ readonly kind: "option";
22
+ readonly flag: "--portfolio";
23
+ readonly name: "portfolio_id";
24
+ readonly type: "integer";
25
+ readonly required: false;
26
+ readonly placeholder: "ID";
27
+ readonly exclusiveGroup: "source";
28
+ readonly description: "Saved portfolio id. Use exactly one source: --portfolio or repeated --asset.";
29
+ }, {
30
+ readonly kind: "option";
31
+ readonly flag: "--asset";
32
+ readonly name: "assets";
33
+ readonly type: "string_array";
34
+ readonly required: false;
35
+ readonly placeholder: "TICKER[:PESO]";
36
+ readonly multiple: true;
37
+ readonly collectionFormat: "repeatable";
38
+ readonly exclusiveGroup: "source";
39
+ readonly description: "Repeatable ad-hoc asset input using TICKER[:WEIGHT_PCT], for example PRIO3:50.";
40
+ }, {
41
+ readonly kind: "option";
42
+ readonly flag: "--from";
43
+ readonly name: "start_date";
44
+ readonly type: "string";
45
+ readonly required: true;
46
+ readonly placeholder: "AAAA-MM-DD";
47
+ readonly description: "Inclusive start date in ISO format.";
48
+ }, {
49
+ readonly kind: "option";
50
+ readonly flag: "--to";
51
+ readonly name: "end_date";
52
+ readonly type: "string";
53
+ readonly required: true;
54
+ readonly placeholder: "AAAA-MM-DD";
55
+ readonly description: "Inclusive end date in ISO format.";
56
+ }];
57
+ readonly examples: readonly ["quantbrasil analytics historical-return --portfolio 123 --from 2024-01-01 --to 2025-01-01", "quantbrasil analytics historical-return --asset PRIO3:50 --asset VALE3:50 --from 2021-01-01 --to 2025-01-01"];
58
+ };
59
+ readonly tool: {
60
+ readonly name: "qb_historical_return";
61
+ readonly title: "Calculate historical return";
62
+ };
63
+ readonly outputModes: readonly ["json", "human"];
64
+ }, {
65
+ readonly id: "analytics.beta";
66
+ readonly kind: "read";
67
+ readonly visibility: readonly ["cli", "opencode"];
68
+ readonly description: "Calculate portfolio beta against IBOV for a saved portfolio or an ad-hoc basket.";
69
+ readonly http: {
70
+ readonly method: "POST";
71
+ readonly path: "/api/desk/tools/portfolio/beta";
72
+ readonly inputMode: "json_body";
73
+ readonly schemas: {
74
+ readonly request: "PortfolioBetaRequest";
75
+ readonly response: "PortfolioBetaResponse";
76
+ };
77
+ };
78
+ readonly cli: {
79
+ readonly group: "analytics";
80
+ readonly command: "beta";
81
+ readonly summary: "Calculate portfolio beta against IBOV.";
82
+ readonly positional: readonly [];
83
+ readonly options: readonly [{
84
+ readonly kind: "option";
85
+ readonly flag: "--portfolio";
86
+ readonly name: "portfolio_id";
87
+ readonly type: "integer";
88
+ readonly required: false;
89
+ readonly placeholder: "ID";
90
+ readonly exclusiveGroup: "source";
91
+ readonly description: "Saved portfolio id. Use exactly one source: --portfolio or repeated --asset.";
92
+ }, {
93
+ readonly kind: "option";
94
+ readonly flag: "--asset";
95
+ readonly name: "assets";
96
+ readonly type: "string_array";
97
+ readonly required: false;
98
+ readonly placeholder: "TICKER[:PESO]";
99
+ readonly multiple: true;
100
+ readonly collectionFormat: "repeatable";
101
+ readonly exclusiveGroup: "source";
102
+ readonly description: "Repeatable ad-hoc asset input using TICKER[:WEIGHT_PCT], for example PETR4:120 or WINFUT:-20.";
103
+ }, {
104
+ readonly kind: "option";
105
+ readonly flag: "--years";
106
+ readonly name: "years";
107
+ readonly type: "enum";
108
+ readonly required: false;
109
+ readonly placeholder: "ANOS";
110
+ readonly defaultValue: 1;
111
+ readonly enumValues: readonly ["1", "3", "5"];
112
+ readonly description: "Historical lookback window in years. Accepted values: 1, 3, or 5.";
113
+ }];
114
+ readonly examples: readonly ["quantbrasil analytics beta --portfolio 123 --years 3", "quantbrasil analytics beta --asset PRIO3:120 --asset WINFUT:-20 --years 1"];
115
+ };
116
+ readonly tool: {
117
+ readonly name: "qb_portfolio_beta";
118
+ readonly title: "Calculate portfolio beta";
119
+ };
120
+ readonly outputModes: readonly ["json", "human"];
121
+ }, {
122
+ readonly id: "analytics.var";
123
+ readonly kind: "read";
124
+ readonly visibility: readonly ["cli", "opencode"];
125
+ readonly description: "Calculate one-day Value-at-Risk for a saved portfolio or an ad-hoc basket.";
126
+ readonly http: {
127
+ readonly method: "POST";
128
+ readonly path: "/api/desk/tools/portfolio/var";
129
+ readonly inputMode: "json_body";
130
+ readonly schemas: {
131
+ readonly request: "PortfolioVaRRequest";
132
+ readonly response: "PortfolioVaRResponse";
133
+ };
134
+ };
135
+ readonly cli: {
136
+ readonly group: "analytics";
137
+ readonly command: "var";
138
+ readonly summary: "Calculate one-day Value-at-Risk for a portfolio or basket.";
139
+ readonly positional: readonly [];
140
+ readonly options: readonly [{
141
+ readonly kind: "option";
142
+ readonly flag: "--portfolio";
143
+ readonly name: "portfolio_id";
144
+ readonly type: "integer";
145
+ readonly required: false;
146
+ readonly placeholder: "ID";
147
+ readonly exclusiveGroup: "source";
148
+ readonly description: "Saved portfolio id. Use exactly one source: --portfolio or repeated --asset.";
149
+ }, {
150
+ readonly kind: "option";
151
+ readonly flag: "--asset";
152
+ readonly name: "assets";
153
+ readonly type: "string_array";
154
+ readonly required: false;
155
+ readonly placeholder: "TICKER[:PESO]";
156
+ readonly multiple: true;
157
+ readonly collectionFormat: "repeatable";
158
+ readonly exclusiveGroup: "source";
159
+ readonly description: "Repeatable ad-hoc asset input using TICKER[:WEIGHT_PCT], for example PRIO3:120 or WINFUT:-20.";
160
+ }, {
161
+ readonly kind: "option";
162
+ readonly flag: "--years";
163
+ readonly name: "years";
164
+ readonly type: "integer";
165
+ readonly required: false;
166
+ readonly placeholder: "ANOS";
167
+ readonly defaultValue: 1;
168
+ readonly description: "Historical lookback window in years. The VaR horizon remains one day.";
169
+ }, {
170
+ readonly kind: "option";
171
+ readonly flag: "--confidence";
172
+ readonly name: "confidence_pct";
173
+ readonly type: "number";
174
+ readonly required: false;
175
+ readonly placeholder: "PERCENTUAL";
176
+ readonly defaultValue: 95;
177
+ readonly description: "Confidence level in percent, for example 95 or 99.";
178
+ }];
179
+ readonly examples: readonly ["quantbrasil analytics var --portfolio 123 --years 1 --confidence 95", "quantbrasil analytics var --asset PRIO3:50 --asset VALE3:50 --years 3 --confidence 99"];
180
+ };
181
+ readonly tool: {
182
+ readonly name: "qb_portfolio_var";
183
+ readonly title: "Calculate portfolio VaR";
184
+ };
185
+ readonly outputModes: readonly ["json", "human"];
186
+ }];
187
+ //# sourceMappingURL=analytics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../src/capabilities/analytics.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgOkB,CAAC"}
@@ -0,0 +1,214 @@
1
+ import { publicRuntimeVisibility, standardOutputModes } from "./shared.js";
2
+ export const analyticsCapabilities = [
3
+ {
4
+ id: "analytics.historical-return",
5
+ kind: "read",
6
+ visibility: publicRuntimeVisibility,
7
+ description: "Calculate historical return for a saved portfolio or an ad-hoc weighted basket.",
8
+ http: {
9
+ method: "POST",
10
+ path: "/api/desk/tools/portfolio/historical_return",
11
+ inputMode: "json_body",
12
+ schemas: {
13
+ request: "PortfolioHistoricalReturnRequest",
14
+ response: "HistoricalReturnResponse",
15
+ },
16
+ },
17
+ cli: {
18
+ group: "analytics",
19
+ command: "historical-return",
20
+ summary: "Calculate historical return for a saved portfolio or repeated --asset inputs.",
21
+ positional: [],
22
+ options: [
23
+ {
24
+ kind: "option",
25
+ flag: "--portfolio",
26
+ name: "portfolio_id",
27
+ type: "integer",
28
+ required: false,
29
+ placeholder: "ID",
30
+ exclusiveGroup: "source",
31
+ description: "Saved portfolio id. Use exactly one source: --portfolio or repeated --asset.",
32
+ },
33
+ {
34
+ kind: "option",
35
+ flag: "--asset",
36
+ name: "assets",
37
+ type: "string_array",
38
+ required: false,
39
+ placeholder: "TICKER[:PESO]",
40
+ multiple: true,
41
+ collectionFormat: "repeatable",
42
+ exclusiveGroup: "source",
43
+ description: "Repeatable ad-hoc asset input using TICKER[:WEIGHT_PCT], for example PRIO3:50.",
44
+ },
45
+ {
46
+ kind: "option",
47
+ flag: "--from",
48
+ name: "start_date",
49
+ type: "string",
50
+ required: true,
51
+ placeholder: "AAAA-MM-DD",
52
+ description: "Inclusive start date in ISO format.",
53
+ },
54
+ {
55
+ kind: "option",
56
+ flag: "--to",
57
+ name: "end_date",
58
+ type: "string",
59
+ required: true,
60
+ placeholder: "AAAA-MM-DD",
61
+ description: "Inclusive end date in ISO format.",
62
+ },
63
+ ],
64
+ examples: [
65
+ "quantbrasil analytics historical-return --portfolio 123 --from 2024-01-01 --to 2025-01-01",
66
+ "quantbrasil analytics historical-return --asset PRIO3:50 --asset VALE3:50 --from 2021-01-01 --to 2025-01-01",
67
+ ],
68
+ },
69
+ tool: {
70
+ name: "qb_historical_return",
71
+ title: "Calculate historical return",
72
+ },
73
+ outputModes: standardOutputModes,
74
+ },
75
+ {
76
+ id: "analytics.beta",
77
+ kind: "read",
78
+ visibility: publicRuntimeVisibility,
79
+ description: "Calculate portfolio beta against IBOV for a saved portfolio or an ad-hoc basket.",
80
+ http: {
81
+ method: "POST",
82
+ path: "/api/desk/tools/portfolio/beta",
83
+ inputMode: "json_body",
84
+ schemas: {
85
+ request: "PortfolioBetaRequest",
86
+ response: "PortfolioBetaResponse",
87
+ },
88
+ },
89
+ cli: {
90
+ group: "analytics",
91
+ command: "beta",
92
+ summary: "Calculate portfolio beta against IBOV.",
93
+ positional: [],
94
+ options: [
95
+ {
96
+ kind: "option",
97
+ flag: "--portfolio",
98
+ name: "portfolio_id",
99
+ type: "integer",
100
+ required: false,
101
+ placeholder: "ID",
102
+ exclusiveGroup: "source",
103
+ description: "Saved portfolio id. Use exactly one source: --portfolio or repeated --asset.",
104
+ },
105
+ {
106
+ kind: "option",
107
+ flag: "--asset",
108
+ name: "assets",
109
+ type: "string_array",
110
+ required: false,
111
+ placeholder: "TICKER[:PESO]",
112
+ multiple: true,
113
+ collectionFormat: "repeatable",
114
+ exclusiveGroup: "source",
115
+ description: "Repeatable ad-hoc asset input using TICKER[:WEIGHT_PCT], for example PETR4:120 or WINFUT:-20.",
116
+ },
117
+ {
118
+ kind: "option",
119
+ flag: "--years",
120
+ name: "years",
121
+ type: "enum",
122
+ required: false,
123
+ placeholder: "ANOS",
124
+ defaultValue: 1,
125
+ enumValues: ["1", "3", "5"],
126
+ description: "Historical lookback window in years. Accepted values: 1, 3, or 5.",
127
+ },
128
+ ],
129
+ examples: [
130
+ "quantbrasil analytics beta --portfolio 123 --years 3",
131
+ "quantbrasil analytics beta --asset PRIO3:120 --asset WINFUT:-20 --years 1",
132
+ ],
133
+ },
134
+ tool: {
135
+ name: "qb_portfolio_beta",
136
+ title: "Calculate portfolio beta",
137
+ },
138
+ outputModes: standardOutputModes,
139
+ },
140
+ {
141
+ id: "analytics.var",
142
+ kind: "read",
143
+ visibility: publicRuntimeVisibility,
144
+ description: "Calculate one-day Value-at-Risk for a saved portfolio or an ad-hoc basket.",
145
+ http: {
146
+ method: "POST",
147
+ path: "/api/desk/tools/portfolio/var",
148
+ inputMode: "json_body",
149
+ schemas: {
150
+ request: "PortfolioVaRRequest",
151
+ response: "PortfolioVaRResponse",
152
+ },
153
+ },
154
+ cli: {
155
+ group: "analytics",
156
+ command: "var",
157
+ summary: "Calculate one-day Value-at-Risk for a portfolio or basket.",
158
+ positional: [],
159
+ options: [
160
+ {
161
+ kind: "option",
162
+ flag: "--portfolio",
163
+ name: "portfolio_id",
164
+ type: "integer",
165
+ required: false,
166
+ placeholder: "ID",
167
+ exclusiveGroup: "source",
168
+ description: "Saved portfolio id. Use exactly one source: --portfolio or repeated --asset.",
169
+ },
170
+ {
171
+ kind: "option",
172
+ flag: "--asset",
173
+ name: "assets",
174
+ type: "string_array",
175
+ required: false,
176
+ placeholder: "TICKER[:PESO]",
177
+ multiple: true,
178
+ collectionFormat: "repeatable",
179
+ exclusiveGroup: "source",
180
+ description: "Repeatable ad-hoc asset input using TICKER[:WEIGHT_PCT], for example PRIO3:120 or WINFUT:-20.",
181
+ },
182
+ {
183
+ kind: "option",
184
+ flag: "--years",
185
+ name: "years",
186
+ type: "integer",
187
+ required: false,
188
+ placeholder: "ANOS",
189
+ defaultValue: 1,
190
+ description: "Historical lookback window in years. The VaR horizon remains one day.",
191
+ },
192
+ {
193
+ kind: "option",
194
+ flag: "--confidence",
195
+ name: "confidence_pct",
196
+ type: "number",
197
+ required: false,
198
+ placeholder: "PERCENTUAL",
199
+ defaultValue: 95,
200
+ description: "Confidence level in percent, for example 95 or 99.",
201
+ },
202
+ ],
203
+ examples: [
204
+ "quantbrasil analytics var --portfolio 123 --years 1 --confidence 95",
205
+ "quantbrasil analytics var --asset PRIO3:50 --asset VALE3:50 --years 3 --confidence 99",
206
+ ],
207
+ },
208
+ tool: {
209
+ name: "qb_portfolio_var",
210
+ title: "Calculate portfolio VaR",
211
+ },
212
+ outputModes: standardOutputModes,
213
+ },
214
+ ];
@@ -0,0 +1,48 @@
1
+ export declare const assetOverviewSections: readonly ["price", "performance", "momentum", "technicals", "risk", "fundamentals", "rankings"];
2
+ export declare const assetCapabilities: readonly [{
3
+ readonly id: "assets.overview";
4
+ readonly kind: "read";
5
+ readonly visibility: readonly ["cli", "opencode"];
6
+ readonly description: "Return a selective asset overview using only the requested sections.";
7
+ readonly http: {
8
+ readonly method: "POST";
9
+ readonly path: "/api/desk/tools/asset/overview";
10
+ readonly inputMode: "json_body";
11
+ readonly schemas: {
12
+ readonly request: "AssetOverviewRequest";
13
+ readonly response: "AssetOverviewResponse";
14
+ };
15
+ };
16
+ readonly cli: {
17
+ readonly group: "assets";
18
+ readonly command: "overview";
19
+ readonly summary: "Get a section-based overview for one asset.";
20
+ readonly positional: readonly [{
21
+ readonly kind: "positional";
22
+ readonly name: "ticker";
23
+ readonly type: "string";
24
+ readonly required: true;
25
+ readonly placeholder: "TICKER";
26
+ readonly description: "Ticker symbol, for example PETR4 or VALE3.";
27
+ }];
28
+ readonly options: readonly [{
29
+ readonly kind: "option";
30
+ readonly flag: "--sections";
31
+ readonly name: "sections";
32
+ readonly type: "enum_array";
33
+ readonly required: true;
34
+ readonly placeholder: "SEÇÕES";
35
+ readonly enumValues: readonly ["price", "performance", "momentum", "technicals", "risk", "fundamentals", "rankings"];
36
+ readonly multiple: true;
37
+ readonly collectionFormat: "comma_separated";
38
+ readonly description: "Comma-separated section list. Only request the sections needed for the question.";
39
+ }];
40
+ readonly examples: readonly ["quantbrasil assets overview PETR4 --sections price,performance", "quantbrasil assets overview PETR4 --sections price,fundamentals", "quantbrasil assets overview PETR4 --sections price,technicals"];
41
+ };
42
+ readonly tool: {
43
+ readonly name: "qb_asset_overview";
44
+ readonly title: "Get asset overview";
45
+ };
46
+ readonly outputModes: readonly ["json", "human"];
47
+ }];
48
+ //# sourceMappingURL=assets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../src/capabilities/assets.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,qBAAqB,iGAQxB,CAAC;AAEX,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyDsB,CAAC"}
@@ -0,0 +1,66 @@
1
+ import { publicRuntimeVisibility, standardOutputModes } from "./shared.js";
2
+ export const assetOverviewSections = [
3
+ "price",
4
+ "performance",
5
+ "momentum",
6
+ "technicals",
7
+ "risk",
8
+ "fundamentals",
9
+ "rankings",
10
+ ];
11
+ export const assetCapabilities = [
12
+ {
13
+ id: "assets.overview",
14
+ kind: "read",
15
+ visibility: publicRuntimeVisibility,
16
+ description: "Return a selective asset overview using only the requested sections.",
17
+ http: {
18
+ method: "POST",
19
+ path: "/api/desk/tools/asset/overview",
20
+ inputMode: "json_body",
21
+ schemas: {
22
+ request: "AssetOverviewRequest",
23
+ response: "AssetOverviewResponse",
24
+ },
25
+ },
26
+ cli: {
27
+ group: "assets",
28
+ command: "overview",
29
+ summary: "Get a section-based overview for one asset.",
30
+ positional: [
31
+ {
32
+ kind: "positional",
33
+ name: "ticker",
34
+ type: "string",
35
+ required: true,
36
+ placeholder: "TICKER",
37
+ description: "Ticker symbol, for example PETR4 or VALE3.",
38
+ },
39
+ ],
40
+ options: [
41
+ {
42
+ kind: "option",
43
+ flag: "--sections",
44
+ name: "sections",
45
+ type: "enum_array",
46
+ required: true,
47
+ placeholder: "SEÇÕES",
48
+ enumValues: assetOverviewSections,
49
+ multiple: true,
50
+ collectionFormat: "comma_separated",
51
+ description: "Comma-separated section list. Only request the sections needed for the question.",
52
+ },
53
+ ],
54
+ examples: [
55
+ "quantbrasil assets overview PETR4 --sections price,performance",
56
+ "quantbrasil assets overview PETR4 --sections price,fundamentals",
57
+ "quantbrasil assets overview PETR4 --sections price,technicals",
58
+ ],
59
+ },
60
+ tool: {
61
+ name: "qb_asset_overview",
62
+ title: "Get asset overview",
63
+ },
64
+ outputModes: standardOutputModes,
65
+ },
66
+ ];
@@ -0,0 +1,8 @@
1
+ export * from "./types.js";
2
+ export * from "./shared.js";
3
+ export * from "./market.js";
4
+ export * from "./assets.js";
5
+ export * from "./portfolios.js";
6
+ export * from "./analytics.js";
7
+ export * from "./registry.js";
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/capabilities/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC"}
@@ -0,0 +1,7 @@
1
+ export * from "./types.js";
2
+ export * from "./shared.js";
3
+ export * from "./market.js";
4
+ export * from "./assets.js";
5
+ export * from "./portfolios.js";
6
+ export * from "./analytics.js";
7
+ export * from "./registry.js";
@@ -0,0 +1,90 @@
1
+ export declare const monitoredAssetTypes: readonly ["B3", "ETF", "ETF-US", "BDR", "Futuro", "Crypto", "S&P500"];
2
+ export declare const marketCapabilities: readonly [{
3
+ readonly id: "market.assets";
4
+ readonly kind: "read";
5
+ readonly visibility: readonly ["cli", "opencode"];
6
+ readonly description: "List the monitored QuantBrasil asset universe, optionally filtered by tracked asset type.";
7
+ readonly http: {
8
+ readonly method: "GET";
9
+ readonly path: "/api/desk/tools/market/assets";
10
+ readonly inputMode: "query";
11
+ readonly schemas: {
12
+ readonly request: null;
13
+ readonly response: "MonitoredAssetsResponse";
14
+ };
15
+ };
16
+ readonly cli: {
17
+ readonly group: "market";
18
+ readonly command: "assets";
19
+ readonly summary: "List monitored asset tickers.";
20
+ readonly positional: readonly [];
21
+ readonly options: readonly [{
22
+ readonly kind: "option";
23
+ readonly flag: "--type";
24
+ readonly name: "type";
25
+ readonly type: "enum";
26
+ readonly required: false;
27
+ readonly placeholder: "TIPO";
28
+ readonly enumValues: readonly ["B3", "ETF", "ETF-US", "BDR", "Futuro", "Crypto", "S&P500"];
29
+ readonly description: "Filter by the exact monitored asset type.";
30
+ }];
31
+ readonly examples: readonly ["quantbrasil market assets", "quantbrasil market assets --type B3"];
32
+ };
33
+ readonly tool: {
34
+ readonly name: "qb_market_assets";
35
+ readonly title: "List monitored assets";
36
+ };
37
+ readonly outputModes: readonly ["json", "human"];
38
+ }, {
39
+ readonly id: "market.price";
40
+ readonly kind: "read";
41
+ readonly visibility: readonly ["cli", "opencode"];
42
+ readonly description: "Return the latest or date-specific price snapshot for a single ticker.";
43
+ readonly http: {
44
+ readonly method: "POST";
45
+ readonly path: "/api/desk/tools/market/price";
46
+ readonly inputMode: "json_body";
47
+ readonly schemas: {
48
+ readonly request: "MarketPriceRequest";
49
+ readonly response: "MarketPriceResponse";
50
+ };
51
+ };
52
+ readonly cli: {
53
+ readonly group: "market";
54
+ readonly command: "price";
55
+ readonly summary: "Get the current or historical price snapshot for one ticker.";
56
+ readonly positional: readonly [{
57
+ readonly kind: "positional";
58
+ readonly name: "ticker";
59
+ readonly type: "string";
60
+ readonly required: true;
61
+ readonly placeholder: "TICKER";
62
+ readonly description: "Ticker symbol, for example PETR4 or VALE3.";
63
+ }];
64
+ readonly options: readonly [{
65
+ readonly kind: "option";
66
+ readonly flag: "--date";
67
+ readonly name: "date";
68
+ readonly type: "string";
69
+ readonly required: false;
70
+ readonly placeholder: "AAAA-MM-DD";
71
+ readonly description: "Reference date in ISO format. When omitted, returns the latest available price.";
72
+ }, {
73
+ readonly kind: "option";
74
+ readonly flag: "--timeframe";
75
+ readonly name: "timeframe";
76
+ readonly type: "string";
77
+ readonly required: false;
78
+ readonly placeholder: "TIMEFRAME";
79
+ readonly defaultValue: "D1";
80
+ readonly description: "Timeframe identifier. Defaults to D1.";
81
+ }];
82
+ readonly examples: readonly ["quantbrasil market price PETR4", "quantbrasil market price PETR4 --date 2026-04-10 --timeframe D1"];
83
+ };
84
+ readonly tool: {
85
+ readonly name: "qb_market_price";
86
+ readonly title: "Get market price";
87
+ };
88
+ readonly outputModes: readonly ["json", "human"];
89
+ }];
90
+ //# sourceMappingURL=market.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"market.d.ts","sourceRoot":"","sources":["../../src/capabilities/market.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,mBAAmB,uEAQtB,CAAC;AAEX,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0GqB,CAAC"}