@thinkingai/ae-cli 6.0.56 → 6.0.57

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 (111) hide show
  1. package/README.md +12 -4
  2. package/README.zh.md +12 -4
  3. package/bin/ae-cli.js +5 -0
  4. package/bin/runtime-capabilities.json +5 -0
  5. package/cli-installation-guide.md +24 -3
  6. package/dist/{auth-U7MNUUEF.js → auth-YEIJLBFY.js} +30 -12
  7. package/dist/{automation-K32V2NKP.js → automation-NAR5DDGL.js} +6 -6
  8. package/dist/{capability-VV7RHB3B.js → capability-P7DD4Q73.js} +48 -20
  9. package/dist/{chunk-KHS64JZQ.js → chunk-72NJKS7O.js} +4 -4
  10. package/dist/chunk-752BSLZC.js +222 -0
  11. package/dist/{chunk-W2PTY5NN.js → chunk-7ABK2PEJ.js} +3 -3
  12. package/dist/{chunk-UUD5RB36.js → chunk-7JAVT5TK.js} +3 -3
  13. package/dist/{chunk-P7KL7IOH.js → chunk-H3K5UGYC.js} +2 -2
  14. package/dist/{chunk-P6VFCH3P.js → chunk-IN7KKL6K.js} +2 -2
  15. package/dist/{chunk-MXV3PYC3.js → chunk-JCWM2TYP.js} +50 -12
  16. package/dist/{chunk-T44M3PLZ.js → chunk-JEUXDY3B.js} +1 -1
  17. package/dist/{chunk-LMCYSVVA.js → chunk-JNVVJ273.js} +51 -37
  18. package/dist/{chunk-JJJIP2XQ.js → chunk-N6XBLRB7.js} +2 -2
  19. package/dist/{chunk-QSAR3GHY.js → chunk-OAWPT7VP.js} +2 -2
  20. package/dist/{chunk-F6NIPIT5.js → chunk-QEMQKVHW.js} +35 -14
  21. package/dist/{chunk-2IYIYSUO.js → chunk-QVRIDN42.js} +2 -2
  22. package/dist/{chunk-GI5BMEZO.js → chunk-QZUVLFNR.js} +1 -1
  23. package/dist/{chunk-2UWS5CUP.js → chunk-RJHGDWSC.js} +3 -3
  24. package/dist/{chunk-3TQA5RXE.js → chunk-TKVVACEJ.js} +6 -4
  25. package/dist/chunk-TULINOLS.js +2283 -0
  26. package/dist/{chunk-X7DRLE62.js → chunk-YVG6QD3V.js} +1 -1
  27. package/dist/{chunk-ZW4VMY5H.js → chunk-Z3Q2AEIN.js} +152 -98
  28. package/dist/chunk-ZGIYG473.js +132 -0
  29. package/dist/{community-report-client-S2K3A3Q6.js → community-report-client-TJVCLZ3K.js} +1 -1
  30. package/dist/compat-check-PMEGUPZU.js +32 -0
  31. package/dist/{config-ASSAAIOI.js → config-VWVPR4WW.js} +38 -6
  32. package/dist/{context-6RWLVOM5.js → context-F6FCGTF3.js} +4 -4
  33. package/dist/{data-integration-EXSUPUDZ.js → data-integration-6UAZO4GG.js} +207 -24
  34. package/dist/{evaluation-5YT4QLCL.js → evaluation-4LO2O4AF.js} +4 -4
  35. package/dist/index.js +291 -71
  36. package/dist/{local-data-upload-client-7HCPGIS3.js → local-data-upload-client-KCMG6J62.js} +1 -1
  37. package/dist/{memory-VCYLVPMI.js → memory-HHPX3NF2.js} +6 -6
  38. package/dist/{metadata-TIWIOFTU.js → metadata-HEQQEEG3.js} +16 -8
  39. package/dist/{model-DPJHSD73.js → model-7UHGWYVR.js} +4 -4
  40. package/dist/{personal-semantic-preference-SBKU2LOK.js → personal-semantic-preference-V4L6ZWR2.js} +7 -6
  41. package/dist/{project-semantic-SKNWLH3I.js → project-semantic-NKHKJX6M.js} +7 -6
  42. package/dist/{sync-7PP6KQ75.js → sync-ZJMXCRIN.js} +8 -7
  43. package/dist/{te-agent-L2BYNPHM.js → te-agent-WBKIFEQD.js} +11 -7
  44. package/dist/{te-analysis-RJB6VJC4.js → te-analysis-ADX7RKO4.js} +179 -27
  45. package/dist/{te-community-QN3WMPNT.js → te-community-PREDRXG3.js} +720 -228
  46. package/dist/{te-dataops-UKD2XN3E.js → te-dataops-ITWJHO2U.js} +6 -5
  47. package/dist/{te-engage-KPTN4N2U.js → te-engage-VE2NUH5V.js} +7 -6
  48. package/dist/{te-kb-SFZI3W5T.js → te-kb-WSMOW7WS.js} +407 -83
  49. package/dist/{te-system-IE7NCKC3.js → te-system-YM657FKO.js} +6 -6
  50. package/dist/{te-team-4KHCFM2I.js → te-team-T2WRLOOD.js} +7 -6
  51. package/dist/{things-7JJUVAWL.js → things-6QOMFXOG.js} +7 -7
  52. package/dist/{update-AX66IFMJ.js → update-I4MOUYOX.js} +11 -7
  53. package/dist/{workspace-Q5NMEKEN.js → workspace-LYDAP647.js} +6 -6
  54. package/package.json +17 -7
  55. package/skills/ae-agent/SKILL.md +1 -1
  56. package/skills/ae-agent/references/resource-package.md +4 -0
  57. package/skills/ae-analysis/SKILL.md +14 -10
  58. package/skills/ae-analysis/references/agent_review_preflight.md +52 -11
  59. package/skills/ae-analysis/references/agent_review_priorities_comparisons.md +5 -3
  60. package/skills/ae-analysis/references/agent_review_submit_to_page.md +57 -25
  61. package/skills/ae-analysis/references/command_index.md +7 -3
  62. package/skills/ae-analysis/references/governance_recommendation_export.md +31 -17
  63. package/skills/ae-analysis/references/governance_recommendation_run_update.md +13 -0
  64. package/skills/ae-analysis/references/project_semantic_knowledge_wiki.md +9 -1
  65. package/skills/ae-analysis/references/scenario_append.md +6 -0
  66. package/skills/ae-analysis/references/scenario_begin.md +11 -0
  67. package/skills/ae-analysis/references/scenario_collect.md +10 -2
  68. package/skills/ae-analysis/references/scenario_evaluation.md +6 -18
  69. package/skills/ae-analysis/references/scenario_get.md +15 -0
  70. package/skills/ae-analysis/references/scenario_list.md +64 -0
  71. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/company-kb.mjs +14 -1
  72. package/skills/ae-community/SKILL.md +77 -27
  73. package/skills/ae-community/references/community-analyzing-theme-comment.md +10 -8
  74. package/skills/ae-community/references/community-data-quality.md +68 -0
  75. package/skills/ae-community/references/community-query-evidence.md +85 -0
  76. package/skills/ae-community/references/community-scenario-capabilities.md +137 -0
  77. package/skills/ae-community/references/community-weekly-report.md +6 -3
  78. package/skills/ae-community/references/get_channel_info.md +7 -4
  79. package/skills/ae-community/references/get_comment_tag_analysis.md +3 -3
  80. package/skills/ae-community/references/get_comments_summary.md +4 -4
  81. package/skills/ae-community/references/get_corpus_tags.md +3 -3
  82. package/skills/ae-community/references/get_daily_summary.md +3 -3
  83. package/skills/ae-community/references/get_hot_topics.md +3 -3
  84. package/skills/ae-community/references/get_livestream_analysis.md +3 -3
  85. package/skills/ae-community/references/get_livestream_detail.md +4 -4
  86. package/skills/ae-community/references/get_livestream_list.md +3 -3
  87. package/skills/ae-community/references/get_livestream_overview.md +3 -3
  88. package/skills/ae-community/references/get_livestream_room_metrics.md +3 -3
  89. package/skills/ae-community/references/get_livestream_rooms.md +3 -3
  90. package/skills/ae-community/references/get_overview_metrics.md +3 -3
  91. package/skills/ae-community/references/get_post_detail.md +4 -4
  92. package/skills/ae-community/references/get_risk_content.md +5 -5
  93. package/skills/ae-community/references/get_sentiment_overview.md +4 -4
  94. package/skills/ae-community/references/get_tag_trends.md +3 -3
  95. package/skills/ae-community/references/get_topic_detail.md +3 -3
  96. package/skills/ae-community/references/list_sources.md +28 -0
  97. package/skills/ae-community/references/list_spaces.md +39 -0
  98. package/skills/ae-community/references/search_posts.md +21 -7
  99. package/skills/ae-data-integration/SKILL.md +6 -4
  100. package/skills/ae-data-integration/references/error-handling.md +1 -0
  101. package/skills/ae-data-integration/references/handoff.md +1 -1
  102. package/skills/ae-data-integration/references/sink-upload.md +11 -0
  103. package/skills/ae-data-integration/references/source-inspect.md +2 -1
  104. package/skills/ae-data-integration/references/transform.md +1 -1
  105. package/skills/ae-data-integration/references/ue-mapping.md +1 -1
  106. package/skills/ae-kb/SKILL.md +33 -6
  107. package/skills/ae-kb/references/publication.md +81 -0
  108. package/skills/ae-kb/references/query-workflow.md +14 -1
  109. package/skills/ae-metadata/SKILL.md +2 -2
  110. package/skills/ae-metadata/references/metadata_data_table_get.md +35 -0
  111. package/dist/chunk-ELCR235M.js +0 -1429
@@ -8,20 +8,20 @@ import {
8
8
  utils,
9
9
  validateAndFix,
10
10
  validateDraft
11
- } from "./chunk-KHS64JZQ.js";
12
- import "./chunk-2IYIYSUO.js";
11
+ } from "./chunk-72NJKS7O.js";
12
+ import "./chunk-QVRIDN42.js";
13
13
  import {
14
14
  require_archiver
15
- } from "./chunk-QSAR3GHY.js";
16
- import "./chunk-T44M3PLZ.js";
15
+ } from "./chunk-OAWPT7VP.js";
16
+ import "./chunk-JEUXDY3B.js";
17
17
  import {
18
18
  getConfigDir
19
- } from "./chunk-LMCYSVVA.js";
19
+ } from "./chunk-JNVVJ273.js";
20
20
  import {
21
21
  CliValidationError,
22
22
  LocalDataUploadError,
23
23
  __toESM
24
- } from "./chunk-ZW4VMY5H.js";
24
+ } from "./chunk-Z3Q2AEIN.js";
25
25
 
26
26
  // src/commands/data-integration/inspect.ts
27
27
  import { basename as basename3 } from "path";
@@ -35,7 +35,8 @@ var THROUGHPUT_BYTES_PER_SECOND = {
35
35
  json: 8 * 1024 * 1024,
36
36
  csv: 4 * 1024 * 1024,
37
37
  tsv: 4 * 1024 * 1024,
38
- xlsx: 2 * 1024 * 1024
38
+ xlsx: 2 * 1024 * 1024,
39
+ parquet: 8 * 1024 * 1024
39
40
  };
40
41
  var SLOW_ENCODINGS = /* @__PURE__ */ new Set(["gbk", "gb2312", "gb18030", "big5", "shift_jis", "euc-jp", "euc-kr"]);
41
42
  function estimateProcessingSeconds(format, sizeBytes, encoding) {
@@ -72,6 +73,9 @@ function largeFileMemoryWarning(format) {
72
73
  if (format === "json") {
73
74
  return "Memory risk: a JSON root object or a very large record may be materialized in memory during inspection, so peak memory can substantially exceed the file size.";
74
75
  }
76
+ if (format === "parquet") {
77
+ return "Memory risk: Parquet input is decoded whole-file into memory (the reader materializes the full table), so peak memory can be a multiple of the file size. Split large files by row group or partition.";
78
+ }
75
79
  return null;
76
80
  }
77
81
  function assessFileSize(fileName, format, sizeBytes, encoding) {
@@ -641,6 +645,150 @@ function isStrongDateTime(value) {
641
645
  return /^\d{4}[-/]\d{1,2}[-/]\d{1,2}(?:[ T]\d{1,2}:\d{2}(?::\d{2}(?:\.\d{1,3})?)?(?:Z|[+-]\d{2}:?\d{2})?)?$/.test(value.trim());
642
646
  }
643
647
 
648
+ // src/commands/data-integration/parquet.ts
649
+ import { readFileSync as readFileSync2 } from "fs";
650
+ var TypeId = {
651
+ Int: 2,
652
+ Float: 3,
653
+ Binary: 4,
654
+ Utf8: 5,
655
+ Bool: 6,
656
+ Decimal: 7,
657
+ Date: 8,
658
+ Timestamp: 10,
659
+ List: 12,
660
+ Struct: 13,
661
+ FixedSizeBinary: 15,
662
+ FixedSizeList: 16,
663
+ Map: 17,
664
+ LargeBinary: 19,
665
+ LargeUtf8: 20,
666
+ LargeList: 21
667
+ };
668
+ function toJsValue(value, type) {
669
+ if (value === null || value === void 0) return null;
670
+ switch (type.typeId) {
671
+ case TypeId.Int:
672
+ return typeof value === "bigint" ? String(value) : value;
673
+ case TypeId.Float:
674
+ case TypeId.Bool:
675
+ case TypeId.Utf8:
676
+ case TypeId.LargeUtf8:
677
+ return value;
678
+ case TypeId.Binary:
679
+ case TypeId.LargeBinary:
680
+ case TypeId.FixedSizeBinary:
681
+ return Buffer.from(value).toString("hex");
682
+ case TypeId.Timestamp:
683
+ return toTimestampValue(value, type);
684
+ case TypeId.Date:
685
+ return toWallClockString(new Date(value));
686
+ case TypeId.Decimal:
687
+ return toDecimalValue(String(value), type.scale);
688
+ case TypeId.List:
689
+ case TypeId.LargeList:
690
+ case TypeId.FixedSizeList: {
691
+ const childType = type.children[0].type;
692
+ return Array.from(value, (item) => toJsValue(item, childType));
693
+ }
694
+ case TypeId.Struct: {
695
+ const row = value;
696
+ const out = {};
697
+ for (const child of type.children) out[child.name] = toJsValue(row[child.name], child.type);
698
+ return out;
699
+ }
700
+ case TypeId.Map: {
701
+ const valueType = type.children[0].type.children[1].type;
702
+ const out = {};
703
+ for (const [key, val] of value) {
704
+ out[String(key)] = toJsValue(val, valueType);
705
+ }
706
+ return out;
707
+ }
708
+ default:
709
+ return value;
710
+ }
711
+ }
712
+ function toTimestampValue(ms, type) {
713
+ const date = new Date(ms);
714
+ if (type.timezone) return date;
715
+ return toWallClockString(date);
716
+ }
717
+ function toWallClockString(date) {
718
+ const pad = (part, width = 2) => String(part).padStart(width, "0");
719
+ const ymd = `${date.getUTCFullYear()}-${pad(date.getUTCMonth() + 1)}-${pad(date.getUTCDate())}`;
720
+ const hours = date.getUTCHours();
721
+ const minutes = date.getUTCMinutes();
722
+ const seconds = date.getUTCSeconds();
723
+ const ms = date.getUTCMilliseconds();
724
+ if (hours === 0 && minutes === 0 && seconds === 0 && ms === 0) return ymd;
725
+ const time = `${pad(hours)}:${pad(minutes)}:${pad(seconds)}`;
726
+ return ms === 0 ? `${ymd} ${time}` : `${ymd} ${time}.${pad(ms, 3)}`;
727
+ }
728
+ function toDecimalValue(unscaled, scale) {
729
+ if (scale <= 0) return unscaled;
730
+ const negative = unscaled.startsWith("-");
731
+ const digits = negative ? unscaled.slice(1) : unscaled;
732
+ const padded = digits.padStart(scale + 1, "0");
733
+ const whole = padded.slice(0, padded.length - scale);
734
+ const fraction = padded.slice(padded.length - scale).replace(/0+$/, "");
735
+ const sign = negative ? "-" : "";
736
+ return fraction ? `${sign}${whole}.${fraction}` : `${sign}${whole}`;
737
+ }
738
+ async function readParquetSchema(filePath) {
739
+ const { readSchema, readMetadata } = await import("parquet-wasm");
740
+ const { tableFromIPC } = await import("apache-arrow");
741
+ try {
742
+ const bytes = new Uint8Array(readFileSync2(filePath));
743
+ const metadata = readMetadata(bytes);
744
+ const numRows = metadata.fileMetadata().numRows();
745
+ metadata.free();
746
+ const table = tableFromIPC(readSchema(bytes).intoIPCStream());
747
+ const columns = table.schema.fields.map((field) => ({ name: field.name, type: field.type.toString() }));
748
+ return {
749
+ columns,
750
+ signature: columns.map((column) => `${column.name}:${column.type}`).join("|"),
751
+ numRows
752
+ };
753
+ } catch {
754
+ throw new CliValidationError("The file could not be read as Parquet.", {
755
+ code: "LOCAL_DATA_PARQUET_INVALID",
756
+ hint: "Verify the file is a valid Parquet file and retry without changing the source file.",
757
+ location: { field: "input-file" }
758
+ });
759
+ }
760
+ }
761
+ async function streamParquet(filePath, onRow) {
762
+ const { readParquet } = await import("parquet-wasm");
763
+ const { tableFromIPC } = await import("apache-arrow");
764
+ let table;
765
+ try {
766
+ const bytes = new Uint8Array(readFileSync2(filePath));
767
+ const wasmTable = readParquet(bytes);
768
+ table = tableFromIPC(wasmTable.intoIPCStream());
769
+ } catch {
770
+ throw new CliValidationError("The file could not be read as Parquet.", {
771
+ code: "LOCAL_DATA_PARQUET_INVALID",
772
+ hint: "Verify the file is a valid Parquet file and retry without changing the source file.",
773
+ location: { field: "input-file" }
774
+ });
775
+ }
776
+ const fields = table.schema.fields;
777
+ const columns = fields.map((_, index) => table.getChildAt(index));
778
+ let count = 0;
779
+ for (let rowIndex = 0; rowIndex < table.numRows; rowIndex += 1) {
780
+ const row = {};
781
+ for (let columnIndex = 0; columnIndex < fields.length; columnIndex += 1) {
782
+ const column = columns[columnIndex];
783
+ if (!column) continue;
784
+ row[fields[columnIndex].name] = toJsValue(column.get(rowIndex), fields[columnIndex].type);
785
+ }
786
+ count += 1;
787
+ await onRow(row, count);
788
+ }
789
+ return count;
790
+ }
791
+
644
792
  // src/commands/data-integration/input.ts
645
793
  set_fs(nodeFs);
646
794
  function resolveLocalDataInputMeta(filePath) {
@@ -664,7 +812,7 @@ function resolveLocalDataInputMeta(filePath) {
664
812
  location: { field: "input-file" }
665
813
  });
666
814
  }
667
- if (format !== "xls" && format !== "xlsx" && !encoding) {
815
+ if (format !== "xls" && format !== "xlsx" && format !== "parquet" && !encoding) {
668
816
  encoding = detectEncoding(filePath);
669
817
  }
670
818
  return {
@@ -788,6 +936,8 @@ async function streamLocalDataRows(input, dataSet, onRow, options = {}) {
788
936
  return await streamXlsx(input.filePath, dataSet.label, wrappedRow, opts);
789
937
  case "xls":
790
938
  return await streamXls(input.filePath, dataSet.label, wrappedRow, opts);
939
+ case "parquet":
940
+ return await streamParquet(input.filePath, wrappedRow);
791
941
  }
792
942
  } catch (error) {
793
943
  if (error instanceof CliValidationError) throw error;
@@ -810,6 +960,7 @@ function resolveFormat(filePath) {
810
960
  if (extension === "ndjson") return "jsonl";
811
961
  if (extension === "xls") return "xls";
812
962
  if (extension === "xlsx" || extension === "xlsm") return "xlsx";
963
+ if (extension === "parquet" || extension === "pq") return "parquet";
813
964
  return "txt";
814
965
  }
815
966
  function sniffDelimiter(filePath, encoding) {
@@ -924,7 +1075,7 @@ function isNumeric(value) {
924
1075
  return !Number.isNaN(Number(trimmed));
925
1076
  }
926
1077
  async function discoverDataSets(filePath, format) {
927
- if (format === "csv" || format === "tsv" || format === "jsonl") {
1078
+ if (format === "csv" || format === "tsv" || format === "jsonl" || format === "parquet") {
928
1079
  return { visible: [{ id: "$", kind: "file", label: basename(filePath), selector: "$" }], hidden: [] };
929
1080
  }
930
1081
  if (format === "xls") {
@@ -1685,7 +1836,7 @@ async function firstNonWhitespaceCharacter(filePath, encoding) {
1685
1836
  }
1686
1837
 
1687
1838
  // src/commands/data-integration/mapping.ts
1688
- import { readFileSync as readFileSync2 } from "fs";
1839
+ import { readFileSync as readFileSync3 } from "fs";
1689
1840
 
1690
1841
  // src/commands/data-integration/types.ts
1691
1842
  var MAPPING_VERSION = "ae-data-integration-mapping/v1";
@@ -1706,7 +1857,7 @@ function readLocalDataMapping(raw, options) {
1706
1857
  text = trimmed;
1707
1858
  } else {
1708
1859
  const filePath = trimmed.startsWith("@") ? trimmed.slice(1) : trimmed;
1709
- text = readFileSync2(filePath, "utf8");
1860
+ text = readFileSync3(filePath, "utf8");
1710
1861
  }
1711
1862
  } catch {
1712
1863
  throw new CliValidationError("The local-data mapping could not be read.", {
@@ -1731,7 +1882,7 @@ function validateMapping(value, options) {
1731
1882
  throw mappingError(`Mapping version must be ${MAPPING_VERSION}.`);
1732
1883
  }
1733
1884
  const sha256Valid = typeof value.source?.sha256 === "string" && (options?.sourceWildcard ? value.source.sha256 === "*" || /^[a-f0-9]{64}$/i.test(value.source.sha256) : /^[a-f0-9]{64}$/i.test(value.source.sha256));
1734
- if (!isRecord(value.source) || !sha256Valid || !["csv", "tsv", "json", "jsonl", "xls", "xlsx"].includes(String(value.source.format)) || typeof value.source.data_set !== "string" || !value.source.data_set) {
1885
+ if (!isRecord(value.source) || !sha256Valid || !["csv", "tsv", "json", "jsonl", "xls", "xlsx", "parquet"].includes(String(value.source.format)) || typeof value.source.data_set !== "string" || !value.source.data_set) {
1735
1886
  throw mappingError("Mapping source fingerprint and data set are required.");
1736
1887
  }
1737
1888
  if (value.mode !== "track" && value.mode !== "user_set" && value.mode !== "mixed") {
@@ -2949,9 +3100,9 @@ var dataIntegrationInspect = {
2949
3100
  service: "data-integration",
2950
3101
  command: "inspect",
2951
3102
  usesAeHost: false,
2952
- description: "Stream one or more local CSV, TSV, TXT, JSON, JSONL, XLS, or XLSX files and recommend a UE mapping.",
3103
+ description: "Stream one or more local CSV, TSV, TXT, JSON, JSONL, XLS, XLSX, or Parquet files and recommend a UE mapping.",
2953
3104
  flags: [
2954
- { name: "input-file", type: "string", required: true, sensitive: true, variadic: true, desc: "Local CSV, TSV, TXT, JSON, JSONL, XLS, or XLSX file. Repeat for multiple files." },
3105
+ { name: "input-file", type: "string", required: true, sensitive: true, variadic: true, desc: "Local CSV, TSV, TXT, JSON, JSONL, XLS, XLSX, or Parquet file. Repeat for multiple files." },
2955
3106
  { name: "data-set", type: "string", sensitive: true, desc: "Sheet or JSON Path ID returned by a discovery-only inspection." },
2956
3107
  { name: "source-timezone", type: "string", default: "Asia/Shanghai", desc: "IANA timezone used to interpret source times without an offset." },
2957
3108
  { name: "headers", type: "string", sensitive: true, desc: "Comma-separated explicit column names for a headerless file; the first row is data." },
@@ -3039,6 +3190,10 @@ var dataIntegrationInspect = {
3039
3190
  };
3040
3191
  }
3041
3192
  const files = [];
3193
+ if (inputFiles.every((file) => resolveLocalDataInputMeta(file).format === "parquet")) {
3194
+ const checked = await inspectParquetFiles(inputFiles, sourceTimezone);
3195
+ if (checked) return checked;
3196
+ }
3042
3197
  for (const inputFile of inputFiles) {
3043
3198
  const input = await inspectLocalDataInput(inputFile);
3044
3199
  const dataSet = selectDataSet(input);
@@ -3073,6 +3228,34 @@ var dataIntegrationInspect = {
3073
3228
  };
3074
3229
  }
3075
3230
  };
3231
+ async function inspectParquetFiles(inputFiles, sourceTimezone) {
3232
+ const firstPath = inputFiles[0];
3233
+ const firstSchema = await readParquetSchema(firstPath);
3234
+ const first = await inspectLocalDataInput(firstPath);
3235
+ const profile = await profileLocalData(first, selectDataSet(first), sourceTimezone, {
3236
+ collectSamples: true,
3237
+ collectNestedTree: true
3238
+ });
3239
+ const files = [];
3240
+ let totalRowCount = 0;
3241
+ let totalSizeBytes = 0;
3242
+ for (const inputFile of inputFiles) {
3243
+ const meta = resolveLocalDataInputMeta(inputFile);
3244
+ const schema = inputFile === firstPath ? firstSchema : await readParquetSchema(inputFile);
3245
+ if (schema.signature !== firstSchema.signature) return void 0;
3246
+ files.push({ file: basename3(inputFile), row_count: schema.numRows, size_bytes: meta.sizeBytes });
3247
+ totalRowCount += schema.numRows;
3248
+ totalSizeBytes += meta.sizeBytes;
3249
+ }
3250
+ return {
3251
+ version: "ae-local-data-profile/v1",
3252
+ schema_checked: true,
3253
+ representative: { file: basename3(firstPath), profile },
3254
+ files,
3255
+ total_row_count: totalRowCount,
3256
+ total_size_bytes: totalSizeBytes
3257
+ };
3258
+ }
3076
3259
  function summarizeExcludedSheets(input) {
3077
3260
  const excluded = input.excludedDataSets ?? [];
3078
3261
  if (excluded.length === 0) return {};
@@ -3331,7 +3514,7 @@ import {
3331
3514
  existsSync,
3332
3515
  mkdirSync,
3333
3516
  readdirSync,
3334
- readFileSync as readFileSync3,
3517
+ readFileSync as readFileSync4,
3335
3518
  renameSync,
3336
3519
  statSync as statSync2,
3337
3520
  unlinkSync,
@@ -3699,7 +3882,7 @@ function readZoneOffset(row, field) {
3699
3882
  function readSalvageRowNumbers(path) {
3700
3883
  let text;
3701
3884
  try {
3702
- text = readFileSync3(path, "utf8");
3885
+ text = readFileSync4(path, "utf8");
3703
3886
  } catch {
3704
3887
  throw new CliValidationError("The salvage file could not be read.", {
3705
3888
  code: "LOCAL_DATA_SALVAGE_INVALID",
@@ -4101,7 +4284,7 @@ var dataIntegrationConvert = {
4101
4284
  };
4102
4285
 
4103
4286
  // src/commands/data-integration/upload.ts
4104
- import { createReadStream as createReadStream4, readFileSync as readFileSync4, statSync as statSync3 } from "fs";
4287
+ import { createReadStream as createReadStream4, readFileSync as readFileSync5, statSync as statSync3 } from "fs";
4105
4288
  import { basename as basename5, dirname, resolve as resolve2 } from "path";
4106
4289
  import { createInterface as createInterface3 } from "readline";
4107
4290
  var DEFAULT_BATCH_SIZE = 500;
@@ -4335,7 +4518,7 @@ async function prepareUpload(ctx, enforceReady) {
4335
4518
  function readManifest(path) {
4336
4519
  let value;
4337
4520
  try {
4338
- value = JSON.parse(readFileSync4(path, "utf8"));
4521
+ value = JSON.parse(readFileSync5(path, "utf8"));
4339
4522
  } catch {
4340
4523
  throw new CliValidationError("The local-data manifest could not be read as JSON.", {
4341
4524
  code: "LOCAL_DATA_MANIFEST_INVALID",
@@ -4447,7 +4630,7 @@ function isRecord3(value) {
4447
4630
 
4448
4631
  // src/commands/data-integration/handoff.ts
4449
4632
  import { createHash as createHash3 } from "crypto";
4450
- import { chmodSync as chmodSync2, mkdirSync as mkdirSync2, mkdtempSync, readFileSync as readFileSync5, renameSync as renameSync2, rmSync, writeFileSync as writeFileSync2 } from "fs";
4633
+ import { chmodSync as chmodSync2, mkdirSync as mkdirSync2, mkdtempSync, readFileSync as readFileSync6, renameSync as renameSync2, rmSync, writeFileSync as writeFileSync2 } from "fs";
4451
4634
  import { dirname as dirname2, join as join3, resolve as resolve3 } from "path";
4452
4635
  import { tmpdir } from "os";
4453
4636
 
@@ -5379,7 +5562,7 @@ function buildHandoffPackage(outDir, mapping, planFile) {
5379
5562
  function readHandoffIndex(path) {
5380
5563
  let raw;
5381
5564
  try {
5382
- raw = readFileSync5(path, "utf8");
5565
+ raw = readFileSync6(path, "utf8");
5383
5566
  } catch {
5384
5567
  return { version: HANDOFF_INDEX_VERSION, entries: [] };
5385
5568
  }
@@ -5403,7 +5586,7 @@ function readHandoffIndex(path) {
5403
5586
  function readPlanFile(path) {
5404
5587
  let raw;
5405
5588
  try {
5406
- raw = readFileSync5(path, "utf8");
5589
+ raw = readFileSync6(path, "utf8");
5407
5590
  } catch {
5408
5591
  throw new CliValidationError("The tracking-plan file could not be read.", {
5409
5592
  code: "LOCAL_DATA_HANDOFF_PLAN_NOT_FOUND",
@@ -5611,7 +5794,7 @@ function stageScopedPackage(outDir, mappingDirs, entries, relayFiles) {
5611
5794
  for (const rel of mappingDirFiles(dirName, planFile)) {
5612
5795
  const dest = join3(staging, rel);
5613
5796
  mkdirSync2(dirname2(dest), { recursive: true, mode: 448 });
5614
- writeFileSync2(dest, readFileSync5(join3(outDir, rel), "utf8"), { encoding: "utf8", mode: 384 });
5797
+ writeFileSync2(dest, readFileSync6(join3(outDir, rel), "utf8"), { encoding: "utf8", mode: 384 });
5615
5798
  chmodSync2(dest, 384);
5616
5799
  }
5617
5800
  }
@@ -5619,7 +5802,7 @@ function stageScopedPackage(outDir, mappingDirs, entries, relayFiles) {
5619
5802
  }
5620
5803
 
5621
5804
  // src/commands/data-integration/reuse.ts
5622
- import { readFileSync as readFileSync6 } from "fs";
5805
+ import { readFileSync as readFileSync7 } from "fs";
5623
5806
  import { dirname as dirname4, join as join5, resolve as resolve5 } from "path";
5624
5807
 
5625
5808
  // src/commands/data-integration/handoff-root.ts
@@ -5678,7 +5861,7 @@ function detectReuse(mapping, outDir) {
5678
5861
  function readFrozenEventName(path) {
5679
5862
  let value;
5680
5863
  try {
5681
- value = JSON.parse(readFileSync6(path, "utf8"));
5864
+ value = JSON.parse(readFileSync7(path, "utf8"));
5682
5865
  } catch {
5683
5866
  return {};
5684
5867
  }
@@ -4,17 +4,17 @@ import {
4
4
  evalDownloadFile,
5
5
  evalRequest,
6
6
  resolveEvaluationHost
7
- } from "./chunk-X7DRLE62.js";
7
+ } from "./chunk-YVG6QD3V.js";
8
8
  import {
9
9
  getCliToken
10
- } from "./chunk-P7KL7IOH.js";
10
+ } from "./chunk-H3K5UGYC.js";
11
11
  import {
12
12
  isAeSandboxRuntime
13
- } from "./chunk-LMCYSVVA.js";
13
+ } from "./chunk-JNVVJ273.js";
14
14
  import {
15
15
  CliValidationError,
16
16
  externalCliTokenRequestOptions
17
- } from "./chunk-ZW4VMY5H.js";
17
+ } from "./chunk-Z3Q2AEIN.js";
18
18
 
19
19
  // src/core/eval-session.ts
20
20
  var SESSION_PATH = "/api/sandbox/agent/evaluation/session";