@thinkingai/ae-cli 6.0.18 → 6.0.22

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 (110) hide show
  1. package/README.md +8 -10
  2. package/README.zh.md +9 -11
  3. package/dist/{auth-DYC2BGLM.js → auth-I2G7OAU2.js} +2 -4
  4. package/dist/{auth-GHBMJ5ZR.js → auth-RDN6D5HU.js} +32 -104
  5. package/dist/{chunk-5OC7CYCG.js → chunk-2W7HULUD.js} +14 -14
  6. package/dist/chunk-4EUZRJPO.js +163 -0
  7. package/dist/{chunk-DMMEPCST.js → chunk-5FBLRSMU.js} +25 -115
  8. package/dist/{chunk-BJX3GXWC.js → chunk-E34XH4GW.js} +2 -2
  9. package/dist/chunk-FPE5LGVU.js +105 -0
  10. package/dist/{chunk-I5CRVM2S.js → chunk-H52CSLJW.js} +44 -17
  11. package/dist/{chunk-RSHMZ3LG.js → chunk-U6QPKCN3.js} +6 -20
  12. package/dist/{chunk-6W4QOZAL.js → chunk-WPXHCP4A.js} +23 -13
  13. package/dist/{chunk-PN3OS34E.js → chunk-XE2PI5DS.js} +1 -1
  14. package/dist/{chunk-2DUEAXV3.js → chunk-YACCPUNQ.js} +1 -1
  15. package/dist/cli-token-6AGEDJF4.js +14 -0
  16. package/dist/{client-2UJ63MVQ.js → client-VTJMUZ4O.js} +3 -3
  17. package/dist/{config-NCUGK6NS.js → config-2SDTLGOC.js} +3 -3
  18. package/dist/index.js +314 -197
  19. package/dist/metadata-JZ2OTWBK.js +420 -0
  20. package/dist/{model-SJSOZTRS.js → model-ZYMRN4VS.js} +2 -2
  21. package/dist/{raw-7NVWSVJP.js → raw-NGYHAL3F.js} +4 -4
  22. package/dist/{sync-GRVO4K3U.js → sync-JVLX6TGW.js} +3 -3
  23. package/dist/{te-agent-KZRIEN4N.js → te-agent-QPZTLHPH.js} +545 -21
  24. package/dist/{te-analysis-VAR4KUOK.js → te-analysis-WWX3Z6RP.js} +352 -52
  25. package/dist/te-audience-UXGHUVBB.js +599 -0
  26. package/dist/{te-common-WNCZB7R7.js → te-common-7XXH73MF.js} +5 -4
  27. package/dist/{te-community-JEEFXPB3.js → te-community-QKE67HR2.js} +5 -4
  28. package/dist/te-dataops-6W7NNYST.js +1841 -0
  29. package/dist/{te-engage-4XHCTS6I.js → te-engage-NCFAQFX3.js} +5 -4
  30. package/dist/{te-kb-B62KFP2A.js → te-kb-K5BQYUCM.js} +50 -26
  31. package/dist/{te-meta-EPZGQN56.js → te-meta-LJZBOSMO.js} +48 -24
  32. package/dist/{te-team-YY24VORI.js → te-team-DHK5R7MV.js} +5 -6
  33. package/package.json +3 -2
  34. package/skills/ae-agent/SKILL.md +103 -4
  35. package/skills/ae-analysis/SKILL.md +75 -21
  36. package/skills/ae-analysis/references/build_attribution_analysis_qp.md +62 -0
  37. package/skills/ae-analysis/references/build_cluster_definition.md +62 -0
  38. package/skills/ae-analysis/references/build_distribution_analysis_qp.md +67 -0
  39. package/skills/ae-analysis/references/build_event_analysis_qp.md +2 -0
  40. package/skills/ae-analysis/references/build_funnel_analysis_qp.md +2 -0
  41. package/skills/ae-analysis/references/build_heat_map_analysis_qp.md +54 -0
  42. package/skills/ae-analysis/references/build_interval_analysis_qp.md +60 -0
  43. package/skills/ae-analysis/references/build_path_analysis_qp.md +53 -0
  44. package/skills/ae-analysis/references/build_prop_analysis_qp.md +2 -0
  45. package/skills/ae-analysis/references/build_rank_list_analysis_qp.md +63 -0
  46. package/skills/ae-analysis/references/build_retention_analysis_qp.md +2 -0
  47. package/skills/ae-analysis/references/build_tag_definition.md +65 -0
  48. package/skills/ae-analysis/references/cancel_query.md +2 -3
  49. package/skills/ae-analysis/references/copy_dashboard.md +33 -0
  50. package/skills/ae-analysis/references/create_id_cluster.md +40 -0
  51. package/skills/ae-analysis/references/create_id_tag.md +39 -0
  52. package/skills/ae-analysis/references/delete_alert.md +27 -0
  53. package/skills/ae-analysis/references/delete_cluster.md +27 -0
  54. package/skills/ae-analysis/references/delete_dashboard.md +30 -0
  55. package/skills/ae-analysis/references/delete_metric.md +27 -0
  56. package/skills/ae-analysis/references/delete_report.md +27 -0
  57. package/skills/ae-analysis/references/delete_tag.md +27 -0
  58. package/skills/ae-analysis/references/drilldown_user_events.md +4 -4
  59. package/skills/ae-analysis/references/drilldown_users.md +3 -3
  60. package/skills/ae-analysis/references/freeze_dashboards.md +29 -0
  61. package/skills/ae-analysis/references/get_table_columns.md +11 -12
  62. package/skills/ae-analysis/references/list_cluster_members.md +4 -4
  63. package/skills/ae-analysis/references/list_clusters.md +5 -3
  64. package/skills/ae-analysis/references/list_dashboards.md +3 -3
  65. package/skills/ae-analysis/references/list_entities.md +1 -1
  66. package/skills/ae-analysis/references/list_events.md +7 -4
  67. package/skills/ae-analysis/references/list_metrics.md +5 -3
  68. package/skills/ae-analysis/references/list_properties.md +6 -4
  69. package/skills/ae-analysis/references/list_reports.md +3 -3
  70. package/skills/ae-analysis/references/list_spaces.md +27 -0
  71. package/skills/ae-analysis/references/list_tag_members.md +4 -4
  72. package/skills/ae-analysis/references/list_tags.md +4 -2
  73. package/skills/ae-analysis/references/move_dashboard.md +33 -0
  74. package/skills/ae-analysis/references/query_adhoc.md +2 -2
  75. package/skills/ae-analysis/references/query_bi_panel_data.md +2 -2
  76. package/skills/ae-analysis/references/query_dashboard_report_data.md +4 -4
  77. package/skills/ae-analysis/references/query_entity_details.md +4 -4
  78. package/skills/ae-analysis/references/query_event_details.md +3 -3
  79. package/skills/ae-analysis/references/query_report_data.md +37 -3
  80. package/skills/ae-analysis/references/update_id_cluster.md +36 -0
  81. package/skills/ae-analysis/references/update_id_tag.md +37 -0
  82. package/skills/ae-analysis/references/update_report.md +35 -0
  83. package/skills/ae-analysis-intent/SKILL.md +1 -1
  84. package/skills/ae-dataops/SKILL.md +54 -522
  85. package/skills/ae-dataops/references/dataops-flow-create.md +78 -75
  86. package/skills/ae-dataops/references/dataops-flow-monitor.md +58 -51
  87. package/skills/ae-dataops/references/dataops-integration.md +80 -41
  88. package/skills/ae-dataops/references/dataops-query.md +54 -53
  89. package/skills/ae-dataops/references/dataops-table.md +28 -59
  90. package/skills/ae-generate-tracking-code/SKILL.md +68 -31
  91. package/skills/ae-generate-tracking-code/references/snippet-delivery.md +26 -1
  92. package/skills/ae-generate-tracking-code/references/te-api.md +47 -164
  93. package/skills/ae-generate-tracking-plan/SKILL.md +109 -32
  94. package/skills/ae-generate-tracking-plan/references/te-api.md +57 -27
  95. package/skills/ae-metadata/SKILL.md +90 -0
  96. package/skills/ae-metadata/references/metadata_data_table_csv_delete.md +15 -0
  97. package/skills/ae-metadata/references/metadata_data_table_csv_write.md +29 -0
  98. package/skills/ae-metadata/references/metadata_data_table_download.md +17 -0
  99. package/skills/ae-metadata/references/metadata_data_table_get.md +24 -0
  100. package/skills/ae-metadata/references/metadata_data_table_list.md +27 -0
  101. package/skills/ae-metadata/references/metadata_data_table_property_bindings_update.md +17 -0
  102. package/skills/ae-metadata/references/metadata_data_table_sql_delete.md +15 -0
  103. package/skills/ae-metadata/references/metadata_data_table_sql_write.md +31 -0
  104. package/skills/ae-metadata/references/metadata_event_get.md +52 -0
  105. package/skills/ae-metadata/references/metadata_input_file_upload.md +29 -0
  106. package/skills/ae-metadata/references/metadata_property_dimension_table_bind_existing.md +27 -0
  107. package/skills/ae-metadata/references/metadata_property_dimension_table_create_and_bind_csv.md +30 -0
  108. package/skills/ae-metadata/references/metadata_property_get.md +54 -0
  109. package/dist/te-audience-KMKYI2YJ.js +0 -400
  110. package/dist/te-dataops-GD3XBYCS.js +0 -1830
@@ -3,11 +3,12 @@ import {
3
3
  parseMcpResult,
4
4
  registerMcpMappings,
5
5
  resolveMcpUrl
6
- } from "./chunk-DMMEPCST.js";
7
- import "./chunk-PN3OS34E.js";
6
+ } from "./chunk-5FBLRSMU.js";
7
+ import "./chunk-XE2PI5DS.js";
8
8
  import "./chunk-NOO24N7W.js";
9
- import "./chunk-RSHMZ3LG.js";
10
- import "./chunk-6W4QOZAL.js";
9
+ import "./chunk-FPE5LGVU.js";
10
+ import "./chunk-U6QPKCN3.js";
11
+ import "./chunk-WPXHCP4A.js";
11
12
 
12
13
  // src/commands/te-engage/utils.ts
13
14
  function buildMcpDryRun(ctx, serviceName46, toolName46, args) {
@@ -1,12 +1,11 @@
1
1
  import {
2
2
  kbApi,
3
3
  kbUpload
4
- } from "./chunk-5OC7CYCG.js";
5
- import "./chunk-DMMEPCST.js";
6
- import "./chunk-PN3OS34E.js";
4
+ } from "./chunk-2W7HULUD.js";
7
5
  import "./chunk-NOO24N7W.js";
8
- import "./chunk-RSHMZ3LG.js";
9
- import "./chunk-6W4QOZAL.js";
6
+ import "./chunk-FPE5LGVU.js";
7
+ import "./chunk-U6QPKCN3.js";
8
+ import "./chunk-WPXHCP4A.js";
10
9
 
11
10
  // src/commands/te-kb/query.ts
12
11
  var API_PATH = "/agent/api/external/knowledge-bases/query";
@@ -447,9 +446,32 @@ var schema = {
447
446
  execute: async (ctx) => kbApi(ctx, "POST", API_PATH7, {}, buildBody6(ctx))
448
447
  };
449
448
 
450
- // src/commands/te-kb/kb-index.ts
451
- var API_PATH8 = "/agent/api/external/knowledge-bases/index";
449
+ // src/commands/te-kb/status.ts
450
+ var API_PATH8 = "/agent/api/external/knowledge-bases/status";
452
451
  function buildBody7(ctx) {
452
+ return {
453
+ name: ctx.str("name")
454
+ };
455
+ }
456
+ var status = {
457
+ service: "kb",
458
+ command: "+status",
459
+ description: "Query knowledge base status.",
460
+ flags: [
461
+ { name: "name", type: "string", required: true, desc: "Knowledge base name" }
462
+ ],
463
+ risk: "read",
464
+ dryRun: (ctx) => ({
465
+ method: "POST",
466
+ url: `${ctx.host().replace(/\/$/, "")}${API_PATH8}`,
467
+ body: buildBody7(ctx)
468
+ }),
469
+ execute: async (ctx) => kbApi(ctx, "POST", API_PATH8, {}, buildBody7(ctx))
470
+ };
471
+
472
+ // src/commands/te-kb/kb-index.ts
473
+ var API_PATH9 = "/agent/api/external/knowledge-bases/index";
474
+ function buildBody8(ctx) {
453
475
  const body = {};
454
476
  const sources = ctx.json("sources");
455
477
  if (sources) body.sources = sources;
@@ -473,15 +495,15 @@ var kbIndex = {
473
495
  risk: "read",
474
496
  dryRun: (ctx) => ({
475
497
  method: "POST",
476
- url: `${ctx.host().replace(/\/$/, "")}${API_PATH8}`,
477
- body: buildBody7(ctx)
498
+ url: `${ctx.host().replace(/\/$/, "")}${API_PATH9}`,
499
+ body: buildBody8(ctx)
478
500
  }),
479
- execute: async (ctx) => kbApi(ctx, "POST", API_PATH8, {}, buildBody7(ctx))
501
+ execute: async (ctx) => kbApi(ctx, "POST", API_PATH9, {}, buildBody8(ctx))
480
502
  };
481
503
 
482
504
  // src/commands/te-kb/kb-grep.ts
483
- var API_PATH9 = "/agent/api/external/knowledge-bases/grep";
484
- function buildBody8(ctx) {
505
+ var API_PATH10 = "/agent/api/external/knowledge-bases/grep";
506
+ function buildBody9(ctx) {
485
507
  const body = {
486
508
  query: ctx.str("query")
487
509
  };
@@ -517,15 +539,15 @@ var kbGrep = {
517
539
  risk: "read",
518
540
  dryRun: (ctx) => ({
519
541
  method: "POST",
520
- url: `${ctx.host().replace(/\/$/, "")}${API_PATH9}`,
521
- body: buildBody8(ctx)
542
+ url: `${ctx.host().replace(/\/$/, "")}${API_PATH10}`,
543
+ body: buildBody9(ctx)
522
544
  }),
523
- execute: async (ctx) => kbApi(ctx, "POST", API_PATH9, {}, buildBody8(ctx))
545
+ execute: async (ctx) => kbApi(ctx, "POST", API_PATH10, {}, buildBody9(ctx))
524
546
  };
525
547
 
526
548
  // src/commands/te-kb/kb-read.ts
527
- var API_PATH10 = "/agent/api/external/knowledge-bases/read";
528
- function buildBody9(ctx) {
549
+ var API_PATH11 = "/agent/api/external/knowledge-bases/read";
550
+ function buildBody10(ctx) {
529
551
  const body = {
530
552
  source: ctx.json("source"),
531
553
  path: ctx.str("path")
@@ -562,14 +584,14 @@ var kbRead = {
562
584
  risk: "read",
563
585
  dryRun: (ctx) => ({
564
586
  method: "POST",
565
- url: `${ctx.host().replace(/\/$/, "")}${API_PATH10}`,
566
- body: buildBody9(ctx)
587
+ url: `${ctx.host().replace(/\/$/, "")}${API_PATH11}`,
588
+ body: buildBody10(ctx)
567
589
  }),
568
- execute: async (ctx) => kbApi(ctx, "POST", API_PATH10, {}, buildBody9(ctx))
590
+ execute: async (ctx) => kbApi(ctx, "POST", API_PATH11, {}, buildBody10(ctx))
569
591
  };
570
592
 
571
593
  // src/commands/te-kb/ask.ts
572
- var API_PATH11 = "/agent/api/external/knowledge-bases/ask";
594
+ var API_PATH12 = "/agent/api/external/knowledge-bases/ask";
573
595
  var VALID_LOCALES = /* @__PURE__ */ new Set(["zh", "en", "ja", "ko"]);
574
596
  var MIN_QUESTION_LEN = 1;
575
597
  var MAX_QUESTION_LEN = 2e3;
@@ -595,7 +617,7 @@ function validateMaxTurns(maxTurns) {
595
617
  );
596
618
  }
597
619
  }
598
- function buildBody10(ctx) {
620
+ function buildBody11(ctx) {
599
621
  const body = {
600
622
  question: ctx.str("question")
601
623
  };
@@ -649,10 +671,10 @@ var ask = {
649
671
  },
650
672
  dryRun: (ctx) => ({
651
673
  method: "POST",
652
- url: `${ctx.host().replace(/\/$/, "")}${API_PATH11}`,
653
- body: buildBody10(ctx)
674
+ url: `${ctx.host().replace(/\/$/, "")}${API_PATH12}`,
675
+ body: buildBody11(ctx)
654
676
  }),
655
- execute: async (ctx) => kbApi(ctx, "POST", API_PATH11, {}, buildBody10(ctx))
677
+ execute: async (ctx) => kbApi(ctx, "POST", API_PATH12, {}, buildBody11(ctx))
656
678
  };
657
679
 
658
680
  // src/commands/te-kb/index.ts
@@ -665,6 +687,7 @@ var commands = [
665
687
  create,
666
688
  rmSource,
667
689
  schema,
690
+ status,
668
691
  kbIndex,
669
692
  kbGrep,
670
693
  kbRead
@@ -682,5 +705,6 @@ export {
682
705
  query,
683
706
  remove,
684
707
  rmSource,
685
- schema
708
+ schema,
709
+ status
686
710
  };
@@ -2,11 +2,12 @@ import {
2
2
  callMcpTool,
3
3
  parseMcpResult,
4
4
  resolveMcpUrl
5
- } from "./chunk-DMMEPCST.js";
6
- import "./chunk-PN3OS34E.js";
5
+ } from "./chunk-5FBLRSMU.js";
6
+ import "./chunk-XE2PI5DS.js";
7
7
  import "./chunk-NOO24N7W.js";
8
- import "./chunk-RSHMZ3LG.js";
9
- import "./chunk-6W4QOZAL.js";
8
+ import "./chunk-FPE5LGVU.js";
9
+ import "./chunk-U6QPKCN3.js";
10
+ import "./chunk-WPXHCP4A.js";
10
11
 
11
12
  // src/commands/te-meta/shared.ts
12
13
  function createMcpCommand(config) {
@@ -60,13 +61,14 @@ function requiredJsonString(ctx, name) {
60
61
  // src/commands/te-meta/meta/list-events.ts
61
62
  var listEvents = createMcpCommand({
62
63
  command: "+list_events",
63
- description: "List events in the project. Use for explicit metadata inspection, not as a pre-step for event/retention/funnel/prop_analysis ad-hoc builders; the builders resolve event names internally. Query performs fuzzy matching on eventName, eventDesc and aiRemark. Supports fields/limit/offset payload governance.",
64
+ description: "List events in the project. Use for explicit metadata inspection, not as a pre-step for event/retention/funnel/prop_analysis ad-hoc builders; the builders resolve event names internally. Query performs fuzzy matching on eventName, eventDesc, and remark. Supports authenticated asset filtering plus fields/limit/offset payload governance. Default returned fields: eventId, eventName, eventDesc, remark, authenticationStatus.",
64
65
  flags: [
65
66
  { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
66
- { name: "query", type: "string", required: false, desc: "Optional keyword filter. Fuzzy match is applied to eventName, eventDesc, and aiRemark; if omitted, all events are returned.", alias: "q" },
67
- { name: "fields", type: "json", required: false, desc: "Optional fields to return. Supported fields: eventName, eventDesc, aiRemark, eventTag, remark.", alias: "f" },
68
- { name: "limit", type: "number", required: false, desc: "Optional page size. Default: 20, maximum: 10000.", alias: "l" },
69
- { name: "offset", type: "number", required: false, desc: "Optional page offset. Default: 0.", alias: "o" }
67
+ { name: "query", type: "string", required: false, desc: "Optional keyword filter. Fuzzy match is applied to eventName, eventDesc, and remark; if omitted, all events are returned.", alias: "q" },
68
+ { name: "fields", type: "json", required: false, desc: "Optional fields to return. Supported fields: eventId, eventName, eventDesc, remark, eventTag, authenticationStatus. Default fields when omitted: eventId, eventName, eventDesc, remark, authenticationStatus.", alias: "f" },
69
+ { name: "limit", type: "number", required: false, desc: "Optional page size. Default: 20, maximum: 50.", alias: "l" },
70
+ { name: "offset", type: "number", required: false, desc: "Optional page offset. Default: 0.", alias: "o" },
71
+ { name: "authenticated_only", type: "boolean", required: false, desc: "When true, return only authenticated events." }
70
72
  ],
71
73
  risk: "read",
72
74
  buildArgs: (ctx) => ({
@@ -74,22 +76,24 @@ var listEvents = createMcpCommand({
74
76
  query: optionalString(ctx, "query"),
75
77
  fields: optionalJson(ctx, "fields"),
76
78
  limit: optionalNumber(ctx, "limit"),
77
- offset: optionalNumber(ctx, "offset")
79
+ offset: optionalNumber(ctx, "offset"),
80
+ authenticatedOnly: optionalBoolean(ctx, "authenticated_only")
78
81
  })
79
82
  });
80
83
 
81
84
  // src/commands/te-meta/meta/list-properties.ts
82
85
  var listProperties = createMcpCommand({
83
86
  command: "+list_properties",
84
- description: "List properties in the project. Use for explicit metadata inspection, not as a pre-step for event/retention/funnel/prop_analysis ad-hoc builders; the builders resolve property names internally. Query performs fuzzy matching on propName, propDesc and aiRemark. Supports fields/limit/offset payload governance.",
87
+ description: "List properties in the project. Use for explicit metadata inspection, not as a pre-step for event/retention/funnel/prop_analysis ad-hoc builders; the builders resolve property names internally. Query performs fuzzy matching on propName, propDesc, and remark. Supports authenticated asset filtering plus fields/limit/offset payload governance. Default returned fields: propId, propName, propDesc, remark, selectType, tableType, authenticationStatus.",
85
88
  flags: [
86
89
  { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
87
90
  { name: "scope", type: "string", required: false, desc: "Property scope: event or user" },
88
91
  { name: "event_name", type: "string", required: false, desc: "Optional event name filter" },
89
- { name: "query", type: "string", required: false, desc: "Optional keyword filter. Fuzzy match is applied to propName, propDesc, and aiRemark; if omitted, all accessible properties are returned.", alias: "q" },
90
- { name: "fields", type: "json", required: false, desc: "Optional fields to return. Supported fields: propName, propDesc, aiRemark, selectType, tableType, subTableType.", alias: "f" },
91
- { name: "limit", type: "number", required: false, desc: "Optional page size. Default: 20, maximum: 10000.", alias: "l" },
92
- { name: "offset", type: "number", required: false, desc: "Optional page offset. Default: 0.", alias: "o" }
92
+ { name: "query", type: "string", required: false, desc: "Optional keyword filter. Fuzzy match is applied to propName, propDesc, and remark; if omitted, all accessible properties are returned.", alias: "q" },
93
+ { name: "fields", type: "json", required: false, desc: "Optional fields to return. Supported fields: propId, propName, propDesc, remark, selectType, tableType, subTableType, authenticationStatus. Default fields when omitted: propId, propName, propDesc, remark, selectType, tableType, authenticationStatus.", alias: "f" },
94
+ { name: "limit", type: "number", required: false, desc: "Optional page size. Default: 20, maximum: 50.", alias: "l" },
95
+ { name: "offset", type: "number", required: false, desc: "Optional page offset. Default: 0.", alias: "o" },
96
+ { name: "authenticated_only", type: "boolean", required: false, desc: "When true, return only authenticated properties." }
93
97
  ],
94
98
  risk: "read",
95
99
  buildArgs: (ctx) => ({
@@ -99,7 +103,8 @@ var listProperties = createMcpCommand({
99
103
  query: optionalString(ctx, "query"),
100
104
  fields: optionalJson(ctx, "fields"),
101
105
  limit: optionalNumber(ctx, "limit"),
102
- offset: optionalNumber(ctx, "offset")
106
+ offset: optionalNumber(ctx, "offset"),
107
+ authenticatedOnly: optionalBoolean(ctx, "authenticated_only")
103
108
  })
104
109
  });
105
110
 
@@ -200,13 +205,14 @@ var createVirtualProperty = createMcpCommand({
200
205
  // src/commands/te-meta/meta/list-metrics.ts
201
206
  var listMetrics = createMcpCommand({
202
207
  command: "+list_metrics",
203
- description: "List metric metadata in the project. Use for metric metadata inspection/management, not as a pre-step for event/retention/funnel/prop_analysis ad-hoc builders. For event saved metric queries, pass the metric name directly to +build_event_analysis_qp in metrics[].event. Query performs fuzzy matching on metricName, metricDesc, and metricRemark. Supports fields/limit/offset pagination.",
208
+ description: "List metric metadata in the project. Use for metric metadata inspection/management, not as a pre-step for event/retention/funnel/prop_analysis ad-hoc builders. For event saved metric queries, pass the metric name directly to +build_event_analysis_qp in metrics[].event. Query performs fuzzy matching on metricName, metricDesc, and metricRemark. Supports authenticated asset filtering plus fields/limit/offset pagination. Default returned fields: metricId, metricName, metricDesc, metricRemark, metricMode, authenticationStatus.",
204
209
  flags: [
205
210
  { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
206
211
  { name: "query", type: "string", required: false, alias: "q", desc: "Optional keyword filter. Fuzzy match on metricName, metricDesc, metricRemark." },
207
- { name: "fields", type: "json", required: false, desc: "Optional fields to return. Supported: metricId, metricName, metricDesc, metricRemark, metricMode, openId, creator, creatorLoginName, updateOpenId, updateCreator, updateLoginName, createTime, updateTime." },
208
- { name: "limit", type: "number", required: false, desc: "Optional limit. Default: 20, maximum: 10000." },
209
- { name: "offset", type: "number", required: false, desc: "Optional offset. Default: 0." }
212
+ { name: "fields", type: "json", required: false, desc: "Optional fields to return. Supported: metricId, metricName, metricDesc, metricRemark, metricMode, authenticationStatus, openId, creator, creatorLoginName, updateOpenId, updateCreator, updateLoginName, createTime, updateTime. Default fields when omitted: metricId, metricName, metricDesc, metricRemark, metricMode, authenticationStatus." },
213
+ { name: "limit", type: "number", required: false, desc: "Optional limit. Default: 20, maximum: 50." },
214
+ { name: "offset", type: "number", required: false, desc: "Optional offset. Default: 0." },
215
+ { name: "authenticated_only", type: "boolean", required: false, desc: "When true, return only authenticated metrics." }
210
216
  ],
211
217
  risk: "read",
212
218
  mcpService: "te_analysis_extend",
@@ -215,7 +221,8 @@ var listMetrics = createMcpCommand({
215
221
  query: optionalString(ctx, "query"),
216
222
  fields: optionalJson(ctx, "fields"),
217
223
  limit: optionalNumber(ctx, "limit"),
218
- offset: optionalNumber(ctx, "offset")
224
+ offset: optionalNumber(ctx, "offset"),
225
+ authenticatedOnly: optionalBoolean(ctx, "authenticated_only")
219
226
  })
220
227
  });
221
228
 
@@ -289,6 +296,22 @@ var updateMetric = createMcpCommand({
289
296
  })
290
297
  });
291
298
 
299
+ // src/commands/te-meta/meta/delete-metric.ts
300
+ var deleteMetric = createMcpCommand({
301
+ command: "+delete_metric",
302
+ description: "Delete a metric by metricId",
303
+ flags: [
304
+ { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
305
+ { name: "metric_id", type: "number", required: true, desc: "Metric ID to delete" }
306
+ ],
307
+ risk: "write",
308
+ mcpService: "te_analysis_extend",
309
+ buildArgs: (ctx) => ({
310
+ projectId: ctx.num("project_id"),
311
+ metricId: ctx.num("metric_id")
312
+ })
313
+ });
314
+
292
315
  // src/commands/te-meta/meta/index.ts
293
316
  var commands = [
294
317
  listEvents,
@@ -300,7 +323,8 @@ var commands = [
300
323
  listMetrics,
301
324
  getMetric,
302
325
  createMetric,
303
- updateMetric
326
+ updateMetric,
327
+ deleteMetric
304
328
  ];
305
329
  var meta_default = commands;
306
330
 
@@ -515,12 +539,12 @@ var project_default = commands2;
515
539
  // src/commands/te-meta/entity/list-entities.ts
516
540
  var listEntities = createMcpCommand({
517
541
  command: "+list_entities",
518
- description: "List entities in the project. Query performs fuzzy matching on entityName, columnName and columnDesc. Supports fields/limit/offset payload governance.",
542
+ description: "List entities in the project. Query performs fuzzy matching on entityName, columnName and columnDesc. Supports fields/limit/offset payload governance. Default returned fields: entityId, entityName, columnName, columnDesc, selectType. Entity metadata exposes columnDesc as the description field; no remark field is available in this list response.",
519
543
  flags: [
520
544
  { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
521
545
  { name: "event_name", type: "string", required: false, desc: "Optional event name filter" },
522
546
  { name: "query", type: "string", required: false, desc: "Optional keyword filter. Fuzzy match is applied to entityName, columnName, and columnDesc; if omitted, all entities are returned.", alias: "q" },
523
- { name: "fields", type: "json", required: false, desc: "Optional fields to return. Supported fields: entityId, entityName, columnName, columnDesc, selectType, tableType, entityType.", alias: "f" },
547
+ { name: "fields", type: "json", required: false, desc: "Optional fields to return. Supported fields: entityId, entityName, columnName, columnDesc, selectType, tableType, entityType. Default fields when omitted: entityId, entityName, columnName, columnDesc, selectType.", alias: "f" },
524
548
  { name: "limit", type: "number", required: false, desc: "Optional page size. Default: 20, maximum: 10000.", alias: "l" },
525
549
  { name: "offset", type: "number", required: false, desc: "Optional page offset. Default: 0.", alias: "o" }
526
550
  ],
@@ -1,16 +1,15 @@
1
1
  import {
2
2
  getAuthHeaders,
3
3
  kbApi
4
- } from "./chunk-5OC7CYCG.js";
4
+ } from "./chunk-2W7HULUD.js";
5
5
  import {
6
6
  printError,
7
7
  printOutput
8
- } from "./chunk-2DUEAXV3.js";
9
- import "./chunk-DMMEPCST.js";
10
- import "./chunk-PN3OS34E.js";
8
+ } from "./chunk-YACCPUNQ.js";
11
9
  import "./chunk-NOO24N7W.js";
12
- import "./chunk-RSHMZ3LG.js";
13
- import "./chunk-6W4QOZAL.js";
10
+ import "./chunk-FPE5LGVU.js";
11
+ import "./chunk-U6QPKCN3.js";
12
+ import "./chunk-WPXHCP4A.js";
14
13
 
15
14
  // src/commands/te-team/shared.ts
16
15
  var API_PREFIX = process.env.AE_API_PREFIX ?? "/agent";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkingai/ae-cli",
3
- "version": "6.0.18",
3
+ "version": "6.0.22",
4
4
  "description": "CLI tool for ThinkingAI (AE) analytics platform",
5
5
  "type": "module",
6
6
  "bin": {
@@ -22,13 +22,14 @@
22
22
  "verify:analysis-tools": "tsx scripts/verify-te-analysis-tools.mjs",
23
23
  "verify:analysis-cluster-routing": "node scripts/verify-analysis-cluster-routing.mjs",
24
24
  "verify:multi-cluster-mode": "node test/multi-cluster-mode.test.mjs",
25
+ "verify:metadata-capability": "node test/metadata-capability-commands.test.mjs",
25
26
  "verify:analysis-builder-dry-run": "node scripts/verify-te-analysis-builder-dry-run.mjs",
26
27
  "verify:analysis-audience-tools": "node scripts/verify-te-audience-tools.mjs",
27
28
  "verify:analysis-meta-tools": "node scripts/verify-te-meta-tools.mjs",
28
29
  "verify:analysis-common-tools": "node scripts/verify-te-common-tools.mjs",
29
30
  "verify:team-tools": "node scripts/verify-te-team-tools.mjs",
30
31
  "verify:agent-tools": "node scripts/verify-agent-tools.mjs",
31
- "verify:tracking-tools": "node test/tracking-client.test.mjs && node test/tracking-commands.test.mjs",
32
+ "verify:tracking-tools": "node test/tracking-client.test.mjs && node test/tracking-skill-flow.test.mjs && node test/tracking-commands.test.mjs",
32
33
  "verify:self-check-overlay": "node test/self-check-overlay.test.mjs",
33
34
  "verify:update-check": "npx tsx test/update-check.test.mjs",
34
35
  "self-check": "node self-check/scan.mjs",
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: ae-agent
3
- version: 1.0.0
4
- description: "AE Agent platform resource management CLI for listing Agents, creating and updating automations, adding/removing/listing/toggling custom models, MCP servers, Skills, and uploading sandbox files to the attachment library. Use when the user asks to manage Agent platform resources or create scheduled Agent automations. Must use ae-cli agent commands."
3
+ version: 1.1.0
4
+ description: "AE Agent platform resource management CLI for listing Agents, creating and updating automations, adding/removing/listing/toggling custom models, MCP servers, Skills, uploading sandbox files to the attachment library, browsing the MCP/Skill market, setting market category/icon, copying system/company Skills to personal, and submitting/approving/sharing Skills. Use when the user asks to manage Agent platform resources, browse the market, or create scheduled Agent automations. Must use ae-cli agent commands."
5
5
  ---
6
6
 
7
7
  # ae-agent
@@ -14,10 +14,10 @@ ae-cli agent +<command> [options]
14
14
 
15
15
  ## Global Rules
16
16
 
17
- - Use this skill for Agent platform resource management: Agents, automations, models, MCP servers, Skills, and attachments.
17
+ - Use this skill for Agent platform resource management: Agents, automations, models, MCP servers, Skills, attachments, the MCP/Skill market, and Skill copy/approval/share flows.
18
18
  - Read operations can run directly. Write operations require explicit user intent and normally keep the confirmation prompt unless `--yes` is passed.
19
19
  - Prefer `--dry-run` before destructive writes.
20
- - Only personal scope resources can be created or deleted; company/system resources are read-only in the CLI.
20
+ - Only personal scope resources can be created or deleted; company/system resources are read-only in the CLI (exception: root users can approve/reject submissions and set company-scope meta).
21
21
  - Toggle operations on company/system resources only affect the current user's preference, not the global state.
22
22
  - JSON flags must be valid JSON strings, usually wrapped in single quotes in shell.
23
23
  - Successful commands return JSON by default. Use `--format table` when a table is easier to scan.
@@ -64,6 +64,45 @@ ae-cli agent +<command> [options]
64
64
  | `+del-skill` | write | Delete a personal Skill (physical delete). |
65
65
  | `+toggle-skill` | write | Enable or disable a Skill. |
66
66
 
67
+ ### Market (browse)
68
+
69
+ | Command | Risk | Purpose |
70
+ | -------------------- | ----: | ------------------------------------------------------------------------ |
71
+ | `+list-mcp-market` | read | List MCP servers from the market (filter by scope/category/search/sort). |
72
+ | `+list-skill-market` | read | List Skills from the market (only approved; same filters). |
73
+
74
+ ### Category & Icon (meta)
75
+
76
+ | Command | Risk | Purpose |
77
+ | ----------------- | ----: | ----------------------------------------------------------------------------- |
78
+ | `+set-mcp-meta` | write | Update an MCP server market category/icon. Company requires root; system RO. |
79
+ | `+set-skill-meta` | write | Update a Skill market category/icon. Company requires root; system RO. |
80
+
81
+ ### Copy to personal
82
+
83
+ | Command | Risk | Purpose |
84
+ | ------------- | ----: | ---------------------------------------------------------------------- |
85
+ | `+copy-skill` | write | Copy a system/company Skill to a personal copy (independent duplicate). |
86
+
87
+ ### Skill Approval (company-scope publish)
88
+
89
+ | Command | Risk | Purpose |
90
+ | -------------------------- | ----: | ------------------------------------------------------------------ |
91
+ | `+submit-skill` | write | Submit a personal Skill for company-scope review. |
92
+ | `+list-skill-submissions` | read | List submissions (root sees all; others see only their own). |
93
+ | `+cancel-skill-submission` | write | Cancel a pending submission (submitter or root). |
94
+ | `+approve-skill` | write | Approve a submission (root only). Creates a company-scope copy. |
95
+ | `+reject-skill` | write | Reject a submission with a reason (root only). |
96
+
97
+ ### Skill Share (peer-to-peer)
98
+
99
+ | Command | Risk | Purpose |
100
+ | --------------------- | ----: | ----------------------------------------------------------------- |
101
+ | `+share-skill` | write | Share a personal Skill to a same-company user. |
102
+ | `+list-skill-shares` | read | List Skill shares (received by default; `--direction sent`). |
103
+ | `+accept-skill-share` | write | Accept a received share (creates a personal copy for recipient). |
104
+ | `+reject-skill-share` | write | Reject a received share. |
105
+
67
106
  ### Attachments
68
107
 
69
108
  | Command | Risk | Purpose |
@@ -129,6 +168,18 @@ ae-cli agent +add-mcp \
129
168
  --headers '{"Authorization":"Bearer token"}'
130
169
  ```
131
170
 
171
+ ### Add an MCP with a market category and icon
172
+
173
+ ```bash
174
+ ae-cli agent +add-mcp \
175
+ --name my-mcp \
176
+ --url "https://mcp.example.com/mcp" \
177
+ --transport http \
178
+ --headers '{"Authorization":"Bearer token"}' \
179
+ --category dev_tool \
180
+ --icon-emoji robot
181
+ ```
182
+
132
183
  ### Create a Skill with inline instructions
133
184
 
134
185
  ```bash
@@ -145,6 +196,49 @@ echo "You are a helpful assistant that..." | \
145
196
  ae-cli agent +add-skill --name helper --description "Helper skill" --instructions @-
146
197
  ```
147
198
 
199
+ ### Browse the market
200
+
201
+ ```bash
202
+ ae-cli agent +list-mcp-market --scope company --category dev_tool --sort calls
203
+ ae-cli agent +list-skill-market --search "code review" --sort newest --format table
204
+ ```
205
+
206
+ ### Set market category / icon
207
+
208
+ ```bash
209
+ ae-cli agent +set-mcp-meta --id <mcp-cuid> --category dev_tool --icon-emoji robot
210
+ ae-cli agent +set-skill-meta --id <skill-cuid> --category data_query
211
+ ```
212
+
213
+ ### Copy a system/company Skill to personal
214
+
215
+ ```bash
216
+ ae-cli agent +copy-skill --id <skill-cuid>
217
+ ae-cli agent +copy-skill --id <skill-cuid> --category dev_tool --icon-emoji robot
218
+ ```
219
+
220
+ ### Submit a Skill for company approval
221
+
222
+ ```bash
223
+ ae-cli agent +submit-skill --id <skill-cuid> --description "Code reviewer for the team"
224
+ ```
225
+
226
+ ### Review approvals (root)
227
+
228
+ ```bash
229
+ ae-cli agent +list-skill-submissions --status pending
230
+ ae-cli agent +approve-skill --id <submission-cuid>
231
+ ae-cli agent +reject-skill --id <submission-cuid> --reason "Needs more detail"
232
+ ```
233
+
234
+ ### Share a Skill peer-to-peer
235
+
236
+ ```bash
237
+ ae-cli agent +share-skill --id <skill-cuid> --to-user-id <user-id>
238
+ ae-cli agent +list-skill-shares --direction received --status pending
239
+ ae-cli agent +accept-skill-share --id <share-cuid>
240
+ ```
241
+
148
242
  ### Upload a single file to attachment library
149
243
 
150
244
  ```bash
@@ -172,3 +266,8 @@ ae-cli agent +toggle-model --id <model-cuid> --enabled false
172
266
  - Attachment upload supports files up to 50MB each, with a 1GB user quota.
173
267
  - Batch attachment uploads support partial success — individual file failures don't affect others.
174
268
  - Skill `--instructions @-` reads from stdin, useful for piping long instruction text.
269
+ - Market category keys: `ae_preset | dev_tool | search_tool | data_query | content_gen | enterprise | life | automation | other`. Sort options: `newest | calls | likes` (`calls` sorts MCP by call count, Skill by download count). Market scope: `all | system | company | custom` (`custom` = personal).
270
+ - `+add-mcp` / `+add-skill` accept optional `--category / --icon-emoji / --icon-color`; these are applied via a follow-up meta PATCH after creation. MCP creation still does NOT validate server connectivity.
271
+ - `+copy-skill` copies a system/company Skill to an independent personal copy. Optional `--category / --icon-emoji / --icon-color` override the copy's market meta; omit them to inherit the source's. MCP has no copy (use `+toggle-mcp` to enable a system/company MCP per-user).
272
+ - Approval and share flows are Skill-only; MCP has no approval or share. `+approve-skill` / `+reject-skill` require root.
273
+ - `--id` semantics differ by command: `+submit-skill` / `+share-skill` / `+copy-skill` take a Skill ID; `+cancel-skill-submission` / `+approve-skill` / `+reject-skill` take a submission ID; `+accept-skill-share` / `+reject-skill-share` take a share ID.