@appilots/cli 0.10.0 → 0.11.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.
package/dist/index.mjs CHANGED
@@ -8104,7 +8104,7 @@ var coerce = {
8104
8104
  };
8105
8105
  var NEVER = INVALID;
8106
8106
 
8107
- // ../shared/dist/chunk-PKS3VDNB.mjs
8107
+ // ../shared/dist/chunk-MKT45LRA.mjs
8108
8108
  var locatorSourceSchema = external_exports.enum([
8109
8109
  "appilotsId",
8110
8110
  "testID",
@@ -8430,9 +8430,16 @@ var createProjectSchema = external_exports.object({
8430
8430
  // Reference to a tenant-scoped provider (preferred). Optional at
8431
8431
  // creation so a project can be created and configured later.
8432
8432
  providerId: external_exports.string().min(1).optional(),
8433
- systemPrompt: external_exports.string().max(4096).optional()
8433
+ // 16k chars (~4k tokens): um prompt de CS real não cabe em 4096 — o
8434
+ // primeiro cliente de produção chegou com 6.385 e tomou 'Invalid input'
8435
+ // sem saber por quê. O teto continua existindo porque o systemPrompt
8436
+ // entra em TODO hop do relay: é proteção de TPM, não de gosto.
8437
+ systemPrompt: external_exports.string().max(16e3).optional()
8438
+ });
8439
+ createProjectSchema.partial().extend({
8440
+ providerId: external_exports.string().min(1).nullable().optional(),
8441
+ systemPrompt: external_exports.string().max(16e3).nullable().optional()
8434
8442
  });
8435
- createProjectSchema.partial();
8436
8443
  var providerKindSchema = external_exports.enum(["openai", "anthropic", "custom"]);
8437
8444
  external_exports.object({
8438
8445
  name: external_exports.string().min(1).max(100),
@@ -10132,6 +10139,18 @@ function loadConfig(onWarn) {
10132
10139
  } else if (!env.apiKey) {
10133
10140
  return null;
10134
10141
  }
10142
+ const legacyWarnings = [];
10143
+ if (fileConfig.serverUrl === void 0) {
10144
+ for (const [alias, canonical] of Object.entries(KEY_ALIASES)) {
10145
+ if (canonical !== "serverUrl" || fileConfig[alias] === void 0) continue;
10146
+ fileConfig.serverUrl = fileConfig[alias];
10147
+ delete fileConfig[alias];
10148
+ legacyWarnings.push(
10149
+ `legacy key "${alias}" \u2014 using it as "serverUrl"; rename it in .appilotsrc`
10150
+ );
10151
+ break;
10152
+ }
10153
+ }
10135
10154
  const merged = {
10136
10155
  serverUrl: DEFAULT_SERVER_URL,
10137
10156
  outputDir: ".appilots",
@@ -10143,6 +10162,20 @@ function loadConfig(onWarn) {
10143
10162
  ...env.serverUrl ? { serverUrl: env.serverUrl } : {}
10144
10163
  };
10145
10164
  const validation = validateConfig(merged);
10165
+ validation.warnings.unshift(...legacyWarnings);
10166
+ if (fileConfig.serverUrl === void 0 && env.serverUrl === void 0) {
10167
+ for (const key of Object.keys(fileConfig)) {
10168
+ if (KNOWN_CONFIG_KEYS.includes(key)) continue;
10169
+ if (suggestConfigKey(key) !== "serverUrl") continue;
10170
+ validation.warnings = validation.warnings.filter(
10171
+ (warning) => !warning.startsWith(`unknown key "${key}"`)
10172
+ );
10173
+ validation.errors.push(
10174
+ `unknown key "${key}" looks like "serverUrl" \u2014 not falling back to ${DEFAULT_SERVER_URL}; rename the key to "serverUrl"`
10175
+ );
10176
+ validation.valid = false;
10177
+ }
10178
+ }
10146
10179
  if (onWarn) {
10147
10180
  const source = configPath ?? "environment variables";
10148
10181
  for (const warning of validation.warnings) {
@@ -10562,7 +10595,7 @@ var AppilotsAPIClient = class {
10562
10595
  };
10563
10596
 
10564
10597
  // src/version.ts
10565
- var CLI_VERSION = "0.10.0";
10598
+ var CLI_VERSION = "0.11.0";
10566
10599
 
10567
10600
  export { AppilotsAPIClient, CLI_VERSION, ComponentAnalyzer, DEFAULT_MANIFEST_FILENAME, DEFAULT_WEB_SCREEN_PATTERNS, FormAnalyzer, GenericPlatformAnalyzer, MCPGenerator, NavigationAnalyzer, ReactNativePlatformAnalyzer, ReactWebPlatformAnalyzer, ScreenAnalyzer, WebNavigationAnalyzer, WebScreenAnalyzer, formatMetadataWarnings, getConfigPath, getEnvOverrides, lintActionMetadata, loadConfig, loadManifest, mergeManifestNavigation, mergeManifestScreens, resolvePathToScreen, saveConfig, screenNameFromPath, validateConfig };
10568
10601
  //# sourceMappingURL=index.mjs.map