@jiangxiaosheng/digital-agent-platform 1.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.
Files changed (94) hide show
  1. package/README.md +37 -0
  2. package/eslint.config.mjs +20 -0
  3. package/messages/en.json +184 -0
  4. package/messages/zh.json +184 -0
  5. package/middleware.ts +9 -0
  6. package/next-env.d.ts +5 -0
  7. package/next.config.ts +16 -0
  8. package/package.json +59 -0
  9. package/postcss.config.mjs +5 -0
  10. package/src/app/[locale]/agents/[id]/chat/page.tsx +833 -0
  11. package/src/app/[locale]/agents/[id]/edit/page.tsx +58 -0
  12. package/src/app/[locale]/agents/new/page.tsx +52 -0
  13. package/src/app/[locale]/agents/page.tsx +122 -0
  14. package/src/app/[locale]/knowledge/page.tsx +305 -0
  15. package/src/app/[locale]/layout.tsx +46 -0
  16. package/src/app/[locale]/page.tsx +6 -0
  17. package/src/app/[locale]/settings/page.tsx +1204 -0
  18. package/src/app/api/agents/[id]/route.ts +27 -0
  19. package/src/app/api/agents/route.ts +27 -0
  20. package/src/app/api/auth-config/test/route.ts +69 -0
  21. package/src/app/api/bash-output/route.ts +57 -0
  22. package/src/app/api/chat/[agentId]/route.ts +164 -0
  23. package/src/app/api/env-vars/[key]/route.ts +22 -0
  24. package/src/app/api/env-vars/route.ts +26 -0
  25. package/src/app/api/env-vars/scan/route.ts +66 -0
  26. package/src/app/api/file-serve/route.ts +58 -0
  27. package/src/app/api/fs/browse/route.ts +47 -0
  28. package/src/app/api/knowledge/[id]/documents/[docId]/route.ts +22 -0
  29. package/src/app/api/knowledge/[id]/route.ts +21 -0
  30. package/src/app/api/knowledge/[id]/upload/route.ts +90 -0
  31. package/src/app/api/knowledge/route.ts +15 -0
  32. package/src/app/api/knowledge/search/route.ts +26 -0
  33. package/src/app/api/models/route.ts +160 -0
  34. package/src/app/api/models-config/route.ts +41 -0
  35. package/src/app/api/models-config/test/route.ts +84 -0
  36. package/src/app/api/sessions/[agentId]/[sessionId]/route.ts +12 -0
  37. package/src/app/api/sessions/[agentId]/route.ts +19 -0
  38. package/src/app/api/sessions/history/route.ts +166 -0
  39. package/src/app/api/settings/route.ts +45 -0
  40. package/src/app/api/skills/[name]/route.ts +40 -0
  41. package/src/app/api/skills/install/route.ts +35 -0
  42. package/src/app/api/skills/route.ts +54 -0
  43. package/src/app/api/skills/search/route.ts +60 -0
  44. package/src/app/api/tts/route.ts +235 -0
  45. package/src/app/api/voice-provider/route.ts +98 -0
  46. package/src/app/api/workspace-files/route.ts +151 -0
  47. package/src/app/globals.css +176 -0
  48. package/src/app/layout.tsx +13 -0
  49. package/src/app/page.tsx +6 -0
  50. package/src/components/agents/agent-form.tsx +457 -0
  51. package/src/components/agents/model-selector.tsx +290 -0
  52. package/src/components/agents/skills-manager.tsx +347 -0
  53. package/src/components/chat/input-bar.tsx +561 -0
  54. package/src/components/chat/message-bubble.tsx +395 -0
  55. package/src/components/layout/sidebar.tsx +304 -0
  56. package/src/components/providers.tsx +19 -0
  57. package/src/components/ui/badge.tsx +26 -0
  58. package/src/components/ui/button.tsx +43 -0
  59. package/src/components/ui/card.tsx +46 -0
  60. package/src/components/ui/dialog.tsx +74 -0
  61. package/src/components/ui/directory-picker.tsx +185 -0
  62. package/src/components/ui/input.tsx +18 -0
  63. package/src/components/ui/label.tsx +16 -0
  64. package/src/components/ui/scroll-area.tsx +41 -0
  65. package/src/components/ui/select.tsx +93 -0
  66. package/src/components/ui/slider.tsx +35 -0
  67. package/src/components/ui/switch.tsx +35 -0
  68. package/src/components/ui/tabs.tsx +48 -0
  69. package/src/components/ui/textarea.tsx +17 -0
  70. package/src/components/ui/toaster.tsx +50 -0
  71. package/src/hooks/use-toast.ts +43 -0
  72. package/src/i18n/request.ts +13 -0
  73. package/src/i18n/routing.ts +7 -0
  74. package/src/lib/agent-factory.ts +200 -0
  75. package/src/lib/agents/store.ts +95 -0
  76. package/src/lib/db/client.ts +25 -0
  77. package/src/lib/db/schema.ts +66 -0
  78. package/src/lib/env-vars.ts +33 -0
  79. package/src/lib/knowledge/chunker.ts +34 -0
  80. package/src/lib/knowledge/embedder.ts +48 -0
  81. package/src/lib/knowledge/retriever.ts +94 -0
  82. package/src/lib/knowledge/store.ts +74 -0
  83. package/src/lib/models-config.ts +55 -0
  84. package/src/lib/settings.ts +33 -0
  85. package/src/lib/skills.ts +79 -0
  86. package/src/lib/system-prompt.ts +52 -0
  87. package/src/lib/tool-builder.ts +19 -0
  88. package/src/lib/utils.ts +6 -0
  89. package/src/lib/voice-providers-config.ts +71 -0
  90. package/src/middleware.ts +9 -0
  91. package/src/types/agent.ts +124 -0
  92. package/src/types/knowledge.ts +39 -0
  93. package/src/types/settings.ts +31 -0
  94. package/tsconfig.json +40 -0
package/README.md ADDED
@@ -0,0 +1,37 @@
1
+ # Digital Agent Platform
2
+
3
+ ## Setup
4
+
5
+ ```bash
6
+ npm install
7
+ npm run dev
8
+ ```
9
+
10
+ Open http://localhost:3000
11
+
12
+ ## Requirements
13
+
14
+ - Node.js >= 22.19.0
15
+ - npm >= 10
16
+
17
+ ## First-time setup
18
+
19
+ 1. Open Settings (`/settings`)
20
+ 2. Add your LLM provider API keys (Anthropic, OpenAI, etc.)
21
+ 3. Go to Agents and create your first digital agent
22
+ 4. Click "Start Chat" to begin
23
+
24
+ ## Features
25
+
26
+ - 🤖 **Multiple Digital Agents** — Configure custom AI personas with different models and tools
27
+ - 💬 **Text + Voice** — Type or speak; agents can read responses aloud
28
+ - 📚 **Knowledge Bases** — Upload PDFs, Word docs, TXT files for RAG retrieval
29
+ - 🛠️ **Tool Extensions** — File access, bash execution, web search, calculator
30
+ - 🌐 **i18n** — Chinese and English UI
31
+ - 🎨 **Dark/Light theme** — Full theme support
32
+
33
+ ## Data storage
34
+
35
+ All data is stored locally in `~/.digital-agents/`:
36
+ - `agents.db` — SQLite database (agents, sessions, knowledge bases)
37
+ - `uploads/` — Uploaded documents
@@ -0,0 +1,20 @@
1
+ import { dirname } from "path";
2
+ import { fileURLToPath } from "url";
3
+ import { FlatCompat } from "@eslint/eslintrc";
4
+
5
+ const __filename = fileURLToPath(import.meta.url);
6
+ const __dirname = dirname(__filename);
7
+
8
+ const compat = new FlatCompat({ baseDirectory: __dirname });
9
+
10
+ const eslintConfig = [
11
+ ...compat.extends("next/core-web-vitals", "next/typescript"),
12
+ {
13
+ rules: {
14
+ "@typescript-eslint/no-explicit-any": "warn",
15
+ "@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
16
+ },
17
+ },
18
+ ];
19
+
20
+ export default eslintConfig;
@@ -0,0 +1,184 @@
1
+ {
2
+ "common": {
3
+ "save": "Save",
4
+ "cancel": "Cancel",
5
+ "delete": "Delete",
6
+ "edit": "Edit",
7
+ "create": "Create",
8
+ "confirm": "Confirm",
9
+ "back": "Back",
10
+ "loading": "Loading...",
11
+ "error": "Error",
12
+ "success": "Success",
13
+ "search": "Search",
14
+ "upload": "Upload",
15
+ "download": "Download",
16
+ "close": "Close",
17
+ "name": "Name",
18
+ "description": "Description",
19
+ "createdAt": "Created At",
20
+ "updatedAt": "Updated At",
21
+ "actions": "Actions",
22
+ "noData": "No data",
23
+ "confirmDelete": "Are you sure you want to delete? This action cannot be undone."
24
+ },
25
+ "nav": {
26
+ "agents": "Agents",
27
+ "knowledge": "Knowledge",
28
+ "settings": "Settings"
29
+ },
30
+ "agents": {
31
+ "title": "Digital Agents",
32
+ "subtitle": "Manage your AI digital agents",
33
+ "new": "New Agent",
34
+ "empty": "No agents yet",
35
+ "emptyHint": "Create your first agent with a custom persona, model, and tools",
36
+ "chat": "Start Chat",
37
+ "editConfig": "Edit Config",
38
+ "deleteConfirm": "Delete \"{name}\"? All related sessions will also be removed.",
39
+ "form": {
40
+ "basicInfo": "Basic Info",
41
+ "name": "Agent Name",
42
+ "namePlaceholder": "e.g. Customer Support",
43
+ "avatar": "Avatar",
44
+ "avatarHint": "Choose an emoji as avatar",
45
+ "description": "Description",
46
+ "descriptionPlaceholder": "Briefly describe this agent's purpose...",
47
+ "systemPrompt": "System Prompt",
48
+ "systemPromptPlaceholder": "Describe the agent's role, personality and behavior...\ne.g. You are a professional customer support assistant, friendly and patient.",
49
+ "modelConfig": "Model Config",
50
+ "provider": "Provider",
51
+ "modelId": "Model",
52
+ "temperature": "Temperature",
53
+ "maxTokens": "Max Tokens",
54
+ "thinkingLevel": "Thinking Level",
55
+ "thinkingLevels": {
56
+ "off": "Off",
57
+ "minimal": "Minimal",
58
+ "low": "Low",
59
+ "medium": "Medium",
60
+ "high": "High",
61
+ "xhigh": "Extra High",
62
+ "max": "Max"
63
+ },
64
+ "voiceConfig": "Voice Config",
65
+ "voiceEnabled": "Enable Voice",
66
+ "ttsProvider": "TTS Provider",
67
+ "sttProvider": "STT Provider",
68
+ "voiceSpeed": "Voice Speed",
69
+ "toolsConfig": "Tools",
70
+ "tools": {
71
+ "bash": "Code Execution (Bash)",
72
+ "bashHint": "Allow running terminal commands",
73
+ "fileRead": "Read Files",
74
+ "fileReadHint": "Allow reading local files",
75
+ "fileWrite": "Write/Edit Files",
76
+ "fileWriteHint": "Allow creating and modifying files",
77
+ "grep": "Text Search (Grep)",
78
+ "grepHint": "Allow searching content in files",
79
+ "find": "File Search (Find)",
80
+ "findHint": "Allow finding files",
81
+ "webSearch": "Web Search",
82
+ "webSearchHint": "Allow internet search (requires Tavily API Key)",
83
+ "calculator": "Calculator",
84
+ "calculatorHint": "Allow evaluating math expressions"
85
+ },
86
+ "knowledgeConfig": "Knowledge Bases",
87
+ "knowledgeHint": "Attach knowledge bases for automatic retrieval during chat",
88
+ "noKnowledge": "No knowledge bases yet",
89
+ "persona": "Persona",
90
+ "tone": "Tone",
91
+ "tones": {
92
+ "formal": "Formal",
93
+ "casual": "Casual",
94
+ "friendly": "Friendly",
95
+ "professional": "Professional"
96
+ },
97
+ "language": "Language"
98
+ }
99
+ },
100
+ "chat": {
101
+ "title": "Chat",
102
+ "newSession": "New Session",
103
+ "sessions": "History",
104
+ "noSessions": "No sessions yet",
105
+ "inputPlaceholder": "Type a message, Enter to send, Shift+Enter for newline...",
106
+ "send": "Send",
107
+ "thinking": "Thinking...",
108
+ "voiceInput": "Voice Input",
109
+ "voiceStop": "Stop Recording",
110
+ "ttsPlay": "Read Aloud",
111
+ "ttsStop": "Stop Reading",
112
+ "compacting": "Compacting context...",
113
+ "toolCall": "Tool Call",
114
+ "toolResult": "Tool Result",
115
+ "copyMessage": "Copy",
116
+ "copied": "Copied",
117
+ "clearSession": "Clear Session",
118
+ "exportSession": "Export Session",
119
+ "contextUsage": "Context Usage",
120
+ "you": "You",
121
+ "welcomeTitle": "Hello!",
122
+ "welcomeMessage": "I'm {name}, {description} How can I help you?"
123
+ },
124
+ "knowledge": {
125
+ "title": "Knowledge Bases",
126
+ "subtitle": "Manage knowledge bases for your agents",
127
+ "new": "New Knowledge Base",
128
+ "empty": "No knowledge bases yet",
129
+ "emptyHint": "Upload documents to build a knowledge base",
130
+ "documents": "Documents",
131
+ "chunks": "Chunks",
132
+ "uploadDoc": "Upload Document",
133
+ "uploadHint": "Supports PDF, Word (.docx), TXT, Markdown",
134
+ "processing": "Processing...",
135
+ "processed": "Processed",
136
+ "deleteDoc": "Delete Document",
137
+ "searchTest": "Search Test",
138
+ "searchPlaceholder": "Enter a question to test retrieval...",
139
+ "searchResults": "Results",
140
+ "noResults": "No relevant content found",
141
+ "source": "Source",
142
+ "relevance": "Relevance",
143
+ "form": {
144
+ "name": "Knowledge Base Name",
145
+ "namePlaceholder": "e.g. Product Manual",
146
+ "description": "Description",
147
+ "descriptionPlaceholder": "Describe this knowledge base..."
148
+ }
149
+ },
150
+ "settings": {
151
+ "title": "Settings",
152
+ "subtitle": "Configure API keys, model preferences, and UI options",
153
+ "apiKeys": "API Keys",
154
+ "apiKeysHint": "Configure provider API keys, stored locally only",
155
+ "defaultModel": "Default Model",
156
+ "defaultModelHint": "Default model used when creating new agents",
157
+ "theme": "Theme",
158
+ "themeLight": "Light",
159
+ "themeDark": "Dark",
160
+ "themeSystem": "System",
161
+ "language": "Language",
162
+ "storagePath": "Storage Path",
163
+ "storagePathHint": "Where agent configs and knowledge bases are stored",
164
+ "saved": "Settings saved",
165
+ "providers": {
166
+ "anthropic": "Anthropic",
167
+ "openai": "OpenAI",
168
+ "google": "Google AI",
169
+ "ollama": "Ollama (Local)"
170
+ },
171
+ "ollamaHost": "Ollama Host",
172
+ "ollamaHostPlaceholder": "http://localhost:11434",
173
+ "tavilyKey": "Tavily API Key (Web Search)"
174
+ },
175
+ "errors": {
176
+ "agentNotFound": "Agent not found",
177
+ "modelNotConfigured": "Please configure a model first",
178
+ "apiKeyMissing": "Please set your {provider} API Key first",
179
+ "uploadFailed": "File upload failed",
180
+ "chatFailed": "Chat failed, please try again",
181
+ "saveFailed": "Save failed",
182
+ "deleteFailed": "Delete failed"
183
+ }
184
+ }
@@ -0,0 +1,184 @@
1
+ {
2
+ "common": {
3
+ "save": "保存",
4
+ "cancel": "取消",
5
+ "delete": "删除",
6
+ "edit": "编辑",
7
+ "create": "创建",
8
+ "confirm": "确认",
9
+ "back": "返回",
10
+ "loading": "加载中...",
11
+ "error": "错误",
12
+ "success": "成功",
13
+ "search": "搜索",
14
+ "upload": "上传",
15
+ "download": "下载",
16
+ "close": "关闭",
17
+ "name": "名称",
18
+ "description": "描述",
19
+ "createdAt": "创建时间",
20
+ "updatedAt": "更新时间",
21
+ "actions": "操作",
22
+ "noData": "暂无数据",
23
+ "confirmDelete": "确定要删除吗?此操作不可撤销。"
24
+ },
25
+ "nav": {
26
+ "agents": "数字人",
27
+ "knowledge": "知识库",
28
+ "settings": "设置"
29
+ },
30
+ "agents": {
31
+ "title": "数字人",
32
+ "subtitle": "管理你的 AI 数字人助手",
33
+ "new": "新建数字人",
34
+ "empty": "还没有数字人",
35
+ "emptyHint": "创建你的第一个数字人,配置专属人设、模型和工具",
36
+ "chat": "开始对话",
37
+ "editConfig": "编辑配置",
38
+ "deleteConfirm": "确定要删除「{name}」吗?相关会话也将被清除。",
39
+ "form": {
40
+ "basicInfo": "基本信息",
41
+ "name": "数字人名称",
42
+ "namePlaceholder": "例如:客服小助手",
43
+ "avatar": "头像",
44
+ "avatarHint": "选择一个 emoji 作为头像",
45
+ "description": "简介",
46
+ "descriptionPlaceholder": "简单描述这个数字人的用途...",
47
+ "systemPrompt": "人设 Prompt",
48
+ "systemPromptPlaceholder": "描述数字人的角色、性格和行为方式...\n例如:你是一位专业的客服助手,性格友善、耐心,擅长解决用户问题。",
49
+ "modelConfig": "模型配置",
50
+ "provider": "提供商",
51
+ "modelId": "模型",
52
+ "temperature": "创造性(Temperature)",
53
+ "maxTokens": "最大 Token 数",
54
+ "thinkingLevel": "思考深度",
55
+ "thinkingLevels": {
56
+ "off": "关闭",
57
+ "minimal": "最低",
58
+ "low": "低",
59
+ "medium": "中等",
60
+ "high": "高",
61
+ "xhigh": "极高",
62
+ "max": "最大"
63
+ },
64
+ "voiceConfig": "语音配置",
65
+ "voiceEnabled": "启用语音",
66
+ "ttsProvider": "TTS 提供商",
67
+ "sttProvider": "STT 提供商",
68
+ "voiceSpeed": "语速",
69
+ "toolsConfig": "工具配置",
70
+ "tools": {
71
+ "bash": "代码执行(Bash)",
72
+ "bashHint": "允许执行终端命令",
73
+ "fileRead": "读取文件",
74
+ "fileReadHint": "允许读取本地文件",
75
+ "fileWrite": "写入/编辑文件",
76
+ "fileWriteHint": "允许创建和修改文件",
77
+ "grep": "文本搜索(Grep)",
78
+ "grepHint": "允许在文件中搜索内容",
79
+ "find": "文件查找(Find)",
80
+ "findHint": "允许查找文件",
81
+ "webSearch": "联网搜索",
82
+ "webSearchHint": "允许搜索互联网(需配置 Tavily API Key)",
83
+ "calculator": "计算器",
84
+ "calculatorHint": "允许计算数学表达式"
85
+ },
86
+ "knowledgeConfig": "知识库",
87
+ "knowledgeHint": "为数字人挂载知识库,对话时自动检索相关内容",
88
+ "noKnowledge": "还没有知识库",
89
+ "persona": "人设配置",
90
+ "tone": "语气风格",
91
+ "tones": {
92
+ "formal": "正式",
93
+ "casual": "随意",
94
+ "friendly": "友善",
95
+ "professional": "专业"
96
+ },
97
+ "language": "交流语言"
98
+ }
99
+ },
100
+ "chat": {
101
+ "title": "对话",
102
+ "newSession": "新建会话",
103
+ "sessions": "历史会话",
104
+ "noSessions": "暂无历史会话",
105
+ "inputPlaceholder": "输入消息,按 Enter 发送,Shift+Enter 换行...",
106
+ "send": "发送",
107
+ "thinking": "思考中...",
108
+ "voiceInput": "语音输入",
109
+ "voiceStop": "停止录音",
110
+ "ttsPlay": "朗读",
111
+ "ttsStop": "停止朗读",
112
+ "compacting": "正在压缩上下文...",
113
+ "toolCall": "工具调用",
114
+ "toolResult": "工具结果",
115
+ "copyMessage": "复制",
116
+ "copied": "已复制",
117
+ "clearSession": "清除会话",
118
+ "exportSession": "导出会话",
119
+ "contextUsage": "上下文使用",
120
+ "you": "你",
121
+ "welcomeTitle": "你好!",
122
+ "welcomeMessage": "我是 {name},{description} 有什么可以帮你的吗?"
123
+ },
124
+ "knowledge": {
125
+ "title": "知识库",
126
+ "subtitle": "管理你的知识库,为数字人提供专属知识",
127
+ "new": "新建知识库",
128
+ "empty": "还没有知识库",
129
+ "emptyHint": "上传文档,构建专属知识库",
130
+ "documents": "文档",
131
+ "chunks": "知识块",
132
+ "uploadDoc": "上传文档",
133
+ "uploadHint": "支持 PDF、Word (.docx)、TXT、Markdown 格式",
134
+ "processing": "处理中...",
135
+ "processed": "已处理",
136
+ "deleteDoc": "删除文档",
137
+ "searchTest": "检索测试",
138
+ "searchPlaceholder": "输入问题,测试知识库检索效果...",
139
+ "searchResults": "检索结果",
140
+ "noResults": "未找到相关内容",
141
+ "source": "来源",
142
+ "relevance": "相关度",
143
+ "form": {
144
+ "name": "知识库名称",
145
+ "namePlaceholder": "例如:产品手册",
146
+ "description": "描述",
147
+ "descriptionPlaceholder": "描述这个知识库的用途..."
148
+ }
149
+ },
150
+ "settings": {
151
+ "title": "系统设置",
152
+ "subtitle": "配置 API Keys、模型偏好和界面选项",
153
+ "apiKeys": "API Keys",
154
+ "apiKeysHint": "配置各提供商的 API Key,密钥仅存储在本地",
155
+ "defaultModel": "默认模型",
156
+ "defaultModelHint": "新建数字人时使用的默认模型",
157
+ "theme": "主题",
158
+ "themeLight": "浅色",
159
+ "themeDark": "深色",
160
+ "themeSystem": "跟随系统",
161
+ "language": "界面语言",
162
+ "storagePath": "数据存储路径",
163
+ "storagePathHint": "数字人配置和知识库的存储位置",
164
+ "saved": "设置已保存",
165
+ "providers": {
166
+ "anthropic": "Anthropic",
167
+ "openai": "OpenAI",
168
+ "google": "Google AI",
169
+ "ollama": "Ollama(本地)"
170
+ },
171
+ "ollamaHost": "Ollama 服务地址",
172
+ "ollamaHostPlaceholder": "http://localhost:11434",
173
+ "tavilyKey": "Tavily API Key(Web 搜索)"
174
+ },
175
+ "errors": {
176
+ "agentNotFound": "数字人不存在",
177
+ "modelNotConfigured": "请先配置模型",
178
+ "apiKeyMissing": "请先设置 {provider} 的 API Key",
179
+ "uploadFailed": "文件上传失败",
180
+ "chatFailed": "对话发送失败,请重试",
181
+ "saveFailed": "保存失败",
182
+ "deleteFailed": "删除失败"
183
+ }
184
+ }
package/middleware.ts ADDED
@@ -0,0 +1,9 @@
1
+ import createMiddleware from "next-intl/middleware";
2
+ import { routing } from "./src/i18n/routing";
3
+
4
+ export default createMiddleware(routing);
5
+
6
+ export const config = {
7
+ matcher: [
8
+ "/((?!api|_next/static|_next/image|favicon.ico|.*\\..*).*)"],
9
+ };
package/next-env.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ /// <reference types="next" />
2
+ /// <reference types="next/image-types/global" />
3
+
4
+ // NOTE: This file should not be edited
5
+ // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
package/next.config.ts ADDED
@@ -0,0 +1,16 @@
1
+ import type { NextConfig } from "next";
2
+ import createNextIntlPlugin from "next-intl/plugin";
3
+
4
+ const withNextIntl = createNextIntlPlugin("./src/i18n/request.ts");
5
+
6
+ const nextConfig: NextConfig = {
7
+ serverExternalPackages: [
8
+ "@earendil-works/pi-coding-agent",
9
+ "@earendil-works/pi-agent-core",
10
+ "@earendil-works/pi-ai",
11
+ "@earendil-works/pi-tui",
12
+ "better-sqlite3",
13
+ ],
14
+ };
15
+
16
+ export default withNextIntl(nextConfig);
package/package.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "@jiangxiaosheng/digital-agent-platform",
3
+ "version": "1.0.0",
4
+ "private": false,
5
+ "scripts": {
6
+ "dev": "next dev",
7
+ "build": "next build",
8
+ "start": "next start",
9
+ "lint": "next lint"
10
+ },
11
+ "dependencies": {
12
+ "@earendil-works/pi-coding-agent": "0.82.1",
13
+ "@sinclair/typebox": "^0.34.8",
14
+ "@radix-ui/react-dialog": "^1.1.4",
15
+ "@radix-ui/react-dropdown-menu": "^2.1.4",
16
+ "@radix-ui/react-label": "^2.1.1",
17
+ "@radix-ui/react-scroll-area": "^1.2.2",
18
+ "@radix-ui/react-select": "^2.1.4",
19
+ "@radix-ui/react-separator": "^1.1.1",
20
+ "@radix-ui/react-slider": "^1.2.2",
21
+ "@radix-ui/react-slot": "^1.1.1",
22
+ "@radix-ui/react-switch": "^1.1.2",
23
+ "@radix-ui/react-tabs": "^1.1.2",
24
+ "@radix-ui/react-toast": "^1.2.4",
25
+ "@radix-ui/react-tooltip": "^1.1.6",
26
+ "class-variance-authority": "^0.7.1",
27
+ "clsx": "^2.1.1",
28
+ "lucide-react": "^0.469.0",
29
+ "mammoth": "^1.8.0",
30
+ "next": "15.1.6",
31
+ "next-intl": "^3.26.3",
32
+ "next-themes": "^0.4.4",
33
+ "pdf-parse": "^1.1.1",
34
+ "react": "^19.0.0",
35
+ "react-dom": "^19.0.0",
36
+ "react-markdown": "^9.0.1",
37
+ "rehype-highlight": "^7.0.1",
38
+ "remark-gfm": "^4.0.0",
39
+ "tailwind-merge": "^2.6.0",
40
+ "uuid": "^11.0.3",
41
+ "zod": "^3.24.1",
42
+ "zustand": "^5.0.3"
43
+ },
44
+ "devDependencies": {
45
+ "@tailwindcss/postcss": "^4.0.0",
46
+ "@types/node": "^22",
47
+ "@types/pdf-parse": "^1.1.4",
48
+ "@types/react": "^19",
49
+ "@types/react-dom": "^19",
50
+ "@types/uuid": "^10",
51
+ "eslint": "^9",
52
+ "eslint-config-next": "15.1.6",
53
+ "tailwindcss": "^4.0.0",
54
+ "typescript": "^5"
55
+ },
56
+ "engines": {
57
+ "node": ">=22.19.0"
58
+ }
59
+ }
@@ -0,0 +1,5 @@
1
+ export default {
2
+ plugins: {
3
+ "@tailwindcss/postcss": {},
4
+ },
5
+ };