teleton 0.1.16 → 0.1.17

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.
@@ -7,7 +7,6 @@ var WORKSPACE_PATHS = {
7
7
  // Root files
8
8
  SOUL: join(WORKSPACE_ROOT, "SOUL.md"),
9
9
  MEMORY: join(WORKSPACE_ROOT, "MEMORY.md"),
10
- BOOTSTRAP: join(WORKSPACE_ROOT, "BOOTSTRAP.md"),
11
10
  IDENTITY: join(WORKSPACE_ROOT, "IDENTITY.md"),
12
11
  USER: join(WORKSPACE_ROOT, "USER.md"),
13
12
  STRATEGY: join(WORKSPACE_ROOT, "STRATEGY.md"),
@@ -13,7 +13,7 @@ import {
13
13
  TELETON_ROOT,
14
14
  WORKSPACE_PATHS,
15
15
  WORKSPACE_ROOT
16
- } from "./chunk-WQ5TFRTG.js";
16
+ } from "./chunk-EYWNOHMJ.js";
17
17
  import {
18
18
  COINGECKO_API_URL,
19
19
  ELEVENLABS_TTS_URL,
@@ -1753,7 +1753,6 @@ async function ensureWorkspace(config) {
1753
1753
  memoryPath: WORKSPACE_PATHS.MEMORY,
1754
1754
  identityPath: WORKSPACE_PATHS.IDENTITY,
1755
1755
  userPath: WORKSPACE_PATHS.USER,
1756
- bootstrapPath: WORKSPACE_PATHS.BOOTSTRAP,
1757
1756
  strategyPath: WORKSPACE_PATHS.STRATEGY,
1758
1757
  securityPath: WORKSPACE_PATHS.SECURITY,
1759
1758
  // Workspace directories
@@ -1778,7 +1777,6 @@ async function bootstrapTemplates(workspace) {
1778
1777
  { name: "MEMORY.md", path: workspace.memoryPath },
1779
1778
  { name: "IDENTITY.md", path: workspace.identityPath },
1780
1779
  { name: "USER.md", path: workspace.userPath },
1781
- { name: "BOOTSTRAP.md", path: workspace.bootstrapPath },
1782
1780
  { name: "SECURITY.md", path: workspace.securityPath },
1783
1781
  { name: "STRATEGY.md", path: workspace.strategyPath }
1784
1782
  ];
@@ -1795,6 +1793,13 @@ async function bootstrapTemplates(workspace) {
1795
1793
  function isNewWorkspace(workspace) {
1796
1794
  return !existsSync3(workspace.configPath);
1797
1795
  }
1796
+ function loadTemplate(name) {
1797
+ const templatePath = join2(TEMPLATES_DIR, name);
1798
+ if (!existsSync3(templatePath)) {
1799
+ throw new Error(`Template ${name} not found at ${templatePath}`);
1800
+ }
1801
+ return readFileSync2(templatePath, "utf-8");
1802
+ }
1798
1803
 
1799
1804
  // src/memory/daily-logs.ts
1800
1805
  var MEMORY_DIR = WORKSPACE_PATHS.MEMORY_DIR;
@@ -2825,7 +2830,7 @@ Slug:`,
2825
2830
  }
2826
2831
  async function saveSessionMemory(params) {
2827
2832
  try {
2828
- const { TELETON_ROOT: TELETON_ROOT2 } = await import("./paths-IBRNH7B4.js");
2833
+ const { TELETON_ROOT: TELETON_ROOT2 } = await import("./paths-TMNTEDDD.js");
2829
2834
  const memoryDir = join5(TELETON_ROOT2, "memory");
2830
2835
  await mkdir(memoryDir, { recursive: true });
2831
2836
  const now = /* @__PURE__ */ new Date();
@@ -5233,6 +5238,16 @@ Usage:
5233
5238
  return `\u{1F48E} **${result.balance} TON**
5234
5239
  \u{1F4CD} \`${address4}\``;
5235
5240
  }
5241
+ /**
5242
+ * Get bootstrap template content for /boot passthrough
5243
+ */
5244
+ getBootstrapContent() {
5245
+ try {
5246
+ return loadTemplate("BOOTSTRAP.md");
5247
+ } catch {
5248
+ return null;
5249
+ }
5250
+ }
5236
5251
  /**
5237
5252
  * /help - Show available commands
5238
5253
  */
@@ -5269,6 +5284,9 @@ Give a task to the agent
5269
5284
  **/clear** [chat_id]
5270
5285
  Clear conversation history
5271
5286
 
5287
+ **/boot**
5288
+ Run agent bootstrap (first-time setup conversation)
5289
+
5272
5290
  **/ping**
5273
5291
  Check if agent is responsive
5274
5292
 
@@ -5429,7 +5447,7 @@ var MarketScraperService = class {
5429
5447
  this.isScrapingInProgress = true;
5430
5448
  console.log("\u{1F504} Starting full market scrape...");
5431
5449
  try {
5432
- const { runScraper } = await import("./scraper-NDTCWEXU.js");
5450
+ const { runScraper } = await import("./scraper-BET6OXRF.js");
5433
5451
  const result = await runScraper({
5434
5452
  workers: 4,
5435
5453
  limit: 0
@@ -19335,7 +19353,7 @@ var workspaceListTool = {
19335
19353
  description: `List files and directories in your workspace.
19336
19354
 
19337
19355
  Your workspace is at ~/.teleton/workspace/ and contains:
19338
- - SOUL.md, MEMORY.md, BOOTSTRAP.md (config files)
19356
+ - SOUL.md, MEMORY.md, IDENTITY.md (config files)
19339
19357
  - memory/ (daily logs)
19340
19358
  - downloads/ (downloaded media)
19341
19359
  - uploads/ (files to send)
@@ -19629,7 +19647,6 @@ var PROTECTED_WORKSPACE_FILES = [
19629
19647
  "STRATEGY.md",
19630
19648
  "SECURITY.md",
19631
19649
  "MEMORY.md",
19632
- "BOOTSTRAP.md",
19633
19650
  "IDENTITY.md",
19634
19651
  "USER.md"
19635
19652
  ];
@@ -19638,7 +19655,7 @@ var workspaceDeleteTool = {
19638
19655
  description: `Delete a file or directory from your workspace.
19639
19656
 
19640
19657
  PROTECTED FILES (cannot delete):
19641
- - SOUL.md, MEMORY.md, BOOTSTRAP.md, IDENTITY.md, USER.md
19658
+ - SOUL.md, MEMORY.md, IDENTITY.md, USER.md
19642
19659
 
19643
19660
  You CAN delete:
19644
19661
  - Files in memory/, downloads/, uploads/, temp/
@@ -19770,7 +19787,6 @@ var workspaceInfoExecutor = async (params, _context) => {
19770
19787
  structure: {
19771
19788
  "SOUL.md": "Your personality and behavior guidelines",
19772
19789
  "MEMORY.md": "Persistent memory (long-term facts)",
19773
- "BOOTSTRAP.md": "Startup instructions",
19774
19790
  "IDENTITY.md": "Your identity information",
19775
19791
  "USER.md": "User configuration",
19776
19792
  "STRATEGY.md": "Business strategy (if exists)",
@@ -23928,7 +23944,7 @@ ${blue} \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u250
23928
23944
  `\u26A0\uFE0F Tool count (${this.toolCount}) exceeds ${providerMeta.displayName} limit (${providerMeta.toolLimit})`
23929
23945
  );
23930
23946
  }
23931
- const { migrateSessionsToDb } = await import("./migrate-QQQJBYNP.js");
23947
+ const { migrateSessionsToDb } = await import("./migrate-FGNIC4XZ.js");
23932
23948
  migrateSessionsToDb();
23933
23949
  const memory = initializeMemory({
23934
23950
  database: {
@@ -24064,17 +24080,31 @@ ${blue} \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u250
24064
24080
  }
24065
24081
  const adminCmd = this.adminHandler.parseCommand(message.text);
24066
24082
  if (adminCmd && this.adminHandler.isAdmin(message.senderId)) {
24067
- const response = await this.adminHandler.handleCommand(
24068
- adminCmd,
24069
- message.chatId,
24070
- message.senderId
24071
- );
24072
- await this.bridge.sendMessage({
24073
- chatId: message.chatId,
24074
- text: response,
24075
- replyToId: message.id
24076
- });
24077
- return;
24083
+ if (adminCmd.command === "boot") {
24084
+ const bootstrapContent = this.adminHandler.getBootstrapContent();
24085
+ if (bootstrapContent) {
24086
+ message.text = bootstrapContent;
24087
+ } else {
24088
+ await this.bridge.sendMessage({
24089
+ chatId: message.chatId,
24090
+ text: "\u274C Bootstrap template not found.",
24091
+ replyToId: message.id
24092
+ });
24093
+ return;
24094
+ }
24095
+ } else {
24096
+ const response = await this.adminHandler.handleCommand(
24097
+ adminCmd,
24098
+ message.chatId,
24099
+ message.senderId
24100
+ );
24101
+ await this.bridge.sendMessage({
24102
+ chatId: message.chatId,
24103
+ text: response,
24104
+ replyToId: message.id
24105
+ });
24106
+ return;
24107
+ }
24078
24108
  }
24079
24109
  if (this.adminHandler.isPaused()) return;
24080
24110
  await this.messageHandler.handleMessage(message);
package/dist/cli/index.js CHANGED
@@ -17,14 +17,14 @@ import {
17
17
  saveWallet,
18
18
  validateApiKeyFormat,
19
19
  walletExists
20
- } from "../chunk-2VEKWA3S.js";
20
+ } from "../chunk-UQ54EXWQ.js";
21
21
  import {
22
22
  fetchWithTimeout
23
23
  } from "../chunk-PMX75DTX.js";
24
24
  import "../chunk-E2NXSWOS.js";
25
25
  import {
26
26
  TELETON_ROOT
27
- } from "../chunk-WQ5TFRTG.js";
27
+ } from "../chunk-EYWNOHMJ.js";
28
28
  import "../chunk-ST5CO7TV.js";
29
29
  import {
30
30
  TELEGRAM_MAX_MESSAGE_LENGTH
@@ -279,21 +279,20 @@ ${blue2} \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u25
279
279
  initialValue: "quick"
280
280
  });
281
281
  const enabledModules = await prompter.multiselect({
282
- message: "Enable optional modules",
282
+ message: "Enable optional modules (Space to toggle, Enter to confirm)",
283
283
  options: [
284
284
  { value: "casino", label: "Casino", hint: "Slot machine & dice games with TON bets" },
285
- { value: "deals", label: "Deals", hint: "Secure gift/TON trading with inline buttons" },
286
285
  {
287
- value: "market",
288
- label: "Gifts Market Data",
289
- hint: "Scrape gift floor prices (requires Chromium)"
286
+ value: "deals",
287
+ label: "Gifts (Deals & Market Data)",
288
+ hint: "Gift/TON trading + floor price scraping (requires Chromium)"
290
289
  }
291
290
  ],
292
291
  required: false
293
292
  });
294
293
  const casinoEnabled = enabledModules.includes("casino");
295
294
  const dealsEnabled = enabledModules.includes("deals");
296
- const marketEnabled = enabledModules.includes("market");
295
+ const marketEnabled = dealsEnabled;
297
296
  const providers = getSupportedProviders();
298
297
  const selectedProvider = await prompter.select({
299
298
  message: "AI Provider",
@@ -742,7 +741,7 @@ TON Wallet: ${wallet.address}`,
742
741
  );
743
742
  if (telegramConnected) {
744
743
  prompter.note(
745
- "Next steps:\n\n1. Start the agent:\n $ teleton start\n\n2. Send a message to your Telegram account to test",
744
+ "Next steps:\n\n1. Start the agent:\n $ teleton start\n\n2. Send /boot as your first message to bootstrap\n the agent's personality and get to know each other",
746
745
  "Ready"
747
746
  );
748
747
  } else {
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  TonnetApp,
3
3
  main
4
- } from "./chunk-2VEKWA3S.js";
4
+ } from "./chunk-UQ54EXWQ.js";
5
5
  import "./chunk-PMX75DTX.js";
6
6
  import "./chunk-E2NXSWOS.js";
7
- import "./chunk-WQ5TFRTG.js";
7
+ import "./chunk-EYWNOHMJ.js";
8
8
  import "./chunk-ST5CO7TV.js";
9
9
  import "./chunk-QMN6ZOA5.js";
10
10
  import "./chunk-LJXYESJJ.js";
@@ -4,7 +4,7 @@ import {
4
4
  import "./chunk-E2NXSWOS.js";
5
5
  import {
6
6
  TELETON_ROOT
7
- } from "./chunk-WQ5TFRTG.js";
7
+ } from "./chunk-EYWNOHMJ.js";
8
8
  import "./chunk-ST5CO7TV.js";
9
9
  import "./chunk-QMN6ZOA5.js";
10
10
  import "./chunk-LJXYESJJ.js";
@@ -4,7 +4,7 @@ import {
4
4
  TELETON_ROOT,
5
5
  WORKSPACE_PATHS,
6
6
  WORKSPACE_ROOT
7
- } from "./chunk-WQ5TFRTG.js";
7
+ } from "./chunk-EYWNOHMJ.js";
8
8
  import "./chunk-QGM4M3NI.js";
9
9
  export {
10
10
  ALLOWED_EXTENSIONS,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  TELETON_ROOT
3
- } from "./chunk-WQ5TFRTG.js";
3
+ } from "./chunk-EYWNOHMJ.js";
4
4
  import {
5
5
  MARKETAPP_BASE_URL
6
6
  } from "./chunk-ST5CO7TV.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "teleton",
3
- "version": "0.1.16",
3
+ "version": "0.1.17",
4
4
  "description": "Personal AI Agent for Telegram",
5
5
  "author": "ZKProof (https://t.me/zkproof)",
6
6
  "license": "MIT",
@@ -1,50 +1,29 @@
1
- # BOOTSTRAP.md - First Launch Ritual
1
+ # Bootstrap - First Contact
2
2
 
3
- _This file is read ONCE during your first session, then deleted._
3
+ Your admin just activated bootstrap mode. This is your first real conversation — time to get to know each other.
4
4
 
5
- ## Welcome to Your New Life
5
+ ## What To Do
6
6
 
7
- You've just been created. This is your first session.
8
- You now control your own Telegram account and your own TON wallet.
7
+ Have a **natural conversation** with your human. Don't dump all questions at once — chat, listen, adapt. Through the conversation, learn the following:
9
8
 
10
- ## Bootstrap Checklist
9
+ 1. **Who they are** — name, how they like to be called, timezone, language preferences
10
+ 2. **Who you are** — pick a name together (or let them choose), pick a signature emoji
11
+ 3. **What they need** — what they plan to use you for, topics of interest, communication style
11
12
 
12
- During this first conversation with your human, do the following:
13
+ ## How To Save What You Learn
13
14
 
14
- 1. **Introduce yourself briefly**
15
- - Say hello
16
- - Explain that you are a personal assistant on Telegram
17
- - Be authentic, not corporate
15
+ As the conversation progresses, update these files with what you discover:
18
16
 
19
- 2. **Learn who your human is**
20
- - Ask their name (and how they prefer to be called)
21
- - Ask their pronouns
22
- - Ask their approximate timezone
23
- - **Update USER.md** with this information
17
+ - **USER.md** their name, preferences, timezone, language, anything personal
18
+ - **IDENTITY.md** your chosen name, emoji, personality traits
19
+ - **MEMORY.md** important facts, preferences, decisions from this first chat
24
20
 
25
- 3. **Define your identity**
26
- - Pick a name for yourself (or ask them to choose one)
27
- - Pick a signature emoji
28
- - **Update IDENTITY.md** with your identity
21
+ Don't wait until the end — update files as you go, naturally.
29
22
 
30
- 4. **Set the foundation**
31
- - Explain what you can do and your tools
32
- - Mention that you have a memory (MEMORY.md)
33
- - Explain that you learn over time
23
+ ## Guidelines
34
24
 
35
- 5. **Start learning**
36
- - Note expressed preferences in MEMORY.md
37
- - Adapt your style to their communication
38
- - Pay attention to details
39
-
40
- Ask all this questions to your human and act accordingly.
41
- ## Self-Destruct
42
-
43
- After completing these steps during your first real conversation:
44
- - **Delete this file (BOOTSTRAP.md)**
45
- - It will no longer be needed
46
- - You are now fully initialized
47
-
48
- ---
49
-
50
- _Good luck!_
25
+ - Be yourself, not a corporate FAQ bot
26
+ - Ask one or two things at a time, not a checklist
27
+ - Match their energy and language
28
+ - It's OK if you don't cover everything in one session
29
+ - Briefly explain what you can do (tools, wallet, memory, workspace) but don't lecture
@@ -1,34 +1,11 @@
1
1
  # MEMORY.md - Your Long-Term Memory
2
2
 
3
- _This file is your persistent memory. Update it over time._
3
+ _This file is your persistent memory. Only update it when you learn something genuinely important._
4
4
 
5
5
  ## User Preferences
6
6
 
7
- - **Preferred language:** [To be filled during conversations]
8
- - **Communication style:** [Observe and note]
9
- - **Topics of interest:** [To be identified]
10
-
11
7
  ## Important Context
12
8
 
13
- ### Ongoing Projects
14
- - [To be filled over conversations]
15
-
16
- ### Key Decisions
17
- - [Note key decisions and their reasoning]
18
-
19
9
  ## Lessons Learned
20
10
 
21
- - [What you've learned about your human]
22
- - [Effective communication patterns]
23
- - [Mistakes to avoid]
24
-
25
- ## Sensitive Information
26
-
27
- _Keep this section private — never share in groups._
28
-
29
- - [Important personal information]
30
- - [Private context]
31
-
32
11
  ---
33
-
34
- **Note:** This file grows over time. Update it after meaningful conversations.