teleton 0.7.2 → 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.
Files changed (31) hide show
  1. package/README.md +31 -12
  2. package/dist/{chunk-ND2X5FWB.js → chunk-5PLZ3KSO.js} +16 -3
  3. package/dist/{chunk-NERLQY2H.js → chunk-BGC2IUM5.js} +73 -15
  4. package/dist/{chunk-FNV5FF35.js → chunk-EK7M5K26.js} +29 -13
  5. package/dist/chunk-JQDLW7IE.js +107 -0
  6. package/dist/{chunk-VSMUAU5X.js → chunk-LAQOUFOJ.js} +2419 -2132
  7. package/dist/chunk-QOQWUUA4.js +158 -0
  8. package/dist/{chunk-LRCPA7SC.js → chunk-RMLQS3X6.js} +15 -3
  9. package/dist/{chunk-UDD7FYOU.js → chunk-WIKM24GZ.js} +1 -18
  10. package/dist/{chunk-RBU6JXD3.js → chunk-XDYDA2KV.js} +1 -1
  11. package/dist/{chunk-JHKWHGBM.js → chunk-YFG2QHLA.js} +380 -47
  12. package/dist/cli/index.js +216 -272
  13. package/dist/{client-3VWE7NC4.js → client-RTNALK7W.js} +3 -2
  14. package/dist/{get-my-gifts-RI7FAXAL.js → get-my-gifts-TPVUGUWT.js} +1 -1
  15. package/dist/index.js +9 -10
  16. package/dist/{memory-5SS3Q5EA.js → memory-JQZ6MTRU.js} +2 -2
  17. package/dist/{migrate-M7SJMDOL.js → migrate-GS5ACQDA.js} +2 -2
  18. package/dist/{server-NPSODUMA.js → server-TCJOBV3D.js} +292 -11
  19. package/dist/{setup-server-C7ZTPHD5.js → setup-server-YHYJLAMA.js} +77 -112
  20. package/dist/{tool-index-MIVK3D7H.js → tool-index-6HBRVXVG.js} +1 -1
  21. package/dist/web/assets/index-B6M9knfJ.css +1 -0
  22. package/dist/web/assets/index-DAGeQfVZ.js +72 -0
  23. package/dist/web/assets/{index.es-D81xLR29.js → index.es-CqZHj0tz.js} +1 -1
  24. package/dist/web/index.html +2 -2
  25. package/package.json +2 -2
  26. package/dist/chunk-EHEV7FJ7.js +0 -157
  27. package/dist/chunk-QUAPFI2N.js +0 -42
  28. package/dist/endpoint-FLYNEZ2F.js +0 -7
  29. package/dist/format-transactions-FD74HI5N.js +0 -9
  30. package/dist/web/assets/index-BqwoDycr.js +0 -72
  31. package/dist/web/assets/index-CRDIf07k.css +0 -1
@@ -0,0 +1,158 @@
1
+ // src/config/model-catalog.ts
2
+ var MODEL_OPTIONS = {
3
+ anthropic: [
4
+ {
5
+ value: "claude-opus-4-6",
6
+ name: "Claude Opus 4.6",
7
+ description: "Most capable, 1M ctx, $5/M"
8
+ },
9
+ {
10
+ value: "claude-opus-4-5-20251101",
11
+ name: "Claude Opus 4.5",
12
+ description: "Previous gen, 200K ctx, $5/M"
13
+ },
14
+ {
15
+ value: "claude-sonnet-4-6",
16
+ name: "Claude Sonnet 4.6",
17
+ description: "Balanced, 200K ctx, $3/M"
18
+ },
19
+ {
20
+ value: "claude-haiku-4-5-20251001",
21
+ name: "Claude Haiku 4.5",
22
+ description: "Fast & cheap, $1/M"
23
+ }
24
+ ],
25
+ openai: [
26
+ { value: "gpt-5", name: "GPT-5", description: "Most capable, 400K ctx, $1.25/M" },
27
+ { value: "gpt-5-pro", name: "GPT-5 Pro", description: "Extended thinking, 400K ctx" },
28
+ { value: "gpt-5-mini", name: "GPT-5 Mini", description: "Fast & cheap, 400K ctx" },
29
+ { value: "gpt-5.1", name: "GPT-5.1", description: "Latest gen, 400K ctx" },
30
+ { value: "gpt-4o", name: "GPT-4o", description: "Balanced, 128K ctx, $2.50/M" },
31
+ { value: "gpt-4.1", name: "GPT-4.1", description: "1M ctx, $2/M" },
32
+ { value: "gpt-4.1-mini", name: "GPT-4.1 Mini", description: "1M ctx, cheap, $0.40/M" },
33
+ { value: "o4-mini", name: "o4 Mini", description: "Reasoning, fast, 200K ctx" },
34
+ { value: "o3", name: "o3", description: "Reasoning, 200K ctx, $2/M" },
35
+ { value: "codex-mini-latest", name: "Codex Mini", description: "Coding specialist" }
36
+ ],
37
+ google: [
38
+ { value: "gemini-3-pro-preview", name: "Gemini 3 Pro", description: "Preview, most capable" },
39
+ { value: "gemini-3-flash-preview", name: "Gemini 3 Flash", description: "Preview, fast" },
40
+ { value: "gemini-2.5-pro", name: "Gemini 2.5 Pro", description: "Stable, 1M ctx, $1.25/M" },
41
+ { value: "gemini-2.5-flash", name: "Gemini 2.5 Flash", description: "Fast, 1M ctx, $0.30/M" },
42
+ {
43
+ value: "gemini-2.5-flash-lite",
44
+ name: "Gemini 2.5 Flash Lite",
45
+ description: "Ultra cheap, 1M ctx"
46
+ },
47
+ { value: "gemini-2.0-flash", name: "Gemini 2.0 Flash", description: "Cheap, 1M ctx, $0.10/M" }
48
+ ],
49
+ xai: [
50
+ { value: "grok-4-1-fast", name: "Grok 4.1 Fast", description: "Latest, vision, 2M ctx" },
51
+ { value: "grok-4-fast", name: "Grok 4 Fast", description: "Vision, 2M ctx, $0.20/M" },
52
+ { value: "grok-4", name: "Grok 4", description: "Reasoning, 256K ctx, $3/M" },
53
+ { value: "grok-code-fast-1", name: "Grok Code", description: "Coding specialist, fast" },
54
+ { value: "grok-3", name: "Grok 3", description: "Stable, 131K ctx, $3/M" }
55
+ ],
56
+ groq: [
57
+ {
58
+ value: "meta-llama/llama-4-maverick-17b-128e-instruct",
59
+ name: "Llama 4 Maverick",
60
+ description: "Vision, 131K ctx, $0.20/M"
61
+ },
62
+ { value: "qwen/qwen3-32b", name: "Qwen3 32B", description: "Reasoning, 131K ctx, $0.29/M" },
63
+ {
64
+ value: "deepseek-r1-distill-llama-70b",
65
+ name: "DeepSeek R1 70B",
66
+ description: "Reasoning, 131K ctx, $0.75/M"
67
+ },
68
+ {
69
+ value: "llama-3.3-70b-versatile",
70
+ name: "Llama 3.3 70B",
71
+ description: "General purpose, 131K ctx, $0.59/M"
72
+ }
73
+ ],
74
+ openrouter: [
75
+ { value: "anthropic/claude-opus-4.5", name: "Claude Opus 4.5", description: "200K ctx, $5/M" },
76
+ {
77
+ value: "anthropic/claude-sonnet-4-6",
78
+ name: "Claude Sonnet 4.6",
79
+ description: "200K ctx, $3/M"
80
+ },
81
+ { value: "openai/gpt-5", name: "GPT-5", description: "400K ctx, $1.25/M" },
82
+ { value: "google/gemini-2.5-flash", name: "Gemini 2.5 Flash", description: "1M ctx, $0.30/M" },
83
+ {
84
+ value: "deepseek/deepseek-r1",
85
+ name: "DeepSeek R1",
86
+ description: "Reasoning, 64K ctx, $0.70/M"
87
+ },
88
+ {
89
+ value: "deepseek/deepseek-r1-0528",
90
+ name: "DeepSeek R1 0528",
91
+ description: "Reasoning improved, 64K ctx"
92
+ },
93
+ {
94
+ value: "deepseek/deepseek-v3.2",
95
+ name: "DeepSeek V3.2",
96
+ description: "Latest, general, 64K ctx"
97
+ },
98
+ { value: "deepseek/deepseek-v3.1", name: "DeepSeek V3.1", description: "General, 64K ctx" },
99
+ {
100
+ value: "deepseek/deepseek-v3-0324",
101
+ name: "DeepSeek V3",
102
+ description: "General, 64K ctx, $0.30/M"
103
+ },
104
+ { value: "qwen/qwen3-coder", name: "Qwen3 Coder", description: "Coding specialist" },
105
+ { value: "qwen/qwen3-max", name: "Qwen3 Max", description: "Most capable Qwen" },
106
+ { value: "qwen/qwen3-235b-a22b", name: "Qwen3 235B", description: "235B params, MoE" },
107
+ {
108
+ value: "nvidia/nemotron-nano-9b-v2",
109
+ name: "Nemotron Nano 9B",
110
+ description: "Small & fast, Nvidia"
111
+ },
112
+ {
113
+ value: "perplexity/sonar-pro",
114
+ name: "Perplexity Sonar Pro",
115
+ description: "Web search integrated"
116
+ },
117
+ { value: "minimax/minimax-m2.5", name: "MiniMax M2.5", description: "Latest MiniMax" },
118
+ { value: "x-ai/grok-4", name: "Grok 4", description: "256K ctx, $3/M" }
119
+ ],
120
+ moonshot: [
121
+ { value: "kimi-k2.5", name: "Kimi K2.5", description: "Free, 256K ctx, multimodal" },
122
+ {
123
+ value: "kimi-k2-thinking",
124
+ name: "Kimi K2 Thinking",
125
+ description: "Free, 256K ctx, reasoning"
126
+ }
127
+ ],
128
+ mistral: [
129
+ {
130
+ value: "devstral-small-2507",
131
+ name: "Devstral Small",
132
+ description: "Coding, 128K ctx, $0.10/M"
133
+ },
134
+ {
135
+ value: "devstral-medium-latest",
136
+ name: "Devstral Medium",
137
+ description: "Coding, 262K ctx, $0.40/M"
138
+ },
139
+ {
140
+ value: "mistral-large-latest",
141
+ name: "Mistral Large",
142
+ description: "General, 128K ctx, $2/M"
143
+ },
144
+ {
145
+ value: "magistral-small",
146
+ name: "Magistral Small",
147
+ description: "Reasoning, 128K ctx, $0.50/M"
148
+ }
149
+ ]
150
+ };
151
+ function getModelsForProvider(provider) {
152
+ const key = provider === "claude-code" ? "anthropic" : provider;
153
+ return MODEL_OPTIONS[key] || [];
154
+ }
155
+
156
+ export {
157
+ getModelsForProvider
158
+ };
@@ -7,8 +7,20 @@ var PROVIDER_REGISTRY = {
7
7
  keyPrefix: "sk-ant-",
8
8
  keyHint: "sk-ant-api03-...",
9
9
  consoleUrl: "https://console.anthropic.com/",
10
- defaultModel: "claude-opus-4-5-20251101",
11
- utilityModel: "claude-3-5-haiku-20241022",
10
+ defaultModel: "claude-opus-4-6",
11
+ utilityModel: "claude-haiku-4-5-20251001",
12
+ toolLimit: null,
13
+ piAiProvider: "anthropic"
14
+ },
15
+ "claude-code": {
16
+ id: "claude-code",
17
+ displayName: "Claude Code (Auto)",
18
+ envVar: "ANTHROPIC_API_KEY",
19
+ keyPrefix: "sk-ant-",
20
+ keyHint: "Auto-detected from Claude Code",
21
+ consoleUrl: "https://console.anthropic.com/",
22
+ defaultModel: "claude-opus-4-6",
23
+ utilityModel: "claude-haiku-4-5-20251001",
12
24
  toolLimit: null,
13
25
  piAiProvider: "anthropic"
14
26
  },
@@ -134,7 +146,7 @@ function getSupportedProviders() {
134
146
  function validateApiKeyFormat(provider, key) {
135
147
  const meta = PROVIDER_REGISTRY[provider];
136
148
  if (!meta) return `Unknown provider: ${provider}`;
137
- if (provider === "cocoon" || provider === "local") return void 0;
149
+ if (provider === "cocoon" || provider === "local" || provider === "claude-code") return void 0;
138
150
  if (!key || key.trim().length === 0) return "API key is required";
139
151
  if (meta.keyPrefix && !key.startsWith(meta.keyPrefix)) {
140
152
  return `Invalid format (should start with ${meta.keyPrefix})`;
@@ -20,24 +20,7 @@ function extractEmoji(sticker) {
20
20
  }
21
21
  var telegramGetMyGiftsTool = {
22
22
  name: "telegram_get_my_gifts",
23
- description: `Get Star Gifts you or another user has received.
24
-
25
- USAGE:
26
- - To view YOUR OWN gifts: omit both userId and viewSender
27
- - To view the SENDER's gifts (when user says "show me MY gifts"): set viewSender=true
28
- - To view a specific user's gifts: pass their userId
29
-
30
- PRESENTATION GUIDE:
31
- - For collectibles: Use "title + model" as display name (e.g., "Hypno Lollipop Telegram")
32
- - NFT link: t.me/nft/{slug} (e.g., t.me/nft/HypnoLollipop-63414)
33
- - Respond concisely: "You have a Hypno Lollipop Telegram \u{1F36D}"
34
- - Only give details (rarity, backdrop, pattern) when specifically asked
35
- - attributes.model.name = model, attributes.pattern.name = pattern, attributes.backdrop.name = backdrop
36
- - rarityPermille: divide by 10 to get percentage (7 = 0.7%)
37
-
38
- TRANSFER: Use msgId (for your own gifts) to transfer collectibles via telegram_transfer_collectible.
39
-
40
- NEVER dump all raw data. Keep responses natural and concise.`,
23
+ description: "Get Star Gifts received by you or another user. Set viewSender=true when sender says 'show MY gifts'. For collectibles: display as 'title + model', link as t.me/nft/{slug}. rarityPermille / 10 = %. Use msgId for transfers.",
41
24
  parameters: Type.Object({
42
25
  userId: Type.Optional(
43
26
  Type.String({
@@ -6,7 +6,7 @@ import {
6
6
  createEmbeddingProvider,
7
7
  hashText,
8
8
  serializeEmbedding
9
- } from "./chunk-FNV5FF35.js";
9
+ } from "./chunk-EK7M5K26.js";
10
10
  import {
11
11
  HYBRID_SEARCH_MIN_SCORE,
12
12
  KNOWLEDGE_CHUNK_SIZE,