@thinkingai/ae-cli 6.1.44 → 6.1.45

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 (40) hide show
  1. package/README.md +2 -0
  2. package/README.zh.md +2 -0
  3. package/cli-installation-guide.md +13 -9
  4. package/dist/{ai-monitor-4VPHXQTL.js → ai-monitor-CAK6LX3J.js} +4 -4
  5. package/dist/ai-monitor.js +5 -5
  6. package/dist/{auth-RDSS2LUT.js → auth-CARBYPT2.js} +3 -3
  7. package/dist/{capability-CUOEIB5F.js → capability-CD2TODQN.js} +2 -2
  8. package/dist/{chunk-3FSYICDW.js → chunk-6SXMN2HQ.js} +1 -1
  9. package/dist/{chunk-TFEGYB4X.js → chunk-DR6IAQLM.js} +1 -1
  10. package/dist/{chunk-3TV24AVQ.js → chunk-FN4Y4XQG.js} +3 -3
  11. package/dist/{chunk-IAZ4AMVY.js → chunk-GXHCY75L.js} +145 -84
  12. package/dist/{chunk-LSELMDKQ.js → chunk-P56F3AO6.js} +1 -1
  13. package/dist/{chunk-BFSWGXM2.js → chunk-PHQHSCUW.js} +1 -1
  14. package/dist/{chunk-4MOCV6HU.js → chunk-PIZBBGBC.js} +1 -1
  15. package/dist/{compat-check-L3C7HCVG.js → compat-check-YXTLKMRM.js} +1 -1
  16. package/dist/{config-LAF5MMYK.js → config-5LO3IDS5.js} +3 -3
  17. package/dist/index.js +22 -21
  18. package/dist/{metadata-T6HYAU7E.js → metadata-JAN6NDRD.js} +4 -4
  19. package/dist/{personal-semantic-preference-WCZBOA7V.js → personal-semantic-preference-5FWTTPZW.js} +3 -3
  20. package/dist/{project-semantic-WW5AZST3.js → project-semantic-ZWDZ6RUS.js} +3 -3
  21. package/dist/{sync-6PL25V42.js → sync-WCN2LED5.js} +2 -2
  22. package/dist/{te-analysis-KKRECQ7F.js → te-analysis-OU3EUF3U.js} +106 -7
  23. package/dist/{te-community-6RGX7IWH.js → te-community-RWUUPHQJ.js} +3 -3
  24. package/dist/{te-dataops-RSPBC6WJ.js → te-dataops-RPKBT3JE.js} +2 -2
  25. package/dist/{te-engage-FIPP5L2Z.js → te-engage-4NZ26PAP.js} +3 -3
  26. package/dist/{te-experiment-KQ5CBYKI.js → te-experiment-PQD3SIKN.js} +3 -3
  27. package/dist/{te-kb-XYSDXZUG.js → te-kb-NX7E4CTY.js} +2 -2
  28. package/dist/{te-team-R6MZ4RK2.js → te-team-GMEOSXKP.js} +2 -2
  29. package/dist/{update-C6G4P3C7.js → update-273NPGJJ.js} +2 -2
  30. package/dist/{web-runtime-UGKPTBOK.js → web-runtime-ULVLVEJ4.js} +90 -38
  31. package/package.json +2 -2
  32. package/skills/ae-onboarding/SKILL.md +26 -14
  33. package/skills/ae-onboarding/references/about-ae.md +28 -6
  34. package/skills/ae-onboarding/references/business-data.md +3 -3
  35. package/skills/ae-onboarding/references/demo-journey.md +4 -2
  36. package/skills/ae-onboarding/references/demo-operations.md +14 -5
  37. package/skills/ae-onboarding/references/member_invitation_send.md +21 -0
  38. package/skills/ae-onboarding/references/onboarding_growth.md +3 -5
  39. package/skills/ae-onboarding/references/onboarding_run.md +31 -5
  40. package/skills/ae-onboarding/references/presentation.md +18 -18
@@ -25,15 +25,18 @@ import {
25
25
  OVERSEAS_TEST_PRODUCT_HOSTNAME,
26
26
  OVERSEAS_TEST_WEBSITE_ORIGIN,
27
27
  RUN_BUDGET_MS,
28
+ US_ONBOARDING_LANGUAGE,
28
29
  UUID_PATTERN,
29
30
  WEBSITE_MARKETS,
30
31
  bootstrapOrigin,
31
32
  claimBootstrapDevice,
32
33
  cliEntrySource,
33
34
  createBootstrap,
35
+ existingAccountOptions,
34
36
  fetchCliConfig,
35
37
  isOnboardingProgressHost,
36
38
  isProductionWebsiteOrigin,
39
+ isUsOnboarding,
37
40
  isWebsiteMarket,
38
41
  localRegistrationLanguage,
39
42
  normalizeRegistrationLanguage,
@@ -58,7 +61,7 @@ import {
58
61
  websiteEnvironment,
59
62
  websiteOrigin,
60
63
  writeProgress
61
- } from "./chunk-IAZ4AMVY.js";
64
+ } from "./chunk-GXHCY75L.js";
62
65
  import {
63
66
  CapabilityGatewayError,
64
67
  executeCapability,
@@ -499,6 +502,20 @@ import { randomUUID } from "crypto";
499
502
  import path2 from "path";
500
503
  var PROJECT_INFO = "project.info.get";
501
504
  var APPROVER_ADD = "experiment.approver.add";
505
+ function renderPlanPreview(control, treatment, currency, us) {
506
+ const amount = (price) => us ? `$${price}` : `${price} ${currency}`;
507
+ return [
508
+ "| A \xB7 Control | B \xB7 Treatment |",
509
+ "| --- | --- |",
510
+ `| ${control.name} | ${treatment.name} |`,
511
+ `| ${amount(control.price)} \xB7 ${control.allocation}% | ${amount(treatment.price)} \xB7 ${treatment.allocation}% |`
512
+ ].join("\n");
513
+ }
514
+ function validateSavedDemoPlanCurrency(host, market, currency) {
515
+ if (isUsOnboarding(host, market) && currency !== "USD") {
516
+ throw new Error("This saved Demo draft does not use USD. Create a new draft to continue.");
517
+ }
518
+ }
502
519
  function readActivePlan(store, deps, input) {
503
520
  const { session_id: sessionId, run_id: runId } = input;
504
521
  if (!sessionId || !UUID_PATTERN.test(sessionId) || !runId || !/^[0-9a-f]{32}$/.test(runId)) {
@@ -511,14 +528,23 @@ function readActivePlan(store, deps, input) {
511
528
  if (!plan || plan.phase !== "ready" || plan.session_id !== session.id || plan.run_id !== runId || !session.host || plan.host !== session.host || session.choice !== "demo" || !scope || plan.sample_id !== session.sample_id || plan.sample_id !== scope.sample_id || plan.item_id !== scope.item_id || plan.demo_project_id !== scope.project_id || !session.credential_key || session.requires_auth || plan.credential_key !== session.credential_key || deps.credentialKey(session.host) !== session.credential_key) {
512
529
  throw new Error("The saved experiment plan does not match the active Demo session and account.");
513
530
  }
514
- return { file, plan };
531
+ const market = deps.webMarket ?? session.region;
532
+ validateSavedDemoPlanCurrency(session.host, market, plan.plan?.currency);
533
+ return { file, plan, us: isUsOnboarding(session.host, market) };
515
534
  }
516
- function publicPlan(plan) {
535
+ function publicPlan(plan, us) {
517
536
  const { checkout_cohort: _cohort, credential_key: _key, ...review } = plan;
537
+ if (us && typeof review.plan_preview_markdown === "string") {
538
+ const control = plan.plan?.arms?.find((arm) => arm.role === "control");
539
+ const treatment = plan.plan?.arms?.find((arm) => arm.role === "treatment");
540
+ if (control && treatment) review.plan_preview_markdown = renderPlanPreview(control, treatment, "USD", us);
541
+ else delete review.plan_preview_markdown;
542
+ }
518
543
  return plan.approver?.status === "deferred" ? { ...review, interaction: onboardingDraftReviewInteraction(plan.answered_questions) } : review;
519
544
  }
520
545
  function readOnboardingExperimentPlan(store, deps, input) {
521
- return publicPlan(readActivePlan(store, deps, input).plan);
546
+ const { plan, us } = readActivePlan(store, deps, input);
547
+ return publicPlan(plan, us);
522
548
  }
523
549
  function recordAnsweredQuestion(store, deps, input, preview) {
524
550
  const { session_id: sessionId, answered_question: question } = input;
@@ -529,12 +555,12 @@ function recordAnsweredQuestion(store, deps, input, preview) {
529
555
  throw new Error("Use --answered-question review_audience, review_pilot, or review_no_reward.");
530
556
  }
531
557
  const update = () => {
532
- const { file, plan } = readActivePlan(store, deps, input);
558
+ const { file, plan, us } = readActivePlan(store, deps, input);
533
559
  if (plan.approver?.status !== "deferred") throw new Error("Only a plan saved with --draft-only supports review questions.");
534
560
  const answered = plan.answered_questions ?? [];
535
561
  const updated = answered.includes(question) ? plan : { ...plan, answered_questions: [...answered, question] };
536
562
  if (!preview && updated !== plan) store.write(file, updated);
537
- const result = publicPlan(updated);
563
+ const result = publicPlan(updated, us);
538
564
  return preview ? { ...result, dry_run: true } : result;
539
565
  };
540
566
  return preview ? update() : store.locked(`session:${sessionId}`, async () => update());
@@ -571,7 +597,7 @@ async function runOnboardingExperimentPlan(store, deps, input, preview) {
571
597
  session_id: sessionId,
572
598
  host: session.host ?? null,
573
599
  sample_id: session.sample_id ?? null,
574
- currency: deps.demoCurrency(session.host, session.region),
600
+ currency: deps.demoCurrency(session.host, deps.webMarket ?? session.region),
575
601
  ...input.scenario ? { scenario } : {},
576
602
  capabilities: [
577
603
  ...session.ready_demo ? [] : [DEMO_STATUS],
@@ -614,7 +640,8 @@ async function runOnboardingExperimentPlan(store, deps, input, preview) {
614
640
  throw new Error("The active Demo sample and item have no supported experiment preset.");
615
641
  }
616
642
  const preset = experiment_preset_default.experimentTypes[scenario];
617
- const currency = deps.demoCurrency(host, session.region);
643
+ const market = deps.webMarket ?? session.region;
644
+ const currency = deps.demoCurrency(host, market);
618
645
  const checkoutCohort = scenario === CHECKOUT_RECOVERY ? readCheckoutRecoveryCohort(store, session, scope) : void 0;
619
646
  if (scenario === CHECKOUT_RECOVERY && !checkoutCohort) {
620
647
  return {
@@ -672,12 +699,7 @@ async function runOnboardingExperimentPlan(store, deps, input, preview) {
672
699
  }
673
700
  };
674
701
  const { control, treatment } = preset.arms;
675
- const planPreviewMarkdown = [
676
- "| A \xB7 Control | B \xB7 Treatment |",
677
- "| --- | --- |",
678
- `| ${control.name} | ${treatment.name} |`,
679
- `| ${control.price} ${currency} \xB7 ${control.allocation}% | ${treatment.price} ${currency} \xB7 ${treatment.allocation}% |`
680
- ].join("\n");
702
+ const planPreviewMarkdown = renderPlanPreview(control, treatment, currency, isUsOnboarding(host, market));
681
703
  const file = `experiment-plan-${runId}.json`;
682
704
  const planPath = path2.resolve(store.directory, file);
683
705
  const savePlan = (plan) => store.write(file, {
@@ -849,7 +871,7 @@ function isApprovalBlocker(error) {
849
871
  }
850
872
  var SUBSCRIPTION_RETRY_DELAYS_MS = [500, 1e3, 1500, 2e3, 3e3, 4e3];
851
873
  function matchesMetric(item, metric) {
852
- return item?.metric_id === metric.metricId && item.format === metric.format && item.metric_purpose === metric.metricPurpose && isDeepStrictEqual(item.metric_definition, metric.metricDefinition);
874
+ return item?.metric_id === metric.metricId && item.format === metric.format && item.metric_purpose === metric.metricPurpose && isDeepStrictEqual(structuredClone(item.metric_definition), metric.metricDefinition);
853
875
  }
854
876
  async function runOnboardingExperimentLaunch(store, deps, input, preview) {
855
877
  const { session_id: sessionId, run_id: runId } = input;
@@ -866,6 +888,7 @@ async function runOnboardingExperimentLaunch(store, deps, input, preview) {
866
888
  }
867
889
  const host = trustedProductHost(session.host);
868
890
  const project = { project_id: scope.project_id };
891
+ validateSavedDemoPlanCurrency(host, deps.webMarket ?? session.region, plan.plan?.currency);
869
892
  const currency = plan.plan?.currency ?? "CNY";
870
893
  if (currency !== "CNY" && currency !== "USD") throw new Error("The saved Demo plan has an unsupported currency.");
871
894
  const checkoutCohort = plan.experiment_type === CHECKOUT_RECOVERY ? plan.checkout_cohort : void 0;
@@ -1427,7 +1450,7 @@ var defaults = {
1427
1450
  authorize: authorizeLoginDevice,
1428
1451
  poll: (issuer, code, signal) => pollDeviceToken(issuer, code, code.startsWith("uba_") ? "uba" : "legacy", signal),
1429
1452
  async persist(host, tokens, signal) {
1430
- const { persistDeviceTokens, activateHostAfterLogin } = await import("./auth-RDSS2LUT.js");
1453
+ const { persistDeviceTokens, activateHostAfterLogin } = await import("./auth-CARBYPT2.js");
1431
1454
  await persistDeviceTokens(host, tokens, { signal, checkCompatibility: false });
1432
1455
  activateHostAfterLogin(host, host);
1433
1456
  },
@@ -1466,7 +1489,8 @@ var OnboardingRuntime = class {
1466
1489
  return progress2;
1467
1490
  }
1468
1491
  if (!/^[0-9a-f]{32}$/.test(input.run_id)) throw new Error("Pass the run ID returned by experiment-plan.");
1469
- const { receipt: _receipt, ...progress } = await verifyAndCompleteProgress(this.dependencies, host2, input.run_id);
1492
+ const market = this.dependencies.webMarket ?? this.store.session(void 0, host2)?.region;
1493
+ const { receipt: _receipt, ...progress } = await verifyAndCompleteProgress(this.dependencies, host2, input.run_id, market);
1470
1494
  return progress;
1471
1495
  }
1472
1496
  if ((action === "status" || action === "plan") && input.run_id) {
@@ -1514,11 +1538,17 @@ var OnboardingRuntime = class {
1514
1538
  const source = cliEntrySource(input.source ?? session?.source);
1515
1539
  const inspectLocalLanguage = !webConversation && !testHost && (action === "plan" || action === "run" && !host && !session);
1516
1540
  const localLanguage = inspectLocalLanguage ? localRegistrationLanguage() : void 0;
1517
- const language = registrationLanguage(input.language ?? session?.language ?? localLanguage);
1541
+ const requestedLanguage = registrationLanguage(input.language ?? session?.language ?? localLanguage);
1518
1542
  const markets = testHost ? OVERSEAS_TEST_MARKETS : WEBSITE_MARKETS;
1519
- const languageMarket = registrationMarket(language);
1520
- const defaultMarket = testHost && languageMarket === "cn" ? "us" : languageMarket;
1521
- const useDefaultMarket = testHost !== void 0 || !host;
1543
+ const languageMarket = registrationMarket(requestedLanguage);
1544
+ const inferredMarket = testHost && languageMarket === "cn" ? "us" : languageMarket;
1545
+ const unboundMarket = testHost || !host ? inferredMarket : void 0;
1546
+ const selectedMarket = input.region ?? session?.region;
1547
+ const us = isUsOnboarding(host, this.dependencies.webMarket ?? selectedMarket ?? unboundMarket);
1548
+ const language = us ? US_ONBOARDING_LANGUAGE : requestedLanguage;
1549
+ const defaultMarket = us ? "us" : inferredMarket;
1550
+ const useDefaultMarket = Boolean(unboundMarket) || us && !webConversation;
1551
+ const languageSource = us || input.language ? "explicit" : "system";
1522
1552
  const registrationOrigin = webConversation ? null : websiteOrigin(input.region ?? session?.region ?? defaultMarket, selectedWebsiteEnv);
1523
1553
  if (action === "plan") return {
1524
1554
  dry_run: true,
@@ -1527,6 +1557,7 @@ var OnboardingRuntime = class {
1527
1557
  language,
1528
1558
  default_market: defaultMarket,
1529
1559
  ...localLanguage ? { local_language: localLanguage } : {},
1560
+ ...!webConversation && !testHost && !explicitHost && !input.region && !input.session_id ? { existing_account_options: existingAccountOptions(localLanguage) } : {},
1530
1561
  device_market: testHost ? "us" : onboardingDeviceMarket(webConversation ? registrationLanguage() : localLanguage),
1531
1562
  markets,
1532
1563
  selection_source: input.region ? "explicit" : session?.region_source ?? (session?.region ? "saved" : useDefaultMarket ? "language_default" : "existing_host"),
@@ -1546,7 +1577,7 @@ var OnboardingRuntime = class {
1546
1577
  source,
1547
1578
  region: market ?? (useDefaultMarket ? defaultMarket : void 0),
1548
1579
  language,
1549
- language_source: input.language ? "explicit" : "system",
1580
+ language_source: languageSource,
1550
1581
  website_env: selectedWebsiteEnv,
1551
1582
  region_source: market ? "explicit" : useDefaultMarket ? "language_default" : void 0,
1552
1583
  ...testHost ? { requires_auth: true } : {},
@@ -1564,7 +1595,7 @@ var OnboardingRuntime = class {
1564
1595
  if (session.region) session.region_source = input.region ? "explicit" : "language_default";
1565
1596
  }
1566
1597
  session.language = language;
1567
- if (input.language) session.language_source = "explicit";
1598
+ if (languageSource === "explicit") session.language_source = languageSource;
1568
1599
  session.source = source;
1569
1600
  session.website_env ??= selectedWebsiteEnv;
1570
1601
  session.browser = browserMode;
@@ -1838,15 +1869,36 @@ var OnboardingRuntime = class {
1838
1869
  }
1839
1870
  }
1840
1871
  if (session.device) {
1841
- if (action === "status" && Date.parse(session.device.expires_at) <= this.dependencies.now()) return summary({ phase: "waiting_user", next_action: "reauthorize_cli", login_recovery_url: session.bootstrap?.login_url, poll_after_ms: 0 });
1842
- if (action === "status") return summary({ phase: "waiting_user", next_action: "approve_device", verification_url: session.device.verification_url, login_recovery_url: session.bootstrap?.login_url, poll_after_ms: session.device.interval_ms });
1843
- if (Date.parse(session.device.expires_at) <= this.dependencies.now()) {
1872
+ const device2 = session.device;
1873
+ const waitForDevice = (pollAfterMs) => {
1874
+ let verificationUrl = device2.verification_url;
1875
+ if (isUsOnboarding(session.host, session.region)) {
1876
+ const target = new URL(verificationUrl);
1877
+ target.searchParams.set("locale", US_ONBOARDING_LANGUAGE);
1878
+ verificationUrl = target.href;
1879
+ if (action === "run" && verificationUrl !== device2.verification_url) {
1880
+ device2.verification_url = verificationUrl;
1881
+ this.store.save(session);
1882
+ open(verificationUrl, "device_authorization");
1883
+ }
1884
+ }
1885
+ return summary({
1886
+ phase: "waiting_user",
1887
+ next_action: "approve_device",
1888
+ verification_url: verificationUrl,
1889
+ login_recovery_url: session.bootstrap?.login_url,
1890
+ poll_after_ms: pollAfterMs
1891
+ });
1892
+ };
1893
+ if (action === "status" && Date.parse(device2.expires_at) <= this.dependencies.now()) return summary({ phase: "waiting_user", next_action: "reauthorize_cli", login_recovery_url: session.bootstrap?.login_url, poll_after_ms: 0 });
1894
+ if (action === "status") return waitForDevice(device2.interval_ms);
1895
+ if (Date.parse(device2.expires_at) <= this.dependencies.now()) {
1844
1896
  delete session.device;
1845
1897
  this.store.save(session);
1846
1898
  } else {
1847
- if (session.device.host !== session.host) throw new Error("The device session belongs to another host.");
1848
- if (this.dependencies.now() < session.device.next_poll_at) return summary({ phase: "waiting_user", next_action: "approve_device", verification_url: session.device.verification_url, login_recovery_url: session.bootstrap?.login_url, poll_after_ms: session.device.next_poll_at - this.dependencies.now() });
1849
- const result = await network((signal) => this.dependencies.poll(session.device.base_url, session.device.device_code, signal));
1899
+ if (device2.host !== session.host) throw new Error("The device session belongs to another host.");
1900
+ if (this.dependencies.now() < device2.next_poll_at) return waitForDevice(device2.next_poll_at - this.dependencies.now());
1901
+ const result = await network((signal) => this.dependencies.poll(device2.base_url, device2.device_code, signal));
1850
1902
  if (result.status === "approved") {
1851
1903
  await network((signal) => this.dependencies.persist(session.host, result.tokens, signal));
1852
1904
  delete session.device;
@@ -1862,10 +1914,10 @@ var OnboardingRuntime = class {
1862
1914
  return summary({ phase: "waiting_user", next_action: "reauthorize_cli", login_recovery_url: session.bootstrap?.login_url, poll_after_ms: 0 });
1863
1915
  }
1864
1916
  if (result.status === "denied" || result.status === "unsupported") return summary({ phase: "action_required", next_action: "review_cli_authorization", code: result.status === "denied" ? result.code : "DEVICE_AUTH_UNSUPPORTED", poll_after_ms: 0 });
1865
- if (result.status === "slow_down") session.device.interval_ms += 5e3;
1866
- session.device.next_poll_at = this.dependencies.now() + session.device.interval_ms;
1917
+ if (result.status === "slow_down") device2.interval_ms += 5e3;
1918
+ device2.next_poll_at = this.dependencies.now() + device2.interval_ms;
1867
1919
  this.store.save(session);
1868
- return summary({ phase: "waiting_user", next_action: "approve_device", verification_url: session.device.verification_url, login_recovery_url: session.bootstrap?.login_url, poll_after_ms: session.device.interval_ms });
1920
+ return waitForDevice(device2.interval_ms);
1869
1921
  }
1870
1922
  }
1871
1923
  if (action === "status") {
@@ -2098,9 +2150,13 @@ async function invokeOnboarding(action, input) {
2098
2150
  if (session?.credential_key && session.credential_key !== key) {
2099
2151
  throw new Error("The current AE account does not match the onboarding session.");
2100
2152
  }
2153
+ const languageMarket = registrationMarket(registrationLanguage(input.language ?? session?.language));
2154
+ const overseasMarket = languageMarket === "cn" ? "us" : languageMarket;
2155
+ const market = actor.market ?? (actor.platformRegion === "overseas" ? overseasMarket : actor.platformRegion) ?? (isUsOnboarding(host) ? "us" : void 0);
2101
2156
  const runtime = new OnboardingRuntime(store, {
2102
2157
  webConversation: true,
2103
- demoCurrency: () => onboardingDemoCurrency(host),
2158
+ webMarket: market,
2159
+ demoCurrency: () => market === "us" ? "USD" : onboardingDemoCurrency(host),
2104
2160
  activeHost: () => SESSION_HOST,
2105
2161
  authenticated: (scope) => scope === SESSION_HOST,
2106
2162
  credentialKey: (scope) => scope === SESSION_HOST ? key : void 0,
@@ -2115,11 +2171,7 @@ async function invokeOnboarding(action, input) {
2115
2171
  });
2116
2172
  const output = await runtime.invoke(action, input);
2117
2173
  if (output.host === SESSION_HOST) output.host = null;
2118
- if (typeof output.language === "string") {
2119
- const languageMarket = registrationMarket(registrationLanguage(output.language));
2120
- const overseasMarket = languageMarket === "cn" ? "us" : languageMarket;
2121
- output.product_resource_market = actor.market ?? (actor.platformRegion === "overseas" ? overseasMarket : actor.platformRegion ?? null);
2122
- }
2174
+ if (typeof output.language === "string") output.product_resource_market = market ?? null;
2123
2175
  return output;
2124
2176
  }
2125
2177
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkingai/ae-cli",
3
- "version": "6.1.44",
3
+ "version": "6.1.45",
4
4
  "description": "CLI tool for ThinkingAI (AE) analytics platform",
5
5
  "type": "module",
6
6
  "bin": {
@@ -108,7 +108,7 @@
108
108
  "verify:community-ux": "npm run build && npx tsx tests/community-ux.test.ts",
109
109
  "verify:community-evidence": "node --import tsx tests/community-evidence.test.ts",
110
110
  "verify:businesses": "node --import tsx --test tests/business-config.test.ts tests/business-command-filter.test.ts tests/business-cli.test.ts tests/environment-refresh.test.ts tests/business-sandbox-boundary.test.ts tests/business-refresh-skills.test.ts",
111
- "verify:plg": "tsx --test tests/onboarding-v3.test.ts tests/onboarding-website-login.test.ts tests/onboarding-growth.test.ts tests/login-device-flow.test.ts tests/auth-device-command.test.ts tests/plg-engage-replay.test.ts"
111
+ "verify:plg": "tsx --test tests/onboarding-v3.test.ts tests/onboarding-website-login.test.ts tests/onboarding-growth.test.ts tests/login-device-flow.test.ts tests/auth-device-command.test.ts tests/plg-engage-replay.test.ts tests/member-invitation-command.test.ts"
112
112
  },
113
113
  "repository": {
114
114
  "type": "git",
@@ -1,20 +1,30 @@
1
1
  ---
2
2
  name: ae-onboarding
3
- version: 1.1.57
3
+ version: 1.1.65
4
4
  description: "Guide Demo growth analysis, business diagnosis, and A/B draft review in AE onboarding, and route business data integration in a local agent."
5
5
  metadata:
6
6
  internal: true
7
7
  ---
8
8
 
9
- Use this Skill for an explicitly started AE PLG session or the platform's active first-experience conversation. Retain the session ID returned by [`ae-cli analysis onboarding run`](references/onboarding_run.md) and use `--session-id` for all subsequent calls. To inspect progress, use [`ae-cli analysis onboarding status`](references/onboarding_status.md). Write summaries, chart labels and choices in the customer's conversation language. For Chinese use 星屿游戏 and 星光冒险礼包 for Star Island and its item, and 赛季通行证 for the second sample.
9
+ Use this Skill for an explicitly started AE PLG session or the platform's active first-experience conversation. Retain the session ID returned by [`ae-cli analysis onboarding run`](references/onboarding_run.md) and use `--session-id` for all subsequent calls. To inspect progress, use [`ae-cli analysis onboarding status`](references/onboarding_status.md).
10
+
11
+ ## Onboarding language and currency
12
+
13
+ For the United States market (`us`), use English (`en-US`) from the first account choice through completion, regardless of the conversation or device language. Use English for all visible guidance, choices, sample names, chart labels, drafts, reports, and link labels. Explain upstream errors in English. Pass `--language en-US` to `run` and keep it for the entire session. Treat `https://ae-web-global.thinkingai.io` as US when the request or session has no other confirmed market. A confirmed Japanese or Korean market on a shared host uses its own locale rules.
14
+
15
+ In US onboarding, display every monetary amount with `$` as its only currency marker, as in `$100`. Use [Demo currency checks](references/demo-operations.md#demo-currency) to verify the underlying USD data and format drafts, charts, experiment data, and reports.
16
+
17
+ For other markets, use the requested display language or the customer's conversation language. For Chinese use 星屿游戏 and 星光冒险礼包 for Star Island and its item, and 赛季通行证 for the second sample.
10
18
 
11
19
  For each user decision, show the result or context, then render the choice in the same turn. Use the values from `interaction.options` when present and follow [onboarding copy and charts](references/presentation.md) for the localized labels and inline Markdown charts. In Codex, prefer the blocking `request_user_input` when available and use `request_user_input_async` otherwise. In Claude Code, call `AskUserQuestion`. Use the equivalent native picker in other hosts. When a local picker returns before the user answers, use the host’s wait mechanism and keep the turn open until the user chooses or dismisses it. If the picker is unavailable or fails, ask the same question with its options in chat and resume on the user’s reply. Progress updates and actions that can proceed automatically require no choice.
12
20
 
13
21
  Use clickable text links for dashboards, evidence, experiment pages, official resources and contact pages. Explain briefly what to click and what it opens. Keep the picker for user decisions that advance the conversation.
14
22
 
15
- Use [inline Markdown charts](references/presentation.md#choose-and-render-a-chart) throughout the Demo, from the opening finding through the final report. Reuse the current result's `markdown_charts` when available.
23
+ Use the [inline Markdown layouts](references/presentation.md#choose-and-render-a-chart) throughout the Demo, from the opening finding through the final report. Reuse the current result's `markdown_charts` when they match the layout.
24
+
25
+ Use the [market-specific product resources](references/about-ae.md#product-resources) for the product introduction and completion links, with copy and labels in the onboarding language.
16
26
 
17
- Use the [market-specific product resources](references/about-ae.md#product-resources) for the product introduction and completion links. The conversation language determines the copy and link labels.
27
+ When the user requests CLI help or remains blocked after troubleshooting, show the [AE CLI support channels](references/about-ae.md#ae-cli-support) for their confirmed environment.
18
28
 
19
29
  Keep the verified report, its link, the completion greeting, and the market-specific website and contact links together in the final local reply. Follow the [completion format](references/demo-operations.md#choose-the-next-step) when the host displays choices separately.
20
30
 
@@ -24,9 +34,9 @@ For a single action, use a picker that supports one option. In Codex, use `reque
24
34
 
25
35
  When the platform identifies this as the active first-experience conversation, skip Login. At the start of the walkthrough, run `node <this-skill-directory>/scripts/web-journey.mjs active` from the current conversation directory. Use the existing sandbox CLI from that directory, omitting `--host`, `--region`, and `--website-env` from all commands. Reuse the same session ID. If the platform-provided identity or CLI is unavailable, explain that the experience cannot proceed. Do not install the CLI, open a login page, or switch credentials.
26
36
 
27
- Start with `ae-cli analysis onboarding run --language <locale> --format json` using the conversation language (`zh-CN`, `en-US`, `ja-JP`, or `ko-KR`). If the customer directly requests the Demo, add `--choice demo` and use the recommended sample unless they select another one. On `choose_experience`, show **Start the demo**, **See what ThinkingAI can do**, and **Not now** using the returned `interaction.options`. If the customer chooses **See what ThinkingAI can do** or asks what AE does before the Demo, show the [Web introduction and links](references/about-ae.md#web-onboarding), then return to that same picker. Pass `--choice demo` after the customer chooses **Start the demo**.
37
+ Start with `ae-cli analysis onboarding run --language <locale> --format json` using the onboarding language. Use the resolved `language` returned by the CLI for the visible response. If the customer directly requests the Demo, add `--choice demo` and use the recommended sample unless they select another one. On `choose_experience`, show **Start the demo**, **See what ThinkingAI can do**, and **Not now** using the returned `interaction.options`. If the customer chooses **See what ThinkingAI can do** or asks what AE does before the Demo, show the [Web introduction and links](references/about-ae.md#web-onboarding), then return to that same picker. Pass `--choice demo` after the customer chooses **Start the demo**.
28
38
 
29
- When the conversation language changes at the opening picker, run the same command with the current `--session-id` and new `--language`. During or after a Demo, use `ae-cli --dry-run analysis onboarding run --session-id <session-id> --language <locale> --format json` to refresh `product_resource_market` for the links. Carry the new language into subsequent `run` commands.
39
+ Outside the US market, when the conversation language changes at the opening picker, run the same command with the current `--session-id` and new `--language`. During or after a Demo, use `ae-cli --dry-run analysis onboarding run --session-id <session-id> --language <locale> --format json` to refresh `product_resource_market` for the links. Carry the onboarding language into subsequent `run` commands.
30
40
 
31
41
  For each choice, use the CLI result carrying `interaction` as the final tool call and end the reply with one fenced `options` block. Use one to five localized plain lines without numbering. When offering sample selection, first call `node <this-skill-directory>/scripts/web-journey.mjs choose-sample`. After giving follow-up recommendations, call the same script with `after-follow-up`. A choice is sent back as the user's message.
32
42
 
@@ -34,19 +44,21 @@ After verifying the experiment report, follow [the Web completion choices](refer
34
44
 
35
45
  ## Login
36
46
 
37
- For a local onboarding request, start with `ae-cli auth status --format json` on the requested or active host. If the user is signed in and wants to use that account, read [shared progress](references/onboarding_run.md#shared-progress) on that host. If there is no signed-in account and the user has left the account route open, show **Create an AE account** and **Sign in to my existing AE account** in the user's language, then wait for a choice. A host or market identifies the environment. The account choice determines when to open a browser or run a login command.
47
+ For a local onboarding request, start with `ae-cli auth status --format json` on the requested or active host. If the user is signed in and wants to use that account, read [shared progress](references/onboarding_run.md#shared-progress) on that host. When the account route is open, offer **Create an AE account** and **Sign in to my existing AE account** in the onboarding language and wait for the choice before starting a sign-in or signup command.
38
48
 
39
- When the user explicitly requests onboarding and needs a new account, offer **Create an AE account** and **Learn about AE** before starting website onboarding. Use the [localized labels](references/about-ae.md#localized-labels). If they choose **Learn about AE**, show the introduction and available product resources, then offer **Create an AE account**. Wait for the user to choose signup or request it directly before starting website onboarding. When resuming a session that already has a login page, follow the current login step.
49
+ When the user explicitly requests onboarding and needs a new account, offer **Create an AE account** and **Learn about AE** before starting website onboarding. Use the [localized labels](references/about-ae.md#localized-labels). If they choose **Learn about AE**, follow the [product introduction](references/about-ae.md), then offer **Create an AE account**. Wait for the user to choose signup or request it directly before starting website onboarding. When resuming a session that already has a login page, follow the current login step.
40
50
 
41
- After the user chooses signup, follow [website signup](references/onboarding_run.md#website-signup) to resolve the production market or use the requested overseas test market. Keep that market through login. Use the requested display language or the conversation language for the UI, and English for a neutral local welcome. Existing accounts use their original host.
51
+ After the choice, follow [free website signup](references/onboarding_run.md#website-signup) to resolve the free signup market, or [existing account sign-in](references/onboarding_run.md#existing-account-sign-in) to confirm the account's deployment and actual login address. Preserve a session that already has a sign-in page and keep its onboarding language.
42
52
 
43
53
  Follow `next_action` and the browser receipt. For `guide_existing_window`, direct the user to the page already opened in their system default browser. For `show_fallback_link` or a window the user cannot find, give the exact URL for that browser. For `complete_website_login`, show **I finished signing in** and **I need help signing in**. For `approve_device`, show **I approved CLI access** and **I need help authorizing the CLI**. Resume the same session when the user confirms. For `restart_website_login` or `reauthorize_cli`, show the returned recovery choice and **Not now**. If a matching older CLI returns `run_onboarding` with zero delay after claiming authorization, run once more in the same turn. On `choose_experience`, show the experience picker immediately.
44
54
 
55
+ When the user selects either help option, explain the current browser step and show the [AE CLI support channels](references/about-ae.md#ae-cli-support).
56
+
45
57
  After the user confirms signing in, if website authorization is `authorizing`, `approved`, or `claimed` but still settling, wait `poll_after_ms` and retry the same session within the current turn. Avoid asking them to confirm the same browser action again. Show the next picker as soon as the CLI returns it.
46
58
 
47
59
  ## Local agent experience
48
60
 
49
- After login, resume the user's original AE task if they signed in to perform it. For a walkthrough, tell them what the Demo will help them find, then show **Start the demo** first and **Learn about AE** second, using `demo_entry` when available. After the product introduction, return to the same choice. Pass `--choice demo` only after the user chooses or directly requests the Demo. Route a direct request to connect business data through [business data integration](references/business-data.md).
61
+ After login, resume the user's original AE task if they signed in to perform it. For a walkthrough, tell them what the Demo will help them find, then show **Start the demo** first and **Learn about AE** second, using `demo_entry` when available. After the [product introduction](references/about-ae.md), return to the same choice. Pass `--choice demo` only after the user chooses or directly requests the Demo. Route a direct request to connect business data through [business data integration](references/business-data.md).
50
62
 
51
63
  Follow the [local Demo journey](references/demo-journey.md) for project overviews, growth opportunities, and business diagnosis. A direct request for either existing growth scenario or the purchase funnel can go straight to its analysis. On `confirm_business_project`, show the returned candidate and pass `--confirm-business-project-id` after confirmation. On `resolve_business_project`, direct the user to AE to resolve the registration project. Use the project ID returned by AE.
52
64
 
@@ -61,21 +73,21 @@ On Web, show the [project overview](references/onboarding_growth.md#demo-overvie
61
73
 
62
74
  Run the selected growth scenario and retain it through follow-up and experiment planning. On `phase=ready`, show the finding, the [scenario-specific visual](references/onboarding_growth.md#presentation), and a visible **Data basis** section with the localized heading, sample scope, source counts, and calculation.
63
75
 
64
- For Web and a directly requested growth scenario, offer **See how to follow up** (**看看怎么跟进**) after the result. Follow the local journey for selections made from the local Demo overview. For checkout recovery with fewer than two eligible accounts, explain the count and offer another scenario.
76
+ For Web and a directly requested growth scenario, offer **See how to follow up** in the onboarding language after the result. Follow the local journey for selections made from the local Demo overview. For checkout recovery with fewer than two eligible accounts, explain the count and offer another scenario.
65
77
 
66
78
  When the customer asks how to follow up with these users, show the [follow-up chart and recommendation](references/onboarding_growth.md#follow-up) from the last ready growth response for the selected sample and scenario. If baseline links were missing, use one read-only `status` call to check for them and include only links returned for this sample. In Web, make this check before the `after-follow-up` call.
67
79
 
68
- In that turn, make the chart visible above the picker. Offer only **Create an A/B draft** (**生成 A/B 草稿**). Wait for the customer's choice before generating the plan.
80
+ In that turn, make the chart visible above the picker. Offer only **Create an A/B draft** in the onboarding language. Wait for the customer's choice before generating the plan.
69
81
 
70
82
  ### Generate an A/B experiment plan
71
83
 
72
- When the customer chooses **生成 A/B 草稿** or selects a runnable diagnosis action, call [experiment-plan for the selected scenario](references/onboarding_experiment_plan.md). For the local journey use `--draft-only`. This returns a saved draft with `approver.status=deferred` and review choices. For Web's existing plan flow continue to require `approver.status=ready` before presenting launch confirmation.
84
+ When the customer chooses **Create an A/B draft** or selects a runnable diagnosis action, call [experiment-plan for the selected scenario](references/onboarding_experiment_plan.md). For the local journey use `--draft-only`. This returns a saved draft with `approver.status=deferred` and review choices. For Web's existing plan flow continue to require `approver.status=ready` before presenting launch confirmation.
73
85
 
74
86
  On `phase=ready`, retain `run_id` and display the [A/B comparison table](references/demo-operations.md#present-the-plan). In the local journey, offer **Approve draft** first, then the three [optional review questions](references/demo-journey.md#review-the-same-draft). Record each question after answering it and use the updated choices for the same draft. For plan failures, follow the returned action and resolve the failure before offering launch.
75
87
 
76
88
  ### Confirm and start the A/B experiment
77
89
 
78
- When the customer chooses **审核通过并启动** or explicitly confirms the displayed runnable plan, tell the user in one line that the experiment is starting and synthetic events are being replayed, then call [experiment-launch](references/onboarding_experiment_launch.md) with its saved `run_id` and `--wait-report`. This starts the experiment, immediately replays the synthetic events and waits for exposure data. **Required for every onboarding Demo approval:** only `ae-cli analysis onboarding experiment-launch` may submit or approve the draft, including on retries and resumes. If a resumed run returns `upload_experiment_replay`, proceed with `--wait-report` immediately. After the Receiver accepts the replay, [verify the persisted events](references/demo-operations.md#report-verified-results) in the same turn. Once they match the replay receipt, present the Demo report in the conversation, even if the platform summary is pending or differs. Follow the [completion format](references/demo-operations.md#choose-the-next-step) for the report link, welcome message and next choices.
90
+ When the customer chooses **Approve and start the Demo test** in the onboarding language or explicitly confirms the displayed runnable plan, tell them in one line that the experiment is starting and synthetic events are being replayed. Then call [experiment-launch](references/onboarding_experiment_launch.md) with its saved `run_id` and `--wait-report`. This starts the experiment, immediately replays the synthetic events and waits for exposure data. **Required for every onboarding Demo approval:** only `ae-cli analysis onboarding experiment-launch` may submit or approve the draft, including on retries and resumes. If a resumed run returns `upload_experiment_replay`, proceed with `--wait-report` immediately. After the Receiver accepts the replay, [verify the persisted events](references/demo-operations.md#report-verified-results) in the same turn. Once they match the replay receipt, present the Demo report in the conversation, even if the platform summary is pending or differs. Follow the [completion format](references/demo-operations.md#choose-the-next-step) for the report link, welcome message and next choices.
79
91
 
80
92
  For an explicit request to launch a Demo experiment, use the requested or previously selected scenario. If neither is available, use the default. Obtain a `run_id` and launch using the existing authorization. For a local review draft request, use `experiment-plan --draft-only`. For requests that explicitly ask to create an AE platform draft, follow [draft-only creation](references/demo-operations.md#draft-only-creation). After the Demo, route **Connect my data** through [business data integration](references/business-data.md).
81
93
 
@@ -1,16 +1,16 @@
1
1
  # About Agentic Engine
2
2
 
3
- When the user chooses **Learn about AE**, use the introduction in the display language and include the official links for their market from [Product resources](#product-resources).
3
+ When the user chooses **Learn about AE**, use the introduction in the [onboarding language](../SKILL.md#onboarding-language-and-currency) and include the official links for their market from [Product resources](#product-resources).
4
4
 
5
- In a local agent, finish the pre-registration introduction with **Create an AE account** as the next choice. Open registration only after the user chooses it. After login return to the experience choice. After an experiment keep the same session and return to the report's follow-up choices.
5
+ In a local agent, follow the [product video rule](#local-agent-product-video) before showing the next choice. Finish the pre-registration introduction with **Create an AE account** as the next choice. Open registration only after the user chooses it. After login return to the experience choice. After an experiment keep the same session and return to the report's follow-up choices.
6
6
 
7
7
  ## Web onboarding
8
8
 
9
- Use the introduction in the conversation language. Use `product_resource_market` from the latest Web onboarding `run` or `--dry-run` result to select the [product website and contact page](#product-resources). Show only those two resources as clickable text links with the localized labels below. Omit the links when the field is absent or `null`. Before the Demo, return to the same Web opening picker. After a verified experiment, return to the same [report follow-up choices](demo-operations.md#choose-the-next-step).
9
+ Use the introduction in the [onboarding language](../SKILL.md#onboarding-language-and-currency). Use `product_resource_market` from the latest Web onboarding `run` or `--dry-run` result to select the [product website and contact page](#product-resources). Show only those two resources as clickable text links with the localized labels below. Omit the links when the field is absent or `null`. Before the Demo, return to the same Web opening picker. After a verified experiment, return to the same [report follow-up choices](demo-operations.md#choose-the-next-step).
10
10
 
11
11
  ## Product resources
12
12
 
13
- In a local agent, use the market confirmed for the signed-in account's AE host. Before sign-in, use the confirmed registration market. Take all links from that one row, including the manual and case studies. For example, a Chinese conversation in the United States market uses Chinese link labels and the United States URLs. When the market is unknown, show the introduction and add the links once the market is confirmed. For Web, follow the [Web market rule](#web-onboarding).
13
+ In a local agent, use the market confirmed for the signed-in account's AE host. Before sign-in, use the confirmed registration market. Take all links from that one row, including the manual and case studies. When the market is unknown, show the introduction and add the links once the market is confirmed. For Web, follow the [Web market rule](#web-onboarding).
14
14
 
15
15
  | Market | Product website | Contact us | Cases or reading | Manual |
16
16
  | --- | --- | --- | --- | --- |
@@ -19,17 +19,39 @@ In a local agent, use the market confirmed for the signed-in account's AE host.
19
19
  | Japan (`jp`) | https://www.thinkingai.io/jp/ | https://www.thinkingai.io/jp/request-demo/ | — | — |
20
20
  | South Korea (`kr`) | https://www.thinkingai.io/kr/ | https://www.thinkingai.io/kr/request-demo/ | — | — |
21
21
 
22
- Show the available links as text links. After the verified local report, use the same row's website for **Learn about AE** and contact page for **Contact us**. In a local agent, show the product video when the host supplies a verified playable asset for that market.
22
+ Show the available links as text links. After the verified local report, use the same row's website for **Learn about AE** and contact page for **Contact us**.
23
+
24
+ ## Local agent product video
25
+
26
+ Show the video only when the user explicitly selects or confirms the United States (`us`) as their registration or account market. Omit it when the market is unknown or inferred only from the display language, `default_market`, or a shared overseas AE host.
27
+
28
+ Put the video on its own line at the end of the introduction, after the product and contact links and before the next choice. Use the exact destination in this Markdown link and choose its label in the onboarding language.
29
+
30
+ [Watch the product introduction · 1:38](https://thinkingdata-image.oss-cn-shanghai.aliyuncs.com/us-optimized/company_info.mp4)
31
+
32
+ ## AE CLI support
33
+
34
+ Select the row for the SaaS environment the user has confirmed or selected. In Web, use `product_resource_market` from the latest onboarding result. Use the onboarding language for the guidance and link labels.
35
+
36
+ | SaaS environment | Support channels |
37
+ | --- | --- |
38
+ | United States (`us`) | Visit the [ThinkingAI website](https://thinkingai.io/) or email [support.us@thinkingai.io](mailto:support.us@thinkingai.io). |
39
+ | China (`cn`, `cn_free`, `cn_paid`) | 访问 [ThinkingAI 官网](https://www.thinkingai.cn/) 或拨打 **400-086-0901**。 |
40
+
41
+ For private deployments, direct the user to their AE administrator. For another confirmed market, use its established support channel if known. When the environment is unknown, confirm it through [existing account sign-in](onboarding_run.md#existing-account-sign-in) before offering regional support.
23
42
 
24
43
  ## Localized labels
25
44
 
26
- Use the label for the customer's conversation language. The market determines the link destinations.
45
+ Use the label in the [onboarding language](../SKILL.md#onboarding-language-and-currency). The market determines the link destinations.
27
46
 
28
47
  | Action | 中文 | English | 日本語 | 한국어 |
29
48
  | --- | --- | --- | --- | --- |
30
49
  | Register | 创建 AE 账号 | Create an AE account | AE アカウントを作成 | AE 계정 만들기 |
31
50
  | Learn | 先了解 ThinkingAI | See what ThinkingAI can do | ThinkingAI について | ThinkingAI 알아보기 |
51
+ | Product video | 观看产品介绍视频 · 1:38 | Watch the product introduction · 1:38 | 製品紹介動画を見る · 1:38 | 제품 소개 영상 보기 · 1:38 |
32
52
  | Connect data | 接入数据 | Connect my data | データを接続 | 데이터 연결 |
53
+ | Invite others | 邀请他人协作 | Invite others to collaborate | メンバーを招待 | 협업할 동료 초대 |
54
+ | Send invitation | 发送邀请 | Send invitation | 招待を送信 | 초대 보내기 |
33
55
  | Continue Demo | 继续体验Demo | Continue the demo | デモを続ける | 데모 계속하기 |
34
56
  | Change Demo | 换个 Demo 继续 | Try another demo | 別のデモを試す | 다른 데모 체험하기 |
35
57
  | Finish Demo | 完成体验 | Finish the demo | デモを終了 | 체험 완료 |
@@ -6,13 +6,13 @@ When a route needs an AE project, reuse the user's verified business project. Us
6
6
 
7
7
  ## Data source choices
8
8
 
9
- If the source and intent are unclear, show the short introduction below. In other languages, translate the introduction and the option labels. Keep CSV and Excel as the file examples.
9
+ If the source and intent are unclear, show a short introduction in the [onboarding language](../SKILL.md#onboarding-language-and-currency). In English, use **Try it with your data** and ask for a CSV or Excel file or a Feishu Sheet or Bitable link. Explain that you will check which fields can be imported. In Chinese, use the introduction below. Keep CSV and Excel as the file examples.
10
10
 
11
11
  > **用你的数据试一次**
12
12
  >
13
13
  > 上传 CSV 或 Excel 文件,或粘贴飞书电子表格、多维表格链接。我会先检查字段,告诉你哪些数据可以导入。
14
14
 
15
- Render `business_data.interaction` in the native picker. Use these labels in Chinese and as the fallback order for older CLI builds:
15
+ Render `business_data.interaction` in the native picker. Use the onboarding language for the labels. Keep this order for older CLI builds.
16
16
 
17
17
  | Value | 中文 | English |
18
18
  | --- | --- | --- |
@@ -37,7 +37,7 @@ Render `business_data.tools` in the native picker. If the host cannot fit the li
37
37
  | `dimension_table` | 导入维度表 | Import a dimension table | Use `ae-metadata` to create or bind the dimension table in the business project. |
38
38
  | `check_ingestion` | 检查已有上报 | Check existing ingestion | Use `ae-tracking-matrix` for verification. Read `tracking live-data list`, `tracking ingest summary` or `tracking ingest-error list` as needed. |
39
39
 
40
- When the customer selects **More integration tools** or directly requests database sync, check `ae-cli --host <verified-host> config show`. Append **DataOps 数据源同步** to the picker or route the request to `ae-dataops` only if `businesses.dataops` is `true`. Verify the DataOps space when required by that route.
40
+ When the customer selects **More integration tools** or directly requests database sync, check `ae-cli --host <verified-host> config show`. If `businesses.dataops` is `true`, append **Sync a DataOps data source** in the onboarding language or route the request to `ae-dataops`. Verify the DataOps space when required by that route.
41
41
 
42
42
  ### DataX setup
43
43
 
@@ -16,11 +16,13 @@ Answer the current `featured_question` from the matching baseline and show the r
16
16
 
17
17
  ## Business diagnosis
18
18
 
19
- 1. **Choose a topic.** Use `charts.daily_viewers` from the ready overview to show the [seven-day trend](presentation.md#choose-and-render-a-chart) for the selected item, when available. Label it as daily unique viewers of the item detail page. Show the three item-specific topics in `demo_overview.diagnosis`, with the featured topic first. Ask which part of the item's purchase flow the user wants to understand.
20
- 2. **See the topic's data and choose a question.** For revisits use the purchase-rate comparison. For checkout use the checkout share or the audience overlap when comparing follow-up audiences. For conversion use the Markdown funnel. Lead with the finding and show one [matching chart](presentation.md#choose-and-render-a-chart). When the overview already showed the same numbers for the same question, show exact counts or the next relevant detail instead of repeating the visual. Show the three short follow-up questions for that topic below the result.
19
+ 1. **Choose a topic.** Use the ready overview to show the [seven-day viewers and change table](presentation.md#choose-and-render-a-chart) for the selected item, when available. Label it as daily unique viewers of the item detail page. Show the three item-specific topics in `demo_overview.diagnosis`, with the featured topic first. Ask which part of the item's purchase flow the user wants to understand.
20
+ 2. **See the topic's data and choose a question.** For revisits use the purchase-rate comparison. For checkout use the share bar or the audience overlap when comparing follow-up audiences. For conversion use the three-step purchase path. Lead with the finding and show one [matching layout](presentation.md#choose-and-render-a-chart). When the overview already showed the same numbers for the same question, show exact counts or the next relevant detail instead of repeating the visual. Show the three short follow-up questions for that topic below the result.
21
21
  3. **See the answer and choose an action.** Answer the chosen question with the finding, supporting counts and any hypothesis that needs a test. Show the three corresponding actions. Add one sentence per action explaining what it would test. Label a review-only proposal here so its scope is clear before the user selects it.
22
22
  4. **Generate the draft.** Carry the chosen action and its audience into the plan. For runnable scenarios, use the verified replay preset and show that the draft can be replayed before presenting review choices.
23
23
 
24
+ Render the questions in the onboarding language. The table gives the Chinese wording and evidence for each topic.
25
+
24
26
  | Topic | Questions to offer | Evidence to use |
25
27
  | --- | --- | --- |
26
28
  | Product revisits | 回看后没买,适合测什么? · 哪些回访玩家值得先跟进? · 能看出为什么不再回来吗? | `single_day`, `multi_day`, `purchase_rates`, and `candidate_cohorts`. Distinct viewing days measure item revisits during the sample period. The data does not identify a player's motive or game retention. |
@@ -28,11 +28,19 @@ The `item-coupon` replay exposes up to 12 accounts per arm and simulates up to e
28
28
 
29
29
  Use the same saved preset selection and audience for plan display, targeting and replay. Reuse the sample's revenue metric and the Feature key generated for the run. Checkout recovery replays one exposure per assigned account and simulated full-price payments.
30
30
 
31
+ ## Demo currency
32
+
33
+ For US onboarding, require `USD` in the saved plan and replay receipt, and verify payments with a `USD` currency filter. Use `$` as the only visible currency marker in onboarding copy and experiment data, including individual payment rows, group totals, chart labels, and any report prepared for export. Format prices, revenue, costs, and profit as `$100`, `$50.50`, or `-$20`. Use labels such as **Revenue**, **Order costs**, and **Profit**. Keep currency codes in structured data and queries.
34
+
35
+ If a saved US draft lacks verified USD currency, regenerate the draft and ask the user to review it before launch. If an existing US replay lacks verified USD currency, explain that the replay currency could not be verified and keep the run ID for recovery.
36
+
37
+ For other markets, use the saved currency. A legacy receipt without currency uses CNY only outside the US flow.
38
+
31
39
  ## Present the plan
32
40
 
33
- Show the Demo audience, hypothesis, and evaluation period from the ready `experiment-plan` response. Insert `plan_preview_markdown` as a visible two-column Markdown table in the conversation. Translate labels and descriptions, keeping both columns, prices, and allocation values. With an older CLI, build the same **A · Control** and **B · Treatment** table from `plan.arms` and `plan.currency`. Show each group's path, price, and split side by side.
41
+ Show the Demo audience, hypothesis, and evaluation period from the ready `experiment-plan` response. Render `plan_preview_markdown` as a visible two-column Markdown table. Translate labels and descriptions, keeping both columns, prices, and allocation values. With an older CLI or a US preview using a different money format, build the same **A · Control** and **B · Treatment** table from `plan.arms` and `plan.currency` using the [Demo currency rules](#demo-currency). Show each group's path, price, and split side by side.
34
42
 
35
- Show the metrics and cost per paid order below the table. Both groups use the same placement and timing, with at most one exposure per account and no follow-up after purchase. Localize the preview to the customer's language. Format amounts from `plan.currency` as USD or CNY, independent of the response language. Keep the local `plan_path` private.
43
+ Show the metrics and cost per paid order below the table. Both groups use the same placement and timing, with at most one exposure per account and no follow-up after purchase. Use the [onboarding language](../SKILL.md#onboarding-language-and-currency) and verify the saved [Demo currency](#demo-currency). Keep the local `plan_path` private.
36
44
 
37
45
  Every ready Demo plan includes `approver`. In the local journey, `approver.status=deferred` means the draft is available for [review](demo-journey.md#review-the-same-draft). The confirmed launch prepares the approver. For legacy plans require `approver.status=ready` before offering launch and report preparation failures. When a coupon plan returns `metric_event`, report its status. If delivery is uncertain, check the saved event ID before sending another event. For `poll_demo`, resume Demo preparation. For `action_required`, follow the returned `next_action`.
38
46
 
@@ -63,9 +71,9 @@ Use the experiment ID, run ID and replay receipt returned by `experiment-launch`
63
71
 
64
72
  Use the platform report as a cross-check. Pass `--project-id` and `--exp-id` to each read. Refresh `ae-cli experiment report summary` with `--force-refresh true` once after ingest. Reuse `sample_size_report` when present. For `ae-cli experiment report sample-size` and `ae-cli experiment report metric-trend`, use `--start-time` and `--end-time` from `report_dates` when available and pass `--metric-id` for each trend. Run independent reads in parallel. If the exposure view is still pending, reuse the existing `--wait-report` response instead of repeatedly issuing the same failing platform query.
65
73
 
66
- Use the saved assignment receipt for assigned counts, and use query results for exposure, coupon claims, purchases, and order amounts. Match outcome accounts to verified exposure groups, keep the run and item filters, and match payment currency to the saved receipt or plan. Treat a legacy receipt without currency as CNY. Deduplicate buyers by account and orders by `order_id`.
74
+ Use the saved assignment receipt for assigned counts, and use query results for exposure, coupon claims, purchases, and order amounts. Match outcome accounts to verified exposure groups, keep the run and item filters, and match payment currency to the saved receipt or plan using the [Demo currency checks](#demo-currency). Deduplicate buyers by account and orders by `order_id`.
67
75
 
68
- Use verified distinct buyers divided by exposed users for each arm's payment rate. Follow the [Markdown A/B report layout](presentation.md#markdown-layouts) for the selected sample. Show exposure, buyers, payment rate and amount side by side. For the coupon scenario, include assigned users, coupon claims, costs and profit. Compute costs using `plan.cost_per_paid_order` and the verified unique order count. Format amounts in the saved currency (USD or CNY). Mark the result as a Demo simulation. If a group has no verified exposure, show its rate as unavailable.
76
+ Use verified distinct buyers divided by exposed users for each arm's payment rate. Follow the [Markdown A/B report layout](presentation.md#markdown-layouts) for the selected sample. Show exposure, buyers, payment rate and amount side by side. For the coupon scenario, include assigned users, coupon claims, costs and profit. Compute costs using `plan.cost_per_paid_order` and the verified unique order count. Format every monetary value using the verified [Demo currency and display rules](#demo-currency). Mark the result as a Demo simulation. If a group has no verified exposure, show its rate as unavailable.
69
77
 
70
78
  The Demo result is ready when the persisted events reconcile with the saved replay receipt. For a versioned round, record completion with [shared progress](onboarding_run.md#shared-progress) before showing the final choices. If the platform report is pending, unavailable or disagrees, identify the affected metrics and label the event-derived figures as the source. Omit disputed platform statistics and continue to the completion message and choices in the same turn. A receiver acknowledgement or an exposure-only report does not establish that all expected events are present.
71
79
 
@@ -96,9 +104,10 @@ Show the [completion message](#completion-message) before opening the picker aft
96
104
 
97
105
  Keep all three parts in the final reply even if the host already showed them in a progress message or the user selected their next action before the reply finished. Keep the website and contact links directly under the greeting, including when those same URLs appeared earlier in the conversation.
98
106
 
99
- Open the host's single-choice control with **Continue the demo** and **Connect my data**, in that order. In Chinese use **继续体验Demo** and **接入数据**. If the host cannot display the picker, show those same two choices in chat after the closing section.
107
+ Open the host's single-choice control with **Continue the demo**, **Connect my data**, and **Invite others to collaborate**, in that order. If the host cannot display the picker, show the same choices in chat after the closing section.
100
108
 
101
109
  - **Continue the demo** in an external agent or **Try another demo** in Web. List both available samples, put the current sample last and label it **Just tried**. Keep it selectable. Use the same session and run `ae-cli analysis onboarding run --session-id <session-id> --choice demo --sample <sample-id> --format json` after selection. Present the new overview as a new round and retain the prior report in the conversation. Use the existing `choose-sample` step in Web.
102
110
  - **Connect my data.** In an external agent, use [business data integration](business-data.md) to act on the customer's intent or show the data source choices. Keep the same onboarding session.
111
+ - **Invite others to collaborate.** Follow [the member invitation flow](member_invitation_send.md) with the signed-in account and the same onboarding session.
103
112
  - If the customer asks about the product in the conversation, share [the introduction and resources](about-ae.md) and return to the same report choices.
104
113
  - If the customer asks to end the experience or replies **Not now** to an earlier completion picker, close the guided flow and retain the result and run ID.