@palmyr/cli 1.9.0 → 1.9.1

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/cli.js CHANGED
@@ -778,12 +778,14 @@ const TWITTER_HELP = {
778
778
  ],
779
779
  buy: [
780
780
  { flag: '(no args)', desc: 'Purchase the oldest ready X account from the supplier pool. Default for every filter below is random.' },
781
- { flag: '--country <CC>', desc: 'Filter to a specific country (ISO alpha-2: US, GB, DE, …). Run `pool-prices` first to see what is priced.' },
782
- { flag: '--source web|mobile', desc: 'Filter by registration source from X about-profile. Multiplies country price by source multiplier (default 1.0).' },
783
- { flag: '--max-renames N', desc: 'Cap username-change count. --max-renames 0 = never renamed. NULL on row means unknown → does not match.' },
781
+ { flag: '--country <CC>', desc: 'Filter by RESIDENCY (X about_profile.account_based_in). ISO alpha-2 US, GB, DE, …. Run `pool-prices` to see what is priced.' },
782
+ { flag: '--registered-country <CC>', desc: 'Filter by REGISTRATION country where the X account was created from (parsed from X "Connected via" string). May differ from --country.' },
783
+ { flag: '--platform android|ios|web', desc: 'Filter by registration platform (also parsed from X "Connected via" string).' },
784
+ { flag: '--max-renames N', desc: 'Cap username-change count. --max-renames 0 = never renamed. Rows with unknown rename count do not match.' },
785
+ { flag: '--source "raw string"', desc: 'Power-user: exact-match against the lowercased raw "Connected via" string. Used for fine-grained source_multiplier pricing.' },
784
786
  { flag: '--age 1y|2y|...', desc: 'Optional age category filter' },
785
787
  { flag: '(price)', desc: '$5 USDC default; country_price * source_multiplier when filters are passed.' },
786
- { flag: '(example)', desc: 'palmyr twitter buy --country US --source web --max-renames 0' },
788
+ { flag: '(example)', desc: 'palmyr twitter buy --country GB --registered-country GB --platform android --max-renames 0' },
787
789
  ],
788
790
  login: [
789
791
  { flag: '<username>', desc: 'Force a fresh server-side session (browser runtime)' },
@@ -6274,17 +6276,27 @@ async function main() {
6274
6276
  return print({ success: true, platform, username, op: subcommand, ...(data?.data || {}) });
6275
6277
  }
6276
6278
  case 'buy': {
6277
- // Agents say "buy" with optional --country / --source / --max-renames.
6278
- // Each filter is independent (default: random across that
6279
- // dimension). Pricing = country_price * source_multiplier:
6280
- // - --country US → country_prices.US (e.g. $8)
6281
- // - --source web → multiplied by web's row in
6282
- // source_multipliers (e.g. 1.2)
6283
- // - --max-renames 0 filter only, no price impact
6284
- // Without --country, falls back to the legacy $5 flat rate.
6279
+ // Agents say "buy" with optional filters. Each is independent
6280
+ // (default: random across that dimension).
6281
+ //
6282
+ // --country GB account_based_in = United Kingdom (residency)
6283
+ // --registered-country GB X's "Connected via …" country
6284
+ // --platform android|ios|web X's "Connected via" platform
6285
+ // --max-renames 0 never-renamed accounts only
6286
+ // --source "raw string" exact-match on the raw "Connected via" string (power user)
6287
+ //
6288
+ // Pricing = country_price * source_multiplier (multiplier
6289
+ // defaults to 1.0 when no source row exists). Without --country,
6290
+ // falls back to the legacy $5 flat rate.
6285
6291
  const country = (flags.country || '').trim().toUpperCase() || undefined;
6286
6292
  const ageCategory = flags.age || flags['age-category'] || undefined;
6287
6293
  const source = (flags.source || '').trim().toLowerCase() || undefined;
6294
+ const registeredCountry = (flags['registered-country'] || '').trim().toUpperCase() || undefined;
6295
+ const platformFlag = (flags.platform || '').trim().toLowerCase() || undefined;
6296
+ if (platformFlag && !['android', 'ios', 'web'].includes(platformFlag)) {
6297
+ err('--platform must be one of: android, ios, web');
6298
+ }
6299
+ const registeredPlatform = platformFlag;
6288
6300
  const maxRenamesRaw = flags['max-renames'];
6289
6301
  const maxUsernameChanges = maxRenamesRaw === undefined || maxRenamesRaw === ''
6290
6302
  ? undefined
@@ -6294,7 +6306,12 @@ async function main() {
6294
6306
  }
6295
6307
  let data;
6296
6308
  try {
6297
- data = await ao.socialTwitterBuy(country, ageCategory, { source, maxUsernameChanges });
6309
+ data = await ao.socialTwitterBuy(country, ageCategory, {
6310
+ source,
6311
+ registeredCountry,
6312
+ registeredPlatform,
6313
+ maxUsernameChanges,
6314
+ });
6298
6315
  }
6299
6316
  catch (e) {
6300
6317
  err(`Buy failed: ${e.message}`, EXIT.GENERAL);
@@ -6308,6 +6325,8 @@ async function main() {
6308
6325
  // pre-seasoned at pool-add time.
6309
6326
  const filterTags = [
6310
6327
  country && `country=${country}`,
6328
+ registeredCountry && `registered_country=${registeredCountry}`,
6329
+ registeredPlatform && `platform=${registeredPlatform}`,
6311
6330
  source && `source=${source}`,
6312
6331
  maxUsernameChanges !== undefined && `max_renames=${maxUsernameChanges}`,
6313
6332
  ].filter(Boolean).join(', ');
@@ -6323,6 +6342,8 @@ async function main() {
6323
6342
  platform,
6324
6343
  username: summary.username,
6325
6344
  country: account.country,
6345
+ registered_country: account.registered_country,
6346
+ registered_platform: account.registered_platform,
6326
6347
  source: account.source,
6327
6348
  username_change_count: account.username_change_count,
6328
6349
  account_based_in: account.account_based_in,