@thinkingai/ae-cli 6.0.22 → 6.0.24

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 (94) hide show
  1. package/dist/{auth-RDN6D5HU.js → auth-A2XXG5K4.js} +7 -11
  2. package/dist/auth-IDPKDFSY.js +13 -0
  3. package/dist/{chunk-4EUZRJPO.js → chunk-2OW2RENH.js} +40 -10
  4. package/dist/{chunk-H52CSLJW.js → chunk-4FQ36OGO.js} +4 -4
  5. package/dist/chunk-AKORWVHJ.js +59 -0
  6. package/dist/{chunk-E34XH4GW.js → chunk-F3ZDMC2W.js} +8 -8
  7. package/dist/chunk-FIT4CFIN.js +59 -0
  8. package/dist/{chunk-2W7HULUD.js → chunk-IDXW6MEJ.js} +2 -2
  9. package/dist/{chunk-5FBLRSMU.js → chunk-NGJDCOYA.js} +3 -3
  10. package/dist/chunk-NXJP4CES.js +209 -0
  11. package/dist/{chunk-FPE5LGVU.js → chunk-OCQPQYHZ.js} +2 -2
  12. package/dist/{chunk-YACCPUNQ.js → chunk-ONOA6DYB.js} +1 -1
  13. package/dist/{chunk-U6QPKCN3.js → chunk-PFJFZVCK.js} +8 -115
  14. package/dist/chunk-V5R5UIRM.js +195 -0
  15. package/dist/{chunk-XE2PI5DS.js → chunk-WXBCP6SD.js} +1 -1
  16. package/dist/{cli-token-6AGEDJF4.js → cli-token-OZXHC3U2.js} +3 -3
  17. package/dist/{client-VTJMUZ4O.js → client-7L735LVY.js} +3 -3
  18. package/dist/{config-2SDTLGOC.js → config-SXD2JKSL.js} +3 -3
  19. package/dist/index.js +27 -24
  20. package/dist/{metadata-JZ2OTWBK.js → metadata-QWUAX625.js} +56 -65
  21. package/dist/metadata-XWTEGEN2.js +411 -0
  22. package/dist/{model-ZYMRN4VS.js → model-3OVX42DA.js} +2 -2
  23. package/dist/{raw-NGYHAL3F.js → raw-IANB4AV5.js} +4 -4
  24. package/dist/{sync-JVLX6TGW.js → sync-4HQ3CXSK.js} +3 -3
  25. package/dist/{te-agent-QPZTLHPH.js → te-agent-OYNNTJDU.js} +2 -2
  26. package/dist/{te-analysis-WWX3Z6RP.js → te-analysis-CRPFK3LX.js} +1074 -340
  27. package/dist/te-analysis-JX3V76OI.js +2281 -0
  28. package/dist/{te-audience-UXGHUVBB.js → te-audience-77FGNG5E.js} +5 -5
  29. package/dist/te-audience-RO2IZOUC.js +599 -0
  30. package/dist/{te-common-7XXH73MF.js → te-common-4TRJPRC5.js} +5 -5
  31. package/dist/te-common-PUXBUPOL.js +130 -0
  32. package/dist/{te-community-QKE67HR2.js → te-community-NPDZQKMY.js} +5 -5
  33. package/dist/te-community-XKE526DS.js +687 -0
  34. package/dist/{te-dataops-6W7NNYST.js → te-dataops-6KWLFNV4.js} +5 -5
  35. package/dist/te-dataops-PW74WP76.js +1842 -0
  36. package/dist/{te-engage-NCFAQFX3.js → te-engage-HTLMUN7G.js} +5 -5
  37. package/dist/te-engage-YPQIVF5H.js +1510 -0
  38. package/dist/{te-kb-K5BQYUCM.js → te-kb-DOGDQIU4.js} +4 -4
  39. package/dist/{te-meta-LJZBOSMO.js → te-meta-5ESSQ5B3.js} +5 -5
  40. package/dist/te-meta-Z47X4VT3.js +595 -0
  41. package/dist/{te-team-DHK5R7MV.js → te-team-SOVKZIDD.js} +5 -5
  42. package/package.json +1 -1
  43. package/skills/ae-analysis/SKILL.md +51 -25
  44. package/skills/ae-analysis/references/analysis_gateway_assets.md +114 -0
  45. package/skills/ae-analysis/references/bi_panel_copy.md +15 -0
  46. package/skills/ae-analysis/references/bi_panel_create.md +15 -0
  47. package/skills/ae-analysis/references/bi_panel_delete.md +15 -0
  48. package/skills/ae-analysis/references/bi_panel_get.md +18 -0
  49. package/skills/ae-analysis/references/bi_panel_list.md +15 -0
  50. package/skills/ae-analysis/references/bi_panel_page_data_export.md +15 -0
  51. package/skills/ae-analysis/references/bi_panel_page_data_run.md +15 -0
  52. package/skills/ae-analysis/references/bi_panel_share.md +15 -0
  53. package/skills/ae-analysis/references/bi_panel_update.md +15 -0
  54. package/skills/ae-analysis/references/dashboard_abnormal_get.md +15 -0
  55. package/skills/ae-analysis/references/dashboard_copy.md +15 -0
  56. package/skills/ae-analysis/references/dashboard_create.md +15 -0
  57. package/skills/ae-analysis/references/dashboard_daily_report_send.md +15 -0
  58. package/skills/ae-analysis/references/dashboard_daily_report_update.md +15 -0
  59. package/skills/ae-analysis/references/dashboard_definition_export.md +15 -0
  60. package/skills/ae-analysis/references/dashboard_definition_import.md +15 -0
  61. package/skills/ae-analysis/references/dashboard_delete.md +15 -0
  62. package/skills/ae-analysis/references/dashboard_freeze.md +15 -0
  63. package/skills/ae-analysis/references/dashboard_get.md +15 -0
  64. package/skills/ae-analysis/references/dashboard_handover.md +15 -0
  65. package/skills/ae-analysis/references/dashboard_list.md +15 -0
  66. package/skills/ae-analysis/references/dashboard_report_data_export.md +15 -0
  67. package/skills/ae-analysis/references/dashboard_report_data_run.md +15 -0
  68. package/skills/ae-analysis/references/dashboard_share.md +15 -0
  69. package/skills/ae-analysis/references/dashboard_share_info.md +15 -0
  70. package/skills/ae-analysis/references/dashboard_task_status.md +15 -0
  71. package/skills/ae-analysis/references/dashboard_update.md +16 -0
  72. package/skills/ae-analysis/references/favorite_add.md +15 -0
  73. package/skills/ae-analysis/references/favorite_remove.md +15 -0
  74. package/skills/ae-analysis/references/folder_create.md +15 -0
  75. package/skills/ae-analysis/references/folder_delete.md +15 -0
  76. package/skills/ae-analysis/references/folder_members.md +15 -0
  77. package/skills/ae-analysis/references/folder_share.md +15 -0
  78. package/skills/ae-analysis/references/project_space_create.md +15 -0
  79. package/skills/ae-analysis/references/project_space_delete.md +15 -0
  80. package/skills/ae-analysis/references/project_space_get.md +18 -0
  81. package/skills/ae-analysis/references/project_space_list.md +15 -0
  82. package/skills/ae-analysis/references/project_space_members.md +15 -0
  83. package/skills/ae-analysis/references/project_space_share.md +15 -0
  84. package/skills/ae-analysis/references/public_link_create.md +15 -0
  85. package/skills/ae-analysis/references/public_link_delete.md +15 -0
  86. package/skills/ae-analysis/references/public_link_list.md +15 -0
  87. package/skills/ae-analysis/references/public_link_offline.md +15 -0
  88. package/skills/ae-analysis/references/public_link_update.md +15 -0
  89. package/skills/ae-analysis/references/query_cancel.md +15 -0
  90. package/skills/ae-metadata/references/metadata_data_table_csv_write.md +5 -3
  91. package/skills/ae-metadata/references/metadata_data_table_sql_write.md +5 -4
  92. package/skills/ae-metadata/references/metadata_property_dimension_table_create_and_bind_csv.md +5 -3
  93. package/dist/auth-I2G7OAU2.js +0 -19
  94. package/dist/{chunk-WPXHCP4A.js → chunk-65DKFJZB.js} +3 -3
@@ -1,16 +1,20 @@
1
- import "./chunk-4EUZRJPO.js";
1
+ import {
2
+ createCapabilityCommand,
3
+ registerCapabilityGatewayRoute
4
+ } from "./chunk-FIT4CFIN.js";
5
+ import "./chunk-2OW2RENH.js";
2
6
  import {
3
7
  callMcpTool,
4
8
  parseMcpResult,
5
9
  resolveMcpUrl
6
- } from "./chunk-5FBLRSMU.js";
10
+ } from "./chunk-NGJDCOYA.js";
7
11
  import {
8
12
  isGlobalQueryModeEnabled
9
- } from "./chunk-XE2PI5DS.js";
13
+ } from "./chunk-WXBCP6SD.js";
10
14
  import "./chunk-NOO24N7W.js";
11
- import "./chunk-FPE5LGVU.js";
12
- import "./chunk-U6QPKCN3.js";
13
- import "./chunk-WPXHCP4A.js";
15
+ import "./chunk-OCQPQYHZ.js";
16
+ import "./chunk-PFJFZVCK.js";
17
+ import "./chunk-65DKFJZB.js";
14
18
 
15
19
  // src/commands/te-analysis/shared.ts
16
20
  function createMcpCommand(config) {
@@ -389,439 +393,1158 @@ var commands2 = [
389
393
  ];
390
394
  var report_default = commands2;
391
395
 
392
- // src/commands/te-analysis/dashboard/list-dashboards.ts
393
- var listDashboards = createMcpCommand({
394
- command: "+list_dashboards",
395
- description: "List dashboard metadata accessible to the current user in the project. Supports keyword filtering and returns paginated dashboard summaries. Default returned fields: dashboardId, dashboardName, remark. Dashboard metadata exposes remark but no separate desc field.",
396
+ // src/commands/te-analysis/capability-shared.ts
397
+ function createAnalysisCapabilityCommand(config) {
398
+ return createCapabilityCommand({
399
+ ...config,
400
+ cliService: "analysis"
401
+ });
402
+ }
403
+ var projectIdFlag = {
404
+ name: "project-id",
405
+ type: "number",
406
+ required: true,
407
+ desc: "Numeric project ID.",
408
+ alias: "p"
409
+ };
410
+ var queryFlag = {
411
+ name: "query",
412
+ type: "string",
413
+ required: false,
414
+ desc: "Optional keyword filter.",
415
+ alias: "q"
416
+ };
417
+ var fieldsFlag = {
418
+ name: "fields",
419
+ type: "json",
420
+ required: false,
421
+ desc: "Optional result field projection JSON array.",
422
+ alias: "f"
423
+ };
424
+ var limitFlag = {
425
+ name: "limit",
426
+ type: "number",
427
+ required: false,
428
+ desc: "Optional inline result limit.",
429
+ alias: "l"
430
+ };
431
+ var offsetFlag = {
432
+ name: "offset",
433
+ type: "number",
434
+ required: false,
435
+ desc: "Optional zero-based result offset.",
436
+ alias: "o"
437
+ };
438
+ var payloadFlag = {
439
+ name: "payload",
440
+ type: "json",
441
+ required: false,
442
+ desc: "Optional snake_case object for complex capability payload fields."
443
+ };
444
+ function projectInput(ctx) {
445
+ return { project_id: ctx.num("project-id") };
446
+ }
447
+ function listInput(ctx) {
448
+ return compactInput({
449
+ ...projectInput(ctx),
450
+ query: optionalString3(ctx, "query"),
451
+ fields: optionalJson4(ctx, "fields"),
452
+ limit: optionalNumber3(ctx, "limit"),
453
+ offset: optionalNumber3(ctx, "offset")
454
+ });
455
+ }
456
+ function dashboardReportDataInput(ctx) {
457
+ return compactInput({
458
+ ...projectInput(ctx),
459
+ dashboard_id: ctx.num("dashboard-id"),
460
+ report_ids: optionalJsonArray(ctx, "report-ids"),
461
+ filters: optionalJson4(ctx, "filters"),
462
+ start_time: optionalString3(ctx, "start-time"),
463
+ end_time: optionalString3(ctx, "end-time"),
464
+ use_cache: optionalBoolean5(ctx, "use-cache"),
465
+ request_id: optionalString3(ctx, "request-id"),
466
+ timeout_seconds: optionalNumber3(ctx, "timeout-seconds"),
467
+ limit: optionalNumber3(ctx, "limit"),
468
+ format: optionalString3(ctx, "artifact-format")
469
+ });
470
+ }
471
+ function biPanelPageDataInput(ctx) {
472
+ return compactInput({
473
+ ...projectInput(ctx),
474
+ panel_id: ctx.num("panel-id"),
475
+ page_key: ctx.str("page-key"),
476
+ result_type: ctx.str("result-type"),
477
+ chart_ids: optionalJsonArray(ctx, "chart-ids"),
478
+ parameter_controls: optionalJson4(ctx, "parameter-controls"),
479
+ permission_controls: optionalJson4(ctx, "permission-controls"),
480
+ chart_filter_controls: optionalJson4(ctx, "chart-filter-controls"),
481
+ columns: optionalJson4(ctx, "columns"),
482
+ row_limit: optionalNumber3(ctx, "row-limit"),
483
+ row_offset: optionalNumber3(ctx, "row-offset"),
484
+ block_limit: optionalNumber3(ctx, "block-limit"),
485
+ block_offset: optionalNumber3(ctx, "block-offset"),
486
+ use_cache: optionalBoolean5(ctx, "use-cache"),
487
+ request_id: optionalString3(ctx, "request-id"),
488
+ timeout_seconds: optionalNumber3(ctx, "timeout-seconds"),
489
+ limit: optionalNumber3(ctx, "limit"),
490
+ format: optionalString3(ctx, "artifact-format")
491
+ });
492
+ }
493
+ function optionalString3(ctx, name) {
494
+ const value = ctx.str(name);
495
+ return value === "" ? void 0 : value;
496
+ }
497
+ function optionalNumber3(ctx, name) {
498
+ const value = ctx.str(name);
499
+ return value === "" ? void 0 : Number(value);
500
+ }
501
+ function optionalBoolean5(ctx, name) {
502
+ const value = ctx.str(name);
503
+ return value === "" ? void 0 : ctx.bool(name);
504
+ }
505
+ function optionalJson4(ctx, name) {
506
+ const value = ctx.str(name);
507
+ return value === "" ? void 0 : ctx.json(name);
508
+ }
509
+ function jsonArray(ctx, name) {
510
+ const value = ctx.json(name);
511
+ return Array.isArray(value) ? value : [value];
512
+ }
513
+ function optionalJsonArray(ctx, name) {
514
+ const value = ctx.str(name);
515
+ if (value === "") {
516
+ return void 0;
517
+ }
518
+ const parsed = ctx.json(name);
519
+ return Array.isArray(parsed) ? parsed : [parsed];
520
+ }
521
+ function compactInput(input) {
522
+ const result = {};
523
+ for (const [key, value] of Object.entries(input)) {
524
+ if (value !== void 0) {
525
+ result[key] = value;
526
+ }
527
+ }
528
+ return result;
529
+ }
530
+
531
+ // src/commands/te-analysis/dashboard/list.ts
532
+ var dashboardList = createAnalysisCapabilityCommand({
533
+ resource: "dashboard",
534
+ command: "list",
535
+ capabilityId: "analysis.dashboard.list",
536
+ description: "List dashboards visible to the current user through the capability gateway.",
537
+ flags: [projectIdFlag, queryFlag, fieldsFlag, limitFlag, offsetFlag],
538
+ risk: "read",
539
+ buildInput: listInput
540
+ });
541
+
542
+ // src/commands/te-analysis/dashboard/create.ts
543
+ var dashboardCreate = createAnalysisCapabilityCommand({
544
+ resource: "dashboard",
545
+ command: "create",
546
+ capabilityId: "analysis.dashboard.create",
547
+ description: "Create a dashboard in personal space, project space, or a folder.",
396
548
  flags: [
397
- { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
398
- { name: "query", type: "string", required: false, desc: "Optional keyword filter. Performs fuzzy matching against dashboard names and remarks; if omitted, all accessible dashboards are returned.", alias: "q" },
399
- { name: "fields", type: "json", required: false, desc: "Optional fields to return. Supported fields: dashboardId, dashboardName, remark. Default fields when omitted: dashboardId, dashboardName, remark.", alias: "f" },
400
- { name: "limit", type: "number", required: false, desc: "Optional page size. Default: 20, maximum: 10000.", alias: "l" },
401
- { name: "offset", type: "number", required: false, desc: "Optional page offset. Default: 0.", alias: "o" }
549
+ projectIdFlag,
550
+ { name: "dashboard-name", type: "string", required: true, desc: "Dashboard name." },
551
+ { name: "space-id", type: "number", required: false, desc: "Target project space ID. Omit for personal space." },
552
+ { name: "folder-id", type: "number", required: false, desc: "Target folder ID." },
553
+ { name: "initial-report-id", type: "number", required: false, desc: "Optional report ID to add when creating the dashboard." },
554
+ payloadFlag
555
+ ],
556
+ risk: "write",
557
+ buildInput: (ctx) => compactInput({
558
+ ...projectInput(ctx),
559
+ dashboard_name: ctx.str("dashboard-name"),
560
+ space_id: optionalNumber3(ctx, "space-id"),
561
+ folder_id: optionalNumber3(ctx, "folder-id"),
562
+ initial_report_id: optionalNumber3(ctx, "initial-report-id"),
563
+ payload: optionalJson4(ctx, "payload")
564
+ })
565
+ });
566
+
567
+ // src/commands/te-analysis/dashboard/get.ts
568
+ var dashboardGet = createAnalysisCapabilityCommand({
569
+ resource: "dashboard",
570
+ command: "get",
571
+ capabilityId: "analysis.dashboard.get",
572
+ description: "Get one dashboard detail, including creator, create/update time, settings, reports, notes, and share information.",
573
+ flags: [
574
+ projectIdFlag,
575
+ { name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." },
576
+ { name: "use-cache", type: "boolean", required: false, desc: "Whether to use cached dashboard detail. Default: true." }
402
577
  ],
403
578
  risk: "read",
404
- buildArgs: (ctx) => ({
405
- projectId: ctx.num("project_id"),
406
- query: optionalString(ctx, "query"),
407
- fields: optionalJson(ctx, "fields"),
408
- limit: optionalNumber(ctx, "limit"),
409
- offset: optionalNumber(ctx, "offset")
579
+ buildInput: (ctx) => compactInput({
580
+ ...projectInput(ctx),
581
+ dashboard_id: ctx.num("dashboard-id"),
582
+ use_cache: optionalBoolean5(ctx, "use-cache")
410
583
  })
411
584
  });
412
585
 
413
- // src/commands/te-analysis/dashboard/list-bi-panels.ts
414
- var listBiPanels = createMcpCommand({
415
- command: "+list_bi_panels",
416
- description: "List BI panels accessible to the current MCP user in a project. Use this before requesting BI panel structure or data. Does not return pages, charts, controls, raw config, SQL, or permission-rule details.",
586
+ // src/commands/te-analysis/dashboard/update.ts
587
+ var dashboardUpdate = createAnalysisCapabilityCommand({
588
+ resource: "dashboard",
589
+ command: "update",
590
+ capabilityId: "analysis.dashboard.update",
591
+ description: "Update dashboard settings or create/update a dashboard note. Use --operation settings or note-upsert.",
417
592
  flags: [
418
- { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
419
- { name: "query", type: "string", required: false, desc: "Optional keyword filter. Fuzzy matches BI panel names.", alias: "q" },
420
- { name: "fields", type: "json", required: false, desc: "Optional returned fields. Supported values: panelId, name, spaceId, spaceName, ownerName, updatedAt, pageCount, hasSummary.", alias: "f" },
421
- { name: "limit", type: "number", required: false, desc: "Optional page size. Default: 20, maximum: 10000.", alias: "l" },
422
- { name: "offset", type: "number", required: false, desc: "Optional page offset. Default: 0.", alias: "o" }
593
+ projectIdFlag,
594
+ { name: "operation", type: "string", required: true, desc: "Update operation: settings or note-upsert." },
595
+ { name: "dashboard-id", type: "number", required: false, desc: "Dashboard ID for a single-dashboard update." },
596
+ { name: "dashboard-ids", type: "json", required: false, desc: "Dashboard ID array for batch settings updates." },
597
+ { name: "dashboard-name", type: "string", required: false, desc: "Dashboard name for single rename." },
598
+ { name: "zone-offset", type: "number", required: false, desc: "Fixed dashboard time zone offset in hours. For example, UTC+8 is 8 and UTC-5 is -5. Valid range: -12 to 14." },
599
+ { name: "refresh-type", type: "number", required: false, desc: "Dashboard refresh type." },
600
+ { name: "dashboard-status", type: "number", required: false, desc: "Dashboard status code." },
601
+ { name: "note-id", type: "number", required: false, desc: "Dashboard note ID. Omit to create a new note." },
602
+ { name: "note-title", type: "string", required: false, desc: "Dashboard note title." },
603
+ { name: "description", type: "string", required: false, desc: "Dashboard note description." },
604
+ { name: "ui-config", type: "string", required: false, desc: "Dashboard or note UI config string." },
605
+ payloadFlag
423
606
  ],
607
+ risk: "write",
608
+ buildInput: (ctx) => compactInput({
609
+ ...projectInput(ctx),
610
+ operation: ctx.str("operation"),
611
+ dashboard_id: optionalNumber3(ctx, "dashboard-id"),
612
+ dashboard_ids: optionalJsonArray(ctx, "dashboard-ids"),
613
+ dashboard_name: optionalString3(ctx, "dashboard-name"),
614
+ zone_offset: optionalNumber3(ctx, "zone-offset"),
615
+ refresh_type: optionalNumber3(ctx, "refresh-type"),
616
+ dashboard_status: optionalNumber3(ctx, "dashboard-status"),
617
+ note_id: optionalNumber3(ctx, "note-id"),
618
+ note_title: optionalString3(ctx, "note-title"),
619
+ description: optionalString3(ctx, "description"),
620
+ ui_config: optionalString3(ctx, "ui-config"),
621
+ payload: optionalJson4(ctx, "payload")
622
+ })
623
+ });
624
+
625
+ // src/commands/te-analysis/dashboard/share-info.ts
626
+ var dashboardShareInfo = createAnalysisCapabilityCommand({
627
+ resource: "dashboard",
628
+ command: "share-info",
629
+ capabilityId: "analysis.dashboard.share_info",
630
+ description: "Get dashboard sharing information.",
631
+ flags: [projectIdFlag, { name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." }],
424
632
  risk: "read",
425
- buildArgs: (ctx) => ({
426
- projectId: ctx.num("project_id"),
427
- query: optionalString(ctx, "query"),
428
- fields: optionalJson(ctx, "fields"),
429
- limit: optionalNumber(ctx, "limit"),
430
- offset: optionalNumber(ctx, "offset")
633
+ buildInput: (ctx) => ({
634
+ ...projectInput(ctx),
635
+ dashboard_id: ctx.num("dashboard-id")
431
636
  })
432
637
  });
433
638
 
434
- // src/commands/te-analysis/dashboard/get-bi-panel-detail.ts
435
- var getBiPanelDetail = createMcpCommand({
436
- command: "+get_bi_panel_detail",
437
- description: "Get a BI panel released structure without querying data. Use this after list_bi_panels to inspect pages, queryable charts, summary, dashboard-level controls, and page chart filter controls.",
639
+ // src/commands/te-analysis/dashboard/share.ts
640
+ var dashboardShare = createAnalysisCapabilityCommand({
641
+ resource: "dashboard",
642
+ command: "share",
643
+ capabilityId: "analysis.dashboard.share",
644
+ description: "Modify dashboard sharing members through the capability gateway.",
438
645
  flags: [
439
- { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
440
- { name: "panel_id", type: "number", required: true, desc: "BI panel ID returned by +list_bi_panels" },
441
- { name: "fields", type: "json", required: false, desc: "Optional detail sections. Supported values: basic, pages, charts, parameterControls, permissionControls, chartFilterControls, summary.", alias: "f" }
646
+ projectIdFlag,
647
+ { name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." },
648
+ { name: "member-authorities", type: "json", required: false, desc: "Optional member authority map." },
649
+ payloadFlag
442
650
  ],
651
+ risk: "write",
652
+ buildInput: (ctx) => compactInput({
653
+ ...projectInput(ctx),
654
+ dashboard_id: ctx.num("dashboard-id"),
655
+ member_authorities: optionalJson4(ctx, "member-authorities"),
656
+ payload: optionalJson4(ctx, "payload")
657
+ })
658
+ });
659
+
660
+ // src/commands/te-analysis/dashboard/delete.ts
661
+ var dashboardDelete = createAnalysisCapabilityCommand({
662
+ resource: "dashboard",
663
+ command: "delete",
664
+ capabilityId: "analysis.dashboard.delete",
665
+ description: "Delete one or more dashboards.",
666
+ flags: [projectIdFlag, { name: "dashboard-ids", type: "json", required: true, desc: "Dashboard ID array." }],
667
+ risk: "write",
668
+ buildInput: (ctx) => ({
669
+ ...projectInput(ctx),
670
+ dashboard_ids: jsonArray(ctx, "dashboard-ids")
671
+ })
672
+ });
673
+
674
+ // src/commands/te-analysis/dashboard/handover.ts
675
+ var dashboardHandover = createAnalysisCapabilityCommand({
676
+ resource: "dashboard",
677
+ command: "handover",
678
+ capabilityId: "analysis.dashboard.handover",
679
+ description: "Handover one or more dashboards to another project user.",
680
+ flags: [
681
+ projectIdFlag,
682
+ { name: "dashboard-ids", type: "json", required: true, desc: "Dashboard ID array." },
683
+ { name: "to-user-id", type: "number", required: true, desc: "Target user ID." }
684
+ ],
685
+ risk: "write",
686
+ buildInput: (ctx) => ({
687
+ ...projectInput(ctx),
688
+ dashboard_ids: jsonArray(ctx, "dashboard-ids"),
689
+ to_user_id: ctx.num("to-user-id")
690
+ })
691
+ });
692
+
693
+ // src/commands/te-analysis/dashboard/copy.ts
694
+ var dashboardCopy = createAnalysisCapabilityCommand({
695
+ resource: "dashboard",
696
+ command: "copy",
697
+ capabilityId: "analysis.dashboard.copy",
698
+ description: "Copy a dashboard, optionally copying reports and targeting a project space or folder.",
699
+ flags: [
700
+ projectIdFlag,
701
+ { name: "dashboard-id", type: "number", required: true, desc: "Source dashboard ID." },
702
+ { name: "dashboard-name", type: "string", required: true, desc: "New dashboard name." },
703
+ { name: "report-copy", type: "boolean", required: false, desc: "Whether to copy reports. Default: false." },
704
+ { name: "to-space-id", type: "number", required: false, desc: "Target project space ID." },
705
+ { name: "to-folder-id", type: "number", required: false, desc: "Target folder ID." }
706
+ ],
707
+ risk: "write",
708
+ buildInput: (ctx) => compactInput({
709
+ ...projectInput(ctx),
710
+ dashboard_id: ctx.num("dashboard-id"),
711
+ dashboard_name: ctx.str("dashboard-name"),
712
+ report_copy: optionalBoolean5(ctx, "report-copy"),
713
+ to_space_id: optionalNumber3(ctx, "to-space-id"),
714
+ to_folder_id: optionalNumber3(ctx, "to-folder-id")
715
+ })
716
+ });
717
+
718
+ // src/commands/te-analysis/dashboard/freeze.ts
719
+ var dashboardFreeze = createAnalysisCapabilityCommand({
720
+ resource: "dashboard",
721
+ command: "freeze",
722
+ capabilityId: "analysis.dashboard.freeze",
723
+ description: "Freeze or unfreeze one or more dashboards.",
724
+ flags: [
725
+ projectIdFlag,
726
+ { name: "dashboard-ids", type: "json", required: true, desc: "Dashboard ID array." },
727
+ { name: "freeze", type: "boolean", required: false, desc: "true to freeze, false to unfreeze. Default: true." }
728
+ ],
729
+ risk: "write",
730
+ buildInput: (ctx) => compactInput({
731
+ ...projectInput(ctx),
732
+ dashboard_ids: jsonArray(ctx, "dashboard-ids"),
733
+ freeze: optionalBoolean5(ctx, "freeze")
734
+ })
735
+ });
736
+
737
+ // src/commands/te-analysis/dashboard/abnormal-get.ts
738
+ var dashboardAbnormalGet = createAnalysisCapabilityCommand({
739
+ resource: "dashboard",
740
+ command: "abnormal-get",
741
+ capabilityId: "analysis.dashboard.abnormal_get",
742
+ description: "Get abnormal dependency information for a dashboard.",
743
+ flags: [projectIdFlag, { name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." }],
443
744
  risk: "read",
444
- buildArgs: (ctx) => ({
445
- projectId: ctx.num("project_id"),
446
- panelId: ctx.num("panel_id"),
447
- fields: optionalJson(ctx, "fields")
745
+ buildInput: (ctx) => ({
746
+ ...projectInput(ctx),
747
+ dashboard_id: ctx.num("dashboard-id")
448
748
  })
449
749
  });
450
750
 
451
- // src/commands/te-analysis/dashboard/query-bi-panel-data.ts
452
- var queryBiPanelData = createMcpCommand({
453
- command: "+query_bi_panel_data",
454
- description: "Query released BI panel data. Use result_type=charts for page chart data as columns and rows, or result_type=summary for summary markdown and blocks. Call get_bi_panel_detail first to obtain pageKey, chartIds, columns, and control schemas. For long-running or cancelable queries, requestId is required and must be provided before starting. For any query that may exceed the CLI or MCP HTTP timeout, generate requestId first so you can call +cancel_query --request_id <same value> if you stop waiting or the request returns fetch failed. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. requestId must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Submitted queries return metadata.requestId; pass that value to cancel_query(requestId) when the query is no longer needed. requestId is not auto-generated for MCP query tools because the caller must know it before the response for proactive cleanup. If requestId is omitted or blank, the backend returns REQUEST_ID_REQUIRED; invalid format returns INVALID_REQUEST_ID.",
751
+ // src/commands/te-analysis/dashboard/task-status.ts
752
+ var dashboardTaskStatus = createAnalysisCapabilityCommand({
753
+ resource: "dashboard",
754
+ command: "task-status",
755
+ capabilityId: "analysis.dashboard.task_status",
756
+ description: "Get dashboard scheduled task status.",
757
+ flags: [projectIdFlag, { name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." }],
758
+ risk: "read",
759
+ buildInput: (ctx) => ({
760
+ ...projectInput(ctx),
761
+ dashboard_id: ctx.num("dashboard-id")
762
+ })
763
+ });
764
+
765
+ // src/commands/te-analysis/dashboard/index.ts
766
+ var commands3 = [
767
+ dashboardList,
768
+ dashboardCreate,
769
+ dashboardGet,
770
+ dashboardUpdate,
771
+ dashboardShareInfo,
772
+ dashboardShare,
773
+ dashboardDelete,
774
+ dashboardHandover,
775
+ dashboardCopy,
776
+ dashboardFreeze,
777
+ dashboardAbnormalGet,
778
+ dashboardTaskStatus
779
+ ];
780
+ var dashboard_default = commands3;
781
+
782
+ // src/commands/te-analysis/dashboard-report-data/run.ts
783
+ var dashboardReportDataRun = createAnalysisCapabilityCommand({
784
+ resource: "dashboard-report-data",
785
+ command: "run",
786
+ capabilityId: "analysis.dashboard_report_data.run",
787
+ description: "Run a bounded dashboard report data query and return inline JSON.",
455
788
  flags: [
456
- { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
457
- { name: "panel_id", type: "number", required: true, desc: "BI panel ID returned by +list_bi_panels" },
458
- { name: "page_key", type: "string", required: true, desc: "Page key returned by +get_bi_panel_detail" },
459
- { name: "result_type", type: "string", required: true, desc: "Result type. Supported values: charts, summary." },
460
- { name: "request_id", type: "string", required: true, desc: "Required unique request ID used for tracking and cancellation. Generate it before starting the query. It must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Provide this before starting the query so it can be cancelled later with +cancel_query --request_id <same value>, even if the caller stops waiting before the tool returns. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. requestId is not auto-generated for MCP query tools because the caller must know it before the response for proactive cleanup. If omitted or blank, the backend returns REQUEST_ID_REQUIRED; invalid format returns INVALID_REQUEST_ID. The response metadata.requestId echoes the supplied requestId and can also be passed to cancel_query(requestId) when the query is no longer needed." },
461
- { name: "chart_ids", type: "json", required: false, desc: "Optional chart IDs when result_type=charts. If omitted, all queryable charts on the page are queried." },
462
- { name: "parameter_controls", type: "json", required: false, desc: "Optional dashboard-level parameter control overrides. Each item must have controlId and one scalar value." },
463
- { name: "permission_controls", type: "json", required: false, desc: "Optional dashboard-level permission control values. Each item must have controlId and value. value may be one scalar or an array; allowedValues are hints, not an MCP-side whitelist." },
464
- { name: "chart_filter_controls", type: "json", required: false, desc: "Optional page chart filter control values. Each item must have controlId and value. value may be one scalar or an array and applies only to bound charts." },
465
- { name: "columns", type: "json", required: false, desc: "Optional returned columns for chart data. Must match columns returned by +get_bi_panel_detail." },
466
- { name: "row_limit", type: "number", required: false, desc: "Optional chart row limit. Default: 50, maximum: 10000." },
467
- { name: "row_offset", type: "number", required: false, desc: "Optional chart row offset. Default: 0." },
468
- { name: "block_limit", type: "number", required: false, desc: "Optional summary block limit. Default: 20, maximum: 10000." },
469
- { name: "block_offset", type: "number", required: false, desc: "Optional summary block offset. Default: 0." },
470
- { name: "use_cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true." },
471
- { name: "timeout_minutes", type: "number", required: false, desc: "Query timeout in minutes. Default: 3, minimum: 1, maximum: 10." }
789
+ projectIdFlag,
790
+ { name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." },
791
+ { name: "report-ids", type: "json", required: false, desc: "Optional report ID array. Omit to query all dashboard reports." },
792
+ { name: "filters", type: "json", required: false, desc: "Optional dashboard filter JSON." },
793
+ { name: "start-time", type: "string", required: false, desc: "Optional start date/time." },
794
+ { name: "end-time", type: "string", required: false, desc: "Optional end date/time." },
795
+ { name: "use-cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true." },
796
+ { name: "request-id", type: "string", required: false, desc: "Optional cli_<32 lowercase hex> request ID. Generated when omitted." },
797
+ { name: "timeout-seconds", type: "number", required: false, desc: "Sync timeout seconds. Default: 60, max: 180." },
798
+ limitFlag
472
799
  ],
473
800
  risk: "read",
474
- buildArgs: (ctx) => ({
475
- projectId: ctx.num("project_id"),
476
- panelId: ctx.num("panel_id"),
477
- pageKey: ctx.str("page_key"),
478
- resultType: ctx.str("result_type"),
479
- requestId: ctx.str("request_id"),
480
- chartIds: optionalJson(ctx, "chart_ids"),
481
- parameterControls: optionalJson(ctx, "parameter_controls"),
482
- permissionControls: optionalJson(ctx, "permission_controls"),
483
- chartFilterControls: optionalJson(ctx, "chart_filter_controls"),
484
- columns: optionalJson(ctx, "columns"),
485
- rowLimit: optionalNumber(ctx, "row_limit"),
486
- rowOffset: optionalNumber(ctx, "row_offset"),
487
- blockLimit: optionalNumber(ctx, "block_limit"),
488
- blockOffset: optionalNumber(ctx, "block_offset"),
489
- useCache: optionalBoolean(ctx, "use_cache"),
490
- timeoutMinutes: optionalNumber(ctx, "timeout_minutes")
801
+ buildInput: dashboardReportDataInput
802
+ });
803
+
804
+ // src/commands/te-analysis/dashboard-report-data/export.ts
805
+ var dashboardReportDataExport = createAnalysisCapabilityCommand({
806
+ resource: "dashboard-report-data",
807
+ command: "export",
808
+ capabilityId: "analysis.dashboard_report_data.export",
809
+ description: "Submit a dashboard report data query as an asynchronous gzip JSONL artifact.",
810
+ flags: [
811
+ projectIdFlag,
812
+ { name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." },
813
+ { name: "report-ids", type: "json", required: false, desc: "Optional report ID array. Omit to query all dashboard reports." },
814
+ { name: "filters", type: "json", required: false, desc: "Optional dashboard filter JSON." },
815
+ { name: "start-time", type: "string", required: false, desc: "Optional start date/time." },
816
+ { name: "end-time", type: "string", required: false, desc: "Optional end date/time." },
817
+ { name: "use-cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true." },
818
+ { name: "request-id", type: "string", required: false, desc: "Optional cli_<32 lowercase hex> request ID. Generated when omitted." },
819
+ { name: "timeout-seconds", type: "number", required: false, desc: "Export timeout seconds. Default: 3600, max: 7200." },
820
+ { name: "artifact-format", type: "string", required: false, desc: "Artifact format. Only jsonl is supported." }
821
+ ],
822
+ risk: "read",
823
+ buildInput: dashboardReportDataInput
824
+ });
825
+
826
+ // src/commands/te-analysis/dashboard-report-data/index.ts
827
+ var commands4 = [
828
+ dashboardReportDataRun,
829
+ dashboardReportDataExport
830
+ ];
831
+ var dashboard_report_data_default = commands4;
832
+
833
+ // src/commands/te-analysis/query/cancel.ts
834
+ var queryCancel = createAnalysisCapabilityCommand({
835
+ resource: "query",
836
+ command: "cancel",
837
+ capabilityId: "analysis.query.cancel",
838
+ description: "Cancel an analysis capability-gateway query/export by run_id.",
839
+ flags: [
840
+ { name: "run-id", type: "string", required: true, desc: "Async run ID returned by an export capability." },
841
+ { name: "reason", type: "string", required: false, desc: "Optional cancellation reason." }
842
+ ],
843
+ risk: "write",
844
+ buildInput: (ctx) => compactInput({
845
+ run_id: ctx.str("run-id"),
846
+ reason: optionalString3(ctx, "reason")
491
847
  })
492
848
  });
493
849
 
494
- // src/commands/te-analysis/dashboard/query-dashboard-detail.ts
495
- var queryDashboardDetail = createMcpCommand({
496
- command: "+query_dashboard_detail",
497
- description: "Get detailed information about a specific dashboard including associated reports, dashboard notes, and share members.",
850
+ // src/commands/te-analysis/query/index.ts
851
+ var commands5 = [
852
+ queryCancel
853
+ ];
854
+ var query_default = commands5;
855
+
856
+ // src/commands/te-analysis/dashboard-definition/export.ts
857
+ var dashboardDefinitionExport = createAnalysisCapabilityCommand({
858
+ resource: "dashboard-definition",
859
+ command: "export",
860
+ capabilityId: "analysis.dashboard_definition.export",
861
+ description: "Export dashboard definition JSON.",
498
862
  flags: [
499
- { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
500
- { name: "dashboard_id", type: "number", required: true, desc: "Dashboard ID", alias: "d" }
863
+ projectIdFlag,
864
+ { name: "dashboard-folder-ids", type: "json", required: false, desc: "Dashboard folder IDs to export." },
865
+ { name: "shared-spaces", type: "json", required: false, desc: "Shared space export descriptor array." },
866
+ { name: "export-file-name", type: "string", required: false, desc: "Optional export file name." },
867
+ payloadFlag
501
868
  ],
502
869
  risk: "read",
503
- buildArgs: (ctx) => ({
504
- projectId: ctx.num("project_id"),
505
- dashboardId: ctx.num("dashboard_id")
870
+ buildInput: (ctx) => compactInput({
871
+ ...projectInput(ctx),
872
+ dashboard_folder_ids: optionalJsonArray(ctx, "dashboard-folder-ids"),
873
+ shared_spaces: optionalJson4(ctx, "shared-spaces"),
874
+ export_file_name: optionalString3(ctx, "export-file-name"),
875
+ payload: optionalJson4(ctx, "payload")
506
876
  })
507
877
  });
508
878
 
509
- // src/commands/te-analysis/dashboard/query-dashboard-report-data.ts
510
- var queryDashboardReportData = createMcpCommand({
511
- command: "+query_dashboard_report_data",
512
- description: "Query analysis data for one or more reports in a dashboard. Supports additional filters and time range overrides. For long-running or cancelable queries, requestId is required and must be provided before starting. For any query that may exceed the CLI or MCP HTTP timeout, generate requestId first so you can call +cancel_query --request_id <same value> if you stop waiting or the request returns fetch failed. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. requestId must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Submitted queries return metadata.requestId; pass that value to cancel_query(requestId) when the query is no longer needed. requestId is not auto-generated for MCP query tools because the caller must know it before the response for proactive cleanup. If requestId is omitted or blank, the backend returns REQUEST_ID_REQUIRED; invalid format returns INVALID_REQUEST_ID.",
879
+ // src/commands/te-analysis/dashboard-definition/import.ts
880
+ var dashboardDefinitionImport = createAnalysisCapabilityCommand({
881
+ resource: "dashboard-definition",
882
+ command: "import",
883
+ capabilityId: "analysis.dashboard_definition.import",
884
+ description: "Validate or import dashboard definition JSON. Use --validate-only for import pre-check.",
513
885
  flags: [
514
- { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
515
- { name: "dashboard_id", type: "number", required: true, desc: "Dashboard ID", alias: "d" },
516
- { name: "filters", type: "json", required: false, desc: "Optional filter JSON. See +get_filter_schema for the structure." },
517
- { name: "start_date", type: "string", required: false, desc: "Optional start date in yyyy-MM-dd format" },
518
- { name: "end_date", type: "string", required: false, desc: "Optional end date in yyyy-MM-dd format" },
519
- { name: "time_granularity", type: "string", required: false, desc: "Optional time granularity used to override the report default. Supported values: minute, minute5, minute10, hour, day, week, month, quarter, year, total." },
520
- { name: "use_cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true" },
521
- { name: "report_ids", type: "json", required: false, desc: "Optional report IDs JSON array" },
522
- { name: "request_id", type: "string", required: true, desc: "Required unique request ID used for tracking and cancellation. Generate it before starting the query. It must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Provide this before starting the query so it can be cancelled later with +cancel_query --request_id <same value>, even if the caller stops waiting before the tool returns. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. requestId is not auto-generated for MCP query tools because the caller must know it before the response for proactive cleanup. If omitted or blank, the backend returns REQUEST_ID_REQUIRED; invalid format returns INVALID_REQUEST_ID. The response metadata.requestId echoes the supplied requestId and can also be passed to cancel_query(requestId) when the query is no longer needed." },
523
- { name: "timeout_minutes", type: "number", required: false, desc: "Query timeout in minutes. If omitted, 30 minutes is used." },
524
- ...clusterQueryFlags("Optional cluster query scope. Supported values: GLOBAL, SLAVE. Omit to follow dashboard configuration.")
886
+ projectIdFlag,
887
+ { name: "definition", type: "json", required: true, desc: "Dashboard definition JSON object." },
888
+ { name: "validate-only", type: "boolean", required: false, desc: "Only validate import conflicts and importable state." },
889
+ { name: "dashboard-name-conflict-policy", type: "string", required: false, desc: "Optional dashboard name conflict policy." },
890
+ { name: "space-dashboard-policy", type: "string", required: false, desc: "Optional space/dashboard import policy." },
891
+ payloadFlag
892
+ ],
893
+ risk: "write",
894
+ buildInput: (ctx) => compactInput({
895
+ ...projectInput(ctx),
896
+ definition: ctx.json("definition"),
897
+ validate_only: optionalBoolean5(ctx, "validate-only"),
898
+ dashboard_name_conflict_policy: optionalString3(ctx, "dashboard-name-conflict-policy"),
899
+ space_dashboard_policy: optionalString3(ctx, "space-dashboard-policy"),
900
+ payload: optionalJson4(ctx, "payload")
901
+ })
902
+ });
903
+
904
+ // src/commands/te-analysis/dashboard-definition/index.ts
905
+ var commands6 = [
906
+ dashboardDefinitionExport,
907
+ dashboardDefinitionImport
908
+ ];
909
+ var dashboard_definition_default = commands6;
910
+
911
+ // src/commands/te-analysis/dashboard-daily-report/update.ts
912
+ var dashboardDailyReportUpdate = createAnalysisCapabilityCommand({
913
+ resource: "dashboard-daily-report",
914
+ command: "update",
915
+ capabilityId: "analysis.dashboard_daily_report.update",
916
+ description: "Update dashboard daily report configuration.",
917
+ flags: [
918
+ projectIdFlag,
919
+ { name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." },
920
+ { name: "enable-send", type: "number", required: false, desc: "Enable send flag." },
921
+ { name: "send-time", type: "string", required: false, desc: "Daily report send time." },
922
+ { name: "send-title", type: "string", required: false, desc: "Daily report title." },
923
+ { name: "send-content", type: "string", required: false, desc: "Daily report content." },
924
+ payloadFlag
525
925
  ],
926
+ risk: "write",
927
+ buildInput: (ctx) => compactInput({
928
+ ...projectInput(ctx),
929
+ dashboard_id: ctx.num("dashboard-id"),
930
+ enable_send: optionalNumber3(ctx, "enable-send"),
931
+ send_time: optionalString3(ctx, "send-time"),
932
+ send_title: optionalString3(ctx, "send-title"),
933
+ send_content: optionalString3(ctx, "send-content"),
934
+ payload: optionalJson4(ctx, "payload")
935
+ })
936
+ });
937
+
938
+ // src/commands/te-analysis/dashboard-daily-report/send.ts
939
+ var dashboardDailyReportSend = createAnalysisCapabilityCommand({
940
+ resource: "dashboard-daily-report",
941
+ command: "send",
942
+ capabilityId: "analysis.dashboard_daily_report.send",
943
+ description: "Send dashboard daily report immediately.",
944
+ flags: [
945
+ projectIdFlag,
946
+ { name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." },
947
+ { name: "need-csv", type: "number", required: false, desc: "Whether CSV attachment is needed." },
948
+ { name: "host-url", type: "string", required: false, desc: "Host URL used in report links." },
949
+ payloadFlag
950
+ ],
951
+ risk: "write",
952
+ buildInput: (ctx) => compactInput({
953
+ ...projectInput(ctx),
954
+ dashboard_id: ctx.num("dashboard-id"),
955
+ need_csv: optionalNumber3(ctx, "need-csv"),
956
+ host_url: optionalString3(ctx, "host-url"),
957
+ payload: optionalJson4(ctx, "payload")
958
+ })
959
+ });
960
+
961
+ // src/commands/te-analysis/dashboard-daily-report/index.ts
962
+ var commands7 = [
963
+ dashboardDailyReportUpdate,
964
+ dashboardDailyReportSend
965
+ ];
966
+ var dashboard_daily_report_default = commands7;
967
+
968
+ // src/commands/te-analysis/bi-panel/list.ts
969
+ var biPanelList = createAnalysisCapabilityCommand({
970
+ resource: "bi-panel",
971
+ command: "list",
972
+ capabilityId: "analysis.bi_panel.list",
973
+ description: "List BI panels visible to the current user through the capability gateway.",
974
+ flags: [projectIdFlag, queryFlag, fieldsFlag, limitFlag, offsetFlag],
526
975
  risk: "read",
527
- buildArgs: (ctx) => ({
528
- projectId: ctx.num("project_id"),
529
- dashboardId: ctx.num("dashboard_id"),
530
- filters: optionalJsonString(ctx, "filters"),
531
- startDate: optionalString(ctx, "start_date"),
532
- endDate: optionalString(ctx, "end_date"),
533
- timeGranularity: optionalString(ctx, "time_granularity"),
534
- useCache: optionalBoolean(ctx, "use_cache"),
535
- reportIds: optionalJson(ctx, "report_ids"),
536
- requestId: ctx.str("request_id"),
537
- timeoutMinutes: optionalNumber(ctx, "timeout_minutes"),
538
- ...optionalClusterQueryArgs(ctx)
976
+ buildInput: listInput
977
+ });
978
+
979
+ // src/commands/te-analysis/bi-panel/get.ts
980
+ var biPanelGet = createAnalysisCapabilityCommand({
981
+ resource: "bi-panel",
982
+ command: "get",
983
+ capabilityId: "analysis.bi_panel.get",
984
+ description: "Get a BI panel released page structure.",
985
+ flags: [
986
+ projectIdFlag,
987
+ { name: "panel-id", type: "number", required: true, desc: "BI panel ID." },
988
+ fieldsFlag
989
+ ],
990
+ risk: "read",
991
+ buildInput: (ctx) => compactInput({
992
+ ...projectInput(ctx),
993
+ panel_id: ctx.num("panel-id"),
994
+ fields: optionalJson4(ctx, "fields")
539
995
  })
540
996
  });
541
997
 
542
- // src/commands/te-analysis/dashboard/create-dashboard.ts
543
- var createDashboard = createMcpCommand({
544
- command: "+create_dashboard",
545
- description: "Create a new dashboard. Optionally associates an initial report after creation and/or creates an initial dashboard note.",
998
+ // src/commands/te-analysis/bi-panel/create.ts
999
+ var biPanelCreate = createAnalysisCapabilityCommand({
1000
+ resource: "bi-panel",
1001
+ command: "create",
1002
+ capabilityId: "analysis.bi_panel.create",
1003
+ description: "Create a BI panel.",
546
1004
  flags: [
547
- { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
548
- { name: "dashboard_name", type: "string", required: true, desc: "Dashboard name" },
549
- { name: "space_id", type: "number", required: false, desc: "Optional space ID. If provided, the dashboard is created in that space." },
550
- { name: "folder_id", type: "number", required: false, desc: "Optional folder ID. If provided, the dashboard is created in that folder." },
551
- { name: "initial_report_id", type: "number", required: false, desc: "Optional initial report ID. If provided, the report is automatically associated with the new dashboard after creation." },
552
- { name: "note_title", type: "string", required: false, desc: "Optional note title for an initial dashboard note." },
553
- { name: "note_content", type: "string", required: false, desc: "Optional note content for an initial dashboard note." },
554
- { name: "note_style", type: "json", required: false, desc: "Optional note style configuration JSON for an initial dashboard note." }
1005
+ projectIdFlag,
1006
+ { name: "panel-name", type: "string", required: false, desc: "BI panel name." },
1007
+ { name: "panel-uuid", type: "string", required: false, desc: "BI panel UUID." },
1008
+ { name: "space-id", type: "number", required: false, desc: "Target project space ID." },
1009
+ { name: "folder-id", type: "number", required: false, desc: "Target folder ID." },
1010
+ payloadFlag
555
1011
  ],
556
1012
  risk: "write",
557
- buildArgs: (ctx) => ({
558
- projectId: ctx.num("project_id"),
559
- dashboardName: ctx.str("dashboard_name"),
560
- spaceId: optionalNumber(ctx, "space_id"),
561
- folderId: optionalNumber(ctx, "folder_id"),
562
- initialReportId: optionalNumber(ctx, "initial_report_id"),
563
- noteTitle: optionalString(ctx, "note_title"),
564
- noteContent: optionalString(ctx, "note_content"),
565
- noteStyle: optionalJsonString(ctx, "note_style")
1013
+ buildInput: (ctx) => compactInput({
1014
+ ...projectInput(ctx),
1015
+ panel_name: optionalString3(ctx, "panel-name"),
1016
+ panel_uuid: optionalString3(ctx, "panel-uuid"),
1017
+ space_id: optionalNumber3(ctx, "space-id"),
1018
+ folder_id: optionalNumber3(ctx, "folder-id"),
1019
+ payload: optionalJson4(ctx, "payload")
566
1020
  })
567
1021
  });
568
1022
 
569
- // src/commands/te-analysis/dashboard/update-dashboard.ts
570
- var updateDashboard = createMcpCommand({
571
- command: "+update_dashboard",
572
- description: "Update dashboard metadata. Supports renaming the dashboard, appending reports, or replacing share members.",
1023
+ // src/commands/te-analysis/bi-panel/update.ts
1024
+ var biPanelUpdate = createAnalysisCapabilityCommand({
1025
+ resource: "bi-panel",
1026
+ command: "update",
1027
+ capabilityId: "analysis.bi_panel.update",
1028
+ description: "Update BI panel content or metadata.",
573
1029
  flags: [
574
- { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
575
- { name: "dashboard_id", type: "number", required: true, desc: "Dashboard ID", alias: "d" },
576
- { name: "dashboard_name", type: "string", required: false, desc: "New dashboard name. If provided, updates the dashboard name." },
577
- { name: "member_authorities", type: "json", required: false, desc: "Map of member userId to permissions (READ, EDIT, MAINTAIN). Full replacement mode." },
578
- { name: "report_ids", type: "json", required: false, desc: "List of report IDs to associate with the dashboard. Reports not already associated will be added." }
1030
+ projectIdFlag,
1031
+ { name: "panel-name", type: "string", required: false, desc: "BI panel name." },
1032
+ { name: "panel-uuid", type: "string", required: false, desc: "BI panel UUID." },
1033
+ payloadFlag
579
1034
  ],
580
1035
  risk: "write",
581
- buildArgs: (ctx) => ({
582
- projectId: ctx.num("project_id"),
583
- dashboardId: ctx.num("dashboard_id"),
584
- dashboardName: optionalString(ctx, "dashboard_name"),
585
- memberAuthorities: optionalJson(ctx, "member_authorities"),
586
- reportIds: optionalJson(ctx, "report_ids")
1036
+ buildInput: (ctx) => compactInput({
1037
+ ...projectInput(ctx),
1038
+ panel_name: optionalString3(ctx, "panel-name"),
1039
+ panel_uuid: optionalString3(ctx, "panel-uuid"),
1040
+ payload: optionalJson4(ctx, "payload")
1041
+ })
1042
+ });
1043
+
1044
+ // src/commands/te-analysis/bi-panel/delete.ts
1045
+ var biPanelDelete = createAnalysisCapabilityCommand({
1046
+ resource: "bi-panel",
1047
+ command: "delete",
1048
+ capabilityId: "analysis.bi_panel.delete",
1049
+ description: "Delete one or more BI panels.",
1050
+ flags: [projectIdFlag, { name: "panel-ids", type: "json", required: true, desc: "BI panel ID array." }],
1051
+ risk: "write",
1052
+ buildInput: (ctx) => ({
1053
+ ...projectInput(ctx),
1054
+ panel_ids: jsonArray(ctx, "panel-ids")
587
1055
  })
588
1056
  });
589
1057
 
590
- // src/commands/te-analysis/dashboard/create-or-update-dashboard-note.ts
591
- var createOrUpdateDashboardNote = createMcpCommand({
592
- command: "+create_or_update_dashboard_note",
593
- description: "Create a new dashboard note or update an existing one. If noteId is provided, updates the existing note; otherwise creates a new note.",
1058
+ // src/commands/te-analysis/bi-panel/share.ts
1059
+ var biPanelShare = createAnalysisCapabilityCommand({
1060
+ resource: "bi-panel",
1061
+ command: "share",
1062
+ capabilityId: "analysis.bi_panel.share",
1063
+ description: "Modify BI panel sharing members.",
1064
+ flags: [projectIdFlag, { name: "panel-id", type: "number", required: true, desc: "BI panel ID." }, payloadFlag],
1065
+ risk: "write",
1066
+ buildInput: (ctx) => compactInput({
1067
+ ...projectInput(ctx),
1068
+ panel_id: ctx.num("panel-id"),
1069
+ payload: optionalJson4(ctx, "payload")
1070
+ })
1071
+ });
1072
+
1073
+ // src/commands/te-analysis/bi-panel/copy.ts
1074
+ var biPanelCopy = createAnalysisCapabilityCommand({
1075
+ resource: "bi-panel",
1076
+ command: "copy",
1077
+ capabilityId: "analysis.bi_panel.copy",
1078
+ description: "Copy a BI panel.",
594
1079
  flags: [
595
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
596
- { name: "dashboard_id", type: "number", required: true, alias: "d", desc: "Dashboard ID" },
597
- { name: "note_id", type: "number", required: false, desc: "Optional note ID. If provided, updates the existing note; otherwise creates a new note." },
598
- { name: "note_title", type: "string", required: true, desc: "Note title" },
599
- { name: "description", type: "string", required: false, desc: "Optional note description content." },
600
- { name: "ui_config", type: "json", required: false, desc: "Optional UI configuration JSON string for the note style." }
1080
+ projectIdFlag,
1081
+ { name: "panel-name", type: "string", required: false, desc: "New BI panel name." },
1082
+ { name: "panel-uuid", type: "string", required: false, desc: "Source BI panel UUID." },
1083
+ { name: "space-id", type: "number", required: false, desc: "Target project space ID." },
1084
+ { name: "folder-id", type: "number", required: false, desc: "Target folder ID." },
1085
+ payloadFlag
601
1086
  ],
602
1087
  risk: "write",
603
- mcpService: "te_analysis_extend",
604
- buildArgs: (ctx) => ({
605
- projectId: ctx.num("project_id"),
606
- dashboardId: ctx.num("dashboard_id"),
607
- noteId: optionalNumber(ctx, "note_id"),
608
- noteTitle: ctx.str("note_title"),
609
- description: optionalString(ctx, "description"),
610
- uiConfig: optionalJsonString(ctx, "ui_config")
1088
+ buildInput: (ctx) => compactInput({
1089
+ ...projectInput(ctx),
1090
+ panel_name: optionalString3(ctx, "panel-name"),
1091
+ panel_uuid: optionalString3(ctx, "panel-uuid"),
1092
+ space_id: optionalNumber3(ctx, "space-id"),
1093
+ folder_id: optionalNumber3(ctx, "folder-id"),
1094
+ payload: optionalJson4(ctx, "payload")
611
1095
  })
612
1096
  });
613
1097
 
614
- // src/commands/te-analysis/dashboard/list-public-access-links.ts
615
- var listPublicAccessLinks = createMcpCommand({
616
- command: "+list_public_access_links",
617
- description: "List public access links in the project. Query performs fuzzy matching on shorter and remarks. Supports fields/limit/offset pagination.",
1098
+ // src/commands/te-analysis/bi-panel/index.ts
1099
+ var commands8 = [
1100
+ biPanelList,
1101
+ biPanelGet,
1102
+ biPanelCreate,
1103
+ biPanelUpdate,
1104
+ biPanelDelete,
1105
+ biPanelShare,
1106
+ biPanelCopy
1107
+ ];
1108
+ var bi_panel_default = commands8;
1109
+
1110
+ // src/commands/te-analysis/bi-panel-page-data/run.ts
1111
+ var biPanelPageDataRun = createAnalysisCapabilityCommand({
1112
+ resource: "bi-panel-page-data",
1113
+ command: "run",
1114
+ capabilityId: "analysis.bi_panel_page_data.run",
1115
+ description: "Run a bounded BI panel page data query and return inline JSON.",
618
1116
  flags: [
619
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
620
- { name: "query", type: "string", required: false, alias: "q", desc: "Optional keyword filter. Fuzzy match on shorter and remarks." },
621
- { name: "fields", type: "json", required: false, desc: "Optional fields to return. Supported: id, shorter, creator, projectIdAndName, source, accessId, target, options, remarks, accessStatus, effectTime, expireTime, createTime, updateTime." },
622
- { name: "limit", type: "number", required: false, desc: "Optional limit. Default: 20, maximum: 10000." },
623
- { name: "offset", type: "number", required: false, desc: "Optional offset. Default: 0." }
1117
+ projectIdFlag,
1118
+ { name: "panel-id", type: "number", required: true, desc: "BI panel ID." },
1119
+ { name: "page-key", type: "string", required: true, desc: "Page key returned by bi-panel get." },
1120
+ { name: "result-type", type: "string", required: true, desc: "Result type: charts or summary." },
1121
+ { name: "chart-ids", type: "json", required: false, desc: "Optional chart ID array." },
1122
+ { name: "parameter-controls", type: "json", required: false, desc: "Optional parameter control override array." },
1123
+ { name: "permission-controls", type: "json", required: false, desc: "Optional permission control array." },
1124
+ { name: "chart-filter-controls", type: "json", required: false, desc: "Optional chart filter control array." },
1125
+ { name: "columns", type: "json", required: false, desc: "Optional returned column array." },
1126
+ { name: "row-limit", type: "number", required: false, desc: "Chart row limit." },
1127
+ { name: "row-offset", type: "number", required: false, desc: "Chart row offset." },
1128
+ { name: "block-limit", type: "number", required: false, desc: "Summary block limit." },
1129
+ { name: "block-offset", type: "number", required: false, desc: "Summary block offset." },
1130
+ { name: "use-cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true." },
1131
+ { name: "request-id", type: "string", required: false, desc: "Optional cli_<32 lowercase hex> request ID. Generated when omitted." },
1132
+ { name: "timeout-seconds", type: "number", required: false, desc: "Sync timeout seconds. Default: 60, max: 180." },
1133
+ limitFlag
624
1134
  ],
625
1135
  risk: "read",
626
- mcpService: "te_analysis_extend",
627
- buildArgs: (ctx) => ({
628
- projectId: ctx.num("project_id"),
629
- query: optionalString(ctx, "query"),
630
- fields: optionalJson(ctx, "fields"),
631
- limit: optionalNumber(ctx, "limit"),
632
- offset: optionalNumber(ctx, "offset")
1136
+ buildInput: biPanelPageDataInput
1137
+ });
1138
+
1139
+ // src/commands/te-analysis/bi-panel-page-data/export.ts
1140
+ var biPanelPageDataExport = createAnalysisCapabilityCommand({
1141
+ resource: "bi-panel-page-data",
1142
+ command: "export",
1143
+ capabilityId: "analysis.bi_panel_page_data.export",
1144
+ description: "Submit a BI panel page data query as an asynchronous gzip JSONL artifact.",
1145
+ flags: [
1146
+ projectIdFlag,
1147
+ { name: "panel-id", type: "number", required: true, desc: "BI panel ID." },
1148
+ { name: "page-key", type: "string", required: true, desc: "Page key returned by bi-panel get." },
1149
+ { name: "result-type", type: "string", required: true, desc: "Result type: charts or summary." },
1150
+ { name: "chart-ids", type: "json", required: false, desc: "Optional chart ID array." },
1151
+ { name: "parameter-controls", type: "json", required: false, desc: "Optional parameter control override array." },
1152
+ { name: "permission-controls", type: "json", required: false, desc: "Optional permission control array." },
1153
+ { name: "chart-filter-controls", type: "json", required: false, desc: "Optional chart filter control array." },
1154
+ { name: "columns", type: "json", required: false, desc: "Optional returned column array." },
1155
+ { name: "row-limit", type: "number", required: false, desc: "Chart row limit." },
1156
+ { name: "row-offset", type: "number", required: false, desc: "Chart row offset." },
1157
+ { name: "block-limit", type: "number", required: false, desc: "Summary block limit." },
1158
+ { name: "block-offset", type: "number", required: false, desc: "Summary block offset." },
1159
+ { name: "use-cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true." },
1160
+ { name: "request-id", type: "string", required: false, desc: "Optional cli_<32 lowercase hex> request ID. Generated when omitted." },
1161
+ { name: "timeout-seconds", type: "number", required: false, desc: "Export timeout seconds. Default: 600, max: 600." },
1162
+ { name: "artifact-format", type: "string", required: false, desc: "Artifact format. Only jsonl is supported." }
1163
+ ],
1164
+ risk: "read",
1165
+ buildInput: biPanelPageDataInput
1166
+ });
1167
+
1168
+ // src/commands/te-analysis/bi-panel-page-data/index.ts
1169
+ var commands9 = [
1170
+ biPanelPageDataRun,
1171
+ biPanelPageDataExport
1172
+ ];
1173
+ var bi_panel_page_data_default = commands9;
1174
+
1175
+ // src/commands/te-analysis/project-space/list.ts
1176
+ var projectSpaceList = createAnalysisCapabilityCommand({
1177
+ resource: "project-space",
1178
+ command: "list",
1179
+ capabilityId: "analysis.project_space.list",
1180
+ description: "List project spaces visible to the current user.",
1181
+ flags: [projectIdFlag, queryFlag, fieldsFlag, limitFlag, offsetFlag],
1182
+ risk: "read",
1183
+ buildInput: listInput
1184
+ });
1185
+
1186
+ // src/commands/te-analysis/project-space/get.ts
1187
+ var projectSpaceGet = createAnalysisCapabilityCommand({
1188
+ resource: "project-space",
1189
+ command: "get",
1190
+ capabilityId: "analysis.project_space.get",
1191
+ description: "Get one project space detail.",
1192
+ flags: [projectIdFlag, { name: "space-id", type: "number", required: true, desc: "Project space ID." }, fieldsFlag],
1193
+ risk: "read",
1194
+ buildInput: (ctx) => compactInput({
1195
+ ...projectInput(ctx),
1196
+ space_id: ctx.num("space-id"),
1197
+ fields: optionalJson4(ctx, "fields")
633
1198
  })
634
1199
  });
635
1200
 
636
- // src/commands/te-analysis/dashboard/create-public-access-link.ts
637
- var createPublicAccessLink = createMcpCommand({
638
- command: "+create_public_access_link",
639
- description: "Create a public access link for the project. Supports dashboard and bi_panel targets and validates the access-control time range.",
1201
+ // src/commands/te-analysis/project-space/create.ts
1202
+ var projectSpaceCreate = createAnalysisCapabilityCommand({
1203
+ resource: "project-space",
1204
+ command: "create",
1205
+ capabilityId: "analysis.project_space.create",
1206
+ description: "Create a project space.",
640
1207
  flags: [
641
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
642
- { name: "company_id", type: "number", required: false, desc: "Optional company ID. If omitted, the company ID of the project is used." },
643
- { name: "resource_type", type: "string", required: true, desc: "Access target type. Supported values: dashboard and bi_panel." },
644
- { name: "resource_id", type: "number", required: true, desc: "Access target ID. Use a dashboard ID when resource_type is dashboard, and a BI panel ID when resource_type is bi_panel." },
645
- { name: "access_controls", type: "json", required: true, desc: "Public access control JSON. For dashboard, DN/GF/UA control title, filters, and refresh behavior. For bi_panel, the default is an empty object." },
646
- { name: "remark", type: "string", required: false, desc: "Optional remark. Maximum length: 200 characters." },
647
- { name: "effective_at", type: "string", required: true, desc: "Effective time. Format: yyyy-MM-dd HH:mm:ss" },
648
- { name: "expires_at", type: "string", required: true, desc: "Expiration time. Format: yyyy-MM-dd HH:mm:ss" }
1208
+ projectIdFlag,
1209
+ { name: "space-name", type: "string", required: false, desc: "Project space name." },
1210
+ { name: "space-desc", type: "string", required: false, desc: "Project space description." },
1211
+ { name: "avatar-type", type: "number", required: false, desc: "Avatar type." },
1212
+ { name: "color-key", type: "string", required: false, desc: "Avatar color key." },
1213
+ { name: "avatar", type: "string", required: false, desc: "Avatar value." },
1214
+ payloadFlag
649
1215
  ],
650
1216
  risk: "write",
651
- mcpService: "te_analysis_extend",
652
- buildArgs: (ctx) => ({
653
- projectId: ctx.num("project_id"),
654
- companyId: optionalNumber(ctx, "company_id"),
655
- resourceType: ctx.str("resource_type"),
656
- resourceId: ctx.num("resource_id"),
657
- accessControls: requiredJsonString(ctx, "access_controls"),
658
- remark: optionalString(ctx, "remark"),
659
- effectiveAt: ctx.str("effective_at"),
660
- expiresAt: ctx.str("expires_at")
1217
+ buildInput: (ctx) => compactInput({
1218
+ ...projectInput(ctx),
1219
+ space_name: optionalString3(ctx, "space-name"),
1220
+ space_desc: optionalString3(ctx, "space-desc"),
1221
+ avatar_type: optionalNumber3(ctx, "avatar-type"),
1222
+ color_key: optionalString3(ctx, "color-key"),
1223
+ avatar: optionalString3(ctx, "avatar"),
1224
+ payload: optionalJson4(ctx, "payload")
661
1225
  })
662
1226
  });
663
1227
 
664
- // src/commands/te-analysis/dashboard/update-public-access-link.ts
665
- var updatePublicAccessLink = createMcpCommand({
666
- command: "+update_public_access_link",
667
- description: "Update the access controls, remark, and effective time range of a public access link.",
1228
+ // src/commands/te-analysis/project-space/delete.ts
1229
+ var projectSpaceDelete = createAnalysisCapabilityCommand({
1230
+ resource: "project-space",
1231
+ command: "delete",
1232
+ capabilityId: "analysis.project_space.delete",
1233
+ description: "Delete one or more project spaces.",
668
1234
  flags: [
669
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
670
- { name: "company_id", type: "number", required: false, desc: "Optional company ID. If omitted, the company ID of the project is used." },
671
- { name: "link_id", type: "number", required: true, desc: "Link ID" },
672
- { name: "access_controls", type: "json", required: true, desc: "Public access control JSON" },
673
- { name: "remark", type: "string", required: false, desc: "Optional remark. Maximum length: 200 characters." },
674
- { name: "effective_at", type: "string", required: true, desc: "Effective time. Format: yyyy-MM-dd HH:mm:ss" },
675
- { name: "expires_at", type: "string", required: true, desc: "Expiration time. Format: yyyy-MM-dd HH:mm:ss" }
1235
+ projectIdFlag,
1236
+ { name: "space-id", type: "number", required: false, desc: "Project space ID." },
1237
+ { name: "space-ids", type: "json", required: false, desc: "Project space ID array." }
676
1238
  ],
677
1239
  risk: "write",
678
- mcpService: "te_analysis_extend",
679
- buildArgs: (ctx) => ({
680
- projectId: ctx.num("project_id"),
681
- companyId: optionalNumber(ctx, "company_id"),
682
- linkId: ctx.num("link_id"),
683
- accessControls: requiredJsonString(ctx, "access_controls"),
684
- remark: optionalString(ctx, "remark"),
685
- effectiveAt: ctx.str("effective_at"),
686
- expiresAt: ctx.str("expires_at")
1240
+ buildInput: (ctx) => compactInput({
1241
+ ...projectInput(ctx),
1242
+ space_id: optionalNumber3(ctx, "space-id"),
1243
+ space_ids: optionalJsonArray(ctx, "space-ids")
1244
+ })
1245
+ });
1246
+
1247
+ // src/commands/te-analysis/project-space/share.ts
1248
+ var projectSpaceShare = createAnalysisCapabilityCommand({
1249
+ resource: "project-space",
1250
+ command: "share",
1251
+ capabilityId: "analysis.project_space.share",
1252
+ description: "Modify project space sharing members.",
1253
+ flags: [projectIdFlag, { name: "space-id", type: "number", required: true, desc: "Project space ID." }, payloadFlag],
1254
+ risk: "write",
1255
+ buildInput: (ctx) => compactInput({
1256
+ ...projectInput(ctx),
1257
+ space_id: ctx.num("space-id"),
1258
+ payload: optionalJson4(ctx, "payload")
1259
+ })
1260
+ });
1261
+
1262
+ // src/commands/te-analysis/project-space/members.ts
1263
+ var projectSpaceMembers = createAnalysisCapabilityCommand({
1264
+ resource: "project-space",
1265
+ command: "members",
1266
+ capabilityId: "analysis.project_space.members",
1267
+ description: "Get project space members.",
1268
+ flags: [projectIdFlag, { name: "space-id", type: "number", required: true, desc: "Project space ID." }],
1269
+ risk: "read",
1270
+ buildInput: (ctx) => ({
1271
+ ...projectInput(ctx),
1272
+ space_id: ctx.num("space-id")
687
1273
  })
688
1274
  });
689
1275
 
690
- // src/commands/te-analysis/dashboard/create-space.ts
691
- var createSpace = createMcpCommand({
692
- command: "+create_space",
693
- description: "Create a new space in a project. A space organizes dashboards and assets under a named container.",
1276
+ // src/commands/te-analysis/project-space/index.ts
1277
+ var commands10 = [
1278
+ projectSpaceList,
1279
+ projectSpaceGet,
1280
+ projectSpaceCreate,
1281
+ projectSpaceDelete,
1282
+ projectSpaceShare,
1283
+ projectSpaceMembers
1284
+ ];
1285
+ var project_space_default = commands10;
1286
+
1287
+ // src/commands/te-analysis/folder/create.ts
1288
+ var folderCreate = createAnalysisCapabilityCommand({
1289
+ resource: "folder",
1290
+ command: "create",
1291
+ capabilityId: "analysis.folder.create",
1292
+ description: "Create a folder in personal space or project space.",
694
1293
  flags: [
695
- { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
696
- { name: "space_name", type: "string", required: true, desc: "Space name (1-64 characters)" },
697
- { name: "space_desc", type: "string", required: false, desc: "Optional space description (max 200 characters)" }
1294
+ projectIdFlag,
1295
+ { name: "folder-name", type: "string", required: true, desc: "Folder name." },
1296
+ { name: "space-id", type: "number", required: false, desc: "Project space ID. Omit for personal space." },
1297
+ { name: "parent-folder-id", type: "number", required: false, desc: "Parent project-space folder ID." },
1298
+ payloadFlag
698
1299
  ],
699
1300
  risk: "write",
700
- mcpService: "te_analysis_extend",
701
- buildArgs: (ctx) => ({
702
- projectId: ctx.num("project_id"),
703
- spaceName: ctx.str("space_name"),
704
- spaceDesc: optionalString(ctx, "space_desc")
1301
+ buildInput: (ctx) => compactInput({
1302
+ ...projectInput(ctx),
1303
+ folder_name: ctx.str("folder-name"),
1304
+ space_id: optionalNumber3(ctx, "space-id"),
1305
+ parent_folder_id: optionalNumber3(ctx, "parent-folder-id"),
1306
+ payload: optionalJson4(ctx, "payload")
705
1307
  })
706
1308
  });
707
1309
 
708
- // src/commands/te-analysis/dashboard/delete-dashboard.ts
709
- var deleteDashboard = createMcpCommand({
710
- command: "+delete_dashboard",
711
- description: "Delete a dashboard by dashboardId",
1310
+ // src/commands/te-analysis/folder/delete.ts
1311
+ var folderDelete = createAnalysisCapabilityCommand({
1312
+ resource: "folder",
1313
+ command: "delete",
1314
+ capabilityId: "analysis.folder.delete",
1315
+ description: "Delete one or more folders.",
712
1316
  flags: [
713
- { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
714
- { name: "dashboard_id", type: "number", required: true, desc: "Dashboard ID to delete" }
1317
+ projectIdFlag,
1318
+ { name: "folder-id", type: "number", required: false, desc: "Folder ID." },
1319
+ { name: "folder-ids", type: "json", required: false, desc: "Folder ID array." },
1320
+ { name: "space-id", type: "number", required: false, desc: "Project space ID for project-space folders. Omit for personal folders." }
715
1321
  ],
716
1322
  risk: "write",
717
- buildArgs: (ctx) => ({
718
- projectId: ctx.num("project_id"),
719
- dashboardId: ctx.num("dashboard_id")
1323
+ buildInput: (ctx) => compactInput({
1324
+ ...projectInput(ctx),
1325
+ folder_id: optionalNumber3(ctx, "folder-id"),
1326
+ folder_ids: optionalJsonArray(ctx, "folder-ids"),
1327
+ space_id: optionalNumber3(ctx, "space-id")
720
1328
  })
721
1329
  });
722
1330
 
723
- // src/commands/te-analysis/dashboard/copy-dashboard.ts
724
- var copyDashboard = createMcpCommand({
725
- command: "+copy_dashboard",
726
- description: "Copy a dashboard to a new dashboard. Optionally copies its associated reports. To place the copy in a space or folder, provide to_space_id or to_folder_id.",
1331
+ // src/commands/te-analysis/folder/share.ts
1332
+ var folderShare = createAnalysisCapabilityCommand({
1333
+ resource: "folder",
1334
+ command: "share",
1335
+ capabilityId: "analysis.folder.share",
1336
+ description: "Modify folder sharing members.",
1337
+ flags: [projectIdFlag, { name: "folder-id", type: "number", required: true, desc: "Folder ID." }, payloadFlag],
1338
+ risk: "write",
1339
+ buildInput: (ctx) => compactInput({
1340
+ ...projectInput(ctx),
1341
+ folder_id: ctx.num("folder-id"),
1342
+ payload: optionalJson4(ctx, "payload")
1343
+ })
1344
+ });
1345
+
1346
+ // src/commands/te-analysis/folder/members.ts
1347
+ var folderMembers = createAnalysisCapabilityCommand({
1348
+ resource: "folder",
1349
+ command: "members",
1350
+ capabilityId: "analysis.folder.members",
1351
+ description: "Get folder members.",
1352
+ flags: [projectIdFlag, { name: "folder-id", type: "number", required: true, desc: "Folder ID." }],
1353
+ risk: "read",
1354
+ buildInput: (ctx) => ({
1355
+ ...projectInput(ctx),
1356
+ folder_id: ctx.num("folder-id")
1357
+ })
1358
+ });
1359
+
1360
+ // src/commands/te-analysis/folder/index.ts
1361
+ var commands11 = [
1362
+ folderCreate,
1363
+ folderDelete,
1364
+ folderShare,
1365
+ folderMembers
1366
+ ];
1367
+ var folder_default = commands11;
1368
+
1369
+ // src/commands/te-analysis/favorite/add.ts
1370
+ var favoriteAdd = createAnalysisCapabilityCommand({
1371
+ resource: "favorite",
1372
+ command: "add",
1373
+ capabilityId: "analysis.favorite.add",
1374
+ description: "Favorite one dashboard, BI panel, or folder.",
727
1375
  flags: [
728
- { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
729
- { name: "dashboard_id", type: "number", required: true, desc: "Source dashboard ID to copy" },
730
- { name: "dashboard_name", type: "string", required: true, desc: "Name for the new copied dashboard" },
731
- { name: "report_copy", type: "boolean", required: false, desc: "Whether to also copy the associated reports. Defaults to false." },
732
- { name: "to_space_id", type: "number", required: false, desc: "Target space ID for the copied dashboard. Omit to use the default location." },
733
- { name: "to_folder_id", type: "number", required: false, desc: "Target folder ID inside the target space. Omit to place directly in the space root." }
1376
+ projectIdFlag,
1377
+ { name: "asset-id", type: "number", required: false, desc: "Asset ID." },
1378
+ { name: "asset-type", type: "string", required: false, desc: "Asset type, for example dashboard, bi_panel, or folder." },
1379
+ { name: "space-id", type: "number", required: false, desc: "Project space ID when relevant." },
1380
+ { name: "id", type: "number", required: false, desc: "Backend DTO ID field when required." },
1381
+ payloadFlag
734
1382
  ],
735
1383
  risk: "write",
736
- mcpService: "te_analysis_extend",
737
- buildArgs: (ctx) => ({
738
- projectId: ctx.num("project_id"),
739
- dashboardId: ctx.num("dashboard_id"),
740
- dashboardName: ctx.str("dashboard_name"),
741
- reportCopy: optionalBoolean(ctx, "report_copy"),
742
- toSpaceId: optionalNumber(ctx, "to_space_id"),
743
- toFolderId: optionalNumber(ctx, "to_folder_id")
1384
+ buildInput: (ctx) => compactInput({
1385
+ ...projectInput(ctx),
1386
+ asset_id: optionalNumber3(ctx, "asset-id"),
1387
+ asset_type: optionalString3(ctx, "asset-type"),
1388
+ space_id: optionalNumber3(ctx, "space-id"),
1389
+ id: optionalNumber3(ctx, "id"),
1390
+ payload: optionalJson4(ctx, "payload")
744
1391
  })
745
1392
  });
746
1393
 
747
- // src/commands/te-analysis/dashboard/move-dashboard.ts
748
- var moveDashboard = createMcpCommand({
749
- command: "+move_dashboard",
750
- description: "Move a dashboard to a different space or folder. Provide to_space_id to move to a space root, or both to_space_id and to_folder_id to move into a folder within that space.",
1394
+ // src/commands/te-analysis/favorite/remove.ts
1395
+ var favoriteRemove = createAnalysisCapabilityCommand({
1396
+ resource: "favorite",
1397
+ command: "remove",
1398
+ capabilityId: "analysis.favorite.remove",
1399
+ description: "Remove favorite from one dashboard, BI panel, or folder.",
751
1400
  flags: [
752
- { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
753
- { name: "dashboard_id", type: "number", required: true, desc: "Dashboard ID to move" },
754
- { name: "to_space_id", type: "number", required: true, desc: "Target space ID to move the dashboard into" },
755
- { name: "to_folder_id", type: "number", required: false, desc: "Target folder ID within the target space. Omit to place at the space root." },
756
- { name: "from_space_id", type: "number", required: false, desc: "Source space ID the dashboard is currently in. Omit if unknown." },
757
- { name: "from_folder_id", type: "number", required: false, desc: "Source folder ID the dashboard is currently in. Omit if unknown." }
1401
+ projectIdFlag,
1402
+ { name: "asset-id", type: "number", required: false, desc: "Asset ID." },
1403
+ { name: "asset-type", type: "string", required: false, desc: "Asset type, for example dashboard, bi_panel, or folder." },
1404
+ { name: "space-id", type: "number", required: false, desc: "Project space ID when relevant." },
1405
+ { name: "id", type: "number", required: false, desc: "Backend DTO ID field when required." },
1406
+ payloadFlag
758
1407
  ],
759
1408
  risk: "write",
760
- mcpService: "te_analysis_extend",
761
- buildArgs: (ctx) => ({
762
- projectId: ctx.num("project_id"),
763
- dashboardId: ctx.num("dashboard_id"),
764
- toSpaceId: ctx.num("to_space_id"),
765
- toFolderId: optionalNumber(ctx, "to_folder_id"),
766
- fromSpaceId: optionalNumber(ctx, "from_space_id"),
767
- fromFolderId: optionalNumber(ctx, "from_folder_id")
1409
+ buildInput: (ctx) => compactInput({
1410
+ ...projectInput(ctx),
1411
+ asset_id: optionalNumber3(ctx, "asset-id"),
1412
+ asset_type: optionalString3(ctx, "asset-type"),
1413
+ space_id: optionalNumber3(ctx, "space-id"),
1414
+ id: optionalNumber3(ctx, "id"),
1415
+ payload: optionalJson4(ctx, "payload")
768
1416
  })
769
1417
  });
770
1418
 
771
- // src/commands/te-analysis/dashboard/list-spaces.ts
772
- var listSpaces = createMcpCommand({
773
- command: "+list_spaces",
774
- description: "List spaces and folders accessible to the current user in the project as a recursive tree. Use to resolve spaceId for create_dashboard / copy_dashboard, and toSpaceId / toFolderId / fromSpaceId / fromFolderId for move_dashboard and copy_dashboard.",
1419
+ // src/commands/te-analysis/favorite/index.ts
1420
+ var commands12 = [
1421
+ favoriteAdd,
1422
+ favoriteRemove
1423
+ ];
1424
+ var favorite_default = commands12;
1425
+
1426
+ // src/commands/te-analysis/public-link/create.ts
1427
+ var publicLinkCreate = createAnalysisCapabilityCommand({
1428
+ resource: "public-link",
1429
+ command: "create",
1430
+ capabilityId: "analysis.public_link.create",
1431
+ description: "Create a public link for a dashboard or BI panel.",
775
1432
  flags: [
776
- { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" }
1433
+ projectIdFlag,
1434
+ { name: "company-id", type: "number", required: false, desc: "Company ID. Derived from project ID when omitted." },
1435
+ { name: "resource-type", type: "string", required: true, desc: "Resource type: dashboard or bi_panel." },
1436
+ { name: "resource-id", type: "number", required: true, desc: "Target resource ID." },
1437
+ { name: "access-controls", type: "json", required: false, desc: "Public link access-control JSON." },
1438
+ { name: "remark", type: "string", required: false, desc: "Public link remark." },
1439
+ { name: "effective-at", type: "string", required: true, desc: "Effective time, yyyy-MM-dd HH:mm:ss." },
1440
+ { name: "expires-at", type: "string", required: true, desc: "Expiration time, yyyy-MM-dd HH:mm:ss." },
1441
+ payloadFlag
777
1442
  ],
1443
+ risk: "write",
1444
+ buildInput: (ctx) => compactInput({
1445
+ ...projectInput(ctx),
1446
+ company_id: optionalNumber3(ctx, "company-id"),
1447
+ resource_type: ctx.str("resource-type"),
1448
+ resource_id: ctx.num("resource-id"),
1449
+ access_controls: optionalJson4(ctx, "access-controls"),
1450
+ remark: optionalString3(ctx, "remark"),
1451
+ effective_at: ctx.str("effective-at"),
1452
+ expires_at: ctx.str("expires-at"),
1453
+ payload: optionalJson4(ctx, "payload")
1454
+ })
1455
+ });
1456
+
1457
+ // src/commands/te-analysis/public-link/list.ts
1458
+ var publicLinkList = createAnalysisCapabilityCommand({
1459
+ resource: "public-link",
1460
+ command: "list",
1461
+ capabilityId: "analysis.public_link.list",
1462
+ description: "List public links in a project.",
1463
+ flags: [projectIdFlag, queryFlag, fieldsFlag, limitFlag, offsetFlag],
778
1464
  risk: "read",
779
- mcpService: "te_analysis_extend",
780
- buildArgs: (ctx) => ({
781
- projectId: ctx.num("project_id")
1465
+ buildInput: listInput
1466
+ });
1467
+
1468
+ // src/commands/te-analysis/public-link/update.ts
1469
+ var publicLinkUpdate = createAnalysisCapabilityCommand({
1470
+ resource: "public-link",
1471
+ command: "update",
1472
+ capabilityId: "analysis.public_link.update",
1473
+ description: "Update a public link.",
1474
+ flags: [
1475
+ projectIdFlag,
1476
+ { name: "company-id", type: "number", required: false, desc: "Company ID. Derived from project ID when omitted." },
1477
+ { name: "link-id", type: "number", required: true, desc: "Public link ID." },
1478
+ { name: "access-controls", type: "json", required: false, desc: "Public link access-control JSON." },
1479
+ { name: "remark", type: "string", required: false, desc: "Public link remark." },
1480
+ { name: "effective-at", type: "string", required: true, desc: "Effective time, yyyy-MM-dd HH:mm:ss." },
1481
+ { name: "expires-at", type: "string", required: true, desc: "Expiration time, yyyy-MM-dd HH:mm:ss." },
1482
+ payloadFlag
1483
+ ],
1484
+ risk: "write",
1485
+ buildInput: (ctx) => compactInput({
1486
+ ...projectInput(ctx),
1487
+ company_id: optionalNumber3(ctx, "company-id"),
1488
+ link_id: ctx.num("link-id"),
1489
+ access_controls: optionalJson4(ctx, "access-controls"),
1490
+ remark: optionalString3(ctx, "remark"),
1491
+ effective_at: ctx.str("effective-at"),
1492
+ expires_at: ctx.str("expires-at"),
1493
+ payload: optionalJson4(ctx, "payload")
782
1494
  })
783
1495
  });
784
1496
 
785
- // src/commands/te-analysis/dashboard/freeze-dashboards.ts
786
- var freezeDashboards = createMcpCommand({
787
- command: "+freeze_dashboards",
788
- description: "Freeze or unfreeze one or more dashboards. freeze=true freezes and takes scheduled jobs offline; freeze=false unfreezes and brings scheduled jobs back online.",
1497
+ // src/commands/te-analysis/public-link/offline.ts
1498
+ var publicLinkOffline = createAnalysisCapabilityCommand({
1499
+ resource: "public-link",
1500
+ command: "offline",
1501
+ capabilityId: "analysis.public_link.offline",
1502
+ description: "Offline one or more public links.",
789
1503
  flags: [
790
- { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
791
- { name: "dashboard_ids", type: "json", required: true, desc: "List of dashboard IDs to freeze or unfreeze" },
792
- { name: "freeze", type: "boolean", required: true, desc: "true to freeze, false to unfreeze" }
1504
+ projectIdFlag,
1505
+ { name: "company-id", type: "number", required: false, desc: "Company ID. Derived from project ID when omitted." },
1506
+ { name: "link-id", type: "number", required: false, desc: "Public link ID." },
1507
+ { name: "link-ids", type: "json", required: false, desc: "Public link ID array." }
793
1508
  ],
794
1509
  risk: "write",
795
- mcpService: "te_analysis_extend",
796
- buildArgs: (ctx) => ({
797
- projectId: ctx.num("project_id"),
798
- dashboardIds: ctx.json("dashboard_ids"),
799
- freeze: ctx.bool("freeze")
1510
+ buildInput: (ctx) => compactInput({
1511
+ ...projectInput(ctx),
1512
+ company_id: optionalNumber3(ctx, "company-id"),
1513
+ link_id: optionalNumber3(ctx, "link-id"),
1514
+ link_ids: optionalJsonArray(ctx, "link-ids")
800
1515
  })
801
1516
  });
802
1517
 
803
- // src/commands/te-analysis/dashboard/index.ts
804
- var commands3 = [
805
- listDashboards,
806
- listBiPanels,
807
- getBiPanelDetail,
808
- queryBiPanelData,
809
- queryDashboardDetail,
810
- queryDashboardReportData,
811
- createDashboard,
812
- updateDashboard,
813
- deleteDashboard,
814
- copyDashboard,
815
- moveDashboard,
816
- createOrUpdateDashboardNote,
817
- listPublicAccessLinks,
818
- createPublicAccessLink,
819
- updatePublicAccessLink,
820
- createSpace,
821
- listSpaces,
822
- freezeDashboards
1518
+ // src/commands/te-analysis/public-link/delete.ts
1519
+ var publicLinkDelete = createAnalysisCapabilityCommand({
1520
+ resource: "public-link",
1521
+ command: "delete",
1522
+ capabilityId: "analysis.public_link.delete",
1523
+ description: "Delete one or more public links.",
1524
+ flags: [
1525
+ projectIdFlag,
1526
+ { name: "company-id", type: "number", required: false, desc: "Company ID. Derived from project ID when omitted." },
1527
+ { name: "link-id", type: "number", required: false, desc: "Public link ID." },
1528
+ { name: "link-ids", type: "json", required: false, desc: "Public link ID array." }
1529
+ ],
1530
+ risk: "write",
1531
+ buildInput: (ctx) => compactInput({
1532
+ ...projectInput(ctx),
1533
+ company_id: optionalNumber3(ctx, "company-id"),
1534
+ link_id: optionalNumber3(ctx, "link-id"),
1535
+ link_ids: optionalJsonArray(ctx, "link-ids")
1536
+ })
1537
+ });
1538
+
1539
+ // src/commands/te-analysis/public-link/index.ts
1540
+ var commands13 = [
1541
+ publicLinkCreate,
1542
+ publicLinkList,
1543
+ publicLinkUpdate,
1544
+ publicLinkOffline,
1545
+ publicLinkDelete
823
1546
  ];
824
- var dashboard_default = commands3;
1547
+ var public_link_default = commands13;
825
1548
 
826
1549
  // src/commands/te-analysis/model/query-adhoc.ts
827
1550
  var queryAdhoc = createMcpCommand({
@@ -1304,7 +2027,7 @@ var buildDistributionAnalysisQp = createMcpCommand({
1304
2027
  });
1305
2028
 
1306
2029
  // src/commands/te-analysis/model/index.ts
1307
- var commands4 = [
2030
+ var commands14 = [
1308
2031
  buildEventAnalysisQp,
1309
2032
  buildRetentionAnalysisQp,
1310
2033
  buildFunnelAnalysisQp,
@@ -1323,7 +2046,7 @@ var commands4 = [
1323
2046
  loadFilters,
1324
2047
  getTableColumns
1325
2048
  ];
1326
- var model_default = commands4;
2049
+ var model_default = commands14;
1327
2050
 
1328
2051
  // src/commands/te-analysis/entity/query-entity-details.ts
1329
2052
  var queryEntityDetails = createMcpCommand({
@@ -1461,13 +2184,13 @@ var buildEventDetailsSql = createMcpCommand({
1461
2184
  });
1462
2185
 
1463
2186
  // src/commands/te-analysis/entity/index.ts
1464
- var commands5 = [
2187
+ var commands15 = [
1465
2188
  queryEntityDetails,
1466
2189
  queryEventDetails,
1467
2190
  buildEntityDetailsSql,
1468
2191
  buildEventDetailsSql
1469
2192
  ];
1470
- var entity_default = commands5;
2193
+ var entity_default = commands15;
1471
2194
 
1472
2195
  // src/commands/te-analysis/schema/get-analysis-query-schema.ts
1473
2196
  var getAnalysisQuerySchema = createMcpCommand({
@@ -1505,12 +2228,12 @@ var getGroupbySchema = createMcpCommand({
1505
2228
  });
1506
2229
 
1507
2230
  // src/commands/te-analysis/schema/index.ts
1508
- var commands6 = [
2231
+ var commands16 = [
1509
2232
  getAnalysisQuerySchema,
1510
2233
  getFilterSchema,
1511
2234
  getGroupbySchema
1512
2235
  ];
1513
- var schema_default = commands6;
2236
+ var schema_default = commands16;
1514
2237
 
1515
2238
  // src/commands/te-analysis/global/list-query-clusters.ts
1516
2239
  var listQueryClusters = createMcpCommand({
@@ -1526,22 +2249,33 @@ var listQueryClusters = createMcpCommand({
1526
2249
  });
1527
2250
 
1528
2251
  // src/commands/te-analysis/global/index.ts
1529
- var commands7 = [
2252
+ var commands17 = [
1530
2253
  listQueryClusters
1531
2254
  ];
1532
- var global_default = commands7;
2255
+ var global_default = commands17;
1533
2256
 
1534
2257
  // src/commands/te-analysis/index.ts
1535
- var commands8 = [
2258
+ registerCapabilityGatewayRoute("analysis", { gatewayDomain: "analysis" });
2259
+ var commands18 = [
1536
2260
  ...meta_default,
1537
2261
  ...report_default,
1538
2262
  ...dashboard_default,
2263
+ ...dashboard_report_data_default,
2264
+ ...query_default,
2265
+ ...dashboard_definition_default,
2266
+ ...dashboard_daily_report_default,
2267
+ ...bi_panel_default,
2268
+ ...bi_panel_page_data_default,
2269
+ ...project_space_default,
2270
+ ...folder_default,
2271
+ ...favorite_default,
2272
+ ...public_link_default,
1539
2273
  ...model_default,
1540
2274
  ...entity_default,
1541
2275
  ...schema_default,
1542
2276
  ...isGlobalQueryModeEnabled() ? global_default : []
1543
2277
  ];
1544
- var te_analysis_default = commands8;
2278
+ var te_analysis_default = commands18;
1545
2279
  export {
1546
2280
  te_analysis_default as default
1547
2281
  };