@altertable/cli 1.10.1 → 1.12.0

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 (2) hide show
  1. package/dist/cli.js +239 -36
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -7035,7 +7035,7 @@ var require_public_api = __commonJS(function(exports) {
7035
7035
  });
7036
7036
 
7037
7037
  // src/version.ts
7038
- var VERSION = "1.10.1";
7038
+ var VERSION = "1.12.0";
7039
7039
  var USER_AGENT = `altertable-cli/${VERSION}`;
7040
7040
 
7041
7041
  // src/lib/transport-defaults.ts
@@ -7356,6 +7356,7 @@ function invalidValue(name, value, expectation) {
7356
7356
  return new ConfigurationError(`Invalid ${name} value ${JSON.stringify(value)}; expected ${expectation}.`);
7357
7357
  }
7358
7358
  var ENV_SCHEMA = {
7359
+ ALTERTABLE_AGENT_MODE: { parse: booleanValue },
7359
7360
  ALTERTABLE_ALLOW_INSECURE_HTTP: { parse: booleanValue },
7360
7361
  ALTERTABLE_API_BASE: { parse: optional },
7361
7362
  ALTERTABLE_API_KEY: { parse: optional, secret: true },
@@ -8330,13 +8331,42 @@ function parseTimeoutSeconds(value, flagName) {
8330
8331
  }
8331
8332
 
8332
8333
  // src/lib/global-flags.ts
8333
- function parseGlobalOutputFlags(argv) {
8334
+ var AGENT_ENV_VARIABLES = [
8335
+ "AI_AGENT",
8336
+ "AGENT",
8337
+ "CLAUDECODE",
8338
+ "CODEX_CI",
8339
+ "CODEX_SANDBOX",
8340
+ "CODEX_THREAD_ID",
8341
+ "CURSOR_AGENT",
8342
+ "GEMINI_CLI",
8343
+ "COPILOT_AGENT",
8344
+ "COPILOT_CLI",
8345
+ "COPILOT_AGENT_SESSION_ID"
8346
+ ];
8347
+ function resolveAgentMode(argv, { env, stdoutIsTTY }) {
8348
+ if (argv.includes("--no-agent"))
8349
+ return false;
8350
+ if (argv.includes("--agent"))
8351
+ return true;
8352
+ const override = env.ALTERTABLE_AGENT_MODE?.toLowerCase();
8353
+ if (override === "1" || override === "true")
8354
+ return true;
8355
+ if (override === "0" || override === "false")
8356
+ return false;
8357
+ const explicitFormat = argv.some((arg) => arg === "--json" || arg === "--format" || arg.startsWith("--format="));
8358
+ return !stdoutIsTTY && !explicitFormat && AGENT_ENV_VARIABLES.some((name) => Boolean(env[name]));
8359
+ }
8360
+ function parseGlobalOutputFlags(argv, environment = {
8361
+ env: copyProcessEnv(),
8362
+ stdoutIsTTY: Boolean(process.stdout.isTTY)
8363
+ }) {
8334
8364
  const separatorIndex = argv.indexOf("--");
8335
8365
  const globalArgs = separatorIndex === -1 ? argv : argv.slice(0, separatorIndex);
8336
8366
  return {
8337
8367
  debug: globalArgs.includes("--debug") || globalArgs.includes("-d"),
8338
8368
  json: globalArgs.includes("--json"),
8339
- agent: globalArgs.includes("--agent"),
8369
+ agent: resolveAgentMode(globalArgs, environment),
8340
8370
  noColor: globalArgs.includes("--no-color")
8341
8371
  };
8342
8372
  }
@@ -8348,6 +8378,8 @@ function mergeGlobalFlagsFromArgs(context, args) {
8348
8378
  merged.json = Boolean(args.json);
8349
8379
  if (args.agent !== undefined)
8350
8380
  merged.agent = Boolean(args.agent);
8381
+ if (args["no-agent"])
8382
+ merged.agent = false;
8351
8383
  if (args["no-color"] !== undefined)
8352
8384
  merged.noColor = Boolean(args["no-color"]);
8353
8385
  const profile = asCliArgString(args.profile);
@@ -20582,6 +20614,12 @@ function createCompletionCommand(getRootCommand) {
20582
20614
  return command;
20583
20615
  }
20584
20616
 
20617
+ // src/package-metadata.ts
20618
+ var CLI_PACKAGE_METADATA = {
20619
+ name: "@altertable/cli",
20620
+ repositorySlug: "altertable-ai/altertable-cli"
20621
+ };
20622
+
20585
20623
  // src/lib/updater.ts
20586
20624
  import { existsSync as existsSync5, mkdirSync as mkdirSync4, readFileSync as readFileSync5, renameSync as renameSync3, rmSync as rmSync4, writeFileSync as writeFileSync3 } from "fs";
20587
20625
  import { chmodSync as chmodSync2 } from "fs";
@@ -20643,12 +20681,6 @@ function resolveProcessExecutablePath(options = {}) {
20643
20681
  return canonicalPath(resolvedExecPath);
20644
20682
  }
20645
20683
 
20646
- // src/package-metadata.ts
20647
- var CLI_PACKAGE_METADATA = {
20648
- name: "@altertable/cli",
20649
- repositorySlug: "altertable-ai/altertable-cli"
20650
- };
20651
-
20652
20684
  // src/release-manifest.ts
20653
20685
  var RELEASE_TARGETS = [
20654
20686
  {
@@ -21260,7 +21292,7 @@ function spawnOutputText(value) {
21260
21292
  }
21261
21293
  return "";
21262
21294
  }
21263
- function verifyInstalledCliVersion(expectedVersion, command = "altertable", spawnImpl = spawnSync4, description = "Installed altertable") {
21295
+ function verifyInstalledCliVersion(expectedVersion, command = "altertable", spawnImpl = spawnSync4, description = "Installed Altertable CLI") {
21264
21296
  const result = spawnImpl(command, ["--version"], { encoding: "utf8" });
21265
21297
  if (result.error) {
21266
21298
  throw new CliError(`Unable to verify ${description.toLowerCase()} version.`, {
@@ -21294,7 +21326,7 @@ function replaceFileAtomically(targetPath, replacementPath) {
21294
21326
  } catch {}
21295
21327
  }
21296
21328
  rmSync4(replacementPath, { force: true });
21297
- throw new CliError("Unable to replace the altertable binary.", {
21329
+ throw new CliError("Unable to replace the Altertable CLI binary.", {
21298
21330
  cause: error,
21299
21331
  details: `Backup path: ${backupPath}`
21300
21332
  });
@@ -21350,7 +21382,7 @@ async function installGitHubBinaryRelease(version, options = {}) {
21350
21382
  fetchImpl
21351
21383
  });
21352
21384
  try {
21353
- const verifiedVersion = options.verify === false ? release.version : verifyInstalledCliVersion(release.version, tempPath, options.spawnImpl, "Downloaded altertable");
21385
+ const verifiedVersion = options.verify === false ? release.version : verifyInstalledCliVersion(release.version, tempPath, options.spawnImpl, "Downloaded Altertable CLI");
21354
21386
  replaceFileAtomically(targetPath, tempPath);
21355
21387
  return {
21356
21388
  installed_version: release.version,
@@ -21507,7 +21539,7 @@ function writeAutomaticUpdateNotice(sink, latestVersion) {
21507
21539
  sink.writeMetadata([
21508
21540
  "",
21509
21541
  renderDisplayText([
21510
- span(`Update available: altertable ${latestVersion} (current ${VERSION}).`, "subtle")
21542
+ span(`Update available: Altertable CLI ${latestVersion} (current ${VERSION}).`, "subtle")
21511
21543
  ]),
21512
21544
  renderDisplayText([
21513
21545
  span(`Run ${recommendedInstallCommand(latestVersion)} to install it.`, "subtle")
@@ -21552,7 +21584,7 @@ function formatUpdateResult(result, targetVersion) {
21552
21584
  if (comparison < 0) {
21553
21585
  return [
21554
21586
  renderDisplayText([
21555
- span(`Target version v${target} is older than installed altertable v${current}.`)
21587
+ span(`Target version v${target} is older than installed Altertable CLI v${current}.`)
21556
21588
  ]),
21557
21589
  renderDisplayText([
21558
21590
  span("Run "),
@@ -21569,13 +21601,13 @@ function formatUpdateResult(result, targetVersion) {
21569
21601
  if (!result.update_available) {
21570
21602
  return renderDisplayText([
21571
21603
  span("Congrats!", "success"),
21572
- span(" You're already on the latest version of altertable "),
21604
+ span(" You're already on the latest version of Altertable CLI "),
21573
21605
  span(`(which is v${normalizeVersion(result.current_version)})`, "subtle")
21574
21606
  ]);
21575
21607
  }
21576
21608
  return [
21577
21609
  renderDisplayText([
21578
- span(`A new version of altertable is available: v${normalizeVersion(result.latest_version)} `),
21610
+ span(`A new version of Altertable CLI is available: v${normalizeVersion(result.latest_version)} `),
21579
21611
  span(`(current v${normalizeVersion(result.current_version)})`, "subtle")
21580
21612
  ]),
21581
21613
  renderDisplayText([
@@ -21655,16 +21687,69 @@ async function executeUpdateCommand(args, sink, dependencies = DEFAULT_DEPENDENC
21655
21687
  await writeUpdateCheck(result, targetVersion, sink);
21656
21688
  return;
21657
21689
  }
21658
- sink.writeMetadata([`Updating altertable to ${result.latest_version}`]);
21690
+ if (!sink.json) {
21691
+ sink.writeMetadata([formatUpdateAnnouncement(result)]);
21692
+ }
21659
21693
  const installed = await dependencies.installCliUpdate(result.latest_version, {
21660
21694
  stdio: sink.json ? "pipe" : "inherit"
21661
21695
  });
21662
21696
  await writeCommandOutput({
21663
- kind: "ack",
21697
+ kind: "normalized",
21664
21698
  data: installed,
21665
- metadataMessage: `altertable ${installed.verified_version} installed.`
21699
+ humanText: formatInstalledUpdate(result, installed.verified_version)
21666
21700
  }, sink);
21667
21701
  }
21702
+ function formatUpdateAnnouncement(result) {
21703
+ if (result.update_available) {
21704
+ return renderDisplayText([
21705
+ span("Altertable CLI ", "strong"),
21706
+ span(`v${result.latest_version}`, "accent"),
21707
+ span(" is out! You're on "),
21708
+ span(`v${result.current_version}`, "string")
21709
+ ]);
21710
+ }
21711
+ if (compareVersions(result.latest_version, result.current_version) === 0) {
21712
+ return renderDisplayText([
21713
+ span("Reinstalling Altertable CLI ", "strong"),
21714
+ span(`v${result.current_version}`, "accent"),
21715
+ span(".")
21716
+ ]);
21717
+ }
21718
+ return renderDisplayText([
21719
+ span("Downgrading Altertable CLI to ", "strong"),
21720
+ span(`v${result.latest_version}`, "accent"),
21721
+ span(". You're on "),
21722
+ span(`v${result.current_version}`, "string")
21723
+ ]);
21724
+ }
21725
+ function formatInstalledUpdate(result, installedVersion) {
21726
+ const repositoryUrl = `https://github.com/${CLI_PACKAGE_METADATA.repositorySlug}`;
21727
+ const version = `v${normalizeVersion(installedVersion)}`;
21728
+ const currentVersion = `v${normalizeVersion(result.current_version)}`;
21729
+ const comparison = compareVersions(installedVersion, result.current_version);
21730
+ let outcome = "Reinstalled.";
21731
+ if (comparison > 0) {
21732
+ outcome = "Upgraded.";
21733
+ } else if (comparison < 0) {
21734
+ outcome = "Downgraded.";
21735
+ }
21736
+ const lines = [
21737
+ outcome,
21738
+ "",
21739
+ `Release notes for Altertable CLI ${version}:`,
21740
+ "",
21741
+ renderDisplayText([span(` ${repositoryUrl}/releases/tag/${version}`, "accent")]),
21742
+ "",
21743
+ "Report any bugs:",
21744
+ "",
21745
+ ` ${repositoryUrl}/issues`
21746
+ ];
21747
+ if (comparison !== 0) {
21748
+ lines.push("", "Commit log:", "", ` ${repositoryUrl}/compare/${currentVersion}...${version}`);
21749
+ }
21750
+ return lines.join(`
21751
+ `);
21752
+ }
21668
21753
 
21669
21754
  // src/lib/management/model.ts
21670
21755
  function hasRequiredString(record, key) {
@@ -22209,7 +22294,7 @@ Start with the [authoring router](AGENTS.md) for data and view changes, or the [
22209
22294
 
22210
22295
  Run \`altertable app lint\` to check the app locally. Use \`altertable app lint --lakehouse\` to execute each operation's declared \`checks\` against the selected profile.
22211
22296
 
22212
- \`altertable app upgrade\` pins the package version tested with your CLI and updates the lockfile. It preserves app code and does not downgrade a newer installed package. Restart a running preview after upgrading.
22297
+ \`altertable app upgrade\` pins the package version tested with your CLI and updates the lockfile. It preserves app code and does not downgrade a newer installed package. Version 0.70.0 requires typed query parameters and projections, with decoded record rows; migrate existing query declarations after upgrading. Restart a running preview after upgrading.
22213
22298
 
22214
22299
  ## Version control
22215
22300
 
@@ -22235,7 +22320,7 @@ Commit app source, \`package.json\`, and \`bun.lock\`. A fresh clone installs \`
22235
22320
  "": {
22236
22321
  "name": "data-app-starter",
22237
22322
  "dependencies": {
22238
- "@altertable/data-app": "0.66.0",
22323
+ "@altertable/data-app": "0.70.0",
22239
22324
  "react": "19.3.0",
22240
22325
  "react-dom": "19.3.0",
22241
22326
  },
@@ -22251,7 +22336,9 @@ Commit app source, \`package.json\`, and \`bun.lock\`. A fresh clone installs \`
22251
22336
  },
22252
22337
  },
22253
22338
  "packages": {
22254
- "@altertable/data-app": ["@altertable/data-app@0.66.0", "", { "dependencies": { "@floating-ui/react": "0.27.20", "@internationalized/date": "3.12.4", "@tanstack/react-query": "5.104.0", "fflate": "0.8.3", "fuzzysort": "4.0.2", "html-to-image": "1.11.13", "lucide-react": "1.48.0", "react-aria-components": "1.21.1" }, "peerDependencies": { "react": ">=19.2.0", "react-dom": ">=19.2.0" } }, "sha512-558Acl33lVYDxpuTE8npNxeSzDYnve4s2A6kz9KxzdW+dDlJkdJT6jEzKaizZDYmIf4s86A0gY1uaEgij3kO/Q=="],
22339
+ "@altertable/data-app": ["@altertable/data-app@0.70.0", "", { "dependencies": { "@altertable/lakehouse": "0.4.1", "@floating-ui/react": "0.27.20", "@internationalized/date": "3.12.4", "@tanstack/react-query": "5.104.0", "fflate": "0.8.3", "fuzzysort": "4.0.2", "html-to-image": "1.11.13", "lucide-react": "1.48.0", "react-aria-components": "1.21.1", "recharts": "3.10.1" }, "peerDependencies": { "react": ">=19.2.0", "react-dom": ">=19.2.0" } }, "sha512-tfrzwRP4rGnnMM1Ddu0BYwl1q0c3KegIeBEHf4e/iK/EkTfFIHGw+5Mp7SqS+kmsPR7TpNFbWhCVeAYGH1f0xw=="],
22340
+
22341
+ "@altertable/lakehouse": ["@altertable/lakehouse@0.4.1", "", {}, "sha512-m7d15cWt+WUGW7lVw2KYGD+Se8MzO25G7SWSuFd+OasBxWmOJNa2IrgvOHGVEbnZ+kexTUy9NjAGQ69sG4V91w=="],
22255
22342
 
22256
22343
  "@floating-ui/core": ["@floating-ui/core@1.8.0", "", { "dependencies": { "@floating-ui/utils": "^0.2.12" } }, "sha512-0CIZ5itps/8x7BG8dEIhs53BvCUH2PCoogtakwRTut+Arm58sJooJ0AuZhLw2HJYIR5cMLNPBSS728sPho2khQ=="],
22257
22344
 
@@ -22359,6 +22446,12 @@ Commit app source, \`package.json\`, and \`bun.lock\`. A fresh clone installs \`
22359
22446
 
22360
22447
  "@react-types/shared": ["@react-types/shared@3.36.1", "", { "peerDependencies": { "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, "sha512-AzsuD9OfxTOZMMvTRhlN3oHBwOmFN7tDh27LzqmHt4+uOgPhJT7ZM7/kVs/8/o0WxayMUIk3hBmCFRHv1FUoag=="],
22361
22448
 
22449
+ "@reduxjs/toolkit": ["@reduxjs/toolkit@2.13.0", "", { "dependencies": { "@standard-schema/spec": "^1.0.0", "@standard-schema/utils": "^0.3.0", "immer": "^11.0.0", "redux": "^5.0.1", "redux-thunk": "^3.1.0", "reselect": "^5.1.0" }, "peerDependencies": { "react": "^16.9.0 || ^17.0.0 || ^18 || ^19", "react-redux": "^7.2.1 || ^8.1.3 || ^9.0.0" }, "optionalPeers": ["react", "react-redux"] }, "sha512-f6jwVRfwW30+tnllz4YcsHHpPYYOE7abcHkyUCovD+P7DyhdAI5prz2Fh/8TLhakjpN+7aIEion1s5L/tvlYlA=="],
22450
+
22451
+ "@standard-schema/spec": ["@standard-schema/spec@1.1.0", "", {}, "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w=="],
22452
+
22453
+ "@standard-schema/utils": ["@standard-schema/utils@0.3.0", "", {}, "sha512-e7Mew686owMaPJVNNLs55PUvgz371nKgwsc4vxE49zsODpJEnxgxRo2y/OKrqueavXgZNMDVj3DdHFlaSAeU8g=="],
22454
+
22362
22455
  "@swc/helpers": ["@swc/helpers@0.5.23", "", { "dependencies": { "tslib": "^2.8.0" } }, "sha512-5lSsMOTXURePglDfvuAQUqkGek9Hg2kksOYay2m0+XR++b2NWYL/4sWyuvVBIs8oKnJaxkdi9whaL/sqN13afw=="],
22363
22456
 
22364
22457
  "@tanstack/query-core": ["@tanstack/query-core@5.104.0", "", {}, "sha512-JrC2r/JQlXt7khBSdUpsgxNvybzOg+aITa+ARRMlP2AFo93Y8vIqz077rp+e61mJetSZ0T6AJbwW1JHer1vrPQ=="],
@@ -22367,12 +22460,32 @@ Commit app source, \`package.json\`, and \`bun.lock\`. A fresh clone installs \`
22367
22460
 
22368
22461
  "@types/bun": ["@types/bun@1.4.2", "", { "dependencies": { "bun-types": "1.4.2" } }, "sha512-GimotNn7+ZV0uVArItBbriZsR1oNf0+WTzPkdcFrzShI7k2norL0uzEaJT8T33dWr7O/c9ZDuAFQrctKCi72oQ=="],
22369
22462
 
22463
+ "@types/d3-array": ["@types/d3-array@3.2.2", "", {}, "sha512-hOLWVbm7uRza0BYXpIIW5pxfrKe0W+D5lrFiAEYR+pb6w3N2SwSMaJbXdUfSEv+dT4MfHBLtn5js0LAWaO6otw=="],
22464
+
22465
+ "@types/d3-color": ["@types/d3-color@3.1.3", "", {}, "sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A=="],
22466
+
22467
+ "@types/d3-ease": ["@types/d3-ease@3.0.2", "", {}, "sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA=="],
22468
+
22469
+ "@types/d3-interpolate": ["@types/d3-interpolate@3.0.4", "", { "dependencies": { "@types/d3-color": "*" } }, "sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA=="],
22470
+
22471
+ "@types/d3-path": ["@types/d3-path@3.1.1", "", {}, "sha512-VMZBYyQvbGmWyWVea0EHs/BwLgxc+MKi1zLDCONksozI4YJMcTt8ZEuIR4Sb1MMTE8MMW49v0IwI5+b7RmfWlg=="],
22472
+
22473
+ "@types/d3-scale": ["@types/d3-scale@4.0.9", "", { "dependencies": { "@types/d3-time": "*" } }, "sha512-dLmtwB8zkAeO/juAMfnV+sItKjlsw2lKdZVVy6LRr0cBmegxSABiLEpGVmSJJ8O08i4+sGR6qQtb6WtuwJdvVw=="],
22474
+
22475
+ "@types/d3-shape": ["@types/d3-shape@3.2.0", "", { "dependencies": { "@types/d3-path": "*" } }, "sha512-kVd74ta9eof3eJOvbNd1vGKS/XERRyQbT26Og63hIsvDO84cjD5gEOhsXf26w3FSoNlPVz84DOFcKv/oou+fMw=="],
22476
+
22477
+ "@types/d3-time": ["@types/d3-time@3.0.4", "", {}, "sha512-yuzZug1nkAAaBlBBikKZTgzCeA+k1uy4ZFwWANOfKw5z5LRhV0gNA7gNkKm7HoK+HRN0wX3EkxGk0fpbWhmB7g=="],
22478
+
22479
+ "@types/d3-timer": ["@types/d3-timer@3.0.2", "", {}, "sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw=="],
22480
+
22370
22481
  "@types/node": ["@types/node@26.6.3", "", { "dependencies": { "undici-types": "~8.9.0" } }, "sha512-dsqMQQoeTLqu9wynDD00q573mNzso3IdQOAfHRJqLCcmCFPoGo9A1bDpUcv/9tnKpErQWv9uKeGfl37EIS02Yg=="],
22371
22482
 
22372
22483
  "@types/react": ["@types/react@19.3.0", "", { "dependencies": { "csstype": "^3.2.2" } }, "sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg=="],
22373
22484
 
22374
22485
  "@types/react-dom": ["@types/react-dom@19.3.0", "", { "peerDependencies": { "@types/react": "^19.3.0" } }, "sha512-ZI7bU42mZXXKHn/qNLEw2IrbiINU7X5+vfgdixBHkCNpYWXjKgfQ/P+uyGb5CjOLB9UcnTeg3rylQtV2hym44Q=="],
22375
22486
 
22487
+ "@types/use-sync-external-store": ["@types/use-sync-external-store@0.0.6", "", {}, "sha512-zFDAD+tlpf2r4asuHEj0XH6pY6i0g5NeAHPn+15wk3BV6JA69eERFXC1gyGThDkVa1zCyKr5jox1+2LbV/AMLg=="],
22488
+
22376
22489
  "@typescript/typescript-aix-ppc64": ["@typescript/typescript-aix-ppc64@7.0.2", "", { "os": "aix", "cpu": "ppc64" }, "sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ=="],
22377
22490
 
22378
22491
  "@typescript/typescript-darwin-arm64": ["@typescript/typescript-darwin-arm64@7.0.2", "", { "os": "darwin", "cpu": "arm64" }, "sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA=="],
@@ -22423,12 +22536,44 @@ Commit app source, \`package.json\`, and \`bun.lock\`. A fresh clone installs \`
22423
22536
 
22424
22537
  "csstype": ["csstype@3.2.3", "", {}, "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ=="],
22425
22538
 
22539
+ "d3-array": ["d3-array@3.2.4", "", { "dependencies": { "internmap": "1 - 2" } }, "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg=="],
22540
+
22541
+ "d3-color": ["d3-color@3.1.0", "", {}, "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA=="],
22542
+
22543
+ "d3-ease": ["d3-ease@3.0.1", "", {}, "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w=="],
22544
+
22545
+ "d3-format": ["d3-format@3.1.2", "", {}, "sha512-AJDdYOdnyRDV5b6ArilzCPPwc1ejkHcoyFarqlPqT7zRYjhavcT3uSrqcMvsgh2CgoPbK3RCwyHaVyxYcP2Arg=="],
22546
+
22547
+ "d3-interpolate": ["d3-interpolate@3.0.1", "", { "dependencies": { "d3-color": "1 - 3" } }, "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g=="],
22548
+
22549
+ "d3-path": ["d3-path@3.1.0", "", {}, "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ=="],
22550
+
22551
+ "d3-scale": ["d3-scale@4.0.2", "", { "dependencies": { "d3-array": "2.10.0 - 3", "d3-format": "1 - 3", "d3-interpolate": "1.2.0 - 3", "d3-time": "2.1.1 - 3", "d3-time-format": "2 - 4" } }, "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ=="],
22552
+
22553
+ "d3-shape": ["d3-shape@3.2.0", "", { "dependencies": { "d3-path": "^3.1.0" } }, "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA=="],
22554
+
22555
+ "d3-time": ["d3-time@3.1.0", "", { "dependencies": { "d3-array": "2 - 3" } }, "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q=="],
22556
+
22557
+ "d3-time-format": ["d3-time-format@4.1.0", "", { "dependencies": { "d3-time": "1 - 3" } }, "sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg=="],
22558
+
22559
+ "d3-timer": ["d3-timer@3.0.1", "", {}, "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA=="],
22560
+
22561
+ "decimal.js-light": ["decimal.js-light@2.5.1", "", {}, "sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg=="],
22562
+
22563
+ "es-toolkit": ["es-toolkit@1.52.0", "", {}, "sha512-XTNEJQh1tY1ZJVcf6ayP/2n4ZPyaHlW2FWs7xvw5ddPuhUVjLD3olQVQS7kf58JbAB48iL0uL/jerTrjtV3lDA=="],
22564
+
22565
+ "eventemitter3": ["eventemitter3@5.0.4", "", {}, "sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw=="],
22566
+
22426
22567
  "fflate": ["fflate@0.8.3", "", {}, "sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA=="],
22427
22568
 
22428
22569
  "fuzzysort": ["fuzzysort@4.0.2", "", {}, "sha512-3c7yD6rK1EXIsqpcu1ZVzXJugODWNMzvUij6yTiziaAHrpNS8kzFOI9mJLE8pmG4K9JOaVgzQRgklfOEk8f4Tg=="],
22429
22570
 
22430
22571
  "html-to-image": ["html-to-image@1.11.13", "", {}, "sha512-cuOPoI7WApyhBElTTb9oqsawRvZ0rHhaHwghRLlTuffoD1B2aDemlCruLeZrUIIdvG7gs9xeELEPm6PhuASqrg=="],
22431
22572
 
22573
+ "immer": ["immer@11.1.21", "", {}, "sha512-bZSadeCPGdaY5/qRLgr6mDSH1ra21rD3rqpiWk7+QTr4ayYPTE9qZYdLh/NdPhMe0wSrTvHD/Lk8q5EwhUs0aw=="],
22574
+
22575
+ "internmap": ["internmap@2.0.3", "", {}, "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg=="],
22576
+
22432
22577
  "lucide-react": ["lucide-react@1.48.0", "", { "peerDependencies": { "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-R0CIKY/fXiC6y9xRBADgsK+VW2p/pcTJOMhLZf1T+uG+vJUvyUR02nGOgmIIC7MPkiNK4Ox8QDnbqF8rJYWPZQ=="],
22433
22578
 
22434
22579
  "oxfmt": ["oxfmt@0.70.0", "", { "dependencies": { "tinypool": "2.1.2" }, "optionalDependencies": { "@oxfmt/binding-android-arm-eabi": "0.70.0", "@oxfmt/binding-android-arm64": "0.70.0", "@oxfmt/binding-darwin-arm64": "0.70.0", "@oxfmt/binding-darwin-x64": "0.70.0", "@oxfmt/binding-freebsd-x64": "0.70.0", "@oxfmt/binding-linux-arm-gnueabihf": "0.70.0", "@oxfmt/binding-linux-arm-musleabihf": "0.70.0", "@oxfmt/binding-linux-arm64-gnu": "0.70.0", "@oxfmt/binding-linux-arm64-musl": "0.70.0", "@oxfmt/binding-linux-ppc64-gnu": "0.70.0", "@oxfmt/binding-linux-riscv64-gnu": "0.70.0", "@oxfmt/binding-linux-riscv64-musl": "0.70.0", "@oxfmt/binding-linux-s390x-gnu": "0.70.0", "@oxfmt/binding-linux-x64-gnu": "0.70.0", "@oxfmt/binding-linux-x64-musl": "0.70.0", "@oxfmt/binding-openharmony-arm64": "0.70.0", "@oxfmt/binding-win32-arm64-msvc": "0.70.0", "@oxfmt/binding-win32-ia32-msvc": "0.70.0", "@oxfmt/binding-win32-x64-msvc": "0.70.0" }, "peerDependencies": { "svelte": "^5.0.0", "vite-plus": "*" }, "optionalPeers": ["svelte", "vite-plus"], "bin": { "oxfmt": "bin/oxfmt" } }, "sha512-IsHxZ4y0wQLLMhnrJblBJgZsLDzfULrJnAw5j/QqsTlMa/m3AqsbToi+W71uhBGaqlqq/PbbjvHc09TJwdv3Tw=="],
@@ -22445,12 +22590,26 @@ Commit app source, \`package.json\`, and \`bun.lock\`. A fresh clone installs \`
22445
22590
 
22446
22591
  "react-dom": ["react-dom@19.3.0", "", { "dependencies": { "scheduler": "^0.28.0" }, "peerDependencies": { "react": "^19.3.0" } }, "sha512-JDk8dgif51OjFoDE70+OT9ICyYr+69HlmihNwp1+Nsfbna3t5sIiCa9ZJktDmQ4/1b/rn26hIAR2uYXDMr5r0Q=="],
22447
22592
 
22593
+ "react-is": ["react-is@19.3.0", "", {}, "sha512-UpMYezM4v5/18F28aC66AEsjXIgE02kyEMH6yLdgLXu/UTfa1Ntwck/nNLrbqJsEXW7gPb0coNO9FQse9WTovA=="],
22594
+
22595
+ "react-redux": ["react-redux@9.3.0", "", { "dependencies": { "@types/use-sync-external-store": "^0.0.6", "use-sync-external-store": "^1.4.0" }, "peerDependencies": { "@types/react": "^18.2.25 || ^19", "react": "^18.0 || ^19", "redux": "^5.0.0" }, "optionalPeers": ["@types/react", "redux"] }, "sha512-KQopgqFo/p/fgmAs5qz6p5RWaNAzq40WAu7fJIXnQpYxFPbJYtsJPWvGeF2rOBaY/kEuV77AVsX8TsQzKm+A/g=="],
22596
+
22448
22597
  "react-stately": ["react-stately@3.50.0", "", { "dependencies": { "@internationalized/date": "^3.12.4", "@internationalized/number": "^3.6.8", "@internationalized/string": "^3.2.10", "@react-types/shared": "^3.36.1", "@swc/helpers": "^0.5.0", "use-sync-external-store": "^1.6.0" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, "sha512-TnckvpDQGU0672wEaLZqdzvhuSeXWjgW6vijMWxiKOxc8CosQUfPGISdcZyfHqjX3XMjEtRxj4w9HumvX4h4mw=="],
22449
22598
 
22599
+ "recharts": ["recharts@3.10.1", "", { "dependencies": { "@reduxjs/toolkit": "^1.9.0 || 2.x.x", "clsx": "^2.1.1", "decimal.js-light": "^2.5.1", "es-toolkit": "^1.39.3", "eventemitter3": "^5.0.1", "immer": "^11.1.8", "react-redux": "8.x.x || 9.x.x", "reselect": "5.2.0", "tiny-invariant": "^1.3.3", "use-sync-external-store": "^1.2.2", "victory-vendor": "^37.0.2" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-is": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-QXFrvt6IVcw7eeZCoyXTwkIJAX3Dv1nyVhMicXJ47GsGDDpcN8z6o644DibE9XjpBTThtsomLKnTV6lc+cVFUA=="],
22600
+
22601
+ "redux": ["redux@5.0.1", "", {}, "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w=="],
22602
+
22603
+ "redux-thunk": ["redux-thunk@3.1.0", "", { "peerDependencies": { "redux": "^5.0.0" } }, "sha512-NW2r5T6ksUKXCabzhL9z+h206HQw/NJkcLm1GPImRQ8IzfXwRGqjVhKJGauHirT0DAuyy6hjdnMZaRoAcy0Klw=="],
22604
+
22605
+ "reselect": ["reselect@5.2.0", "", {}, "sha512-AgZ3UOZm3YndfrJ4OYjgrT7bmCm/1iqkjvEfH/oYjzh6PD2qw4QuT3jjnXIrpdt4MTpMXclMT3lXbmRY+XRakw=="],
22606
+
22450
22607
  "scheduler": ["scheduler@0.28.0", "", {}, "sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw=="],
22451
22608
 
22452
22609
  "tabbable": ["tabbable@6.5.0", "", {}, "sha512-wieBHXygIm7OyQOu5hQlkk62/WyCFYGlWg7L6/ZCUZwx0o398Zkn4pVmMyfYhfMG8kGrj/Krt8eIk6UKC6VzwA=="],
22453
22610
 
22611
+ "tiny-invariant": ["tiny-invariant@1.3.3", "", {}, "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg=="],
22612
+
22454
22613
  "tinypool": ["tinypool@2.1.2", "", {}, "sha512-9YodfrxS9g9IbFr/KOjE5bAeJ0p61n3bW6mqvy0jtoeKd1kTW1Cxm0oulm6KX2lyM9Gl6WIe8nEbY7LWv5ZJww=="],
22455
22614
 
22456
22615
  "tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
@@ -22460,6 +22619,8 @@ Commit app source, \`package.json\`, and \`bun.lock\`. A fresh clone installs \`
22460
22619
  "undici-types": ["undici-types@8.9.0", "", {}, "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg=="],
22461
22620
 
22462
22621
  "use-sync-external-store": ["use-sync-external-store@1.7.0", "", { "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-6L+EeigHMQhdaIPNIFUKwfWJSwWFQ8gJbJ2DLOs5sDIegTwR9fRxvnM3uciHKjIZhFz+KAv2emhWMRvDmMcY8A=="],
22622
+
22623
+ "victory-vendor": ["victory-vendor@37.3.6", "", { "dependencies": { "@types/d3-array": "^3.0.3", "@types/d3-ease": "^3.0.0", "@types/d3-interpolate": "^3.0.1", "@types/d3-scale": "^4.0.2", "@types/d3-shape": "^3.1.0", "@types/d3-time": "^3.0.0", "@types/d3-timer": "^3.0.0", "d3-array": "^3.1.6", "d3-ease": "^3.0.1", "d3-interpolate": "^3.0.1", "d3-scale": "^4.0.2", "d3-shape": "^3.1.0", "d3-time": "^3.0.0", "d3-timer": "^3.0.1" } }, "sha512-SbPDPdDBYp+5MJHhBCAyI7wKM3d5ivekigc2Dk2s7pgbZ9wIgIBYGVw4zGHBml/qTFbexrofXW6Gu4noGxrOwQ=="],
22463
22624
  }
22464
22625
  }
22465
22626
  `, "bunfig.toml": `[install]
@@ -22481,7 +22642,7 @@ exact = true
22481
22642
  "build": "bun build src/index.html --outdir=dist --production"
22482
22643
  },
22483
22644
  "dependencies": {
22484
- "@altertable/data-app": "0.66.0",
22645
+ "@altertable/data-app": "0.70.0",
22485
22646
  "react": "19.3.0",
22486
22647
  "react-dom": "19.3.0"
22487
22648
  },
@@ -22497,36 +22658,48 @@ exact = true
22497
22658
  }
22498
22659
  `, "src/App.tsx": `import { GettingStarted } from "@altertable/data-app/react/ui";
22499
22660
  import { dataContext } from "#app/data-context.ts";
22500
- import app from "#app/config.ts";
22501
22661
 
22502
22662
  /** Connectivity-only screen. Investigate the requested question, then replace this with a view
22503
22663
  * that leads with a supported finding and explores the useful angles behind it. */
22504
22664
  export function App() {
22505
- return <GettingStarted config={app} dataContext={dataContext} />;
22665
+ return <GettingStarted dataContext={dataContext} />;
22506
22666
  }
22507
22667
  `, "src/assets.d.ts": `declare module "*.css";
22508
- `, "src/config.ts": `import { parseAppearance } from "@altertable/data-app/appearance";
22509
- import type { DataAppConfig } from "@altertable/data-app/config";
22668
+ `, "src/config.ts": `import { defineDataApp } from "@altertable/data-app";
22669
+ import { parseAppearance } from "@altertable/data-app/appearance";
22510
22670
  import app from "#config";
22511
22671
 
22512
- export default {
22672
+ export default defineDataApp({
22513
22673
  title: app.title,
22674
+ description: "Verify the configured lakehouse connection before authoring an exploration.",
22514
22675
  scope: app.scope,
22515
22676
  appearance: parseAppearance(app.appearance),
22516
- } satisfies DataAppConfig;
22677
+ queries: {
22678
+ connection: {
22679
+ statement: "SELECT 1 AS connection_check",
22680
+ params: {},
22681
+ projections: { connection_check: { type: "number" } },
22682
+ },
22683
+ },
22684
+ });
22517
22685
  `, "src/data-context.ts": `import { createDataContext } from "@altertable/data-app/react";
22518
- import { connectionQueryNames } from "@altertable/data-app/contract";
22686
+ import { defineQueryNames } from "@altertable/data-app/contract";
22687
+ import type app from "#app/config.ts";
22519
22688
 
22520
22689
  /** Setup context only. Replace it with the exploration's scope, exact definitions, limitations,
22521
22690
  * and query evidence after inspecting the source data. */
22522
- export const dataContext = createDataContext(connectionQueryNames)({
22691
+ const queryNames = defineQueryNames({
22692
+ connection: "connection" satisfies keyof typeof app.queries,
22693
+ });
22694
+
22695
+ export const dataContext = createDataContext(queryNames)({
22523
22696
  description:
22524
22697
  "This starter runs a lightweight query to verify that the selected lakehouse profile can execute SQL. It does not check access to individual datasets. Replace the check with a query that answers a real question before sharing the app.",
22525
22698
  glossary: {
22526
22699
  connectionVerified: {
22527
22700
  term: "Connected",
22528
22701
  definition: "The latest connection-check query completed successfully.",
22529
- queryNames: [connectionQueryNames.connection],
22702
+ queryNames: [queryNames.connection],
22530
22703
  },
22531
22704
  },
22532
22705
  });
@@ -22562,12 +22735,38 @@ import { App } from "#app/App.tsx";
22562
22735
  import app from "#app/config.ts";
22563
22736
 
22564
22737
  injectDataAppStyles();
22565
- mountDataApp({ config: app, component: App });
22738
+ mountDataApp({ app, component: App });
22566
22739
  `, "src/operations.ts": `import { connectionCheck } from "@altertable/data-app/contract";
22740
+ import app from "#app/config.ts";
22567
22741
 
22568
22742
  /** Connectivity probe only: its successful query supplies no analytical result. Replace it with
22569
22743
  * bounded, validated operations that cover the questions the finished app will answer. */
22570
- export const operations = { connection: connectionCheck() };
22744
+ export const operations = { connection: connectionCheck(app.queries) };
22745
+ `, "src/preview.ts": `import { resolve } from "node:path";
22746
+ import { localLakehouse } from "@altertable/data-app/server/bun";
22747
+ import { serveAppFile } from "@altertable/data-app/server/bun/preview";
22748
+
22749
+ const preview = await serveAppFile({
22750
+ file: resolve(import.meta.dir, "../index.tsx"),
22751
+ port: Number(process.env.PORT ?? 25837),
22752
+ lakehouse: localLakehouse(),
22753
+ });
22754
+
22755
+ let stopping = false;
22756
+ async function shutdown() {
22757
+ if (stopping) return;
22758
+ stopping = true;
22759
+ try {
22760
+ await preview.stop();
22761
+ process.exit(0);
22762
+ } catch (error) {
22763
+ console.error(error);
22764
+ process.exit(1);
22765
+ }
22766
+ }
22767
+ process.on("SIGINT", shutdown);
22768
+ process.on("SIGTERM", shutdown);
22769
+ console.log(\`Data app running at \${preview.url}\`);
22571
22770
  `, "src/server.ts": `import page from "#app/index.html";
22572
22771
  import { serveLocalApp } from "@altertable/data-app/server/bun";
22573
22772
  import { operations } from "#app/operations.ts";
@@ -22977,7 +23176,6 @@ async function check() {
22977
23176
  !/^[a-z][a-z0-9-]*$/.test(name) ||
22978
23177
  !operation ||
22979
23178
  typeof operation.input !== "function" ||
22980
- typeof operation.output !== "function" ||
22981
23179
  typeof operation.run !== "function" ||
22982
23180
  !Array.isArray(operation.checks) ||
22983
23181
  !operation.checks.length ||
@@ -22989,7 +23187,7 @@ async function check() {
22989
23187
  (!Number.isInteger(operation.policy.maxResponseBytes) ||
22990
23188
  operation.policy.maxResponseBytes < 1))
22991
23189
  ) {
22992
- throw new Error(\`Operation "\${name}" needs input and output parsers, check inputs, and limits.\`);
23190
+ throw new Error(\`Operation "\${name}" needs an input parser, a run function, check inputs, and limits.\`);
22993
23191
  }
22994
23192
  for (const input of operation.checks) {
22995
23193
  try {
@@ -24232,6 +24430,11 @@ var ROOT_ARGS = defineArguments({
24232
24430
  description: "Agent-friendly preset: structured JSON output, no pager or terminal styling",
24233
24431
  flagScope: "global"
24234
24432
  },
24433
+ "no-agent": {
24434
+ type: "boolean",
24435
+ description: "Disable agent mode, including automatic detection",
24436
+ flagScope: "global"
24437
+ },
24235
24438
  "no-color": {
24236
24439
  type: "boolean",
24237
24440
  description: "Disable terminal colors and styling",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altertable/cli",
3
- "version": "1.10.1",
3
+ "version": "1.12.0",
4
4
  "description": "Altertable CLI — query and manage your data platform",
5
5
  "homepage": "https://github.com/altertable-ai/altertable-cli#readme",
6
6
  "bugs": {