teleton 0.6.0 → 0.7.0

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 (39) hide show
  1. package/README.md +26 -26
  2. package/dist/{chunk-D5I7GBV7.js → chunk-FNV5FF35.js} +22 -13
  3. package/dist/chunk-LRCPA7SC.js +149 -0
  4. package/dist/{chunk-ADCMUNYU.js → chunk-N3F7E7DR.js} +58 -53
  5. package/dist/chunk-ND2X5FWB.js +368 -0
  6. package/dist/chunk-NERLQY2H.js +421 -0
  7. package/dist/{chunk-YBA6IBGT.js → chunk-OCLG5GKI.js} +24 -24
  8. package/dist/{chunk-6L6KGATM.js → chunk-OGIG552S.js} +1397 -1688
  9. package/dist/chunk-RCMD3U65.js +141 -0
  10. package/dist/{chunk-4IPJ25HE.js → chunk-TCD4NZDA.js} +1045 -658
  11. package/dist/{chunk-ECSCVEQQ.js → chunk-UCN6TI25.js} +7 -3
  12. package/dist/{chunk-WL2Q3VRD.js → chunk-UDD7FYOU.js} +12 -4
  13. package/dist/chunk-VAUJSSD3.js +20 -0
  14. package/dist/chunk-XBE4JB7C.js +8 -0
  15. package/dist/{chunk-GDCODBNO.js → chunk-XBKSS6DM.js} +2 -16
  16. package/dist/cli/index.js +878 -433
  17. package/dist/client-3VWE7NC4.js +29 -0
  18. package/dist/{get-my-gifts-KVULMBJ3.js → get-my-gifts-RI7FAXAL.js} +3 -1
  19. package/dist/index.js +17 -11
  20. package/dist/{memory-TVDOGQXS.js → memory-RD7ZSTRV.js} +7 -5
  21. package/dist/{migrate-QIEMPOMT.js → migrate-GO4NOBT7.js} +14 -9
  22. package/dist/{server-RSWVCVY3.js → server-OWVEZTR3.js} +81 -84
  23. package/dist/setup-server-C7ZTPHD5.js +934 -0
  24. package/dist/{task-dependency-resolver-72DLY2HV.js → task-dependency-resolver-WKZWJLLM.js} +19 -15
  25. package/dist/{task-executor-VXB6DAV2.js → task-executor-PD3H4MLO.js} +4 -1
  26. package/dist/tool-adapter-Y3TCEQOC.js +145 -0
  27. package/dist/{tool-index-DKI2ZNOU.js → tool-index-MIVK3D7H.js} +14 -9
  28. package/dist/{transcript-7V4UNID4.js → transcript-UDJZP6NK.js} +2 -1
  29. package/dist/web/assets/complete-fZLnb5Ot.js +1 -0
  30. package/dist/web/assets/index-B_FcaX5D.css +1 -0
  31. package/dist/web/assets/index-CbeAP4_n.js +67 -0
  32. package/dist/web/assets/index.es-oXiZF7Hc.js +11 -0
  33. package/dist/web/assets/login-telegram-BP7CJDmx.js +1 -0
  34. package/dist/web/assets/run-DOrDowjK.js +1 -0
  35. package/dist/web/index.html +2 -2
  36. package/package.json +7 -3
  37. package/dist/chunk-2QUJLHCZ.js +0 -362
  38. package/dist/web/assets/index-BNhrx9S1.js +0 -67
  39. package/dist/web/assets/index-CqrrRLOh.css +0 -1
@@ -0,0 +1,29 @@
1
+ import {
2
+ chatWithContext,
3
+ createClient,
4
+ getEffectiveApiKey,
5
+ getProviderModel,
6
+ getUtilityModel,
7
+ isOAuthToken,
8
+ loadContextFromTranscript,
9
+ registerCocoonModels,
10
+ registerLocalModels
11
+ } from "./chunk-ND2X5FWB.js";
12
+ import "./chunk-LRCPA7SC.js";
13
+ import "./chunk-OCLG5GKI.js";
14
+ import "./chunk-VAUJSSD3.js";
15
+ import "./chunk-4DU3C27M.js";
16
+ import "./chunk-EYWNOHMJ.js";
17
+ import "./chunk-RCMD3U65.js";
18
+ import "./chunk-QGM4M3NI.js";
19
+ export {
20
+ chatWithContext,
21
+ createClient,
22
+ getEffectiveApiKey,
23
+ getProviderModel,
24
+ getUtilityModel,
25
+ isOAuthToken,
26
+ loadContextFromTranscript,
27
+ registerCocoonModels,
28
+ registerLocalModels
29
+ };
@@ -1,7 +1,9 @@
1
1
  import {
2
2
  telegramGetMyGiftsExecutor,
3
3
  telegramGetMyGiftsTool
4
- } from "./chunk-WL2Q3VRD.js";
4
+ } from "./chunk-UDD7FYOU.js";
5
+ import "./chunk-XBE4JB7C.js";
6
+ import "./chunk-RCMD3U65.js";
5
7
  import "./chunk-QGM4M3NI.js";
6
8
  export {
7
9
  telegramGetMyGiftsExecutor,
package/dist/index.js CHANGED
@@ -1,22 +1,28 @@
1
1
  import {
2
2
  TeletonApp,
3
3
  main
4
- } from "./chunk-6L6KGATM.js";
5
- import "./chunk-WL2Q3VRD.js";
4
+ } from "./chunk-OGIG552S.js";
5
+ import "./chunk-UDD7FYOU.js";
6
6
  import "./chunk-EHEV7FJ7.js";
7
7
  import "./chunk-U7FQYCBQ.js";
8
- import "./chunk-4IPJ25HE.js";
9
- import "./chunk-YBA6IBGT.js";
10
- import "./chunk-ADCMUNYU.js";
11
- import "./chunk-D5I7GBV7.js";
12
- import "./chunk-ECSCVEQQ.js";
13
- import "./chunk-GDCODBNO.js";
14
- import "./chunk-4DU3C27M.js";
8
+ import "./chunk-TCD4NZDA.js";
9
+ import "./chunk-NERLQY2H.js";
10
+ import "./chunk-QUAPFI2N.js";
11
+ import "./chunk-TSKJCWQQ.js";
12
+ import "./chunk-XBE4JB7C.js";
13
+ import "./chunk-ND2X5FWB.js";
14
+ import "./chunk-LRCPA7SC.js";
15
+ import "./chunk-OCLG5GKI.js";
16
+ import "./chunk-N3F7E7DR.js";
17
+ import "./chunk-FNV5FF35.js";
18
+ import "./chunk-UCN6TI25.js";
19
+ import "./chunk-XBKSS6DM.js";
15
20
  import "./chunk-RO62LO6Z.js";
21
+ import "./chunk-VAUJSSD3.js";
22
+ import "./chunk-4DU3C27M.js";
16
23
  import "./chunk-EYWNOHMJ.js";
24
+ import "./chunk-RCMD3U65.js";
17
25
  import "./chunk-NUGDTPE4.js";
18
- import "./chunk-QUAPFI2N.js";
19
- import "./chunk-TSKJCWQQ.js";
20
26
  import "./chunk-QGM4M3NI.js";
21
27
  export {
22
28
  TeletonApp,
@@ -16,7 +16,7 @@ import {
16
16
  initializeMemory,
17
17
  runMigrations,
18
18
  setSchemaVersion
19
- } from "./chunk-ADCMUNYU.js";
19
+ } from "./chunk-N3F7E7DR.js";
20
20
  import {
21
21
  AnthropicEmbeddingProvider,
22
22
  CachedEmbeddingProvider,
@@ -26,12 +26,14 @@ import {
26
26
  deserializeEmbedding,
27
27
  hashText,
28
28
  serializeEmbedding
29
- } from "./chunk-D5I7GBV7.js";
30
- import "./chunk-ECSCVEQQ.js";
31
- import "./chunk-GDCODBNO.js";
32
- import "./chunk-4DU3C27M.js";
29
+ } from "./chunk-FNV5FF35.js";
30
+ import "./chunk-UCN6TI25.js";
31
+ import "./chunk-XBKSS6DM.js";
33
32
  import "./chunk-RO62LO6Z.js";
33
+ import "./chunk-VAUJSSD3.js";
34
+ import "./chunk-4DU3C27M.js";
34
35
  import "./chunk-EYWNOHMJ.js";
36
+ import "./chunk-RCMD3U65.js";
35
37
  import {
36
38
  TaskStore,
37
39
  getTaskStore
@@ -1,20 +1,25 @@
1
1
  import {
2
2
  getDatabase
3
- } from "./chunk-ADCMUNYU.js";
4
- import "./chunk-D5I7GBV7.js";
5
- import "./chunk-ECSCVEQQ.js";
6
- import "./chunk-GDCODBNO.js";
7
- import "./chunk-4DU3C27M.js";
3
+ } from "./chunk-N3F7E7DR.js";
4
+ import "./chunk-FNV5FF35.js";
5
+ import "./chunk-UCN6TI25.js";
6
+ import "./chunk-XBKSS6DM.js";
8
7
  import "./chunk-RO62LO6Z.js";
8
+ import "./chunk-VAUJSSD3.js";
9
+ import "./chunk-4DU3C27M.js";
9
10
  import {
10
11
  TELETON_ROOT
11
12
  } from "./chunk-EYWNOHMJ.js";
13
+ import {
14
+ createLogger
15
+ } from "./chunk-RCMD3U65.js";
12
16
  import "./chunk-NUGDTPE4.js";
13
17
  import "./chunk-QGM4M3NI.js";
14
18
 
15
19
  // src/session/migrate.ts
16
20
  import { readFileSync, existsSync, renameSync } from "fs";
17
21
  import { join } from "path";
22
+ var log = createLogger("Session");
18
23
  var SESSIONS_JSON = join(TELETON_ROOT, "sessions.json");
19
24
  var SESSIONS_JSON_BACKUP = join(TELETON_ROOT, "sessions.json.backup");
20
25
  function migrateSessionsToDb() {
@@ -22,7 +27,7 @@ function migrateSessionsToDb() {
22
27
  return 0;
23
28
  }
24
29
  try {
25
- console.log("\u{1F504} Migrating sessions from JSON to SQLite...");
30
+ log.info("Migrating sessions from JSON to SQLite...");
26
31
  const raw = readFileSync(SESSIONS_JSON, "utf-8");
27
32
  const store = JSON.parse(raw);
28
33
  const db = getDatabase().getDb();
@@ -52,11 +57,11 @@ function migrateSessionsToDb() {
52
57
  migrated++;
53
58
  }
54
59
  renameSync(SESSIONS_JSON, SESSIONS_JSON_BACKUP);
55
- console.log(`\u2705 Migrated ${migrated} sessions to SQLite`);
56
- console.log(` Backup saved: ${SESSIONS_JSON_BACKUP}`);
60
+ log.info(`Migrated ${migrated} sessions to SQLite`);
61
+ log.info(`Backup saved: ${SESSIONS_JSON_BACKUP}`);
57
62
  return migrated;
58
63
  } catch (error) {
59
- console.error("\u274C Failed to migrate sessions:", error);
64
+ log.error({ err: error }, "Failed to migrate sessions");
60
65
  return 0;
61
66
  }
62
67
  }
@@ -1,35 +1,46 @@
1
1
  import {
2
2
  CONFIGURABLE_KEYS,
3
- deleteNestedValue,
4
- getNestedValue,
5
- readRawConfig,
6
- setNestedValue,
7
- writeRawConfig
8
- } from "./chunk-2QUJLHCZ.js";
9
- import {
10
3
  WorkspaceSecurityError,
11
4
  adaptPlugin,
5
+ clearPromptCache,
6
+ deleteNestedValue,
12
7
  deletePluginSecret,
13
8
  ensurePluginDeps,
9
+ getNestedValue,
14
10
  listPluginSecretKeys,
11
+ readRawConfig,
12
+ setNestedValue,
15
13
  validateDirectory,
16
14
  validatePath,
17
15
  validateReadPath,
18
16
  validateWritePath,
19
- writePluginSecret
20
- } from "./chunk-4IPJ25HE.js";
21
- import "./chunk-ECSCVEQQ.js";
22
- import "./chunk-GDCODBNO.js";
23
- import "./chunk-4DU3C27M.js";
17
+ writePluginSecret,
18
+ writeRawConfig
19
+ } from "./chunk-TCD4NZDA.js";
20
+ import "./chunk-NERLQY2H.js";
21
+ import "./chunk-QUAPFI2N.js";
22
+ import "./chunk-TSKJCWQQ.js";
23
+ import {
24
+ getErrorMessage
25
+ } from "./chunk-XBE4JB7C.js";
26
+ import "./chunk-LRCPA7SC.js";
27
+ import "./chunk-UCN6TI25.js";
28
+ import "./chunk-XBKSS6DM.js";
24
29
  import "./chunk-RO62LO6Z.js";
30
+ import "./chunk-VAUJSSD3.js";
31
+ import "./chunk-4DU3C27M.js";
25
32
  import {
26
33
  WORKSPACE_PATHS,
27
34
  WORKSPACE_ROOT
28
35
  } from "./chunk-EYWNOHMJ.js";
36
+ import {
37
+ addLogListener,
38
+ clearLogListeners,
39
+ createLogger
40
+ } from "./chunk-RCMD3U65.js";
29
41
  import {
30
42
  getTaskStore
31
43
  } from "./chunk-NUGDTPE4.js";
32
- import "./chunk-QUAPFI2N.js";
33
44
  import "./chunk-QGM4M3NI.js";
34
45
 
35
46
  // src/webui/server.ts
@@ -63,54 +74,43 @@ function safeCompare(a, b) {
63
74
 
64
75
  // src/webui/log-interceptor.ts
65
76
  var LogInterceptor = class {
66
- listeners = /* @__PURE__ */ new Set();
67
- isPatched = false;
68
- originalMethods = {
69
- log: console.log,
70
- warn: console.warn,
71
- error: console.error
72
- };
77
+ cleanups = /* @__PURE__ */ new Map();
78
+ installed = false;
79
+ /**
80
+ * Install the interceptor. Now a lightweight no-op since pino streams
81
+ * are always active — kept for API compat with server.ts start/stop.
82
+ */
73
83
  install() {
74
- if (this.isPatched) return;
75
- const levels = ["log", "warn", "error"];
76
- for (const level of levels) {
77
- const original = this.originalMethods[level];
78
- console[level] = (...args) => {
79
- original.apply(console, args);
80
- if (this.listeners.size > 0) {
81
- const entry = {
82
- level,
83
- message: args.map((arg) => typeof arg === "string" ? arg : JSON.stringify(arg)).join(" "),
84
- timestamp: Date.now()
85
- };
86
- for (const listener of this.listeners) {
87
- try {
88
- listener(entry);
89
- } catch (err) {
90
- original.call(console, "\u274C Log listener error:", err);
91
- }
92
- }
93
- }
94
- };
95
- }
96
- this.isPatched = true;
84
+ this.installed = true;
97
85
  }
98
86
  uninstall() {
99
- if (!this.isPatched) return;
100
- console.log = this.originalMethods.log;
101
- console.warn = this.originalMethods.warn;
102
- console.error = this.originalMethods.error;
103
- this.isPatched = false;
87
+ for (const cleanup of this.cleanups.values()) {
88
+ cleanup();
89
+ }
90
+ this.cleanups.clear();
91
+ this.installed = false;
104
92
  }
105
93
  addListener(listener) {
106
- this.listeners.add(listener);
107
- return () => this.listeners.delete(listener);
94
+ const cleanup = addLogListener(listener);
95
+ this.cleanups.set(listener, cleanup);
96
+ return () => {
97
+ cleanup();
98
+ this.cleanups.delete(listener);
99
+ };
108
100
  }
109
101
  removeListener(listener) {
110
- this.listeners.delete(listener);
102
+ const cleanup = this.cleanups.get(listener);
103
+ if (cleanup) {
104
+ cleanup();
105
+ this.cleanups.delete(listener);
106
+ }
111
107
  }
112
108
  clear() {
113
- this.listeners.clear();
109
+ for (const cleanup of this.cleanups.values()) {
110
+ cleanup();
111
+ }
112
+ this.cleanups.clear();
113
+ clearLogListeners();
114
114
  }
115
115
  };
116
116
  var logInterceptor = new LogInterceptor();
@@ -128,8 +128,6 @@ function createStatusRoutes(deps) {
128
128
  model: config.agent.model,
129
129
  provider: config.agent.provider,
130
130
  sessionCount: sessionCountRow?.count ?? 0,
131
- paused: false,
132
- // TODO: get from message handler
133
131
  toolCount: deps.toolRegistry.getAll().length
134
132
  };
135
133
  const response = {
@@ -140,7 +138,7 @@ function createStatusRoutes(deps) {
140
138
  } catch (error) {
141
139
  const response = {
142
140
  success: false,
143
- error: error instanceof Error ? error.message : String(error)
141
+ error: getErrorMessage(error)
144
142
  };
145
143
  return c.json(response, 500);
146
144
  }
@@ -187,7 +185,7 @@ function createToolsRoutes(deps) {
187
185
  } catch (error) {
188
186
  const response = {
189
187
  success: false,
190
- error: error instanceof Error ? error.message : String(error)
188
+ error: getErrorMessage(error)
191
189
  };
192
190
  return c.json(response, 500);
193
191
  }
@@ -297,7 +295,7 @@ function createToolsRoutes(deps) {
297
295
  } catch (error) {
298
296
  const response = {
299
297
  success: false,
300
- error: error instanceof Error ? error.message : String(error)
298
+ error: getErrorMessage(error)
301
299
  };
302
300
  return c.json(response, 500);
303
301
  }
@@ -325,7 +323,7 @@ function createToolsRoutes(deps) {
325
323
  } catch (error) {
326
324
  const response = {
327
325
  success: false,
328
- error: error instanceof Error ? error.message : String(error)
326
+ error: getErrorMessage(error)
329
327
  };
330
328
  return c.json(response, 500);
331
329
  }
@@ -357,7 +355,7 @@ function createToolsRoutes(deps) {
357
355
  } catch (error) {
358
356
  const response = {
359
357
  success: false,
360
- error: error instanceof Error ? error.message : String(error)
358
+ error: getErrorMessage(error)
361
359
  };
362
360
  return c.json(response, 500);
363
361
  }
@@ -451,7 +449,7 @@ function createMemoryRoutes(deps) {
451
449
  } catch (error) {
452
450
  const response = {
453
451
  success: false,
454
- error: error instanceof Error ? error.message : String(error)
452
+ error: getErrorMessage(error)
455
453
  };
456
454
  return c.json(response, 500);
457
455
  }
@@ -485,7 +483,7 @@ function createMemoryRoutes(deps) {
485
483
  } catch (error) {
486
484
  const response = {
487
485
  success: false,
488
- error: error instanceof Error ? error.message : String(error)
486
+ error: getErrorMessage(error)
489
487
  };
490
488
  return c.json(response, 500);
491
489
  }
@@ -506,7 +504,7 @@ function createMemoryRoutes(deps) {
506
504
  } catch (error) {
507
505
  const response = {
508
506
  success: false,
509
- error: error instanceof Error ? error.message : String(error)
507
+ error: getErrorMessage(error)
510
508
  };
511
509
  return c.json(response, 500);
512
510
  }
@@ -555,7 +553,7 @@ function createSoulRoutes(_deps) {
555
553
  } catch (error) {
556
554
  const response = {
557
555
  success: false,
558
- error: error instanceof Error ? error.message : String(error)
556
+ error: getErrorMessage(error)
559
557
  };
560
558
  return c.json(response, 500);
561
559
  }
@@ -588,6 +586,7 @@ function createSoulRoutes(_deps) {
588
586
  }
589
587
  const filePath = join(WORKSPACE_ROOT, filename);
590
588
  writeFileSync(filePath, body.content, "utf-8");
589
+ clearPromptCache();
591
590
  const response = {
592
591
  success: true,
593
592
  data: { message: `${filename} updated successfully` }
@@ -596,7 +595,7 @@ function createSoulRoutes(_deps) {
596
595
  } catch (error) {
597
596
  const response = {
598
597
  success: false,
599
- error: error instanceof Error ? error.message : String(error)
598
+ error: getErrorMessage(error)
600
599
  };
601
600
  return c.json(response, 500);
602
601
  }
@@ -693,7 +692,7 @@ function createMcpRoutes(deps) {
693
692
  return c.json(
694
693
  {
695
694
  success: false,
696
- error: error instanceof Error ? error.message : String(error)
695
+ error: getErrorMessage(error)
697
696
  },
698
697
  500
699
698
  );
@@ -721,7 +720,7 @@ function createMcpRoutes(deps) {
721
720
  return c.json(
722
721
  {
723
722
  success: false,
724
- error: error instanceof Error ? error.message : String(error)
723
+ error: getErrorMessage(error)
725
724
  },
726
725
  500
727
726
  );
@@ -748,7 +747,7 @@ import {
748
747
  } from "fs";
749
748
  import { join as join2, relative } from "path";
750
749
  function errorResponse(c, error, status = 500) {
751
- const message = error instanceof Error ? error.message : String(error);
750
+ const message = getErrorMessage(error);
752
751
  const code = error instanceof WorkspaceSecurityError ? 403 : status;
753
752
  const response = { success: false, error: message };
754
753
  return c.json(response, code);
@@ -987,7 +986,7 @@ function createTasksRoutes(deps) {
987
986
  } catch (error) {
988
987
  const response = {
989
988
  success: false,
990
- error: error instanceof Error ? error.message : String(error)
989
+ error: getErrorMessage(error)
991
990
  };
992
991
  return c.json(response, 500);
993
992
  }
@@ -1013,7 +1012,7 @@ function createTasksRoutes(deps) {
1013
1012
  } catch (error) {
1014
1013
  const response = {
1015
1014
  success: false,
1016
- error: error instanceof Error ? error.message : String(error)
1015
+ error: getErrorMessage(error)
1017
1016
  };
1018
1017
  return c.json(response, 500);
1019
1018
  }
@@ -1030,7 +1029,7 @@ function createTasksRoutes(deps) {
1030
1029
  } catch (error) {
1031
1030
  const response = {
1032
1031
  success: false,
1033
- error: error instanceof Error ? error.message : String(error)
1032
+ error: getErrorMessage(error)
1034
1033
  };
1035
1034
  return c.json(response, 500);
1036
1035
  }
@@ -1047,7 +1046,7 @@ function createTasksRoutes(deps) {
1047
1046
  } catch (error) {
1048
1047
  const response = {
1049
1048
  success: false,
1050
- error: error instanceof Error ? error.message : String(error)
1049
+ error: getErrorMessage(error)
1051
1050
  };
1052
1051
  return c.json(response, 500);
1053
1052
  }
@@ -1064,7 +1063,7 @@ function createTasksRoutes(deps) {
1064
1063
  } catch (error) {
1065
1064
  const response = {
1066
1065
  success: false,
1067
- error: error instanceof Error ? error.message : String(error)
1066
+ error: getErrorMessage(error)
1068
1067
  };
1069
1068
  return c.json(response, 500);
1070
1069
  }
@@ -1207,6 +1206,7 @@ import { Hono as Hono11 } from "hono";
1207
1206
  import { existsSync as existsSync2, mkdirSync as mkdirSync2, writeFileSync as writeFileSync3, rmSync as rmSync2 } from "fs";
1208
1207
  import { join as join3, resolve } from "path";
1209
1208
  import { pathToFileURL } from "url";
1209
+ var log = createLogger("WebUI");
1210
1210
  var REGISTRY_URL = "https://raw.githubusercontent.com/TONresistor/teleton-plugins/main/registry.json";
1211
1211
  var PLUGIN_BASE_URL = "https://raw.githubusercontent.com/TONresistor/teleton-plugins/main";
1212
1212
  var GITHUB_API_BASE = "https://api.github.com/repos/TONresistor/teleton-plugins/contents";
@@ -1235,7 +1235,7 @@ var MarketplaceService = class {
1235
1235
  return entries;
1236
1236
  } catch (err) {
1237
1237
  if (this.cache) {
1238
- console.warn("[marketplace] Registry fetch failed, using stale cache:", err);
1238
+ log.warn({ err }, "Registry fetch failed, using stale cache");
1239
1239
  return this.cache.entries;
1240
1240
  }
1241
1241
  throw err;
@@ -1381,7 +1381,7 @@ var MarketplaceService = class {
1381
1381
  try {
1382
1382
  rmSync2(pluginDir, { recursive: true, force: true });
1383
1383
  } catch (cleanupErr) {
1384
- console.error(`[marketplace] Failed to cleanup ${pluginDir}:`, cleanupErr);
1384
+ log.error({ err: cleanupErr }, `Failed to cleanup ${pluginDir}`);
1385
1385
  }
1386
1386
  }
1387
1387
  throw err;
@@ -1666,6 +1666,7 @@ function createMarketplaceRoutes(deps) {
1666
1666
  }
1667
1667
 
1668
1668
  // src/webui/server.ts
1669
+ var log2 = createLogger("WebUI");
1669
1670
  function findWebDist() {
1670
1671
  const candidates = [
1671
1672
  resolve2("dist/web"),
@@ -1726,7 +1727,7 @@ var WebUIServer = class {
1726
1727
  const start = Date.now();
1727
1728
  await next();
1728
1729
  const duration = Date.now() - start;
1729
- console.log(`\u{1F4E1} ${c.req.method} ${c.req.path} \u2192 ${c.res.status} (${duration}ms)`);
1730
+ log2.info(`${c.req.method} ${c.req.path} \u2192 ${c.res.status} (${duration}ms)`);
1730
1731
  });
1731
1732
  }
1732
1733
  this.app.use(
@@ -1841,7 +1842,7 @@ var WebUIServer = class {
1841
1842
  });
1842
1843
  }
1843
1844
  this.app.onError((err, c) => {
1844
- console.error("WebUI error:", err);
1845
+ log2.error({ err }, "WebUI error");
1845
1846
  return c.json(
1846
1847
  {
1847
1848
  success: false,
@@ -1863,13 +1864,9 @@ var WebUIServer = class {
1863
1864
  },
1864
1865
  (info) => {
1865
1866
  const url = `http://${info.address}:${info.port}`;
1866
- console.log(`
1867
- \u{1F310} WebUI server running`);
1868
- console.log(` URL: ${url}/auth/exchange?token=${this.authToken}`);
1869
- console.log(
1870
- ` Token: ${maskToken(this.authToken)} (use Bearer header for API access)
1871
- `
1872
- );
1867
+ log2.info(`WebUI server running`);
1868
+ log2.info(`URL: ${url}/auth/exchange?token=${this.authToken}`);
1869
+ log2.info(`Token: ${maskToken(this.authToken)} (use Bearer header for API access)`);
1873
1870
  resolve3();
1874
1871
  }
1875
1872
  );
@@ -1884,7 +1881,7 @@ var WebUIServer = class {
1884
1881
  return new Promise((resolve3) => {
1885
1882
  this.server.close(() => {
1886
1883
  logInterceptor.uninstall();
1887
- console.log("\u{1F310} WebUI server stopped");
1884
+ log2.info("WebUI server stopped");
1888
1885
  resolve3();
1889
1886
  });
1890
1887
  });