teleton 0.8.3 → 0.8.5
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 +241 -301
- package/dist/{bootstrap-DDFVEMYI.js → bootstrap-SPDT3XBQ.js} +5 -7
- package/dist/{chunk-GHMXWAXI.js → chunk-2MZP75SH.js} +72 -202
- package/dist/chunk-35X3V6OW.js +139 -0
- package/dist/{chunk-LVTKJQ7O.js → chunk-4KURCUWD.js} +1 -1
- package/dist/{chunk-XDZDOKIF.js → chunk-5K4YDCVU.js} +1 -1
- package/dist/{chunk-7MWKT67G.js → chunk-6U6VA2OT.js} +520 -2187
- package/dist/{chunk-OIMAE24Q.js → chunk-7ZXUUDQQ.js} +18 -7
- package/dist/{chunk-AERHOXGC.js → chunk-FSL2MOYK.js} +236 -93
- package/dist/{chunk-LC4TV3KL.js → chunk-GUX6ZFVF.js} +1 -1
- package/dist/{chunk-CUE4UZXR.js → chunk-KYSAHDYE.js} +2 -2
- package/dist/{chunk-C4NKJT2Z.js → chunk-L3LPVF4Z.js} +1 -1
- package/dist/{chunk-EYWNOHMJ.js → chunk-L653KKCR.js} +1 -0
- package/dist/{chunk-ALKAAG4O.js → chunk-LD24DWWE.js} +4 -4
- package/dist/{chunk-33Z47EXI.js → chunk-LM6AL6LN.js} +2417 -867
- package/dist/chunk-M6M4DCDU.js +942 -0
- package/dist/{chunk-35MX4ZUI.js → chunk-PK3TVFBT.js} +2 -2
- package/dist/{chunk-2ERTYRHA.js → chunk-Z63KUQX4.js} +37 -13
- package/dist/cli/index.js +35 -25
- package/dist/{client-5KD25NOP.js → client-G62EZT6U.js} +3 -3
- package/dist/harden-permissions-6BLHRCQJ.js +100 -0
- package/dist/index.js +14 -14
- package/dist/{local-IHKJFQJS.js → local-HQ3UJ7KR.js} +2 -2
- package/dist/{memory-QMJRM3XJ.js → memory-BJH724PQ.js} +6 -5
- package/dist/{memory-hook-VUNWZ3NY.js → memory-hook-LUAKTXU5.js} +5 -5
- package/dist/{migrate-5VBAP52B.js → migrate-C4LBLOZH.js} +6 -5
- package/dist/{paths-XA2RJH4S.js → paths-WMVV7ZAJ.js} +1 -1
- package/dist/{server-JF6FX772.js → server-4J56HS62.js} +8 -15
- package/dist/{server-N4T7E25M.js → server-I6TYJ36S.js} +7 -15
- package/dist/{setup-server-IX3BFPPH.js → setup-server-VJ3MGUSM.js} +16 -17
- package/dist/{store-BY7S6IFN.js → store-2IGAMTES.js} +7 -6
- package/dist/{task-dependency-resolver-L6UUMTHK.js → task-dependency-resolver-CQ432Z7J.js} +1 -1
- package/dist/{task-executor-XBNJLUCS.js → task-executor-JELRREUV.js} +1 -1
- package/dist/{tool-index-FTERJSZK.js → tool-index-XPCMWBYY.js} +4 -4
- package/dist/{transcript-IM7G25OS.js → transcript-OEO3HA4Z.js} +2 -2
- package/dist/web/assets/{index-BfYCdwLI.js → index-Dn5ZH1Y6.js} +13 -13
- package/dist/web/assets/{index.es-DitvF-9H.js → index.es-eSR4Qv6s.js} +1 -1
- package/dist/web/index.html +1 -1
- package/package.json +2 -6
- package/src/templates/HEARTBEAT.md +5 -0
- package/dist/chunk-AEHTQI3H.js +0 -142
- package/dist/chunk-FUNF6H4W.js +0 -251
|
@@ -7,13 +7,13 @@ import {
|
|
|
7
7
|
EMBEDDING_CACHE_MAX_ENTRIES,
|
|
8
8
|
EMBEDDING_CACHE_TTL_DAYS,
|
|
9
9
|
VOYAGE_BATCH_SIZE
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-L3LPVF4Z.js";
|
|
11
11
|
import {
|
|
12
12
|
fetchWithTimeout
|
|
13
13
|
} from "./chunk-XQUHC3JZ.js";
|
|
14
14
|
import {
|
|
15
15
|
LocalEmbeddingProvider
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-KYSAHDYE.js";
|
|
17
17
|
import {
|
|
18
18
|
createLogger
|
|
19
19
|
} from "./chunk-NQ6FZKCE.js";
|
|
@@ -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-6U6VA2OT.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-M6M4DCDU.js";
|
|
39
39
|
import {
|
|
40
40
|
getErrorMessage
|
|
41
41
|
} from "./chunk-3UFPFWYP.js";
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
import {
|
|
50
50
|
WORKSPACE_PATHS,
|
|
51
51
|
WORKSPACE_ROOT
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-L653KKCR.js";
|
|
53
53
|
import {
|
|
54
54
|
addLogListener,
|
|
55
55
|
clearLogListeners,
|
|
@@ -591,7 +591,7 @@ function createMemoryRoutes(deps) {
|
|
|
591
591
|
import { Hono as Hono5 } from "hono";
|
|
592
592
|
import { readFileSync, writeFileSync } from "fs";
|
|
593
593
|
import { join } from "path";
|
|
594
|
-
var SOUL_FILES = ["SOUL.md", "SECURITY.md", "STRATEGY.md", "MEMORY.md"];
|
|
594
|
+
var SOUL_FILES = ["SOUL.md", "SECURITY.md", "STRATEGY.md", "MEMORY.md", "HEARTBEAT.md"];
|
|
595
595
|
function isSoulFile(filename) {
|
|
596
596
|
return SOUL_FILES.includes(filename);
|
|
597
597
|
}
|
|
@@ -1342,6 +1342,18 @@ function createConfigRoutes(deps) {
|
|
|
1342
1342
|
400
|
|
1343
1343
|
);
|
|
1344
1344
|
}
|
|
1345
|
+
if (key.startsWith("heartbeat.") && key !== "heartbeat.self_configurable") {
|
|
1346
|
+
const config = deps.agent.getConfig();
|
|
1347
|
+
if (config.heartbeat?.self_configurable !== true) {
|
|
1348
|
+
return c.json(
|
|
1349
|
+
{
|
|
1350
|
+
success: false,
|
|
1351
|
+
error: `Heartbeat config is locked (self_configurable: false). Set heartbeat.self_configurable to true first.`
|
|
1352
|
+
},
|
|
1353
|
+
403
|
|
1354
|
+
);
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1345
1357
|
let body;
|
|
1346
1358
|
try {
|
|
1347
1359
|
body = await c.req.json();
|
|
@@ -1465,6 +1477,18 @@ function createConfigRoutes(deps) {
|
|
|
1465
1477
|
400
|
|
1466
1478
|
);
|
|
1467
1479
|
}
|
|
1480
|
+
if (key.startsWith("heartbeat.") && key !== "heartbeat.self_configurable") {
|
|
1481
|
+
const config = deps.agent.getConfig();
|
|
1482
|
+
if (config.heartbeat?.self_configurable !== true) {
|
|
1483
|
+
return c.json(
|
|
1484
|
+
{
|
|
1485
|
+
success: false,
|
|
1486
|
+
error: `Heartbeat config is locked (self_configurable: false). Set heartbeat.self_configurable to true first.`
|
|
1487
|
+
},
|
|
1488
|
+
403
|
|
1489
|
+
);
|
|
1490
|
+
}
|
|
1491
|
+
}
|
|
1468
1492
|
try {
|
|
1469
1493
|
const raw = readRawConfig(deps.configPath);
|
|
1470
1494
|
deleteNestedValue(raw, key);
|
|
@@ -1805,7 +1829,7 @@ var MarketplaceService = class {
|
|
|
1805
1829
|
const fileRes = await fetch(item.download_url);
|
|
1806
1830
|
if (!fileRes.ok) throw new Error(`Failed to download ${item.name}: ${fileRes.status}`);
|
|
1807
1831
|
const content = await fileRes.text();
|
|
1808
|
-
writeFileSync3(target, content, "utf-8");
|
|
1832
|
+
writeFileSync3(target, content, { encoding: "utf-8", mode: 384 });
|
|
1809
1833
|
}
|
|
1810
1834
|
}
|
|
1811
1835
|
}
|
package/dist/cli/index.js
CHANGED
|
@@ -7,47 +7,45 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
TelegramUserClient,
|
|
9
9
|
main
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-LM6AL6LN.js";
|
|
11
11
|
import "../chunk-NVKBBTI6.js";
|
|
12
|
+
import "../chunk-5K4YDCVU.js";
|
|
13
|
+
import "../chunk-2MZP75SH.js";
|
|
14
|
+
import "../chunk-LD24DWWE.js";
|
|
12
15
|
import "../chunk-H7MFXJZK.js";
|
|
16
|
+
import "../chunk-6U6VA2OT.js";
|
|
13
17
|
import {
|
|
14
18
|
CONFIGURABLE_KEYS,
|
|
15
19
|
deleteNestedValue,
|
|
16
|
-
getNestedValue,
|
|
17
|
-
readRawConfig,
|
|
18
|
-
setNestedValue,
|
|
19
|
-
writeRawConfig
|
|
20
|
-
} from "../chunk-7MWKT67G.js";
|
|
21
|
-
import {
|
|
22
20
|
generateWallet,
|
|
21
|
+
getNestedValue,
|
|
23
22
|
importWallet,
|
|
24
23
|
loadWallet,
|
|
24
|
+
readRawConfig,
|
|
25
25
|
saveWallet,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
getDefaultConfigPath
|
|
31
|
-
} from "../chunk-AEHTQI3H.js";
|
|
26
|
+
setNestedValue,
|
|
27
|
+
walletExists,
|
|
28
|
+
writeRawConfig
|
|
29
|
+
} from "../chunk-M6M4DCDU.js";
|
|
32
30
|
import {
|
|
33
31
|
ConfigSchema,
|
|
34
32
|
DealsConfigSchema,
|
|
33
|
+
configExists,
|
|
35
34
|
ensureWorkspace,
|
|
35
|
+
getDefaultConfigPath,
|
|
36
36
|
isNewWorkspace
|
|
37
|
-
} from "../chunk-
|
|
38
|
-
import "../chunk-
|
|
39
|
-
import "../chunk-GHMXWAXI.js";
|
|
40
|
-
import "../chunk-ALKAAG4O.js";
|
|
37
|
+
} from "../chunk-FSL2MOYK.js";
|
|
38
|
+
import "../chunk-35X3V6OW.js";
|
|
41
39
|
import {
|
|
42
40
|
getErrorMessage
|
|
43
41
|
} from "../chunk-3UFPFWYP.js";
|
|
44
42
|
import "../chunk-7TECSLJ4.js";
|
|
45
|
-
import "../chunk-
|
|
43
|
+
import "../chunk-PK3TVFBT.js";
|
|
46
44
|
import "../chunk-VFA7QMCZ.js";
|
|
47
45
|
import {
|
|
48
46
|
TELEGRAM_MAX_MESSAGE_LENGTH
|
|
49
|
-
} from "../chunk-
|
|
50
|
-
import "../chunk-
|
|
47
|
+
} from "../chunk-L3LPVF4Z.js";
|
|
48
|
+
import "../chunk-4KURCUWD.js";
|
|
51
49
|
import {
|
|
52
50
|
getClaudeCodeApiKey,
|
|
53
51
|
isClaudeCodeTokenValid
|
|
@@ -61,11 +59,11 @@ import {
|
|
|
61
59
|
fetchWithTimeout
|
|
62
60
|
} from "../chunk-XQUHC3JZ.js";
|
|
63
61
|
import "../chunk-R4YSJ4EY.js";
|
|
64
|
-
import "../chunk-
|
|
65
|
-
import "../chunk-
|
|
62
|
+
import "../chunk-GUX6ZFVF.js";
|
|
63
|
+
import "../chunk-KYSAHDYE.js";
|
|
66
64
|
import {
|
|
67
65
|
TELETON_ROOT
|
|
68
|
-
} from "../chunk-
|
|
66
|
+
} from "../chunk-L653KKCR.js";
|
|
69
67
|
import "../chunk-NQ6FZKCE.js";
|
|
70
68
|
import "../chunk-4L66JHQE.js";
|
|
71
69
|
import "../chunk-3RG5ZIWI.js";
|
|
@@ -391,7 +389,7 @@ function sleep(ms) {
|
|
|
391
389
|
}
|
|
392
390
|
async function onboardCommand(options = {}) {
|
|
393
391
|
if (options.ui) {
|
|
394
|
-
const { SetupServer } = await import("../setup-server-
|
|
392
|
+
const { SetupServer } = await import("../setup-server-VJ3MGUSM.js");
|
|
395
393
|
const port = parseInt(options.uiPort || "7777") || 7777;
|
|
396
394
|
const url = `http://localhost:${port}/setup`;
|
|
397
395
|
const blue2 = "\x1B[34m";
|
|
@@ -1122,6 +1120,12 @@ Get it at: ${providerMeta.consoleUrl}`,
|
|
|
1122
1120
|
}
|
|
1123
1121
|
},
|
|
1124
1122
|
ton_proxy: { enabled: false, port: 8080 },
|
|
1123
|
+
heartbeat: {
|
|
1124
|
+
enabled: true,
|
|
1125
|
+
interval_ms: 18e5,
|
|
1126
|
+
prompt: "Read HEARTBEAT.md if it exists. Follow it strictly. If nothing needs attention, reply NO_ACTION.",
|
|
1127
|
+
self_configurable: false
|
|
1128
|
+
},
|
|
1125
1129
|
plugins: {},
|
|
1126
1130
|
...selectedProvider === "cocoon" ? { cocoon: { port: cocoonInstance } } : {},
|
|
1127
1131
|
tonapi_key: tonapiKey,
|
|
@@ -1288,6 +1292,12 @@ async function runNonInteractiveOnboarding(options, prompter) {
|
|
|
1288
1292
|
}
|
|
1289
1293
|
},
|
|
1290
1294
|
ton_proxy: { enabled: false, port: 8080 },
|
|
1295
|
+
heartbeat: {
|
|
1296
|
+
enabled: true,
|
|
1297
|
+
interval_ms: 18e5,
|
|
1298
|
+
prompt: "Read HEARTBEAT.md if it exists. Follow it strictly. If nothing needs attention, reply NO_ACTION.",
|
|
1299
|
+
self_configurable: false
|
|
1300
|
+
},
|
|
1291
1301
|
mcp: { servers: {} },
|
|
1292
1302
|
plugins: {},
|
|
1293
1303
|
tavily_api_key: options.tavilyApiKey
|
|
@@ -1964,7 +1974,7 @@ program.command("start").description("Start the Teleton agent").option("-c, --co
|
|
|
1964
1974
|
if (options.jsonCredentials) {
|
|
1965
1975
|
process.env.TELETON_JSON_CREDENTIALS = "true";
|
|
1966
1976
|
}
|
|
1967
|
-
const { startApiOnly } = await import("../bootstrap-
|
|
1977
|
+
const { startApiOnly } = await import("../bootstrap-SPDT3XBQ.js");
|
|
1968
1978
|
await startApiOnly({ config: options.config, apiPort: options.apiPort });
|
|
1969
1979
|
return;
|
|
1970
1980
|
}
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
loadContextFromTranscript,
|
|
9
9
|
registerCocoonModels,
|
|
10
10
|
registerLocalModels
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-4KURCUWD.js";
|
|
12
12
|
import "./chunk-WTDAICGT.js";
|
|
13
13
|
import "./chunk-6OOHHJ4N.js";
|
|
14
14
|
import "./chunk-XQUHC3JZ.js";
|
|
15
15
|
import "./chunk-R4YSJ4EY.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-GUX6ZFVF.js";
|
|
17
|
+
import "./chunk-L653KKCR.js";
|
|
18
18
|
import "./chunk-NQ6FZKCE.js";
|
|
19
19
|
import "./chunk-3RG5ZIWI.js";
|
|
20
20
|
export {
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TELETON_ROOT,
|
|
3
|
+
WORKSPACE_PATHS
|
|
4
|
+
} from "./chunk-L653KKCR.js";
|
|
5
|
+
import {
|
|
6
|
+
createLogger
|
|
7
|
+
} from "./chunk-NQ6FZKCE.js";
|
|
8
|
+
import "./chunk-3RG5ZIWI.js";
|
|
9
|
+
|
|
10
|
+
// src/workspace/harden-permissions.ts
|
|
11
|
+
import { chmodSync, existsSync, readdirSync, statSync } from "fs";
|
|
12
|
+
import { join } from "path";
|
|
13
|
+
var log = createLogger("Permissions");
|
|
14
|
+
var TARGET_MODE = 384;
|
|
15
|
+
var TARGET_DIR_MODE = 448;
|
|
16
|
+
var ROOT_FILES = [
|
|
17
|
+
"config.yaml",
|
|
18
|
+
"wallet.json",
|
|
19
|
+
"telegram_session.txt",
|
|
20
|
+
"telegram-offset.json",
|
|
21
|
+
"teleton.db",
|
|
22
|
+
"teleton.db-wal",
|
|
23
|
+
"teleton.db-shm"
|
|
24
|
+
];
|
|
25
|
+
var SECURE_DIRS = ["secrets", "plugins", "tls"];
|
|
26
|
+
function hardenExistingPermissions() {
|
|
27
|
+
let hardened = 0;
|
|
28
|
+
for (const file of ROOT_FILES) {
|
|
29
|
+
hardened += hardenFile(join(TELETON_ROOT, file));
|
|
30
|
+
}
|
|
31
|
+
for (const path of [
|
|
32
|
+
WORKSPACE_PATHS.MEMORY,
|
|
33
|
+
WORKSPACE_PATHS.IDENTITY,
|
|
34
|
+
WORKSPACE_PATHS.SOUL,
|
|
35
|
+
WORKSPACE_PATHS.USER,
|
|
36
|
+
WORKSPACE_PATHS.STRATEGY,
|
|
37
|
+
WORKSPACE_PATHS.SECURITY,
|
|
38
|
+
WORKSPACE_PATHS.HEARTBEAT
|
|
39
|
+
]) {
|
|
40
|
+
hardened += hardenFile(path);
|
|
41
|
+
}
|
|
42
|
+
hardened += hardenDirectory(WORKSPACE_PATHS.MEMORY_DIR, TARGET_MODE);
|
|
43
|
+
hardened += hardenDirectory(WORKSPACE_PATHS.DOWNLOADS_DIR, TARGET_MODE);
|
|
44
|
+
for (const dir of SECURE_DIRS) {
|
|
45
|
+
const dirPath = join(TELETON_ROOT, dir);
|
|
46
|
+
if (existsSync(dirPath)) {
|
|
47
|
+
try {
|
|
48
|
+
const stat = statSync(dirPath);
|
|
49
|
+
if ((stat.mode & 511) !== TARGET_DIR_MODE) {
|
|
50
|
+
chmodSync(dirPath, TARGET_DIR_MODE);
|
|
51
|
+
hardened++;
|
|
52
|
+
}
|
|
53
|
+
} catch {
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
hardened += hardenDirectory(WORKSPACE_PATHS.PLUGINS_DIR, TARGET_MODE);
|
|
58
|
+
if (hardened > 0) {
|
|
59
|
+
log.info(`Hardened permissions on ${hardened} existing file(s)`);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function hardenFile(filePath) {
|
|
63
|
+
if (!existsSync(filePath)) return 0;
|
|
64
|
+
try {
|
|
65
|
+
const stat = statSync(filePath);
|
|
66
|
+
if ((stat.mode & 511) !== TARGET_MODE) {
|
|
67
|
+
chmodSync(filePath, TARGET_MODE);
|
|
68
|
+
return 1;
|
|
69
|
+
}
|
|
70
|
+
} catch {
|
|
71
|
+
}
|
|
72
|
+
return 0;
|
|
73
|
+
}
|
|
74
|
+
function hardenDirectory(dirPath, fileMode) {
|
|
75
|
+
if (!existsSync(dirPath)) return 0;
|
|
76
|
+
let count = 0;
|
|
77
|
+
try {
|
|
78
|
+
const entries = readdirSync(dirPath, { withFileTypes: true });
|
|
79
|
+
for (const entry of entries) {
|
|
80
|
+
const fullPath = join(dirPath, entry.name);
|
|
81
|
+
if (entry.isFile()) {
|
|
82
|
+
try {
|
|
83
|
+
const stat = statSync(fullPath);
|
|
84
|
+
if ((stat.mode & 511) !== fileMode) {
|
|
85
|
+
chmodSync(fullPath, fileMode);
|
|
86
|
+
count++;
|
|
87
|
+
}
|
|
88
|
+
} catch {
|
|
89
|
+
}
|
|
90
|
+
} else if (entry.isDirectory()) {
|
|
91
|
+
count += hardenDirectory(fullPath, fileMode);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
} catch {
|
|
95
|
+
}
|
|
96
|
+
return count;
|
|
97
|
+
}
|
|
98
|
+
export {
|
|
99
|
+
hardenExistingPermissions
|
|
100
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TeletonApp,
|
|
3
3
|
main
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-LM6AL6LN.js";
|
|
5
5
|
import "./chunk-NVKBBTI6.js";
|
|
6
|
+
import "./chunk-5K4YDCVU.js";
|
|
7
|
+
import "./chunk-2MZP75SH.js";
|
|
8
|
+
import "./chunk-LD24DWWE.js";
|
|
6
9
|
import "./chunk-H7MFXJZK.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-XDZDOKIF.js";
|
|
12
|
-
import "./chunk-GHMXWAXI.js";
|
|
13
|
-
import "./chunk-ALKAAG4O.js";
|
|
10
|
+
import "./chunk-6U6VA2OT.js";
|
|
11
|
+
import "./chunk-M6M4DCDU.js";
|
|
12
|
+
import "./chunk-FSL2MOYK.js";
|
|
13
|
+
import "./chunk-35X3V6OW.js";
|
|
14
14
|
import "./chunk-3UFPFWYP.js";
|
|
15
15
|
import "./chunk-7TECSLJ4.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-PK3TVFBT.js";
|
|
17
17
|
import "./chunk-VFA7QMCZ.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-L3LPVF4Z.js";
|
|
19
|
+
import "./chunk-4KURCUWD.js";
|
|
20
20
|
import "./chunk-WTDAICGT.js";
|
|
21
21
|
import "./chunk-6OOHHJ4N.js";
|
|
22
22
|
import "./chunk-XQUHC3JZ.js";
|
|
23
23
|
import "./chunk-R4YSJ4EY.js";
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-GUX6ZFVF.js";
|
|
25
|
+
import "./chunk-KYSAHDYE.js";
|
|
26
|
+
import "./chunk-L653KKCR.js";
|
|
27
27
|
import "./chunk-NQ6FZKCE.js";
|
|
28
28
|
import "./chunk-4L66JHQE.js";
|
|
29
29
|
import "./chunk-3RG5ZIWI.js";
|
|
@@ -17,7 +17,8 @@ import {
|
|
|
17
17
|
parseTemporalIntent,
|
|
18
18
|
runMigrations,
|
|
19
19
|
setSchemaVersion
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-2MZP75SH.js";
|
|
21
|
+
import "./chunk-35X3V6OW.js";
|
|
21
22
|
import {
|
|
22
23
|
AnthropicEmbeddingProvider,
|
|
23
24
|
CachedEmbeddingProvider,
|
|
@@ -26,15 +27,15 @@ import {
|
|
|
26
27
|
deserializeEmbedding,
|
|
27
28
|
hashText,
|
|
28
29
|
serializeEmbedding
|
|
29
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-PK3TVFBT.js";
|
|
30
31
|
import "./chunk-VFA7QMCZ.js";
|
|
31
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-L3LPVF4Z.js";
|
|
32
33
|
import "./chunk-XQUHC3JZ.js";
|
|
33
34
|
import "./chunk-R4YSJ4EY.js";
|
|
34
35
|
import {
|
|
35
36
|
LocalEmbeddingProvider
|
|
36
|
-
} from "./chunk-
|
|
37
|
-
import "./chunk-
|
|
37
|
+
} from "./chunk-KYSAHDYE.js";
|
|
38
|
+
import "./chunk-L653KKCR.js";
|
|
38
39
|
import "./chunk-NQ6FZKCE.js";
|
|
39
40
|
import {
|
|
40
41
|
TaskStore,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
consolidateOldMemoryFiles,
|
|
3
3
|
saveSessionMemory
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-LD24DWWE.js";
|
|
5
5
|
import "./chunk-3UFPFWYP.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-L3LPVF4Z.js";
|
|
7
|
+
import "./chunk-4KURCUWD.js";
|
|
8
8
|
import "./chunk-WTDAICGT.js";
|
|
9
9
|
import "./chunk-6OOHHJ4N.js";
|
|
10
10
|
import "./chunk-XQUHC3JZ.js";
|
|
11
11
|
import "./chunk-R4YSJ4EY.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-GUX6ZFVF.js";
|
|
13
|
+
import "./chunk-L653KKCR.js";
|
|
14
14
|
import "./chunk-NQ6FZKCE.js";
|
|
15
15
|
import "./chunk-3RG5ZIWI.js";
|
|
16
16
|
export {
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getDatabase
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-2MZP75SH.js";
|
|
4
|
+
import "./chunk-35X3V6OW.js";
|
|
5
|
+
import "./chunk-PK3TVFBT.js";
|
|
5
6
|
import "./chunk-VFA7QMCZ.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-L3LPVF4Z.js";
|
|
7
8
|
import "./chunk-XQUHC3JZ.js";
|
|
8
9
|
import "./chunk-R4YSJ4EY.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-KYSAHDYE.js";
|
|
10
11
|
import {
|
|
11
12
|
TELETON_ROOT
|
|
12
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-L653KKCR.js";
|
|
13
14
|
import {
|
|
14
15
|
createLogger
|
|
15
16
|
} from "./chunk-NQ6FZKCE.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createSetupRoutes
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7ZXUUDQQ.js";
|
|
4
4
|
import {
|
|
5
5
|
createConfigRoutes,
|
|
6
6
|
createHooksRoutes,
|
|
@@ -16,33 +16,26 @@ import {
|
|
|
16
16
|
createToolsRoutes,
|
|
17
17
|
createWorkspaceRoutes,
|
|
18
18
|
logInterceptor
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-Z63KUQX4.js";
|
|
20
20
|
import {
|
|
21
21
|
ensureTlsCert
|
|
22
22
|
} from "./chunk-5SEMA47R.js";
|
|
23
23
|
import "./chunk-WFTC3JJW.js";
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-XDZDOKIF.js";
|
|
29
|
-
import "./chunk-GHMXWAXI.js";
|
|
30
|
-
import "./chunk-ALKAAG4O.js";
|
|
24
|
+
import "./chunk-6U6VA2OT.js";
|
|
25
|
+
import "./chunk-M6M4DCDU.js";
|
|
26
|
+
import "./chunk-FSL2MOYK.js";
|
|
27
|
+
import "./chunk-35X3V6OW.js";
|
|
31
28
|
import "./chunk-3UFPFWYP.js";
|
|
32
29
|
import "./chunk-7TECSLJ4.js";
|
|
33
|
-
import "./chunk-35MX4ZUI.js";
|
|
34
30
|
import "./chunk-VFA7QMCZ.js";
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-LVTKJQ7O.js";
|
|
31
|
+
import "./chunk-L3LPVF4Z.js";
|
|
37
32
|
import "./chunk-WTDAICGT.js";
|
|
38
33
|
import "./chunk-6OOHHJ4N.js";
|
|
39
34
|
import "./chunk-XQUHC3JZ.js";
|
|
40
35
|
import "./chunk-R4YSJ4EY.js";
|
|
41
|
-
import "./chunk-LC4TV3KL.js";
|
|
42
|
-
import "./chunk-CUE4UZXR.js";
|
|
43
36
|
import {
|
|
44
37
|
TELETON_ROOT
|
|
45
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-L653KKCR.js";
|
|
46
39
|
import {
|
|
47
40
|
createLogger
|
|
48
41
|
} from "./chunk-NQ6FZKCE.js";
|
|
@@ -13,28 +13,20 @@ import {
|
|
|
13
13
|
createToolsRoutes,
|
|
14
14
|
createWorkspaceRoutes,
|
|
15
15
|
logInterceptor
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-Z63KUQX4.js";
|
|
17
17
|
import "./chunk-WFTC3JJW.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-XDZDOKIF.js";
|
|
23
|
-
import "./chunk-GHMXWAXI.js";
|
|
24
|
-
import "./chunk-ALKAAG4O.js";
|
|
18
|
+
import "./chunk-6U6VA2OT.js";
|
|
19
|
+
import "./chunk-M6M4DCDU.js";
|
|
20
|
+
import "./chunk-FSL2MOYK.js";
|
|
21
|
+
import "./chunk-35X3V6OW.js";
|
|
25
22
|
import "./chunk-3UFPFWYP.js";
|
|
26
23
|
import "./chunk-7TECSLJ4.js";
|
|
27
|
-
import "./chunk-35MX4ZUI.js";
|
|
28
24
|
import "./chunk-VFA7QMCZ.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-LVTKJQ7O.js";
|
|
31
|
-
import "./chunk-WTDAICGT.js";
|
|
25
|
+
import "./chunk-L3LPVF4Z.js";
|
|
32
26
|
import "./chunk-6OOHHJ4N.js";
|
|
33
27
|
import "./chunk-XQUHC3JZ.js";
|
|
34
28
|
import "./chunk-R4YSJ4EY.js";
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-CUE4UZXR.js";
|
|
37
|
-
import "./chunk-EYWNOHMJ.js";
|
|
29
|
+
import "./chunk-L653KKCR.js";
|
|
38
30
|
import {
|
|
39
31
|
createLogger
|
|
40
32
|
} from "./chunk-NQ6FZKCE.js";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createSetupRoutes
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7ZXUUDQQ.js";
|
|
4
4
|
import "./chunk-WFTC3JJW.js";
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-M6M4DCDU.js";
|
|
6
|
+
import "./chunk-FSL2MOYK.js";
|
|
7
7
|
import "./chunk-VFA7QMCZ.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-L3LPVF4Z.js";
|
|
9
9
|
import "./chunk-WTDAICGT.js";
|
|
10
10
|
import "./chunk-6OOHHJ4N.js";
|
|
11
11
|
import "./chunk-XQUHC3JZ.js";
|
|
12
12
|
import "./chunk-R4YSJ4EY.js";
|
|
13
13
|
import {
|
|
14
14
|
TELETON_ROOT
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-L653KKCR.js";
|
|
16
16
|
import {
|
|
17
17
|
createLogger
|
|
18
18
|
} from "./chunk-NQ6FZKCE.js";
|
|
@@ -23,13 +23,12 @@ import { Hono } from "hono";
|
|
|
23
23
|
import { serve } from "@hono/node-server";
|
|
24
24
|
import { cors } from "hono/cors";
|
|
25
25
|
import { bodyLimit } from "hono/body-limit";
|
|
26
|
-
import { existsSync, readFileSync } from "fs";
|
|
26
|
+
import { existsSync, readFileSync, writeFileSync } from "fs";
|
|
27
27
|
import { join, dirname, resolve, relative } from "path";
|
|
28
28
|
import { fileURLToPath } from "url";
|
|
29
|
-
import {
|
|
29
|
+
import { spawn } from "child_process";
|
|
30
30
|
import { platform } from "os";
|
|
31
31
|
import { randomBytes } from "crypto";
|
|
32
|
-
import { readFileSync as readYaml, writeFileSync } from "fs";
|
|
33
32
|
import YAML from "yaml";
|
|
34
33
|
var log = createLogger("Setup");
|
|
35
34
|
function findWebDist() {
|
|
@@ -45,19 +44,19 @@ function findWebDist() {
|
|
|
45
44
|
}
|
|
46
45
|
function autoOpenBrowser(url) {
|
|
47
46
|
const os = platform();
|
|
48
|
-
let
|
|
47
|
+
let prog;
|
|
49
48
|
if (os === "darwin") {
|
|
50
|
-
|
|
49
|
+
prog = "open";
|
|
51
50
|
} else if (os === "win32") {
|
|
52
|
-
|
|
51
|
+
prog = "explorer";
|
|
53
52
|
} else {
|
|
54
|
-
|
|
53
|
+
prog = "xdg-open";
|
|
55
54
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
55
|
+
const child = spawn(prog, [url], { detached: true, stdio: "ignore" });
|
|
56
|
+
child.on("error", () => {
|
|
57
|
+
log.info(`Open this URL in your browser: ${url}`);
|
|
60
58
|
});
|
|
59
|
+
child.unref();
|
|
61
60
|
}
|
|
62
61
|
var SetupServer = class {
|
|
63
62
|
constructor(port = 7777) {
|
|
@@ -119,7 +118,7 @@ var SetupServer = class {
|
|
|
119
118
|
try {
|
|
120
119
|
const token = randomBytes(32).toString("hex");
|
|
121
120
|
const configPath = join(TELETON_ROOT, "config.yaml");
|
|
122
|
-
const raw =
|
|
121
|
+
const raw = readFileSync(configPath, "utf-8");
|
|
123
122
|
const config = YAML.parse(raw);
|
|
124
123
|
config.webui = { ...config.webui || {}, enabled: true, auth_token: token };
|
|
125
124
|
writeFileSync(configPath, YAML.stringify(config), { encoding: "utf-8", mode: 384 });
|