teleton 0.8.1 → 0.8.2
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/{chunk-5FNWBZ5K.js → chunk-2IZU3REP.js} +147 -82
- package/dist/chunk-3UFPFWYP.js +12 -0
- package/dist/{chunk-KVXV7EF7.js → chunk-55SKE6YH.js} +2 -2
- package/dist/{setup-server-32XGDPE6.js → chunk-57URFK6M.js} +7 -206
- package/dist/chunk-5SEMA47R.js +75 -0
- package/dist/{chunk-S6PHGKOC.js → chunk-7YKSXOQQ.js} +10 -2
- package/dist/{chunk-UP55PXFH.js → chunk-C4NKJT2Z.js} +8 -0
- package/dist/{chunk-CGOXE4WP.js → chunk-GGXJLMOH.js} +404 -730
- package/dist/{chunk-QBHRXLZS.js → chunk-H7MFXJZK.js} +2 -2
- package/dist/{chunk-3S4GGLLR.js → chunk-HEDJCLA6.js} +58 -19
- package/dist/{chunk-AYWEJCDB.js → chunk-J73TA3UM.js} +7 -7
- package/dist/{chunk-QV2GLOTK.js → chunk-LC4TV3KL.js} +1 -1
- package/dist/{chunk-RCMD3U65.js → chunk-NQ6FZKCE.js} +13 -0
- package/dist/{chunk-7U7BOHCL.js → chunk-VYKW7FMV.js} +147 -63
- package/dist/chunk-W25Z7CM6.js +487 -0
- package/dist/{chunk-OJCLKU5Z.js → chunk-WFTC3JJW.js} +16 -0
- package/dist/{server-3FHI2SEB.js → chunk-XBSCYMKM.js} +23 -369
- package/dist/{chunk-PHSAHTK4.js → chunk-YOSUPUAJ.js} +75 -7
- package/dist/cli/index.js +61 -17
- package/dist/{client-MPHPIZB6.js → client-YOOHI776.js} +4 -4
- package/dist/{get-my-gifts-CC6HAVWB.js → get-my-gifts-Y7EN7RK4.js} +3 -3
- package/dist/index.js +14 -13
- package/dist/{memory-UBHM7ILG.js → memory-Q6EWGK2S.js} +6 -4
- package/dist/memory-hook-WUXJNVT5.js +18 -0
- package/dist/{migrate-UBBEJ5BL.js → migrate-WFU6COBN.js} +4 -4
- package/dist/server-GYZXKIKU.js +787 -0
- package/dist/server-YODFBZKG.js +392 -0
- package/dist/setup-server-IZBUOJRU.js +215 -0
- package/dist/{store-M5IMUQCL.js → store-7M4XV6M5.js} +5 -5
- package/dist/{task-dependency-resolver-RR2O5S7B.js → task-dependency-resolver-L6UUMTHK.js} +2 -2
- package/dist/{task-executor-6W5HRX5C.js → task-executor-XBNJLUCS.js} +2 -2
- package/dist/{tool-adapter-IH5VGBOO.js → tool-adapter-IVX2XQJE.js} +1 -1
- package/dist/{tool-index-PMAOXWUA.js → tool-index-NYH57UWP.js} +3 -3
- package/dist/{transcript-NGDPSNIH.js → transcript-IM7G25OS.js} +2 -2
- package/package.json +4 -2
- package/dist/chunk-XBE4JB7C.js +0 -8
package/dist/cli/index.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ensureTlsCert
|
|
3
|
+
} from "../chunk-5SEMA47R.js";
|
|
1
4
|
import {
|
|
2
5
|
getModelsForProvider
|
|
3
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-WFTC3JJW.js";
|
|
4
7
|
import {
|
|
5
8
|
TelegramUserClient,
|
|
6
9
|
main
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
10
|
+
} from "../chunk-2IZU3REP.js";
|
|
11
|
+
import "../chunk-H7MFXJZK.js";
|
|
9
12
|
import {
|
|
10
13
|
CONFIGURABLE_KEYS,
|
|
11
14
|
configExists,
|
|
@@ -15,7 +18,7 @@ import {
|
|
|
15
18
|
readRawConfig,
|
|
16
19
|
setNestedValue,
|
|
17
20
|
writeRawConfig
|
|
18
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-GGXJLMOH.js";
|
|
19
22
|
import {
|
|
20
23
|
ConfigSchema,
|
|
21
24
|
DealsConfigSchema,
|
|
@@ -26,27 +29,28 @@ import {
|
|
|
26
29
|
loadWallet,
|
|
27
30
|
saveWallet,
|
|
28
31
|
walletExists
|
|
29
|
-
} from "../chunk-
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-
|
|
32
|
+
} from "../chunk-7YKSXOQQ.js";
|
|
33
|
+
import "../chunk-55SKE6YH.js";
|
|
34
|
+
import "../chunk-W25Z7CM6.js";
|
|
32
35
|
import {
|
|
33
36
|
getErrorMessage
|
|
34
|
-
} from "../chunk-
|
|
35
|
-
import "../chunk-
|
|
37
|
+
} from "../chunk-3UFPFWYP.js";
|
|
38
|
+
import "../chunk-7TECSLJ4.js";
|
|
39
|
+
import "../chunk-J73TA3UM.js";
|
|
36
40
|
import {
|
|
37
41
|
getClaudeCodeApiKey,
|
|
38
42
|
getProviderMetadata,
|
|
39
43
|
getSupportedProviders,
|
|
40
44
|
isClaudeCodeTokenValid,
|
|
41
45
|
validateApiKeyFormat
|
|
42
|
-
} from "../chunk-
|
|
43
|
-
import "../chunk-
|
|
44
|
-
import "../chunk-
|
|
45
|
-
import "../chunk-
|
|
46
|
+
} from "../chunk-YOSUPUAJ.js";
|
|
47
|
+
import "../chunk-LC4TV3KL.js";
|
|
48
|
+
import "../chunk-VYKW7FMV.js";
|
|
49
|
+
import "../chunk-HEDJCLA6.js";
|
|
46
50
|
import "../chunk-VFA7QMCZ.js";
|
|
47
51
|
import {
|
|
48
52
|
TELEGRAM_MAX_MESSAGE_LENGTH
|
|
49
|
-
} from "../chunk-
|
|
53
|
+
} from "../chunk-C4NKJT2Z.js";
|
|
50
54
|
import {
|
|
51
55
|
fetchWithTimeout
|
|
52
56
|
} from "../chunk-XQUHC3JZ.js";
|
|
@@ -54,7 +58,7 @@ import "../chunk-R4YSJ4EY.js";
|
|
|
54
58
|
import {
|
|
55
59
|
TELETON_ROOT
|
|
56
60
|
} from "../chunk-EYWNOHMJ.js";
|
|
57
|
-
import "../chunk-
|
|
61
|
+
import "../chunk-NQ6FZKCE.js";
|
|
58
62
|
import "../chunk-4L66JHQE.js";
|
|
59
63
|
import "../chunk-3RG5ZIWI.js";
|
|
60
64
|
|
|
@@ -379,7 +383,7 @@ function sleep(ms) {
|
|
|
379
383
|
}
|
|
380
384
|
async function onboardCommand(options = {}) {
|
|
381
385
|
if (options.ui) {
|
|
382
|
-
const { SetupServer } = await import("../setup-server-
|
|
386
|
+
const { SetupServer } = await import("../setup-server-IZBUOJRU.js");
|
|
383
387
|
const port = parseInt(options.uiPort || "7777") || 7777;
|
|
384
388
|
const url = `http://localhost:${port}/setup`;
|
|
385
389
|
const blue2 = "\x1B[34m";
|
|
@@ -1890,6 +1894,21 @@ Available: set, get, list, unset`);
|
|
|
1890
1894
|
}
|
|
1891
1895
|
}
|
|
1892
1896
|
|
|
1897
|
+
// src/cli/commands/api.ts
|
|
1898
|
+
import { createHash, randomBytes } from "crypto";
|
|
1899
|
+
async function apiRotateKeyCommand(options) {
|
|
1900
|
+
const key = "tltn_" + randomBytes(32).toString("base64url");
|
|
1901
|
+
const hash = createHash("sha256").update(key).digest("hex");
|
|
1902
|
+
const raw = readRawConfig(options.config);
|
|
1903
|
+
setNestedValue(raw, "api.key_hash", hash);
|
|
1904
|
+
writeRawConfig(raw, options.config);
|
|
1905
|
+
console.log(key);
|
|
1906
|
+
}
|
|
1907
|
+
async function apiFingerprintCommand() {
|
|
1908
|
+
const tls = await ensureTlsCert(TELETON_ROOT);
|
|
1909
|
+
console.log(tls.fingerprint);
|
|
1910
|
+
}
|
|
1911
|
+
|
|
1893
1912
|
// src/cli/index.ts
|
|
1894
1913
|
import { readFileSync as readFileSync3, existsSync as existsSync3 } from "fs";
|
|
1895
1914
|
import { dirname, join as join3 } from "path";
|
|
@@ -1928,7 +1947,7 @@ program.command("setup").description("Interactive wizard to set up Teleton").opt
|
|
|
1928
1947
|
process.exit(1);
|
|
1929
1948
|
}
|
|
1930
1949
|
});
|
|
1931
|
-
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) => {
|
|
1950
|
+
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)").option("--api", "Enable Management API server (overrides config)").option("--api-port <port>", "Management API port (default: 7778)").option("--json-credentials", "Output API credentials as JSON to stdout on start").action(async (options) => {
|
|
1932
1951
|
try {
|
|
1933
1952
|
if (!configExists(options.config)) {
|
|
1934
1953
|
console.error("\u274C Configuration not found");
|
|
@@ -1942,6 +1961,15 @@ program.command("start").description("Start the Teleton agent").option("-c, --co
|
|
|
1942
1961
|
if (options.webuiPort) {
|
|
1943
1962
|
process.env.TELETON_WEBUI_PORT = options.webuiPort;
|
|
1944
1963
|
}
|
|
1964
|
+
if (options.api) {
|
|
1965
|
+
process.env.TELETON_API_ENABLED = "true";
|
|
1966
|
+
}
|
|
1967
|
+
if (options.apiPort) {
|
|
1968
|
+
process.env.TELETON_API_PORT = options.apiPort;
|
|
1969
|
+
}
|
|
1970
|
+
if (options.jsonCredentials) {
|
|
1971
|
+
process.env.TELETON_JSON_CREDENTIALS = "true";
|
|
1972
|
+
}
|
|
1945
1973
|
await main(options.config);
|
|
1946
1974
|
} catch (error) {
|
|
1947
1975
|
console.error("Error:", getErrorMessage(error));
|
|
@@ -1996,6 +2024,22 @@ program.command("config").description("Manage configuration keys (set, get, list
|
|
|
1996
2024
|
process.exit(1);
|
|
1997
2025
|
}
|
|
1998
2026
|
});
|
|
2027
|
+
program.command("api-rotate-key").description("Generate a new Management API key").option("-c, --config <path>", "Config file path", getDefaultConfigPath()).action(async (options) => {
|
|
2028
|
+
try {
|
|
2029
|
+
await apiRotateKeyCommand({ config: options.config });
|
|
2030
|
+
} catch (error) {
|
|
2031
|
+
console.error("Error:", getErrorMessage(error));
|
|
2032
|
+
process.exit(1);
|
|
2033
|
+
}
|
|
2034
|
+
});
|
|
2035
|
+
program.command("api-fingerprint").description("Show TLS certificate fingerprint").action(async () => {
|
|
2036
|
+
try {
|
|
2037
|
+
await apiFingerprintCommand();
|
|
2038
|
+
} catch (error) {
|
|
2039
|
+
console.error("Error:", getErrorMessage(error));
|
|
2040
|
+
process.exit(1);
|
|
2041
|
+
}
|
|
2042
|
+
});
|
|
1999
2043
|
program.action(() => {
|
|
2000
2044
|
program.help();
|
|
2001
2045
|
});
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
loadContextFromTranscript,
|
|
9
9
|
registerCocoonModels,
|
|
10
10
|
registerLocalModels
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-J73TA3UM.js";
|
|
12
|
+
import "./chunk-YOSUPUAJ.js";
|
|
13
|
+
import "./chunk-LC4TV3KL.js";
|
|
14
14
|
import "./chunk-XQUHC3JZ.js";
|
|
15
15
|
import "./chunk-R4YSJ4EY.js";
|
|
16
16
|
import "./chunk-EYWNOHMJ.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-NQ6FZKCE.js";
|
|
18
18
|
import "./chunk-3RG5ZIWI.js";
|
|
19
19
|
export {
|
|
20
20
|
chatWithContext,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
telegramGetMyGiftsExecutor,
|
|
3
3
|
telegramGetMyGiftsTool
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-H7MFXJZK.js";
|
|
5
|
+
import "./chunk-3UFPFWYP.js";
|
|
6
|
+
import "./chunk-NQ6FZKCE.js";
|
|
7
7
|
import "./chunk-3RG5ZIWI.js";
|
|
8
8
|
export {
|
|
9
9
|
telegramGetMyGiftsExecutor,
|
package/dist/index.js
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TeletonApp,
|
|
3
3
|
main
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-2IZU3REP.js";
|
|
5
|
+
import "./chunk-H7MFXJZK.js";
|
|
6
|
+
import "./chunk-GGXJLMOH.js";
|
|
7
|
+
import "./chunk-7YKSXOQQ.js";
|
|
8
|
+
import "./chunk-55SKE6YH.js";
|
|
9
|
+
import "./chunk-W25Z7CM6.js";
|
|
10
|
+
import "./chunk-3UFPFWYP.js";
|
|
9
11
|
import "./chunk-7TECSLJ4.js";
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-3S4GGLLR.js";
|
|
12
|
+
import "./chunk-J73TA3UM.js";
|
|
13
|
+
import "./chunk-YOSUPUAJ.js";
|
|
14
|
+
import "./chunk-LC4TV3KL.js";
|
|
15
|
+
import "./chunk-VYKW7FMV.js";
|
|
16
|
+
import "./chunk-HEDJCLA6.js";
|
|
16
17
|
import "./chunk-VFA7QMCZ.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-C4NKJT2Z.js";
|
|
18
19
|
import "./chunk-XQUHC3JZ.js";
|
|
19
20
|
import "./chunk-R4YSJ4EY.js";
|
|
20
21
|
import "./chunk-EYWNOHMJ.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-NQ6FZKCE.js";
|
|
22
23
|
import "./chunk-4L66JHQE.js";
|
|
23
24
|
import "./chunk-3RG5ZIWI.js";
|
|
24
25
|
export {
|
|
@@ -14,9 +14,10 @@ import {
|
|
|
14
14
|
getDatabase,
|
|
15
15
|
getSchemaVersion,
|
|
16
16
|
initializeMemory,
|
|
17
|
+
parseTemporalIntent,
|
|
17
18
|
runMigrations,
|
|
18
19
|
setSchemaVersion
|
|
19
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-VYKW7FMV.js";
|
|
20
21
|
import {
|
|
21
22
|
AnthropicEmbeddingProvider,
|
|
22
23
|
CachedEmbeddingProvider,
|
|
@@ -26,13 +27,13 @@ import {
|
|
|
26
27
|
deserializeEmbedding,
|
|
27
28
|
hashText,
|
|
28
29
|
serializeEmbedding
|
|
29
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-HEDJCLA6.js";
|
|
30
31
|
import "./chunk-VFA7QMCZ.js";
|
|
31
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-C4NKJT2Z.js";
|
|
32
33
|
import "./chunk-XQUHC3JZ.js";
|
|
33
34
|
import "./chunk-R4YSJ4EY.js";
|
|
34
35
|
import "./chunk-EYWNOHMJ.js";
|
|
35
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-NQ6FZKCE.js";
|
|
36
37
|
import {
|
|
37
38
|
TaskStore,
|
|
38
39
|
getTaskStore
|
|
@@ -63,6 +64,7 @@ export {
|
|
|
63
64
|
getTaskStore,
|
|
64
65
|
hashText,
|
|
65
66
|
initializeMemory,
|
|
67
|
+
parseTemporalIntent,
|
|
66
68
|
runMigrations,
|
|
67
69
|
serializeEmbedding,
|
|
68
70
|
setSchemaVersion
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
consolidateOldMemoryFiles,
|
|
3
|
+
saveSessionMemory
|
|
4
|
+
} from "./chunk-W25Z7CM6.js";
|
|
5
|
+
import "./chunk-3UFPFWYP.js";
|
|
6
|
+
import "./chunk-J73TA3UM.js";
|
|
7
|
+
import "./chunk-YOSUPUAJ.js";
|
|
8
|
+
import "./chunk-LC4TV3KL.js";
|
|
9
|
+
import "./chunk-C4NKJT2Z.js";
|
|
10
|
+
import "./chunk-XQUHC3JZ.js";
|
|
11
|
+
import "./chunk-R4YSJ4EY.js";
|
|
12
|
+
import "./chunk-EYWNOHMJ.js";
|
|
13
|
+
import "./chunk-NQ6FZKCE.js";
|
|
14
|
+
import "./chunk-3RG5ZIWI.js";
|
|
15
|
+
export {
|
|
16
|
+
consolidateOldMemoryFiles,
|
|
17
|
+
saveSessionMemory
|
|
18
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getDatabase
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-VYKW7FMV.js";
|
|
4
|
+
import "./chunk-HEDJCLA6.js";
|
|
5
5
|
import "./chunk-VFA7QMCZ.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-C4NKJT2Z.js";
|
|
7
7
|
import "./chunk-XQUHC3JZ.js";
|
|
8
8
|
import "./chunk-R4YSJ4EY.js";
|
|
9
9
|
import {
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "./chunk-EYWNOHMJ.js";
|
|
12
12
|
import {
|
|
13
13
|
createLogger
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-NQ6FZKCE.js";
|
|
15
15
|
import "./chunk-4L66JHQE.js";
|
|
16
16
|
import "./chunk-3RG5ZIWI.js";
|
|
17
17
|
|