teleton 0.8.4 → 0.8.6

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 (84) hide show
  1. package/README.md +40 -17
  2. package/dist/{bootstrap-NNEI3Z5H.js → bootstrap-PFBH6ALD.js} +11 -8
  3. package/dist/bridge-guards-HZTNH7IB.js +9 -0
  4. package/dist/{chunk-NH2CNRKJ.js → chunk-2UUGRY5B.js} +151 -159
  5. package/dist/{chunk-UMUONAD6.js → chunk-4MFN75ZK.js} +5941 -2716
  6. package/dist/{chunk-LC4TV3KL.js → chunk-4MG2AROG.js} +5 -7
  7. package/dist/{chunk-LZQOX6YY.js → chunk-6IFNQWIM.js} +7714 -8748
  8. package/dist/chunk-7KI25UJU.js +215 -0
  9. package/dist/chunk-AX5NBEHX.js +12 -0
  10. package/dist/{chunk-5LOHRZYY.js → chunk-BLUES3FJ.js} +80 -101
  11. package/dist/{chunk-CUE4UZXR.js → chunk-BT2I3ETV.js} +3 -3
  12. package/dist/chunk-CXTZPOTA.js +107 -0
  13. package/dist/{chunk-LVTKJQ7O.js → chunk-D3GT6YIY.js} +59 -7
  14. package/dist/chunk-EKCXKL5M.js +53 -0
  15. package/dist/{chunk-XDZDOKIF.js → chunk-F6S3L3OV.js} +3 -3
  16. package/dist/{chunk-C4NKJT2Z.js → chunk-J4WDJ7XS.js} +1 -1
  17. package/dist/{chunk-G7PCW63M.js → chunk-JYF2MM5I.js} +147 -113
  18. package/dist/{chunk-NVKBBTI6.js → chunk-K3QSIIMZ.js} +9 -6
  19. package/dist/{chunk-EYWNOHMJ.js → chunk-L653KKCR.js} +1 -0
  20. package/dist/chunk-OMQIAWEU.js +273 -0
  21. package/dist/chunk-PCT7GYBP.js +274 -0
  22. package/dist/chunk-QYZBWU2D.js +139 -0
  23. package/dist/{chunk-WTDAICGT.js → chunk-R6W4DJRK.js} +7 -7
  24. package/dist/{chunk-5SEMA47R.js → chunk-RILOEIK6.js} +1 -1
  25. package/dist/{chunk-6OOHHJ4N.js → chunk-TFTNZZDH.js} +20 -20
  26. package/dist/chunk-TTOZCZWE.js +96 -0
  27. package/dist/chunk-UJ54YT2T.js +12 -0
  28. package/dist/{chunk-GHMXWAXI.js → chunk-ULVL2W3D.js} +211 -445
  29. package/dist/{chunk-NQ6FZKCE.js → chunk-V3S3NXBQ.js} +3 -1
  30. package/dist/{chunk-H7MFXJZK.js → chunk-WSL4KIOI.js} +31 -26
  31. package/dist/{chunk-35MX4ZUI.js → chunk-Z5WY7BSB.js} +5 -5
  32. package/dist/{chunk-ALKAAG4O.js → chunk-ZGKE3OTA.js} +112 -49
  33. package/dist/{chunk-JROBTXWY.js → chunk-ZHRDETCX.js} +38 -4
  34. package/dist/cli/index.d.ts +2 -0
  35. package/dist/cli/index.js +272 -159
  36. package/dist/{client-5KD25NOP.js → client-S5UIK6OG.js} +10 -8
  37. package/dist/daily-logs-3WXGYAQF.js +25 -0
  38. package/dist/{get-my-gifts-Y7EN7RK4.js → get-my-gifts-3YSYM3LI.js} +3 -2
  39. package/dist/harden-permissions-PV5SGV5D.js +100 -0
  40. package/dist/index.d.ts +923 -0
  41. package/dist/index.js +29 -20
  42. package/dist/knowledge-RRWUIO3G.js +19 -0
  43. package/dist/{local-IHKJFQJS.js → local-MSZAXWUL.js} +3 -3
  44. package/dist/mcp-loader-OELDFR63.js +15 -0
  45. package/dist/{memory-QMJRM3XJ.js → memory-6U6HGRK2.js} +23 -12
  46. package/dist/memory-hook-T7Y235KY.js +19 -0
  47. package/dist/messages-KV5ADNJB.js +17 -0
  48. package/dist/{migrate-5VBAP52B.js → migrate-AX3HOKOO.js} +10 -7
  49. package/dist/{paths-XA2RJH4S.js → paths-WMVV7ZAJ.js} +1 -1
  50. package/dist/{server-WWGVDFPW.js → server-MFRYOGHR.js} +21 -23
  51. package/dist/{server-AJCOURH7.js → server-SFLCAZFR.js} +221 -27
  52. package/dist/{setup-server-VDY64CWW.js → setup-server-YWAPKZVE.js} +26 -26
  53. package/dist/{store-BY7S6IFN.js → store-PGHQASBC.js} +11 -8
  54. package/dist/{task-dependency-resolver-L6UUMTHK.js → task-dependency-resolver-YQKADDEU.js} +24 -10
  55. package/dist/{task-executor-XBNJLUCS.js → task-executor-LWAWD225.js} +4 -4
  56. package/dist/{tool-adapter-IVX2XQJE.js → tool-adapter-VKLUZSQS.js} +1 -1
  57. package/dist/{tool-index-FTERJSZK.js → tool-index-YEWDF5CK.js} +5 -5
  58. package/dist/{transcript-IM7G25OS.js → transcript-4Y3Z2BJ3.js} +3 -3
  59. package/dist/web/assets/Config-MNxA69ib.js +1 -0
  60. package/dist/web/assets/Conversations-Dk958paA.js +1 -0
  61. package/dist/web/assets/Dashboard-dM18fGOm.js +1 -0
  62. package/dist/web/assets/Hooks-D2griQnI.js +1 -0
  63. package/dist/web/assets/Mcp-CtWNzwsz.js +1 -0
  64. package/dist/web/assets/Memory-CfLwH45G.js +1 -0
  65. package/dist/web/assets/Plugins-3hoJprFo.js +1 -0
  66. package/dist/web/assets/SearchInput-CpcETdpE.js +1 -0
  67. package/dist/web/assets/Soul-BSxE73aK.js +1 -0
  68. package/dist/web/assets/Tasks-DkCkfu3A.js +1 -0
  69. package/dist/web/assets/TelegramSettingsPanel-BRzc5G6e.js +1 -0
  70. package/dist/web/assets/Tools-Du8B8Mb4.js +1 -0
  71. package/dist/web/assets/Wallet-BLILP2Gn.js +1 -0
  72. package/dist/web/assets/Workspace-qklcXpXV.js +1 -0
  73. package/dist/web/assets/index-BwEPTTKp.js +90 -0
  74. package/dist/web/assets/index-noejUsK7.css +1 -0
  75. package/dist/web/assets/{index.es-DitvF-9H.js → index.es-DdpKlnGb.js} +1 -1
  76. package/dist/web/assets/useToolManager-tdxkKn3H.js +1 -0
  77. package/dist/web/assets/utils-CnsbSMo4.js +1 -0
  78. package/dist/web/index.html +2 -2
  79. package/package.json +7 -12
  80. package/src/templates/HEARTBEAT.md +5 -0
  81. package/dist/memory-hook-VUNWZ3NY.js +0 -19
  82. package/dist/web/assets/index-BfYCdwLI.js +0 -80
  83. package/dist/web/assets/index-DmlyQVhR.css +0 -1
  84. package/dist/{chunk-WFTC3JJW.js → chunk-3NO7QU7W.js} +1 -1
@@ -0,0 +1,25 @@
1
+ import {
2
+ appendToDailyLog,
3
+ cleanupOldDailyLogs,
4
+ getDailyLogPath,
5
+ readDailyLog,
6
+ readRecentMemory,
7
+ writeConversationMilestone,
8
+ writeSessionEndSummary,
9
+ writeSummaryToDailyLog
10
+ } from "./chunk-PCT7GYBP.js";
11
+ import "./chunk-CXTZPOTA.js";
12
+ import "./chunk-J4WDJ7XS.js";
13
+ import "./chunk-L653KKCR.js";
14
+ import "./chunk-V3S3NXBQ.js";
15
+ import "./chunk-3RG5ZIWI.js";
16
+ export {
17
+ appendToDailyLog,
18
+ cleanupOldDailyLogs,
19
+ getDailyLogPath,
20
+ readDailyLog,
21
+ readRecentMemory,
22
+ writeConversationMilestone,
23
+ writeSessionEndSummary,
24
+ writeSummaryToDailyLog
25
+ };
@@ -1,9 +1,10 @@
1
1
  import {
2
2
  telegramGetMyGiftsExecutor,
3
3
  telegramGetMyGiftsTool
4
- } from "./chunk-H7MFXJZK.js";
4
+ } from "./chunk-WSL4KIOI.js";
5
+ import "./chunk-EKCXKL5M.js";
5
6
  import "./chunk-3UFPFWYP.js";
6
- import "./chunk-NQ6FZKCE.js";
7
+ import "./chunk-V3S3NXBQ.js";
7
8
  import "./chunk-3RG5ZIWI.js";
8
9
  export {
9
10
  telegramGetMyGiftsExecutor,
@@ -0,0 +1,100 @@
1
+ import {
2
+ TELETON_ROOT,
3
+ WORKSPACE_PATHS
4
+ } from "./chunk-L653KKCR.js";
5
+ import {
6
+ createLogger
7
+ } from "./chunk-V3S3NXBQ.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
+ };