teleton 0.3.0 → 0.5.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.
Files changed (39) hide show
  1. package/README.md +219 -95
  2. package/dist/BigInteger-DQ33LTTE.js +5 -0
  3. package/dist/chunk-4DU3C27M.js +30 -0
  4. package/dist/chunk-5WWR4CU3.js +124 -0
  5. package/dist/{chunk-QQW6KE7Q.js → chunk-BYTHCDZA.js} +282 -263
  6. package/dist/chunk-EHEV7FJ7.js +157 -0
  7. package/dist/{chunk-E2NXSWOS.js → chunk-NUGDTPE4.js} +24 -64
  8. package/dist/{chunk-UYF4TT44.js → chunk-O4R7V5Y2.js} +38 -6
  9. package/dist/chunk-QUAPFI2N.js +42 -0
  10. package/dist/{chunk-ILDG4OPK.js → chunk-RRB6BWU7.js} +9411 -10083
  11. package/dist/chunk-TSKJCWQQ.js +1263 -0
  12. package/dist/{chunk-B2PRMXOH.js → chunk-WL2Q3VRD.js} +0 -2
  13. package/dist/{chunk-OQGNS2FV.js → chunk-YBA6IBGT.js} +20 -5
  14. package/dist/cli/index.js +42 -176
  15. package/dist/endpoint-FLYNEZ2F.js +7 -0
  16. package/dist/format-transactions-FD74HI5N.js +9 -0
  17. package/dist/{get-my-gifts-AFKBG4YQ.js → get-my-gifts-KVULMBJ3.js} +1 -1
  18. package/dist/index.js +13 -11
  19. package/dist/{memory-ZXDAJBL6.js → memory-657W5AS6.js} +4 -5
  20. package/dist/{migrate-7OG67FXP.js → migrate-PMB2JVXH.js} +4 -5
  21. package/dist/server-BQY7CM2N.js +1120 -0
  22. package/dist/{task-dependency-resolver-S45DFI5C.js → task-dependency-resolver-TRPILAHM.js} +4 -4
  23. package/dist/{task-executor-AUTT3VAL.js → task-executor-N7XNVK5N.js} +1 -1
  24. package/dist/{tasks-M3QDPTGY.js → tasks-QSCWSMPS.js} +1 -1
  25. package/dist/{transcript-DF2Y6CFY.js → transcript-7V4UNID4.js} +1 -1
  26. package/dist/web/assets/index-CDMbujHf.css +1 -0
  27. package/dist/web/assets/index-DDX8oQ2z.js +67 -0
  28. package/dist/web/index.html +16 -0
  29. package/dist/web/logo_dark.png +0 -0
  30. package/package.json +23 -4
  31. package/src/templates/IDENTITY.md +1 -1
  32. package/src/templates/MEMORY.md +1 -0
  33. package/src/templates/SECURITY.md +5 -0
  34. package/src/templates/SOUL.md +3 -2
  35. package/dist/chunk-DAMFGHXV.js +0 -74
  36. package/dist/chunk-DUW5VBAZ.js +0 -133
  37. package/dist/chunk-LCMHAUNK.js +0 -62
  38. package/dist/scraper-KXRBQMVQ.js +0 -282
  39. package/dist/timeouts-ZAK6NELA.js +0 -63
@@ -141,10 +141,8 @@ var telegramGetMyGiftsExecutor = async (params, context) => {
141
141
  isCollectible,
142
142
  stars: gift?.stars?.toString(),
143
143
  emoji: catalogInfo?.emoji || null,
144
- // IDs needed for transfer/actions (msgId for user gifts, savedId for chat gifts)
145
144
  msgId: savedGift.msgId,
146
145
  savedId: savedGift.savedId?.toString(),
147
- // Transfer cost in Stars (if set, transfer requires payment; if null, transfer is free)
148
146
  transferStars: savedGift.transferStars?.toString() || null
149
147
  };
150
148
  if (isCollectible) {
@@ -63,14 +63,17 @@ function sanitizeMessages(messages) {
63
63
  sanitized.push(msg);
64
64
  } else if (msg.role === "toolResult" || msg.role === "tool_result") {
65
65
  const toolCallId = msg.toolCallId || msg.tool_use_id || msg.tool_call_id;
66
- if (toolCallId && pendingToolCallIds.has(toolCallId)) {
66
+ if (!toolCallId || typeof toolCallId !== "string") {
67
+ removedCount++;
68
+ console.warn(`\u{1F9F9} Removing toolResult with missing/invalid toolCallId`);
69
+ continue;
70
+ }
71
+ if (pendingToolCallIds.has(toolCallId)) {
67
72
  pendingToolCallIds.delete(toolCallId);
68
73
  sanitized.push(msg);
69
74
  } else {
70
75
  removedCount++;
71
- console.warn(
72
- `\u{1F9F9} Removing out-of-order/orphaned toolResult: ${toolCallId?.slice(0, 20)}...`
73
- );
76
+ console.warn(`\u{1F9F9} Removing orphaned toolResult: ${toolCallId.slice(0, 20)}...`);
74
77
  continue;
75
78
  }
76
79
  } else if (msg.role === "user") {
@@ -98,7 +101,19 @@ function readTranscript(sessionId) {
98
101
  try {
99
102
  const content = readFileSync(transcriptPath, "utf-8");
100
103
  const lines = content.trim().split("\n").filter(Boolean);
101
- const messages = lines.map((line) => JSON.parse(line));
104
+ let corruptCount = 0;
105
+ const messages = lines.map((line, i) => {
106
+ try {
107
+ return JSON.parse(line);
108
+ } catch {
109
+ corruptCount++;
110
+ console.warn(`\u26A0\uFE0F Skipping corrupt line ${i + 1} in transcript ${sessionId}`);
111
+ return null;
112
+ }
113
+ }).filter(Boolean);
114
+ if (corruptCount > 0) {
115
+ console.warn(`\u26A0\uFE0F ${corruptCount} corrupt line(s) skipped in transcript ${sessionId}`);
116
+ }
102
117
  return sanitizeMessages(messages);
103
118
  } catch (error) {
104
119
  console.error(`Failed to read transcript ${sessionId}:`, error);
package/dist/cli/index.js CHANGED
@@ -1,8 +1,6 @@
1
1
  import {
2
- CasinoConfigSchema,
3
2
  ConfigSchema,
4
3
  DealsConfigSchema,
5
- MarketConfigSchema,
6
4
  TelegramUserClient,
7
5
  configExists,
8
6
  ensureWorkspace,
@@ -17,25 +15,25 @@ import {
17
15
  saveWallet,
18
16
  validateApiKeyFormat,
19
17
  walletExists
20
- } from "../chunk-ILDG4OPK.js";
18
+ } from "../chunk-RRB6BWU7.js";
19
+ import "../chunk-WL2Q3VRD.js";
20
+ import "../chunk-EHEV7FJ7.js";
21
21
  import "../chunk-U7FQYCBQ.js";
22
- import "../chunk-DUW5VBAZ.js";
23
- import "../chunk-OQGNS2FV.js";
24
- import "../chunk-QQW6KE7Q.js";
22
+ import "../chunk-5WWR4CU3.js";
23
+ import "../chunk-YBA6IBGT.js";
25
24
  import {
26
25
  fetchWithTimeout
27
- } from "../chunk-DAMFGHXV.js";
26
+ } from "../chunk-BYTHCDZA.js";
27
+ import "../chunk-4DU3C27M.js";
28
28
  import {
29
29
  TELEGRAM_MAX_MESSAGE_LENGTH
30
- } from "../chunk-UYF4TT44.js";
30
+ } from "../chunk-O4R7V5Y2.js";
31
31
  import {
32
32
  TELETON_ROOT
33
33
  } from "../chunk-EYWNOHMJ.js";
34
- import {
35
- ONBOARDING_PROMPT_TIMEOUT_MS
36
- } from "../chunk-LCMHAUNK.js";
37
- import "../chunk-E2NXSWOS.js";
38
- import "../chunk-B2PRMXOH.js";
34
+ import "../chunk-NUGDTPE4.js";
35
+ import "../chunk-QUAPFI2N.js";
36
+ import "../chunk-TSKJCWQQ.js";
39
37
  import "../chunk-QGM4M3NI.js";
40
38
 
41
39
  // src/cli/index.ts
@@ -44,27 +42,15 @@ import { Command } from "commander";
44
42
  // src/cli/prompts.ts
45
43
  import * as clack from "@clack/prompts";
46
44
  var ClackPrompter = class {
47
- /**
48
- * Display intro banner
49
- */
50
45
  async intro(title) {
51
46
  clack.intro(title);
52
47
  }
53
- /**
54
- * Display outro message
55
- */
56
48
  async outro(message) {
57
49
  clack.outro(message);
58
50
  }
59
- /**
60
- * Display note/info
61
- */
62
51
  async note(message, title) {
63
52
  clack.note(message, title);
64
53
  }
65
- /**
66
- * Text input prompt
67
- */
68
54
  async text(options) {
69
55
  const result = await clack.text({
70
56
  message: options.message,
@@ -77,9 +63,6 @@ var ClackPrompter = class {
77
63
  }
78
64
  return result;
79
65
  }
80
- /**
81
- * Password input (hidden)
82
- */
83
66
  async password(options) {
84
67
  const result = await clack.password({
85
68
  message: options.message,
@@ -90,9 +73,6 @@ var ClackPrompter = class {
90
73
  }
91
74
  return result;
92
75
  }
93
- /**
94
- * Select prompt (single choice)
95
- */
96
76
  async select(options) {
97
77
  const result = await clack.select({
98
78
  message: options.message,
@@ -113,9 +93,6 @@ var ClackPrompter = class {
113
93
  }
114
94
  return result;
115
95
  }
116
- /**
117
- * Confirm (yes/no)
118
- */
119
96
  async confirm(options) {
120
97
  const result = await clack.confirm({
121
98
  message: options.message,
@@ -126,9 +103,6 @@ var ClackPrompter = class {
126
103
  }
127
104
  return result;
128
105
  }
129
- /**
130
- * Multi-select prompt
131
- */
132
106
  async multiselect(options) {
133
107
  const result = await clack.multiselect({
134
108
  message: options.message,
@@ -149,9 +123,6 @@ var ClackPrompter = class {
149
123
  }
150
124
  return result;
151
125
  }
152
- /**
153
- * Spinner for long operations
154
- */
155
126
  spinner() {
156
127
  const s = clack.spinner();
157
128
  return {
@@ -160,27 +131,15 @@ var ClackPrompter = class {
160
131
  message: (message) => s.message(message)
161
132
  };
162
133
  }
163
- /**
164
- * Log message
165
- */
166
134
  log(message) {
167
135
  clack.log.message(message);
168
136
  }
169
- /**
170
- * Log warning
171
- */
172
137
  warn(message) {
173
138
  clack.log.warn(message);
174
139
  }
175
- /**
176
- * Log error
177
- */
178
140
  error(message) {
179
141
  clack.log.error(message);
180
142
  }
181
- /**
182
- * Log success
183
- */
184
143
  success(message) {
185
144
  clack.log.success(message);
186
145
  }
@@ -197,7 +156,6 @@ function createPrompter() {
197
156
 
198
157
  // src/cli/commands/onboard.ts
199
158
  import { writeFileSync, readFileSync, existsSync, chmodSync } from "fs";
200
- import { execSync } from "child_process";
201
159
  import { join } from "path";
202
160
  import YAML from "yaml";
203
161
  async function onboardCommand(options = {}) {
@@ -283,18 +241,15 @@ ${blue2} \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u25
283
241
  const enabledModules = await prompter.multiselect({
284
242
  message: "Enable optional modules (Space to toggle, Enter to confirm)",
285
243
  options: [
286
- { value: "casino", label: "Casino", hint: "Slot machine & dice games with TON bets" },
287
244
  {
288
245
  value: "deals",
289
- label: "Gifts (Deals & Market Data)",
290
- hint: "Gift/TON trading + floor price scraping (requires Chromium)"
246
+ label: "Gifts & Deals",
247
+ hint: "Gift/TON trading with escrow system"
291
248
  }
292
249
  ],
293
250
  required: false
294
251
  });
295
- const casinoEnabled = enabledModules.includes("casino");
296
252
  const dealsEnabled = enabledModules.includes("deals");
297
- const marketEnabled = dealsEnabled;
298
253
  const providers = getSupportedProviders();
299
254
  const selectedProvider = await prompter.select({
300
255
  message: "AI Provider",
@@ -309,7 +264,7 @@ ${blue2} \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u25
309
264
  if (providerMeta.toolLimit !== null) {
310
265
  prompter.note(
311
266
  `${providerMeta.displayName} supports max ${providerMeta.toolLimit} tools.
312
- Tonnet currently has ~121 tools. If more tools are added,
267
+ Teleton currently has ~116 tools. If more tools are added,
313
268
  some may be truncated.`,
314
269
  "Tool Limit"
315
270
  );
@@ -600,7 +555,7 @@ Get it at: ${providerMeta.consoleUrl}`,
600
555
  api_id: apiId,
601
556
  api_hash: apiHash,
602
557
  phone,
603
- session_name: "tonnet_session",
558
+ session_name: "teleton_session",
604
559
  session_path: workspace.sessionPath,
605
560
  dm_policy: dmPolicy,
606
561
  allow_from: [],
@@ -624,13 +579,20 @@ Get it at: ${providerMeta.consoleUrl}`,
624
579
  memory_file: `${workspace.root}/memory.json`,
625
580
  history_limit: 100
626
581
  },
627
- casino: CasinoConfigSchema.parse({ enabled: casinoEnabled }),
628
582
  deals: DealsConfigSchema.parse({
629
583
  enabled: dealsEnabled,
630
584
  buy_max_floor_percent: buyMaxFloorPercent,
631
585
  sell_min_floor_percent: sellMinFloorPercent
632
586
  }),
633
- market: MarketConfigSchema.parse({ enabled: marketEnabled }),
587
+ webui: {
588
+ enabled: false,
589
+ port: 7777,
590
+ host: "127.0.0.1",
591
+ cors_origins: ["http://localhost:5173", "http://localhost:7777"],
592
+ log_requests: false
593
+ },
594
+ dev: { hot_reload: false },
595
+ plugins: {},
634
596
  tonapi_key: tonapiKey
635
597
  };
636
598
  spinner2.start("Saving configuration...");
@@ -677,20 +639,6 @@ Get it at: ${providerMeta.consoleUrl}`,
677
639
  saveWallet(wallet);
678
640
  spinner2.stop("\u2713 TON wallet generated");
679
641
  }
680
- if (marketEnabled) {
681
- spinner2.start("Installing browser for market data...");
682
- try {
683
- execSync("npx playwright install chromium", {
684
- stdio: "pipe",
685
- timeout: ONBOARDING_PROMPT_TIMEOUT_MS
686
- });
687
- spinner2.stop("\u2713 Browser installed");
688
- } catch {
689
- spinner2.stop(
690
- "\u26A0 Browser install failed (can be done later with: npx playwright install chromium)"
691
- );
692
- }
693
- }
694
642
  if (!existingWallet || wallet !== existingWallet) {
695
643
  prompter.note(
696
644
  "BACKUP REQUIRED - WRITE DOWN THESE 24 WORDS:\n\n" + wallet.mnemonic.join(" ") + "\n\nThese words allow you to recover your wallet.\nWithout them, you will lose access to your TON.\nWrite them on paper and keep them safe.",
@@ -788,7 +736,7 @@ async function runNonInteractiveOnboarding(options, prompter) {
788
736
  api_id: options.apiId,
789
737
  api_hash: options.apiHash,
790
738
  phone: options.phone,
791
- session_name: "tonnet_session",
739
+ session_name: "teleton_session",
792
740
  session_path: workspace.sessionPath,
793
741
  dm_policy: "open",
794
742
  allow_from: [],
@@ -812,9 +760,16 @@ async function runNonInteractiveOnboarding(options, prompter) {
812
760
  memory_file: `${workspace.root}/memory.json`,
813
761
  history_limit: 100
814
762
  },
815
- casino: CasinoConfigSchema.parse({}),
816
763
  deals: DealsConfigSchema.parse({}),
817
- market: MarketConfigSchema.parse({})
764
+ webui: {
765
+ enabled: false,
766
+ port: 7777,
767
+ host: "127.0.0.1",
768
+ cors_origins: ["http://localhost:5173", "http://localhost:7777"],
769
+ log_requests: false
770
+ },
771
+ dev: { hot_reload: false },
772
+ plugins: {}
818
773
  };
819
774
  const configYaml = YAML.stringify(config);
820
775
  writeFileSync(workspace.configPath, configYaml, "utf-8");
@@ -825,7 +780,6 @@ async function runNonInteractiveOnboarding(options, prompter) {
825
780
  // src/cli/commands/doctor.ts
826
781
  import { existsSync as existsSync2, readFileSync as readFileSync2, statSync } from "fs";
827
782
  import { join as join2 } from "path";
828
- import { homedir } from "os";
829
783
  import { parse } from "yaml";
830
784
  var green = "\x1B[32m";
831
785
  var yellow = "\x1B[33m";
@@ -1078,61 +1032,6 @@ async function checkTelegramSession(workspaceDir) {
1078
1032
  };
1079
1033
  }
1080
1034
  }
1081
- async function checkMarketData(workspaceDir) {
1082
- const dbPath = join2(workspaceDir, "gifts.db");
1083
- if (!existsSync2(dbPath)) {
1084
- return {
1085
- name: "Gift market data",
1086
- status: "warn",
1087
- message: "Not found (will fetch on first start)"
1088
- };
1089
- }
1090
- try {
1091
- const Database = (await import("better-sqlite3")).default;
1092
- const db = new Database(dbPath, { readonly: true });
1093
- const collections = db.prepare("SELECT COUNT(*) as count FROM gift_collections").get();
1094
- const models = db.prepare("SELECT COUNT(*) as count FROM gift_models").get();
1095
- const lastUpdate = db.prepare("SELECT MAX(updated_at) as last FROM gift_collections").get();
1096
- db.close();
1097
- if (!lastUpdate.last) {
1098
- return {
1099
- name: "Gift market data",
1100
- status: "warn",
1101
- message: "Database empty (no data yet)"
1102
- };
1103
- }
1104
- const lastUpdateTime = (/* @__PURE__ */ new Date(lastUpdate.last + "Z")).getTime();
1105
- const age = Date.now() - lastUpdateTime;
1106
- const hoursAgo = Math.floor(age / (1e3 * 60 * 60));
1107
- const daysAgo = Math.floor(hoursAgo / 24);
1108
- const dataInfo = `${collections.count} collections, ${models.count} models`;
1109
- if (daysAgo > 7) {
1110
- return {
1111
- name: "Gift market data",
1112
- status: "warn",
1113
- message: `Stale (${daysAgo} days old) - ${dataInfo}`
1114
- };
1115
- }
1116
- if (hoursAgo > 24) {
1117
- return {
1118
- name: "Gift market data",
1119
- status: "ok",
1120
- message: `${daysAgo} day${daysAgo > 1 ? "s" : ""} old - ${dataInfo}`
1121
- };
1122
- }
1123
- return {
1124
- name: "Gift market data",
1125
- status: "ok",
1126
- message: hoursAgo === 0 ? `Fresh (< 1h) - ${dataInfo}` : `${hoursAgo}h old - ${dataInfo}`
1127
- };
1128
- } catch (err) {
1129
- return {
1130
- name: "Gift market data",
1131
- status: "error",
1132
- message: `Database error: ${err instanceof Error ? err.message : String(err)}`
1133
- };
1134
- }
1135
- }
1136
1035
  async function checkModel(workspaceDir) {
1137
1036
  const configPath = join2(workspaceDir, "config.yaml");
1138
1037
  if (!existsSync2(configPath)) {
@@ -1216,43 +1115,6 @@ async function checkNodeVersion() {
1216
1115
  message: version
1217
1116
  };
1218
1117
  }
1219
- async function checkPlaywrightBrowser() {
1220
- const homeDir = homedir();
1221
- const browserPaths = [
1222
- join2(homeDir, ".cache", "ms-playwright", "chromium-*"),
1223
- join2(homeDir, ".cache", "ms-playwright"),
1224
- join2(homeDir, "Library", "Caches", "ms-playwright"),
1225
- join2(homeDir, "AppData", "Local", "ms-playwright")
1226
- ];
1227
- for (const basePath of browserPaths) {
1228
- const checkPath = basePath.replace("/chromium-*", "");
1229
- if (existsSync2(checkPath)) {
1230
- try {
1231
- const { readdirSync } = await import("fs");
1232
- const contents = readdirSync(checkPath);
1233
- const hasChromium = contents.some((f) => f.startsWith("chromium"));
1234
- if (hasChromium) {
1235
- return {
1236
- name: "Playwright browser",
1237
- status: "ok",
1238
- message: "Chromium installed"
1239
- };
1240
- }
1241
- } catch {
1242
- return {
1243
- name: "Playwright browser",
1244
- status: "ok",
1245
- message: "Cache found"
1246
- };
1247
- }
1248
- }
1249
- }
1250
- return {
1251
- name: "Playwright browser",
1252
- status: "warn",
1253
- message: "Not found (run: npx playwright install chromium)"
1254
- };
1255
- }
1256
1118
  async function doctorCommand() {
1257
1119
  const workspaceDir = TELETON_ROOT;
1258
1120
  console.log(`
@@ -1265,7 +1127,6 @@ ${blue} \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u250
1265
1127
  const results = [];
1266
1128
  console.log(" Running checks...\n");
1267
1129
  results.push(await checkNodeVersion());
1268
- results.push(await checkPlaywrightBrowser());
1269
1130
  results.push(await checkConfig(workspaceDir));
1270
1131
  results.push(await checkTelegramCredentials(workspaceDir));
1271
1132
  results.push(await checkApiKey(workspaceDir));
@@ -1273,7 +1134,6 @@ ${blue} \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u250
1273
1134
  results.push(await checkWallet(workspaceDir));
1274
1135
  results.push(await checkSoul(workspaceDir));
1275
1136
  results.push(await checkDatabase(workspaceDir));
1276
- results.push(await checkMarketData(workspaceDir));
1277
1137
  results.push(await checkModel(workspaceDir));
1278
1138
  results.push(await checkAdmins(workspaceDir));
1279
1139
  for (const result of results) {
@@ -1315,7 +1175,7 @@ function findPackageJson() {
1315
1175
  var packageJson = findPackageJson();
1316
1176
  var program = new Command();
1317
1177
  program.name("teleton").description("Teleton Agent - Personal AI Agent for Telegram").version(packageJson.version);
1318
- program.command("setup").description("Interactive wizard to set up Teleton").option("--workspace <dir>", "Workspace directory (default: ~/.teleton)").option("--non-interactive", "Non-interactive mode (requires all options)").option("--api-id <id>", "Telegram API ID").option("--api-hash <hash>", "Telegram API Hash").option("--phone <number>", "Phone number (international format)").option("--api-key <key>", "Anthropic API key").option("--user-id <id>", "Your Telegram User ID (for admin)").action(async (options) => {
1178
+ program.command("setup").description("Interactive wizard to set up Teleton").option("--workspace <dir>", "Workspace directory").option("--non-interactive", "Non-interactive mode").option("--api-id <id>", "Telegram API ID").option("--api-hash <hash>", "Telegram API Hash").option("--phone <number>", "Phone number").option("--api-key <key>", "Anthropic API key").option("--user-id <id>", "Telegram User ID").action(async (options) => {
1319
1179
  try {
1320
1180
  await onboardCommand({
1321
1181
  workspace: options.workspace,
@@ -1331,7 +1191,7 @@ program.command("setup").description("Interactive wizard to set up Teleton").opt
1331
1191
  process.exit(1);
1332
1192
  }
1333
1193
  });
1334
- program.command("start").description("Start the Teleton agent").option("-c, --config <path>", "Config file path", getDefaultConfigPath()).action(async (options) => {
1194
+ program.command("start").description("Start the Teleton agent").option("-c, --config <path>", "Config file path", getDefaultConfigPath()).option("--webui", "Enable WebUI server (overrides config)").option("--webui-port <port>", "WebUI server port (default: 7777)").action(async (options) => {
1335
1195
  try {
1336
1196
  if (!configExists(options.config)) {
1337
1197
  console.error("\u274C Configuration not found");
@@ -1339,6 +1199,12 @@ program.command("start").description("Start the Teleton agent").option("-c, --co
1339
1199
  console.error("\n\u{1F4A1} Run first: teleton setup");
1340
1200
  process.exit(1);
1341
1201
  }
1202
+ if (options.webui) {
1203
+ process.env.TELETON_WEBUI_ENABLED = "true";
1204
+ }
1205
+ if (options.webuiPort) {
1206
+ process.env.TELETON_WEBUI_PORT = options.webuiPort;
1207
+ }
1342
1208
  await main(options.config);
1343
1209
  } catch (error) {
1344
1210
  console.error("Error:", error instanceof Error ? error.message : String(error));
@@ -0,0 +1,7 @@
1
+ import {
2
+ getCachedHttpEndpoint
3
+ } from "./chunk-QUAPFI2N.js";
4
+ import "./chunk-QGM4M3NI.js";
5
+ export {
6
+ getCachedHttpEndpoint
7
+ };
@@ -0,0 +1,9 @@
1
+ import {
2
+ formatTransactions,
3
+ parseMessageBody
4
+ } from "./chunk-EHEV7FJ7.js";
5
+ import "./chunk-QGM4M3NI.js";
6
+ export {
7
+ formatTransactions,
8
+ parseMessageBody
9
+ };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  telegramGetMyGiftsExecutor,
3
3
  telegramGetMyGiftsTool
4
- } from "./chunk-B2PRMXOH.js";
4
+ } from "./chunk-WL2Q3VRD.js";
5
5
  import "./chunk-QGM4M3NI.js";
6
6
  export {
7
7
  telegramGetMyGiftsExecutor,
package/dist/index.js CHANGED
@@ -1,19 +1,21 @@
1
1
  import {
2
- TonnetApp,
2
+ TeletonApp,
3
3
  main
4
- } from "./chunk-ILDG4OPK.js";
4
+ } from "./chunk-RRB6BWU7.js";
5
+ import "./chunk-WL2Q3VRD.js";
6
+ import "./chunk-EHEV7FJ7.js";
5
7
  import "./chunk-U7FQYCBQ.js";
6
- import "./chunk-DUW5VBAZ.js";
7
- import "./chunk-OQGNS2FV.js";
8
- import "./chunk-QQW6KE7Q.js";
9
- import "./chunk-DAMFGHXV.js";
10
- import "./chunk-UYF4TT44.js";
8
+ import "./chunk-5WWR4CU3.js";
9
+ import "./chunk-YBA6IBGT.js";
10
+ import "./chunk-BYTHCDZA.js";
11
+ import "./chunk-4DU3C27M.js";
12
+ import "./chunk-O4R7V5Y2.js";
11
13
  import "./chunk-EYWNOHMJ.js";
12
- import "./chunk-LCMHAUNK.js";
13
- import "./chunk-E2NXSWOS.js";
14
- import "./chunk-B2PRMXOH.js";
14
+ import "./chunk-NUGDTPE4.js";
15
+ import "./chunk-QUAPFI2N.js";
16
+ import "./chunk-TSKJCWQQ.js";
15
17
  import "./chunk-QGM4M3NI.js";
16
18
  export {
17
- TonnetApp,
19
+ TeletonApp,
18
20
  main
19
21
  };
@@ -24,15 +24,14 @@ import {
24
24
  runMigrations,
25
25
  serializeEmbedding,
26
26
  setSchemaVersion
27
- } from "./chunk-QQW6KE7Q.js";
28
- import "./chunk-DAMFGHXV.js";
29
- import "./chunk-UYF4TT44.js";
27
+ } from "./chunk-BYTHCDZA.js";
28
+ import "./chunk-4DU3C27M.js";
29
+ import "./chunk-O4R7V5Y2.js";
30
30
  import "./chunk-EYWNOHMJ.js";
31
- import "./chunk-LCMHAUNK.js";
32
31
  import {
33
32
  TaskStore,
34
33
  getTaskStore
35
- } from "./chunk-E2NXSWOS.js";
34
+ } from "./chunk-NUGDTPE4.js";
36
35
  import "./chunk-QGM4M3NI.js";
37
36
  export {
38
37
  AnthropicEmbeddingProvider,
@@ -1,13 +1,12 @@
1
1
  import {
2
2
  getDatabase
3
- } from "./chunk-QQW6KE7Q.js";
4
- import "./chunk-DAMFGHXV.js";
5
- import "./chunk-UYF4TT44.js";
3
+ } from "./chunk-BYTHCDZA.js";
4
+ import "./chunk-4DU3C27M.js";
5
+ import "./chunk-O4R7V5Y2.js";
6
6
  import {
7
7
  TELETON_ROOT
8
8
  } from "./chunk-EYWNOHMJ.js";
9
- import "./chunk-LCMHAUNK.js";
10
- import "./chunk-E2NXSWOS.js";
9
+ import "./chunk-NUGDTPE4.js";
11
10
  import "./chunk-QGM4M3NI.js";
12
11
 
13
12
  // src/session/migrate.ts