@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.
- package/README.md +272 -0
- package/bin/quantbrasil.js +4 -0
- package/dist/cli/auth.d.ts +20 -0
- package/dist/cli/auth.d.ts.map +1 -0
- package/dist/cli/auth.js +76 -0
- package/dist/cli/client.d.ts +17 -0
- package/dist/cli/client.d.ts.map +1 -0
- package/dist/cli/client.js +112 -0
- package/dist/cli/config.d.ts +33 -0
- package/dist/cli/config.d.ts.map +1 -0
- package/dist/cli/config.js +148 -0
- package/dist/cli/errors.d.ts +40 -0
- package/dist/cli/errors.d.ts.map +1 -0
- package/dist/cli/errors.js +122 -0
- package/dist/cli/index.d.ts +30 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +112 -0
- package/dist/cli/prompt.d.ts +2 -0
- package/dist/cli/prompt.d.ts.map +1 -0
- package/dist/cli/prompt.js +40 -0
- package/dist/cli/skills.d.ts +26 -0
- package/dist/cli/skills.d.ts.map +1 -0
- package/dist/cli/skills.js +94 -0
- package/dist/cli/terminal.d.ts +18 -0
- package/dist/cli/terminal.d.ts.map +1 -0
- package/dist/cli/terminal.js +43 -0
- package/dist/commands/analytics.d.ts +131 -0
- package/dist/commands/analytics.d.ts.map +1 -0
- package/dist/commands/analytics.js +291 -0
- package/dist/commands/assets.d.ts +69 -0
- package/dist/commands/assets.d.ts.map +1 -0
- package/dist/commands/assets.js +350 -0
- package/dist/commands/auth.d.ts +17 -0
- package/dist/commands/auth.d.ts.map +1 -0
- package/dist/commands/auth.js +48 -0
- package/dist/commands/capabilities.d.ts +25 -0
- package/dist/commands/capabilities.d.ts.map +1 -0
- package/dist/commands/capabilities.js +61 -0
- package/dist/commands/init.d.ts +17 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +89 -0
- package/dist/commands/market.d.ts +45 -0
- package/dist/commands/market.d.ts.map +1 -0
- package/dist/commands/market.js +162 -0
- package/dist/commands/portfolios.d.ts +60 -0
- package/dist/commands/portfolios.d.ts.map +1 -0
- package/dist/commands/portfolios.js +298 -0
- package/dist/commands/skills.d.ts +17 -0
- package/dist/commands/skills.d.ts.map +1 -0
- package/dist/commands/skills.js +38 -0
- package/dist/commands/status.d.ts +15 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +52 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/dist/vendor/core/capabilities/analytics.d.ts +187 -0
- package/dist/vendor/core/capabilities/analytics.d.ts.map +1 -0
- package/dist/vendor/core/capabilities/analytics.js +214 -0
- package/dist/vendor/core/capabilities/assets.d.ts +48 -0
- package/dist/vendor/core/capabilities/assets.d.ts.map +1 -0
- package/dist/vendor/core/capabilities/assets.js +66 -0
- package/dist/vendor/core/capabilities/index.d.ts +8 -0
- package/dist/vendor/core/capabilities/index.d.ts.map +1 -0
- package/dist/vendor/core/capabilities/index.js +7 -0
- package/dist/vendor/core/capabilities/market.d.ts +90 -0
- package/dist/vendor/core/capabilities/market.d.ts.map +1 -0
- package/dist/vendor/core/capabilities/market.js +114 -0
- package/dist/vendor/core/capabilities/portfolios.d.ts +224 -0
- package/dist/vendor/core/capabilities/portfolios.d.ts.map +1 -0
- package/dist/vendor/core/capabilities/portfolios.js +244 -0
- package/dist/vendor/core/capabilities/registry.d.ts +1083 -0
- package/dist/vendor/core/capabilities/registry.d.ts.map +1 -0
- package/dist/vendor/core/capabilities/registry.js +14 -0
- package/dist/vendor/core/capabilities/shared.d.ts +3 -0
- package/dist/vendor/core/capabilities/shared.d.ts.map +1 -0
- package/dist/vendor/core/capabilities/shared.js +2 -0
- package/dist/vendor/core/capabilities/types.d.ts +75 -0
- package/dist/vendor/core/capabilities/types.d.ts.map +1 -0
- package/dist/vendor/core/capabilities/types.js +1 -0
- package/dist/vendor/core/errors.d.ts +22 -0
- package/dist/vendor/core/errors.d.ts.map +1 -0
- package/dist/vendor/core/errors.js +42 -0
- package/dist/vendor/core/http/client.d.ts +45 -0
- package/dist/vendor/core/http/client.d.ts.map +1 -0
- package/dist/vendor/core/http/client.js +170 -0
- package/dist/vendor/core/http/index.d.ts +2 -0
- package/dist/vendor/core/http/index.d.ts.map +1 -0
- package/dist/vendor/core/http/index.js +1 -0
- package/dist/vendor/core/index.d.ts +5 -0
- package/dist/vendor/core/index.d.ts.map +1 -0
- package/dist/vendor/core/index.js +4 -0
- package/dist/vendor/core/invoke.d.ts +17 -0
- package/dist/vendor/core/invoke.d.ts.map +1 -0
- package/dist/vendor/core/invoke.js +70 -0
- package/package.json +57 -0
- package/skills/quantbrasil/SKILL.md +29 -0
- package/skills/quantbrasil/references/cli.md +77 -0
- package/skills/quantbrasil/references/costs.md +30 -0
- package/skills/quantbrasil/references/errors.md +128 -0
- package/skills/quantbrasil/references/unsupported.md +20 -0
- package/skills/quantbrasil/references/workflows.md +99 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { publicRuntimeVisibility, standardOutputModes } from "./shared.js";
|
|
2
|
+
export const monitoredAssetTypes = [
|
|
3
|
+
"B3",
|
|
4
|
+
"ETF",
|
|
5
|
+
"ETF-US",
|
|
6
|
+
"BDR",
|
|
7
|
+
"Futuro",
|
|
8
|
+
"Crypto",
|
|
9
|
+
"S&P500",
|
|
10
|
+
];
|
|
11
|
+
export const marketCapabilities = [
|
|
12
|
+
{
|
|
13
|
+
id: "market.assets",
|
|
14
|
+
kind: "read",
|
|
15
|
+
visibility: publicRuntimeVisibility,
|
|
16
|
+
description: "List the monitored QuantBrasil asset universe, optionally filtered by tracked asset type.",
|
|
17
|
+
http: {
|
|
18
|
+
method: "GET",
|
|
19
|
+
path: "/api/desk/tools/market/assets",
|
|
20
|
+
inputMode: "query",
|
|
21
|
+
schemas: {
|
|
22
|
+
request: null,
|
|
23
|
+
response: "MonitoredAssetsResponse",
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
cli: {
|
|
27
|
+
group: "market",
|
|
28
|
+
command: "assets",
|
|
29
|
+
summary: "List monitored asset tickers.",
|
|
30
|
+
positional: [],
|
|
31
|
+
options: [
|
|
32
|
+
{
|
|
33
|
+
kind: "option",
|
|
34
|
+
flag: "--type",
|
|
35
|
+
name: "type",
|
|
36
|
+
type: "enum",
|
|
37
|
+
required: false,
|
|
38
|
+
placeholder: "TIPO",
|
|
39
|
+
enumValues: monitoredAssetTypes,
|
|
40
|
+
description: "Filter by the exact monitored asset type.",
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
examples: [
|
|
44
|
+
"quantbrasil market assets",
|
|
45
|
+
"quantbrasil market assets --type B3",
|
|
46
|
+
],
|
|
47
|
+
},
|
|
48
|
+
tool: {
|
|
49
|
+
name: "qb_market_assets",
|
|
50
|
+
title: "List monitored assets",
|
|
51
|
+
},
|
|
52
|
+
outputModes: standardOutputModes,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
id: "market.price",
|
|
56
|
+
kind: "read",
|
|
57
|
+
visibility: publicRuntimeVisibility,
|
|
58
|
+
description: "Return the latest or date-specific price snapshot for a single ticker.",
|
|
59
|
+
http: {
|
|
60
|
+
method: "POST",
|
|
61
|
+
path: "/api/desk/tools/market/price",
|
|
62
|
+
inputMode: "json_body",
|
|
63
|
+
schemas: {
|
|
64
|
+
request: "MarketPriceRequest",
|
|
65
|
+
response: "MarketPriceResponse",
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
cli: {
|
|
69
|
+
group: "market",
|
|
70
|
+
command: "price",
|
|
71
|
+
summary: "Get the current or historical price snapshot for one ticker.",
|
|
72
|
+
positional: [
|
|
73
|
+
{
|
|
74
|
+
kind: "positional",
|
|
75
|
+
name: "ticker",
|
|
76
|
+
type: "string",
|
|
77
|
+
required: true,
|
|
78
|
+
placeholder: "TICKER",
|
|
79
|
+
description: "Ticker symbol, for example PETR4 or VALE3.",
|
|
80
|
+
},
|
|
81
|
+
],
|
|
82
|
+
options: [
|
|
83
|
+
{
|
|
84
|
+
kind: "option",
|
|
85
|
+
flag: "--date",
|
|
86
|
+
name: "date",
|
|
87
|
+
type: "string",
|
|
88
|
+
required: false,
|
|
89
|
+
placeholder: "AAAA-MM-DD",
|
|
90
|
+
description: "Reference date in ISO format. When omitted, returns the latest available price.",
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
kind: "option",
|
|
94
|
+
flag: "--timeframe",
|
|
95
|
+
name: "timeframe",
|
|
96
|
+
type: "string",
|
|
97
|
+
required: false,
|
|
98
|
+
placeholder: "TIMEFRAME",
|
|
99
|
+
defaultValue: "D1",
|
|
100
|
+
description: "Timeframe identifier. Defaults to D1.",
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
examples: [
|
|
104
|
+
"quantbrasil market price PETR4",
|
|
105
|
+
"quantbrasil market price PETR4 --date 2026-04-10 --timeframe D1",
|
|
106
|
+
],
|
|
107
|
+
},
|
|
108
|
+
tool: {
|
|
109
|
+
name: "qb_market_price",
|
|
110
|
+
title: "Get market price",
|
|
111
|
+
},
|
|
112
|
+
outputModes: standardOutputModes,
|
|
113
|
+
},
|
|
114
|
+
];
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
export declare const portfolioCapabilities: readonly [{
|
|
2
|
+
readonly id: "portfolios.list";
|
|
3
|
+
readonly kind: "read";
|
|
4
|
+
readonly visibility: readonly ["cli", "opencode"];
|
|
5
|
+
readonly description: "List every portfolio owned by the authenticated user.";
|
|
6
|
+
readonly http: {
|
|
7
|
+
readonly method: "GET";
|
|
8
|
+
readonly path: "/api/desk/tools/portfolio/list";
|
|
9
|
+
readonly inputMode: "none";
|
|
10
|
+
readonly schemas: {
|
|
11
|
+
readonly request: null;
|
|
12
|
+
readonly response: "PortfolioListResponse";
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
readonly cli: {
|
|
16
|
+
readonly group: "portfolios";
|
|
17
|
+
readonly command: "list";
|
|
18
|
+
readonly summary: "List the user portfolios available in QuantBrasil.";
|
|
19
|
+
readonly positional: readonly [];
|
|
20
|
+
readonly options: readonly [];
|
|
21
|
+
readonly examples: readonly ["quantbrasil portfolios list"];
|
|
22
|
+
};
|
|
23
|
+
readonly tool: {
|
|
24
|
+
readonly name: "qb_portfolio_list";
|
|
25
|
+
readonly title: "List portfolios";
|
|
26
|
+
};
|
|
27
|
+
readonly outputModes: readonly ["json", "human"];
|
|
28
|
+
}, {
|
|
29
|
+
readonly id: "portfolios.get";
|
|
30
|
+
readonly kind: "read";
|
|
31
|
+
readonly visibility: readonly ["cli", "opencode"];
|
|
32
|
+
readonly description: "Return one saved portfolio by id, scoped to the acting user.";
|
|
33
|
+
readonly http: {
|
|
34
|
+
readonly method: "POST";
|
|
35
|
+
readonly path: "/api/desk/tools/portfolio/get";
|
|
36
|
+
readonly inputMode: "json_body";
|
|
37
|
+
readonly schemas: {
|
|
38
|
+
readonly request: "PortfolioGetRequest";
|
|
39
|
+
readonly response: "PortfolioGetResponse";
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
readonly cli: {
|
|
43
|
+
readonly group: "portfolios";
|
|
44
|
+
readonly command: "get";
|
|
45
|
+
readonly summary: "Get a saved portfolio by id.";
|
|
46
|
+
readonly positional: readonly [{
|
|
47
|
+
readonly kind: "positional";
|
|
48
|
+
readonly name: "portfolio_id";
|
|
49
|
+
readonly type: "integer";
|
|
50
|
+
readonly required: true;
|
|
51
|
+
readonly placeholder: "ID";
|
|
52
|
+
readonly description: "Saved portfolio identifier.";
|
|
53
|
+
}];
|
|
54
|
+
readonly options: readonly [];
|
|
55
|
+
readonly examples: readonly ["quantbrasil portfolios get 123"];
|
|
56
|
+
};
|
|
57
|
+
readonly tool: {
|
|
58
|
+
readonly name: "qb_portfolio_get";
|
|
59
|
+
readonly title: "Get portfolio";
|
|
60
|
+
};
|
|
61
|
+
readonly outputModes: readonly ["json", "human"];
|
|
62
|
+
}, {
|
|
63
|
+
readonly id: "portfolios.create";
|
|
64
|
+
readonly kind: "mutation";
|
|
65
|
+
readonly visibility: readonly ["cli", "opencode"];
|
|
66
|
+
readonly description: "Create a new saved portfolio for the authenticated user.";
|
|
67
|
+
readonly http: {
|
|
68
|
+
readonly method: "POST";
|
|
69
|
+
readonly path: "/api/desk/tools/portfolio/create";
|
|
70
|
+
readonly inputMode: "json_body";
|
|
71
|
+
readonly schemas: {
|
|
72
|
+
readonly request: "PortfolioCreateRequest";
|
|
73
|
+
readonly response: "PortfolioCreateResponse";
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
readonly cli: {
|
|
77
|
+
readonly group: "portfolios";
|
|
78
|
+
readonly command: "create";
|
|
79
|
+
readonly summary: "Create a new portfolio.";
|
|
80
|
+
readonly positional: readonly [{
|
|
81
|
+
readonly kind: "positional";
|
|
82
|
+
readonly name: "name";
|
|
83
|
+
readonly type: "string";
|
|
84
|
+
readonly required: true;
|
|
85
|
+
readonly placeholder: "NOME";
|
|
86
|
+
readonly description: "Portfolio name to create.";
|
|
87
|
+
}];
|
|
88
|
+
readonly options: readonly [];
|
|
89
|
+
readonly examples: readonly ["quantbrasil portfolios create \"Dividendos\""];
|
|
90
|
+
};
|
|
91
|
+
readonly tool: {
|
|
92
|
+
readonly name: "qb_portfolio_create";
|
|
93
|
+
readonly title: "Create portfolio";
|
|
94
|
+
};
|
|
95
|
+
readonly outputModes: readonly ["json", "human"];
|
|
96
|
+
}, {
|
|
97
|
+
readonly id: "portfolios.rename";
|
|
98
|
+
readonly kind: "mutation";
|
|
99
|
+
readonly visibility: readonly ["cli", "opencode"];
|
|
100
|
+
readonly description: "Rename a saved portfolio owned by the authenticated user.";
|
|
101
|
+
readonly http: {
|
|
102
|
+
readonly method: "POST";
|
|
103
|
+
readonly path: "/api/desk/tools/portfolio/rename";
|
|
104
|
+
readonly inputMode: "json_body";
|
|
105
|
+
readonly schemas: {
|
|
106
|
+
readonly request: "PortfolioRenameRequest";
|
|
107
|
+
readonly response: "PortfolioMutationResponse";
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
readonly cli: {
|
|
111
|
+
readonly group: "portfolios";
|
|
112
|
+
readonly command: "rename";
|
|
113
|
+
readonly summary: "Rename an existing portfolio.";
|
|
114
|
+
readonly positional: readonly [{
|
|
115
|
+
readonly kind: "positional";
|
|
116
|
+
readonly name: "portfolio_id";
|
|
117
|
+
readonly type: "integer";
|
|
118
|
+
readonly required: true;
|
|
119
|
+
readonly placeholder: "ID";
|
|
120
|
+
readonly description: "Saved portfolio identifier.";
|
|
121
|
+
}, {
|
|
122
|
+
readonly kind: "positional";
|
|
123
|
+
readonly name: "name";
|
|
124
|
+
readonly type: "string";
|
|
125
|
+
readonly required: true;
|
|
126
|
+
readonly placeholder: "NOME";
|
|
127
|
+
readonly description: "New portfolio name.";
|
|
128
|
+
}];
|
|
129
|
+
readonly options: readonly [];
|
|
130
|
+
readonly examples: readonly ["quantbrasil portfolios rename 123 \"Longo Prazo\""];
|
|
131
|
+
};
|
|
132
|
+
readonly tool: {
|
|
133
|
+
readonly name: "qb_portfolio_rename";
|
|
134
|
+
readonly title: "Rename portfolio";
|
|
135
|
+
};
|
|
136
|
+
readonly outputModes: readonly ["json", "human"];
|
|
137
|
+
}, {
|
|
138
|
+
readonly id: "portfolios.add-assets";
|
|
139
|
+
readonly kind: "mutation";
|
|
140
|
+
readonly visibility: readonly ["cli", "opencode"];
|
|
141
|
+
readonly description: "Add one or more monitored tickers to a saved portfolio.";
|
|
142
|
+
readonly http: {
|
|
143
|
+
readonly method: "POST";
|
|
144
|
+
readonly path: "/api/desk/tools/portfolio/add_assets";
|
|
145
|
+
readonly inputMode: "json_body";
|
|
146
|
+
readonly schemas: {
|
|
147
|
+
readonly request: "PortfolioAddAssetsRequest";
|
|
148
|
+
readonly response: "PortfolioMutationResponse";
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
readonly cli: {
|
|
152
|
+
readonly group: "portfolios";
|
|
153
|
+
readonly command: "add-assets";
|
|
154
|
+
readonly summary: "Add monitored tickers to an existing portfolio.";
|
|
155
|
+
readonly positional: readonly [{
|
|
156
|
+
readonly kind: "positional";
|
|
157
|
+
readonly name: "portfolio_id";
|
|
158
|
+
readonly type: "integer";
|
|
159
|
+
readonly required: true;
|
|
160
|
+
readonly placeholder: "ID";
|
|
161
|
+
readonly description: "Saved portfolio identifier.";
|
|
162
|
+
}, {
|
|
163
|
+
readonly kind: "positional";
|
|
164
|
+
readonly name: "symbols";
|
|
165
|
+
readonly type: "string_array";
|
|
166
|
+
readonly required: true;
|
|
167
|
+
readonly placeholder: "TICKER";
|
|
168
|
+
readonly multiple: true;
|
|
169
|
+
readonly collectionFormat: "space_separated";
|
|
170
|
+
readonly description: "One or more monitored ticker symbols to add to the portfolio.";
|
|
171
|
+
}];
|
|
172
|
+
readonly options: readonly [];
|
|
173
|
+
readonly examples: readonly ["quantbrasil portfolios add-assets 123 PETR4 VALE3"];
|
|
174
|
+
};
|
|
175
|
+
readonly tool: {
|
|
176
|
+
readonly name: "qb_portfolio_add_assets";
|
|
177
|
+
readonly title: "Add portfolio assets";
|
|
178
|
+
};
|
|
179
|
+
readonly outputModes: readonly ["json", "human"];
|
|
180
|
+
}, {
|
|
181
|
+
readonly id: "portfolios.remove-assets";
|
|
182
|
+
readonly kind: "mutation";
|
|
183
|
+
readonly visibility: readonly ["cli", "opencode"];
|
|
184
|
+
readonly description: "Remove one or more monitored tickers from a saved portfolio.";
|
|
185
|
+
readonly http: {
|
|
186
|
+
readonly method: "POST";
|
|
187
|
+
readonly path: "/api/desk/tools/portfolio/remove_assets";
|
|
188
|
+
readonly inputMode: "json_body";
|
|
189
|
+
readonly schemas: {
|
|
190
|
+
readonly request: "PortfolioRemoveAssetsRequest";
|
|
191
|
+
readonly response: "PortfolioMutationResponse";
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
readonly cli: {
|
|
195
|
+
readonly group: "portfolios";
|
|
196
|
+
readonly command: "remove-assets";
|
|
197
|
+
readonly summary: "Remove monitored tickers from an existing portfolio.";
|
|
198
|
+
readonly positional: readonly [{
|
|
199
|
+
readonly kind: "positional";
|
|
200
|
+
readonly name: "portfolio_id";
|
|
201
|
+
readonly type: "integer";
|
|
202
|
+
readonly required: true;
|
|
203
|
+
readonly placeholder: "ID";
|
|
204
|
+
readonly description: "Saved portfolio identifier.";
|
|
205
|
+
}, {
|
|
206
|
+
readonly kind: "positional";
|
|
207
|
+
readonly name: "symbols";
|
|
208
|
+
readonly type: "string_array";
|
|
209
|
+
readonly required: true;
|
|
210
|
+
readonly placeholder: "TICKER";
|
|
211
|
+
readonly multiple: true;
|
|
212
|
+
readonly collectionFormat: "space_separated";
|
|
213
|
+
readonly description: "One or more monitored ticker symbols to remove from the portfolio.";
|
|
214
|
+
}];
|
|
215
|
+
readonly options: readonly [];
|
|
216
|
+
readonly examples: readonly ["quantbrasil portfolios remove-assets 123 PETR4"];
|
|
217
|
+
};
|
|
218
|
+
readonly tool: {
|
|
219
|
+
readonly name: "qb_portfolio_remove_assets";
|
|
220
|
+
readonly title: "Remove portfolio assets";
|
|
221
|
+
};
|
|
222
|
+
readonly outputModes: readonly ["json", "human"];
|
|
223
|
+
}];
|
|
224
|
+
//# sourceMappingURL=portfolios.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"portfolios.d.ts","sourceRoot":"","sources":["../../src/capabilities/portfolios.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoPkB,CAAC"}
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import { publicRuntimeVisibility, standardOutputModes } from "./shared.js";
|
|
2
|
+
export const portfolioCapabilities = [
|
|
3
|
+
{
|
|
4
|
+
id: "portfolios.list",
|
|
5
|
+
kind: "read",
|
|
6
|
+
visibility: publicRuntimeVisibility,
|
|
7
|
+
description: "List every portfolio owned by the authenticated user.",
|
|
8
|
+
http: {
|
|
9
|
+
method: "GET",
|
|
10
|
+
path: "/api/desk/tools/portfolio/list",
|
|
11
|
+
inputMode: "none",
|
|
12
|
+
schemas: {
|
|
13
|
+
request: null,
|
|
14
|
+
response: "PortfolioListResponse",
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
cli: {
|
|
18
|
+
group: "portfolios",
|
|
19
|
+
command: "list",
|
|
20
|
+
summary: "List the user portfolios available in QuantBrasil.",
|
|
21
|
+
positional: [],
|
|
22
|
+
options: [],
|
|
23
|
+
examples: ["quantbrasil portfolios list"],
|
|
24
|
+
},
|
|
25
|
+
tool: {
|
|
26
|
+
name: "qb_portfolio_list",
|
|
27
|
+
title: "List portfolios",
|
|
28
|
+
},
|
|
29
|
+
outputModes: standardOutputModes,
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: "portfolios.get",
|
|
33
|
+
kind: "read",
|
|
34
|
+
visibility: publicRuntimeVisibility,
|
|
35
|
+
description: "Return one saved portfolio by id, scoped to the acting user.",
|
|
36
|
+
http: {
|
|
37
|
+
method: "POST",
|
|
38
|
+
path: "/api/desk/tools/portfolio/get",
|
|
39
|
+
inputMode: "json_body",
|
|
40
|
+
schemas: {
|
|
41
|
+
request: "PortfolioGetRequest",
|
|
42
|
+
response: "PortfolioGetResponse",
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
cli: {
|
|
46
|
+
group: "portfolios",
|
|
47
|
+
command: "get",
|
|
48
|
+
summary: "Get a saved portfolio by id.",
|
|
49
|
+
positional: [
|
|
50
|
+
{
|
|
51
|
+
kind: "positional",
|
|
52
|
+
name: "portfolio_id",
|
|
53
|
+
type: "integer",
|
|
54
|
+
required: true,
|
|
55
|
+
placeholder: "ID",
|
|
56
|
+
description: "Saved portfolio identifier.",
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
options: [],
|
|
60
|
+
examples: ["quantbrasil portfolios get 123"],
|
|
61
|
+
},
|
|
62
|
+
tool: {
|
|
63
|
+
name: "qb_portfolio_get",
|
|
64
|
+
title: "Get portfolio",
|
|
65
|
+
},
|
|
66
|
+
outputModes: standardOutputModes,
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
id: "portfolios.create",
|
|
70
|
+
kind: "mutation",
|
|
71
|
+
visibility: publicRuntimeVisibility,
|
|
72
|
+
description: "Create a new saved portfolio for the authenticated user.",
|
|
73
|
+
http: {
|
|
74
|
+
method: "POST",
|
|
75
|
+
path: "/api/desk/tools/portfolio/create",
|
|
76
|
+
inputMode: "json_body",
|
|
77
|
+
schemas: {
|
|
78
|
+
request: "PortfolioCreateRequest",
|
|
79
|
+
response: "PortfolioCreateResponse",
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
cli: {
|
|
83
|
+
group: "portfolios",
|
|
84
|
+
command: "create",
|
|
85
|
+
summary: "Create a new portfolio.",
|
|
86
|
+
positional: [
|
|
87
|
+
{
|
|
88
|
+
kind: "positional",
|
|
89
|
+
name: "name",
|
|
90
|
+
type: "string",
|
|
91
|
+
required: true,
|
|
92
|
+
placeholder: "NOME",
|
|
93
|
+
description: "Portfolio name to create.",
|
|
94
|
+
},
|
|
95
|
+
],
|
|
96
|
+
options: [],
|
|
97
|
+
examples: ['quantbrasil portfolios create "Dividendos"'],
|
|
98
|
+
},
|
|
99
|
+
tool: {
|
|
100
|
+
name: "qb_portfolio_create",
|
|
101
|
+
title: "Create portfolio",
|
|
102
|
+
},
|
|
103
|
+
outputModes: standardOutputModes,
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
id: "portfolios.rename",
|
|
107
|
+
kind: "mutation",
|
|
108
|
+
visibility: publicRuntimeVisibility,
|
|
109
|
+
description: "Rename a saved portfolio owned by the authenticated user.",
|
|
110
|
+
http: {
|
|
111
|
+
method: "POST",
|
|
112
|
+
path: "/api/desk/tools/portfolio/rename",
|
|
113
|
+
inputMode: "json_body",
|
|
114
|
+
schemas: {
|
|
115
|
+
request: "PortfolioRenameRequest",
|
|
116
|
+
response: "PortfolioMutationResponse",
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
cli: {
|
|
120
|
+
group: "portfolios",
|
|
121
|
+
command: "rename",
|
|
122
|
+
summary: "Rename an existing portfolio.",
|
|
123
|
+
positional: [
|
|
124
|
+
{
|
|
125
|
+
kind: "positional",
|
|
126
|
+
name: "portfolio_id",
|
|
127
|
+
type: "integer",
|
|
128
|
+
required: true,
|
|
129
|
+
placeholder: "ID",
|
|
130
|
+
description: "Saved portfolio identifier.",
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
kind: "positional",
|
|
134
|
+
name: "name",
|
|
135
|
+
type: "string",
|
|
136
|
+
required: true,
|
|
137
|
+
placeholder: "NOME",
|
|
138
|
+
description: "New portfolio name.",
|
|
139
|
+
},
|
|
140
|
+
],
|
|
141
|
+
options: [],
|
|
142
|
+
examples: ['quantbrasil portfolios rename 123 "Longo Prazo"'],
|
|
143
|
+
},
|
|
144
|
+
tool: {
|
|
145
|
+
name: "qb_portfolio_rename",
|
|
146
|
+
title: "Rename portfolio",
|
|
147
|
+
},
|
|
148
|
+
outputModes: standardOutputModes,
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
id: "portfolios.add-assets",
|
|
152
|
+
kind: "mutation",
|
|
153
|
+
visibility: publicRuntimeVisibility,
|
|
154
|
+
description: "Add one or more monitored tickers to a saved portfolio.",
|
|
155
|
+
http: {
|
|
156
|
+
method: "POST",
|
|
157
|
+
path: "/api/desk/tools/portfolio/add_assets",
|
|
158
|
+
inputMode: "json_body",
|
|
159
|
+
schemas: {
|
|
160
|
+
request: "PortfolioAddAssetsRequest",
|
|
161
|
+
response: "PortfolioMutationResponse",
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
cli: {
|
|
165
|
+
group: "portfolios",
|
|
166
|
+
command: "add-assets",
|
|
167
|
+
summary: "Add monitored tickers to an existing portfolio.",
|
|
168
|
+
positional: [
|
|
169
|
+
{
|
|
170
|
+
kind: "positional",
|
|
171
|
+
name: "portfolio_id",
|
|
172
|
+
type: "integer",
|
|
173
|
+
required: true,
|
|
174
|
+
placeholder: "ID",
|
|
175
|
+
description: "Saved portfolio identifier.",
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
kind: "positional",
|
|
179
|
+
name: "symbols",
|
|
180
|
+
type: "string_array",
|
|
181
|
+
required: true,
|
|
182
|
+
placeholder: "TICKER",
|
|
183
|
+
multiple: true,
|
|
184
|
+
collectionFormat: "space_separated",
|
|
185
|
+
description: "One or more monitored ticker symbols to add to the portfolio.",
|
|
186
|
+
},
|
|
187
|
+
],
|
|
188
|
+
options: [],
|
|
189
|
+
examples: ["quantbrasil portfolios add-assets 123 PETR4 VALE3"],
|
|
190
|
+
},
|
|
191
|
+
tool: {
|
|
192
|
+
name: "qb_portfolio_add_assets",
|
|
193
|
+
title: "Add portfolio assets",
|
|
194
|
+
},
|
|
195
|
+
outputModes: standardOutputModes,
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
id: "portfolios.remove-assets",
|
|
199
|
+
kind: "mutation",
|
|
200
|
+
visibility: publicRuntimeVisibility,
|
|
201
|
+
description: "Remove one or more monitored tickers from a saved portfolio.",
|
|
202
|
+
http: {
|
|
203
|
+
method: "POST",
|
|
204
|
+
path: "/api/desk/tools/portfolio/remove_assets",
|
|
205
|
+
inputMode: "json_body",
|
|
206
|
+
schemas: {
|
|
207
|
+
request: "PortfolioRemoveAssetsRequest",
|
|
208
|
+
response: "PortfolioMutationResponse",
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
cli: {
|
|
212
|
+
group: "portfolios",
|
|
213
|
+
command: "remove-assets",
|
|
214
|
+
summary: "Remove monitored tickers from an existing portfolio.",
|
|
215
|
+
positional: [
|
|
216
|
+
{
|
|
217
|
+
kind: "positional",
|
|
218
|
+
name: "portfolio_id",
|
|
219
|
+
type: "integer",
|
|
220
|
+
required: true,
|
|
221
|
+
placeholder: "ID",
|
|
222
|
+
description: "Saved portfolio identifier.",
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
kind: "positional",
|
|
226
|
+
name: "symbols",
|
|
227
|
+
type: "string_array",
|
|
228
|
+
required: true,
|
|
229
|
+
placeholder: "TICKER",
|
|
230
|
+
multiple: true,
|
|
231
|
+
collectionFormat: "space_separated",
|
|
232
|
+
description: "One or more monitored ticker symbols to remove from the portfolio.",
|
|
233
|
+
},
|
|
234
|
+
],
|
|
235
|
+
options: [],
|
|
236
|
+
examples: ["quantbrasil portfolios remove-assets 123 PETR4"],
|
|
237
|
+
},
|
|
238
|
+
tool: {
|
|
239
|
+
name: "qb_portfolio_remove_assets",
|
|
240
|
+
title: "Remove portfolio assets",
|
|
241
|
+
},
|
|
242
|
+
outputModes: standardOutputModes,
|
|
243
|
+
},
|
|
244
|
+
];
|