@askexenow/exe-os 0.9.269 → 0.9.271

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 (55) hide show
  1. package/deploy/compose/.env.customer.example +2 -0
  2. package/deploy/compose/.env.default +1 -0
  3. package/deploy/compose/.env.example +2 -0
  4. package/deploy/compose/docker-compose.yml +1 -0
  5. package/deploy/compose/generate-env.ts +5 -0
  6. package/deploy/compose/init-db.sql +236 -56
  7. package/dist/bin/cli.js +2 -2
  8. package/dist/bin/exe-forget.js +1 -1
  9. package/dist/bin/exe-new-employee.js +1 -1
  10. package/dist/bin/exe-search.js +1 -1
  11. package/dist/bin/exe-start.sh +28 -1
  12. package/dist/bin/install.js +1 -1
  13. package/dist/bin/setup.js +1 -1
  14. package/dist/bin/stack-update.js +10 -3
  15. package/dist/bin/vps-health-gate.js +1 -1
  16. package/dist/catchup-brief-7G3HIQT3.js +151 -0
  17. package/dist/catchup-brief-IA2K5RYM.js +151 -0
  18. package/dist/catchup-brief-KABFKY7U.js +151 -0
  19. package/dist/chunk-4GJHWD4H.js +1148 -0
  20. package/dist/chunk-6H7PZOYD.js +58 -0
  21. package/dist/chunk-AQU2CVD4.js +1148 -0
  22. package/dist/chunk-AX6EKVRZ.js +13696 -0
  23. package/dist/chunk-DFI2IZXM.js +1395 -0
  24. package/dist/chunk-EM4EYF3P.js +149 -0
  25. package/dist/chunk-F7RM3Z4R.js +230 -0
  26. package/dist/chunk-IBMTSEZC.js +230 -0
  27. package/dist/chunk-LMYSCMSQ.js +1148 -0
  28. package/dist/chunk-O7YO7E2G.js +1512 -0
  29. package/dist/chunk-RJVFHGFD.js +13696 -0
  30. package/dist/chunk-U2O2UXVQ.js +13696 -0
  31. package/dist/chunk-X56OLWQS.js +58 -0
  32. package/dist/chunk-YYO5RQRT.js +1021 -0
  33. package/dist/chunk-ZFHXFDWX.js +58 -0
  34. package/dist/hooks/error-recall.js +1 -1
  35. package/dist/hooks/manifest.json +4 -4
  36. package/dist/hooks/prompt-submit.js +1 -1
  37. package/dist/hooks/session-start.js +1 -1
  38. package/dist/lib/exe-daemon.js +49 -3
  39. package/dist/lib/hybrid-search.js +1 -1
  40. package/dist/lib/session-wrappers.js +1 -1
  41. package/dist/mcp/register-tools.js +3 -3
  42. package/dist/mcp/server.js +3 -3
  43. package/dist/reranker-7GCUQ6LC.js +19 -0
  44. package/dist/reranker-NLH3VBTN.js +19 -0
  45. package/dist/reranker-RUOD4YHZ.js +19 -0
  46. package/dist/setup-wizard-M7A7MXH4.js +12 -0
  47. package/dist/stack-release-2KSOYDIV.js +712 -0
  48. package/dist/stack-update-MYPMZQEI.js +52 -0
  49. package/dist/stack-update-QQA64STQ.js +52 -0
  50. package/dist/task-enforcement-CJKWU43B.js +364 -0
  51. package/dist/task-enforcement-FYDLTS3R.js +391 -0
  52. package/dist/task-enforcement-YXKZYS5L.js +369 -0
  53. package/package.json +1 -1
  54. package/release-notes.json +14 -14
  55. package/stack.release.json +48 -48
@@ -0,0 +1,58 @@
1
+ import {
2
+ MODELS_DIR
3
+ } from "./chunk-VXIMSRTO.js";
4
+
5
+ // src/lib/reranker.ts
6
+ import path from "path";
7
+ import { existsSync } from "fs";
8
+ var RERANKER_MODEL_FILE = "jina-reranker-v3-q4_k_m.gguf";
9
+ function isRerankerAvailable() {
10
+ return existsSync(path.join(MODELS_DIR, RERANKER_MODEL_FILE));
11
+ }
12
+ function getRerankerModelPath() {
13
+ return path.join(MODELS_DIR, RERANKER_MODEL_FILE);
14
+ }
15
+ async function disposeReranker() {
16
+ }
17
+ async function rerankWithScores(query, texts, topK) {
18
+ if (texts.length === 0) return [];
19
+ const { rerankViaWorker } = await import("./lib/exe-daemon.js");
20
+ const scored = await rerankViaWorker(query, texts, topK);
21
+ return scored.map((s) => ({
22
+ text: texts[s.index] ?? "",
23
+ score: s.score,
24
+ index: s.index
25
+ }));
26
+ }
27
+ async function rerank(query, candidates, topK = 5) {
28
+ if (candidates.length === 0) return [];
29
+ if (candidates.length <= topK) return candidates;
30
+ const scored = await rerankWithScores(
31
+ query,
32
+ candidates.map((c) => c.raw_text),
33
+ topK
34
+ );
35
+ return scored.map((s) => candidates[s.index]);
36
+ }
37
+ async function rerankWithContext(query, candidates, topK) {
38
+ if (candidates.length === 0) return [];
39
+ const formattedTexts = candidates.map(
40
+ (c) => c.context ? `[${c.context}] ${c.text.slice(0, 460)}` : c.text.slice(0, 512)
41
+ );
42
+ const { rerankViaWorker } = await import("./lib/exe-daemon.js");
43
+ const scored = await rerankViaWorker(query, formattedTexts, topK);
44
+ return scored.map((s) => ({
45
+ text: candidates[s.index]?.text ?? "",
46
+ score: s.score,
47
+ index: s.index
48
+ }));
49
+ }
50
+
51
+ export {
52
+ isRerankerAvailable,
53
+ getRerankerModelPath,
54
+ disposeReranker,
55
+ rerankWithScores,
56
+ rerank,
57
+ rerankWithContext
58
+ };