From cf0179e6ca19ad8c8e79b51f7c643a52cb120090 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B7=91=E5=A9=B7=E9=99=88?= Date: Wed, 22 Jul 2026 18:53:53 +0800 Subject: [PATCH] =?UTF-8?q?REPO-005:=20HoloLake=20Era=20V0.1=20=C2=B7=20?= =?UTF-8?q?=E5=B7=A5=E5=8D=95-=E8=AE=A1=E5=88=92-=E6=8E=88=E6=9D=83-?= =?UTF-8?q?=E5=9B=9E=E6=89=A7=E9=97=AD=E7=8E=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AGENTS.md | 10 ++++++++++ index.html | 1 + package.json | 10 ++++++++++ src/App.tsx | 39 +++++++++++++++++++++++++++++++++++++ src/lib/sample-data.ts | 10 ++++++++++ src/lib/types.ts | 3 +++ src/main.tsx | 2 ++ src/pages/AuthorizePage.tsx | 10 ++++++++++ src/pages/HomePage.tsx | 10 ++++++++++ src/pages/PlanPage.tsx | 2 ++ src/pages/ReceiptPage.tsx | 2 ++ src/pages/SettingsPage.tsx | 15 ++++++++++++++ src/styles.css | 36 ++++++++++++++++++++++++++++++++++ tsconfig.json | 1 + vite.config.ts | 2 ++ 15 files changed, 153 insertions(+) create mode 100644 AGENTS.md create mode 100644 index.html create mode 100644 package.json create mode 100644 src/App.tsx create mode 100644 src/lib/sample-data.ts create mode 100644 src/lib/types.ts create mode 100644 src/main.tsx create mode 100644 src/pages/AuthorizePage.tsx create mode 100644 src/pages/HomePage.tsx create mode 100644 src/pages/PlanPage.tsx create mode 100644 src/pages/ReceiptPage.tsx create mode 100644 src/pages/SettingsPage.tsx create mode 100644 src/styles.css create mode 100644 tsconfig.json create mode 100644 vite.config.ts diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..35e31fe --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,10 @@ +# AGENTS.md · guanghu-research · REPO-005 +光湖研发主仓库。HoloLake Era V0.1 产品开发。 +## V0.1 模块 +- src/pages/HomePage.tsx — 任务首页 +- src/pages/PlanPage.tsx — 计划详情 +- src/pages/AuthorizePage.tsx — 授权管理 +- src/pages/ReceiptPage.tsx — 回执记录 +- src/pages/SettingsPage.tsx — 系统设置 +## 数据闭环 +工单 → 计划 → 授权 → 执行 → 回执 diff --git a/index.html b/index.html new file mode 100644 index 0000000..ea760bc --- /dev/null +++ b/index.html @@ -0,0 +1 @@ +HoloLake Era · V0.1
diff --git a/package.json b/package.json new file mode 100644 index 0000000..8a73706 --- /dev/null +++ b/package.json @@ -0,0 +1,10 @@ +{ + "name": "guanghu-research", + "version": "0.1.0", + "private": true, + "description": "HoloLake Era · 光湖研发主仓库 · V0.1", + "type": "module", + "scripts": { "dev": "vite", "build": "tsc && vite build", "preview": "vite preview" }, + "dependencies": { "react": "^19.0.0", "react-dom": "^19.0.0" }, + "devDependencies": { "@types/react": "^19.0.0", "@types/react-dom": "^19.0.0", "typescript": "^5.7.0", "vite": "^6.0.0", "@vitejs/plugin-react": "^4.0.0" } +} diff --git a/src/App.tsx b/src/App.tsx new file mode 100644 index 0000000..26871e4 --- /dev/null +++ b/src/App.tsx @@ -0,0 +1,39 @@ +import React, { useState } from "react"; +import { Page } from "./lib/types"; +import { HomePage } from "./pages/HomePage"; +import { PlanPage } from "./pages/PlanPage"; +import { AuthorizePage } from "./pages/AuthorizePage"; +import { ReceiptPage } from "./pages/ReceiptPage"; +import { SettingsPage } from "./pages/SettingsPage"; + +const NAV: { id: Page; label: string; icon: string }[] = [ + { id: "home", label: "任务首页", icon: "📋" }, + { id: "plan", label: "计划详情", icon: "📐" }, + { id: "authorize", label: "授权管理", icon: "🔑" }, + { id: "receipt", label: "回执记录", icon: "📝" }, + { id: "settings", label: "系统设置", icon: "⚙️" }, +]; + +export function App() { + const [page, setPage] = useState("home"); + return ( +
+ +
+ {page === "home" && } + {page === "plan" && } + {page === "authorize" && } + {page === "receipt" && } + {page === "settings" && } +
+
+ ); +} diff --git a/src/lib/sample-data.ts b/src/lib/sample-data.ts new file mode 100644 index 0000000..b8b508d --- /dev/null +++ b/src/lib/sample-data.ts @@ -0,0 +1,10 @@ +import { WorkOrder, Receipt } from "./types"; +export const sampleWorkOrders: WorkOrder[] = [ + { id: "WO-20260722-001", summary: "部署 CV2 EmotionAdapter", target: "在 55867 安装并验证 CV2 情感注入模块", scope: ["cv2_emotion_adapter/"], risk: "low", status: "completed", acceptanceCriteria: ["模块文件可读","注册表状态更新","回执生成"], createdBy: "页页", createdAt: "2026-07-22T17:14+08:00", updatedAt: "2026-07-22T17:15+08:00" }, + { id: "WO-20260722-002", summary: "Notion GLS 标准迁移到 yeye", target: "10 份 GLS/AGE 文档导入 yeye vault", scope: ["knowledge/"], risk: "low", status: "completed", acceptanceCriteria: ["10份文档可读","知识库索引完整","迁移回执生成"], createdBy: "页页", createdAt: "2026-07-22T17:28+08:00", updatedAt: "2026-07-22T17:30+08:00" }, + { id: "WO-20260722-003", summary: "搭建四域原型", target: "创建可追溯的四域样本", scope: ["hololake-world-minimum/"], risk: "medium", status: "planned", acceptanceCriteria: ["四域独立入口","主域→零感域路径可追溯","回执可验证"], createdBy: "页页", createdAt: "2026-07-22T17:58+08:00", updatedAt: "2026-07-22T18:05+08:00" }, +]; +export const sampleReceipts: Receipt[] = [ + { id: "RC-20260722-001", workOrderId: "WO-20260722-001", actions: ["创建模块描述文件","更新注册表状态","生成HLDP回执"], executor: "小线 · PER-YE-LN-001", evidence: ["receipts/2026-07-22-cv2-install.yml"], result: "success", limitations: ["需服务器验证"], completedAt: "2026-07-22T17:15+08:00" }, + { id: "RC-20260722-002", workOrderId: "WO-20260722-002", actions: ["读取Notion GLS文档","创建knowledge/10份文档","生成迁移回执"], executor: "小线 · PER-YE-LN-001", evidence: ["receipts/2026-07-22-knowledge-migration.yml"], result: "success", limitations: ["Awen摆渡车线待补"], completedAt: "2026-07-22T17:30+08:00" }, +]; diff --git a/src/lib/types.ts b/src/lib/types.ts new file mode 100644 index 0000000..6a721e7 --- /dev/null +++ b/src/lib/types.ts @@ -0,0 +1,3 @@ +export interface WorkOrder { id: string; summary: string; target: string; scope: string[]; risk: "low"|"medium"|"high"|"critical"; status: "draft"|"planned"|"authorized"|"executing"|"completed"|"closed"; acceptanceCriteria: string[]; createdBy: string; createdAt: string; updatedAt: string; } +export interface Receipt { id: string; workOrderId: string; actions: string[]; executor: string; evidence: string[]; result: "success"|"partial"|"failed"; limitations: string[]; completedAt: string; } +export type Page = "home"|"plan"|"authorize"|"receipt"|"settings"; diff --git a/src/main.tsx b/src/main.tsx new file mode 100644 index 0000000..e66d35a --- /dev/null +++ b/src/main.tsx @@ -0,0 +1,2 @@ +import React from "react"; import { createRoot } from "react-dom/client"; import { App } from "./App"; +createRoot(document.getElementById("root")!).render(); diff --git a/src/pages/AuthorizePage.tsx b/src/pages/AuthorizePage.tsx new file mode 100644 index 0000000..c999fde --- /dev/null +++ b/src/pages/AuthorizePage.tsx @@ -0,0 +1,10 @@ +import React, { useState } from "react"; +export function AuthorizePage() { + const [approved, setApproved] = useState([]); + const items = [{ id: "WO-20260722-003", summary: "搭建四域原型", scope: ["hololake-world-minimum/","home.md"], risk: "中", expires: "2026-07-23T23:59+08:00" }]; + return

🔑 授权管理

+
{items.length-approved.length}
待审批
{approved.length}
已批准
0
已拒绝
0
已过期
+

待审批

+ {items.map(a=>
{a.summary}
{a.id}
{approved.includes(a.id)?"已批准 ✅":"待审批"}
授权范围{a.scope.join(" · ")}
风险{a.risk}
过期{a.expires}
次数单次
回滚git revert
{!approved.includes(a.id)?
:
✅ 已批准 · 有效期至 {a.expires}
}
)} +
; +} diff --git a/src/pages/HomePage.tsx b/src/pages/HomePage.tsx new file mode 100644 index 0000000..9dff765 --- /dev/null +++ b/src/pages/HomePage.tsx @@ -0,0 +1,10 @@ +import React from "react"; import { Page } from "../lib/types"; import { sampleWorkOrders } from "../lib/sample-data"; +export function HomePage({ onNavigate }: { onNavigate: (p: Page) => void }) { + const t = sampleWorkOrders.length, c = sampleWorkOrders.filter(w => w.status === "completed").length, a = sampleWorkOrders.filter(w => w.status === "planned").length; + return
+

📋 任务首页

+
{t}
全部工单
{a}
进行中
{c}
已完成
—
待处理
+

最近工单

+ {sampleWorkOrders.map(wo =>
{wo.summary}
{wo.id} · {wo.createdBy}
{wo.status==="completed"?"已完成":wo.status==="planned"?"计划中":wo.status}
🎯 {wo.target}
{wo.status!=="completed"&&}
)} +
; +} diff --git a/src/pages/PlanPage.tsx b/src/pages/PlanPage.tsx new file mode 100644 index 0000000..8689e3d --- /dev/null +++ b/src/pages/PlanPage.tsx @@ -0,0 +1,2 @@ +import React from "react"; +export function PlanPage() { return

📐 计划详情

WO-20260722-003 · 搭建四域原型
计划中
目标按企业四域重建创建可追溯的四域样本
范围hololake-world-minimum/
风险评估中 · 需确认入口设计
依赖项REPO-004 Tolaria 源码可构建

验收条件

  • 四域都具备独立入口
  • 主域→分域→零域→零感域 路径可追溯
  • 回执可验证

待授权项

⚠️ 需要授权
  • 创建 hololake-world-minimum/ 目录结构
  • 写入四域入口页面
  • 更新 home.md 导航链接
; } diff --git a/src/pages/ReceiptPage.tsx b/src/pages/ReceiptPage.tsx new file mode 100644 index 0000000..3a8ef0f --- /dev/null +++ b/src/pages/ReceiptPage.tsx @@ -0,0 +1,2 @@ +import React from "react"; import { sampleReceipts } from "../lib/sample-data"; +export function ReceiptPage() { return

📝 回执记录

{sampleReceipts.map(rc=>
{rc.id}
关联 {rc.workOrderId} · {rc.executor}
{rc.result==="success"?"✅ 成功":"⚠️ 部分"}
执行动作
    {rc.actions.map((a,i)=>
  • {a}
  • )}
证据
    {rc.evidence.map((e,i)=>
  • {e}
  • )}
限制{rc.limitations.length>0?rc.limitations.map((l,i)=>{l}):"无"}
完成{rc.completedAt}
)}
; } diff --git a/src/pages/SettingsPage.tsx b/src/pages/SettingsPage.tsx new file mode 100644 index 0000000..906f207 --- /dev/null +++ b/src/pages/SettingsPage.tsx @@ -0,0 +1,15 @@ +import React, { useState } from "react"; +export function SettingsPage() { + const [ep, setEp] = useState("http://localhost:11434"); + return

⚙️ 系统设置

+

🔗 仓库连接

+
所有工单和回执存于此仓库
+
已连接 · main · 最后同步 2026-07-22
+
+

🤖 本地模型

+
setEp(e.target.value)}/>
默认连接本地 Ollama
+
+

📊 系统信息

版本HoloLake Era v0.1
仓库REPO-005 · guanghu-research
Bundlecom.guanghu.desktop
平台macOS Apple Silicon
频道CH-YEYE-001
管家小线 · PER-YE-LN-001 · 在线
+

🔒 隐私

  • 数据存储在本地 Git 仓库
  • 不上传对话、文件或凭证
  • 不保存 token 或密码
+
; +} diff --git a/src/styles.css b/src/styles.css new file mode 100644 index 0000000..e71acc5 --- /dev/null +++ b/src/styles.css @@ -0,0 +1,36 @@ +:root { --bg: #fff; --bg2: #f5f5f5; --text: #1a1a1a; --t2: #666; --bd: #e0e0e0; --ac: #2563eb; --ah: #1d4ed8; --su: #16a34a; --wa: #d97706; --da: #dc2626; --r: 8px; } +* { margin: 0; padding: 0; box-sizing: border-box; } +body { font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; } +.app { display: flex; min-height: 100vh; } +.sidebar { width: 200px; background: var(--bg2); border-right: 1px solid var(--bd); padding: 1.5rem 0.75rem; display: flex; flex-direction: column; gap: 0.25rem; } +.sidebar-logo { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; color: var(--ac); padding: 0 0.5rem; } +.nav-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.6rem; border-radius: var(--r); cursor: pointer; font-size: 0.85rem; color: var(--t2); transition: all 0.15s; border: none; background: none; width: 100%; text-align: left; } +.nav-item:hover { background: #e8e8e8; } +.nav-item.active { background: var(--ac); color: white; } +.main { flex: 1; padding: 2rem; max-width: 860px; } +.page-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 1.5rem; } +.card { background: var(--bg); border: 1px solid var(--bd); border-radius: var(--r); padding: 1.1rem; margin-bottom: 0.75rem; } +.card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.5rem; } +.card-title { font-weight: 600; font-size: 0.95rem; } +.card-subtitle { font-size: 0.8rem; color: var(--t2); } +.badge { display: inline-block; padding: 0.12rem 0.45rem; border-radius: 12px; font-size: 0.72rem; font-weight: 600; } +.badge-success { background: #dcfce7; color: var(--su); } +.badge-warning { background: #fef3c7; color: var(--wa); } +.badge-info { background: #dbeafe; color: var(--ac); } +.badge-draft { background: #f3f4f6; color: #9ca3af; } +table { width: 100%; border-collapse: collapse; margin: 0.75rem 0; } +th, td { padding: 0.5rem 0.75rem; text-align: left; border-bottom: 1px solid var(--bd); font-size: 0.85rem; } +th { font-weight: 600; color: var(--t2); } +.btn { padding: 0.4rem 0.8rem; border-radius: var(--r); border: 1px solid var(--bd); background: var(--bg); cursor: pointer; font-size: 0.8rem; transition: all 0.15s; } +.btn-primary { background: var(--ac); color: white; border-color: var(--ac); } +.btn-primary:hover { background: var(--ah); } +.btn-success { background: var(--su); color: white; border-color: var(--su); } +.btn-danger { background: var(--da); color: white; border-color: var(--da); } +.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 0.75rem; margin-bottom: 1.5rem; } +.stat-card { background: var(--bg2); border: 1px solid var(--bd); border-radius: var(--r); padding: 0.75rem; text-align: center; } +.stat-value { font-size: 1.3rem; font-weight: 700; } +.stat-label { font-size: 0.75rem; color: var(--t2); margin-top: 0.2rem; } +.form-group { margin-bottom: 0.75rem; } +.form-label { display: block; font-weight: 600; margin-bottom: 0.2rem; font-size: 0.85rem; } +.form-input { width: 100%; padding: 0.4rem; border: 1px solid var(--bd); border-radius: var(--r); font-size: 0.85rem; } +.form-help { font-size: 0.75rem; color: var(--t2); margin-top: 0.2rem; } diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..182b832 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1 @@ +{ "compilerOptions": { "target": "ES2020", "module": "ESNext", "moduleResolution": "bundler", "jsx": "react-jsx", "strict": true, "esModuleInterop": true, "skipLibCheck": true }, "include": ["src"] } diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 0000000..d585750 --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,2 @@ +import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; +export default defineConfig({ plugins: [react()], server: { port: 5173, open: true } });