@synapseia-network/node 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.
Files changed (40) hide show
  1. package/LICENSE +105 -0
  2. package/README.md +232 -0
  3. package/dist/bid-responder-Q725ZIUC.js +86 -0
  4. package/dist/bootstrap.js +22 -0
  5. package/dist/chain-info-lightweight-2UWAQZBF.js +303 -0
  6. package/dist/chat-stream-handler-BSHSGMFF.js +127 -0
  7. package/dist/chunk-2X7MSWD4.js +270 -0
  8. package/dist/chunk-3BHRQWSM.js +531 -0
  9. package/dist/chunk-5QFTU52A.js +442 -0
  10. package/dist/chunk-5ZAJBIAV.js +25 -0
  11. package/dist/chunk-7FLDR5NT.js +186 -0
  12. package/dist/chunk-C5XRYLYP.js +137 -0
  13. package/dist/chunk-D7ADMHK2.js +36 -0
  14. package/dist/chunk-DXUYWRO7.js +23 -0
  15. package/dist/chunk-F5UDK56Z.js +289 -0
  16. package/dist/chunk-NEHR6XY7.js +111 -0
  17. package/dist/chunk-NMJVODKH.js +453 -0
  18. package/dist/chunk-PRVT22SM.js +324 -0
  19. package/dist/chunk-T2ZRG5CX.js +1380 -0
  20. package/dist/chunk-V2L5SXTL.js +88 -0
  21. package/dist/chunk-XL2NJWFY.js +702 -0
  22. package/dist/embedding-C6GE3WVM.js +16 -0
  23. package/dist/hardware-ITQQJ5YI.js +37 -0
  24. package/dist/index.js +16836 -0
  25. package/dist/inference-server-CIGRJ36H.js +25 -0
  26. package/dist/local-cors-J6RWNMMD.js +44 -0
  27. package/dist/model-catalog-C53SDFMG.js +15 -0
  28. package/dist/model-discovery-LA6YMT3I.js +10 -0
  29. package/dist/ollama-XVXA3A37.js +9 -0
  30. package/dist/rewards-vault-cli-HW7H4EMD.js +147 -0
  31. package/dist/scripts/create_nodes.sh +6 -0
  32. package/dist/scripts/diloco_train.py +319 -0
  33. package/dist/scripts/train_lora.py +237 -0
  34. package/dist/scripts/train_micro.py +586 -0
  35. package/dist/trainer-HQMV2ZAR.js +21 -0
  36. package/package.json +128 -0
  37. package/scripts/create_nodes.sh +6 -0
  38. package/scripts/diloco_train.py +319 -0
  39. package/scripts/train_lora.py +237 -0
  40. package/scripts/train_micro.py +586 -0
@@ -0,0 +1,88 @@
1
+ import { fileURLToPath as __synFup } from "url";import { dirname as __synDn } from "path";const __filename = __synFup(import.meta.url);const __dirname = __synDn(__filename);
2
+ import {
3
+ __esm,
4
+ __name
5
+ } from "./chunk-D7ADMHK2.js";
6
+
7
+ // src/utils/logger.ts
8
+ function timestamp() {
9
+ const now = /* @__PURE__ */ new Date();
10
+ const hh = String(now.getHours()).padStart(2, "0");
11
+ const mm = String(now.getMinutes()).padStart(2, "0");
12
+ const ss = String(now.getSeconds()).padStart(2, "0");
13
+ const ms = String(now.getMilliseconds()).padStart(3, "0");
14
+ return `${C.gray}${hh}:${mm}:${ss}.${ms}${C.reset}`;
15
+ }
16
+ function stripServicePrefix(msg) {
17
+ return msg.replace(/^\[[^\]]+\]\s*/, "");
18
+ }
19
+ function format(level, color, args) {
20
+ const msg = args.map((a) => typeof a === "string" ? a : JSON.stringify(a, null, 2)).join(" ");
21
+ const clean = stripServicePrefix(msg);
22
+ return `${timestamp()} ${color}${C.bold}${level}${C.reset} ${clean}`;
23
+ }
24
+ function setLoggerTap(tap) {
25
+ activeTap = tap;
26
+ }
27
+ function callTap(level, args) {
28
+ if (!activeTap) return;
29
+ try {
30
+ activeTap(level, args);
31
+ } catch {
32
+ }
33
+ }
34
+ var C, activeTap, log, logger, logger_default;
35
+ var init_logger = __esm({
36
+ "src/utils/logger.ts"() {
37
+ "use strict";
38
+ C = {
39
+ reset: "\x1B[0m",
40
+ gray: "\x1B[90m",
41
+ cyan: "\x1B[36m",
42
+ green: "\x1B[32m",
43
+ yellow: "\x1B[33m",
44
+ red: "\x1B[31m",
45
+ bold: "\x1B[1m"
46
+ };
47
+ __name(timestamp, "timestamp");
48
+ __name(stripServicePrefix, "stripServicePrefix");
49
+ __name(format, "format");
50
+ activeTap = null;
51
+ __name(setLoggerTap, "setLoggerTap");
52
+ __name(callTap, "callTap");
53
+ log = {
54
+ debug: /* @__PURE__ */ __name((...args) => {
55
+ if (process.env.LOG_LEVEL === "debug") {
56
+ console.log(format("DEBUG", C.cyan, args));
57
+ }
58
+ callTap("debug", args);
59
+ }, "debug"),
60
+ info: /* @__PURE__ */ __name((...args) => {
61
+ console.log(format("INFO ", C.green, args));
62
+ callTap("info", args);
63
+ }, "info"),
64
+ warn: /* @__PURE__ */ __name((...args) => {
65
+ console.warn(format("WARN ", C.yellow, args));
66
+ callTap("warn", args);
67
+ }, "warn"),
68
+ error: /* @__PURE__ */ __name((...args) => {
69
+ console.error(format("ERROR", C.red, args));
70
+ callTap("error", args);
71
+ }, "error")
72
+ };
73
+ logger = {
74
+ log: log.info,
75
+ info: log.info,
76
+ warn: log.warn,
77
+ error: log.error,
78
+ debug: log.debug
79
+ };
80
+ logger_default = logger;
81
+ }
82
+ });
83
+
84
+ export {
85
+ setLoggerTap,
86
+ logger_default,
87
+ init_logger
88
+ };