@lotics/cli 0.127.0 → 0.129.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/src/cli.js +11 -18
  2. package/package.json +1 -1
package/dist/src/cli.js CHANGED
@@ -45588,7 +45588,7 @@ import { tmpdir } from "node:os";
45588
45588
 
45589
45589
  // src/starter_template.ts
45590
45590
  var STARTER_FALLBACK_UI_VERSION = "28.1.0";
45591
- var STARTER_FALLBACK_SDK_VERSION = "0.52.0";
45591
+ var STARTER_FALLBACK_SDK_VERSION = "0.73.0";
45592
45592
  var STARTER_REACT_NATIVE_VERSION = "0.85.3";
45593
45593
  var VITEST_SETUP_FILENAME = "vitest.setup.ts";
45594
45594
  var VITEST_SETUP_CONTENT = `import { vi } from "vitest";
@@ -64788,6 +64788,7 @@ var querySourceSchema = zod_default.lazy(
64788
64788
  zod_default.object({ expression: zod_default.string() })
64789
64789
  ])
64790
64790
  );
64791
+ var FILES_PROJECTION_MAX_LIMIT = 10;
64791
64792
  var queryProjectionColumnObjectSchema = zod_default.object({
64792
64793
  output: zod_default.string().optional().describe(
64793
64794
  "Output column name. Omit for a passthrough \u2014 it defaults to the source field key. Required only to rename, or for a computed source."
@@ -64803,6 +64804,9 @@ var queryProjectionColumnObjectSchema = zod_default.object({
64803
64804
  kind: zod_default.literal("source_field").describe("Currently the only writable target kind")
64804
64805
  }).optional().describe(
64805
64806
  "Marks this column as writable through to the originating source field. Valid only when `source` is a bare-string field reference and upstream addressing (source_table_id, source_field_key) is unambiguous. The compiler validates this and rejects otherwise."
64807
+ ),
64808
+ limit: zod_default.number().int().min(1).max(FILES_PROJECTION_MAX_LIMIT).optional().describe(
64809
+ "FILES columns only: return at most this many entries per cell, in stored order. For a list that renders ONE thumbnail per row \u2014 without it the column yields the whole array and the response pays to resolve every entry it will never show."
64806
64810
  )
64807
64811
  });
64808
64812
  var queryProjectionColumnSchema = zod_default.union([
@@ -70376,16 +70380,13 @@ function stripAgentHeader(text) {
70376
70380
  return text.replace(/<!--\s*lotics:[\s\S]*?-->\n?/g, "").replace(/\n{3,}/g, "\n\n").trim();
70377
70381
  }
70378
70382
 
70379
- // src/app_commands.ts
70380
- async function fetchLatestNpmVersion(packageName) {
70383
+ // src/npm_registry.ts
70384
+ async function fetchLatestNpmVersion(packageName, { timeoutMs = 1500 } = {}) {
70381
70385
  try {
70382
- const controller = new AbortController();
70383
- const timeout = setTimeout(() => controller.abort(), 1500);
70384
70386
  const response = await fetch(`https://registry.npmjs.org/${packageName}/latest`, {
70385
- signal: controller.signal,
70387
+ signal: AbortSignal.timeout(timeoutMs),
70386
70388
  headers: { accept: "application/json" }
70387
70389
  });
70388
- clearTimeout(timeout);
70389
70390
  if (!response.ok) return null;
70390
70391
  const body = await response.json();
70391
70392
  return typeof body.version === "string" ? body.version : null;
@@ -70393,6 +70394,8 @@ async function fetchLatestNpmVersion(packageName) {
70393
70394
  return null;
70394
70395
  }
70395
70396
  }
70397
+
70398
+ // src/app_commands.ts
70396
70399
  function orderedLike(value2, template) {
70397
70400
  if (Array.isArray(value2)) {
70398
70401
  const t = Array.isArray(template) ? template : [];
@@ -70740,16 +70743,6 @@ function readAppMeta(projectDir) {
70740
70743
  capabilities: pkg2.lotics.capabilities
70741
70744
  };
70742
70745
  }
70743
- var APP_META_KEYS = Object.keys({
70744
- app_id: true,
70745
- workspace_id: true,
70746
- current_version_id: true,
70747
- version_number: true,
70748
- workflows: true,
70749
- queries: true,
70750
- agents: true,
70751
- capabilities: true
70752
- });
70753
70746
  function writeAppMeta(projectDir, meta3) {
70754
70747
  const pkgPath2 = path7.join(projectDir, "package.json");
70755
70748
  const pkg2 = JSON.parse(fs6.readFileSync(pkgPath2, "utf-8"));
@@ -70903,6 +70896,7 @@ function writeAppDts(projectDir, manifest) {
70903
70896
  writeDevLinkTsconfig(projectDir);
70904
70897
  writeKitTypeAugmentation(projectDir);
70905
70898
  ensureAppTsconfig(projectDir);
70899
+ ensureAppVitestSetup(projectDir);
70906
70900
  return written.map(([file2]) => file2);
70907
70901
  }
70908
70902
  function readCodegenTablesAllowlist(projectDir) {
@@ -70930,7 +70924,6 @@ function writeBindingAppFields(projectDir, binding) {
70930
70924
  fs6.mkdirSync(dotLotics, { recursive: true });
70931
70925
  const file2 = path7.join(dotLotics, "app_fields.ts");
70932
70926
  fs6.writeFileSync(file2, generatePackageAppFields(binding));
70933
- ensureAppVitestSetup(projectDir);
70934
70927
  return file2;
70935
70928
  }
70936
70929
  async function writeGeneratedAppFields(client, projectDir, app, queries) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lotics/cli",
3
- "version": "0.127.0",
3
+ "version": "0.129.0",
4
4
  "description": "Lotics SDK and CLI for AI agents",
5
5
  "type": "module",
6
6
  "bin": {