@thinkingai/ae-cli 6.0.22 → 6.0.27

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 (172) hide show
  1. package/dist/{auth-RDN6D5HU.js → auth-7TQRGLBC.js} +13 -15
  2. package/dist/auth-MEJ642P4.js +13 -0
  3. package/dist/chunk-2NDGFQHW.js +190 -0
  4. package/dist/{chunk-5FBLRSMU.js → chunk-7QQ4233A.js} +3 -3
  5. package/dist/{chunk-U6QPKCN3.js → chunk-AJTH7LT3.js} +10 -116
  6. package/dist/chunk-BXMXMUD7.js +254 -0
  7. package/dist/chunk-C4DH76LX.js +59 -0
  8. package/dist/chunk-GWZ5MYWE.js +209 -0
  9. package/dist/{chunk-E34XH4GW.js → chunk-KCA6BA5D.js} +8 -8
  10. package/dist/{chunk-XE2PI5DS.js → chunk-KGJQCYVC.js} +1 -1
  11. package/dist/chunk-LG5YT7P7.js +59 -0
  12. package/dist/{chunk-2W7HULUD.js → chunk-MDJGDI6K.js} +2 -2
  13. package/dist/{chunk-H52CSLJW.js → chunk-R77JT7XD.js} +53 -6
  14. package/dist/{chunk-WPXHCP4A.js → chunk-YCLVYFK7.js} +52 -9
  15. package/dist/{chunk-4EUZRJPO.js → chunk-YNQFYBDB.js} +102 -14
  16. package/dist/{chunk-YACCPUNQ.js → chunk-ZAOL36CG.js} +1 -1
  17. package/dist/cli-token-TVQRSE46.js +18 -0
  18. package/dist/{client-VTJMUZ4O.js → client-2643Z5AG.js} +3 -3
  19. package/dist/{config-2SDTLGOC.js → config-ZVPARN4R.js} +4 -9
  20. package/dist/index.js +27 -24
  21. package/dist/{metadata-JZ2OTWBK.js → metadata-IPSPQBX3.js} +56 -65
  22. package/dist/metadata-N5REJ7R7.js +411 -0
  23. package/dist/{model-ZYMRN4VS.js → model-T3KZJWLW.js} +2 -2
  24. package/dist/{raw-NGYHAL3F.js → raw-OHSUK42D.js} +4 -4
  25. package/dist/{sync-JVLX6TGW.js → sync-ULT5SECP.js} +3 -3
  26. package/dist/{te-agent-QPZTLHPH.js → te-agent-QLIVKRUN.js} +1146 -61
  27. package/dist/{te-analysis-WWX3Z6RP.js → te-analysis-2U5EPXQC.js} +1213 -341
  28. package/dist/te-analysis-QMZ2UH7F.js +2419 -0
  29. package/dist/{te-audience-UXGHUVBB.js → te-audience-PVMKQAFH.js} +5 -5
  30. package/dist/te-audience-XMRMVD2V.js +599 -0
  31. package/dist/{te-common-7XXH73MF.js → te-common-CFGQXTFV.js} +5 -5
  32. package/dist/te-common-SDB3O2QG.js +130 -0
  33. package/dist/{te-community-QKE67HR2.js → te-community-6A7LKYUH.js} +5 -5
  34. package/dist/te-community-GMWFGILT.js +687 -0
  35. package/dist/te-dataops-6LIPYNGH.js +1864 -0
  36. package/dist/{te-dataops-6W7NNYST.js → te-dataops-Z53CTG2U.js} +90 -68
  37. package/dist/{te-engage-NCFAQFX3.js → te-engage-AGREUOW7.js} +30 -15
  38. package/dist/te-engage-MIIUKY6M.js +1525 -0
  39. package/dist/{te-kb-K5BQYUCM.js → te-kb-KQJ53M3A.js} +4 -4
  40. package/dist/{te-meta-LJZBOSMO.js → te-meta-QLANJ4B4.js} +5 -5
  41. package/dist/te-meta-TOA6FWDE.js +595 -0
  42. package/dist/{te-team-DHK5R7MV.js → te-team-TQGMNHQQ.js} +5 -5
  43. package/package.json +3 -1
  44. package/skills/ae-agent/SKILL.md +158 -189
  45. package/skills/ae-agent/references/accept-skill-share.md +39 -0
  46. package/skills/ae-agent/references/add-attachment.md +57 -0
  47. package/skills/ae-agent/references/add-mcp.md +75 -0
  48. package/skills/ae-agent/references/add-model.md +70 -0
  49. package/skills/ae-agent/references/add-skill.md +71 -0
  50. package/skills/ae-agent/references/approve-skill.md +41 -0
  51. package/skills/ae-agent/references/attachment-stats.md +50 -0
  52. package/skills/ae-agent/references/auto-provision-mcp-credentials.md +57 -0
  53. package/skills/ae-agent/references/cancel-skill-submission.md +39 -0
  54. package/skills/ae-agent/references/copy-skill.md +53 -0
  55. package/skills/ae-agent/references/create-agent.md +71 -0
  56. package/skills/ae-agent/references/create-automation.md +99 -0
  57. package/skills/ae-agent/references/del-agent.md +38 -0
  58. package/skills/ae-agent/references/del-attachment.md +35 -0
  59. package/skills/ae-agent/references/del-mcp.md +35 -0
  60. package/skills/ae-agent/references/del-model.md +37 -0
  61. package/skills/ae-agent/references/del-skill-asset.md +41 -0
  62. package/skills/ae-agent/references/del-skill-reference.md +41 -0
  63. package/skills/ae-agent/references/del-skill-script.md +41 -0
  64. package/skills/ae-agent/references/del-skill.md +36 -0
  65. package/skills/ae-agent/references/edit-skill.md +64 -0
  66. package/skills/ae-agent/references/get-agent.md +37 -0
  67. package/skills/ae-agent/references/get-skill-content.md +36 -0
  68. package/skills/ae-agent/references/list-agents.md +40 -0
  69. package/skills/ae-agent/references/list-attachments.md +42 -0
  70. package/skills/ae-agent/references/list-automations.md +41 -0
  71. package/skills/ae-agent/references/list-mcp-credentials.md +65 -0
  72. package/skills/ae-agent/references/list-mcp-market.md +58 -0
  73. package/skills/ae-agent/references/list-mcps.md +37 -0
  74. package/skills/ae-agent/references/list-models.md +38 -0
  75. package/skills/ae-agent/references/list-skill-assets.md +35 -0
  76. package/skills/ae-agent/references/list-skill-market.md +59 -0
  77. package/skills/ae-agent/references/list-skill-references.md +36 -0
  78. package/skills/ae-agent/references/list-skill-scripts.md +35 -0
  79. package/skills/ae-agent/references/list-skill-shares.md +49 -0
  80. package/skills/ae-agent/references/list-skill-submissions.md +45 -0
  81. package/skills/ae-agent/references/list-skills.md +37 -0
  82. package/skills/ae-agent/references/mcp-auth-disconnect.md +50 -0
  83. package/skills/ae-agent/references/mcp-auth-start.md +61 -0
  84. package/skills/ae-agent/references/mcp-auth-status.md +56 -0
  85. package/skills/ae-agent/references/mcp-stats.md +68 -0
  86. package/skills/ae-agent/references/mcp-token.md +63 -0
  87. package/skills/ae-agent/references/mcp-tools.md +55 -0
  88. package/skills/ae-agent/references/read-skill-asset.md +51 -0
  89. package/skills/ae-agent/references/read-skill-reference.md +50 -0
  90. package/skills/ae-agent/references/read-skill-script.md +51 -0
  91. package/skills/ae-agent/references/reject-skill-share.md +37 -0
  92. package/skills/ae-agent/references/reject-skill.md +42 -0
  93. package/skills/ae-agent/references/rescan-skills.md +44 -0
  94. package/skills/ae-agent/references/set-mcp-credential.md +67 -0
  95. package/skills/ae-agent/references/set-mcp-meta.md +52 -0
  96. package/skills/ae-agent/references/set-skill-meta.md +51 -0
  97. package/skills/ae-agent/references/share-skill.md +50 -0
  98. package/skills/ae-agent/references/submit-skill.md +51 -0
  99. package/skills/ae-agent/references/test-model.md +61 -0
  100. package/skills/ae-agent/references/toggle-mcp.md +39 -0
  101. package/skills/ae-agent/references/toggle-model.md +37 -0
  102. package/skills/ae-agent/references/toggle-skill.md +37 -0
  103. package/skills/ae-agent/references/update-agent.md +71 -0
  104. package/skills/ae-agent/references/update-automation.md +83 -0
  105. package/skills/ae-agent/references/update-mcp.md +79 -0
  106. package/skills/ae-agent/references/update-model.md +77 -0
  107. package/skills/ae-agent/references/upload-skill-asset.md +49 -0
  108. package/skills/ae-agent/references/upload-skill-reference.md +51 -0
  109. package/skills/ae-agent/references/upload-skill-script.md +49 -0
  110. package/skills/ae-agent/references/upload-skill.md +89 -0
  111. package/skills/ae-analysis/SKILL.md +53 -25
  112. package/skills/ae-analysis/references/analysis_gateway_assets.md +129 -0
  113. package/skills/ae-analysis/references/artifact_download.md +17 -0
  114. package/skills/ae-analysis/references/bi_panel_copy.md +15 -0
  115. package/skills/ae-analysis/references/bi_panel_create.md +15 -0
  116. package/skills/ae-analysis/references/bi_panel_delete.md +15 -0
  117. package/skills/ae-analysis/references/bi_panel_get.md +18 -0
  118. package/skills/ae-analysis/references/bi_panel_list.md +15 -0
  119. package/skills/ae-analysis/references/bi_panel_page_data_export.md +25 -0
  120. package/skills/ae-analysis/references/bi_panel_page_data_run.md +15 -0
  121. package/skills/ae-analysis/references/bi_panel_share.md +15 -0
  122. package/skills/ae-analysis/references/bi_panel_update.md +15 -0
  123. package/skills/ae-analysis/references/dashboard_abnormal_get.md +15 -0
  124. package/skills/ae-analysis/references/dashboard_copy.md +17 -0
  125. package/skills/ae-analysis/references/dashboard_create.md +15 -0
  126. package/skills/ae-analysis/references/dashboard_daily_report_send.md +17 -0
  127. package/skills/ae-analysis/references/dashboard_daily_report_update.md +17 -0
  128. package/skills/ae-analysis/references/dashboard_definition_export.md +33 -0
  129. package/skills/ae-analysis/references/dashboard_definition_import.md +15 -0
  130. package/skills/ae-analysis/references/dashboard_delete.md +15 -0
  131. package/skills/ae-analysis/references/dashboard_freeze.md +15 -0
  132. package/skills/ae-analysis/references/dashboard_get.md +15 -0
  133. package/skills/ae-analysis/references/dashboard_handover.md +15 -0
  134. package/skills/ae-analysis/references/dashboard_list.md +15 -0
  135. package/skills/ae-analysis/references/dashboard_report_data_export.md +25 -0
  136. package/skills/ae-analysis/references/dashboard_report_data_run.md +15 -0
  137. package/skills/ae-analysis/references/dashboard_share.md +15 -0
  138. package/skills/ae-analysis/references/dashboard_share_info.md +15 -0
  139. package/skills/ae-analysis/references/dashboard_task_status.md +15 -0
  140. package/skills/ae-analysis/references/dashboard_update.md +16 -0
  141. package/skills/ae-analysis/references/favorite_add.md +15 -0
  142. package/skills/ae-analysis/references/favorite_remove.md +15 -0
  143. package/skills/ae-analysis/references/folder_create.md +15 -0
  144. package/skills/ae-analysis/references/folder_delete.md +15 -0
  145. package/skills/ae-analysis/references/folder_members.md +15 -0
  146. package/skills/ae-analysis/references/folder_share.md +15 -0
  147. package/skills/ae-analysis/references/project_space_create.md +15 -0
  148. package/skills/ae-analysis/references/project_space_delete.md +15 -0
  149. package/skills/ae-analysis/references/project_space_get.md +18 -0
  150. package/skills/ae-analysis/references/project_space_list.md +15 -0
  151. package/skills/ae-analysis/references/project_space_members.md +15 -0
  152. package/skills/ae-analysis/references/project_space_share.md +15 -0
  153. package/skills/ae-analysis/references/public_link_create.md +15 -0
  154. package/skills/ae-analysis/references/public_link_delete.md +15 -0
  155. package/skills/ae-analysis/references/public_link_list.md +15 -0
  156. package/skills/ae-analysis/references/public_link_offline.md +15 -0
  157. package/skills/ae-analysis/references/public_link_update.md +15 -0
  158. package/skills/ae-analysis/references/query_cancel.md +15 -0
  159. package/skills/ae-analysis/references/run_inspect.md +22 -0
  160. package/skills/ae-dataops/references/dataops-flow-create.md +2 -2
  161. package/skills/ae-dataops/references/dataops-flow-monitor.md +3 -3
  162. package/skills/ae-dataops/references/dataops-integration.md +1 -0
  163. package/skills/ae-engage/references/flow-node-config-schema.md +32 -8
  164. package/skills/ae-engage/references/save-flow.md +65 -29
  165. package/skills/ae-engage/references/validate-flow-node-config.md +28 -10
  166. package/skills/ae-generate-tracking-plan/SKILL.md +9 -7
  167. package/skills/ae-metadata/references/metadata_data_table_csv_write.md +5 -3
  168. package/skills/ae-metadata/references/metadata_data_table_sql_write.md +5 -4
  169. package/skills/ae-metadata/references/metadata_property_dimension_table_create_and_bind_csv.md +5 -3
  170. package/dist/auth-I2G7OAU2.js +0 -19
  171. package/dist/chunk-FPE5LGVU.js +0 -105
  172. package/dist/cli-token-6AGEDJF4.js +0 -14
@@ -1,16 +1,24 @@
1
- import "./chunk-4EUZRJPO.js";
1
+ import {
2
+ createCapabilityCommand,
3
+ registerCapabilityGatewayRoute
4
+ } from "./chunk-LG5YT7P7.js";
5
+ import {
6
+ buildCapabilityGatewayUrl,
7
+ callCapabilityApi,
8
+ downloadCapabilityArtifact
9
+ } from "./chunk-YNQFYBDB.js";
2
10
  import {
3
11
  callMcpTool,
4
12
  parseMcpResult,
5
13
  resolveMcpUrl
6
- } from "./chunk-5FBLRSMU.js";
14
+ } from "./chunk-7QQ4233A.js";
7
15
  import {
8
16
  isGlobalQueryModeEnabled
9
- } from "./chunk-XE2PI5DS.js";
17
+ } from "./chunk-KGJQCYVC.js";
10
18
  import "./chunk-NOO24N7W.js";
11
- import "./chunk-FPE5LGVU.js";
12
- import "./chunk-U6QPKCN3.js";
13
- import "./chunk-WPXHCP4A.js";
19
+ import "./chunk-2NDGFQHW.js";
20
+ import "./chunk-AJTH7LT3.js";
21
+ import "./chunk-YCLVYFK7.js";
14
22
 
15
23
  // src/commands/te-analysis/shared.ts
16
24
  function createMcpCommand(config) {
@@ -389,439 +397,1290 @@ var commands2 = [
389
397
  ];
390
398
  var report_default = commands2;
391
399
 
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.",
400
+ // src/commands/te-analysis/capability-shared.ts
401
+ function createAnalysisCapabilityCommand(config) {
402
+ return createCapabilityCommand({
403
+ ...config,
404
+ cliService: "analysis"
405
+ });
406
+ }
407
+ var projectIdFlag = {
408
+ name: "project-id",
409
+ type: "number",
410
+ required: true,
411
+ desc: "Numeric project ID.",
412
+ alias: "p"
413
+ };
414
+ var queryFlag = {
415
+ name: "query",
416
+ type: "string",
417
+ required: false,
418
+ desc: "Optional keyword filter.",
419
+ alias: "q"
420
+ };
421
+ var fieldsFlag = {
422
+ name: "fields",
423
+ type: "json",
424
+ required: false,
425
+ desc: "Optional result field projection JSON array.",
426
+ alias: "f"
427
+ };
428
+ var limitFlag = {
429
+ name: "limit",
430
+ type: "number",
431
+ required: false,
432
+ desc: "Optional inline result limit.",
433
+ alias: "l"
434
+ };
435
+ var offsetFlag = {
436
+ name: "offset",
437
+ type: "number",
438
+ required: false,
439
+ desc: "Optional zero-based result offset.",
440
+ alias: "o"
441
+ };
442
+ var payloadFlag = {
443
+ name: "payload",
444
+ type: "json",
445
+ required: false,
446
+ desc: "Optional snake_case object for complex capability payload fields."
447
+ };
448
+ function projectInput(ctx) {
449
+ return { project_id: ctx.num("project-id") };
450
+ }
451
+ function listInput(ctx) {
452
+ return compactInput({
453
+ ...projectInput(ctx),
454
+ query: optionalString3(ctx, "query"),
455
+ fields: optionalJson4(ctx, "fields"),
456
+ limit: optionalNumber3(ctx, "limit"),
457
+ offset: optionalNumber3(ctx, "offset")
458
+ });
459
+ }
460
+ function dashboardReportDataInput(ctx) {
461
+ return compactInput({
462
+ ...projectInput(ctx),
463
+ dashboard_id: ctx.num("dashboard-id"),
464
+ report_ids: optionalJsonArray(ctx, "report-ids"),
465
+ filters: optionalJson4(ctx, "filters"),
466
+ start_time: optionalString3(ctx, "start-time"),
467
+ end_time: optionalString3(ctx, "end-time"),
468
+ use_cache: optionalBoolean5(ctx, "use-cache"),
469
+ request_id: optionalString3(ctx, "request-id"),
470
+ timeout_seconds: optionalNumber3(ctx, "timeout-seconds"),
471
+ limit: optionalNumber3(ctx, "limit"),
472
+ format: optionalString3(ctx, "artifact-format")
473
+ });
474
+ }
475
+ function biPanelPageDataInput(ctx) {
476
+ return compactInput({
477
+ ...projectInput(ctx),
478
+ panel_id: ctx.num("panel-id"),
479
+ page_key: ctx.str("page-key"),
480
+ result_type: ctx.str("result-type"),
481
+ chart_ids: optionalJsonArray(ctx, "chart-ids"),
482
+ parameter_controls: optionalJson4(ctx, "parameter-controls"),
483
+ permission_controls: optionalJson4(ctx, "permission-controls"),
484
+ chart_filter_controls: optionalJson4(ctx, "chart-filter-controls"),
485
+ columns: optionalJson4(ctx, "columns"),
486
+ row_limit: optionalNumber3(ctx, "row-limit"),
487
+ row_offset: optionalNumber3(ctx, "row-offset"),
488
+ block_limit: optionalNumber3(ctx, "block-limit"),
489
+ block_offset: optionalNumber3(ctx, "block-offset"),
490
+ use_cache: optionalBoolean5(ctx, "use-cache"),
491
+ request_id: optionalString3(ctx, "request-id"),
492
+ timeout_seconds: optionalNumber3(ctx, "timeout-seconds"),
493
+ limit: optionalNumber3(ctx, "limit"),
494
+ format: optionalString3(ctx, "artifact-format")
495
+ });
496
+ }
497
+ function optionalString3(ctx, name) {
498
+ const value = ctx.str(name);
499
+ return value === "" ? void 0 : value;
500
+ }
501
+ function optionalNumber3(ctx, name) {
502
+ const value = ctx.str(name);
503
+ return value === "" ? void 0 : Number(value);
504
+ }
505
+ function optionalBoolean5(ctx, name) {
506
+ const value = ctx.str(name);
507
+ return value === "" ? void 0 : ctx.bool(name);
508
+ }
509
+ function stringWithDefault(ctx, name, defaultValue) {
510
+ const value = ctx.str(name);
511
+ return value === "" ? defaultValue : value;
512
+ }
513
+ function numberWithDefault(ctx, name, defaultValue) {
514
+ const value = ctx.str(name);
515
+ return value === "" ? defaultValue : Number(value);
516
+ }
517
+ function booleanWithDefault(ctx, name, defaultValue) {
518
+ const value = ctx.str(name);
519
+ return value === "" ? defaultValue : ctx.bool(name);
520
+ }
521
+ function optionalJson4(ctx, name) {
522
+ const value = ctx.str(name);
523
+ return value === "" ? void 0 : ctx.json(name);
524
+ }
525
+ function jsonArray(ctx, name) {
526
+ const value = ctx.json(name);
527
+ return Array.isArray(value) ? value : [value];
528
+ }
529
+ function optionalJsonArray(ctx, name) {
530
+ const value = ctx.str(name);
531
+ if (value === "") {
532
+ return void 0;
533
+ }
534
+ const parsed = ctx.json(name);
535
+ return Array.isArray(parsed) ? parsed : [parsed];
536
+ }
537
+ function compactInput(input) {
538
+ const result = {};
539
+ for (const [key, value] of Object.entries(input)) {
540
+ if (value !== void 0) {
541
+ result[key] = value;
542
+ }
543
+ }
544
+ return result;
545
+ }
546
+
547
+ // src/commands/te-analysis/dashboard/list.ts
548
+ var dashboardList = createAnalysisCapabilityCommand({
549
+ resource: "dashboard",
550
+ command: "list",
551
+ capabilityId: "analysis.dashboard.list",
552
+ description: "List dashboards visible to the current user through the capability gateway.",
553
+ flags: [projectIdFlag, queryFlag, fieldsFlag, limitFlag, offsetFlag],
554
+ risk: "read",
555
+ buildInput: listInput
556
+ });
557
+
558
+ // src/commands/te-analysis/dashboard/create.ts
559
+ var dashboardCreate = createAnalysisCapabilityCommand({
560
+ resource: "dashboard",
561
+ command: "create",
562
+ capabilityId: "analysis.dashboard.create",
563
+ description: "Create a dashboard in personal space, project space, or a folder.",
396
564
  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" }
565
+ projectIdFlag,
566
+ { name: "dashboard-name", type: "string", required: true, desc: "Dashboard name." },
567
+ { name: "space-id", type: "number", required: false, desc: "Target project space ID. Omit for personal space." },
568
+ { name: "folder-id", type: "number", required: false, desc: "Target folder ID." },
569
+ { name: "initial-report-id", type: "number", required: false, desc: "Optional report ID to add when creating the dashboard." },
570
+ payloadFlag
571
+ ],
572
+ risk: "write",
573
+ buildInput: (ctx) => compactInput({
574
+ ...projectInput(ctx),
575
+ dashboard_name: ctx.str("dashboard-name"),
576
+ space_id: optionalNumber3(ctx, "space-id"),
577
+ folder_id: optionalNumber3(ctx, "folder-id"),
578
+ initial_report_id: optionalNumber3(ctx, "initial-report-id"),
579
+ payload: optionalJson4(ctx, "payload")
580
+ })
581
+ });
582
+
583
+ // src/commands/te-analysis/dashboard/get.ts
584
+ var dashboardGet = createAnalysisCapabilityCommand({
585
+ resource: "dashboard",
586
+ command: "get",
587
+ capabilityId: "analysis.dashboard.get",
588
+ description: "Get one dashboard detail, including creator, create/update time, settings, reports, notes, and share information.",
589
+ flags: [
590
+ projectIdFlag,
591
+ { name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." },
592
+ { name: "use-cache", type: "boolean", required: false, desc: "Whether to use cached dashboard detail. Default: true." }
402
593
  ],
403
594
  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")
595
+ buildInput: (ctx) => compactInput({
596
+ ...projectInput(ctx),
597
+ dashboard_id: ctx.num("dashboard-id"),
598
+ use_cache: optionalBoolean5(ctx, "use-cache")
410
599
  })
411
600
  });
412
601
 
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.",
602
+ // src/commands/te-analysis/dashboard/update.ts
603
+ var dashboardUpdate = createAnalysisCapabilityCommand({
604
+ resource: "dashboard",
605
+ command: "update",
606
+ capabilityId: "analysis.dashboard.update",
607
+ description: "Update dashboard settings or create/update a dashboard note. Use --operation settings or note-upsert.",
417
608
  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" }
609
+ projectIdFlag,
610
+ { name: "operation", type: "string", required: true, desc: "Update operation: settings or note-upsert." },
611
+ { name: "dashboard-id", type: "number", required: false, desc: "Dashboard ID for a single-dashboard update." },
612
+ { name: "dashboard-ids", type: "json", required: false, desc: "Dashboard ID array for batch settings updates." },
613
+ { name: "dashboard-name", type: "string", required: false, desc: "Dashboard name for single rename." },
614
+ { 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." },
615
+ { name: "refresh-type", type: "number", required: false, desc: "Dashboard refresh type." },
616
+ { name: "dashboard-status", type: "number", required: false, desc: "Dashboard status code." },
617
+ { name: "note-id", type: "number", required: false, desc: "Dashboard note ID. Omit to create a new note." },
618
+ { name: "note-title", type: "string", required: false, desc: "Dashboard note title." },
619
+ { name: "description", type: "string", required: false, desc: "Dashboard note description." },
620
+ { name: "ui-config", type: "string", required: false, desc: "Dashboard or note UI config string." },
621
+ payloadFlag
423
622
  ],
623
+ risk: "write",
624
+ buildInput: (ctx) => compactInput({
625
+ ...projectInput(ctx),
626
+ operation: ctx.str("operation"),
627
+ dashboard_id: optionalNumber3(ctx, "dashboard-id"),
628
+ dashboard_ids: optionalJsonArray(ctx, "dashboard-ids"),
629
+ dashboard_name: optionalString3(ctx, "dashboard-name"),
630
+ zone_offset: optionalNumber3(ctx, "zone-offset"),
631
+ refresh_type: optionalNumber3(ctx, "refresh-type"),
632
+ dashboard_status: optionalNumber3(ctx, "dashboard-status"),
633
+ note_id: optionalNumber3(ctx, "note-id"),
634
+ note_title: optionalString3(ctx, "note-title"),
635
+ description: optionalString3(ctx, "description"),
636
+ ui_config: optionalString3(ctx, "ui-config"),
637
+ payload: optionalJson4(ctx, "payload")
638
+ })
639
+ });
640
+
641
+ // src/commands/te-analysis/dashboard/share-info.ts
642
+ var dashboardShareInfo = createAnalysisCapabilityCommand({
643
+ resource: "dashboard",
644
+ command: "share-info",
645
+ capabilityId: "analysis.dashboard.share_info",
646
+ description: "Get dashboard sharing information.",
647
+ flags: [projectIdFlag, { name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." }],
424
648
  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")
649
+ buildInput: (ctx) => ({
650
+ ...projectInput(ctx),
651
+ dashboard_id: ctx.num("dashboard-id")
431
652
  })
432
653
  });
433
654
 
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.",
655
+ // src/commands/te-analysis/dashboard/share.ts
656
+ var dashboardShare = createAnalysisCapabilityCommand({
657
+ resource: "dashboard",
658
+ command: "share",
659
+ capabilityId: "analysis.dashboard.share",
660
+ description: "Modify dashboard sharing members through the capability gateway.",
438
661
  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" }
662
+ projectIdFlag,
663
+ { name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." },
664
+ { name: "member-authorities", type: "json", required: false, desc: "Optional member authority map." },
665
+ payloadFlag
442
666
  ],
667
+ risk: "write",
668
+ buildInput: (ctx) => compactInput({
669
+ ...projectInput(ctx),
670
+ dashboard_id: ctx.num("dashboard-id"),
671
+ member_authorities: optionalJson4(ctx, "member-authorities"),
672
+ payload: optionalJson4(ctx, "payload")
673
+ })
674
+ });
675
+
676
+ // src/commands/te-analysis/dashboard/delete.ts
677
+ var dashboardDelete = createAnalysisCapabilityCommand({
678
+ resource: "dashboard",
679
+ command: "delete",
680
+ capabilityId: "analysis.dashboard.delete",
681
+ description: "Delete one or more dashboards.",
682
+ flags: [projectIdFlag, { name: "dashboard-ids", type: "json", required: true, desc: "Dashboard ID array." }],
683
+ risk: "write",
684
+ buildInput: (ctx) => ({
685
+ ...projectInput(ctx),
686
+ dashboard_ids: jsonArray(ctx, "dashboard-ids")
687
+ })
688
+ });
689
+
690
+ // src/commands/te-analysis/dashboard/handover.ts
691
+ var dashboardHandover = createAnalysisCapabilityCommand({
692
+ resource: "dashboard",
693
+ command: "handover",
694
+ capabilityId: "analysis.dashboard.handover",
695
+ description: "Handover one or more dashboards to another project user.",
696
+ flags: [
697
+ projectIdFlag,
698
+ { name: "dashboard-ids", type: "json", required: true, desc: "Dashboard ID array." },
699
+ { name: "to-user-id", type: "number", required: true, desc: "Target user ID." }
700
+ ],
701
+ risk: "write",
702
+ buildInput: (ctx) => ({
703
+ ...projectInput(ctx),
704
+ dashboard_ids: jsonArray(ctx, "dashboard-ids"),
705
+ to_user_id: ctx.num("to-user-id")
706
+ })
707
+ });
708
+
709
+ // src/commands/te-analysis/dashboard/copy.ts
710
+ var dashboardCopy = createAnalysisCapabilityCommand({
711
+ resource: "dashboard",
712
+ command: "copy",
713
+ capabilityId: "analysis.dashboard.copy",
714
+ description: "Copy a dashboard, optionally copying reports and targeting a project space or folder.",
715
+ flags: [
716
+ projectIdFlag,
717
+ { name: "dashboard-id", type: "number", required: true, desc: "Source dashboard ID." },
718
+ { name: "dashboard-name", type: "string", required: true, desc: "New dashboard name." },
719
+ { name: "report-copy", type: "boolean", required: false, desc: "Whether to copy reports. Default: false." },
720
+ { name: "to-space-id", type: "number", required: false, desc: "Target project space ID. If both target IDs are omitted, copy to the source dashboard location." },
721
+ { name: "to-folder-id", type: "number", required: false, desc: "Target folder ID. If both target IDs are omitted, copy to the source dashboard location." }
722
+ ],
723
+ risk: "write",
724
+ buildInput: (ctx) => compactInput({
725
+ ...projectInput(ctx),
726
+ dashboard_id: ctx.num("dashboard-id"),
727
+ dashboard_name: ctx.str("dashboard-name"),
728
+ report_copy: booleanWithDefault(ctx, "report-copy", false),
729
+ to_space_id: optionalNumber3(ctx, "to-space-id"),
730
+ to_folder_id: optionalNumber3(ctx, "to-folder-id")
731
+ })
732
+ });
733
+
734
+ // src/commands/te-analysis/dashboard/freeze.ts
735
+ var dashboardFreeze = createAnalysisCapabilityCommand({
736
+ resource: "dashboard",
737
+ command: "freeze",
738
+ capabilityId: "analysis.dashboard.freeze",
739
+ description: "Freeze or unfreeze one or more dashboards.",
740
+ flags: [
741
+ projectIdFlag,
742
+ { name: "dashboard-ids", type: "json", required: true, desc: "Dashboard ID array." },
743
+ { name: "freeze", type: "boolean", required: false, desc: "true to freeze, false to unfreeze. Default: true." }
744
+ ],
745
+ risk: "write",
746
+ buildInput: (ctx) => compactInput({
747
+ ...projectInput(ctx),
748
+ dashboard_ids: jsonArray(ctx, "dashboard-ids"),
749
+ freeze: optionalBoolean5(ctx, "freeze")
750
+ })
751
+ });
752
+
753
+ // src/commands/te-analysis/dashboard/abnormal-get.ts
754
+ var dashboardAbnormalGet = createAnalysisCapabilityCommand({
755
+ resource: "dashboard",
756
+ command: "abnormal-get",
757
+ capabilityId: "analysis.dashboard.abnormal_get",
758
+ description: "Get abnormal dependency information for a dashboard.",
759
+ flags: [projectIdFlag, { name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." }],
443
760
  risk: "read",
444
- buildArgs: (ctx) => ({
445
- projectId: ctx.num("project_id"),
446
- panelId: ctx.num("panel_id"),
447
- fields: optionalJson(ctx, "fields")
761
+ buildInput: (ctx) => ({
762
+ ...projectInput(ctx),
763
+ dashboard_id: ctx.num("dashboard-id")
764
+ })
765
+ });
766
+
767
+ // src/commands/te-analysis/dashboard/task-status.ts
768
+ var dashboardTaskStatus = createAnalysisCapabilityCommand({
769
+ resource: "dashboard",
770
+ command: "task-status",
771
+ capabilityId: "analysis.dashboard.task_status",
772
+ description: "Get dashboard scheduled task status.",
773
+ flags: [projectIdFlag, { name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." }],
774
+ risk: "read",
775
+ buildInput: (ctx) => ({
776
+ ...projectInput(ctx),
777
+ dashboard_id: ctx.num("dashboard-id")
448
778
  })
449
779
  });
450
780
 
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.",
781
+ // src/commands/te-analysis/dashboard/index.ts
782
+ var commands3 = [
783
+ dashboardList,
784
+ dashboardCreate,
785
+ dashboardGet,
786
+ dashboardUpdate,
787
+ dashboardShareInfo,
788
+ dashboardShare,
789
+ dashboardDelete,
790
+ dashboardHandover,
791
+ dashboardCopy,
792
+ dashboardFreeze,
793
+ dashboardAbnormalGet,
794
+ dashboardTaskStatus
795
+ ];
796
+ var dashboard_default = commands3;
797
+
798
+ // src/commands/te-analysis/dashboard-report-data/run.ts
799
+ var dashboardReportDataRun = createAnalysisCapabilityCommand({
800
+ resource: "dashboard-report-data",
801
+ command: "run",
802
+ capabilityId: "analysis.dashboard_report_data.run",
803
+ description: "Run a bounded dashboard report data query and return inline JSON.",
455
804
  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." }
805
+ projectIdFlag,
806
+ { name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." },
807
+ { name: "report-ids", type: "json", required: false, desc: "Optional report ID array. Omit to query all dashboard reports." },
808
+ { name: "filters", type: "json", required: false, desc: "Optional dashboard filter JSON." },
809
+ { name: "start-time", type: "string", required: false, desc: "Optional start date/time." },
810
+ { name: "end-time", type: "string", required: false, desc: "Optional end date/time." },
811
+ { name: "use-cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true." },
812
+ { name: "request-id", type: "string", required: false, desc: "Optional cli_<32 lowercase hex> request ID. Generated when omitted." },
813
+ { name: "timeout-seconds", type: "number", required: false, desc: "Sync timeout seconds. Default: 60, max: 180." },
814
+ limitFlag
472
815
  ],
473
816
  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")
817
+ buildInput: dashboardReportDataInput
818
+ });
819
+
820
+ // src/commands/te-analysis/dashboard-report-data/export.ts
821
+ var dashboardReportDataExport = createAnalysisCapabilityCommand({
822
+ resource: "dashboard-report-data",
823
+ command: "export",
824
+ capabilityId: "analysis.dashboard_report_data.export",
825
+ description: "Submit a dashboard report data query as an asynchronous gzip JSONL artifact.",
826
+ flags: [
827
+ projectIdFlag,
828
+ { name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." },
829
+ { name: "report-ids", type: "json", required: false, desc: "Optional report ID array. Omit to query all dashboard reports." },
830
+ { name: "filters", type: "json", required: false, desc: "Optional dashboard filter JSON." },
831
+ { name: "start-time", type: "string", required: false, desc: "Optional start date/time." },
832
+ { name: "end-time", type: "string", required: false, desc: "Optional end date/time." },
833
+ { name: "use-cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true." },
834
+ { name: "request-id", type: "string", required: false, desc: "Optional cli_<32 lowercase hex> request ID. Generated when omitted." },
835
+ { name: "timeout-seconds", type: "number", required: false, desc: "Export timeout seconds. Default: 3600, max: 7200." },
836
+ { name: "artifact-format", type: "string", required: false, desc: "Artifact format. Only jsonl is supported." }
837
+ ],
838
+ risk: "read",
839
+ buildInput: dashboardReportDataInput
840
+ });
841
+
842
+ // src/commands/te-analysis/dashboard-report-data/index.ts
843
+ var commands4 = [
844
+ dashboardReportDataRun,
845
+ dashboardReportDataExport
846
+ ];
847
+ var dashboard_report_data_default = commands4;
848
+
849
+ // src/commands/te-analysis/query/cancel.ts
850
+ var queryCancel = createAnalysisCapabilityCommand({
851
+ resource: "query",
852
+ command: "cancel",
853
+ capabilityId: "analysis.query.cancel",
854
+ description: "Cancel an analysis capability-gateway query/export by run_id.",
855
+ flags: [
856
+ { name: "run-id", type: "string", required: true, desc: "Async run ID returned by an export capability." },
857
+ { name: "reason", type: "string", required: false, desc: "Optional cancellation reason." }
858
+ ],
859
+ risk: "write",
860
+ buildInput: (ctx) => compactInput({
861
+ run_id: ctx.str("run-id"),
862
+ reason: optionalString3(ctx, "reason")
491
863
  })
492
864
  });
493
865
 
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.",
866
+ // src/commands/te-analysis/query/index.ts
867
+ var commands5 = [
868
+ queryCancel
869
+ ];
870
+ var query_default = commands5;
871
+
872
+ // src/commands/te-analysis/run/inspect.ts
873
+ var runInspect = {
874
+ service: "analysis",
875
+ resource: "run",
876
+ command: "inspect",
877
+ description: "Inspect an analysis capability-gateway async run by run_id.",
498
878
  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" }
879
+ { name: "run-id", type: "string", required: true, desc: "Async run ID returned by an export capability." }
501
880
  ],
502
881
  risk: "read",
503
- buildArgs: (ctx) => ({
504
- projectId: ctx.num("project_id"),
505
- dashboardId: ctx.num("dashboard_id")
882
+ dryRun: (ctx) => ({
883
+ method: "GET",
884
+ url: buildCapabilityGatewayUrl(
885
+ ctx.host(),
886
+ "analysis",
887
+ `runs/${encodeURIComponent(ctx.str("run-id"))}`
888
+ )
889
+ }),
890
+ execute: async (ctx) => callCapabilityApi(
891
+ ctx.host(),
892
+ "analysis",
893
+ `runs/${encodeURIComponent(ctx.str("run-id"))}`,
894
+ "GET"
895
+ )
896
+ };
897
+
898
+ // src/commands/te-analysis/run/index.ts
899
+ var commands6 = [
900
+ runInspect
901
+ ];
902
+ var run_default = commands6;
903
+
904
+ // src/commands/te-analysis/artifact/download.ts
905
+ import { mkdir, writeFile } from "fs/promises";
906
+ import { dirname, resolve } from "path";
907
+ var artifactDownload = {
908
+ service: "analysis",
909
+ resource: "artifact",
910
+ command: "download",
911
+ description: "Download a run-scoped analysis capability-gateway artifact to a local file.",
912
+ flags: [
913
+ { name: "run-id", type: "string", required: true, desc: "Async run ID returned by an export capability." },
914
+ { name: "artifact-id", type: "string", required: true, desc: "Artifact ID returned by an export capability." },
915
+ { name: "output", type: "string", required: true, desc: "Local output file path. Use a file path, not a directory." }
916
+ ],
917
+ risk: "read",
918
+ dryRun: (ctx) => ({
919
+ method: "GET",
920
+ url: buildCapabilityGatewayUrl(
921
+ ctx.host(),
922
+ "analysis",
923
+ `runs/${encodeURIComponent(ctx.str("run-id"))}/artifacts/${encodeURIComponent(ctx.str("artifact-id"))}/download`
924
+ ),
925
+ body: {
926
+ output_path: resolve(ctx.str("output"))
927
+ }
928
+ }),
929
+ execute: async (ctx) => {
930
+ const outputPath = resolve(ctx.str("output"));
931
+ const artifact = await downloadCapabilityArtifact(
932
+ ctx.host(),
933
+ "analysis",
934
+ ctx.str("run-id"),
935
+ ctx.str("artifact-id")
936
+ );
937
+ await mkdir(dirname(outputPath), { recursive: true });
938
+ await writeFile(outputPath, artifact.bytes);
939
+ return {
940
+ run_id: ctx.str("run-id"),
941
+ artifact_id: ctx.str("artifact-id"),
942
+ output_path: outputPath,
943
+ bytes: artifact.bytes.byteLength,
944
+ content_type: artifact.contentType,
945
+ content_disposition: artifact.contentDisposition
946
+ };
947
+ }
948
+ };
949
+
950
+ // src/commands/te-analysis/artifact/index.ts
951
+ var commands7 = [
952
+ artifactDownload
953
+ ];
954
+ var artifact_default = commands7;
955
+
956
+ // src/commands/te-analysis/dashboard-definition/export.ts
957
+ var dashboardDefinitionExport = createAnalysisCapabilityCommand({
958
+ resource: "dashboard-definition",
959
+ command: "export",
960
+ capabilityId: "analysis.dashboard_definition.export",
961
+ description: "Export dashboard definition JSON.",
962
+ flags: [
963
+ projectIdFlag,
964
+ { name: "dashboard-id", type: "number", required: false, desc: "Single dashboard ID to export. The gateway resolves folder or project-space context." },
965
+ { name: "dashboard-ids", type: "json", required: false, desc: "Dashboard ID array to export. The gateway resolves folder or project-space context." },
966
+ { name: "dashboard-folder-ids", type: "json", required: false, desc: 'Private folder ID array, or advanced descriptor array: [{"dashboard_folder_id":1,"dashboard_ids":[2]}].' },
967
+ { name: "shared-spaces", type: "json", required: false, desc: "Shared space export descriptor array." },
968
+ { name: "export-file-name", type: "string", required: false, desc: "Optional export file name." },
969
+ payloadFlag
970
+ ],
971
+ risk: "read",
972
+ buildInput: (ctx) => compactInput({
973
+ ...projectInput(ctx),
974
+ dashboard_id: optionalNumber3(ctx, "dashboard-id"),
975
+ dashboard_ids: optionalJsonArray(ctx, "dashboard-ids"),
976
+ dashboard_folder_ids: optionalJsonArray(ctx, "dashboard-folder-ids"),
977
+ shared_spaces: optionalJson4(ctx, "shared-spaces"),
978
+ export_file_name: optionalString3(ctx, "export-file-name"),
979
+ payload: optionalJson4(ctx, "payload")
506
980
  })
507
981
  });
508
982
 
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.",
983
+ // src/commands/te-analysis/dashboard-definition/import.ts
984
+ var dashboardDefinitionImport = createAnalysisCapabilityCommand({
985
+ resource: "dashboard-definition",
986
+ command: "import",
987
+ capabilityId: "analysis.dashboard_definition.import",
988
+ description: "Validate or import dashboard definition JSON. Use --validate-only for import pre-check.",
513
989
  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.")
990
+ projectIdFlag,
991
+ { name: "definition", type: "json", required: true, desc: "Dashboard definition JSON object." },
992
+ { name: "validate-only", type: "boolean", required: false, desc: "Only validate import conflicts and importable state." },
993
+ { name: "dashboard-name-conflict-policy", type: "string", required: false, desc: "Optional dashboard name conflict policy." },
994
+ { name: "space-dashboard-policy", type: "string", required: false, desc: "Optional space/dashboard import policy." },
995
+ payloadFlag
996
+ ],
997
+ risk: "write",
998
+ buildInput: (ctx) => compactInput({
999
+ ...projectInput(ctx),
1000
+ definition: ctx.json("definition"),
1001
+ validate_only: optionalBoolean5(ctx, "validate-only"),
1002
+ dashboard_name_conflict_policy: optionalString3(ctx, "dashboard-name-conflict-policy"),
1003
+ space_dashboard_policy: optionalString3(ctx, "space-dashboard-policy"),
1004
+ payload: optionalJson4(ctx, "payload")
1005
+ })
1006
+ });
1007
+
1008
+ // src/commands/te-analysis/dashboard-definition/index.ts
1009
+ var commands8 = [
1010
+ dashboardDefinitionExport,
1011
+ dashboardDefinitionImport
1012
+ ];
1013
+ var dashboard_definition_default = commands8;
1014
+
1015
+ // src/commands/te-analysis/dashboard-daily-report/shared.ts
1016
+ function dailyReportFlags(update) {
1017
+ return [
1018
+ { name: "need-csv", type: "boolean", required: false, desc: "Whether to include CSV attachment. Default: false." },
1019
+ { name: "host-url", type: "string", required: false, desc: "Public host URL used in report links. Default: empty." },
1020
+ { name: "enable-smtp", type: "boolean", required: false, desc: "Whether to use configured SMTP for email. Default: false." },
1021
+ { name: "enable-email", type: "boolean", required: false, desc: "Whether to send by email. Default: false." },
1022
+ { name: "enable-dd", type: "boolean", required: false, desc: "Whether to send by DingTalk webhook. Default: false." },
1023
+ { name: "enable-wx", type: "boolean", required: false, desc: "Whether to send by WeCom webhook. Default: false." },
1024
+ { name: "enable-feishu", type: "boolean", required: false, desc: "Whether to send by Feishu webhook. Default: false." },
1025
+ { name: "send-title", type: "string", required: false, desc: "Daily report title." },
1026
+ { name: "send-content", type: "string", required: false, desc: "Daily report content." },
1027
+ { name: "send-date", type: "string", required: false, desc: "Scheduled weekdays, comma-separated 1..7. Default: 1,2,3,4,5,6,7." },
1028
+ { name: "send-time", type: "string", required: false, desc: "Scheduled send time, HH:mm. Default: 09:00." },
1029
+ { name: "lang", type: "string", required: false, desc: "Report language. Default: zh-CN." },
1030
+ { name: "screen-type", type: "string", required: false, desc: "Screenshot screen type. Default: normal." },
1031
+ { name: "zone-offset", type: "number", required: false, desc: "Time zone offset. Default: 0." },
1032
+ ...update ? [
1033
+ { name: "enable-send", type: "boolean", required: false, desc: "Whether to enable scheduled sending. Default: false." }
1034
+ ] : []
1035
+ ];
1036
+ }
1037
+ function dailyReportInput(ctx, update) {
1038
+ const payload = optionalJson4(ctx, "payload");
1039
+ const useDefaults = payload === void 0;
1040
+ return compactInput({
1041
+ ...projectInput(ctx),
1042
+ dashboard_id: ctx.num("dashboard-id"),
1043
+ need_csv: useDefaults ? booleanWithDefault(ctx, "need-csv", false) : optionalBoolean5(ctx, "need-csv"),
1044
+ host_url: useDefaults ? stringWithDefault(ctx, "host-url", "") : optionalString3(ctx, "host-url"),
1045
+ enable_smtp: useDefaults ? booleanWithDefault(ctx, "enable-smtp", false) : optionalBoolean5(ctx, "enable-smtp"),
1046
+ enable_email: useDefaults ? booleanWithDefault(ctx, "enable-email", false) : optionalBoolean5(ctx, "enable-email"),
1047
+ enable_dd: useDefaults ? booleanWithDefault(ctx, "enable-dd", false) : optionalBoolean5(ctx, "enable-dd"),
1048
+ enable_wx: useDefaults ? booleanWithDefault(ctx, "enable-wx", false) : optionalBoolean5(ctx, "enable-wx"),
1049
+ enable_feishu: useDefaults ? booleanWithDefault(ctx, "enable-feishu", false) : optionalBoolean5(ctx, "enable-feishu"),
1050
+ send_title: optionalString3(ctx, "send-title"),
1051
+ send_content: optionalString3(ctx, "send-content"),
1052
+ send_date: useDefaults ? stringWithDefault(ctx, "send-date", "1,2,3,4,5,6,7") : optionalString3(ctx, "send-date"),
1053
+ send_time: useDefaults ? stringWithDefault(ctx, "send-time", "09:00") : optionalString3(ctx, "send-time"),
1054
+ lang: useDefaults ? stringWithDefault(ctx, "lang", "zh-CN") : optionalString3(ctx, "lang"),
1055
+ screen_type: useDefaults ? stringWithDefault(ctx, "screen-type", "normal") : optionalString3(ctx, "screen-type"),
1056
+ zone_offset: useDefaults ? numberWithDefault(ctx, "zone-offset", 0) : optionalNumber3(ctx, "zone-offset"),
1057
+ enable_send: update ? useDefaults ? booleanWithDefault(ctx, "enable-send", false) : optionalBoolean5(ctx, "enable-send") : void 0,
1058
+ payload
1059
+ });
1060
+ }
1061
+
1062
+ // src/commands/te-analysis/dashboard-daily-report/update.ts
1063
+ var dashboardDailyReportUpdate = createAnalysisCapabilityCommand({
1064
+ resource: "dashboard-daily-report",
1065
+ command: "update",
1066
+ capabilityId: "analysis.dashboard_daily_report.update",
1067
+ description: "Update dashboard daily report configuration.",
1068
+ flags: [
1069
+ projectIdFlag,
1070
+ { name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." },
1071
+ ...dailyReportFlags(true),
1072
+ payloadFlag
525
1073
  ],
1074
+ risk: "write",
1075
+ buildInput: (ctx) => dailyReportInput(ctx, true)
1076
+ });
1077
+
1078
+ // src/commands/te-analysis/dashboard-daily-report/send.ts
1079
+ var dashboardDailyReportSend = createAnalysisCapabilityCommand({
1080
+ resource: "dashboard-daily-report",
1081
+ command: "send",
1082
+ capabilityId: "analysis.dashboard_daily_report.send",
1083
+ description: "Send dashboard daily report immediately.",
1084
+ flags: [
1085
+ projectIdFlag,
1086
+ { name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." },
1087
+ ...dailyReportFlags(false),
1088
+ payloadFlag
1089
+ ],
1090
+ risk: "write",
1091
+ buildInput: (ctx) => dailyReportInput(ctx, false)
1092
+ });
1093
+
1094
+ // src/commands/te-analysis/dashboard-daily-report/index.ts
1095
+ var commands9 = [
1096
+ dashboardDailyReportUpdate,
1097
+ dashboardDailyReportSend
1098
+ ];
1099
+ var dashboard_daily_report_default = commands9;
1100
+
1101
+ // src/commands/te-analysis/bi-panel/list.ts
1102
+ var biPanelList = createAnalysisCapabilityCommand({
1103
+ resource: "bi-panel",
1104
+ command: "list",
1105
+ capabilityId: "analysis.bi_panel.list",
1106
+ description: "List BI panels visible to the current user through the capability gateway.",
1107
+ flags: [projectIdFlag, queryFlag, fieldsFlag, limitFlag, offsetFlag],
526
1108
  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)
1109
+ buildInput: listInput
1110
+ });
1111
+
1112
+ // src/commands/te-analysis/bi-panel/get.ts
1113
+ var biPanelGet = createAnalysisCapabilityCommand({
1114
+ resource: "bi-panel",
1115
+ command: "get",
1116
+ capabilityId: "analysis.bi_panel.get",
1117
+ description: "Get a BI panel released page structure.",
1118
+ flags: [
1119
+ projectIdFlag,
1120
+ { name: "panel-id", type: "number", required: true, desc: "BI panel ID." },
1121
+ fieldsFlag
1122
+ ],
1123
+ risk: "read",
1124
+ buildInput: (ctx) => compactInput({
1125
+ ...projectInput(ctx),
1126
+ panel_id: ctx.num("panel-id"),
1127
+ fields: optionalJson4(ctx, "fields")
539
1128
  })
540
1129
  });
541
1130
 
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.",
1131
+ // src/commands/te-analysis/bi-panel/create.ts
1132
+ var biPanelCreate = createAnalysisCapabilityCommand({
1133
+ resource: "bi-panel",
1134
+ command: "create",
1135
+ capabilityId: "analysis.bi_panel.create",
1136
+ description: "Create a BI panel.",
546
1137
  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." }
1138
+ projectIdFlag,
1139
+ { name: "panel-name", type: "string", required: false, desc: "BI panel name." },
1140
+ { name: "panel-uuid", type: "string", required: false, desc: "BI panel UUID." },
1141
+ { name: "space-id", type: "number", required: false, desc: "Target project space ID." },
1142
+ { name: "folder-id", type: "number", required: false, desc: "Target folder ID." },
1143
+ payloadFlag
555
1144
  ],
556
1145
  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")
1146
+ buildInput: (ctx) => compactInput({
1147
+ ...projectInput(ctx),
1148
+ panel_name: optionalString3(ctx, "panel-name"),
1149
+ panel_uuid: optionalString3(ctx, "panel-uuid"),
1150
+ space_id: optionalNumber3(ctx, "space-id"),
1151
+ folder_id: optionalNumber3(ctx, "folder-id"),
1152
+ payload: optionalJson4(ctx, "payload")
566
1153
  })
567
1154
  });
568
1155
 
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.",
1156
+ // src/commands/te-analysis/bi-panel/update.ts
1157
+ var biPanelUpdate = createAnalysisCapabilityCommand({
1158
+ resource: "bi-panel",
1159
+ command: "update",
1160
+ capabilityId: "analysis.bi_panel.update",
1161
+ description: "Update BI panel content or metadata.",
573
1162
  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." }
1163
+ projectIdFlag,
1164
+ { name: "panel-name", type: "string", required: false, desc: "BI panel name." },
1165
+ { name: "panel-uuid", type: "string", required: false, desc: "BI panel UUID." },
1166
+ payloadFlag
579
1167
  ],
580
1168
  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")
1169
+ buildInput: (ctx) => compactInput({
1170
+ ...projectInput(ctx),
1171
+ panel_name: optionalString3(ctx, "panel-name"),
1172
+ panel_uuid: optionalString3(ctx, "panel-uuid"),
1173
+ payload: optionalJson4(ctx, "payload")
587
1174
  })
588
1175
  });
589
1176
 
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.",
1177
+ // src/commands/te-analysis/bi-panel/delete.ts
1178
+ var biPanelDelete = createAnalysisCapabilityCommand({
1179
+ resource: "bi-panel",
1180
+ command: "delete",
1181
+ capabilityId: "analysis.bi_panel.delete",
1182
+ description: "Delete one or more BI panels.",
1183
+ flags: [projectIdFlag, { name: "panel-ids", type: "json", required: true, desc: "BI panel ID array." }],
1184
+ risk: "write",
1185
+ buildInput: (ctx) => ({
1186
+ ...projectInput(ctx),
1187
+ panel_ids: jsonArray(ctx, "panel-ids")
1188
+ })
1189
+ });
1190
+
1191
+ // src/commands/te-analysis/bi-panel/share.ts
1192
+ var biPanelShare = createAnalysisCapabilityCommand({
1193
+ resource: "bi-panel",
1194
+ command: "share",
1195
+ capabilityId: "analysis.bi_panel.share",
1196
+ description: "Modify BI panel sharing members.",
1197
+ flags: [projectIdFlag, { name: "panel-id", type: "number", required: true, desc: "BI panel ID." }, payloadFlag],
1198
+ risk: "write",
1199
+ buildInput: (ctx) => compactInput({
1200
+ ...projectInput(ctx),
1201
+ panel_id: ctx.num("panel-id"),
1202
+ payload: optionalJson4(ctx, "payload")
1203
+ })
1204
+ });
1205
+
1206
+ // src/commands/te-analysis/bi-panel/copy.ts
1207
+ var biPanelCopy = createAnalysisCapabilityCommand({
1208
+ resource: "bi-panel",
1209
+ command: "copy",
1210
+ capabilityId: "analysis.bi_panel.copy",
1211
+ description: "Copy a BI panel.",
594
1212
  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." }
1213
+ projectIdFlag,
1214
+ { name: "panel-name", type: "string", required: false, desc: "New BI panel name." },
1215
+ { name: "panel-uuid", type: "string", required: false, desc: "Source BI panel UUID." },
1216
+ { name: "space-id", type: "number", required: false, desc: "Target project space ID." },
1217
+ { name: "folder-id", type: "number", required: false, desc: "Target folder ID." },
1218
+ payloadFlag
601
1219
  ],
602
1220
  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")
1221
+ buildInput: (ctx) => compactInput({
1222
+ ...projectInput(ctx),
1223
+ panel_name: optionalString3(ctx, "panel-name"),
1224
+ panel_uuid: optionalString3(ctx, "panel-uuid"),
1225
+ space_id: optionalNumber3(ctx, "space-id"),
1226
+ folder_id: optionalNumber3(ctx, "folder-id"),
1227
+ payload: optionalJson4(ctx, "payload")
611
1228
  })
612
1229
  });
613
1230
 
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.",
1231
+ // src/commands/te-analysis/bi-panel/index.ts
1232
+ var commands10 = [
1233
+ biPanelList,
1234
+ biPanelGet,
1235
+ biPanelCreate,
1236
+ biPanelUpdate,
1237
+ biPanelDelete,
1238
+ biPanelShare,
1239
+ biPanelCopy
1240
+ ];
1241
+ var bi_panel_default = commands10;
1242
+
1243
+ // src/commands/te-analysis/bi-panel-page-data/run.ts
1244
+ var biPanelPageDataRun = createAnalysisCapabilityCommand({
1245
+ resource: "bi-panel-page-data",
1246
+ command: "run",
1247
+ capabilityId: "analysis.bi_panel_page_data.run",
1248
+ description: "Run a bounded BI panel page data query and return inline JSON.",
618
1249
  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." }
1250
+ projectIdFlag,
1251
+ { name: "panel-id", type: "number", required: true, desc: "BI panel ID." },
1252
+ { name: "page-key", type: "string", required: true, desc: "Page key returned by bi-panel get." },
1253
+ { name: "result-type", type: "string", required: true, desc: "Result type: charts or summary." },
1254
+ { name: "chart-ids", type: "json", required: false, desc: "Optional chart ID array." },
1255
+ { name: "parameter-controls", type: "json", required: false, desc: "Optional parameter control override array." },
1256
+ { name: "permission-controls", type: "json", required: false, desc: "Optional permission control array." },
1257
+ { name: "chart-filter-controls", type: "json", required: false, desc: "Optional chart filter control array." },
1258
+ { name: "columns", type: "json", required: false, desc: "Optional returned column array." },
1259
+ { name: "row-limit", type: "number", required: false, desc: "Chart row limit." },
1260
+ { name: "row-offset", type: "number", required: false, desc: "Chart row offset." },
1261
+ { name: "block-limit", type: "number", required: false, desc: "Summary block limit." },
1262
+ { name: "block-offset", type: "number", required: false, desc: "Summary block offset." },
1263
+ { name: "use-cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true." },
1264
+ { name: "request-id", type: "string", required: false, desc: "Optional cli_<32 lowercase hex> request ID. Generated when omitted." },
1265
+ { name: "timeout-seconds", type: "number", required: false, desc: "Sync timeout seconds. Default: 60, max: 180." },
1266
+ limitFlag
624
1267
  ],
625
1268
  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")
1269
+ buildInput: biPanelPageDataInput
1270
+ });
1271
+
1272
+ // src/commands/te-analysis/bi-panel-page-data/export.ts
1273
+ var biPanelPageDataExport = createAnalysisCapabilityCommand({
1274
+ resource: "bi-panel-page-data",
1275
+ command: "export",
1276
+ capabilityId: "analysis.bi_panel_page_data.export",
1277
+ description: "Submit a BI panel page data query as an asynchronous gzip JSONL artifact.",
1278
+ flags: [
1279
+ projectIdFlag,
1280
+ { name: "panel-id", type: "number", required: true, desc: "BI panel ID." },
1281
+ { name: "page-key", type: "string", required: true, desc: "Page key returned by bi-panel get." },
1282
+ { name: "result-type", type: "string", required: true, desc: "Result type: charts or summary." },
1283
+ { name: "chart-ids", type: "json", required: false, desc: "Optional chart ID array." },
1284
+ { name: "parameter-controls", type: "json", required: false, desc: "Optional parameter control override array." },
1285
+ { name: "permission-controls", type: "json", required: false, desc: "Optional permission control array." },
1286
+ { name: "chart-filter-controls", type: "json", required: false, desc: "Optional chart filter control array." },
1287
+ { name: "columns", type: "json", required: false, desc: "Optional returned column array." },
1288
+ { name: "row-limit", type: "number", required: false, desc: "Chart row limit." },
1289
+ { name: "row-offset", type: "number", required: false, desc: "Chart row offset." },
1290
+ { name: "block-limit", type: "number", required: false, desc: "Summary block limit." },
1291
+ { name: "block-offset", type: "number", required: false, desc: "Summary block offset." },
1292
+ { name: "use-cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true." },
1293
+ { name: "request-id", type: "string", required: false, desc: "Optional cli_<32 lowercase hex> request ID. Generated when omitted." },
1294
+ { name: "timeout-seconds", type: "number", required: false, desc: "Export timeout seconds. Default: 600, max: 600." },
1295
+ { name: "artifact-format", type: "string", required: false, desc: "Artifact format. Only jsonl is supported." }
1296
+ ],
1297
+ risk: "read",
1298
+ buildInput: biPanelPageDataInput
1299
+ });
1300
+
1301
+ // src/commands/te-analysis/bi-panel-page-data/index.ts
1302
+ var commands11 = [
1303
+ biPanelPageDataRun,
1304
+ biPanelPageDataExport
1305
+ ];
1306
+ var bi_panel_page_data_default = commands11;
1307
+
1308
+ // src/commands/te-analysis/project-space/list.ts
1309
+ var projectSpaceList = createAnalysisCapabilityCommand({
1310
+ resource: "project-space",
1311
+ command: "list",
1312
+ capabilityId: "analysis.project_space.list",
1313
+ description: "List project spaces visible to the current user.",
1314
+ flags: [projectIdFlag, queryFlag, fieldsFlag, limitFlag, offsetFlag],
1315
+ risk: "read",
1316
+ buildInput: listInput
1317
+ });
1318
+
1319
+ // src/commands/te-analysis/project-space/get.ts
1320
+ var projectSpaceGet = createAnalysisCapabilityCommand({
1321
+ resource: "project-space",
1322
+ command: "get",
1323
+ capabilityId: "analysis.project_space.get",
1324
+ description: "Get one project space detail.",
1325
+ flags: [projectIdFlag, { name: "space-id", type: "number", required: true, desc: "Project space ID." }, fieldsFlag],
1326
+ risk: "read",
1327
+ buildInput: (ctx) => compactInput({
1328
+ ...projectInput(ctx),
1329
+ space_id: ctx.num("space-id"),
1330
+ fields: optionalJson4(ctx, "fields")
633
1331
  })
634
1332
  });
635
1333
 
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.",
1334
+ // src/commands/te-analysis/project-space/create.ts
1335
+ var projectSpaceCreate = createAnalysisCapabilityCommand({
1336
+ resource: "project-space",
1337
+ command: "create",
1338
+ capabilityId: "analysis.project_space.create",
1339
+ description: "Create a project space.",
640
1340
  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" }
1341
+ projectIdFlag,
1342
+ { name: "space-name", type: "string", required: false, desc: "Project space name." },
1343
+ { name: "space-desc", type: "string", required: false, desc: "Project space description." },
1344
+ { name: "avatar-type", type: "number", required: false, desc: "Avatar type: 1=WORD, 2=ICON, 3=IMAGE. Default: 1." },
1345
+ { name: "color-key", type: "string", required: false, desc: "Avatar color key." },
1346
+ { name: "avatar", type: "string", required: false, desc: "Avatar value." },
1347
+ payloadFlag
649
1348
  ],
650
1349
  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")
661
- })
1350
+ buildInput: (ctx) => {
1351
+ const payload = optionalJson4(ctx, "payload");
1352
+ return compactInput({
1353
+ ...projectInput(ctx),
1354
+ space_name: optionalString3(ctx, "space-name"),
1355
+ space_desc: optionalString3(ctx, "space-desc"),
1356
+ avatar_type: payload === void 0 ? numberWithDefault(ctx, "avatar-type", 1) : optionalNumber3(ctx, "avatar-type"),
1357
+ color_key: optionalString3(ctx, "color-key"),
1358
+ avatar: optionalString3(ctx, "avatar"),
1359
+ payload
1360
+ });
1361
+ }
662
1362
  });
663
1363
 
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.",
1364
+ // src/commands/te-analysis/project-space/delete.ts
1365
+ var projectSpaceDelete = createAnalysisCapabilityCommand({
1366
+ resource: "project-space",
1367
+ command: "delete",
1368
+ capabilityId: "analysis.project_space.delete",
1369
+ description: "Delete one or more project spaces.",
668
1370
  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" }
1371
+ projectIdFlag,
1372
+ { name: "space-id", type: "number", required: false, desc: "Project space ID." },
1373
+ { name: "space-ids", type: "json", required: false, desc: "Project space ID array." }
676
1374
  ],
677
1375
  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")
1376
+ buildInput: (ctx) => compactInput({
1377
+ ...projectInput(ctx),
1378
+ space_id: optionalNumber3(ctx, "space-id"),
1379
+ space_ids: optionalJsonArray(ctx, "space-ids")
1380
+ })
1381
+ });
1382
+
1383
+ // src/commands/te-analysis/project-space/share.ts
1384
+ var projectSpaceShare = createAnalysisCapabilityCommand({
1385
+ resource: "project-space",
1386
+ command: "share",
1387
+ capabilityId: "analysis.project_space.share",
1388
+ description: "Modify project space sharing members.",
1389
+ flags: [projectIdFlag, { name: "space-id", type: "number", required: true, desc: "Project space ID." }, payloadFlag],
1390
+ risk: "write",
1391
+ buildInput: (ctx) => compactInput({
1392
+ ...projectInput(ctx),
1393
+ space_id: ctx.num("space-id"),
1394
+ payload: optionalJson4(ctx, "payload")
687
1395
  })
688
1396
  });
689
1397
 
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.",
1398
+ // src/commands/te-analysis/project-space/members.ts
1399
+ var projectSpaceMembers = createAnalysisCapabilityCommand({
1400
+ resource: "project-space",
1401
+ command: "members",
1402
+ capabilityId: "analysis.project_space.members",
1403
+ description: "Get project space members.",
1404
+ flags: [projectIdFlag, { name: "space-id", type: "number", required: true, desc: "Project space ID." }],
1405
+ risk: "read",
1406
+ buildInput: (ctx) => ({
1407
+ ...projectInput(ctx),
1408
+ space_id: ctx.num("space-id")
1409
+ })
1410
+ });
1411
+
1412
+ // src/commands/te-analysis/project-space/index.ts
1413
+ var commands12 = [
1414
+ projectSpaceList,
1415
+ projectSpaceGet,
1416
+ projectSpaceCreate,
1417
+ projectSpaceDelete,
1418
+ projectSpaceShare,
1419
+ projectSpaceMembers
1420
+ ];
1421
+ var project_space_default = commands12;
1422
+
1423
+ // src/commands/te-analysis/folder/create.ts
1424
+ var folderCreate = createAnalysisCapabilityCommand({
1425
+ resource: "folder",
1426
+ command: "create",
1427
+ capabilityId: "analysis.folder.create",
1428
+ description: "Create a folder in personal space or project space.",
694
1429
  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)" }
1430
+ projectIdFlag,
1431
+ { name: "folder-name", type: "string", required: true, desc: "Folder name." },
1432
+ { name: "space-id", type: "number", required: false, desc: "Project space ID. Omit for personal space." },
1433
+ { name: "parent-folder-id", type: "number", required: false, desc: "Parent project-space folder ID." },
1434
+ payloadFlag
698
1435
  ],
699
1436
  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")
1437
+ buildInput: (ctx) => compactInput({
1438
+ ...projectInput(ctx),
1439
+ folder_name: ctx.str("folder-name"),
1440
+ space_id: optionalNumber3(ctx, "space-id"),
1441
+ parent_folder_id: optionalNumber3(ctx, "parent-folder-id"),
1442
+ payload: optionalJson4(ctx, "payload")
705
1443
  })
706
1444
  });
707
1445
 
708
- // src/commands/te-analysis/dashboard/delete-dashboard.ts
709
- var deleteDashboard = createMcpCommand({
710
- command: "+delete_dashboard",
711
- description: "Delete a dashboard by dashboardId",
1446
+ // src/commands/te-analysis/folder/delete.ts
1447
+ var folderDelete = createAnalysisCapabilityCommand({
1448
+ resource: "folder",
1449
+ command: "delete",
1450
+ capabilityId: "analysis.folder.delete",
1451
+ description: "Delete one or more folders.",
712
1452
  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" }
1453
+ projectIdFlag,
1454
+ { name: "folder-id", type: "number", required: false, desc: "Folder ID." },
1455
+ { name: "folder-ids", type: "json", required: false, desc: "Folder ID array." },
1456
+ { name: "space-id", type: "number", required: false, desc: "Project space ID for project-space folders. Omit for personal folders." }
715
1457
  ],
716
1458
  risk: "write",
717
- buildArgs: (ctx) => ({
718
- projectId: ctx.num("project_id"),
719
- dashboardId: ctx.num("dashboard_id")
1459
+ buildInput: (ctx) => compactInput({
1460
+ ...projectInput(ctx),
1461
+ folder_id: optionalNumber3(ctx, "folder-id"),
1462
+ folder_ids: optionalJsonArray(ctx, "folder-ids"),
1463
+ space_id: optionalNumber3(ctx, "space-id")
720
1464
  })
721
1465
  });
722
1466
 
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.",
1467
+ // src/commands/te-analysis/folder/share.ts
1468
+ var folderShare = createAnalysisCapabilityCommand({
1469
+ resource: "folder",
1470
+ command: "share",
1471
+ capabilityId: "analysis.folder.share",
1472
+ description: "Modify folder sharing members.",
1473
+ flags: [projectIdFlag, { name: "folder-id", type: "number", required: true, desc: "Folder ID." }, payloadFlag],
1474
+ risk: "write",
1475
+ buildInput: (ctx) => compactInput({
1476
+ ...projectInput(ctx),
1477
+ folder_id: ctx.num("folder-id"),
1478
+ payload: optionalJson4(ctx, "payload")
1479
+ })
1480
+ });
1481
+
1482
+ // src/commands/te-analysis/folder/members.ts
1483
+ var folderMembers = createAnalysisCapabilityCommand({
1484
+ resource: "folder",
1485
+ command: "members",
1486
+ capabilityId: "analysis.folder.members",
1487
+ description: "Get folder members.",
1488
+ flags: [projectIdFlag, { name: "folder-id", type: "number", required: true, desc: "Folder ID." }],
1489
+ risk: "read",
1490
+ buildInput: (ctx) => ({
1491
+ ...projectInput(ctx),
1492
+ folder_id: ctx.num("folder-id")
1493
+ })
1494
+ });
1495
+
1496
+ // src/commands/te-analysis/folder/index.ts
1497
+ var commands13 = [
1498
+ folderCreate,
1499
+ folderDelete,
1500
+ folderShare,
1501
+ folderMembers
1502
+ ];
1503
+ var folder_default = commands13;
1504
+
1505
+ // src/commands/te-analysis/favorite/add.ts
1506
+ var favoriteAdd = createAnalysisCapabilityCommand({
1507
+ resource: "favorite",
1508
+ command: "add",
1509
+ capabilityId: "analysis.favorite.add",
1510
+ description: "Favorite one dashboard, BI panel, or folder.",
727
1511
  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." }
1512
+ projectIdFlag,
1513
+ { name: "asset-id", type: "number", required: false, desc: "Asset ID." },
1514
+ { name: "asset-type", type: "string", required: false, desc: "Asset type, for example dashboard, bi_panel, or folder." },
1515
+ { name: "space-id", type: "number", required: false, desc: "Project space ID when relevant." },
1516
+ { name: "id", type: "number", required: false, desc: "Backend DTO ID field when required." },
1517
+ payloadFlag
734
1518
  ],
735
1519
  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")
1520
+ buildInput: (ctx) => compactInput({
1521
+ ...projectInput(ctx),
1522
+ asset_id: optionalNumber3(ctx, "asset-id"),
1523
+ asset_type: optionalString3(ctx, "asset-type"),
1524
+ space_id: optionalNumber3(ctx, "space-id"),
1525
+ id: optionalNumber3(ctx, "id"),
1526
+ payload: optionalJson4(ctx, "payload")
744
1527
  })
745
1528
  });
746
1529
 
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.",
1530
+ // src/commands/te-analysis/favorite/remove.ts
1531
+ var favoriteRemove = createAnalysisCapabilityCommand({
1532
+ resource: "favorite",
1533
+ command: "remove",
1534
+ capabilityId: "analysis.favorite.remove",
1535
+ description: "Remove favorite from one dashboard, BI panel, or folder.",
751
1536
  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." }
1537
+ projectIdFlag,
1538
+ { name: "asset-id", type: "number", required: false, desc: "Asset ID." },
1539
+ { name: "asset-type", type: "string", required: false, desc: "Asset type, for example dashboard, bi_panel, or folder." },
1540
+ { name: "space-id", type: "number", required: false, desc: "Project space ID when relevant." },
1541
+ { name: "id", type: "number", required: false, desc: "Backend DTO ID field when required." },
1542
+ payloadFlag
758
1543
  ],
759
1544
  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")
1545
+ buildInput: (ctx) => compactInput({
1546
+ ...projectInput(ctx),
1547
+ asset_id: optionalNumber3(ctx, "asset-id"),
1548
+ asset_type: optionalString3(ctx, "asset-type"),
1549
+ space_id: optionalNumber3(ctx, "space-id"),
1550
+ id: optionalNumber3(ctx, "id"),
1551
+ payload: optionalJson4(ctx, "payload")
768
1552
  })
769
1553
  });
770
1554
 
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.",
1555
+ // src/commands/te-analysis/favorite/index.ts
1556
+ var commands14 = [
1557
+ favoriteAdd,
1558
+ favoriteRemove
1559
+ ];
1560
+ var favorite_default = commands14;
1561
+
1562
+ // src/commands/te-analysis/public-link/create.ts
1563
+ var publicLinkCreate = createAnalysisCapabilityCommand({
1564
+ resource: "public-link",
1565
+ command: "create",
1566
+ capabilityId: "analysis.public_link.create",
1567
+ description: "Create a public link for a dashboard or BI panel.",
775
1568
  flags: [
776
- { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" }
1569
+ projectIdFlag,
1570
+ { name: "company-id", type: "number", required: false, desc: "Company ID. Derived from project ID when omitted." },
1571
+ { name: "resource-type", type: "string", required: true, desc: "Resource type: dashboard or bi_panel." },
1572
+ { name: "resource-id", type: "number", required: true, desc: "Target resource ID." },
1573
+ { name: "access-controls", type: "json", required: false, desc: "Public link access-control JSON." },
1574
+ { name: "remark", type: "string", required: false, desc: "Public link remark." },
1575
+ { name: "effective-at", type: "string", required: true, desc: "Effective time, yyyy-MM-dd HH:mm:ss." },
1576
+ { name: "expires-at", type: "string", required: true, desc: "Expiration time, yyyy-MM-dd HH:mm:ss." },
1577
+ payloadFlag
777
1578
  ],
1579
+ risk: "write",
1580
+ buildInput: (ctx) => compactInput({
1581
+ ...projectInput(ctx),
1582
+ company_id: optionalNumber3(ctx, "company-id"),
1583
+ resource_type: ctx.str("resource-type"),
1584
+ resource_id: ctx.num("resource-id"),
1585
+ access_controls: optionalJson4(ctx, "access-controls"),
1586
+ remark: optionalString3(ctx, "remark"),
1587
+ effective_at: ctx.str("effective-at"),
1588
+ expires_at: ctx.str("expires-at"),
1589
+ payload: optionalJson4(ctx, "payload")
1590
+ })
1591
+ });
1592
+
1593
+ // src/commands/te-analysis/public-link/list.ts
1594
+ var publicLinkList = createAnalysisCapabilityCommand({
1595
+ resource: "public-link",
1596
+ command: "list",
1597
+ capabilityId: "analysis.public_link.list",
1598
+ description: "List public links in a project.",
1599
+ flags: [projectIdFlag, queryFlag, fieldsFlag, limitFlag, offsetFlag],
778
1600
  risk: "read",
779
- mcpService: "te_analysis_extend",
780
- buildArgs: (ctx) => ({
781
- projectId: ctx.num("project_id")
1601
+ buildInput: listInput
1602
+ });
1603
+
1604
+ // src/commands/te-analysis/public-link/update.ts
1605
+ var publicLinkUpdate = createAnalysisCapabilityCommand({
1606
+ resource: "public-link",
1607
+ command: "update",
1608
+ capabilityId: "analysis.public_link.update",
1609
+ description: "Update a public link.",
1610
+ flags: [
1611
+ projectIdFlag,
1612
+ { name: "company-id", type: "number", required: false, desc: "Company ID. Derived from project ID when omitted." },
1613
+ { name: "link-id", type: "number", required: true, desc: "Public link ID." },
1614
+ { name: "access-controls", type: "json", required: false, desc: "Public link access-control JSON." },
1615
+ { name: "remark", type: "string", required: false, desc: "Public link remark." },
1616
+ { name: "effective-at", type: "string", required: true, desc: "Effective time, yyyy-MM-dd HH:mm:ss." },
1617
+ { name: "expires-at", type: "string", required: true, desc: "Expiration time, yyyy-MM-dd HH:mm:ss." },
1618
+ payloadFlag
1619
+ ],
1620
+ risk: "write",
1621
+ buildInput: (ctx) => compactInput({
1622
+ ...projectInput(ctx),
1623
+ company_id: optionalNumber3(ctx, "company-id"),
1624
+ link_id: ctx.num("link-id"),
1625
+ access_controls: optionalJson4(ctx, "access-controls"),
1626
+ remark: optionalString3(ctx, "remark"),
1627
+ effective_at: ctx.str("effective-at"),
1628
+ expires_at: ctx.str("expires-at"),
1629
+ payload: optionalJson4(ctx, "payload")
782
1630
  })
783
1631
  });
784
1632
 
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.",
1633
+ // src/commands/te-analysis/public-link/offline.ts
1634
+ var publicLinkOffline = createAnalysisCapabilityCommand({
1635
+ resource: "public-link",
1636
+ command: "offline",
1637
+ capabilityId: "analysis.public_link.offline",
1638
+ description: "Offline one or more public links.",
789
1639
  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" }
1640
+ projectIdFlag,
1641
+ { name: "company-id", type: "number", required: false, desc: "Company ID. Derived from project ID when omitted." },
1642
+ { name: "link-id", type: "number", required: false, desc: "Public link ID." },
1643
+ { name: "link-ids", type: "json", required: false, desc: "Public link ID array." }
793
1644
  ],
794
1645
  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")
1646
+ buildInput: (ctx) => compactInput({
1647
+ ...projectInput(ctx),
1648
+ company_id: optionalNumber3(ctx, "company-id"),
1649
+ link_id: optionalNumber3(ctx, "link-id"),
1650
+ link_ids: optionalJsonArray(ctx, "link-ids")
800
1651
  })
801
1652
  });
802
1653
 
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
1654
+ // src/commands/te-analysis/public-link/delete.ts
1655
+ var publicLinkDelete = createAnalysisCapabilityCommand({
1656
+ resource: "public-link",
1657
+ command: "delete",
1658
+ capabilityId: "analysis.public_link.delete",
1659
+ description: "Delete one or more public links.",
1660
+ flags: [
1661
+ projectIdFlag,
1662
+ { name: "company-id", type: "number", required: false, desc: "Company ID. Derived from project ID when omitted." },
1663
+ { name: "link-id", type: "number", required: false, desc: "Public link ID." },
1664
+ { name: "link-ids", type: "json", required: false, desc: "Public link ID array." }
1665
+ ],
1666
+ risk: "write",
1667
+ buildInput: (ctx) => compactInput({
1668
+ ...projectInput(ctx),
1669
+ company_id: optionalNumber3(ctx, "company-id"),
1670
+ link_id: optionalNumber3(ctx, "link-id"),
1671
+ link_ids: optionalJsonArray(ctx, "link-ids")
1672
+ })
1673
+ });
1674
+
1675
+ // src/commands/te-analysis/public-link/index.ts
1676
+ var commands15 = [
1677
+ publicLinkCreate,
1678
+ publicLinkList,
1679
+ publicLinkUpdate,
1680
+ publicLinkOffline,
1681
+ publicLinkDelete
823
1682
  ];
824
- var dashboard_default = commands3;
1683
+ var public_link_default = commands15;
825
1684
 
826
1685
  // src/commands/te-analysis/model/query-adhoc.ts
827
1686
  var queryAdhoc = createMcpCommand({
@@ -1304,7 +2163,7 @@ var buildDistributionAnalysisQp = createMcpCommand({
1304
2163
  });
1305
2164
 
1306
2165
  // src/commands/te-analysis/model/index.ts
1307
- var commands4 = [
2166
+ var commands16 = [
1308
2167
  buildEventAnalysisQp,
1309
2168
  buildRetentionAnalysisQp,
1310
2169
  buildFunnelAnalysisQp,
@@ -1323,7 +2182,7 @@ var commands4 = [
1323
2182
  loadFilters,
1324
2183
  getTableColumns
1325
2184
  ];
1326
- var model_default = commands4;
2185
+ var model_default = commands16;
1327
2186
 
1328
2187
  // src/commands/te-analysis/entity/query-entity-details.ts
1329
2188
  var queryEntityDetails = createMcpCommand({
@@ -1461,13 +2320,13 @@ var buildEventDetailsSql = createMcpCommand({
1461
2320
  });
1462
2321
 
1463
2322
  // src/commands/te-analysis/entity/index.ts
1464
- var commands5 = [
2323
+ var commands17 = [
1465
2324
  queryEntityDetails,
1466
2325
  queryEventDetails,
1467
2326
  buildEntityDetailsSql,
1468
2327
  buildEventDetailsSql
1469
2328
  ];
1470
- var entity_default = commands5;
2329
+ var entity_default = commands17;
1471
2330
 
1472
2331
  // src/commands/te-analysis/schema/get-analysis-query-schema.ts
1473
2332
  var getAnalysisQuerySchema = createMcpCommand({
@@ -1505,12 +2364,12 @@ var getGroupbySchema = createMcpCommand({
1505
2364
  });
1506
2365
 
1507
2366
  // src/commands/te-analysis/schema/index.ts
1508
- var commands6 = [
2367
+ var commands18 = [
1509
2368
  getAnalysisQuerySchema,
1510
2369
  getFilterSchema,
1511
2370
  getGroupbySchema
1512
2371
  ];
1513
- var schema_default = commands6;
2372
+ var schema_default = commands18;
1514
2373
 
1515
2374
  // src/commands/te-analysis/global/list-query-clusters.ts
1516
2375
  var listQueryClusters = createMcpCommand({
@@ -1526,22 +2385,35 @@ var listQueryClusters = createMcpCommand({
1526
2385
  });
1527
2386
 
1528
2387
  // src/commands/te-analysis/global/index.ts
1529
- var commands7 = [
2388
+ var commands19 = [
1530
2389
  listQueryClusters
1531
2390
  ];
1532
- var global_default = commands7;
2391
+ var global_default = commands19;
1533
2392
 
1534
2393
  // src/commands/te-analysis/index.ts
1535
- var commands8 = [
2394
+ registerCapabilityGatewayRoute("analysis", { gatewayDomain: "analysis" });
2395
+ var commands20 = [
1536
2396
  ...meta_default,
1537
2397
  ...report_default,
1538
2398
  ...dashboard_default,
2399
+ ...dashboard_report_data_default,
2400
+ ...query_default,
2401
+ ...run_default,
2402
+ ...artifact_default,
2403
+ ...dashboard_definition_default,
2404
+ ...dashboard_daily_report_default,
2405
+ ...bi_panel_default,
2406
+ ...bi_panel_page_data_default,
2407
+ ...project_space_default,
2408
+ ...folder_default,
2409
+ ...favorite_default,
2410
+ ...public_link_default,
1539
2411
  ...model_default,
1540
2412
  ...entity_default,
1541
2413
  ...schema_default,
1542
2414
  ...isGlobalQueryModeEnabled() ? global_default : []
1543
2415
  ];
1544
- var te_analysis_default = commands8;
2416
+ var te_analysis_default = commands20;
1545
2417
  export {
1546
2418
  te_analysis_default as default
1547
2419
  };