@quantbrasil/cli 0.1.0-beta.0 → 0.1.0-beta.10

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 (70) hide show
  1. package/README.md +63 -11
  2. package/dist/cli/client.js +4 -0
  3. package/dist/cli/index.d.ts +12 -4
  4. package/dist/cli/index.d.ts.map +1 -1
  5. package/dist/cli/index.js +64 -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/market.d.ts +1 -0
  16. package/dist/commands/market.d.ts.map +1 -1
  17. package/dist/commands/market.js +17 -1
  18. package/dist/commands/portfolios.d.ts +148 -8
  19. package/dist/commands/portfolios.d.ts.map +1 -1
  20. package/dist/commands/portfolios.js +557 -55
  21. package/dist/commands/rankings.d.ts +82 -0
  22. package/dist/commands/rankings.d.ts.map +1 -0
  23. package/dist/commands/rankings.js +235 -0
  24. package/dist/commands/screening.d.ts +120 -0
  25. package/dist/commands/screening.d.ts.map +1 -0
  26. package/dist/commands/screening.js +361 -0
  27. package/dist/commands/skills.js +7 -7
  28. package/dist/commands/update.d.ts +23 -0
  29. package/dist/commands/update.d.ts.map +1 -0
  30. package/dist/commands/update.js +209 -0
  31. package/dist/index.d.ts +3 -1
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +3 -1
  34. package/dist/vendor/core/capabilities/index.d.ts +2 -1
  35. package/dist/vendor/core/capabilities/index.d.ts.map +1 -1
  36. package/dist/vendor/core/capabilities/index.js +2 -1
  37. package/dist/vendor/core/capabilities/market.d.ts +9 -1
  38. package/dist/vendor/core/capabilities/market.d.ts.map +1 -1
  39. package/dist/vendor/core/capabilities/market.js +10 -0
  40. package/dist/vendor/core/capabilities/portfolios.d.ts +452 -56
  41. package/dist/vendor/core/capabilities/portfolios.d.ts.map +1 -1
  42. package/dist/vendor/core/capabilities/portfolios.js +434 -116
  43. package/dist/vendor/core/capabilities/rankings.d.ts +83 -0
  44. package/dist/vendor/core/capabilities/rankings.d.ts.map +1 -0
  45. package/dist/vendor/core/capabilities/rankings.js +95 -0
  46. package/dist/vendor/core/capabilities/registry.d.ts +1279 -413
  47. package/dist/vendor/core/capabilities/registry.d.ts.map +1 -1
  48. package/dist/vendor/core/capabilities/registry.js +4 -2
  49. package/dist/vendor/core/capabilities/screening.d.ts +136 -0
  50. package/dist/vendor/core/capabilities/screening.d.ts.map +1 -0
  51. package/dist/vendor/core/capabilities/screening.js +155 -0
  52. package/dist/vendor/core/capabilities/types.d.ts +1 -1
  53. package/dist/vendor/core/capabilities/types.d.ts.map +1 -1
  54. package/package.json +1 -1
  55. package/skills/quantbrasil/SKILL.md +28 -11
  56. package/skills/quantbrasil/references/cli.md +96 -20
  57. package/skills/quantbrasil/references/costs.md +9 -4
  58. package/skills/quantbrasil/references/errors.md +16 -5
  59. package/skills/quantbrasil/references/portfolios.md +114 -0
  60. package/skills/quantbrasil/references/quality-eval-queries.json +127 -0
  61. package/skills/quantbrasil/references/rankings.md +62 -0
  62. package/skills/quantbrasil/references/screening.md +212 -0
  63. package/skills/quantbrasil/references/unsupported.md +7 -2
  64. package/skills/quantbrasil/references/workflows.md +95 -23
  65. package/dist/commands/analytics.d.ts +0 -131
  66. package/dist/commands/analytics.d.ts.map +0 -1
  67. package/dist/commands/analytics.js +0 -291
  68. package/dist/vendor/core/capabilities/analytics.d.ts +0 -187
  69. package/dist/vendor/core/capabilities/analytics.d.ts.map +0 -1
  70. package/dist/vendor/core/capabilities/analytics.js +0 -214
@@ -26,8 +26,16 @@ export declare const capabilityRegistry: readonly [{
26
26
  readonly placeholder: "TIPO";
27
27
  readonly enumValues: readonly ["B3", "ETF", "ETF-US", "BDR", "Futuro", "Crypto", "S&P500"];
28
28
  readonly description: "Filter by the exact monitored asset type.";
29
+ }, {
30
+ readonly kind: "option";
31
+ readonly flag: "--search";
32
+ readonly name: "search";
33
+ readonly type: "string";
34
+ readonly required: false;
35
+ readonly placeholder: "TEXTO";
36
+ readonly description: "Filter monitored tickers by case-insensitive text.";
29
37
  }];
30
- readonly examples: readonly ["quantbrasil market assets", "quantbrasil market assets --type B3"];
38
+ readonly examples: readonly ["quantbrasil market assets", "quantbrasil market assets --type B3", "quantbrasil market assets --search BTC"];
31
39
  };
32
40
  readonly tool: {
33
41
  readonly name: "qb_market_assets";
@@ -131,13 +139,227 @@ export declare const capabilityRegistry: readonly [{
131
139
  };
132
140
  readonly outputModes: readonly ["json", "human"];
133
141
  }, {
134
- readonly id: "portfolios.list";
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: "SLUG";
194
+ readonly exclusiveGroup: "ranking_selector";
195
+ readonly description: "Slug de ranking do sistema retornado por `rankings list`, por exemplo momentum-90d.";
196
+ }, {
197
+ readonly kind: "option";
198
+ readonly flag: "--id";
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 --id 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"];
222
+ }, {
223
+ readonly id: "screening.universes";
224
+ readonly kind: "read";
225
+ readonly visibility: readonly ["cli", "opencode"];
226
+ readonly description: "Lista universos salvos e baseados em portfólios disponíveis para screening de indicadores.";
227
+ readonly http: {
228
+ readonly method: "GET";
229
+ readonly path: "/api/desk/tools/screening/universes";
230
+ readonly inputMode: "none";
231
+ readonly schemas: {
232
+ readonly request: null;
233
+ readonly response: "ScreeningUniversesResponse";
234
+ };
235
+ };
236
+ readonly cli: {
237
+ readonly group: "screening";
238
+ readonly command: "universes";
239
+ readonly summary: "Lista carteiras do sistema, watchlists e carteiras disponíveis para screening.";
240
+ readonly positional: readonly [];
241
+ readonly options: readonly [];
242
+ readonly examples: readonly ["quantbrasil screening universes"];
243
+ };
244
+ readonly tool: {
245
+ readonly name: "qb_screening_universes";
246
+ readonly title: "Listar universos de screening";
247
+ };
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"];
276
+ }, {
277
+ readonly id: "screening.run";
278
+ readonly kind: "read";
279
+ readonly visibility: readonly ["cli", "opencode"];
280
+ readonly description: "Executa o screener de indicadores existente sobre um universo salvo baseado em portfólio.";
281
+ readonly http: {
282
+ readonly method: "POST";
283
+ readonly path: "/api/desk/tools/screening/run";
284
+ readonly inputMode: "json_body";
285
+ readonly schemas: {
286
+ readonly request: "ScreeningRunRequest";
287
+ readonly response: "ScreeningRunResponse";
288
+ };
289
+ };
290
+ readonly cli: {
291
+ readonly group: "screening";
292
+ readonly command: "run";
293
+ readonly summary: "Executa screening de indicadores a partir de um payload ScreenerRequest JSON.";
294
+ readonly positional: readonly [];
295
+ readonly options: readonly [{
296
+ readonly kind: "option";
297
+ readonly flag: "--system";
298
+ readonly name: "system_slug";
299
+ readonly type: "string";
300
+ readonly required: false;
301
+ readonly placeholder: "SLUG";
302
+ readonly exclusiveGroup: "screening_universe_selector";
303
+ readonly description: "Slug da carteira do sistema retornado por `screening universes`, por exemplo acoes-mais-liquidas.";
304
+ }, {
305
+ readonly kind: "option";
306
+ readonly flag: "--watchlist";
307
+ readonly name: "watchlist_id";
308
+ readonly type: "integer";
309
+ readonly required: false;
310
+ readonly placeholder: "ID";
311
+ readonly exclusiveGroup: "screening_universe_selector";
312
+ readonly description: "ID da watchlist retornado por `watchlists list`.";
313
+ }, {
314
+ readonly kind: "option";
315
+ readonly flag: "--holding";
316
+ readonly name: "holding_id";
317
+ readonly type: "integer";
318
+ readonly required: false;
319
+ readonly placeholder: "ID";
320
+ readonly exclusiveGroup: "screening_universe_selector";
321
+ readonly description: "ID da carteira retornado por `holdings list`.";
322
+ }, {
323
+ readonly kind: "option";
324
+ readonly flag: "--query-file";
325
+ readonly name: "query_file";
326
+ readonly type: "string";
327
+ readonly required: true;
328
+ readonly placeholder: "ARQUIVO|-";
329
+ readonly description: "Caminho para um arquivo ScreenerRequest JSON completo, ou `-` para ler JSON de stdin.";
330
+ }, {
331
+ readonly kind: "option";
332
+ readonly flag: "--limit";
333
+ readonly name: "limit";
334
+ readonly type: "integer";
335
+ readonly required: false;
336
+ readonly placeholder: "N";
337
+ readonly description: "Sobrescreve o limit de topo do ScreenerRequest sem alterar o arquivo da consulta.";
338
+ }, {
339
+ readonly kind: "option";
340
+ readonly flag: "--sort";
341
+ readonly name: "sort";
342
+ readonly type: "enum";
343
+ readonly required: false;
344
+ readonly placeholder: "price|ticker";
345
+ readonly enumValues: readonly ["price", "ticker"];
346
+ readonly description: "Sobrescreve o sort de topo do ScreenerRequest sem alterar o arquivo da consulta.";
347
+ }];
348
+ readonly examples: readonly ["quantbrasil screening run --system acoes-mais-liquidas --query-file ./screening.json", "quantbrasil screening run --watchlist 93 --query-file ./screening.json --limit 25", "cat screening.json | quantbrasil screening run --holding 182 --query-file - --sort ticker"];
349
+ };
350
+ readonly tool: {
351
+ readonly name: "qb_screening_run";
352
+ readonly title: "Executar screening de indicadores";
353
+ };
354
+ readonly outputModes: readonly ["json", "human"];
355
+ }, {
356
+ readonly id: "watchlists.list";
135
357
  readonly kind: "read";
136
358
  readonly visibility: readonly ["cli", "opencode"];
137
- readonly description: "List every portfolio owned by the authenticated user.";
359
+ readonly description: "List watchlists owned by the authenticated user.";
138
360
  readonly http: {
139
361
  readonly method: "GET";
140
- readonly path: "/api/desk/tools/portfolio/list";
362
+ readonly path: "/api/desk/tools/watchlist/list";
141
363
  readonly inputMode: "none";
142
364
  readonly schemas: {
143
365
  readonly request: null;
@@ -145,26 +367,26 @@ export declare const capabilityRegistry: readonly [{
145
367
  };
146
368
  };
147
369
  readonly cli: {
148
- readonly group: "portfolios";
370
+ readonly group: "watchlists";
149
371
  readonly command: "list";
150
- readonly summary: "List the user portfolios available in QuantBrasil.";
372
+ readonly summary: "List watchlists for tracking ideas and filters.";
151
373
  readonly positional: readonly [];
152
374
  readonly options: readonly [];
153
- readonly examples: readonly ["quantbrasil portfolios list"];
375
+ readonly examples: readonly ["quantbrasil watchlists list"];
154
376
  };
155
377
  readonly tool: {
156
- readonly name: "qb_portfolio_list";
157
- readonly title: "List portfolios";
378
+ readonly name: "qb_watchlist_list";
379
+ readonly title: "List watchlists";
158
380
  };
159
381
  readonly outputModes: readonly ["json", "human"];
160
382
  }, {
161
- readonly id: "portfolios.get";
383
+ readonly id: "watchlists.get";
162
384
  readonly kind: "read";
163
385
  readonly visibility: readonly ["cli", "opencode"];
164
- readonly description: "Return one saved portfolio by id, scoped to the acting user.";
386
+ readonly description: "Return one watchlist by id, scoped to the acting user.";
165
387
  readonly http: {
166
388
  readonly method: "POST";
167
- readonly path: "/api/desk/tools/portfolio/get";
389
+ readonly path: "/api/desk/tools/watchlist/get";
168
390
  readonly inputMode: "json_body";
169
391
  readonly schemas: {
170
392
  readonly request: "PortfolioGetRequest";
@@ -172,33 +394,33 @@ export declare const capabilityRegistry: readonly [{
172
394
  };
173
395
  };
174
396
  readonly cli: {
175
- readonly group: "portfolios";
397
+ readonly group: "watchlists";
176
398
  readonly command: "get";
177
- readonly summary: "Get a saved portfolio by id.";
399
+ readonly summary: "Get a watchlist by id.";
178
400
  readonly positional: readonly [{
179
401
  readonly kind: "positional";
180
402
  readonly name: "portfolio_id";
181
403
  readonly type: "integer";
182
404
  readonly required: true;
183
405
  readonly placeholder: "ID";
184
- readonly description: "Saved portfolio identifier.";
406
+ readonly description: "Stable saved object identifier.";
185
407
  }];
186
408
  readonly options: readonly [];
187
- readonly examples: readonly ["quantbrasil portfolios get 123"];
409
+ readonly examples: readonly ["quantbrasil watchlists get 123"];
188
410
  };
189
411
  readonly tool: {
190
- readonly name: "qb_portfolio_get";
191
- readonly title: "Get portfolio";
412
+ readonly name: "qb_watchlist_get";
413
+ readonly title: "Get watchlist";
192
414
  };
193
415
  readonly outputModes: readonly ["json", "human"];
194
416
  }, {
195
- readonly id: "portfolios.create";
417
+ readonly id: "watchlists.create";
196
418
  readonly kind: "mutation";
197
419
  readonly visibility: readonly ["cli", "opencode"];
198
- readonly description: "Create a new saved portfolio for the authenticated user.";
420
+ readonly description: "Create a new watchlist for the authenticated user.";
199
421
  readonly http: {
200
422
  readonly method: "POST";
201
- readonly path: "/api/desk/tools/portfolio/create";
423
+ readonly path: "/api/desk/tools/watchlist/create";
202
424
  readonly inputMode: "json_body";
203
425
  readonly schemas: {
204
426
  readonly request: "PortfolioCreateRequest";
@@ -206,33 +428,33 @@ export declare const capabilityRegistry: readonly [{
206
428
  };
207
429
  };
208
430
  readonly cli: {
209
- readonly group: "portfolios";
431
+ readonly group: "watchlists";
210
432
  readonly command: "create";
211
- readonly summary: "Create a new portfolio.";
433
+ readonly summary: "Create a new watchlist.";
212
434
  readonly positional: readonly [{
213
435
  readonly kind: "positional";
214
436
  readonly name: "name";
215
437
  readonly type: "string";
216
438
  readonly required: true;
217
439
  readonly placeholder: "NOME";
218
- readonly description: "Portfolio name to create.";
440
+ readonly description: "Name to save.";
219
441
  }];
220
442
  readonly options: readonly [];
221
- readonly examples: readonly ["quantbrasil portfolios create \"Dividendos\""];
443
+ readonly examples: readonly ["quantbrasil watchlists create \"Dividendos\""];
222
444
  };
223
445
  readonly tool: {
224
- readonly name: "qb_portfolio_create";
225
- readonly title: "Create portfolio";
446
+ readonly name: "qb_watchlist_create";
447
+ readonly title: "Create watchlist";
226
448
  };
227
449
  readonly outputModes: readonly ["json", "human"];
228
450
  }, {
229
- readonly id: "portfolios.rename";
451
+ readonly id: "watchlists.rename";
230
452
  readonly kind: "mutation";
231
453
  readonly visibility: readonly ["cli", "opencode"];
232
- readonly description: "Rename a saved portfolio owned by the authenticated user.";
454
+ readonly description: "Rename a watchlist owned by the authenticated user.";
233
455
  readonly http: {
234
456
  readonly method: "POST";
235
- readonly path: "/api/desk/tools/portfolio/rename";
457
+ readonly path: "/api/desk/tools/watchlist/rename";
236
458
  readonly inputMode: "json_body";
237
459
  readonly schemas: {
238
460
  readonly request: "PortfolioRenameRequest";
@@ -240,40 +462,40 @@ export declare const capabilityRegistry: readonly [{
240
462
  };
241
463
  };
242
464
  readonly cli: {
243
- readonly group: "portfolios";
465
+ readonly group: "watchlists";
244
466
  readonly command: "rename";
245
- readonly summary: "Rename an existing portfolio.";
467
+ readonly summary: "Rename an existing watchlist.";
246
468
  readonly positional: readonly [{
247
469
  readonly kind: "positional";
248
470
  readonly name: "portfolio_id";
249
471
  readonly type: "integer";
250
472
  readonly required: true;
251
473
  readonly placeholder: "ID";
252
- readonly description: "Saved portfolio identifier.";
474
+ readonly description: "Stable saved object identifier.";
253
475
  }, {
254
476
  readonly kind: "positional";
255
477
  readonly name: "name";
256
478
  readonly type: "string";
257
479
  readonly required: true;
258
480
  readonly placeholder: "NOME";
259
- readonly description: "New portfolio name.";
481
+ readonly description: "Name to save.";
260
482
  }];
261
483
  readonly options: readonly [];
262
- readonly examples: readonly ["quantbrasil portfolios rename 123 \"Longo Prazo\""];
484
+ readonly examples: readonly ["quantbrasil watchlists rename 123 \"Longo Prazo\""];
263
485
  };
264
486
  readonly tool: {
265
- readonly name: "qb_portfolio_rename";
266
- readonly title: "Rename portfolio";
487
+ readonly name: "qb_watchlist_rename";
488
+ readonly title: "Rename watchlist";
267
489
  };
268
490
  readonly outputModes: readonly ["json", "human"];
269
491
  }, {
270
- readonly id: "portfolios.add-assets";
492
+ readonly id: "watchlists.add-assets";
271
493
  readonly kind: "mutation";
272
494
  readonly visibility: readonly ["cli", "opencode"];
273
- readonly description: "Add one or more monitored tickers to a saved portfolio.";
495
+ readonly description: "Add one or more monitored tickers to a watchlist.";
274
496
  readonly http: {
275
497
  readonly method: "POST";
276
- readonly path: "/api/desk/tools/portfolio/add_assets";
498
+ readonly path: "/api/desk/tools/watchlist/add_assets";
277
499
  readonly inputMode: "json_body";
278
500
  readonly schemas: {
279
501
  readonly request: "PortfolioAddAssetsRequest";
@@ -281,16 +503,16 @@ export declare const capabilityRegistry: readonly [{
281
503
  };
282
504
  };
283
505
  readonly cli: {
284
- readonly group: "portfolios";
506
+ readonly group: "watchlists";
285
507
  readonly command: "add-assets";
286
- readonly summary: "Add monitored tickers to an existing portfolio.";
508
+ readonly summary: "Add monitored tickers to an existing watchlist.";
287
509
  readonly positional: readonly [{
288
510
  readonly kind: "positional";
289
511
  readonly name: "portfolio_id";
290
512
  readonly type: "integer";
291
513
  readonly required: true;
292
514
  readonly placeholder: "ID";
293
- readonly description: "Saved portfolio identifier.";
515
+ readonly description: "Stable saved object identifier.";
294
516
  }, {
295
517
  readonly kind: "positional";
296
518
  readonly name: "symbols";
@@ -299,24 +521,24 @@ export declare const capabilityRegistry: readonly [{
299
521
  readonly placeholder: "TICKER";
300
522
  readonly multiple: true;
301
523
  readonly collectionFormat: "space_separated";
302
- readonly description: "One or more monitored ticker symbols to add to the portfolio.";
524
+ readonly description: "One or more monitored ticker symbols.";
303
525
  }];
304
526
  readonly options: readonly [];
305
- readonly examples: readonly ["quantbrasil portfolios add-assets 123 PETR4 VALE3"];
527
+ readonly examples: readonly ["quantbrasil watchlists add-assets 123 PETR4 VALE3"];
306
528
  };
307
529
  readonly tool: {
308
- readonly name: "qb_portfolio_add_assets";
309
- readonly title: "Add portfolio assets";
530
+ readonly name: "qb_watchlist_add_assets";
531
+ readonly title: "Add watchlist assets";
310
532
  };
311
533
  readonly outputModes: readonly ["json", "human"];
312
534
  }, {
313
- readonly id: "portfolios.remove-assets";
535
+ readonly id: "watchlists.remove-assets";
314
536
  readonly kind: "mutation";
315
537
  readonly visibility: readonly ["cli", "opencode"];
316
- readonly description: "Remove one or more monitored tickers from a saved portfolio.";
538
+ readonly description: "Remove one or more monitored tickers from a watchlist.";
317
539
  readonly http: {
318
540
  readonly method: "POST";
319
- readonly path: "/api/desk/tools/portfolio/remove_assets";
541
+ readonly path: "/api/desk/tools/watchlist/remove_assets";
320
542
  readonly inputMode: "json_body";
321
543
  readonly schemas: {
322
544
  readonly request: "PortfolioRemoveAssetsRequest";
@@ -324,16 +546,16 @@ export declare const capabilityRegistry: readonly [{
324
546
  };
325
547
  };
326
548
  readonly cli: {
327
- readonly group: "portfolios";
549
+ readonly group: "watchlists";
328
550
  readonly command: "remove-assets";
329
- readonly summary: "Remove monitored tickers from an existing portfolio.";
551
+ readonly summary: "Remove monitored tickers from an existing watchlist.";
330
552
  readonly positional: readonly [{
331
553
  readonly kind: "positional";
332
554
  readonly name: "portfolio_id";
333
555
  readonly type: "integer";
334
556
  readonly required: true;
335
557
  readonly placeholder: "ID";
336
- readonly description: "Saved portfolio identifier.";
558
+ readonly description: "Stable saved object identifier.";
337
559
  }, {
338
560
  readonly kind: "positional";
339
561
  readonly name: "symbols";
@@ -342,225 +564,436 @@ export declare const capabilityRegistry: readonly [{
342
564
  readonly placeholder: "TICKER";
343
565
  readonly multiple: true;
344
566
  readonly collectionFormat: "space_separated";
345
- readonly description: "One or more monitored ticker symbols to remove from the portfolio.";
567
+ readonly description: "One or more monitored ticker symbols.";
346
568
  }];
347
569
  readonly options: readonly [];
348
- readonly examples: readonly ["quantbrasil portfolios remove-assets 123 PETR4"];
570
+ readonly examples: readonly ["quantbrasil watchlists remove-assets 123 PETR4"];
349
571
  };
350
572
  readonly tool: {
351
- readonly name: "qb_portfolio_remove_assets";
352
- readonly title: "Remove portfolio assets";
573
+ readonly name: "qb_watchlist_remove_assets";
574
+ readonly title: "Remove watchlist assets";
353
575
  };
354
576
  readonly outputModes: readonly ["json", "human"];
355
577
  }, {
356
- readonly id: "analytics.historical-return";
578
+ readonly id: "holdings.list";
357
579
  readonly kind: "read";
358
580
  readonly visibility: readonly ["cli", "opencode"];
359
- readonly description: "Calculate historical return for a saved portfolio or an ad-hoc weighted basket.";
581
+ readonly description: "List holdings owned by the authenticated user.";
360
582
  readonly http: {
361
- readonly method: "POST";
362
- readonly path: "/api/desk/tools/portfolio/historical_return";
363
- readonly inputMode: "json_body";
583
+ readonly method: "GET";
584
+ readonly path: "/api/desk/tools/holding/list";
585
+ readonly inputMode: "none";
364
586
  readonly schemas: {
365
- readonly request: "PortfolioHistoricalReturnRequest";
366
- readonly response: "HistoricalReturnResponse";
587
+ readonly request: null;
588
+ readonly response: "PortfolioListResponse";
367
589
  };
368
590
  };
369
591
  readonly cli: {
370
- readonly group: "analytics";
371
- readonly command: "historical-return";
372
- readonly summary: "Calculate historical return for a saved portfolio or repeated --asset inputs.";
592
+ readonly group: "holdings";
593
+ readonly command: "list";
594
+ readonly summary: "List holdings for investable metrics.";
373
595
  readonly positional: readonly [];
374
- readonly options: readonly [{
375
- readonly kind: "option";
376
- readonly flag: "--portfolio";
377
- readonly name: "portfolio_id";
378
- readonly type: "integer";
379
- readonly required: false;
380
- readonly placeholder: "ID";
381
- readonly exclusiveGroup: "source";
382
- readonly description: "Saved portfolio id. Use exactly one source: --portfolio or repeated --asset.";
383
- }, {
384
- readonly kind: "option";
385
- readonly flag: "--asset";
386
- readonly name: "assets";
387
- readonly type: "string_array";
388
- readonly required: false;
389
- readonly placeholder: "TICKER[:PESO]";
390
- readonly multiple: true;
391
- readonly collectionFormat: "repeatable";
392
- readonly exclusiveGroup: "source";
393
- readonly description: "Repeatable ad-hoc asset input using TICKER[:WEIGHT_PCT], for example PRIO3:50.";
394
- }, {
395
- readonly kind: "option";
396
- readonly flag: "--from";
397
- readonly name: "start_date";
398
- readonly type: "string";
399
- readonly required: true;
400
- readonly placeholder: "AAAA-MM-DD";
401
- readonly description: "Inclusive start date in ISO format.";
402
- }, {
403
- readonly kind: "option";
404
- readonly flag: "--to";
405
- readonly name: "end_date";
406
- readonly type: "string";
407
- readonly required: true;
408
- readonly placeholder: "AAAA-MM-DD";
409
- readonly description: "Inclusive end date in ISO format.";
410
- }];
411
- 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"];
596
+ readonly options: readonly [];
597
+ readonly examples: readonly ["quantbrasil holdings list"];
412
598
  };
413
599
  readonly tool: {
414
- readonly name: "qb_historical_return";
415
- readonly title: "Calculate historical return";
600
+ readonly name: "qb_holding_list";
601
+ readonly title: "List holdings";
416
602
  };
417
603
  readonly outputModes: readonly ["json", "human"];
418
604
  }, {
419
- readonly id: "analytics.beta";
605
+ readonly id: "holdings.get";
420
606
  readonly kind: "read";
421
607
  readonly visibility: readonly ["cli", "opencode"];
422
- readonly description: "Calculate portfolio beta against IBOV for a saved portfolio or an ad-hoc basket.";
608
+ readonly description: "Return one holding by id, scoped to the acting user.";
423
609
  readonly http: {
424
610
  readonly method: "POST";
425
- readonly path: "/api/desk/tools/portfolio/beta";
611
+ readonly path: "/api/desk/tools/holding/get";
426
612
  readonly inputMode: "json_body";
427
613
  readonly schemas: {
428
- readonly request: "PortfolioBetaRequest";
429
- readonly response: "PortfolioBetaResponse";
614
+ readonly request: "PortfolioGetRequest";
615
+ readonly response: "PortfolioGetResponse";
430
616
  };
431
617
  };
432
618
  readonly cli: {
433
- readonly group: "analytics";
434
- readonly command: "beta";
435
- readonly summary: "Calculate portfolio beta against IBOV.";
436
- readonly positional: readonly [];
437
- readonly options: readonly [{
438
- readonly kind: "option";
439
- readonly flag: "--portfolio";
619
+ readonly group: "holdings";
620
+ readonly command: "get";
621
+ readonly summary: "Get a holding by id.";
622
+ readonly positional: readonly [{
623
+ readonly kind: "positional";
440
624
  readonly name: "portfolio_id";
441
625
  readonly type: "integer";
442
- readonly required: false;
626
+ readonly required: true;
443
627
  readonly placeholder: "ID";
444
- readonly exclusiveGroup: "source";
445
- readonly description: "Saved portfolio id. Use exactly one source: --portfolio or repeated --asset.";
446
- }, {
447
- readonly kind: "option";
448
- readonly flag: "--asset";
449
- readonly name: "assets";
450
- readonly type: "string_array";
451
- readonly required: false;
452
- readonly placeholder: "TICKER[:PESO]";
453
- readonly multiple: true;
454
- readonly collectionFormat: "repeatable";
455
- readonly exclusiveGroup: "source";
456
- readonly description: "Repeatable ad-hoc asset input using TICKER[:WEIGHT_PCT], for example PETR4:120 or WINFUT:-20.";
457
- }, {
458
- readonly kind: "option";
459
- readonly flag: "--years";
460
- readonly name: "years";
461
- readonly type: "enum";
462
- readonly required: false;
463
- readonly placeholder: "ANOS";
464
- readonly defaultValue: 1;
465
- readonly enumValues: readonly ["1", "3", "5"];
466
- readonly description: "Historical lookback window in years. Accepted values: 1, 3, or 5.";
628
+ readonly description: "Stable saved object identifier.";
467
629
  }];
468
- readonly examples: readonly ["quantbrasil analytics beta --portfolio 123 --years 3", "quantbrasil analytics beta --asset PRIO3:120 --asset WINFUT:-20 --years 1"];
630
+ readonly options: readonly [];
631
+ readonly examples: readonly ["quantbrasil holdings get 123"];
469
632
  };
470
633
  readonly tool: {
471
- readonly name: "qb_portfolio_beta";
472
- readonly title: "Calculate portfolio beta";
634
+ readonly name: "qb_holding_get";
635
+ readonly title: "Get holding";
473
636
  };
474
637
  readonly outputModes: readonly ["json", "human"];
475
638
  }, {
476
- readonly id: "analytics.var";
477
- readonly kind: "read";
639
+ readonly id: "holdings.create";
640
+ readonly kind: "mutation";
478
641
  readonly visibility: readonly ["cli", "opencode"];
479
- readonly description: "Calculate one-day Value-at-Risk for a saved portfolio or an ad-hoc basket.";
642
+ readonly description: "Create a new holding for the authenticated user.";
480
643
  readonly http: {
481
644
  readonly method: "POST";
482
- readonly path: "/api/desk/tools/portfolio/var";
645
+ readonly path: "/api/desk/tools/holding/create";
483
646
  readonly inputMode: "json_body";
484
647
  readonly schemas: {
485
- readonly request: "PortfolioVaRRequest";
486
- readonly response: "PortfolioVaRResponse";
648
+ readonly request: "DeskHoldingCreateRequest";
649
+ readonly response: "PortfolioCreateResponse";
487
650
  };
488
651
  };
489
652
  readonly cli: {
490
- readonly group: "analytics";
491
- readonly command: "var";
492
- readonly summary: "Calculate one-day Value-at-Risk for a portfolio or basket.";
493
- readonly positional: readonly [];
653
+ readonly group: "holdings";
654
+ readonly command: "create";
655
+ readonly summary: "Create a new holding.";
656
+ readonly positional: readonly [{
657
+ readonly kind: "positional";
658
+ readonly name: "name";
659
+ readonly type: "string";
660
+ readonly required: true;
661
+ readonly placeholder: "NOME";
662
+ readonly description: "Name to save.";
663
+ }];
494
664
  readonly options: readonly [{
495
665
  readonly kind: "option";
496
- readonly flag: "--portfolio";
497
- readonly name: "portfolio_id";
498
- readonly type: "integer";
666
+ readonly flag: "--mode";
667
+ readonly name: "default_allocation_input";
668
+ readonly type: "enum";
499
669
  readonly required: false;
500
- readonly placeholder: "ID";
501
- readonly exclusiveGroup: "source";
502
- readonly description: "Saved portfolio id. Use exactly one source: --portfolio or repeated --asset.";
670
+ readonly placeholder: "target|position";
671
+ readonly defaultValue: "target";
672
+ readonly enumValues: readonly ["target", "position"];
673
+ readonly description: "How the holding is controlled initially: target weights or positions.";
503
674
  }, {
504
675
  readonly kind: "option";
505
- readonly flag: "--asset";
506
- readonly name: "assets";
676
+ readonly flag: "--target";
677
+ readonly name: "targets";
507
678
  readonly type: "string_array";
508
679
  readonly required: false;
509
- readonly placeholder: "TICKER[:PESO]";
680
+ readonly placeholder: "TICKER:PESO";
510
681
  readonly multiple: true;
511
682
  readonly collectionFormat: "repeatable";
512
- readonly exclusiveGroup: "source";
513
- readonly description: "Repeatable ad-hoc asset input using TICKER[:WEIGHT_PCT], for example PRIO3:120 or WINFUT:-20.";
514
- }, {
515
- readonly kind: "option";
516
- readonly flag: "--years";
517
- readonly name: "years";
518
- readonly type: "integer";
519
- readonly required: false;
520
- readonly placeholder: "ANOS";
521
- readonly defaultValue: 1;
522
- readonly description: "Historical lookback window in years. The VaR horizon remains one day.";
523
- }, {
524
- readonly kind: "option";
525
- readonly flag: "--confidence";
526
- readonly name: "confidence_pct";
527
- readonly type: "number";
528
- readonly required: false;
529
- readonly placeholder: "PERCENTUAL";
530
- readonly defaultValue: 95;
531
- readonly description: "Confidence level in percent, for example 95 or 99.";
683
+ readonly description: "Initial target weight in TICKER:WEIGHT_PCT form.";
532
684
  }];
533
- 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"];
685
+ readonly examples: readonly ["quantbrasil holdings create \"Longo Prazo\"", "quantbrasil holdings create \"Teórica\" --target PRIO3:50 --target VALE3:50", "quantbrasil holdings create \"Real\" --mode position"];
534
686
  };
535
687
  readonly tool: {
536
- readonly name: "qb_portfolio_var";
537
- readonly title: "Calculate portfolio VaR";
688
+ readonly name: "qb_holding_create";
689
+ readonly title: "Create holding";
538
690
  };
539
691
  readonly outputModes: readonly ["json", "human"];
540
- }];
541
- export type CapabilityId = (typeof capabilityRegistry)[number]["id"];
542
- export declare const capabilityRegistryById: Record<CapabilityId, (typeof capabilityRegistry)[number]>;
543
- export declare function getCapabilityById(id: CapabilityId): {
544
- readonly id: "market.assets";
545
- readonly kind: "read";
692
+ }, {
693
+ readonly id: "holdings.rename";
694
+ readonly kind: "mutation";
546
695
  readonly visibility: readonly ["cli", "opencode"];
547
- readonly description: "List the monitored QuantBrasil asset universe, optionally filtered by tracked asset type.";
696
+ readonly description: "Rename a holding owned by the authenticated user.";
548
697
  readonly http: {
549
- readonly method: "GET";
550
- readonly path: "/api/desk/tools/market/assets";
551
- readonly inputMode: "query";
698
+ readonly method: "POST";
699
+ readonly path: "/api/desk/tools/holding/rename";
700
+ readonly inputMode: "json_body";
552
701
  readonly schemas: {
553
- readonly request: null;
554
- readonly response: "MonitoredAssetsResponse";
702
+ readonly request: "PortfolioRenameRequest";
703
+ readonly response: "PortfolioMutationResponse";
555
704
  };
556
705
  };
557
706
  readonly cli: {
558
- readonly group: "market";
559
- readonly command: "assets";
560
- readonly summary: "List monitored asset tickers.";
561
- readonly positional: readonly [];
562
- readonly options: readonly [{
563
- readonly kind: "option";
707
+ readonly group: "holdings";
708
+ readonly command: "rename";
709
+ readonly summary: "Rename an existing holding.";
710
+ readonly positional: readonly [{
711
+ readonly kind: "positional";
712
+ readonly name: "portfolio_id";
713
+ readonly type: "integer";
714
+ readonly required: true;
715
+ readonly placeholder: "ID";
716
+ readonly description: "Stable saved object identifier.";
717
+ }, {
718
+ readonly kind: "positional";
719
+ readonly name: "name";
720
+ readonly type: "string";
721
+ readonly required: true;
722
+ readonly placeholder: "NOME";
723
+ readonly description: "Name to save.";
724
+ }];
725
+ readonly options: readonly [];
726
+ readonly examples: readonly ["quantbrasil holdings rename 123 \"Longo Prazo\""];
727
+ };
728
+ readonly tool: {
729
+ readonly name: "qb_holding_rename";
730
+ readonly title: "Rename holding";
731
+ };
732
+ readonly outputModes: readonly ["json", "human"];
733
+ }, {
734
+ readonly id: "holdings.set-targets";
735
+ readonly kind: "mutation";
736
+ readonly visibility: readonly ["cli", "opencode"];
737
+ readonly description: "Set target weights for a holding owned by the authenticated user.";
738
+ readonly http: {
739
+ readonly method: "POST";
740
+ readonly path: "/api/desk/tools/holding/set_targets";
741
+ readonly inputMode: "json_body";
742
+ readonly schemas: {
743
+ readonly request: "HoldingSetTargetsRequest";
744
+ readonly response: "PortfolioMutationResponse";
745
+ };
746
+ };
747
+ readonly cli: {
748
+ readonly group: "holdings";
749
+ readonly command: "set-targets";
750
+ readonly summary: "Set target weights for a holding.";
751
+ readonly positional: readonly [{
752
+ readonly kind: "positional";
753
+ readonly name: "portfolio_id";
754
+ readonly type: "integer";
755
+ readonly required: true;
756
+ readonly placeholder: "ID";
757
+ readonly description: "Stable saved object identifier.";
758
+ }, {
759
+ readonly kind: "positional";
760
+ readonly name: "targets";
761
+ readonly type: "string_array";
762
+ readonly required: true;
763
+ readonly placeholder: "TICKER:PESO";
764
+ readonly multiple: true;
765
+ readonly collectionFormat: "space_separated";
766
+ readonly description: "One or more target weights in TICKER:WEIGHT_PCT form.";
767
+ }];
768
+ readonly options: readonly [];
769
+ readonly examples: readonly ["quantbrasil holdings set-targets 123 PRIO3:50 VALE3:50"];
770
+ };
771
+ readonly tool: {
772
+ readonly name: "qb_holding_set_targets";
773
+ readonly title: "Set holding target weights";
774
+ };
775
+ readonly outputModes: readonly ["json", "human"];
776
+ }, {
777
+ readonly id: "holdings.set-positions";
778
+ readonly kind: "mutation";
779
+ readonly visibility: readonly ["cli", "opencode"];
780
+ readonly description: "Set position quantities for a holding owned by the authenticated user.";
781
+ readonly http: {
782
+ readonly method: "POST";
783
+ readonly path: "/api/desk/tools/holding/set_positions";
784
+ readonly inputMode: "json_body";
785
+ readonly schemas: {
786
+ readonly request: "HoldingSetPositionsRequest";
787
+ readonly response: "PortfolioMutationResponse";
788
+ };
789
+ };
790
+ readonly cli: {
791
+ readonly group: "holdings";
792
+ readonly command: "set-positions";
793
+ readonly summary: "Set position quantities for a holding.";
794
+ readonly positional: readonly [{
795
+ readonly kind: "positional";
796
+ readonly name: "portfolio_id";
797
+ readonly type: "integer";
798
+ readonly required: true;
799
+ readonly placeholder: "ID";
800
+ readonly description: "Stable saved object identifier.";
801
+ }, {
802
+ readonly kind: "positional";
803
+ readonly name: "positions";
804
+ readonly type: "string_array";
805
+ readonly required: true;
806
+ readonly placeholder: "TICKER:QUANTIDADE";
807
+ readonly multiple: true;
808
+ readonly collectionFormat: "space_separated";
809
+ readonly description: "One or more position quantities in TICKER:QUANTITY form.";
810
+ }];
811
+ readonly options: readonly [];
812
+ readonly examples: readonly ["quantbrasil holdings set-positions 123 PRIO3:1600 BTC-USD:0.25"];
813
+ };
814
+ readonly tool: {
815
+ readonly name: "qb_holding_set_positions";
816
+ readonly title: "Set holding position quantities";
817
+ };
818
+ readonly outputModes: readonly ["json", "human"];
819
+ }, {
820
+ readonly id: "holdings.historical-return";
821
+ readonly kind: "read";
822
+ readonly visibility: readonly ["cli", "opencode"];
823
+ readonly description: "Calculate historical return for a holding.";
824
+ readonly http: {
825
+ readonly method: "POST";
826
+ readonly path: "/api/desk/tools/holding/historical_return";
827
+ readonly inputMode: "json_body";
828
+ readonly schemas: {
829
+ readonly request: "PortfolioHistoricalReturnRequest";
830
+ readonly response: "HistoricalReturnResponse";
831
+ };
832
+ };
833
+ readonly cli: {
834
+ readonly group: "holdings";
835
+ readonly command: "historical-return";
836
+ readonly summary: "Calculate historical return for a saved holding.";
837
+ readonly positional: readonly [{
838
+ readonly kind: "positional";
839
+ readonly name: "portfolio_id";
840
+ readonly type: "integer";
841
+ readonly required: true;
842
+ readonly placeholder: "ID";
843
+ readonly description: "Stable saved object identifier.";
844
+ }];
845
+ readonly options: readonly [{
846
+ readonly kind: "option";
847
+ readonly flag: "--from";
848
+ readonly name: "start_date";
849
+ readonly type: "string";
850
+ readonly required: false;
851
+ readonly placeholder: "AAAA-MM-DD";
852
+ readonly description: "Inclusive start date in ISO format. Use with --to, or use --period.";
853
+ }, {
854
+ readonly kind: "option";
855
+ readonly flag: "--to";
856
+ readonly name: "end_date";
857
+ readonly type: "string";
858
+ readonly required: false;
859
+ readonly placeholder: "AAAA-MM-DD";
860
+ readonly description: "Inclusive end date in ISO format. Use with --from, or use --period.";
861
+ }, {
862
+ readonly kind: "option";
863
+ readonly flag: "--period";
864
+ readonly name: "period";
865
+ readonly type: "string";
866
+ readonly required: false;
867
+ readonly placeholder: "PERIODO";
868
+ readonly description: "Lookback period such as 1y, 3y, 5y, or 6m. Mutually exclusive with --from/--to.";
869
+ }];
870
+ readonly examples: readonly ["quantbrasil holdings historical-return 123 --from 2024-01-01 --to 2025-01-01", "quantbrasil holdings historical-return 123 --period 1y"];
871
+ };
872
+ readonly tool: {
873
+ readonly name: "qb_holding_historical_return";
874
+ readonly title: "Calculate holding historical return";
875
+ };
876
+ readonly outputModes: readonly ["json", "human"];
877
+ }, {
878
+ readonly id: "holdings.beta";
879
+ readonly kind: "read";
880
+ readonly visibility: readonly ["cli", "opencode"];
881
+ readonly description: "Calculate holding beta against IBOV.";
882
+ readonly http: {
883
+ readonly method: "POST";
884
+ readonly path: "/api/desk/tools/holding/beta";
885
+ readonly inputMode: "json_body";
886
+ readonly schemas: {
887
+ readonly request: "PortfolioBetaRequest";
888
+ readonly response: "PortfolioBetaResponse";
889
+ };
890
+ };
891
+ readonly cli: {
892
+ readonly group: "holdings";
893
+ readonly command: "beta";
894
+ readonly summary: "Calculate holding beta against IBOV.";
895
+ readonly positional: readonly [{
896
+ readonly kind: "positional";
897
+ readonly name: "portfolio_id";
898
+ readonly type: "integer";
899
+ readonly required: true;
900
+ readonly placeholder: "ID";
901
+ readonly description: "Stable saved object identifier.";
902
+ }];
903
+ readonly options: readonly [{
904
+ readonly kind: "option";
905
+ readonly flag: "--years";
906
+ readonly name: "years";
907
+ readonly type: "enum";
908
+ readonly required: false;
909
+ readonly placeholder: "ANOS";
910
+ readonly defaultValue: 1;
911
+ readonly enumValues: readonly ["1", "3", "5"];
912
+ readonly description: "Historical lookback window in years. Accepted values: 1, 3, or 5.";
913
+ }];
914
+ readonly examples: readonly ["quantbrasil holdings beta 123 --years 3"];
915
+ };
916
+ readonly tool: {
917
+ readonly name: "qb_holding_beta";
918
+ readonly title: "Calculate holding beta";
919
+ };
920
+ readonly outputModes: readonly ["json", "human"];
921
+ }, {
922
+ readonly id: "holdings.var";
923
+ readonly kind: "read";
924
+ readonly visibility: readonly ["cli", "opencode"];
925
+ readonly description: "Calculate one-day Value-at-Risk for a holding.";
926
+ readonly http: {
927
+ readonly method: "POST";
928
+ readonly path: "/api/desk/tools/holding/var";
929
+ readonly inputMode: "json_body";
930
+ readonly schemas: {
931
+ readonly request: "PortfolioVaRRequest";
932
+ readonly response: "PortfolioVaRResponse";
933
+ };
934
+ };
935
+ readonly cli: {
936
+ readonly group: "holdings";
937
+ readonly command: "var";
938
+ readonly summary: "Calculate one-day Value-at-Risk for a holding.";
939
+ readonly positional: readonly [{
940
+ readonly kind: "positional";
941
+ readonly name: "portfolio_id";
942
+ readonly type: "integer";
943
+ readonly required: true;
944
+ readonly placeholder: "ID";
945
+ readonly description: "Stable saved object identifier.";
946
+ }];
947
+ readonly options: readonly [{
948
+ readonly kind: "option";
949
+ readonly flag: "--years";
950
+ readonly name: "years";
951
+ readonly type: "integer";
952
+ readonly required: false;
953
+ readonly placeholder: "ANOS";
954
+ readonly defaultValue: 1;
955
+ readonly description: "Historical lookback window in years. The VaR horizon remains one day.";
956
+ }, {
957
+ readonly kind: "option";
958
+ readonly flag: "--confidence";
959
+ readonly name: "confidence_pct";
960
+ readonly type: "number";
961
+ readonly required: false;
962
+ readonly placeholder: "PERCENTUAL";
963
+ readonly defaultValue: 95;
964
+ readonly description: "Confidence level in percent, for example 95 or 99.";
965
+ }];
966
+ readonly examples: readonly ["quantbrasil holdings var 123 --years 1 --confidence 95"];
967
+ };
968
+ readonly tool: {
969
+ readonly name: "qb_holding_var";
970
+ readonly title: "Calculate holding VaR";
971
+ };
972
+ readonly outputModes: readonly ["json", "human"];
973
+ }];
974
+ export type CapabilityId = (typeof capabilityRegistry)[number]["id"];
975
+ export declare const capabilityRegistryById: Record<CapabilityId, (typeof capabilityRegistry)[number]>;
976
+ export declare function getCapabilityById(id: CapabilityId): {
977
+ readonly id: "market.assets";
978
+ readonly kind: "read";
979
+ readonly visibility: readonly ["cli", "opencode"];
980
+ readonly description: "List the monitored QuantBrasil asset universe, optionally filtered by tracked asset type.";
981
+ readonly http: {
982
+ readonly method: "GET";
983
+ readonly path: "/api/desk/tools/market/assets";
984
+ readonly inputMode: "query";
985
+ readonly schemas: {
986
+ readonly request: null;
987
+ readonly response: "MonitoredAssetsResponse";
988
+ };
989
+ };
990
+ readonly cli: {
991
+ readonly group: "market";
992
+ readonly command: "assets";
993
+ readonly summary: "List monitored asset tickers.";
994
+ readonly positional: readonly [];
995
+ readonly options: readonly [{
996
+ readonly kind: "option";
564
997
  readonly flag: "--type";
565
998
  readonly name: "type";
566
999
  readonly type: "enum";
@@ -568,118 +1001,562 @@ export declare function getCapabilityById(id: CapabilityId): {
568
1001
  readonly placeholder: "TIPO";
569
1002
  readonly enumValues: readonly ["B3", "ETF", "ETF-US", "BDR", "Futuro", "Crypto", "S&P500"];
570
1003
  readonly description: "Filter by the exact monitored asset type.";
1004
+ }, {
1005
+ readonly kind: "option";
1006
+ readonly flag: "--search";
1007
+ readonly name: "search";
1008
+ readonly type: "string";
1009
+ readonly required: false;
1010
+ readonly placeholder: "TEXTO";
1011
+ readonly description: "Filter monitored tickers by case-insensitive text.";
1012
+ }];
1013
+ readonly examples: readonly ["quantbrasil market assets", "quantbrasil market assets --type B3", "quantbrasil market assets --search BTC"];
1014
+ };
1015
+ readonly tool: {
1016
+ readonly name: "qb_market_assets";
1017
+ readonly title: "List monitored assets";
1018
+ };
1019
+ readonly outputModes: readonly ["json", "human"];
1020
+ } | {
1021
+ readonly id: "market.price";
1022
+ readonly kind: "read";
1023
+ readonly visibility: readonly ["cli", "opencode"];
1024
+ readonly description: "Return the latest or date-specific price snapshot for a single ticker.";
1025
+ readonly http: {
1026
+ readonly method: "POST";
1027
+ readonly path: "/api/desk/tools/market/price";
1028
+ readonly inputMode: "json_body";
1029
+ readonly schemas: {
1030
+ readonly request: "MarketPriceRequest";
1031
+ readonly response: "MarketPriceResponse";
1032
+ };
1033
+ };
1034
+ readonly cli: {
1035
+ readonly group: "market";
1036
+ readonly command: "price";
1037
+ readonly summary: "Get the current or historical price snapshot for one ticker.";
1038
+ readonly positional: readonly [{
1039
+ readonly kind: "positional";
1040
+ readonly name: "ticker";
1041
+ readonly type: "string";
1042
+ readonly required: true;
1043
+ readonly placeholder: "TICKER";
1044
+ readonly description: "Ticker symbol, for example PETR4 or VALE3.";
1045
+ }];
1046
+ readonly options: readonly [{
1047
+ readonly kind: "option";
1048
+ readonly flag: "--date";
1049
+ readonly name: "date";
1050
+ readonly type: "string";
1051
+ readonly required: false;
1052
+ readonly placeholder: "AAAA-MM-DD";
1053
+ readonly description: "Reference date in ISO format. When omitted, returns the latest available price.";
1054
+ }, {
1055
+ readonly kind: "option";
1056
+ readonly flag: "--timeframe";
1057
+ readonly name: "timeframe";
1058
+ readonly type: "string";
1059
+ readonly required: false;
1060
+ readonly placeholder: "TIMEFRAME";
1061
+ readonly defaultValue: "D1";
1062
+ readonly description: "Timeframe identifier. Defaults to D1.";
1063
+ }];
1064
+ readonly examples: readonly ["quantbrasil market price PETR4", "quantbrasil market price PETR4 --date 2026-04-10 --timeframe D1"];
1065
+ };
1066
+ readonly tool: {
1067
+ readonly name: "qb_market_price";
1068
+ readonly title: "Get market price";
1069
+ };
1070
+ readonly outputModes: readonly ["json", "human"];
1071
+ } | {
1072
+ readonly id: "assets.overview";
1073
+ readonly kind: "read";
1074
+ readonly visibility: readonly ["cli", "opencode"];
1075
+ readonly description: "Return a selective asset overview using only the requested sections.";
1076
+ readonly http: {
1077
+ readonly method: "POST";
1078
+ readonly path: "/api/desk/tools/asset/overview";
1079
+ readonly inputMode: "json_body";
1080
+ readonly schemas: {
1081
+ readonly request: "AssetOverviewRequest";
1082
+ readonly response: "AssetOverviewResponse";
1083
+ };
1084
+ };
1085
+ readonly cli: {
1086
+ readonly group: "assets";
1087
+ readonly command: "overview";
1088
+ readonly summary: "Get a section-based overview for one asset.";
1089
+ readonly positional: readonly [{
1090
+ readonly kind: "positional";
1091
+ readonly name: "ticker";
1092
+ readonly type: "string";
1093
+ readonly required: true;
1094
+ readonly placeholder: "TICKER";
1095
+ readonly description: "Ticker symbol, for example PETR4 or VALE3.";
1096
+ }];
1097
+ readonly options: readonly [{
1098
+ readonly kind: "option";
1099
+ readonly flag: "--sections";
1100
+ readonly name: "sections";
1101
+ readonly type: "enum_array";
1102
+ readonly required: true;
1103
+ readonly placeholder: "SEÇÕES";
1104
+ readonly enumValues: readonly ["price", "performance", "momentum", "technicals", "risk", "fundamentals", "rankings"];
1105
+ readonly multiple: true;
1106
+ readonly collectionFormat: "comma_separated";
1107
+ readonly description: "Comma-separated section list. Only request the sections needed for the question.";
1108
+ }];
1109
+ readonly examples: readonly ["quantbrasil assets overview PETR4 --sections price,performance", "quantbrasil assets overview PETR4 --sections price,fundamentals", "quantbrasil assets overview PETR4 --sections price,technicals"];
1110
+ };
1111
+ readonly tool: {
1112
+ readonly name: "qb_asset_overview";
1113
+ readonly title: "Get asset overview";
1114
+ };
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: "SLUG";
1169
+ readonly exclusiveGroup: "ranking_selector";
1170
+ readonly description: "Slug de ranking do sistema retornado por `rankings list`, por exemplo momentum-90d.";
1171
+ }, {
1172
+ readonly kind: "option";
1173
+ readonly flag: "--id";
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 --id 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"];
1197
+ } | {
1198
+ readonly id: "screening.universes";
1199
+ readonly kind: "read";
1200
+ readonly visibility: readonly ["cli", "opencode"];
1201
+ readonly description: "Lista universos salvos e baseados em portfólios disponíveis para screening de indicadores.";
1202
+ readonly http: {
1203
+ readonly method: "GET";
1204
+ readonly path: "/api/desk/tools/screening/universes";
1205
+ readonly inputMode: "none";
1206
+ readonly schemas: {
1207
+ readonly request: null;
1208
+ readonly response: "ScreeningUniversesResponse";
1209
+ };
1210
+ };
1211
+ readonly cli: {
1212
+ readonly group: "screening";
1213
+ readonly command: "universes";
1214
+ readonly summary: "Lista carteiras do sistema, watchlists e carteiras disponíveis para screening.";
1215
+ readonly positional: readonly [];
1216
+ readonly options: readonly [];
1217
+ readonly examples: readonly ["quantbrasil screening universes"];
1218
+ };
1219
+ readonly tool: {
1220
+ readonly name: "qb_screening_universes";
1221
+ readonly title: "Listar universos de screening";
1222
+ };
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"];
1251
+ } | {
1252
+ readonly id: "screening.run";
1253
+ readonly kind: "read";
1254
+ readonly visibility: readonly ["cli", "opencode"];
1255
+ readonly description: "Executa o screener de indicadores existente sobre um universo salvo baseado em portfólio.";
1256
+ readonly http: {
1257
+ readonly method: "POST";
1258
+ readonly path: "/api/desk/tools/screening/run";
1259
+ readonly inputMode: "json_body";
1260
+ readonly schemas: {
1261
+ readonly request: "ScreeningRunRequest";
1262
+ readonly response: "ScreeningRunResponse";
1263
+ };
1264
+ };
1265
+ readonly cli: {
1266
+ readonly group: "screening";
1267
+ readonly command: "run";
1268
+ readonly summary: "Executa screening de indicadores a partir de um payload ScreenerRequest JSON.";
1269
+ readonly positional: readonly [];
1270
+ readonly options: readonly [{
1271
+ readonly kind: "option";
1272
+ readonly flag: "--system";
1273
+ readonly name: "system_slug";
1274
+ readonly type: "string";
1275
+ readonly required: false;
1276
+ readonly placeholder: "SLUG";
1277
+ readonly exclusiveGroup: "screening_universe_selector";
1278
+ readonly description: "Slug da carteira do sistema retornado por `screening universes`, por exemplo acoes-mais-liquidas.";
1279
+ }, {
1280
+ readonly kind: "option";
1281
+ readonly flag: "--watchlist";
1282
+ readonly name: "watchlist_id";
1283
+ readonly type: "integer";
1284
+ readonly required: false;
1285
+ readonly placeholder: "ID";
1286
+ readonly exclusiveGroup: "screening_universe_selector";
1287
+ readonly description: "ID da watchlist retornado por `watchlists list`.";
1288
+ }, {
1289
+ readonly kind: "option";
1290
+ readonly flag: "--holding";
1291
+ readonly name: "holding_id";
1292
+ readonly type: "integer";
1293
+ readonly required: false;
1294
+ readonly placeholder: "ID";
1295
+ readonly exclusiveGroup: "screening_universe_selector";
1296
+ readonly description: "ID da carteira retornado por `holdings list`.";
1297
+ }, {
1298
+ readonly kind: "option";
1299
+ readonly flag: "--query-file";
1300
+ readonly name: "query_file";
1301
+ readonly type: "string";
1302
+ readonly required: true;
1303
+ readonly placeholder: "ARQUIVO|-";
1304
+ readonly description: "Caminho para um arquivo ScreenerRequest JSON completo, ou `-` para ler JSON de stdin.";
1305
+ }, {
1306
+ readonly kind: "option";
1307
+ readonly flag: "--limit";
1308
+ readonly name: "limit";
1309
+ readonly type: "integer";
1310
+ readonly required: false;
1311
+ readonly placeholder: "N";
1312
+ readonly description: "Sobrescreve o limit de topo do ScreenerRequest sem alterar o arquivo da consulta.";
1313
+ }, {
1314
+ readonly kind: "option";
1315
+ readonly flag: "--sort";
1316
+ readonly name: "sort";
1317
+ readonly type: "enum";
1318
+ readonly required: false;
1319
+ readonly placeholder: "price|ticker";
1320
+ readonly enumValues: readonly ["price", "ticker"];
1321
+ readonly description: "Sobrescreve o sort de topo do ScreenerRequest sem alterar o arquivo da consulta.";
571
1322
  }];
572
- readonly examples: readonly ["quantbrasil market assets", "quantbrasil market assets --type B3"];
1323
+ readonly examples: readonly ["quantbrasil screening run --system acoes-mais-liquidas --query-file ./screening.json", "quantbrasil screening run --watchlist 93 --query-file ./screening.json --limit 25", "cat screening.json | quantbrasil screening run --holding 182 --query-file - --sort ticker"];
573
1324
  };
574
1325
  readonly tool: {
575
- readonly name: "qb_market_assets";
576
- readonly title: "List monitored assets";
1326
+ readonly name: "qb_screening_run";
1327
+ readonly title: "Executar screening de indicadores";
577
1328
  };
578
1329
  readonly outputModes: readonly ["json", "human"];
579
1330
  } | {
580
- readonly id: "market.price";
1331
+ readonly id: "watchlists.list";
581
1332
  readonly kind: "read";
582
1333
  readonly visibility: readonly ["cli", "opencode"];
583
- readonly description: "Return the latest or date-specific price snapshot for a single ticker.";
1334
+ readonly description: "List watchlists owned by the authenticated user.";
1335
+ readonly http: {
1336
+ readonly method: "GET";
1337
+ readonly path: "/api/desk/tools/watchlist/list";
1338
+ readonly inputMode: "none";
1339
+ readonly schemas: {
1340
+ readonly request: null;
1341
+ readonly response: "PortfolioListResponse";
1342
+ };
1343
+ };
1344
+ readonly cli: {
1345
+ readonly group: "watchlists";
1346
+ readonly command: "list";
1347
+ readonly summary: "List watchlists for tracking ideas and filters.";
1348
+ readonly positional: readonly [];
1349
+ readonly options: readonly [];
1350
+ readonly examples: readonly ["quantbrasil watchlists list"];
1351
+ };
1352
+ readonly tool: {
1353
+ readonly name: "qb_watchlist_list";
1354
+ readonly title: "List watchlists";
1355
+ };
1356
+ readonly outputModes: readonly ["json", "human"];
1357
+ } | {
1358
+ readonly id: "watchlists.get";
1359
+ readonly kind: "read";
1360
+ readonly visibility: readonly ["cli", "opencode"];
1361
+ readonly description: "Return one watchlist by id, scoped to the acting user.";
584
1362
  readonly http: {
585
1363
  readonly method: "POST";
586
- readonly path: "/api/desk/tools/market/price";
1364
+ readonly path: "/api/desk/tools/watchlist/get";
587
1365
  readonly inputMode: "json_body";
588
1366
  readonly schemas: {
589
- readonly request: "MarketPriceRequest";
590
- readonly response: "MarketPriceResponse";
1367
+ readonly request: "PortfolioGetRequest";
1368
+ readonly response: "PortfolioGetResponse";
591
1369
  };
592
1370
  };
593
1371
  readonly cli: {
594
- readonly group: "market";
595
- readonly command: "price";
596
- readonly summary: "Get the current or historical price snapshot for one ticker.";
1372
+ readonly group: "watchlists";
1373
+ readonly command: "get";
1374
+ readonly summary: "Get a watchlist by id.";
597
1375
  readonly positional: readonly [{
598
1376
  readonly kind: "positional";
599
- readonly name: "ticker";
600
- readonly type: "string";
1377
+ readonly name: "portfolio_id";
1378
+ readonly type: "integer";
601
1379
  readonly required: true;
602
- readonly placeholder: "TICKER";
603
- readonly description: "Ticker symbol, for example PETR4 or VALE3.";
1380
+ readonly placeholder: "ID";
1381
+ readonly description: "Stable saved object identifier.";
604
1382
  }];
605
- readonly options: readonly [{
606
- readonly kind: "option";
607
- readonly flag: "--date";
608
- readonly name: "date";
1383
+ readonly options: readonly [];
1384
+ readonly examples: readonly ["quantbrasil watchlists get 123"];
1385
+ };
1386
+ readonly tool: {
1387
+ readonly name: "qb_watchlist_get";
1388
+ readonly title: "Get watchlist";
1389
+ };
1390
+ readonly outputModes: readonly ["json", "human"];
1391
+ } | {
1392
+ readonly id: "watchlists.create";
1393
+ readonly kind: "mutation";
1394
+ readonly visibility: readonly ["cli", "opencode"];
1395
+ readonly description: "Create a new watchlist for the authenticated user.";
1396
+ readonly http: {
1397
+ readonly method: "POST";
1398
+ readonly path: "/api/desk/tools/watchlist/create";
1399
+ readonly inputMode: "json_body";
1400
+ readonly schemas: {
1401
+ readonly request: "PortfolioCreateRequest";
1402
+ readonly response: "PortfolioCreateResponse";
1403
+ };
1404
+ };
1405
+ readonly cli: {
1406
+ readonly group: "watchlists";
1407
+ readonly command: "create";
1408
+ readonly summary: "Create a new watchlist.";
1409
+ readonly positional: readonly [{
1410
+ readonly kind: "positional";
1411
+ readonly name: "name";
609
1412
  readonly type: "string";
610
- readonly required: false;
611
- readonly placeholder: "AAAA-MM-DD";
612
- readonly description: "Reference date in ISO format. When omitted, returns the latest available price.";
1413
+ readonly required: true;
1414
+ readonly placeholder: "NOME";
1415
+ readonly description: "Name to save.";
1416
+ }];
1417
+ readonly options: readonly [];
1418
+ readonly examples: readonly ["quantbrasil watchlists create \"Dividendos\""];
1419
+ };
1420
+ readonly tool: {
1421
+ readonly name: "qb_watchlist_create";
1422
+ readonly title: "Create watchlist";
1423
+ };
1424
+ readonly outputModes: readonly ["json", "human"];
1425
+ } | {
1426
+ readonly id: "watchlists.rename";
1427
+ readonly kind: "mutation";
1428
+ readonly visibility: readonly ["cli", "opencode"];
1429
+ readonly description: "Rename a watchlist owned by the authenticated user.";
1430
+ readonly http: {
1431
+ readonly method: "POST";
1432
+ readonly path: "/api/desk/tools/watchlist/rename";
1433
+ readonly inputMode: "json_body";
1434
+ readonly schemas: {
1435
+ readonly request: "PortfolioRenameRequest";
1436
+ readonly response: "PortfolioMutationResponse";
1437
+ };
1438
+ };
1439
+ readonly cli: {
1440
+ readonly group: "watchlists";
1441
+ readonly command: "rename";
1442
+ readonly summary: "Rename an existing watchlist.";
1443
+ readonly positional: readonly [{
1444
+ readonly kind: "positional";
1445
+ readonly name: "portfolio_id";
1446
+ readonly type: "integer";
1447
+ readonly required: true;
1448
+ readonly placeholder: "ID";
1449
+ readonly description: "Stable saved object identifier.";
613
1450
  }, {
614
- readonly kind: "option";
615
- readonly flag: "--timeframe";
616
- readonly name: "timeframe";
1451
+ readonly kind: "positional";
1452
+ readonly name: "name";
617
1453
  readonly type: "string";
618
- readonly required: false;
619
- readonly placeholder: "TIMEFRAME";
620
- readonly defaultValue: "D1";
621
- readonly description: "Timeframe identifier. Defaults to D1.";
1454
+ readonly required: true;
1455
+ readonly placeholder: "NOME";
1456
+ readonly description: "Name to save.";
622
1457
  }];
623
- readonly examples: readonly ["quantbrasil market price PETR4", "quantbrasil market price PETR4 --date 2026-04-10 --timeframe D1"];
1458
+ readonly options: readonly [];
1459
+ readonly examples: readonly ["quantbrasil watchlists rename 123 \"Longo Prazo\""];
624
1460
  };
625
1461
  readonly tool: {
626
- readonly name: "qb_market_price";
627
- readonly title: "Get market price";
1462
+ readonly name: "qb_watchlist_rename";
1463
+ readonly title: "Rename watchlist";
628
1464
  };
629
1465
  readonly outputModes: readonly ["json", "human"];
630
1466
  } | {
631
- readonly id: "assets.overview";
632
- readonly kind: "read";
1467
+ readonly id: "watchlists.add-assets";
1468
+ readonly kind: "mutation";
633
1469
  readonly visibility: readonly ["cli", "opencode"];
634
- readonly description: "Return a selective asset overview using only the requested sections.";
1470
+ readonly description: "Add one or more monitored tickers to a watchlist.";
635
1471
  readonly http: {
636
1472
  readonly method: "POST";
637
- readonly path: "/api/desk/tools/asset/overview";
1473
+ readonly path: "/api/desk/tools/watchlist/add_assets";
638
1474
  readonly inputMode: "json_body";
639
1475
  readonly schemas: {
640
- readonly request: "AssetOverviewRequest";
641
- readonly response: "AssetOverviewResponse";
1476
+ readonly request: "PortfolioAddAssetsRequest";
1477
+ readonly response: "PortfolioMutationResponse";
642
1478
  };
643
1479
  };
644
1480
  readonly cli: {
645
- readonly group: "assets";
646
- readonly command: "overview";
647
- readonly summary: "Get a section-based overview for one asset.";
1481
+ readonly group: "watchlists";
1482
+ readonly command: "add-assets";
1483
+ readonly summary: "Add monitored tickers to an existing watchlist.";
648
1484
  readonly positional: readonly [{
649
1485
  readonly kind: "positional";
650
- readonly name: "ticker";
651
- readonly type: "string";
1486
+ readonly name: "portfolio_id";
1487
+ readonly type: "integer";
1488
+ readonly required: true;
1489
+ readonly placeholder: "ID";
1490
+ readonly description: "Stable saved object identifier.";
1491
+ }, {
1492
+ readonly kind: "positional";
1493
+ readonly name: "symbols";
1494
+ readonly type: "string_array";
652
1495
  readonly required: true;
653
1496
  readonly placeholder: "TICKER";
654
- readonly description: "Ticker symbol, for example PETR4 or VALE3.";
1497
+ readonly multiple: true;
1498
+ readonly collectionFormat: "space_separated";
1499
+ readonly description: "One or more monitored ticker symbols.";
655
1500
  }];
656
- readonly options: readonly [{
657
- readonly kind: "option";
658
- readonly flag: "--sections";
659
- readonly name: "sections";
660
- readonly type: "enum_array";
1501
+ readonly options: readonly [];
1502
+ readonly examples: readonly ["quantbrasil watchlists add-assets 123 PETR4 VALE3"];
1503
+ };
1504
+ readonly tool: {
1505
+ readonly name: "qb_watchlist_add_assets";
1506
+ readonly title: "Add watchlist assets";
1507
+ };
1508
+ readonly outputModes: readonly ["json", "human"];
1509
+ } | {
1510
+ readonly id: "watchlists.remove-assets";
1511
+ readonly kind: "mutation";
1512
+ readonly visibility: readonly ["cli", "opencode"];
1513
+ readonly description: "Remove one or more monitored tickers from a watchlist.";
1514
+ readonly http: {
1515
+ readonly method: "POST";
1516
+ readonly path: "/api/desk/tools/watchlist/remove_assets";
1517
+ readonly inputMode: "json_body";
1518
+ readonly schemas: {
1519
+ readonly request: "PortfolioRemoveAssetsRequest";
1520
+ readonly response: "PortfolioMutationResponse";
1521
+ };
1522
+ };
1523
+ readonly cli: {
1524
+ readonly group: "watchlists";
1525
+ readonly command: "remove-assets";
1526
+ readonly summary: "Remove monitored tickers from an existing watchlist.";
1527
+ readonly positional: readonly [{
1528
+ readonly kind: "positional";
1529
+ readonly name: "portfolio_id";
1530
+ readonly type: "integer";
661
1531
  readonly required: true;
662
- readonly placeholder: "SEÇÕES";
663
- readonly enumValues: readonly ["price", "performance", "momentum", "technicals", "risk", "fundamentals", "rankings"];
1532
+ readonly placeholder: "ID";
1533
+ readonly description: "Stable saved object identifier.";
1534
+ }, {
1535
+ readonly kind: "positional";
1536
+ readonly name: "symbols";
1537
+ readonly type: "string_array";
1538
+ readonly required: true;
1539
+ readonly placeholder: "TICKER";
664
1540
  readonly multiple: true;
665
- readonly collectionFormat: "comma_separated";
666
- readonly description: "Comma-separated section list. Only request the sections needed for the question.";
1541
+ readonly collectionFormat: "space_separated";
1542
+ readonly description: "One or more monitored ticker symbols.";
667
1543
  }];
668
- readonly examples: readonly ["quantbrasil assets overview PETR4 --sections price,performance", "quantbrasil assets overview PETR4 --sections price,fundamentals", "quantbrasil assets overview PETR4 --sections price,technicals"];
1544
+ readonly options: readonly [];
1545
+ readonly examples: readonly ["quantbrasil watchlists remove-assets 123 PETR4"];
669
1546
  };
670
1547
  readonly tool: {
671
- readonly name: "qb_asset_overview";
672
- readonly title: "Get asset overview";
1548
+ readonly name: "qb_watchlist_remove_assets";
1549
+ readonly title: "Remove watchlist assets";
673
1550
  };
674
1551
  readonly outputModes: readonly ["json", "human"];
675
1552
  } | {
676
- readonly id: "portfolios.list";
1553
+ readonly id: "holdings.list";
677
1554
  readonly kind: "read";
678
1555
  readonly visibility: readonly ["cli", "opencode"];
679
- readonly description: "List every portfolio owned by the authenticated user.";
1556
+ readonly description: "List holdings owned by the authenticated user.";
680
1557
  readonly http: {
681
1558
  readonly method: "GET";
682
- readonly path: "/api/desk/tools/portfolio/list";
1559
+ readonly path: "/api/desk/tools/holding/list";
683
1560
  readonly inputMode: "none";
684
1561
  readonly schemas: {
685
1562
  readonly request: null;
@@ -687,26 +1564,26 @@ export declare function getCapabilityById(id: CapabilityId): {
687
1564
  };
688
1565
  };
689
1566
  readonly cli: {
690
- readonly group: "portfolios";
1567
+ readonly group: "holdings";
691
1568
  readonly command: "list";
692
- readonly summary: "List the user portfolios available in QuantBrasil.";
1569
+ readonly summary: "List holdings for investable metrics.";
693
1570
  readonly positional: readonly [];
694
1571
  readonly options: readonly [];
695
- readonly examples: readonly ["quantbrasil portfolios list"];
1572
+ readonly examples: readonly ["quantbrasil holdings list"];
696
1573
  };
697
1574
  readonly tool: {
698
- readonly name: "qb_portfolio_list";
699
- readonly title: "List portfolios";
1575
+ readonly name: "qb_holding_list";
1576
+ readonly title: "List holdings";
700
1577
  };
701
1578
  readonly outputModes: readonly ["json", "human"];
702
1579
  } | {
703
- readonly id: "portfolios.get";
1580
+ readonly id: "holdings.get";
704
1581
  readonly kind: "read";
705
1582
  readonly visibility: readonly ["cli", "opencode"];
706
- readonly description: "Return one saved portfolio by id, scoped to the acting user.";
1583
+ readonly description: "Return one holding by id, scoped to the acting user.";
707
1584
  readonly http: {
708
1585
  readonly method: "POST";
709
- readonly path: "/api/desk/tools/portfolio/get";
1586
+ readonly path: "/api/desk/tools/holding/get";
710
1587
  readonly inputMode: "json_body";
711
1588
  readonly schemas: {
712
1589
  readonly request: "PortfolioGetRequest";
@@ -714,67 +1591,87 @@ export declare function getCapabilityById(id: CapabilityId): {
714
1591
  };
715
1592
  };
716
1593
  readonly cli: {
717
- readonly group: "portfolios";
1594
+ readonly group: "holdings";
718
1595
  readonly command: "get";
719
- readonly summary: "Get a saved portfolio by id.";
1596
+ readonly summary: "Get a holding by id.";
720
1597
  readonly positional: readonly [{
721
1598
  readonly kind: "positional";
722
1599
  readonly name: "portfolio_id";
723
1600
  readonly type: "integer";
724
1601
  readonly required: true;
725
1602
  readonly placeholder: "ID";
726
- readonly description: "Saved portfolio identifier.";
1603
+ readonly description: "Stable saved object identifier.";
727
1604
  }];
728
1605
  readonly options: readonly [];
729
- readonly examples: readonly ["quantbrasil portfolios get 123"];
1606
+ readonly examples: readonly ["quantbrasil holdings get 123"];
730
1607
  };
731
1608
  readonly tool: {
732
- readonly name: "qb_portfolio_get";
733
- readonly title: "Get portfolio";
1609
+ readonly name: "qb_holding_get";
1610
+ readonly title: "Get holding";
734
1611
  };
735
1612
  readonly outputModes: readonly ["json", "human"];
736
1613
  } | {
737
- readonly id: "portfolios.create";
1614
+ readonly id: "holdings.create";
738
1615
  readonly kind: "mutation";
739
1616
  readonly visibility: readonly ["cli", "opencode"];
740
- readonly description: "Create a new saved portfolio for the authenticated user.";
1617
+ readonly description: "Create a new holding for the authenticated user.";
741
1618
  readonly http: {
742
1619
  readonly method: "POST";
743
- readonly path: "/api/desk/tools/portfolio/create";
1620
+ readonly path: "/api/desk/tools/holding/create";
744
1621
  readonly inputMode: "json_body";
745
1622
  readonly schemas: {
746
- readonly request: "PortfolioCreateRequest";
1623
+ readonly request: "DeskHoldingCreateRequest";
747
1624
  readonly response: "PortfolioCreateResponse";
748
1625
  };
749
1626
  };
750
1627
  readonly cli: {
751
- readonly group: "portfolios";
1628
+ readonly group: "holdings";
752
1629
  readonly command: "create";
753
- readonly summary: "Create a new portfolio.";
1630
+ readonly summary: "Create a new holding.";
754
1631
  readonly positional: readonly [{
755
1632
  readonly kind: "positional";
756
1633
  readonly name: "name";
757
1634
  readonly type: "string";
758
1635
  readonly required: true;
759
1636
  readonly placeholder: "NOME";
760
- readonly description: "Portfolio name to create.";
1637
+ readonly description: "Name to save.";
761
1638
  }];
762
- readonly options: readonly [];
763
- readonly examples: readonly ["quantbrasil portfolios create \"Dividendos\""];
1639
+ readonly options: readonly [{
1640
+ readonly kind: "option";
1641
+ readonly flag: "--mode";
1642
+ readonly name: "default_allocation_input";
1643
+ readonly type: "enum";
1644
+ readonly required: false;
1645
+ readonly placeholder: "target|position";
1646
+ readonly defaultValue: "target";
1647
+ readonly enumValues: readonly ["target", "position"];
1648
+ readonly description: "How the holding is controlled initially: target weights or positions.";
1649
+ }, {
1650
+ readonly kind: "option";
1651
+ readonly flag: "--target";
1652
+ readonly name: "targets";
1653
+ readonly type: "string_array";
1654
+ readonly required: false;
1655
+ readonly placeholder: "TICKER:PESO";
1656
+ readonly multiple: true;
1657
+ readonly collectionFormat: "repeatable";
1658
+ readonly description: "Initial target weight in TICKER:WEIGHT_PCT form.";
1659
+ }];
1660
+ readonly examples: readonly ["quantbrasil holdings create \"Longo Prazo\"", "quantbrasil holdings create \"Teórica\" --target PRIO3:50 --target VALE3:50", "quantbrasil holdings create \"Real\" --mode position"];
764
1661
  };
765
1662
  readonly tool: {
766
- readonly name: "qb_portfolio_create";
767
- readonly title: "Create portfolio";
1663
+ readonly name: "qb_holding_create";
1664
+ readonly title: "Create holding";
768
1665
  };
769
1666
  readonly outputModes: readonly ["json", "human"];
770
1667
  } | {
771
- readonly id: "portfolios.rename";
1668
+ readonly id: "holdings.rename";
772
1669
  readonly kind: "mutation";
773
1670
  readonly visibility: readonly ["cli", "opencode"];
774
- readonly description: "Rename a saved portfolio owned by the authenticated user.";
1671
+ readonly description: "Rename a holding owned by the authenticated user.";
775
1672
  readonly http: {
776
1673
  readonly method: "POST";
777
- readonly path: "/api/desk/tools/portfolio/rename";
1674
+ readonly path: "/api/desk/tools/holding/rename";
778
1675
  readonly inputMode: "json_body";
779
1676
  readonly schemas: {
780
1677
  readonly request: "PortfolioRenameRequest";
@@ -782,126 +1679,126 @@ export declare function getCapabilityById(id: CapabilityId): {
782
1679
  };
783
1680
  };
784
1681
  readonly cli: {
785
- readonly group: "portfolios";
1682
+ readonly group: "holdings";
786
1683
  readonly command: "rename";
787
- readonly summary: "Rename an existing portfolio.";
1684
+ readonly summary: "Rename an existing holding.";
788
1685
  readonly positional: readonly [{
789
1686
  readonly kind: "positional";
790
1687
  readonly name: "portfolio_id";
791
1688
  readonly type: "integer";
792
1689
  readonly required: true;
793
1690
  readonly placeholder: "ID";
794
- readonly description: "Saved portfolio identifier.";
1691
+ readonly description: "Stable saved object identifier.";
795
1692
  }, {
796
1693
  readonly kind: "positional";
797
1694
  readonly name: "name";
798
1695
  readonly type: "string";
799
1696
  readonly required: true;
800
1697
  readonly placeholder: "NOME";
801
- readonly description: "New portfolio name.";
1698
+ readonly description: "Name to save.";
802
1699
  }];
803
1700
  readonly options: readonly [];
804
- readonly examples: readonly ["quantbrasil portfolios rename 123 \"Longo Prazo\""];
1701
+ readonly examples: readonly ["quantbrasil holdings rename 123 \"Longo Prazo\""];
805
1702
  };
806
1703
  readonly tool: {
807
- readonly name: "qb_portfolio_rename";
808
- readonly title: "Rename portfolio";
1704
+ readonly name: "qb_holding_rename";
1705
+ readonly title: "Rename holding";
809
1706
  };
810
1707
  readonly outputModes: readonly ["json", "human"];
811
1708
  } | {
812
- readonly id: "portfolios.add-assets";
1709
+ readonly id: "holdings.set-targets";
813
1710
  readonly kind: "mutation";
814
1711
  readonly visibility: readonly ["cli", "opencode"];
815
- readonly description: "Add one or more monitored tickers to a saved portfolio.";
1712
+ readonly description: "Set target weights for a holding owned by the authenticated user.";
816
1713
  readonly http: {
817
1714
  readonly method: "POST";
818
- readonly path: "/api/desk/tools/portfolio/add_assets";
1715
+ readonly path: "/api/desk/tools/holding/set_targets";
819
1716
  readonly inputMode: "json_body";
820
1717
  readonly schemas: {
821
- readonly request: "PortfolioAddAssetsRequest";
1718
+ readonly request: "HoldingSetTargetsRequest";
822
1719
  readonly response: "PortfolioMutationResponse";
823
1720
  };
824
1721
  };
825
1722
  readonly cli: {
826
- readonly group: "portfolios";
827
- readonly command: "add-assets";
828
- readonly summary: "Add monitored tickers to an existing portfolio.";
1723
+ readonly group: "holdings";
1724
+ readonly command: "set-targets";
1725
+ readonly summary: "Set target weights for a holding.";
829
1726
  readonly positional: readonly [{
830
1727
  readonly kind: "positional";
831
1728
  readonly name: "portfolio_id";
832
1729
  readonly type: "integer";
833
1730
  readonly required: true;
834
1731
  readonly placeholder: "ID";
835
- readonly description: "Saved portfolio identifier.";
1732
+ readonly description: "Stable saved object identifier.";
836
1733
  }, {
837
1734
  readonly kind: "positional";
838
- readonly name: "symbols";
1735
+ readonly name: "targets";
839
1736
  readonly type: "string_array";
840
1737
  readonly required: true;
841
- readonly placeholder: "TICKER";
1738
+ readonly placeholder: "TICKER:PESO";
842
1739
  readonly multiple: true;
843
1740
  readonly collectionFormat: "space_separated";
844
- readonly description: "One or more monitored ticker symbols to add to the portfolio.";
1741
+ readonly description: "One or more target weights in TICKER:WEIGHT_PCT form.";
845
1742
  }];
846
1743
  readonly options: readonly [];
847
- readonly examples: readonly ["quantbrasil portfolios add-assets 123 PETR4 VALE3"];
1744
+ readonly examples: readonly ["quantbrasil holdings set-targets 123 PRIO3:50 VALE3:50"];
848
1745
  };
849
1746
  readonly tool: {
850
- readonly name: "qb_portfolio_add_assets";
851
- readonly title: "Add portfolio assets";
1747
+ readonly name: "qb_holding_set_targets";
1748
+ readonly title: "Set holding target weights";
852
1749
  };
853
1750
  readonly outputModes: readonly ["json", "human"];
854
1751
  } | {
855
- readonly id: "portfolios.remove-assets";
1752
+ readonly id: "holdings.set-positions";
856
1753
  readonly kind: "mutation";
857
1754
  readonly visibility: readonly ["cli", "opencode"];
858
- readonly description: "Remove one or more monitored tickers from a saved portfolio.";
1755
+ readonly description: "Set position quantities for a holding owned by the authenticated user.";
859
1756
  readonly http: {
860
1757
  readonly method: "POST";
861
- readonly path: "/api/desk/tools/portfolio/remove_assets";
1758
+ readonly path: "/api/desk/tools/holding/set_positions";
862
1759
  readonly inputMode: "json_body";
863
1760
  readonly schemas: {
864
- readonly request: "PortfolioRemoveAssetsRequest";
1761
+ readonly request: "HoldingSetPositionsRequest";
865
1762
  readonly response: "PortfolioMutationResponse";
866
1763
  };
867
1764
  };
868
1765
  readonly cli: {
869
- readonly group: "portfolios";
870
- readonly command: "remove-assets";
871
- readonly summary: "Remove monitored tickers from an existing portfolio.";
1766
+ readonly group: "holdings";
1767
+ readonly command: "set-positions";
1768
+ readonly summary: "Set position quantities for a holding.";
872
1769
  readonly positional: readonly [{
873
1770
  readonly kind: "positional";
874
1771
  readonly name: "portfolio_id";
875
1772
  readonly type: "integer";
876
1773
  readonly required: true;
877
1774
  readonly placeholder: "ID";
878
- readonly description: "Saved portfolio identifier.";
1775
+ readonly description: "Stable saved object identifier.";
879
1776
  }, {
880
1777
  readonly kind: "positional";
881
- readonly name: "symbols";
1778
+ readonly name: "positions";
882
1779
  readonly type: "string_array";
883
1780
  readonly required: true;
884
- readonly placeholder: "TICKER";
1781
+ readonly placeholder: "TICKER:QUANTIDADE";
885
1782
  readonly multiple: true;
886
1783
  readonly collectionFormat: "space_separated";
887
- readonly description: "One or more monitored ticker symbols to remove from the portfolio.";
1784
+ readonly description: "One or more position quantities in TICKER:QUANTITY form.";
888
1785
  }];
889
1786
  readonly options: readonly [];
890
- readonly examples: readonly ["quantbrasil portfolios remove-assets 123 PETR4"];
1787
+ readonly examples: readonly ["quantbrasil holdings set-positions 123 PRIO3:1600 BTC-USD:0.25"];
891
1788
  };
892
1789
  readonly tool: {
893
- readonly name: "qb_portfolio_remove_assets";
894
- readonly title: "Remove portfolio assets";
1790
+ readonly name: "qb_holding_set_positions";
1791
+ readonly title: "Set holding position quantities";
895
1792
  };
896
1793
  readonly outputModes: readonly ["json", "human"];
897
1794
  } | {
898
- readonly id: "analytics.historical-return";
1795
+ readonly id: "holdings.historical-return";
899
1796
  readonly kind: "read";
900
1797
  readonly visibility: readonly ["cli", "opencode"];
901
- readonly description: "Calculate historical return for a saved portfolio or an ad-hoc weighted basket.";
1798
+ readonly description: "Calculate historical return for a holding.";
902
1799
  readonly http: {
903
1800
  readonly method: "POST";
904
- readonly path: "/api/desk/tools/portfolio/historical_return";
1801
+ readonly path: "/api/desk/tools/holding/historical_return";
905
1802
  readonly inputMode: "json_body";
906
1803
  readonly schemas: {
907
1804
  readonly request: "PortfolioHistoricalReturnRequest";
@@ -909,62 +1806,57 @@ export declare function getCapabilityById(id: CapabilityId): {
909
1806
  };
910
1807
  };
911
1808
  readonly cli: {
912
- readonly group: "analytics";
1809
+ readonly group: "holdings";
913
1810
  readonly command: "historical-return";
914
- readonly summary: "Calculate historical return for a saved portfolio or repeated --asset inputs.";
915
- readonly positional: readonly [];
916
- readonly options: readonly [{
917
- readonly kind: "option";
918
- readonly flag: "--portfolio";
1811
+ readonly summary: "Calculate historical return for a saved holding.";
1812
+ readonly positional: readonly [{
1813
+ readonly kind: "positional";
919
1814
  readonly name: "portfolio_id";
920
1815
  readonly type: "integer";
921
- readonly required: false;
1816
+ readonly required: true;
922
1817
  readonly placeholder: "ID";
923
- readonly exclusiveGroup: "source";
924
- readonly description: "Saved portfolio id. Use exactly one source: --portfolio or repeated --asset.";
925
- }, {
926
- readonly kind: "option";
927
- readonly flag: "--asset";
928
- readonly name: "assets";
929
- readonly type: "string_array";
930
- readonly required: false;
931
- readonly placeholder: "TICKER[:PESO]";
932
- readonly multiple: true;
933
- readonly collectionFormat: "repeatable";
934
- readonly exclusiveGroup: "source";
935
- readonly description: "Repeatable ad-hoc asset input using TICKER[:WEIGHT_PCT], for example PRIO3:50.";
936
- }, {
1818
+ readonly description: "Stable saved object identifier.";
1819
+ }];
1820
+ readonly options: readonly [{
937
1821
  readonly kind: "option";
938
1822
  readonly flag: "--from";
939
1823
  readonly name: "start_date";
940
1824
  readonly type: "string";
941
- readonly required: true;
1825
+ readonly required: false;
942
1826
  readonly placeholder: "AAAA-MM-DD";
943
- readonly description: "Inclusive start date in ISO format.";
1827
+ readonly description: "Inclusive start date in ISO format. Use with --to, or use --period.";
944
1828
  }, {
945
1829
  readonly kind: "option";
946
1830
  readonly flag: "--to";
947
1831
  readonly name: "end_date";
948
1832
  readonly type: "string";
949
- readonly required: true;
1833
+ readonly required: false;
950
1834
  readonly placeholder: "AAAA-MM-DD";
951
- readonly description: "Inclusive end date in ISO format.";
1835
+ readonly description: "Inclusive end date in ISO format. Use with --from, or use --period.";
1836
+ }, {
1837
+ readonly kind: "option";
1838
+ readonly flag: "--period";
1839
+ readonly name: "period";
1840
+ readonly type: "string";
1841
+ readonly required: false;
1842
+ readonly placeholder: "PERIODO";
1843
+ readonly description: "Lookback period such as 1y, 3y, 5y, or 6m. Mutually exclusive with --from/--to.";
952
1844
  }];
953
- 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"];
1845
+ readonly examples: readonly ["quantbrasil holdings historical-return 123 --from 2024-01-01 --to 2025-01-01", "quantbrasil holdings historical-return 123 --period 1y"];
954
1846
  };
955
1847
  readonly tool: {
956
- readonly name: "qb_historical_return";
957
- readonly title: "Calculate historical return";
1848
+ readonly name: "qb_holding_historical_return";
1849
+ readonly title: "Calculate holding historical return";
958
1850
  };
959
1851
  readonly outputModes: readonly ["json", "human"];
960
1852
  } | {
961
- readonly id: "analytics.beta";
1853
+ readonly id: "holdings.beta";
962
1854
  readonly kind: "read";
963
1855
  readonly visibility: readonly ["cli", "opencode"];
964
- readonly description: "Calculate portfolio beta against IBOV for a saved portfolio or an ad-hoc basket.";
1856
+ readonly description: "Calculate holding beta against IBOV.";
965
1857
  readonly http: {
966
1858
  readonly method: "POST";
967
- readonly path: "/api/desk/tools/portfolio/beta";
1859
+ readonly path: "/api/desk/tools/holding/beta";
968
1860
  readonly inputMode: "json_body";
969
1861
  readonly schemas: {
970
1862
  readonly request: "PortfolioBetaRequest";
@@ -972,31 +1864,18 @@ export declare function getCapabilityById(id: CapabilityId): {
972
1864
  };
973
1865
  };
974
1866
  readonly cli: {
975
- readonly group: "analytics";
1867
+ readonly group: "holdings";
976
1868
  readonly command: "beta";
977
- readonly summary: "Calculate portfolio beta against IBOV.";
978
- readonly positional: readonly [];
979
- readonly options: readonly [{
980
- readonly kind: "option";
981
- readonly flag: "--portfolio";
1869
+ readonly summary: "Calculate holding beta against IBOV.";
1870
+ readonly positional: readonly [{
1871
+ readonly kind: "positional";
982
1872
  readonly name: "portfolio_id";
983
1873
  readonly type: "integer";
984
- readonly required: false;
1874
+ readonly required: true;
985
1875
  readonly placeholder: "ID";
986
- readonly exclusiveGroup: "source";
987
- readonly description: "Saved portfolio id. Use exactly one source: --portfolio or repeated --asset.";
988
- }, {
989
- readonly kind: "option";
990
- readonly flag: "--asset";
991
- readonly name: "assets";
992
- readonly type: "string_array";
993
- readonly required: false;
994
- readonly placeholder: "TICKER[:PESO]";
995
- readonly multiple: true;
996
- readonly collectionFormat: "repeatable";
997
- readonly exclusiveGroup: "source";
998
- readonly description: "Repeatable ad-hoc asset input using TICKER[:WEIGHT_PCT], for example PETR4:120 or WINFUT:-20.";
999
- }, {
1876
+ readonly description: "Stable saved object identifier.";
1877
+ }];
1878
+ readonly options: readonly [{
1000
1879
  readonly kind: "option";
1001
1880
  readonly flag: "--years";
1002
1881
  readonly name: "years";
@@ -1007,21 +1886,21 @@ export declare function getCapabilityById(id: CapabilityId): {
1007
1886
  readonly enumValues: readonly ["1", "3", "5"];
1008
1887
  readonly description: "Historical lookback window in years. Accepted values: 1, 3, or 5.";
1009
1888
  }];
1010
- readonly examples: readonly ["quantbrasil analytics beta --portfolio 123 --years 3", "quantbrasil analytics beta --asset PRIO3:120 --asset WINFUT:-20 --years 1"];
1889
+ readonly examples: readonly ["quantbrasil holdings beta 123 --years 3"];
1011
1890
  };
1012
1891
  readonly tool: {
1013
- readonly name: "qb_portfolio_beta";
1014
- readonly title: "Calculate portfolio beta";
1892
+ readonly name: "qb_holding_beta";
1893
+ readonly title: "Calculate holding beta";
1015
1894
  };
1016
1895
  readonly outputModes: readonly ["json", "human"];
1017
1896
  } | {
1018
- readonly id: "analytics.var";
1897
+ readonly id: "holdings.var";
1019
1898
  readonly kind: "read";
1020
1899
  readonly visibility: readonly ["cli", "opencode"];
1021
- readonly description: "Calculate one-day Value-at-Risk for a saved portfolio or an ad-hoc basket.";
1900
+ readonly description: "Calculate one-day Value-at-Risk for a holding.";
1022
1901
  readonly http: {
1023
1902
  readonly method: "POST";
1024
- readonly path: "/api/desk/tools/portfolio/var";
1903
+ readonly path: "/api/desk/tools/holding/var";
1025
1904
  readonly inputMode: "json_body";
1026
1905
  readonly schemas: {
1027
1906
  readonly request: "PortfolioVaRRequest";
@@ -1029,31 +1908,18 @@ export declare function getCapabilityById(id: CapabilityId): {
1029
1908
  };
1030
1909
  };
1031
1910
  readonly cli: {
1032
- readonly group: "analytics";
1911
+ readonly group: "holdings";
1033
1912
  readonly command: "var";
1034
- readonly summary: "Calculate one-day Value-at-Risk for a portfolio or basket.";
1035
- readonly positional: readonly [];
1036
- readonly options: readonly [{
1037
- readonly kind: "option";
1038
- readonly flag: "--portfolio";
1913
+ readonly summary: "Calculate one-day Value-at-Risk for a holding.";
1914
+ readonly positional: readonly [{
1915
+ readonly kind: "positional";
1039
1916
  readonly name: "portfolio_id";
1040
1917
  readonly type: "integer";
1041
- readonly required: false;
1918
+ readonly required: true;
1042
1919
  readonly placeholder: "ID";
1043
- readonly exclusiveGroup: "source";
1044
- readonly description: "Saved portfolio id. Use exactly one source: --portfolio or repeated --asset.";
1045
- }, {
1046
- readonly kind: "option";
1047
- readonly flag: "--asset";
1048
- readonly name: "assets";
1049
- readonly type: "string_array";
1050
- readonly required: false;
1051
- readonly placeholder: "TICKER[:PESO]";
1052
- readonly multiple: true;
1053
- readonly collectionFormat: "repeatable";
1054
- readonly exclusiveGroup: "source";
1055
- readonly description: "Repeatable ad-hoc asset input using TICKER[:WEIGHT_PCT], for example PRIO3:120 or WINFUT:-20.";
1056
- }, {
1920
+ readonly description: "Stable saved object identifier.";
1921
+ }];
1922
+ readonly options: readonly [{
1057
1923
  readonly kind: "option";
1058
1924
  readonly flag: "--years";
1059
1925
  readonly name: "years";
@@ -1072,11 +1938,11 @@ export declare function getCapabilityById(id: CapabilityId): {
1072
1938
  readonly defaultValue: 95;
1073
1939
  readonly description: "Confidence level in percent, for example 95 or 99.";
1074
1940
  }];
1075
- 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"];
1941
+ readonly examples: readonly ["quantbrasil holdings var 123 --years 1 --confidence 95"];
1076
1942
  };
1077
1943
  readonly tool: {
1078
- readonly name: "qb_portfolio_var";
1079
- readonly title: "Calculate portfolio VaR";
1944
+ readonly name: "qb_holding_var";
1945
+ readonly title: "Calculate holding VaR";
1080
1946
  };
1081
1947
  readonly outputModes: readonly ["json", "human"];
1082
1948
  };