teleton 0.8.1 → 0.8.3
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/bootstrap-DDFVEMYI.js +128 -0
- package/dist/{server-3FHI2SEB.js → chunk-2ERTYRHA.js} +26 -372
- package/dist/{chunk-5FNWBZ5K.js → chunk-33Z47EXI.js} +264 -274
- package/dist/{chunk-3S4GGLLR.js → chunk-35MX4ZUI.js} +23 -104
- package/dist/chunk-3UFPFWYP.js +12 -0
- package/dist/chunk-5SEMA47R.js +75 -0
- package/dist/{chunk-PHSAHTK4.js → chunk-6OOHHJ4N.js} +3 -108
- package/dist/{chunk-CGOXE4WP.js → chunk-7MWKT67G.js} +467 -914
- package/dist/chunk-AEHTQI3H.js +142 -0
- package/dist/{chunk-S6PHGKOC.js → chunk-AERHOXGC.js} +88 -322
- package/dist/chunk-ALKAAG4O.js +487 -0
- package/dist/{chunk-UP55PXFH.js → chunk-C4NKJT2Z.js} +8 -0
- package/dist/chunk-CUE4UZXR.js +129 -0
- package/dist/chunk-FUNF6H4W.js +251 -0
- package/dist/{chunk-7U7BOHCL.js → chunk-GHMXWAXI.js} +147 -63
- package/dist/{chunk-QBHRXLZS.js → chunk-H7MFXJZK.js} +2 -2
- package/dist/{chunk-QV2GLOTK.js → chunk-LC4TV3KL.js} +1 -1
- package/dist/{chunk-AYWEJCDB.js → chunk-LVTKJQ7O.js} +12 -10
- package/dist/{chunk-RCMD3U65.js → chunk-NQ6FZKCE.js} +13 -0
- package/dist/chunk-NVKBBTI6.js +128 -0
- package/dist/{setup-server-32XGDPE6.js → chunk-OIMAE24Q.js} +55 -216
- package/dist/{chunk-OJCLKU5Z.js → chunk-WFTC3JJW.js} +16 -0
- package/dist/chunk-WTDAICGT.js +175 -0
- package/dist/{chunk-KVXV7EF7.js → chunk-XDZDOKIF.js} +2 -2
- package/dist/cli/index.js +91 -27
- package/dist/{client-MPHPIZB6.js → client-5KD25NOP.js} +5 -4
- package/dist/{get-my-gifts-CC6HAVWB.js → get-my-gifts-Y7EN7RK4.js} +3 -3
- package/dist/index.js +19 -13
- package/dist/local-IHKJFQJS.js +9 -0
- package/dist/{memory-UBHM7ILG.js → memory-QMJRM3XJ.js} +9 -5
- package/dist/memory-hook-VUNWZ3NY.js +19 -0
- package/dist/{migrate-UBBEJ5BL.js → migrate-5VBAP52B.js} +5 -4
- package/dist/server-JF6FX772.js +813 -0
- package/dist/server-N4T7E25M.js +396 -0
- package/dist/setup-server-IX3BFPPH.js +217 -0
- package/dist/{store-M5IMUQCL.js → store-BY7S6IFN.js} +6 -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-FTERJSZK.js} +4 -3
- package/dist/{transcript-NGDPSNIH.js → transcript-IM7G25OS.js} +2 -2
- package/package.json +4 -2
- package/dist/chunk-XBE4JB7C.js +0 -8
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createLogger
|
|
3
|
+
} from "./chunk-NQ6FZKCE.js";
|
|
4
|
+
|
|
5
|
+
// src/providers/claude-code-credentials.ts
|
|
6
|
+
import { readFileSync, writeFileSync, existsSync } from "fs";
|
|
7
|
+
import { execSync } from "child_process";
|
|
8
|
+
import { homedir } from "os";
|
|
9
|
+
import { join } from "path";
|
|
10
|
+
var log = createLogger("ClaudeCodeCreds");
|
|
11
|
+
var OAUTH_TOKEN_URL = "https://platform.claude.com/v1/oauth/token";
|
|
12
|
+
var OAUTH_CLIENT_ID = "9d1c250a-e61b-44d9-88ed-5944d1962f5e";
|
|
13
|
+
var OAUTH_SCOPES = "user:profile user:inference user:sessions:claude_code user:mcp_servers";
|
|
14
|
+
var cachedToken = null;
|
|
15
|
+
var cachedExpiresAt = 0;
|
|
16
|
+
var cachedRefreshToken = null;
|
|
17
|
+
function getClaudeConfigDir() {
|
|
18
|
+
return process.env.CLAUDE_CONFIG_DIR || join(homedir(), ".claude");
|
|
19
|
+
}
|
|
20
|
+
function getCredentialsFilePath() {
|
|
21
|
+
return join(getClaudeConfigDir(), ".credentials.json");
|
|
22
|
+
}
|
|
23
|
+
function readCredentialsFile() {
|
|
24
|
+
const filePath = getCredentialsFilePath();
|
|
25
|
+
if (!existsSync(filePath)) return null;
|
|
26
|
+
try {
|
|
27
|
+
const raw = readFileSync(filePath, "utf-8");
|
|
28
|
+
return JSON.parse(raw);
|
|
29
|
+
} catch (e) {
|
|
30
|
+
log.warn({ err: e, path: filePath }, "Failed to parse Claude Code credentials file");
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function readKeychainCredentials() {
|
|
35
|
+
const serviceNames = ["Claude Code-credentials", "Claude Code"];
|
|
36
|
+
for (const service of serviceNames) {
|
|
37
|
+
try {
|
|
38
|
+
const raw = execSync(`security find-generic-password -s "${service}" -w`, {
|
|
39
|
+
encoding: "utf-8",
|
|
40
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
41
|
+
}).trim();
|
|
42
|
+
return JSON.parse(raw);
|
|
43
|
+
} catch {
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
function readCredentials() {
|
|
49
|
+
if (process.platform === "darwin") {
|
|
50
|
+
const keychainCreds = readKeychainCredentials();
|
|
51
|
+
if (keychainCreds) return keychainCreds;
|
|
52
|
+
log.debug("Keychain read failed, falling back to credentials file");
|
|
53
|
+
}
|
|
54
|
+
return readCredentialsFile();
|
|
55
|
+
}
|
|
56
|
+
function extractToken(creds) {
|
|
57
|
+
const oauth = creds.claudeAiOauth;
|
|
58
|
+
if (!oauth?.accessToken) {
|
|
59
|
+
log.warn("Claude Code credentials found but missing accessToken");
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
token: oauth.accessToken,
|
|
64
|
+
expiresAt: oauth.expiresAt ?? 0,
|
|
65
|
+
refreshToken: oauth.refreshToken
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
function getClaudeCodeApiKey(fallbackKey) {
|
|
69
|
+
if (cachedToken && Date.now() < cachedExpiresAt) {
|
|
70
|
+
return cachedToken;
|
|
71
|
+
}
|
|
72
|
+
const creds = readCredentials();
|
|
73
|
+
if (creds) {
|
|
74
|
+
const extracted = extractToken(creds);
|
|
75
|
+
if (extracted) {
|
|
76
|
+
cachedToken = extracted.token;
|
|
77
|
+
cachedExpiresAt = extracted.expiresAt;
|
|
78
|
+
cachedRefreshToken = extracted.refreshToken ?? null;
|
|
79
|
+
log.debug("Claude Code credentials loaded successfully");
|
|
80
|
+
return cachedToken;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
if (fallbackKey && fallbackKey.length > 0) {
|
|
84
|
+
log.warn("Claude Code credentials not found, using fallback api_key from config");
|
|
85
|
+
return fallbackKey;
|
|
86
|
+
}
|
|
87
|
+
throw new Error("No Claude Code credentials found. Run 'claude login' or set api_key in config.");
|
|
88
|
+
}
|
|
89
|
+
async function performOAuthRefresh(refreshToken) {
|
|
90
|
+
try {
|
|
91
|
+
const res = await fetch(OAUTH_TOKEN_URL, {
|
|
92
|
+
method: "POST",
|
|
93
|
+
headers: { "Content-Type": "application/json" },
|
|
94
|
+
body: JSON.stringify({
|
|
95
|
+
grant_type: "refresh_token",
|
|
96
|
+
refresh_token: refreshToken,
|
|
97
|
+
client_id: OAUTH_CLIENT_ID,
|
|
98
|
+
scope: OAUTH_SCOPES
|
|
99
|
+
})
|
|
100
|
+
});
|
|
101
|
+
if (!res.ok) {
|
|
102
|
+
log.warn(`OAuth token refresh failed: ${res.status} ${res.statusText}`);
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
const data = await res.json();
|
|
106
|
+
if (!data.access_token || !data.expires_in) {
|
|
107
|
+
log.warn("OAuth token refresh: unexpected response shape");
|
|
108
|
+
return null;
|
|
109
|
+
}
|
|
110
|
+
const newExpiresAt = Date.now() + data.expires_in * 1e3;
|
|
111
|
+
const newRefreshToken = data.refresh_token ?? refreshToken;
|
|
112
|
+
const filePath = getCredentialsFilePath();
|
|
113
|
+
try {
|
|
114
|
+
const existing = existsSync(filePath) ? JSON.parse(readFileSync(filePath, "utf-8")) : {};
|
|
115
|
+
const updated = {
|
|
116
|
+
...existing,
|
|
117
|
+
claudeAiOauth: {
|
|
118
|
+
...existing.claudeAiOauth,
|
|
119
|
+
accessToken: data.access_token,
|
|
120
|
+
refreshToken: newRefreshToken,
|
|
121
|
+
expiresAt: newExpiresAt
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
writeFileSync(filePath, JSON.stringify(updated, null, 2), { mode: 384 });
|
|
125
|
+
} catch (e) {
|
|
126
|
+
log.warn({ err: e }, "Failed to persist refreshed OAuth credentials to disk");
|
|
127
|
+
}
|
|
128
|
+
cachedToken = data.access_token;
|
|
129
|
+
cachedExpiresAt = newExpiresAt;
|
|
130
|
+
cachedRefreshToken = newRefreshToken;
|
|
131
|
+
log.info("Claude Code OAuth token refreshed successfully");
|
|
132
|
+
return cachedToken;
|
|
133
|
+
} catch (e) {
|
|
134
|
+
log.warn({ err: e }, "OAuth token refresh request failed");
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
async function refreshClaudeCodeApiKey() {
|
|
139
|
+
cachedToken = null;
|
|
140
|
+
cachedExpiresAt = 0;
|
|
141
|
+
if (!cachedRefreshToken) {
|
|
142
|
+
const creds2 = readCredentials();
|
|
143
|
+
if (creds2) {
|
|
144
|
+
const extracted = extractToken(creds2);
|
|
145
|
+
cachedRefreshToken = extracted?.refreshToken ?? null;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
if (cachedRefreshToken) {
|
|
149
|
+
const refreshed = await performOAuthRefresh(cachedRefreshToken);
|
|
150
|
+
if (refreshed) return refreshed;
|
|
151
|
+
log.warn("OAuth refresh failed, falling back to disk read");
|
|
152
|
+
}
|
|
153
|
+
const creds = readCredentials();
|
|
154
|
+
if (creds) {
|
|
155
|
+
const extracted = extractToken(creds);
|
|
156
|
+
if (extracted) {
|
|
157
|
+
cachedToken = extracted.token;
|
|
158
|
+
cachedExpiresAt = extracted.expiresAt;
|
|
159
|
+
cachedRefreshToken = extracted.refreshToken ?? null;
|
|
160
|
+
log.info("Claude Code credentials refreshed from disk");
|
|
161
|
+
return cachedToken;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
log.warn("Failed to refresh Claude Code credentials");
|
|
165
|
+
return null;
|
|
166
|
+
}
|
|
167
|
+
function isClaudeCodeTokenValid() {
|
|
168
|
+
return cachedToken !== null && Date.now() < cachedExpiresAt;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export {
|
|
172
|
+
getClaudeCodeApiKey,
|
|
173
|
+
refreshClaudeCodeApiKey,
|
|
174
|
+
isClaudeCodeTokenValid
|
|
175
|
+
};
|
package/dist/cli/index.js
CHANGED
|
@@ -1,60 +1,72 @@
|
|
|
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-33Z47EXI.js";
|
|
11
|
+
import "../chunk-NVKBBTI6.js";
|
|
12
|
+
import "../chunk-H7MFXJZK.js";
|
|
9
13
|
import {
|
|
10
14
|
CONFIGURABLE_KEYS,
|
|
11
|
-
configExists,
|
|
12
15
|
deleteNestedValue,
|
|
13
|
-
getDefaultConfigPath,
|
|
14
16
|
getNestedValue,
|
|
15
17
|
readRawConfig,
|
|
16
18
|
setNestedValue,
|
|
17
19
|
writeRawConfig
|
|
18
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-7MWKT67G.js";
|
|
19
21
|
import {
|
|
20
|
-
ConfigSchema,
|
|
21
|
-
DealsConfigSchema,
|
|
22
|
-
ensureWorkspace,
|
|
23
22
|
generateWallet,
|
|
24
23
|
importWallet,
|
|
25
|
-
isNewWorkspace,
|
|
26
24
|
loadWallet,
|
|
27
25
|
saveWallet,
|
|
28
26
|
walletExists
|
|
29
|
-
} from "../chunk-
|
|
30
|
-
import
|
|
31
|
-
|
|
27
|
+
} from "../chunk-FUNF6H4W.js";
|
|
28
|
+
import {
|
|
29
|
+
configExists,
|
|
30
|
+
getDefaultConfigPath
|
|
31
|
+
} from "../chunk-AEHTQI3H.js";
|
|
32
|
+
import {
|
|
33
|
+
ConfigSchema,
|
|
34
|
+
DealsConfigSchema,
|
|
35
|
+
ensureWorkspace,
|
|
36
|
+
isNewWorkspace
|
|
37
|
+
} from "../chunk-AERHOXGC.js";
|
|
38
|
+
import "../chunk-XDZDOKIF.js";
|
|
39
|
+
import "../chunk-GHMXWAXI.js";
|
|
40
|
+
import "../chunk-ALKAAG4O.js";
|
|
32
41
|
import {
|
|
33
42
|
getErrorMessage
|
|
34
|
-
} from "../chunk-
|
|
35
|
-
import "../chunk-
|
|
43
|
+
} from "../chunk-3UFPFWYP.js";
|
|
44
|
+
import "../chunk-7TECSLJ4.js";
|
|
45
|
+
import "../chunk-35MX4ZUI.js";
|
|
46
|
+
import "../chunk-VFA7QMCZ.js";
|
|
47
|
+
import {
|
|
48
|
+
TELEGRAM_MAX_MESSAGE_LENGTH
|
|
49
|
+
} from "../chunk-C4NKJT2Z.js";
|
|
50
|
+
import "../chunk-LVTKJQ7O.js";
|
|
36
51
|
import {
|
|
37
52
|
getClaudeCodeApiKey,
|
|
53
|
+
isClaudeCodeTokenValid
|
|
54
|
+
} from "../chunk-WTDAICGT.js";
|
|
55
|
+
import {
|
|
38
56
|
getProviderMetadata,
|
|
39
57
|
getSupportedProviders,
|
|
40
|
-
isClaudeCodeTokenValid,
|
|
41
58
|
validateApiKeyFormat
|
|
42
|
-
} from "../chunk-
|
|
43
|
-
import "../chunk-QV2GLOTK.js";
|
|
44
|
-
import "../chunk-7U7BOHCL.js";
|
|
45
|
-
import "../chunk-3S4GGLLR.js";
|
|
46
|
-
import "../chunk-VFA7QMCZ.js";
|
|
47
|
-
import {
|
|
48
|
-
TELEGRAM_MAX_MESSAGE_LENGTH
|
|
49
|
-
} from "../chunk-UP55PXFH.js";
|
|
59
|
+
} from "../chunk-6OOHHJ4N.js";
|
|
50
60
|
import {
|
|
51
61
|
fetchWithTimeout
|
|
52
62
|
} from "../chunk-XQUHC3JZ.js";
|
|
53
63
|
import "../chunk-R4YSJ4EY.js";
|
|
64
|
+
import "../chunk-LC4TV3KL.js";
|
|
65
|
+
import "../chunk-CUE4UZXR.js";
|
|
54
66
|
import {
|
|
55
67
|
TELETON_ROOT
|
|
56
68
|
} from "../chunk-EYWNOHMJ.js";
|
|
57
|
-
import "../chunk-
|
|
69
|
+
import "../chunk-NQ6FZKCE.js";
|
|
58
70
|
import "../chunk-4L66JHQE.js";
|
|
59
71
|
import "../chunk-3RG5ZIWI.js";
|
|
60
72
|
|
|
@@ -379,7 +391,7 @@ function sleep(ms) {
|
|
|
379
391
|
}
|
|
380
392
|
async function onboardCommand(options = {}) {
|
|
381
393
|
if (options.ui) {
|
|
382
|
-
const { SetupServer } = await import("../setup-server-
|
|
394
|
+
const { SetupServer } = await import("../setup-server-IX3BFPPH.js");
|
|
383
395
|
const port = parseInt(options.uiPort || "7777") || 7777;
|
|
384
396
|
const url = `http://localhost:${port}/setup`;
|
|
385
397
|
const blue2 = "\x1B[34m";
|
|
@@ -1890,6 +1902,21 @@ Available: set, get, list, unset`);
|
|
|
1890
1902
|
}
|
|
1891
1903
|
}
|
|
1892
1904
|
|
|
1905
|
+
// src/cli/commands/api.ts
|
|
1906
|
+
import { createHash, randomBytes } from "crypto";
|
|
1907
|
+
async function apiRotateKeyCommand(options) {
|
|
1908
|
+
const key = "tltn_" + randomBytes(32).toString("base64url");
|
|
1909
|
+
const hash = createHash("sha256").update(key).digest("hex");
|
|
1910
|
+
const raw = readRawConfig(options.config);
|
|
1911
|
+
setNestedValue(raw, "api.key_hash", hash);
|
|
1912
|
+
writeRawConfig(raw, options.config);
|
|
1913
|
+
console.log(key);
|
|
1914
|
+
}
|
|
1915
|
+
async function apiFingerprintCommand() {
|
|
1916
|
+
const tls = await ensureTlsCert(TELETON_ROOT);
|
|
1917
|
+
console.log(tls.fingerprint);
|
|
1918
|
+
}
|
|
1919
|
+
|
|
1893
1920
|
// src/cli/index.ts
|
|
1894
1921
|
import { readFileSync as readFileSync3, existsSync as existsSync3 } from "fs";
|
|
1895
1922
|
import { dirname, join as join3 } from "path";
|
|
@@ -1928,12 +1955,24 @@ program.command("setup").description("Interactive wizard to set up Teleton").opt
|
|
|
1928
1955
|
process.exit(1);
|
|
1929
1956
|
}
|
|
1930
1957
|
});
|
|
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) => {
|
|
1958
|
+
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
1959
|
try {
|
|
1960
|
+
if (options.api && !configExists(options.config)) {
|
|
1961
|
+
if (options.apiPort) {
|
|
1962
|
+
process.env.TELETON_API_PORT = options.apiPort;
|
|
1963
|
+
}
|
|
1964
|
+
if (options.jsonCredentials) {
|
|
1965
|
+
process.env.TELETON_JSON_CREDENTIALS = "true";
|
|
1966
|
+
}
|
|
1967
|
+
const { startApiOnly } = await import("../bootstrap-DDFVEMYI.js");
|
|
1968
|
+
await startApiOnly({ config: options.config, apiPort: options.apiPort });
|
|
1969
|
+
return;
|
|
1970
|
+
}
|
|
1933
1971
|
if (!configExists(options.config)) {
|
|
1934
1972
|
console.error("\u274C Configuration not found");
|
|
1935
1973
|
console.error(` Expected file: ${options.config}`);
|
|
1936
1974
|
console.error("\n\u{1F4A1} Run first: teleton setup");
|
|
1975
|
+
console.error(" Or use: teleton start --api (for API-only bootstrap)");
|
|
1937
1976
|
process.exit(1);
|
|
1938
1977
|
}
|
|
1939
1978
|
if (options.webui) {
|
|
@@ -1942,6 +1981,15 @@ program.command("start").description("Start the Teleton agent").option("-c, --co
|
|
|
1942
1981
|
if (options.webuiPort) {
|
|
1943
1982
|
process.env.TELETON_WEBUI_PORT = options.webuiPort;
|
|
1944
1983
|
}
|
|
1984
|
+
if (options.api) {
|
|
1985
|
+
process.env.TELETON_API_ENABLED = "true";
|
|
1986
|
+
}
|
|
1987
|
+
if (options.apiPort) {
|
|
1988
|
+
process.env.TELETON_API_PORT = options.apiPort;
|
|
1989
|
+
}
|
|
1990
|
+
if (options.jsonCredentials) {
|
|
1991
|
+
process.env.TELETON_JSON_CREDENTIALS = "true";
|
|
1992
|
+
}
|
|
1945
1993
|
await main(options.config);
|
|
1946
1994
|
} catch (error) {
|
|
1947
1995
|
console.error("Error:", getErrorMessage(error));
|
|
@@ -1996,6 +2044,22 @@ program.command("config").description("Manage configuration keys (set, get, list
|
|
|
1996
2044
|
process.exit(1);
|
|
1997
2045
|
}
|
|
1998
2046
|
});
|
|
2047
|
+
program.command("api-rotate-key").description("Generate a new Management API key").option("-c, --config <path>", "Config file path", getDefaultConfigPath()).action(async (options) => {
|
|
2048
|
+
try {
|
|
2049
|
+
await apiRotateKeyCommand({ config: options.config });
|
|
2050
|
+
} catch (error) {
|
|
2051
|
+
console.error("Error:", getErrorMessage(error));
|
|
2052
|
+
process.exit(1);
|
|
2053
|
+
}
|
|
2054
|
+
});
|
|
2055
|
+
program.command("api-fingerprint").description("Show TLS certificate fingerprint").action(async () => {
|
|
2056
|
+
try {
|
|
2057
|
+
await apiFingerprintCommand();
|
|
2058
|
+
} catch (error) {
|
|
2059
|
+
console.error("Error:", getErrorMessage(error));
|
|
2060
|
+
process.exit(1);
|
|
2061
|
+
}
|
|
2062
|
+
});
|
|
1999
2063
|
program.action(() => {
|
|
2000
2064
|
program.help();
|
|
2001
2065
|
});
|
|
@@ -8,13 +8,14 @@ import {
|
|
|
8
8
|
loadContextFromTranscript,
|
|
9
9
|
registerCocoonModels,
|
|
10
10
|
registerLocalModels
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-LVTKJQ7O.js";
|
|
12
|
+
import "./chunk-WTDAICGT.js";
|
|
13
|
+
import "./chunk-6OOHHJ4N.js";
|
|
14
14
|
import "./chunk-XQUHC3JZ.js";
|
|
15
15
|
import "./chunk-R4YSJ4EY.js";
|
|
16
|
+
import "./chunk-LC4TV3KL.js";
|
|
16
17
|
import "./chunk-EYWNOHMJ.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-NQ6FZKCE.js";
|
|
18
19
|
import "./chunk-3RG5ZIWI.js";
|
|
19
20
|
export {
|
|
20
21
|
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,30 @@
|
|
|
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-33Z47EXI.js";
|
|
5
|
+
import "./chunk-NVKBBTI6.js";
|
|
6
|
+
import "./chunk-H7MFXJZK.js";
|
|
7
|
+
import "./chunk-7MWKT67G.js";
|
|
8
|
+
import "./chunk-FUNF6H4W.js";
|
|
9
|
+
import "./chunk-AEHTQI3H.js";
|
|
10
|
+
import "./chunk-AERHOXGC.js";
|
|
11
|
+
import "./chunk-XDZDOKIF.js";
|
|
12
|
+
import "./chunk-GHMXWAXI.js";
|
|
13
|
+
import "./chunk-ALKAAG4O.js";
|
|
14
|
+
import "./chunk-3UFPFWYP.js";
|
|
9
15
|
import "./chunk-7TECSLJ4.js";
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-AYWEJCDB.js";
|
|
12
|
-
import "./chunk-PHSAHTK4.js";
|
|
13
|
-
import "./chunk-QV2GLOTK.js";
|
|
14
|
-
import "./chunk-7U7BOHCL.js";
|
|
15
|
-
import "./chunk-3S4GGLLR.js";
|
|
16
|
+
import "./chunk-35MX4ZUI.js";
|
|
16
17
|
import "./chunk-VFA7QMCZ.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-C4NKJT2Z.js";
|
|
19
|
+
import "./chunk-LVTKJQ7O.js";
|
|
20
|
+
import "./chunk-WTDAICGT.js";
|
|
21
|
+
import "./chunk-6OOHHJ4N.js";
|
|
18
22
|
import "./chunk-XQUHC3JZ.js";
|
|
19
23
|
import "./chunk-R4YSJ4EY.js";
|
|
24
|
+
import "./chunk-LC4TV3KL.js";
|
|
25
|
+
import "./chunk-CUE4UZXR.js";
|
|
20
26
|
import "./chunk-EYWNOHMJ.js";
|
|
21
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-NQ6FZKCE.js";
|
|
22
28
|
import "./chunk-4L66JHQE.js";
|
|
23
29
|
import "./chunk-3RG5ZIWI.js";
|
|
24
30
|
export {
|
|
@@ -14,25 +14,28 @@ import {
|
|
|
14
14
|
getDatabase,
|
|
15
15
|
getSchemaVersion,
|
|
16
16
|
initializeMemory,
|
|
17
|
+
parseTemporalIntent,
|
|
17
18
|
runMigrations,
|
|
18
19
|
setSchemaVersion
|
|
19
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-GHMXWAXI.js";
|
|
20
21
|
import {
|
|
21
22
|
AnthropicEmbeddingProvider,
|
|
22
23
|
CachedEmbeddingProvider,
|
|
23
|
-
LocalEmbeddingProvider,
|
|
24
24
|
NoopEmbeddingProvider,
|
|
25
25
|
createEmbeddingProvider,
|
|
26
26
|
deserializeEmbedding,
|
|
27
27
|
hashText,
|
|
28
28
|
serializeEmbedding
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-35MX4ZUI.js";
|
|
30
30
|
import "./chunk-VFA7QMCZ.js";
|
|
31
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-C4NKJT2Z.js";
|
|
32
32
|
import "./chunk-XQUHC3JZ.js";
|
|
33
33
|
import "./chunk-R4YSJ4EY.js";
|
|
34
|
+
import {
|
|
35
|
+
LocalEmbeddingProvider
|
|
36
|
+
} from "./chunk-CUE4UZXR.js";
|
|
34
37
|
import "./chunk-EYWNOHMJ.js";
|
|
35
|
-
import "./chunk-
|
|
38
|
+
import "./chunk-NQ6FZKCE.js";
|
|
36
39
|
import {
|
|
37
40
|
TaskStore,
|
|
38
41
|
getTaskStore
|
|
@@ -63,6 +66,7 @@ export {
|
|
|
63
66
|
getTaskStore,
|
|
64
67
|
hashText,
|
|
65
68
|
initializeMemory,
|
|
69
|
+
parseTemporalIntent,
|
|
66
70
|
runMigrations,
|
|
67
71
|
serializeEmbedding,
|
|
68
72
|
setSchemaVersion
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
consolidateOldMemoryFiles,
|
|
3
|
+
saveSessionMemory
|
|
4
|
+
} from "./chunk-ALKAAG4O.js";
|
|
5
|
+
import "./chunk-3UFPFWYP.js";
|
|
6
|
+
import "./chunk-C4NKJT2Z.js";
|
|
7
|
+
import "./chunk-LVTKJQ7O.js";
|
|
8
|
+
import "./chunk-WTDAICGT.js";
|
|
9
|
+
import "./chunk-6OOHHJ4N.js";
|
|
10
|
+
import "./chunk-XQUHC3JZ.js";
|
|
11
|
+
import "./chunk-R4YSJ4EY.js";
|
|
12
|
+
import "./chunk-LC4TV3KL.js";
|
|
13
|
+
import "./chunk-EYWNOHMJ.js";
|
|
14
|
+
import "./chunk-NQ6FZKCE.js";
|
|
15
|
+
import "./chunk-3RG5ZIWI.js";
|
|
16
|
+
export {
|
|
17
|
+
consolidateOldMemoryFiles,
|
|
18
|
+
saveSessionMemory
|
|
19
|
+
};
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getDatabase
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-GHMXWAXI.js";
|
|
4
|
+
import "./chunk-35MX4ZUI.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
|
+
import "./chunk-CUE4UZXR.js";
|
|
9
10
|
import {
|
|
10
11
|
TELETON_ROOT
|
|
11
12
|
} from "./chunk-EYWNOHMJ.js";
|
|
12
13
|
import {
|
|
13
14
|
createLogger
|
|
14
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-NQ6FZKCE.js";
|
|
15
16
|
import "./chunk-4L66JHQE.js";
|
|
16
17
|
import "./chunk-3RG5ZIWI.js";
|
|
17
18
|
|