@thinkingai/ae-cli 6.1.26 → 6.1.28

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 (122) hide show
  1. package/README.md +29 -3
  2. package/README.zh.md +29 -3
  3. package/dist/{auth-YHMC3GDH.js → auth-NKD5Z5BQ.js} +150 -38
  4. package/dist/{automation-NWWVLWG2.js → automation-K32V2NKP.js} +94 -38
  5. package/dist/{capability-3QLLIVFB.js → capability-4CGSL7PK.js} +9 -8
  6. package/dist/{chunk-CT7QDJS6.js → chunk-2IYIYSUO.js} +2 -2
  7. package/dist/{chunk-PLE722AJ.js → chunk-2UWS5CUP.js} +62 -35
  8. package/dist/{chunk-KFNMQTZI.js → chunk-ELCR235M.js} +26 -19
  9. package/dist/{chunk-D6ACFILC.js → chunk-GI5BMEZO.js} +1 -1
  10. package/dist/{chunk-FMNNGNYO.js → chunk-GTPWDLTE.js} +7 -6
  11. package/dist/chunk-JJJIP2XQ.js +105 -0
  12. package/dist/{chunk-5XJYLEVC.js → chunk-KHS64JZQ.js} +4 -4
  13. package/dist/{chunk-UQ77JXYH.js → chunk-LMCYSVVA.js} +12 -13
  14. package/dist/{chunk-7QXISROD.js → chunk-P6VFCH3P.js} +4 -2
  15. package/dist/{chunk-GIK6EDUG.js → chunk-P7KL7IOH.js} +41 -13
  16. package/dist/{chunk-AP7YP2NX.js → chunk-QSAR3GHY.js} +2 -2
  17. package/dist/{chunk-EOYSKMXN.js → chunk-QW3R6O7L.js} +14 -6
  18. package/dist/{chunk-S6M42KND.js → chunk-T44M3PLZ.js} +1 -1
  19. package/dist/{chunk-XCHAYMSF.js → chunk-UF244C5C.js} +3 -3
  20. package/dist/{chunk-KAEHZZH4.js → chunk-UJ7UPRXK.js} +3 -3
  21. package/dist/{chunk-HVHR4SCP.js → chunk-UUD5RB36.js} +3 -3
  22. package/dist/chunk-X7DRLE62.js +233 -0
  23. package/dist/{chunk-WNGFSIOB.js → chunk-ZW4VMY5H.js} +103 -6
  24. package/dist/{community-report-client-PEERQCX2.js → community-report-client-S2K3A3Q6.js} +1 -1
  25. package/dist/{config-AHPMEW5A.js → config-ASSAAIOI.js} +6 -5
  26. package/dist/{context-YAE3QXP3.js → context-6RWLVOM5.js} +4 -4
  27. package/dist/{data-integration-HESZET7E.js → data-integration-EXSUPUDZ.js} +6 -6
  28. package/dist/evaluation-5YT4QLCL.js +3714 -0
  29. package/dist/index.js +96 -52
  30. package/dist/{local-data-upload-client-TWMHFLUA.js → local-data-upload-client-7HCPGIS3.js} +1 -1
  31. package/dist/{memory-62BJOULV.js → memory-VCYLVPMI.js} +6 -6
  32. package/dist/{metadata-C7CEDHOJ.js → metadata-YGI5M6OF.js} +8 -8
  33. package/dist/{model-SBV2JFJI.js → model-DPJHSD73.js} +4 -4
  34. package/dist/{personal-semantic-preference-QECDPHND.js → personal-semantic-preference-76TBKAPY.js} +6 -6
  35. package/dist/{project-semantic-Z4QAMBWF.js → project-semantic-XOEBO2Q5.js} +6 -6
  36. package/dist/{sync-SU33KYX7.js → sync-7PP6KQ75.js} +7 -7
  37. package/dist/{te-agent-F5QBZSQA.js → te-agent-PJVAPKBD.js} +753 -94
  38. package/dist/{te-analysis-2ECAAIFK.js → te-analysis-OX62G5VD.js} +411 -79
  39. package/dist/{te-community-PFLDLPP4.js → te-community-QN3WMPNT.js} +6 -4
  40. package/dist/{te-dataops-FOQSRIAZ.js → te-dataops-UKD2XN3E.js} +8 -6
  41. package/dist/{te-engage-QKUGIWSR.js → te-engage-X3DIXPRA.js} +6 -6
  42. package/dist/{te-experiment-26PXR2UO.js → te-experiment-MEIIK3DP.js} +6 -6
  43. package/dist/{te-kb-MHDOST62.js → te-kb-73EWDFDF.js} +7 -7
  44. package/dist/{te-system-J2FQF5ER.js → te-system-IE7NCKC3.js} +10 -9
  45. package/dist/{te-team-5UOZPTU3.js → te-team-MGQ5CNRW.js} +63 -41
  46. package/dist/{things-VPPXXLHB.js → things-4JIBCA55.js} +7 -7
  47. package/dist/{update-EEUTEI6R.js → update-AX66IFMJ.js} +4 -4
  48. package/dist/{workspace-O3EEIYQM.js → workspace-Q5NMEKEN.js} +6 -6
  49. package/package.json +13 -8
  50. package/skills/ae-agent/SKILL.md +24 -3
  51. package/skills/ae-agent/references/command_index.md +8 -0
  52. package/skills/ae-agent/references/resource-package.md +53 -0
  53. package/skills/ae-analysis/SKILL.md +12 -3
  54. package/skills/ae-analysis/references/adhoc_export.md +1 -1
  55. package/skills/ae-analysis/references/agent_review_preflight.md +4 -0
  56. package/skills/ae-analysis/references/agent_review_submit_to_page.md +4 -0
  57. package/skills/ae-analysis/references/ai_models/event.md +58 -2
  58. package/skills/ae-analysis/references/ai_models/rank_list.md +1 -0
  59. package/skills/ae-analysis/references/ai_models/retention.md +2 -0
  60. package/skills/ae-analysis/references/ai_models/revenue.md +2 -0
  61. package/skills/ae-analysis/references/analysis_data_export.md +11 -1
  62. package/skills/ae-analysis/references/asset_batch_info_export.md +2 -2
  63. package/skills/ae-analysis/references/asset_batch_sql_export.md +2 -2
  64. package/skills/ae-analysis/references/asset_export.md +1 -1
  65. package/skills/ae-analysis/references/bi_panel_page_data_export.md +1 -1
  66. package/skills/ae-analysis/references/check_export.md +1 -1
  67. package/skills/ae-analysis/references/command_index.md +34 -25
  68. package/skills/ae-analysis/references/dashboard_report_data_export.md +2 -0
  69. package/skills/ae-analysis/references/dashboard_report_get.md +6 -2
  70. package/skills/ae-analysis/references/dashboard_report_update.md +24 -5
  71. package/skills/ae-analysis/references/feedback_submit.md +1 -1
  72. package/skills/ae-analysis/references/governance_recommendation_export.md +10 -2
  73. package/skills/ae-analysis/references/live_data_export.md +1 -1
  74. package/skills/ae-analysis/references/metric_create.md +29 -0
  75. package/skills/ae-analysis/references/metric_get.md +2 -0
  76. package/skills/ae-analysis/references/metric_update.md +2 -0
  77. package/skills/ae-analysis/references/operation_record_export.md +1 -1
  78. package/skills/ae-analysis/references/plan_change_log_export.md +1 -1
  79. package/skills/ae-analysis/references/plan_export.md +1 -1
  80. package/skills/ae-analysis/references/project_info_get.md +4 -0
  81. package/skills/ae-analysis/references/project_member_group_add_members.md +35 -0
  82. package/skills/ae-analysis/references/project_member_group_create.md +25 -0
  83. package/skills/ae-analysis/references/project_member_group_delete.md +34 -0
  84. package/skills/ae-analysis/references/project_member_group_list.md +29 -0
  85. package/skills/ae-analysis/references/project_member_group_members.md +28 -0
  86. package/skills/ae-analysis/references/project_member_group_remove_members.md +35 -0
  87. package/skills/ae-analysis/references/project_member_group_rename.md +26 -0
  88. package/skills/ae-analysis/references/project_semantic_knowledge_wiki_plan_schema.md +6 -1
  89. package/skills/ae-analysis/references/report_data_export.md +1 -1
  90. package/skills/ae-analysis/references/scenario_append.md +25 -0
  91. package/skills/ae-analysis/references/scenario_collect.md +35 -0
  92. package/skills/ae-analysis/references/scenario_evaluation.md +30 -0
  93. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/build-project-semantic-wiki.mjs +73 -4
  94. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/default-compile-schema.md +5 -1
  95. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/execution-contract.mjs +173 -0
  96. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/generate-build-ir.mjs +109 -64
  97. package/skills/ae-automation/SKILL.md +2 -2
  98. package/skills/ae-automation/references/cli.md +18 -1
  99. package/skills/ae-capability/SKILL.md +7 -3
  100. package/skills/ae-evaluation/SKILL.md +83 -0
  101. package/skills/ae-evaluation/references/access-and-members.md +55 -0
  102. package/skills/ae-evaluation/references/connections.md +78 -0
  103. package/skills/ae-evaluation/references/datasets.md +57 -0
  104. package/skills/ae-evaluation/references/evaluators.md +81 -0
  105. package/skills/ae-evaluation/references/files.md +33 -0
  106. package/skills/ae-evaluation/references/integrations.md +39 -0
  107. package/skills/ae-evaluation/references/runs.md +160 -0
  108. package/skills/ae-evaluation/references/schedules.md +31 -0
  109. package/skills/ae-kb/SKILL.md +1 -2
  110. package/skills/ae-metadata/SKILL.md +2 -1
  111. package/skills/ae-metadata/references/metadata_data_table_download.md +7 -1
  112. package/skills/ae-metadata/references/metadata_data_table_get.md +2 -0
  113. package/skills/ae-system/SKILL.md +1 -1
  114. package/skills/ae-team/SKILL.md +2 -2
  115. package/skills/ae-team/references/run-start.md +1 -0
  116. package/skills/ae-team/references/run-watch.md +7 -5
  117. package/skills/ae-things/SKILL.md +53 -51
  118. package/skills/ae-things/references/cli.md +56 -54
  119. package/skills/ae-things-progress/SKILL.md +20 -20
  120. package/skills/ae-things-review/SKILL.md +19 -19
  121. package/skills/ae-workspace/SKILL.md +1 -1
  122. package/dist/chunk-4655PUNX.js +0 -43
package/dist/index.js CHANGED
@@ -1,4 +1,7 @@
1
1
  import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
2
+ import {
3
+ requiresConfirmation
4
+ } from "./chunk-AMBFK2K3.js";
2
5
  import {
3
6
  allHeaderNames,
4
7
  allSheetNames,
@@ -14,25 +17,25 @@ import {
14
17
  validateAndFix,
15
18
  validateDraft,
16
19
  writeDraftXlsx
17
- } from "./chunk-5XJYLEVC.js";
18
- import "./chunk-CT7QDJS6.js";
20
+ } from "./chunk-KHS64JZQ.js";
21
+ import "./chunk-2IYIYSUO.js";
19
22
  import {
20
- requiresConfirmation
21
- } from "./chunk-AMBFK2K3.js";
22
- import "./chunk-AP7YP2NX.js";
23
- import "./chunk-S6M42KND.js";
23
+ EvalApiError
24
+ } from "./chunk-X7DRLE62.js";
25
+ import "./chunk-QSAR3GHY.js";
26
+ import "./chunk-T44M3PLZ.js";
24
27
  import {
25
28
  TeAgentApiError,
26
29
  TeAgentCredentialsError
27
- } from "./chunk-PLE722AJ.js";
30
+ } from "./chunk-2UWS5CUP.js";
28
31
  import {
29
32
  CapabilityGatewayError,
30
33
  executeCapability,
31
34
  uploadInputFileBytes
32
- } from "./chunk-EOYSKMXN.js";
35
+ } from "./chunk-QW3R6O7L.js";
33
36
  import {
34
37
  resolveHost
35
- } from "./chunk-7QXISROD.js";
38
+ } from "./chunk-P6VFCH3P.js";
36
39
  import {
37
40
  failInstallation,
38
41
  fetchCliConfig,
@@ -45,27 +48,31 @@ import {
45
48
  resolveKbAutoDiscoveryFeature,
46
49
  runHostCompatCheck,
47
50
  shouldSkipAutoSync
48
- } from "./chunk-KFNMQTZI.js";
51
+ } from "./chunk-ELCR235M.js";
49
52
  import "./chunk-Y74WTIKJ.js";
50
53
  import {
51
54
  CredentialStoreUnreadableError,
52
55
  SecureStoreAuthError,
53
56
  getCliToken,
54
57
  peekCliToken
55
- } from "./chunk-GIK6EDUG.js";
58
+ } from "./chunk-P7KL7IOH.js";
56
59
  import {
57
60
  getActiveHost,
58
61
  getConfigDir,
59
62
  safeJsonParse
60
- } from "./chunk-UQ77JXYH.js";
63
+ } from "./chunk-LMCYSVVA.js";
61
64
  import {
62
65
  CliApiError,
63
66
  CliValidationError,
64
67
  CommunityReportError,
68
+ ExternalCliTokenError,
65
69
  LocalDataUploadError,
66
70
  PermissionError,
67
- logger
68
- } from "./chunk-WNGFSIOB.js";
71
+ externalCliTokenRequestOptions,
72
+ logger,
73
+ readExternalCliToken,
74
+ setExternalCliTokenFile
75
+ } from "./chunk-ZW4VMY5H.js";
69
76
 
70
77
  // src/index.ts
71
78
  import { Command as CommanderCommand, Option } from "commander";
@@ -236,7 +243,7 @@ async function runCommand(cmd, opts, globalOpts) {
236
243
  process.exit(1);
237
244
  }
238
245
  const message = err.message || String(err);
239
- if (!(err instanceof CommunityReportError)) {
246
+ if (!(err instanceof CommunityReportError) && !(err instanceof EvalApiError)) {
240
247
  if (!(err instanceof LocalDataUploadError)) logger.error(`Command failed: ${message}`);
241
248
  }
242
249
  if (err instanceof CliValidationError) {
@@ -250,7 +257,7 @@ async function runCommand(cmd, opts, globalOpts) {
250
257
  } else if (err instanceof TeAgentCredentialsError) {
251
258
  printError("config", message, err.hint);
252
259
  } else if (err instanceof PermissionError) {
253
- printError("permission", message, err.hint, err.code, void 0, { details: err.details });
260
+ printError("permission", message, err.hint, err.code, err.meta, { details: err.details });
254
261
  } else if (err instanceof CliApiError) {
255
262
  printError("api", message, err.hint, err.code, err.meta);
256
263
  } else if (err instanceof CapabilityGatewayError) {
@@ -259,8 +266,10 @@ async function runCommand(cmd, opts, globalOpts) {
259
266
  printError("api", message, err.hint, err.code, err.meta, { log: false });
260
267
  } else if (err instanceof LocalDataUploadError) {
261
268
  printError("api", message, err.hint, err.code, err.meta, { log: false });
262
- } else if (err instanceof CredentialStoreUnreadableError) {
269
+ } else if (err instanceof CredentialStoreUnreadableError || err instanceof ExternalCliTokenError) {
263
270
  printError("config", message, err.hint, err.code);
271
+ } else if (err instanceof EvalApiError) {
272
+ printError("api", message, err.hint, err.code, void 0, { log: false });
264
273
  } else if (err instanceof SecureStoreAuthError) {
265
274
  printError("auth", message, "Run: ae-cli auth login", err.code);
266
275
  } else if (err instanceof TeAgentApiError) {
@@ -326,14 +335,14 @@ function createRuntimeContext(cmd, opts, globalOpts) {
326
335
  let _communityReportModule = null;
327
336
  async function getCommunityReportClient() {
328
337
  if (!_communityReportModule) {
329
- _communityReportModule = await import("./community-report-client-PEERQCX2.js");
338
+ _communityReportModule = await import("./community-report-client-S2K3A3Q6.js");
330
339
  }
331
340
  return _communityReportModule;
332
341
  }
333
342
  let _localDataUploadModule = null;
334
343
  async function getLocalDataUploadClient() {
335
344
  if (!_localDataUploadModule) {
336
- _localDataUploadModule = await import("./local-data-upload-client-TWMHFLUA.js");
345
+ _localDataUploadModule = await import("./local-data-upload-client-7HCPGIS3.js");
337
346
  }
338
347
  return _localDataUploadModule;
339
348
  }
@@ -363,6 +372,11 @@ function createRuntimeContext(cmd, opts, globalOpts) {
363
372
  try {
364
373
  return safeJsonParse(String(val));
365
374
  } catch {
375
+ if (cmd.flags.some((flag) => flag.name === name && flag.sensitive)) {
376
+ throw new CliValidationError(`Invalid JSON for --${name}.`, {
377
+ hint: "Provide valid JSON with quoted keys and strings. Sensitive input is omitted from diagnostics."
378
+ });
379
+ }
366
380
  printError("validation", `Invalid JSON for --${name}: ${val}`);
367
381
  process.exit(1);
368
382
  }
@@ -445,7 +459,13 @@ function registerCommands(program2, commands) {
445
459
  if (flag.variadic) {
446
460
  sub.option(flagStr, flag.desc, collectVariadic, []);
447
461
  } else if (flag.type === "boolean") {
448
- sub.option(flagStr, flag.desc, (value) => parseBooleanValue(value, flag.name));
462
+ const option = sub.createOption(flagStr, flag.desc);
463
+ if (flag.name.startsWith("no-")) {
464
+ option.negate = false;
465
+ option.attributeName = () => flag.name.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
466
+ }
467
+ option.argParser((value) => parseBooleanValue(value, flag.name));
468
+ sub.addOption(option);
449
469
  } else if (flag.default !== void 0) {
450
470
  sub.option(flagStr, flag.desc, String(flag.default));
451
471
  } else {
@@ -661,7 +681,7 @@ var TrackingClient = class {
661
681
  headers["content-type"] = "application/json";
662
682
  init.body = JSON.stringify(body);
663
683
  }
664
- const resp = await fetch(url, init);
684
+ const resp = await fetch(url, { ...init, ...externalCliTokenRequestOptions(url) });
665
685
  const env = safeJsonParse(await resp.text());
666
686
  logger.api(method, url, resp.status, body, env);
667
687
  if (resp.status === 401) {
@@ -2305,7 +2325,7 @@ async function parseProgram(program2, argv = process.argv) {
2305
2325
  try {
2306
2326
  await program2.parseAsync(normalizeSubcommandVersionOption(program2, argv));
2307
2327
  } catch (error) {
2308
- if (!(error instanceof CredentialStoreUnreadableError)) throw error;
2328
+ if (!(error instanceof CredentialStoreUnreadableError) && !(error instanceof ExternalCliTokenError)) throw error;
2309
2329
  printError("config", error.message, error.hint, error.code);
2310
2330
  process.exitCode = 1;
2311
2331
  }
@@ -2415,7 +2435,7 @@ var require2 = createRequire(import.meta.url);
2415
2435
  var pkg = require2("../package.json");
2416
2436
  var { version } = pkg;
2417
2437
  var program = new CommanderCommand();
2418
- program.name("ae-cli").version(version).description("CLI tool for ThinkingAI (AE) analytics platform").option("--host <url>", "Override active AE host URL (e.g., https://ta.thinkingdata.cn)").option("--mcp-url <url>", "Override MCP server URL (e.g., http://localhost/mcp/http/example)").option("--format <format>", "Output format: json | table", "json").option("--jq <expr>", "jq 1.8 filter over command payload (via jq-wasm), applied before output envelope").option(
2438
+ program.name("ae-cli").version(version).description("CLI tool for ThinkingAI (AE) analytics platform").option("--host <url>", "Override active AE host URL (e.g., https://ta.thinkingdata.cn)").option("--cli-token-file <path>", "Use a read-only JSON CLI token file containing url and token for this invocation").option("--mcp-url <url>", "Override MCP server URL (e.g., http://localhost/mcp/http/example)").option("--format <format>", "Output format: json | table", "json").option("--jq <expr>", "jq 1.8 filter over command payload (via jq-wasm), applied before output envelope").option(
2419
2439
  "--validate",
2420
2440
  "Optional: validate/normalize capability input only (gateway /validate). Use alone while fixing complex params/qp; do not stack with --dry-run",
2421
2441
  false
@@ -2435,114 +2455,120 @@ function warnLoadFailure(label, err) {
2435
2455
  async function loadCommands() {
2436
2456
  const commands = [];
2437
2457
  try {
2438
- const teAnalysis = await import("./te-analysis-2ECAAIFK.js");
2458
+ const teAnalysis = await import("./te-analysis-OX62G5VD.js");
2439
2459
  commands.push(...teAnalysis.default);
2440
2460
  } catch (err) {
2441
2461
  warnLoadFailure("domain te-analysis", err);
2442
2462
  }
2443
2463
  try {
2444
- const engage = await import("./te-engage-QKUGIWSR.js");
2464
+ const engage = await import("./te-engage-X3DIXPRA.js");
2445
2465
  commands.push(...engage.default);
2446
2466
  } catch (err) {
2447
2467
  warnLoadFailure("domain te-engage", err);
2448
2468
  }
2449
2469
  try {
2450
- const experiment = await import("./te-experiment-26PXR2UO.js");
2470
+ const experiment = await import("./te-experiment-MEIIK3DP.js");
2451
2471
  commands.push(...experiment.default);
2452
2472
  } catch (err) {
2453
2473
  warnLoadFailure("domain te-experiment", err);
2454
2474
  }
2455
2475
  try {
2456
- const community = await import("./te-community-PFLDLPP4.js");
2476
+ const community = await import("./te-community-QN3WMPNT.js");
2457
2477
  commands.push(...community.default);
2458
2478
  } catch (err) {
2459
2479
  warnLoadFailure("domain te-community", err);
2460
2480
  }
2461
2481
  try {
2462
- const dataops = await import("./te-dataops-FOQSRIAZ.js");
2482
+ const dataops = await import("./te-dataops-UKD2XN3E.js");
2463
2483
  commands.push(...dataops.default);
2464
2484
  } catch (err) {
2465
2485
  warnLoadFailure("domain te-dataops", err);
2466
2486
  }
2467
2487
  try {
2468
- const teKb = await import("./te-kb-MHDOST62.js");
2488
+ const teKb = await import("./te-kb-73EWDFDF.js");
2469
2489
  commands.push(...teKb.default);
2470
2490
  } catch (err) {
2471
2491
  warnLoadFailure("domain te-kb", err);
2472
2492
  }
2473
2493
  try {
2474
- const teTeam = await import("./te-team-5UOZPTU3.js");
2494
+ const teTeam = await import("./te-team-MGQ5CNRW.js");
2475
2495
  commands.push(...teTeam.default);
2476
2496
  } catch (err) {
2477
2497
  warnLoadFailure("domain te-team", err);
2478
2498
  }
2479
2499
  try {
2480
- const teAgent = await import("./te-agent-F5QBZSQA.js");
2500
+ const teAgent = await import("./te-agent-PJVAPKBD.js");
2481
2501
  commands.push(...teAgent.default);
2482
2502
  } catch (err) {
2483
2503
  warnLoadFailure("domain te-agent", err);
2484
2504
  }
2485
2505
  try {
2486
- const memory = await import("./memory-62BJOULV.js");
2506
+ const memory = await import("./memory-VCYLVPMI.js");
2487
2507
  commands.push(...memory.default);
2488
2508
  } catch (err) {
2489
2509
  warnLoadFailure("domain memory", err);
2490
2510
  }
2491
- const automation = await import("./automation-NWWVLWG2.js");
2511
+ const automation = await import("./automation-K32V2NKP.js");
2492
2512
  commands.push(...automation.default);
2493
2513
  try {
2494
- const things = await import("./things-VPPXXLHB.js");
2514
+ const things = await import("./things-4JIBCA55.js");
2495
2515
  commands.push(...things.default);
2496
2516
  } catch (err) {
2497
2517
  warnLoadFailure("domain things", err);
2498
2518
  }
2499
2519
  try {
2500
- const workspace = await import("./workspace-O3EEIYQM.js");
2520
+ const workspace = await import("./workspace-Q5NMEKEN.js");
2501
2521
  commands.push(...workspace.default);
2502
2522
  } catch (err) {
2503
2523
  warnLoadFailure("domain workspace", err);
2504
2524
  }
2505
2525
  try {
2506
- const teSystem = await import("./te-system-J2FQF5ER.js");
2526
+ const teSystem = await import("./te-system-IE7NCKC3.js");
2507
2527
  commands.push(...teSystem.default);
2508
2528
  } catch (err) {
2509
2529
  warnLoadFailure("domain te-system", err);
2510
2530
  }
2511
2531
  try {
2512
- const metadata = await import("./metadata-C7CEDHOJ.js");
2532
+ const metadata = await import("./metadata-YGI5M6OF.js");
2513
2533
  commands.push(...metadata.default);
2514
2534
  } catch (err) {
2515
2535
  warnLoadFailure("domain metadata", err);
2516
2536
  }
2517
2537
  try {
2518
- const personalSemanticPreference = await import("./personal-semantic-preference-QECDPHND.js");
2538
+ const personalSemanticPreference = await import("./personal-semantic-preference-76TBKAPY.js");
2519
2539
  commands.push(...personalSemanticPreference.default);
2520
2540
  } catch (err) {
2521
2541
  warnLoadFailure("domain personal-semantic-preference", err);
2522
2542
  }
2523
2543
  try {
2524
- const projectSemantic = await import("./project-semantic-Z4QAMBWF.js");
2544
+ const projectSemantic = await import("./project-semantic-XOEBO2Q5.js");
2525
2545
  commands.push(...projectSemantic.default);
2526
2546
  } catch (err) {
2527
2547
  warnLoadFailure("domain project-semantic", err);
2528
2548
  }
2529
2549
  try {
2530
- const dataIntegration = await import("./data-integration-HESZET7E.js");
2550
+ const dataIntegration = await import("./data-integration-EXSUPUDZ.js");
2531
2551
  commands.push(...dataIntegration.default);
2532
2552
  } catch (err) {
2533
2553
  warnLoadFailure("domain data-integration", err);
2534
2554
  }
2535
2555
  try {
2536
- const context = await import("./context-YAE3QXP3.js");
2556
+ const context = await import("./context-6RWLVOM5.js");
2537
2557
  commands.push(...context.default);
2538
2558
  } catch (err) {
2539
2559
  warnLoadFailure("domain context", err);
2540
2560
  }
2561
+ try {
2562
+ const evaluation = await import("./evaluation-5YT4QLCL.js");
2563
+ commands.push(...evaluation.default);
2564
+ } catch (err) {
2565
+ warnLoadFailure("domain evaluation", err);
2566
+ }
2541
2567
  return commands;
2542
2568
  }
2543
2569
  async function registerAuthCommands() {
2544
2570
  try {
2545
- const { registerAuth } = await import("./auth-YHMC3GDH.js");
2571
+ const { registerAuth } = await import("./auth-NKD5Z5BQ.js");
2546
2572
  registerAuth(program);
2547
2573
  } catch (err) {
2548
2574
  warnLoadFailure("auth commands", err);
@@ -2550,7 +2576,7 @@ async function registerAuthCommands() {
2550
2576
  }
2551
2577
  async function registerConfigCommands() {
2552
2578
  try {
2553
- const { registerConfig } = await import("./config-AHPMEW5A.js");
2579
+ const { registerConfig } = await import("./config-ASSAAIOI.js");
2554
2580
  registerConfig(program);
2555
2581
  } catch (err) {
2556
2582
  warnLoadFailure("config commands", err);
@@ -2558,7 +2584,7 @@ async function registerConfigCommands() {
2558
2584
  }
2559
2585
  async function registerCapabilityCommands() {
2560
2586
  try {
2561
- const { registerCapability } = await import("./capability-3QLLIVFB.js");
2587
+ const { registerCapability } = await import("./capability-4CGSL7PK.js");
2562
2588
  registerCapability(program);
2563
2589
  } catch (err) {
2564
2590
  warnLoadFailure("capability commands", err);
@@ -2566,7 +2592,7 @@ async function registerCapabilityCommands() {
2566
2592
  }
2567
2593
  async function registerSyncCommand() {
2568
2594
  try {
2569
- const { registerSync } = await import("./sync-SU33KYX7.js");
2595
+ const { registerSync } = await import("./sync-7PP6KQ75.js");
2570
2596
  registerSync(program);
2571
2597
  } catch (err) {
2572
2598
  warnLoadFailure("sync commands", err);
@@ -2574,7 +2600,7 @@ async function registerSyncCommand() {
2574
2600
  }
2575
2601
  async function registerModelCommand() {
2576
2602
  try {
2577
- const { registerModel } = await import("./model-SBV2JFJI.js");
2603
+ const { registerModel } = await import("./model-DPJHSD73.js");
2578
2604
  registerModel(program);
2579
2605
  } catch (err) {
2580
2606
  warnLoadFailure("model commands", err);
@@ -2582,13 +2608,17 @@ async function registerModelCommand() {
2582
2608
  }
2583
2609
  async function registerUpdateCommand() {
2584
2610
  try {
2585
- const { registerUpdate } = await import("./update-EEUTEI6R.js");
2611
+ const { registerUpdate } = await import("./update-AX66IFMJ.js");
2586
2612
  registerUpdate(program);
2587
2613
  } catch (err) {
2588
2614
  warnLoadFailure("update commands", err);
2589
2615
  }
2590
2616
  }
2591
2617
  async function main() {
2618
+ setExternalCliTokenFile(globalOptionValue(process.argv.slice(2), "--cli-token-file"));
2619
+ if (!process.argv.slice(2).some((arg) => ["--help", "-h", "--version", "-V"].includes(arg))) {
2620
+ readExternalCliToken(globalOptionValue(process.argv.slice(2), "--host"));
2621
+ }
2592
2622
  const pkgInfo = getLocalCliPackageInfo();
2593
2623
  if (!isRootUpdateCommand(process.argv.slice(2))) {
2594
2624
  const compat = await runHostCompatCheck(
@@ -2629,7 +2659,13 @@ async function main() {
2629
2659
  rejectUnknownHelpCommandPath(program, process.argv.slice(2));
2630
2660
  await parseProgram(program);
2631
2661
  }
2632
- await main();
2662
+ try {
2663
+ await main();
2664
+ } catch (error) {
2665
+ if (!(error instanceof ExternalCliTokenError) && !(error instanceof CliValidationError)) throw error;
2666
+ printError(error instanceof ExternalCliTokenError ? "config" : "validation", error.message, error.hint, error.code);
2667
+ process.exitCode = 1;
2668
+ }
2633
2669
  function rejectUnknownHelpCommandPath(root, args) {
2634
2670
  if (!args.includes("--help") && !args.includes("-h")) {
2635
2671
  return;
@@ -2662,15 +2698,23 @@ function optionConsumesValue(token) {
2662
2698
  if (token.includes("=")) {
2663
2699
  return false;
2664
2700
  }
2665
- return token === "--host" || token === "--mcp-url" || token === "--format" || token === "--jq" || token === "--agent-context";
2701
+ return token === "--host" || token === "--cli-token-file" || token === "--mcp-url" || token === "--format" || token === "--jq" || token === "--agent-context";
2666
2702
  }
2667
2703
  function globalOptionValue(args, option) {
2704
+ let value;
2668
2705
  for (let i = 0; i < args.length; i += 1) {
2669
2706
  const token = args[i];
2670
- if (token === option) return args[i + 1];
2671
- if (token.startsWith(`${option}=`)) return token.slice(option.length + 1);
2707
+ if (token === "--") break;
2708
+ if (optionConsumesValue(token)) {
2709
+ const next = args[i + 1];
2710
+ if (next === void 0) {
2711
+ throw new CliValidationError(`${token} requires a value.`, { code: "MISSING_OPTION_VALUE" });
2712
+ }
2713
+ if (token === option) value = next;
2714
+ i += 1;
2715
+ } else if (token.startsWith(`${option}=`)) value = token.slice(option.length + 1);
2672
2716
  }
2673
- return void 0;
2717
+ return value;
2674
2718
  }
2675
2719
  function isRootUpdateCommand(args) {
2676
2720
  for (let i = 0; i < args.length; i += 1) {
@@ -2,7 +2,7 @@ import { createRequire as __createRequire } from 'node:module'; const require =
2
2
  import {
3
3
  LocalDataUploadError,
4
4
  logger
5
- } from "./chunk-WNGFSIOB.js";
5
+ } from "./chunk-ZW4VMY5H.js";
6
6
 
7
7
  // src/core/local-data-upload-client.ts
8
8
  import { createHash } from "crypto";
@@ -4,18 +4,18 @@ import {
4
4
  getMemoryCli,
5
5
  patchMemoryCli,
6
6
  postMemoryCli
7
- } from "./chunk-D6ACFILC.js";
7
+ } from "./chunk-GI5BMEZO.js";
8
8
  import {
9
9
  currentAgentSpaceId
10
10
  } from "./chunk-RK6GLDGI.js";
11
- import "./chunk-4655PUNX.js";
12
- import "./chunk-PLE722AJ.js";
11
+ import "./chunk-JJJIP2XQ.js";
12
+ import "./chunk-2UWS5CUP.js";
13
13
  import "./chunk-Y74WTIKJ.js";
14
- import "./chunk-GIK6EDUG.js";
15
- import "./chunk-UQ77JXYH.js";
14
+ import "./chunk-P7KL7IOH.js";
15
+ import "./chunk-LMCYSVVA.js";
16
16
  import {
17
17
  CliValidationError
18
- } from "./chunk-WNGFSIOB.js";
18
+ } from "./chunk-ZW4VMY5H.js";
19
19
 
20
20
  // src/commands/memory/shared.ts
21
21
  var MEMORY_SERVICE = "memory";
@@ -1,19 +1,19 @@
1
1
  import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
2
2
  import {
3
3
  withAsyncArtifactLifecycle
4
- } from "./chunk-XCHAYMSF.js";
4
+ } from "./chunk-UF244C5C.js";
5
5
  import {
6
6
  createCapabilityCommand
7
- } from "./chunk-KAEHZZH4.js";
8
- import "./chunk-EOYSKMXN.js";
7
+ } from "./chunk-UJ7UPRXK.js";
8
+ import "./chunk-QW3R6O7L.js";
9
9
  import {
10
10
  registerCapabilityGatewayRoute
11
11
  } from "./chunk-KPQY44JQ.js";
12
- import "./chunk-KFNMQTZI.js";
12
+ import "./chunk-ELCR235M.js";
13
13
  import "./chunk-Y74WTIKJ.js";
14
- import "./chunk-GIK6EDUG.js";
15
- import "./chunk-UQ77JXYH.js";
16
- import "./chunk-WNGFSIOB.js";
14
+ import "./chunk-P7KL7IOH.js";
15
+ import "./chunk-LMCYSVVA.js";
16
+ import "./chunk-ZW4VMY5H.js";
17
17
 
18
18
  // src/commands/metadata/shared.ts
19
19
  function createCapabilityCommand2(config) {
@@ -134,7 +134,7 @@ var dataTableDownload = createCapabilityCommand2({
134
134
  { name: "project-id", type: "number", required: true, desc: "Numeric project ID.", alias: "p" },
135
135
  { name: "data-table-id", type: "number", required: true, desc: "Data table ID." },
136
136
  { name: "request-id", type: "string", required: false, desc: "Optional request ID. Format: cli_<32 lowercase hex>." },
137
- { name: "timeout-seconds", type: "number", required: false, desc: "Export timeout seconds. Default and max: 21600 (6 hours).", min: 1, max: 21600 }
137
+ { name: "timeout-seconds", type: "number", required: false, desc: "Export runtime in seconds. Omit to use the server default (usually 21600 / 6 hours). This CLI accepts explicit values up to 21600; inspect the capability for the server default/max and use capability run for larger allowed values.", min: 1, max: 21600 }
138
138
  ],
139
139
  risk: "read",
140
140
  buildInput: (ctx) => ({
@@ -15,11 +15,11 @@ import {
15
15
  getClaudeConfigDir,
16
16
  getSandboxModels,
17
17
  postSandboxModelSelection
18
- } from "./chunk-PLE722AJ.js";
18
+ } from "./chunk-2UWS5CUP.js";
19
19
  import "./chunk-Y74WTIKJ.js";
20
- import "./chunk-GIK6EDUG.js";
21
- import "./chunk-UQ77JXYH.js";
22
- import "./chunk-WNGFSIOB.js";
20
+ import "./chunk-P7KL7IOH.js";
21
+ import "./chunk-LMCYSVVA.js";
22
+ import "./chunk-ZW4VMY5H.js";
23
23
 
24
24
  // src/commands/model/index.ts
25
25
  import { existsSync, readFileSync } from "fs";
@@ -1,16 +1,16 @@
1
1
  import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
2
2
  import {
3
3
  createCapabilityCommand
4
- } from "./chunk-KAEHZZH4.js";
5
- import "./chunk-EOYSKMXN.js";
4
+ } from "./chunk-UJ7UPRXK.js";
5
+ import "./chunk-QW3R6O7L.js";
6
6
  import {
7
7
  registerCapabilityGatewayRoute
8
8
  } from "./chunk-KPQY44JQ.js";
9
- import "./chunk-KFNMQTZI.js";
9
+ import "./chunk-ELCR235M.js";
10
10
  import "./chunk-Y74WTIKJ.js";
11
- import "./chunk-GIK6EDUG.js";
12
- import "./chunk-UQ77JXYH.js";
13
- import "./chunk-WNGFSIOB.js";
11
+ import "./chunk-P7KL7IOH.js";
12
+ import "./chunk-LMCYSVVA.js";
13
+ import "./chunk-ZW4VMY5H.js";
14
14
 
15
15
  // src/commands/personal-semantic-preference/shared.ts
16
16
  function createPersonalSemanticPreferenceCommand(config) {
@@ -3,22 +3,22 @@ import {
3
3
  assertOutputPathAvailable,
4
4
  downloadAnalysisArtifact,
5
5
  withAsyncArtifactLifecycle
6
- } from "./chunk-XCHAYMSF.js";
6
+ } from "./chunk-UF244C5C.js";
7
7
  import {
8
8
  CapabilityGatewayError,
9
9
  dryRunCapability,
10
10
  executeCapabilityWithEnvelope,
11
11
  validateCapability
12
- } from "./chunk-EOYSKMXN.js";
12
+ } from "./chunk-QW3R6O7L.js";
13
13
  import {
14
14
  registerCapabilityGatewayRoute,
15
15
  resolveGatewayDomain
16
16
  } from "./chunk-KPQY44JQ.js";
17
- import "./chunk-KFNMQTZI.js";
17
+ import "./chunk-ELCR235M.js";
18
18
  import "./chunk-Y74WTIKJ.js";
19
- import "./chunk-GIK6EDUG.js";
20
- import "./chunk-UQ77JXYH.js";
21
- import "./chunk-WNGFSIOB.js";
19
+ import "./chunk-P7KL7IOH.js";
20
+ import "./chunk-LMCYSVVA.js";
21
+ import "./chunk-ZW4VMY5H.js";
22
22
 
23
23
  // src/commands/project-semantic/asset-package/materializer.ts
24
24
  import { createHash, randomBytes } from "crypto";
@@ -24,8 +24,8 @@ import {
24
24
  } from "./chunk-RK6GLDGI.js";
25
25
  import {
26
26
  require_lib
27
- } from "./chunk-CT7QDJS6.js";
28
- import "./chunk-S6M42KND.js";
27
+ } from "./chunk-2IYIYSUO.js";
28
+ import "./chunk-T44M3PLZ.js";
29
29
  import {
30
30
  TeAgentApiError,
31
31
  TeAgentCredentialsError,
@@ -33,16 +33,16 @@ import {
33
33
  postSandboxSyncPull,
34
34
  postToMainApp,
35
35
  uploadToMainApp
36
- } from "./chunk-PLE722AJ.js";
36
+ } from "./chunk-2UWS5CUP.js";
37
37
  import {
38
38
  printError
39
- } from "./chunk-KFNMQTZI.js";
39
+ } from "./chunk-ELCR235M.js";
40
40
  import "./chunk-Y74WTIKJ.js";
41
- import "./chunk-GIK6EDUG.js";
42
- import "./chunk-UQ77JXYH.js";
41
+ import "./chunk-P7KL7IOH.js";
42
+ import "./chunk-LMCYSVVA.js";
43
43
  import {
44
44
  __toESM
45
- } from "./chunk-WNGFSIOB.js";
45
+ } from "./chunk-ZW4VMY5H.js";
46
46
 
47
47
  // src/commands/sync/index.ts
48
48
  var import_jszip = __toESM(require_lib(), 1);