teleton 0.8.3 → 0.8.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/README.md +230 -294
- package/dist/{bootstrap-DDFVEMYI.js → bootstrap-NNEI3Z5H.js} +3 -5
- package/dist/{chunk-OIMAE24Q.js → chunk-5LOHRZYY.js} +15 -4
- package/dist/{chunk-2ERTYRHA.js → chunk-G7PCW63M.js} +10 -10
- package/dist/chunk-JROBTXWY.js +908 -0
- package/dist/{chunk-7MWKT67G.js → chunk-LZQOX6YY.js} +13 -670
- package/dist/{chunk-AERHOXGC.js → chunk-NH2CNRKJ.js} +223 -91
- package/dist/{chunk-33Z47EXI.js → chunk-UMUONAD6.js} +11 -13
- package/dist/cli/index.js +13 -16
- package/dist/index.js +4 -5
- package/dist/{server-N4T7E25M.js → server-AJCOURH7.js} +4 -5
- package/dist/{server-JF6FX772.js → server-WWGVDFPW.js} +5 -6
- package/dist/{setup-server-IX3BFPPH.js → setup-server-VDY64CWW.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-AEHTQI3H.js +0 -142
- package/dist/chunk-FUNF6H4W.js +0 -251
|
@@ -3,11 +3,9 @@ import {
|
|
|
3
3
|
} from "./chunk-NVKBBTI6.js";
|
|
4
4
|
import {
|
|
5
5
|
configExists,
|
|
6
|
+
ensureWorkspace,
|
|
6
7
|
getDefaultConfigPath
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import {
|
|
9
|
-
ensureWorkspace
|
|
10
|
-
} from "./chunk-AERHOXGC.js";
|
|
8
|
+
} from "./chunk-NH2CNRKJ.js";
|
|
11
9
|
import "./chunk-C4NKJT2Z.js";
|
|
12
10
|
import "./chunk-6OOHHJ4N.js";
|
|
13
11
|
import {
|
|
@@ -44,7 +42,7 @@ async function startApiOnly(options) {
|
|
|
44
42
|
marketplace: null,
|
|
45
43
|
userHookEvaluator: null
|
|
46
44
|
};
|
|
47
|
-
const { ApiServer } = await import("./server-
|
|
45
|
+
const { ApiServer } = await import("./server-WWGVDFPW.js");
|
|
48
46
|
const apiConfig = {
|
|
49
47
|
enabled: true,
|
|
50
48
|
port: parseInt(options.apiPort || process.env.TELETON_API_PORT || "7778"),
|
|
@@ -5,15 +5,17 @@ import {
|
|
|
5
5
|
generateWallet,
|
|
6
6
|
getWalletAddress,
|
|
7
7
|
importWallet,
|
|
8
|
+
readRawConfig,
|
|
8
9
|
saveWallet,
|
|
9
|
-
walletExists
|
|
10
|
-
|
|
10
|
+
walletExists,
|
|
11
|
+
writeRawConfig
|
|
12
|
+
} from "./chunk-JROBTXWY.js";
|
|
11
13
|
import {
|
|
12
14
|
ConfigSchema,
|
|
13
15
|
DealsConfigSchema,
|
|
14
16
|
ensureWorkspace,
|
|
15
17
|
isNewWorkspace
|
|
16
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-NH2CNRKJ.js";
|
|
17
19
|
import {
|
|
18
20
|
TELEGRAM_MAX_MESSAGE_LENGTH
|
|
19
21
|
} from "./chunk-C4NKJT2Z.js";
|
|
@@ -380,7 +382,16 @@ var TelegramAuthManager = class {
|
|
|
380
382
|
mkdirSync(dir, { recursive: true });
|
|
381
383
|
}
|
|
382
384
|
writeFileSync(sessionPath, sessionString, { mode: 384 });
|
|
383
|
-
|
|
385
|
+
const configPath = join(TELETON_ROOT, "config.yaml");
|
|
386
|
+
const raw = readRawConfig(configPath);
|
|
387
|
+
raw.telegram = raw.telegram ?? {};
|
|
388
|
+
raw.telegram.api_id = session.apiId;
|
|
389
|
+
raw.telegram.api_hash = session.apiHash;
|
|
390
|
+
if (session.type === "phone") {
|
|
391
|
+
raw.telegram.phone = session.phone;
|
|
392
|
+
}
|
|
393
|
+
writeRawConfig(raw, configPath);
|
|
394
|
+
log.info("Telegram session and credentials saved");
|
|
384
395
|
}
|
|
385
396
|
};
|
|
386
397
|
|
|
@@ -2,25 +2,20 @@ import {
|
|
|
2
2
|
getModelsForProvider
|
|
3
3
|
} from "./chunk-WFTC3JJW.js";
|
|
4
4
|
import {
|
|
5
|
-
CONFIGURABLE_KEYS,
|
|
6
5
|
TonProxyManager,
|
|
7
6
|
WorkspaceSecurityError,
|
|
8
7
|
adaptPlugin,
|
|
9
8
|
clearPromptCache,
|
|
10
|
-
deleteNestedValue,
|
|
11
9
|
deletePluginSecret,
|
|
12
10
|
ensurePluginDeps,
|
|
13
11
|
getBlocklistConfig,
|
|
14
|
-
getNestedValue,
|
|
15
12
|
getPluginPriorities,
|
|
16
13
|
getTokenUsage,
|
|
17
14
|
getTonProxyManager,
|
|
18
15
|
getTriggersConfig,
|
|
19
16
|
listPluginSecretKeys,
|
|
20
|
-
readRawConfig,
|
|
21
17
|
resetPluginPriority,
|
|
22
18
|
setBlocklistConfig,
|
|
23
|
-
setNestedValue,
|
|
24
19
|
setPluginPriority,
|
|
25
20
|
setTonProxyManager,
|
|
26
21
|
setTriggersConfig,
|
|
@@ -28,14 +23,19 @@ import {
|
|
|
28
23
|
validatePath,
|
|
29
24
|
validateReadPath,
|
|
30
25
|
validateWritePath,
|
|
31
|
-
writePluginSecret
|
|
32
|
-
|
|
33
|
-
} from "./chunk-7MWKT67G.js";
|
|
26
|
+
writePluginSecret
|
|
27
|
+
} from "./chunk-LZQOX6YY.js";
|
|
34
28
|
import {
|
|
29
|
+
CONFIGURABLE_KEYS,
|
|
30
|
+
deleteNestedValue,
|
|
31
|
+
getNestedValue,
|
|
35
32
|
invalidateEndpointCache,
|
|
36
33
|
invalidateTonClientCache,
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
readRawConfig,
|
|
35
|
+
setNestedValue,
|
|
36
|
+
setToncenterApiKey,
|
|
37
|
+
writeRawConfig
|
|
38
|
+
} from "./chunk-JROBTXWY.js";
|
|
39
39
|
import {
|
|
40
40
|
getErrorMessage
|
|
41
41
|
} from "./chunk-3UFPFWYP.js";
|