teleton 0.7.3 → 0.7.4

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/index.js CHANGED
@@ -1,7 +1,10 @@
1
+ import {
2
+ getModelsForProvider
3
+ } from "../chunk-QOQWUUA4.js";
1
4
  import {
2
5
  TelegramUserClient,
3
6
  main
4
- } from "../chunk-BU453WX4.js";
7
+ } from "../chunk-LAQOUFOJ.js";
5
8
  import "../chunk-WIKM24GZ.js";
6
9
  import "../chunk-U7FQYCBQ.js";
7
10
  import {
@@ -13,7 +16,7 @@ import {
13
16
  readRawConfig,
14
17
  setNestedValue,
15
18
  writeRawConfig
16
- } from "../chunk-A4GCOHCE.js";
19
+ } from "../chunk-YFG2QHLA.js";
17
20
  import {
18
21
  ConfigSchema,
19
22
  DealsConfigSchema,
@@ -24,7 +27,7 @@ import {
24
27
  loadWallet,
25
28
  saveWallet,
26
29
  walletExists
27
- } from "../chunk-DAMCNMYL.js";
30
+ } from "../chunk-BGC2IUM5.js";
28
31
  import "../chunk-TSKJCWQQ.js";
29
32
  import {
30
33
  getErrorMessage
@@ -40,9 +43,9 @@ import {
40
43
  validateApiKeyFormat
41
44
  } from "../chunk-RMLQS3X6.js";
42
45
  import "../chunk-OCLG5GKI.js";
43
- import "../chunk-RBU6JXD3.js";
46
+ import "../chunk-XDYDA2KV.js";
44
47
  import "../chunk-UCN6TI25.js";
45
- import "../chunk-FNV5FF35.js";
48
+ import "../chunk-EK7M5K26.js";
46
49
  import "../chunk-XBKSS6DM.js";
47
50
  import {
48
51
  TELEGRAM_MAX_MESSAGE_LENGTH
@@ -360,12 +363,12 @@ import { join } from "path";
360
363
  import YAML from "yaml";
361
364
  import ora2 from "ora";
362
365
  var STEPS = [
363
- { label: "Agent", desc: "Name & mode" },
364
- { label: "Provider", desc: "LLM & API key" },
365
- { label: "Telegram", desc: "Credentials" },
366
- { label: "Config", desc: "Model & policies" },
367
- { label: "Modules", desc: "Optional features" },
366
+ { label: "Agent", desc: "Name" },
367
+ { label: "Provider", desc: "LLM, key & model" },
368
+ { label: "Config", desc: "Policies" },
369
+ { label: "Modules", desc: "Optional API keys" },
368
370
  { label: "Wallet", desc: "TON blockchain" },
371
+ { label: "Telegram", desc: "Credentials" },
369
372
  { label: "Connect", desc: "Telegram auth" }
370
373
  ];
371
374
  function redraw(currentStep) {
@@ -377,114 +380,9 @@ function redraw(currentStep) {
377
380
  function sleep(ms) {
378
381
  return new Promise((r) => setTimeout(r, ms));
379
382
  }
380
- var MODEL_OPTIONS = {
381
- anthropic: [
382
- {
383
- value: "claude-opus-4-6",
384
- name: "Claude Opus 4.6",
385
- description: "Most capable, 1M ctx, $5/M"
386
- },
387
- {
388
- value: "claude-opus-4-5-20251101",
389
- name: "Claude Opus 4.5",
390
- description: "Previous gen, 200K ctx, $5/M"
391
- },
392
- { value: "claude-sonnet-4-0", name: "Claude Sonnet 4", description: "Balanced, $3/M" },
393
- {
394
- value: "claude-haiku-4-5-20251001",
395
- name: "Claude Haiku 4.5",
396
- description: "Fast & cheap, $1/M"
397
- },
398
- {
399
- value: "claude-haiku-4-5-20251001",
400
- name: "Claude Haiku 4.5",
401
- description: "Fast & cheap, $1/M"
402
- }
403
- ],
404
- openai: [
405
- { value: "gpt-5", name: "GPT-5", description: "Most capable, 400K ctx, $1.25/M" },
406
- { value: "gpt-4o", name: "GPT-4o", description: "Balanced, 128K ctx, $2.50/M" },
407
- { value: "gpt-4.1", name: "GPT-4.1", description: "1M ctx, $2/M" },
408
- { value: "gpt-4.1-mini", name: "GPT-4.1 Mini", description: "1M ctx, cheap, $0.40/M" },
409
- { value: "o3", name: "o3", description: "Reasoning, 200K ctx, $2/M" }
410
- ],
411
- google: [
412
- { value: "gemini-2.5-flash", name: "Gemini 2.5 Flash", description: "Fast, 1M ctx, $0.30/M" },
413
- {
414
- value: "gemini-2.5-pro",
415
- name: "Gemini 2.5 Pro",
416
- description: "Most capable, 1M ctx, $1.25/M"
417
- },
418
- { value: "gemini-2.0-flash", name: "Gemini 2.0 Flash", description: "Cheap, 1M ctx, $0.10/M" }
419
- ],
420
- xai: [
421
- { value: "grok-4-fast", name: "Grok 4 Fast", description: "Vision, 2M ctx, $0.20/M" },
422
- { value: "grok-4", name: "Grok 4", description: "Reasoning, 256K ctx, $3/M" },
423
- { value: "grok-3", name: "Grok 3", description: "Stable, 131K ctx, $3/M" }
424
- ],
425
- groq: [
426
- {
427
- value: "meta-llama/llama-4-maverick-17b-128e-instruct",
428
- name: "Llama 4 Maverick",
429
- description: "Vision, 131K ctx, $0.20/M"
430
- },
431
- { value: "qwen/qwen3-32b", name: "Qwen3 32B", description: "Reasoning, 131K ctx, $0.29/M" },
432
- {
433
- value: "deepseek-r1-distill-llama-70b",
434
- name: "DeepSeek R1 70B",
435
- description: "Reasoning, 131K ctx, $0.75/M"
436
- },
437
- {
438
- value: "llama-3.3-70b-versatile",
439
- name: "Llama 3.3 70B",
440
- description: "General purpose, 131K ctx, $0.59/M"
441
- }
442
- ],
443
- openrouter: [
444
- { value: "anthropic/claude-opus-4.5", name: "Claude Opus 4.5", description: "200K ctx, $5/M" },
445
- { value: "openai/gpt-5", name: "GPT-5", description: "400K ctx, $1.25/M" },
446
- { value: "google/gemini-2.5-flash", name: "Gemini 2.5 Flash", description: "1M ctx, $0.30/M" },
447
- {
448
- value: "deepseek/deepseek-r1",
449
- name: "DeepSeek R1",
450
- description: "Reasoning, 64K ctx, $0.70/M"
451
- },
452
- { value: "x-ai/grok-4", name: "Grok 4", description: "256K ctx, $3/M" }
453
- ],
454
- moonshot: [
455
- { value: "kimi-k2.5", name: "Kimi K2.5", description: "Free, 256K ctx, multimodal" },
456
- {
457
- value: "kimi-k2-thinking",
458
- name: "Kimi K2 Thinking",
459
- description: "Free, 256K ctx, reasoning"
460
- }
461
- ],
462
- mistral: [
463
- {
464
- value: "devstral-small-2507",
465
- name: "Devstral Small",
466
- description: "Coding, 128K ctx, $0.10/M"
467
- },
468
- {
469
- value: "devstral-medium-latest",
470
- name: "Devstral Medium",
471
- description: "Coding, 262K ctx, $0.40/M"
472
- },
473
- {
474
- value: "mistral-large-latest",
475
- name: "Mistral Large",
476
- description: "General, 128K ctx, $2/M"
477
- },
478
- {
479
- value: "magistral-small",
480
- name: "Magistral Small",
481
- description: "Reasoning, 128K ctx, $0.50/M"
482
- }
483
- ]
484
- };
485
383
  async function onboardCommand(options = {}) {
486
384
  if (options.ui) {
487
- const { SetupServer } = await import("../setup-server-BVVD2PR6.js");
385
+ const { SetupServer } = await import("../setup-server-YHYJLAMA.js");
488
386
  const port = parseInt(options.uiPort || "7777") || 7777;
489
387
  const url = `http://localhost:${port}/setup`;
490
388
  const blue2 = "\x1B[34m";
@@ -539,9 +437,7 @@ ${blue2} \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u25
539
437
  }
540
438
  }
541
439
  async function runInteractiveOnboarding(options, prompter) {
542
- let selectedFlow = "quick";
543
440
  let selectedProvider = "anthropic";
544
- const dealsEnabled = true;
545
441
  let selectedModel = "";
546
442
  let apiKey = "";
547
443
  let apiId = 0;
@@ -557,8 +453,6 @@ async function runInteractiveOnboarding(options, prompter) {
557
453
  let requireMention = true;
558
454
  let maxAgenticIterations = "5";
559
455
  let cocoonInstance = 1e4;
560
- let buyMaxFloorPercent = 100;
561
- let sellMinFloorPercent = 105;
562
456
  console.clear();
563
457
  console.log();
564
458
  console.log(wizardFrame(0, STEPS));
@@ -585,7 +479,8 @@ async function runInteractiveOnboarding(options, prompter) {
585
479
  spinner.start(DIM("Creating workspace..."));
586
480
  const workspace = await ensureWorkspace({
587
481
  workspaceDir: options.workspace,
588
- ensureTemplates: true
482
+ ensureTemplates: true,
483
+ silent: true
589
484
  });
590
485
  const isNew = isNewWorkspace(workspace);
591
486
  spinner.succeed(DIM(`Workspace: ${workspace.root}`));
@@ -613,20 +508,7 @@ async function runInteractiveOnboarding(options, prompter) {
613
508
  const updated = identity.replace("[Your name - pick one or ask your human]", agentName.trim());
614
509
  writeFileSync(workspace.identityPath, updated, "utf-8");
615
510
  }
616
- selectedFlow = await select({
617
- message: "Installation mode",
618
- default: "quick",
619
- theme: inquirerTheme,
620
- choices: [
621
- {
622
- value: "quick",
623
- name: "\u26A1 QuickStart",
624
- description: "Minimal configuration (recommended)"
625
- },
626
- { value: "advanced", name: "\u2699 Advanced", description: "Detailed configuration" }
627
- ]
628
- });
629
- STEPS[0].value = `${agentName} (${selectedFlow})`;
511
+ STEPS[0].value = agentName;
630
512
  redraw(1);
631
513
  const providers = getSupportedProviders();
632
514
  selectedProvider = await select({
@@ -776,63 +658,9 @@ Get it at: ${providerMeta.consoleUrl}`,
776
658
  const maskedKey = apiKey.length > 10 ? apiKey.slice(0, 6) + "..." + apiKey.slice(-4) : "***";
777
659
  STEPS[1].value = `${providerMeta.displayName} ${DIM(maskedKey)}`;
778
660
  }
779
- redraw(2);
780
- noteBox(
781
- "You need Telegram credentials from https://my.telegram.org/apps\nCreate an application and note the API ID and API Hash",
782
- "Telegram",
783
- TON
784
- );
785
- const envApiId = process.env.TELETON_TG_API_ID;
786
- const envApiHash = process.env.TELETON_TG_API_HASH;
787
- const envPhone = process.env.TELETON_TG_PHONE;
788
- const apiIdStr = options.apiId ? options.apiId.toString() : await input({
789
- message: envApiId ? "API ID (from env)" : "API ID (from my.telegram.org)",
790
- default: envApiId,
791
- theme: inquirerTheme,
792
- validate: (value) => {
793
- if (!value || isNaN(parseInt(value))) return "Invalid API ID (must be a number)";
794
- return true;
795
- }
796
- });
797
- apiId = parseInt(apiIdStr);
798
- apiHash = options.apiHash ? options.apiHash : await input({
799
- message: envApiHash ? "API Hash (from env)" : "API Hash (from my.telegram.org)",
800
- default: envApiHash,
801
- theme: inquirerTheme,
802
- validate: (value) => {
803
- if (!value || value.length < 10) return "Invalid API Hash";
804
- return true;
805
- }
806
- });
807
- phone = options.phone ? options.phone : await input({
808
- message: envPhone ? "Phone number (from env)" : "Phone number (international format)",
809
- default: envPhone,
810
- theme: inquirerTheme,
811
- validate: (value) => {
812
- if (!value || !value.startsWith("+")) return "Must start with +";
813
- return true;
814
- }
815
- });
816
- noteBox(
817
- "To get your Telegram User ID:\n1. Open @userinfobot on Telegram\n2. Send /start\n3. Note the ID displayed",
818
- "User ID",
819
- TON
820
- );
821
- const userIdStr = options.userId ? options.userId.toString() : await input({
822
- message: "Your Telegram User ID (for admin rights)",
823
- theme: inquirerTheme,
824
- validate: (value) => {
825
- if (!value || isNaN(parseInt(value))) return "Invalid User ID";
826
- return true;
827
- }
828
- });
829
- userId = parseInt(userIdStr);
830
- STEPS[2].value = `${phone} (ID: ${userId})`;
831
- redraw(3);
832
661
  selectedModel = providerMeta.defaultModel;
833
- if (selectedFlow === "advanced" && selectedProvider !== "cocoon" && selectedProvider !== "local") {
834
- const modelKey = selectedProvider === "claude-code" ? "anthropic" : selectedProvider;
835
- const providerModels = MODEL_OPTIONS[modelKey] || [];
662
+ if (selectedProvider !== "cocoon" && selectedProvider !== "local") {
663
+ const providerModels = getModelsForProvider(selectedProvider);
836
664
  const modelChoices = [
837
665
  ...providerModels,
838
666
  { value: "__custom__", name: "Custom", description: "Enter a model ID manually" }
@@ -853,78 +681,70 @@ Get it at: ${providerMeta.consoleUrl}`,
853
681
  } else {
854
682
  selectedModel = modelChoice;
855
683
  }
856
- dmPolicy = await select({
857
- message: "DM policy (private messages)",
858
- default: "open",
859
- theme: inquirerTheme,
860
- choices: [
861
- { value: "open", name: "Open", description: "Reply to everyone" },
862
- { value: "allowlist", name: "Allowlist", description: "Only specific users" },
863
- { value: "disabled", name: "Disabled", description: "No DM replies" }
864
- ]
865
- });
866
- groupPolicy = await select({
867
- message: "Group policy",
868
- default: "open",
869
- theme: inquirerTheme,
870
- choices: [
871
- { value: "open", name: "Open", description: "Reply in all groups" },
872
- { value: "allowlist", name: "Allowlist", description: "Only specific groups" },
873
- { value: "disabled", name: "Disabled", description: "No group replies" }
874
- ]
875
- });
876
- requireMention = await confirm({
877
- message: "Require @mention in groups?",
878
- default: true,
879
- theme: inquirerTheme
880
- });
881
- maxAgenticIterations = await input({
882
- message: "Max agentic iterations (tool call loops per message)",
883
- default: "5",
884
- theme: inquirerTheme,
885
- validate: (v) => {
886
- const n = parseInt(v, 10);
887
- return !isNaN(n) && n >= 1 && n <= 50 ? true : "Must be 1\u201350";
888
- }
889
- });
890
684
  const modelLabel = providerModels.find((m) => m.value === selectedModel)?.name ?? selectedModel;
891
- STEPS[3].value = `${modelLabel}, ${dmPolicy}/${groupPolicy}`;
892
- } else {
893
- STEPS[3].value = `${selectedModel} (defaults)`;
685
+ STEPS[1].value = `${STEPS[1].value ?? providerMeta.displayName}, ${modelLabel}`;
894
686
  }
895
- redraw(4);
896
- const extras = [];
897
- if (dealsEnabled) {
898
- const customizeStrategy = await confirm({
899
- message: `Customize trading thresholds? ${DIM("(default: buy \u2264 floor, sell \u2265 floor +5%)")}`,
900
- default: false,
901
- theme: inquirerTheme
902
- });
903
- if (customizeStrategy) {
904
- const buyInput = await input({
905
- message: "Max buy price (% of floor price)",
906
- default: "100",
907
- theme: inquirerTheme,
908
- validate: (v) => {
909
- const n = parseInt(v, 10);
910
- return !isNaN(n) && n >= 50 && n <= 150 ? true : "Must be 50\u2013150";
911
- }
912
- });
913
- buyMaxFloorPercent = parseInt(buyInput, 10);
914
- const sellInput = await input({
915
- message: "Min sell price (% of floor price)",
916
- default: "105",
917
- theme: inquirerTheme,
918
- validate: (v) => {
919
- const n = parseInt(v, 10);
920
- return !isNaN(n) && n >= 100 && n <= 200 ? true : "Must be 100\u2013200";
921
- }
922
- });
923
- sellMinFloorPercent = parseInt(sellInput, 10);
687
+ redraw(2);
688
+ noteBox(
689
+ "To get your Telegram User ID:\n1. Open @userinfobot on Telegram\n2. Send /start\n3. Note the ID displayed",
690
+ "User ID",
691
+ TON
692
+ );
693
+ const userIdStr = options.userId ? options.userId.toString() : await input({
694
+ message: "Your Telegram User ID (for admin rights)",
695
+ theme: inquirerTheme,
696
+ validate: (value) => {
697
+ if (!value || isNaN(parseInt(value))) return "Invalid User ID";
698
+ return true;
924
699
  }
700
+ });
701
+ userId = parseInt(userIdStr);
702
+ dmPolicy = await select({
703
+ message: "DM policy (private messages)",
704
+ default: "open",
705
+ theme: inquirerTheme,
706
+ choices: [
707
+ { value: "open", name: "Open", description: "Reply to everyone" },
708
+ { value: "allowlist", name: "Allowlist", description: "Only specific users" },
709
+ { value: "disabled", name: "Disabled", description: "No DM replies" }
710
+ ]
711
+ });
712
+ groupPolicy = await select({
713
+ message: "Group policy",
714
+ default: "open",
715
+ theme: inquirerTheme,
716
+ choices: [
717
+ { value: "open", name: "Open", description: "Reply in all groups" },
718
+ { value: "allowlist", name: "Allowlist", description: "Only specific groups" },
719
+ { value: "disabled", name: "Disabled", description: "No group replies" }
720
+ ]
721
+ });
722
+ requireMention = await confirm({
723
+ message: "Require @mention in groups?",
724
+ default: true,
725
+ theme: inquirerTheme
726
+ });
727
+ maxAgenticIterations = await input({
728
+ message: "Max agentic iterations (tool call loops per message)",
729
+ default: "5",
730
+ theme: inquirerTheme,
731
+ validate: (v) => {
732
+ const n = parseInt(v, 10);
733
+ return !isNaN(n) && n >= 1 && n <= 50 ? true : "Must be 1\u201350";
734
+ }
735
+ });
736
+ STEPS[2].value = `${dmPolicy}/${groupPolicy}`;
737
+ redraw(3);
738
+ const extras = [];
739
+ const setupBot = await confirm({
740
+ message: `Add a Telegram bot token? ${DIM("(recommended \u2014 enables deals & inline buttons)")}`,
741
+ default: true,
742
+ theme: inquirerTheme
743
+ });
744
+ if (setupBot) {
925
745
  noteBox(
926
746
  "Create a bot with @BotFather on Telegram:\n1. Send /newbot and follow the instructions\n2. Copy the bot token\n3. Enable inline mode: /setinline on the bot",
927
- "Deals Bot",
747
+ "Bot Token",
928
748
  TON
929
749
  );
930
750
  const tokenInput = await password({
@@ -945,6 +765,7 @@ Get it at: ${providerMeta.consoleUrl}`,
945
765
  botToken = tokenInput;
946
766
  botUsername = data.result.username;
947
767
  spinner.succeed(DIM(`Bot verified: @${botUsername}`));
768
+ extras.push("Bot");
948
769
  }
949
770
  } catch {
950
771
  spinner.warn(DIM("Could not validate bot token (network error) \u2014 saving anyway"));
@@ -958,8 +779,8 @@ Get it at: ${providerMeta.consoleUrl}`,
958
779
  }
959
780
  });
960
781
  botUsername = usernameInput;
782
+ extras.push("Bot");
961
783
  }
962
- extras.push("Deals");
963
784
  }
964
785
  const setupTonapi = await confirm({
965
786
  message: `Add a TonAPI key? ${DIM("(optional, recommended for 10x rate limits)")}`,
@@ -1005,8 +826,8 @@ Get it at: ${providerMeta.consoleUrl}`,
1005
826
  tavilyApiKey = keyInput;
1006
827
  extras.push("Tavily");
1007
828
  }
1008
- STEPS[4].value = extras.length ? extras.join(", ") : "defaults";
1009
- redraw(5);
829
+ STEPS[3].value = extras.length ? extras.join(", ") : "defaults";
830
+ redraw(4);
1010
831
  let wallet;
1011
832
  const existingWallet = walletExists() ? loadWallet() : null;
1012
833
  if (existingWallet) {
@@ -1047,10 +868,38 @@ Get it at: ${providerMeta.consoleUrl}`,
1047
868
  spinner.succeed(DIM("New TON wallet generated"));
1048
869
  }
1049
870
  } else {
1050
- spinner.start(DIM("Generating TON wallet..."));
1051
- wallet = await generateWallet();
1052
- saveWallet(wallet);
1053
- spinner.succeed(DIM("TON wallet generated"));
871
+ const walletAction = await select({
872
+ message: "TON Wallet",
873
+ default: "generate",
874
+ theme: inquirerTheme,
875
+ choices: [
876
+ {
877
+ value: "generate",
878
+ name: "Generate new wallet",
879
+ description: "Create a fresh TON wallet"
880
+ },
881
+ { value: "import", name: "Import from mnemonic", description: "Restore from 24-word seed" }
882
+ ]
883
+ });
884
+ if (walletAction === "import") {
885
+ const mnemonicInput = await input({
886
+ message: "Enter your 24-word mnemonic (space-separated)",
887
+ theme: inquirerTheme,
888
+ validate: (value = "") => {
889
+ const words = value.trim().split(/\s+/);
890
+ return words.length === 24 ? true : `Expected 24 words, got ${words.length}`;
891
+ }
892
+ });
893
+ spinner.start(DIM("Importing wallet..."));
894
+ wallet = await importWallet(mnemonicInput.trim().split(/\s+/));
895
+ saveWallet(wallet);
896
+ spinner.succeed(DIM(`Wallet imported: ${wallet.address}`));
897
+ } else {
898
+ spinner.start(DIM("Generating TON wallet..."));
899
+ wallet = await generateWallet();
900
+ saveWallet(wallet);
901
+ spinner.succeed(DIM("TON wallet generated"));
902
+ }
1054
903
  }
1055
904
  if (!existingWallet || wallet !== existingWallet) {
1056
905
  const W = FRAME_WIDTH;
@@ -1093,7 +942,45 @@ Get it at: ${providerMeta.consoleUrl}`,
1093
942
  theme: inquirerTheme
1094
943
  });
1095
944
  }
1096
- STEPS[5].value = `${wallet.address.slice(0, 8)}...${wallet.address.slice(-4)}`;
945
+ STEPS[4].value = `${wallet.address.slice(0, 8)}...${wallet.address.slice(-4)}`;
946
+ redraw(5);
947
+ noteBox(
948
+ 'To get your API credentials:\n\n 1. Go to https://my.telegram.org/apps\n 2. Log in with your phone number\n 3. Click "API development tools"\n 4. Create an application (any name/short name works)\n 5. Copy the API ID (number) and API Hash (hex string)\n\n\u26A0 Do NOT use a VPN \u2014 Telegram will block the login page.',
949
+ "Telegram",
950
+ TON
951
+ );
952
+ const envApiId = process.env.TELETON_TG_API_ID;
953
+ const envApiHash = process.env.TELETON_TG_API_HASH;
954
+ const envPhone = process.env.TELETON_TG_PHONE;
955
+ const apiIdStr = options.apiId ? options.apiId.toString() : await input({
956
+ message: envApiId ? "API ID (from env)" : "API ID (from my.telegram.org)",
957
+ default: envApiId,
958
+ theme: inquirerTheme,
959
+ validate: (value) => {
960
+ if (!value || isNaN(parseInt(value))) return "Invalid API ID (must be a number)";
961
+ return true;
962
+ }
963
+ });
964
+ apiId = parseInt(apiIdStr);
965
+ apiHash = options.apiHash ? options.apiHash : await input({
966
+ message: envApiHash ? "API Hash (from env)" : "API Hash (from my.telegram.org)",
967
+ default: envApiHash,
968
+ theme: inquirerTheme,
969
+ validate: (value) => {
970
+ if (!value || value.length < 10) return "Invalid API Hash";
971
+ return true;
972
+ }
973
+ });
974
+ phone = options.phone ? options.phone : await input({
975
+ message: envPhone ? "Phone number (from env)" : "Phone number (international format)",
976
+ default: envPhone,
977
+ theme: inquirerTheme,
978
+ validate: (value) => {
979
+ if (!value || !value.startsWith("+")) return "Must start with +";
980
+ return true;
981
+ }
982
+ });
983
+ STEPS[5].value = phone;
1097
984
  redraw(6);
1098
985
  const config = {
1099
986
  meta: {
@@ -1141,16 +1028,11 @@ Get it at: ${providerMeta.consoleUrl}`,
1141
1028
  },
1142
1029
  storage: {
1143
1030
  sessions_file: `${workspace.root}/sessions.json`,
1144
- pairing_file: `${workspace.root}/pairing.json`,
1145
1031
  memory_file: `${workspace.root}/memory.json`,
1146
1032
  history_limit: 100
1147
1033
  },
1148
1034
  embedding: { provider: "local" },
1149
- deals: DealsConfigSchema.parse({
1150
- enabled: dealsEnabled,
1151
- buy_max_floor_percent: buyMaxFloorPercent,
1152
- sell_min_floor_percent: sellMinFloorPercent
1153
- }),
1035
+ deals: DealsConfigSchema.parse({ enabled: !!botToken }),
1154
1036
  webui: {
1155
1037
  enabled: false,
1156
1038
  port: 7777,
@@ -1302,7 +1184,6 @@ async function runNonInteractiveOnboarding(options, prompter) {
1302
1184
  },
1303
1185
  storage: {
1304
1186
  sessions_file: `${workspace.root}/sessions.json`,
1305
- pairing_file: `${workspace.root}/pairing.json`,
1306
1187
  memory_file: `${workspace.root}/memory.json`,
1307
1188
  history_limit: 100
1308
1189
  },
package/dist/index.js CHANGED
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  TeletonApp,
3
3
  main
4
- } from "./chunk-BU453WX4.js";
4
+ } from "./chunk-LAQOUFOJ.js";
5
5
  import "./chunk-WIKM24GZ.js";
6
6
  import "./chunk-U7FQYCBQ.js";
7
- import "./chunk-A4GCOHCE.js";
8
- import "./chunk-DAMCNMYL.js";
7
+ import "./chunk-YFG2QHLA.js";
8
+ import "./chunk-BGC2IUM5.js";
9
9
  import "./chunk-TSKJCWQQ.js";
10
10
  import "./chunk-XBE4JB7C.js";
11
11
  import "./chunk-5PLZ3KSO.js";
12
12
  import "./chunk-JQDLW7IE.js";
13
13
  import "./chunk-RMLQS3X6.js";
14
14
  import "./chunk-OCLG5GKI.js";
15
- import "./chunk-RBU6JXD3.js";
15
+ import "./chunk-XDYDA2KV.js";
16
16
  import "./chunk-UCN6TI25.js";
17
- import "./chunk-FNV5FF35.js";
17
+ import "./chunk-EK7M5K26.js";
18
18
  import "./chunk-XBKSS6DM.js";
19
19
  import "./chunk-RO62LO6Z.js";
20
20
  import "./chunk-VAUJSSD3.js";
@@ -16,7 +16,7 @@ import {
16
16
  initializeMemory,
17
17
  runMigrations,
18
18
  setSchemaVersion
19
- } from "./chunk-RBU6JXD3.js";
19
+ } from "./chunk-XDYDA2KV.js";
20
20
  import "./chunk-UCN6TI25.js";
21
21
  import {
22
22
  AnthropicEmbeddingProvider,
@@ -27,7 +27,7 @@ import {
27
27
  deserializeEmbedding,
28
28
  hashText,
29
29
  serializeEmbedding
30
- } from "./chunk-FNV5FF35.js";
30
+ } from "./chunk-EK7M5K26.js";
31
31
  import "./chunk-XBKSS6DM.js";
32
32
  import "./chunk-RO62LO6Z.js";
33
33
  import "./chunk-VAUJSSD3.js";
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  getDatabase
3
- } from "./chunk-RBU6JXD3.js";
3
+ } from "./chunk-XDYDA2KV.js";
4
4
  import "./chunk-UCN6TI25.js";
5
- import "./chunk-FNV5FF35.js";
5
+ import "./chunk-EK7M5K26.js";
6
6
  import "./chunk-XBKSS6DM.js";
7
7
  import "./chunk-RO62LO6Z.js";
8
8
  import "./chunk-VAUJSSD3.js";