fanluc 2.0.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.
- package/bin/fanluc.js +54 -0
- package/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/dist/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/dist/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/dist/assets/_basePickBy-CP3UBwOk.js +1 -0
- package/dist/assets/_baseUniq-CZ8FG28m.js +1 -0
- package/dist/assets/abnfDiagram-O67JEVCF-hiYMdxpV.js +1 -0
- package/dist/assets/arc-DokRg_wy.js +1 -0
- package/dist/assets/architectureDiagram-NJMV4G6O-UzHYe9Bx.js +36 -0
- package/dist/assets/blockDiagram-BEXU5L5S-DqM5UILT.js +140 -0
- package/dist/assets/c4Diagram-YGBWAQC7-Cxkdm7sV.js +38 -0
- package/dist/assets/channel-SPfNTvmj.js +1 -0
- package/dist/assets/chunk-2Q5K7J3B-Nl4zmLlG.js +1 -0
- package/dist/assets/chunk-3FUC2YCW-BCol78O2.js +2 -0
- package/dist/assets/chunk-5VM5RSS4-1u4YRv2Y.js +15 -0
- package/dist/assets/chunk-GTNCS2PH-BG9YIV2h.js +88 -0
- package/dist/assets/chunk-GWA4HPMP-BTKfkJAH.js +1 -0
- package/dist/assets/chunk-JWPE2WC7-DCjElfA7.js +1 -0
- package/dist/assets/chunk-NETBCI7D-QoJORlVn.js +1 -0
- package/dist/assets/chunk-WEXAMYUT-Da-T8ct9.js +1 -0
- package/dist/assets/chunk-XXDRQBXY-CLu69Uei.js +1 -0
- package/dist/assets/classDiagram-v2-NBCMYWYE-DIXavbI9.js +217 -0
- package/dist/assets/cose-bilkent-JH36ORCC-DuWclG8-.js +1 -0
- package/dist/assets/cynefin-OW5HDTMX-D2CG5-xd.js +178 -0
- package/dist/assets/cynefinDiagram-VND7K2PF-goI7_Qfg.js +62 -0
- package/dist/assets/cytoscape.esm-Ix0LnXOy.js +331 -0
- package/dist/assets/dagre-6A5THRUB-BmOaZ0cm.js +4 -0
- package/dist/assets/defaultLocale-DX6XiGOO.js +1 -0
- package/dist/assets/diagram-22UHCM2B-DjDJFMw3.js +200 -0
- package/dist/assets/diagram-3UASUU5V-J6z81NH3.js +24 -0
- package/dist/assets/diagram-ATOU4E4O-B1MPU8ai.js +3 -0
- package/dist/assets/diagram-CDSNMT55-X5Uss0Yv.js +30 -0
- package/dist/assets/diagram-MLGK6HIB-CRDqfYy1.js +24 -0
- package/dist/assets/diagram-MPIPVDR6-bhJtyiOq.js +41 -0
- package/dist/assets/ebnfDiagram-ZINNZB2B-Dn1mZAV8.js +1 -0
- package/dist/assets/elk-276RUBZZ-C93BlBEU.js +27 -0
- package/dist/assets/erDiagram-OPXOYQCR-PuzjAvhD.js +99 -0
- package/dist/assets/flowDiagram-KWPJA3E3-oRhFgO0p.js +213 -0
- package/dist/assets/ganttDiagram-FUAMR5RP-DKiU1XjU.js +292 -0
- package/dist/assets/gitGraphDiagram-X574FWY7-CWBMI0vb.js +106 -0
- package/dist/assets/graph-tGV3vi3M.js +1 -0
- package/dist/assets/index-BylpTP-E.css +1 -0
- package/dist/assets/index-DcpVteR3.js +3237 -0
- package/dist/assets/infoDiagram-VRGFBTTK-C5Hd4Afz.js +2 -0
- package/dist/assets/init-Gi6I4Gst.js +1 -0
- package/dist/assets/ishikawaDiagram-OU5B5YK6-BdD6ulRK.js +70 -0
- package/dist/assets/journeyDiagram-ZHPQQLJL-CzT-uvks.js +139 -0
- package/dist/assets/kanban-definition-PNTS6WVX-BkrazFMR.js +89 -0
- package/dist/assets/katex-C5jXJg4s.js +257 -0
- package/dist/assets/linear-B0wSM1Dr.js +1 -0
- package/dist/assets/mindmap-definition-NLK3R4M7-Df1Acqkf.js +96 -0
- package/dist/assets/ordinal-Cboi1Yqb.js +1 -0
- package/dist/assets/pegDiagram-GJSIUBJH-DK_F7h_0.js +1 -0
- package/dist/assets/permissionHelper--88tJJlz.js +3 -0
- package/dist/assets/pieDiagram-5QR66LMP-BMXyNb9R.js +39 -0
- package/dist/assets/quadrantDiagram-O4NWA36T-Dfu7Z8so.js +7 -0
- package/dist/assets/railroadDiagram-XR7U4H2S-CfnBD-aQ.js +1 -0
- package/dist/assets/requirementDiagram-PLB6GJNP-DrvsZJPP.js +84 -0
- package/dist/assets/sankeyDiagram-IPEJSGJF-DvdVDpT1.js +40 -0
- package/dist/assets/sequenceDiagram-PO4LG4MO-D1UTrvZH.js +169 -0
- package/dist/assets/sizeCapture-INFHLROL-CJrOBcai.js +1 -0
- package/dist/assets/stateDiagram-v2-GCMORJYK-CX8VmtqD.js +291 -0
- package/dist/assets/swimlanes-2SLR337P-DUWmhiK6.js +1 -0
- package/dist/assets/swimlanesDiagram-TC7HE7FX-DMQy1553.js +8 -0
- package/dist/assets/timeline-definition-EJHVYXUP-CBovVdOU.js +120 -0
- package/dist/assets/usecaseDiagram-POWQR4AR-LD5N5BAG.js +370 -0
- package/dist/assets/vennDiagram-UO4OBE2U-DdwfzB3A.js +34 -0
- package/dist/assets/wardleyDiagram-VNRHLVJA-BMHK4bav.js +78 -0
- package/dist/assets/xychartDiagram-PMCCYNJV-q1BNzMC-.js +7 -0
- package/dist/cli.js +474 -0
- package/dist/index.html +18 -0
- package/dist/msh_spin_inverted.gif +0 -0
- package/dist/server.cjs +1974 -0
- package/dist/server.cjs.map +7 -0
- package/dist/shrink_rotate.gif +0 -0
- package/dist/tui.js +5949 -0
- package/docs/fanluc_ui.md +48 -0
- package/docs/guide-connect.md +63 -0
- package/docs/mondk.md +6 -0
- package/docs/msh.md +3 -0
- package/index.html +17 -0
- package/mcp.json +0 -0
- package/package.json +92 -0
- package/public/msh_spin_inverted.gif +0 -0
- package/public/shrink_rotate.gif +0 -0
- package/searxng/docker-compose.yml +20 -0
- package/searxng/settings.yml +23 -0
- package/tsconfig.json +26 -0
- package/vite.config.ts +22 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# FANLUC Interface — UI Description
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
The screenshot shows a minimalist, wireframe-style chat application named **FANLUC**. The design uses a black-and-white aesthetic with a serif typeface, bracketed labels (e.g., `[BUTTON]`), and simple bordered boxes instead of modern rounded UI components — giving it a retro, text-terminal-like appearance.
|
|
5
|
+
|
|
6
|
+
## Layout Breakdown
|
|
7
|
+
|
|
8
|
+
### 1. Top Navigation Bar
|
|
9
|
+
- **Left side:**
|
|
10
|
+
- `[HISTORY]` — a bordered button, likely opens a list of past conversations.
|
|
11
|
+
- **FANLUC** — the application's logo/name, displayed in bold serif font next to the History button.
|
|
12
|
+
- **Right side:**
|
|
13
|
+
- `[SETUP_GUIDE]` — a bordered button, presumably links to onboarding or setup instructions.
|
|
14
|
+
- `[SETTINGS]` — a bordered button for app configuration.
|
|
15
|
+
- `[DK]` — a bordered button.
|
|
16
|
+
- A thin horizontal black line separates the top bar from the main content area.
|
|
17
|
+
|
|
18
|
+
### 2. Main Content Area (Center)
|
|
19
|
+
- Large, centered greeting text: **"Hey there"**, displayed in a large serif font.
|
|
20
|
+
- The rest of this area is empty white space, suggesting this is a fresh/new conversation screen with no messages yet.
|
|
21
|
+
|
|
22
|
+
### 3. Bottom Input Section
|
|
23
|
+
Separated from the main content by a thick horizontal black line.
|
|
24
|
+
|
|
25
|
+
- **Message input box:**
|
|
26
|
+
- A large rectangular text field spanning most of the width.
|
|
27
|
+
- Placeholder text: *"Write a message..."*
|
|
28
|
+
- A small resize handle icon in the bottom-right corner of the box.
|
|
29
|
+
|
|
30
|
+
- **Below the input box:**
|
|
31
|
+
- `+ [ATTACH_FILE]` — a bordered button on the left with a "+" icon, allowing file attachments.
|
|
32
|
+
- Helper text next to it: *"(Text <= 15KB | Image <= 15MB)"* — indicating file size limits for text and image attachments.
|
|
33
|
+
- `[SEND]` — a gray/disabled-looking bordered button on the far right, used to send the message (appears inactive until text is entered).
|
|
34
|
+
|
|
35
|
+
## Design Style Notes
|
|
36
|
+
- Monochrome (black, white, gray) color scheme.
|
|
37
|
+
- Serif typography throughout (buttons and headings), giving a formal/literary feel contrasted with the bracket-style button labels typical of minimalist or developer-oriented UIs.
|
|
38
|
+
- Sharp-cornered rectangular borders (no rounded corners) on all interactive elements.
|
|
39
|
+
- Generous whitespace in the main chat area, keeping focus on the message input at the bottom.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
mondk is the creator of this website(fanluc).
|
|
44
|
+
His page: https://huggingface.co/mondk
|
|
45
|
+
He started working on August 5, 2026.
|
|
46
|
+
He worked at hugging because Claude(a strong AI at that time) was very expensive, he just chatted... 2 times and it ran out of turns(qouta)
|
|
47
|
+
His logo consists of the letters M, S, and H layered over one another.
|
|
48
|
+
Since mondk is not proficient in English, his repository descriptions are very brief or written using Google Translate; the name "mondk" itself is derived from "moon" and "dark."
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
Here is the connection code
|
|
2
|
+
(The user has successfully connected, which is why they are able to chat with you.)
|
|
3
|
+
So, when a user asks to switch models, search for and find the newest and best version on Hugging Face.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
STEP 1
|
|
7
|
+
Get Your Ngrok Authtoken
|
|
8
|
+
Visit the ngrok Dashboard - Auth Token page.
|
|
9
|
+
Log in and copy your personal Authtoken.
|
|
10
|
+
|
|
11
|
+
STEP 2
|
|
12
|
+
Set Up Google Colab
|
|
13
|
+
Open a new notebook on Google Colab.
|
|
14
|
+
Change the runtime type to GPU: Click **Runtime** in the top menu → **Change runtime type**.
|
|
15
|
+
Select **T4 GPU** under **Hardware accelerator** and click **Save**. STEP 3
|
|
16
|
+
Run the Server Code
|
|
17
|
+
Copy and paste the code block below into a Colab cell, replace your_Authtoken with your actual Ngrok token, and run the cell:
|
|
18
|
+
|
|
19
|
+
```python
|
|
20
|
+
# View other models: https://huggingface.co/models?num_parameters=min:6B,max:12B&library=gguf&sort=trending&search=qwen
|
|
21
|
+
|
|
22
|
+
print("Installing required packages...(took ~2 min)")
|
|
23
|
+
!pip install -q pyngrok huggingface_hub uvicorn pydantic pydantic-settings
|
|
24
|
+
!pip install -q "llama-cpp-python[server]" \
|
|
25
|
+
--extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cu122
|
|
26
|
+
|
|
27
|
+
import os
|
|
28
|
+
import subprocess
|
|
29
|
+
from huggingface_hub import hf_hub_download
|
|
30
|
+
from pyngrok import ngrok
|
|
31
|
+
|
|
32
|
+
NGROK_TOKEN = "YOUR_NGROK_AUTHTOKEN" # <-- Paste your Ngrok Authtoken here
|
|
33
|
+
API_KEY = "123" # <-- Custom API Key (Change if desired)
|
|
34
|
+
CONTEXT_SIZE = 24000 # <-- Recommended: 1248-4096
|
|
35
|
+
|
|
36
|
+
ngrok.set_auth_token(NGROK_TOKEN)
|
|
37
|
+
|
|
38
|
+
print("Installing the model...")
|
|
39
|
+
model_path = hf_hub_download(
|
|
40
|
+
repo_id = "unsloth/Qwen3.5-9B-GGUF", # <-- Hugging Face Repo ID
|
|
41
|
+
filename="Qwen3.5-9B-Q5_K_M.gguf" # <-- Recommended: Q4_K_M quantization suffix
|
|
42
|
+
)
|
|
43
|
+
print("Starting up the server...")
|
|
44
|
+
|
|
45
|
+
ngrok.kill()
|
|
46
|
+
public_url = ngrok.connect(8000)
|
|
47
|
+
|
|
48
|
+
print("" + "="*60)
|
|
49
|
+
print(f"API URL (Google Colab): {public_url.public_url}" + "/v1/chat/completions")
|
|
50
|
+
print(f"API Key: {API_KEY}")
|
|
51
|
+
print("="*60 + "")
|
|
52
|
+
|
|
53
|
+
os.environ["API_KEY"] = API_KEY
|
|
54
|
+
|
|
55
|
+
cmd = f"python3 -m llama_cpp.server --model {model_path} --n_gpu_layers -1 --n_ctx {CONTEXT_SIZE} --host 0.0.0.0 --port 8000"
|
|
56
|
+
|
|
57
|
+
subprocess.run(cmd, shell=True)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
STEP 4
|
|
61
|
+
Connect to Your Web Client
|
|
62
|
+
Copy the API Base URL (e.g., https://xxxx.ngrok-free.dev/v1) and API Key printed in the Colab output.
|
|
63
|
+
Paste them into the Settings panel of your Web App Client (make sure URL ends with /v1/chat/completions or /v1).
|
package/docs/mondk.md
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
mondk is the creator of this website(fanluc).
|
|
2
|
+
His page: https://huggingface.co/mondk
|
|
3
|
+
He started working on August 5, 2026.
|
|
4
|
+
He worked at hugging because Claude(a strong AI at that time) was very expensive, he just chatted... 2 times and it ran out of turns(qouta)
|
|
5
|
+
His logo consists of the letters M, S, and H layered over one another.
|
|
6
|
+
Since mondk is not proficient in English, his repository descriptions are very brief or written using Google Translate; the name "mondk" itself is derived from "moon" and "dark."
|
package/docs/msh.md
ADDED
package/index.html
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>TOOL-NGORK</title>
|
|
7
|
+
<meta name="description" content="Ung dung tro chuyen voi AI qua Custom REST API Endpoint phong cach co dien trang den." />
|
|
8
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
9
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
10
|
+
<link href="https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400;1,700&family=Inconsolata:wght@200..900&family=Lora:ital,wght@0,400..700;1,400..700&family=Share+Tech+Mono&family=VT323&display=swap" rel="stylesheet">
|
|
11
|
+
</head>
|
|
12
|
+
<body>
|
|
13
|
+
<div id="root"></div>
|
|
14
|
+
<script type="module" src="/src/main.tsx"></script>
|
|
15
|
+
</body>
|
|
16
|
+
</html>
|
|
17
|
+
|
package/mcp.json
ADDED
|
File without changes
|
package/package.json
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "fanluc",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "fanluc — terminal tool giống Claude Code/opencode, TUI + web chạy song song, workspace-aware với FANLUC.md",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"fanluc": "./bin/fanluc.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist/",
|
|
11
|
+
"bin/",
|
|
12
|
+
"public/",
|
|
13
|
+
"assets/",
|
|
14
|
+
"docs/",
|
|
15
|
+
"searxng/",
|
|
16
|
+
"README.md",
|
|
17
|
+
"README-TERMINAL.md",
|
|
18
|
+
"mcp.json",
|
|
19
|
+
"index.html",
|
|
20
|
+
"vite.config.ts",
|
|
21
|
+
"tsconfig.json"
|
|
22
|
+
],
|
|
23
|
+
"keywords": [
|
|
24
|
+
"fanluc",
|
|
25
|
+
"terminal",
|
|
26
|
+
"ai",
|
|
27
|
+
"agent",
|
|
28
|
+
"claude-code",
|
|
29
|
+
"opencode",
|
|
30
|
+
"tui",
|
|
31
|
+
"ink",
|
|
32
|
+
"gemini"
|
|
33
|
+
],
|
|
34
|
+
"author": "mondk",
|
|
35
|
+
"license": "MIT",
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": ">=18.0.0"
|
|
38
|
+
},
|
|
39
|
+
"publishConfig": {
|
|
40
|
+
"access": "public"
|
|
41
|
+
},
|
|
42
|
+
"scripts": {
|
|
43
|
+
"dev": "tsx server.ts",
|
|
44
|
+
"build": "vite build && esbuild server.ts --bundle --platform=node --format=cjs --packages=external --sourcemap --outfile=dist/server.cjs",
|
|
45
|
+
"build:cli": "esbuild src/cli/index.ts --bundle --platform=node --format=esm --packages=external --outfile=dist/cli.js",
|
|
46
|
+
"build:tui": "esbuild src/tui/index.tsx --bundle --platform=node --format=esm --packages=external --outfile=dist/tui.js --jsx=automatic",
|
|
47
|
+
"build:all": "npm run build && npm run build:cli && npm run build:tui",
|
|
48
|
+
"prepublishOnly": "npm run build:all",
|
|
49
|
+
"start": "node dist/server.cjs",
|
|
50
|
+
"clean": "node -e \"try{require('fs').rmSync('dist',{recursive:true,force:true})}catch{};try{require('fs').unlinkSync('server.js')}catch{}\"",
|
|
51
|
+
"lint": "tsc --noEmit",
|
|
52
|
+
"test": "node --import tsx --test \"tests/*.test.ts\""
|
|
53
|
+
},
|
|
54
|
+
"dependencies": {
|
|
55
|
+
"@google/genai": "^2.4.0",
|
|
56
|
+
"@modelcontextprotocol/sdk": "^1.12.0",
|
|
57
|
+
"@mozilla/readability": "^0.6.0",
|
|
58
|
+
"@tailwindcss/vite": "^4.1.14",
|
|
59
|
+
"@vitejs/plugin-react": "^5.0.4",
|
|
60
|
+
"autoprefixer": "^10.4.21",
|
|
61
|
+
"dotenv": "^17.2.3",
|
|
62
|
+
"esbuild": "^0.25.0",
|
|
63
|
+
"express": "^4.21.2",
|
|
64
|
+
"google-translate-api-x": "^10.7.3",
|
|
65
|
+
"ink": "^7.1.1",
|
|
66
|
+
"ink-text-input": "^6.0.0",
|
|
67
|
+
"jsdom": "^30.1.0",
|
|
68
|
+
"jszip": "^3.10.2",
|
|
69
|
+
"katex": "^0.18.7",
|
|
70
|
+
"lucide-react": "^0.546.0",
|
|
71
|
+
"mermaid": "^12.0.0",
|
|
72
|
+
"motion": "^12.23.24",
|
|
73
|
+
"react": "^19.0.1",
|
|
74
|
+
"react-dom": "^19.0.1",
|
|
75
|
+
"react-markdown": "^10.1.0",
|
|
76
|
+
"rehype-katex": "^7.0.1",
|
|
77
|
+
"remark-breaks": "^4.0.0",
|
|
78
|
+
"remark-gfm": "^4.0.1",
|
|
79
|
+
"remark-math": "^6.0.0",
|
|
80
|
+
"string-width": "^8.2.2",
|
|
81
|
+
"tailwindcss": "^4.1.14",
|
|
82
|
+
"vite": "^6.2.3"
|
|
83
|
+
},
|
|
84
|
+
"devDependencies": {
|
|
85
|
+
"@types/express": "^4.17.21",
|
|
86
|
+
"@types/jsdom": "^30.0.0",
|
|
87
|
+
"@types/node": "^22.14.0",
|
|
88
|
+
"tsx": "^4.21.0",
|
|
89
|
+
"typescript": "~5.8.2",
|
|
90
|
+
"vite": "^6.2.3"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# SearXNG self-hosted — tui khuyên làm mặc định, yahoo cũ làm fallback
|
|
2
|
+
# Bật JSON cho SearXNG (chỗ hay kẹt nhất): format không bật trong settings.yml sẽ trả 403.
|
|
3
|
+
# Test: curl "http://localhost:8080/search?q=test&format=json"
|
|
4
|
+
# File cấu hình mẫu mount vào /etc/searxng/settings.yml — xem docs: https://github.com/searxng/searxng/blob/master/docs/dev/search_api.rst
|
|
5
|
+
version: '3.8'
|
|
6
|
+
services:
|
|
7
|
+
searxng:
|
|
8
|
+
image: searxng/searxng:latest
|
|
9
|
+
container_name: searxng
|
|
10
|
+
ports:
|
|
11
|
+
- "8080:8080"
|
|
12
|
+
volumes:
|
|
13
|
+
- ./settings.yml:/etc/searxng/settings.yml:ro
|
|
14
|
+
environment:
|
|
15
|
+
- SEARXNG_BASE_URL=http://localhost:8080/
|
|
16
|
+
restart: unless-stopped
|
|
17
|
+
# Optional: redis for caching (uncomment if needed)
|
|
18
|
+
# redis:
|
|
19
|
+
# image: redis:alpine
|
|
20
|
+
# restart: unless-stopped
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
use_default_settings: true
|
|
2
|
+
search:
|
|
3
|
+
formats: [html, json]
|
|
4
|
+
server:
|
|
5
|
+
secret_key: "doi-cai-nay-thay-bang-random-string"
|
|
6
|
+
limiter: false
|
|
7
|
+
image_proxy: true
|
|
8
|
+
method: "POST"
|
|
9
|
+
default_http_headers:
|
|
10
|
+
X-Content-Type-Options: nosniff
|
|
11
|
+
X-XSS-Protection: 1; mode=block
|
|
12
|
+
X-Download-Options: noopen
|
|
13
|
+
X-Robots-Tag: noindex, nofollow
|
|
14
|
+
Referrer-Policy: no-referrer
|
|
15
|
+
ui:
|
|
16
|
+
static_use_hash: true
|
|
17
|
+
outgoing:
|
|
18
|
+
request_timeout: 5.0
|
|
19
|
+
max_request_timeout: 15.0
|
|
20
|
+
retries: 1
|
|
21
|
+
retry_sleep: 1.0
|
|
22
|
+
retries_sleep: 1.0
|
|
23
|
+
enable_http: true
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"experimentalDecorators": true,
|
|
5
|
+
"useDefineForClassFields": false,
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"lib": [
|
|
8
|
+
"ES2022",
|
|
9
|
+
"DOM",
|
|
10
|
+
"DOM.Iterable"
|
|
11
|
+
],
|
|
12
|
+
"skipLibCheck": true,
|
|
13
|
+
"moduleResolution": "bundler",
|
|
14
|
+
"isolatedModules": true,
|
|
15
|
+
"moduleDetection": "force",
|
|
16
|
+
"allowJs": true,
|
|
17
|
+
"jsx": "react-jsx",
|
|
18
|
+
"paths": {
|
|
19
|
+
"@/*": [
|
|
20
|
+
"./*"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
"allowImportingTsExtensions": true,
|
|
24
|
+
"noEmit": true
|
|
25
|
+
}
|
|
26
|
+
}
|
package/vite.config.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import tailwindcss from '@tailwindcss/vite';
|
|
2
|
+
import react from '@vitejs/plugin-react';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
import {defineConfig} from 'vite';
|
|
5
|
+
|
|
6
|
+
export default defineConfig(() => {
|
|
7
|
+
return {
|
|
8
|
+
plugins: [react(), tailwindcss()],
|
|
9
|
+
resolve: {
|
|
10
|
+
alias: {
|
|
11
|
+
'@': path.resolve(__dirname, '.'),
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
server: {
|
|
15
|
+
// HMR is disabled in AI Studio via DISABLE_HMR env var.
|
|
16
|
+
// Do not modifyâfile watching is disabled to prevent flickering during agent edits.
|
|
17
|
+
hmr: process.env.DISABLE_HMR !== 'true',
|
|
18
|
+
// Disable file watching when DISABLE_HMR is true to save CPU during agent edits.
|
|
19
|
+
watch: process.env.DISABLE_HMR === 'true' ? null : {},
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
});
|