From 0552d59f0fbb29350235a8066ea1a71bcbb3aa7f Mon Sep 17 00:00:00 2001 From: weichen Date: Wed, 30 Sep 2026 05:38:41 +0000 Subject: [PATCH 1/4] Record the task card for feature-ui-foundation-r0 --- .task/feature-ui-foundation-r0.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .task/feature-ui-foundation-r0.md diff --git a/.task/feature-ui-foundation-r0.md b/.task/feature-ui-foundation-r0.md new file mode 100644 index 00000000..eb46c9b5 --- /dev/null +++ b/.task/feature-ui-foundation-r0.md @@ -0,0 +1,25 @@ +# feature/ui-foundation-r0 任务卡 + +任务主记录:;状态:进行中;owner:weichen + +## 基线与授权 + +- 权威仓:ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Dev.git;目标分支:main;R0(initial_base_sha)= f20c634fea9e4316db664b4da7b4a6c772dd855e +- 工作区:/home/weichen/projects/Agent-System-Dev-wt-feature-ui-foundation-r0(worktree);分支:feature/ui-foundation-r0 +- 授权与交付终点:<本次允许的动作与终点;未授权事项写明> + +## 目标与非目标 + +<预期结果、受影响入口/模块/契约;明确不做什么。> + +## 同步记录 + +| 节点 | sync_base_sha | tested_head_sha | checked_at | +|---|---|---|---| +| 启动 | f20c634fea9e4316db664b4da7b4a6c772dd855e | f20c634fea9e4316db664b4da7b4a6c772dd855e | 2026-09-30T05:38:41Z | + +## 结果与验证(完成后填写) + +- 结果: +- 验证: +- 影响与剩余项: -- 2.54.0 From 15f0da63742d68036accdf9a6a5fffd445eb63a3 Mon Sep 17 00:00:00 2001 From: weichen Date: Wed, 30 Sep 2026 05:56:08 +0000 Subject: [PATCH 2/4] Wire Agent-System-UI and Agent-Command into the Dev combo Why: Foundation task T0 of the UI/interaction base (proposal 2026-09-30, D25-D33): add the new UI component library and command-bus ecosystem repos, extend build/test/pin orchestration to twelve submodules. Evidence: make test green on the pinned combo (core + backend 13 pkgs + frontend 9 + ui 6 tests); make build produces bin/agent-system with combo version string including ui; make contracts now generates to frontend and ui with submodules staying clean; renderer/tokens migration verified CSS-rule-identical (zero behavior change). Impact: New modules/ui and deps/agent-command gitlinks; frontend consumes ui via source alias; backend vendors agent-command (replace only, no import yet); follows provider-first merges (ui PR#1/#2, agent-command PR#1, documents PR#8, frontend PR#2, backend PR#6). Refs: modules/documents docs/proposals/2026-09-30-ui-inbox-command-workspace.md --- .gitmodules | 6 ++++++ Makefile | 21 +++++++++++++++------ PROJECT.md | 2 +- README.md | 6 ++++-- deps/agent-command | 1 + modules/backend | 2 +- modules/documents | 2 +- modules/frontend | 2 +- modules/ui | 1 + 9 files changed, 31 insertions(+), 12 deletions(-) create mode 160000 deps/agent-command create mode 160000 modules/ui diff --git a/.gitmodules b/.gitmodules index c5e1af80..f1c67664 100644 --- a/.gitmodules +++ b/.gitmodules @@ -28,3 +28,9 @@ [submodule "deps/logging-system"] path = deps/logging-system url = ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Logging-System.git +[submodule "modules/ui"] + path = modules/ui + url = ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-UI.git +[submodule "deps/agent-command"] + path = deps/agent-command + url = ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-Command.git diff --git a/Makefile b/Makefile index 91300e7e..da54fac9 100644 --- a/Makefile +++ b/Makefile @@ -5,14 +5,15 @@ SHELL := /bin/bash CORE := modules/core BACKEND := modules/backend FRONTEND := modules/frontend +UI := modules/ui BIN := bin/agent-system EMBED_DIR := $(BACKEND)/web/dist PLUGINS := plugins # 版本溯源(release-operations:运行制品须可对上固定组合)。无 tag 时 --always 给短 SHA。 -COMBO := core=$(shell git -C $(CORE) rev-parse --short HEAD 2>/dev/null)+backend=$(shell git -C $(BACKEND) rev-parse --short HEAD 2>/dev/null)+frontend=$(shell git -C $(FRONTEND) rev-parse --short HEAD 2>/dev/null)+documents=$(shell git -C modules/documents rev-parse --short HEAD 2>/dev/null) +COMBO := core=$(shell git -C $(CORE) rev-parse --short HEAD 2>/dev/null)+backend=$(shell git -C $(BACKEND) rev-parse --short HEAD 2>/dev/null)+frontend=$(shell git -C $(FRONTEND) rev-parse --short HEAD 2>/dev/null)+ui=$(shell git -C $(UI) rev-parse --short HEAD 2>/dev/null)+documents=$(shell git -C modules/documents rev-parse --short HEAD 2>/dev/null) VERSION := $(shell git describe --tags --always --dirty 2>/dev/null)+$(COMBO) -.PHONY: help sync status build frontend test test-backend test-frontend test-core dev pin clean setup precheck task-start task-sync task-finish version +.PHONY: help sync status build frontend test test-backend test-frontend test-ui test-core dev pin clean setup precheck task-start task-sync task-finish version version: @echo "agent-system $(VERSION)" @@ -51,13 +52,17 @@ sync: status: @git submodule status -# 契约同步:Core 的 TS 类型镜像到前端(Core 为权威,单一来源)。 +# 契约同步:Core 的 TS 类型镜像到前端与 UI 组件库(Core 为权威,单一来源)。 contracts: cp $(CORE)/ts/types.ts $(FRONTEND)/src/contracts.ts.tmp { echo "// 从 Agent-System-Core ts/types.ts 同步(make contracts 生成;Core 为权威)。"; cat $(FRONTEND)/src/contracts.ts.tmp; } > $(FRONTEND)/src/contracts.ts rm $(FRONTEND)/src/contracts.ts.tmp + cp $(CORE)/ts/types.ts $(UI)/src/contracts.ts.tmp + { echo "// 从 Agent-System-Core ts/types.ts 同步(make contracts 生成;Core 为权威)。"; cat $(UI)/src/contracts.ts.tmp; } > $(UI)/src/contracts.ts + rm $(UI)/src/contracts.ts.tmp frontend: contracts + cd $(UI) && npm ci --no-fund --no-audit cd $(FRONTEND) && npm ci --no-fund --no-audit && npm run build rm -rf $(EMBED_DIR) && mkdir -p $(EMBED_DIR) && cp -r $(FRONTEND)/dist/* $(EMBED_DIR)/ && touch $(EMBED_DIR)/.gitkeep @@ -74,7 +79,10 @@ test-backend: test-frontend: contracts cd $(FRONTEND) && npm ci --no-fund --no-audit && npx vitest run -test: test-core test-backend test-frontend +test-ui: contracts + cd $(UI) && npm ci --no-fund --no-audit && npx tsc --noEmit && npx vitest run + +test: test-core test-backend test-frontend test-ui # 运行演示(mock 模式):单二进制 + 示例插件 + 嵌入式存储,浏览器 http://127.0.0.1:8787 demo: build @@ -89,11 +97,12 @@ dev: # 推进指针(多仓纪律:先验证后固定)。 pin: - @for m in modules/core modules/backend modules/frontend modules/documents deps/agent-native deps/agent-squad deps/agent-intent deps/error-code-system deps/logging-system deps/development-guidelines; do \ + @for m in modules/core modules/backend modules/frontend modules/ui modules/documents deps/agent-native deps/agent-squad deps/agent-intent deps/error-code-system deps/logging-system deps/development-guidelines deps/agent-command; do \ (git -C $$m fetch -q origin && git -C $$m checkout -q origin/main) || echo "skip $$m"; \ done @cd $(BACKEND)/deps/agent-system-core && git fetch -q origin && git checkout -q origin/main || true + @cd $(BACKEND)/deps/agent-command && git fetch -q origin && git checkout -q origin/main || true @echo "submodule 指针已推进;请 make test 后 git add .gitmodules modules deps && git commit" clean: - rm -rf $(BIN) $(FRONTEND)/dist $(FRONTEND)/node_modules data + rm -rf $(BIN) $(FRONTEND)/dist $(FRONTEND)/node_modules $(UI)/node_modules data diff --git a/PROJECT.md b/PROJECT.md index 2695a122..7d6313fd 100644 --- a/PROJECT.md +++ b/PROJECT.md @@ -1,6 +1,6 @@ # Agent-System-Dev 项目事实 - 用途:开发集成父仓(gitlink 权威);非分发单元。 -- 组合:modules/{core,backend,frontend,documents} + deps/{development-guidelines,agent-native,agent-squad,agent-intent,error-code-system,logging-system}。 +- 组合:modules/{core,backend,frontend,ui,documents} + deps/{development-guidelines,agent-native,agent-squad,agent-intent,agent-command,error-code-system,logging-system}。 - 验证:make test(core+backend+frontend 全量);make build 产出 bin/agent-system。 - 部署:非容器;Releases 仓从本仓固定提交导出版本。 diff --git a/README.md b/README.md index 018558b2..c8467423 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,11 @@ modules/core Agent-System-Core 核心契约(领域模型/事件 modules/backend Agent-System-Backend 后端单二进制(内嵌前端与嵌入式 SQLite) modules/frontend Agent-System-Frontend 前端(React 19 + Vite + TS) modules/documents Agent-System-Documents 系统文档与过程记录 +modules/ui Agent-System-UI UI 组件库(词汇渲染器/设计令牌/收件箱卡片工作区组件) deps/development-guidelines 开发规范(gitlink 固定版本) -deps/agent-native deps/agent-squad deps/agent-intent 生态执行/编排/意图 -deps/error-code-system deps/logging-system 基础设施 +deps/agent-native deps/agent-squad deps/agent-intent 生态执行/编排/意图 +deps/agent-command Agent-Command 命令总线基础库(spec/注册表/危险分级/审计信封) +deps/error-code-system deps/logging-system 基础设施 plugins/ 示例插件与插件开发参考(P4 起填充) ``` diff --git a/deps/agent-command b/deps/agent-command new file mode 160000 index 00000000..50f99d98 --- /dev/null +++ b/deps/agent-command @@ -0,0 +1 @@ +Subproject commit 50f99d989c0338c6f454f71ae1cc19a634913ed4 diff --git a/modules/backend b/modules/backend index 1e621887..a72c45f6 160000 --- a/modules/backend +++ b/modules/backend @@ -1 +1 @@ -Subproject commit 1e621887097b3ac9524d7a272f03671b15f65d1e +Subproject commit a72c45f68aefbd55d0560184be89cca185cf3cdd diff --git a/modules/documents b/modules/documents index 8bc875e7..023daeff 160000 --- a/modules/documents +++ b/modules/documents @@ -1 +1 @@ -Subproject commit 8bc875e7abf67dacba4629d84c30a54ccd120252 +Subproject commit 023daeffaa48aa50175a6242a9b592bac603f349 diff --git a/modules/frontend b/modules/frontend index 0eba7787..ab387387 160000 --- a/modules/frontend +++ b/modules/frontend @@ -1 +1 @@ -Subproject commit 0eba778757862dd6cea9f3310a1989c7901ade54 +Subproject commit ab38738747d558592ce4570d33325e645e9d3165 diff --git a/modules/ui b/modules/ui new file mode 160000 index 00000000..77c4bacc --- /dev/null +++ b/modules/ui @@ -0,0 +1 @@ +Subproject commit 77c4baccce7bb57e872393c88b8e838b6079c692 -- 2.54.0 From c9e8e29e662ce9f015c055277b37c38e674211be Mon Sep 17 00:00:00 2001 From: weichen Date: Wed, 30 Sep 2026 05:56:09 +0000 Subject: [PATCH 3/4] Record the sync checkpoint --- .task/delivery-mechanism.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.task/delivery-mechanism.md b/.task/delivery-mechanism.md index 7aa3bbc1..1e3edf07 100644 --- a/.task/delivery-mechanism.md +++ b/.task/delivery-mechanism.md @@ -32,3 +32,4 @@ | 同步前验收 | 05a5ae1e1ac8ef8d341170c236e9b38570e48947 | 8252363c040c30f05b799b01928b08c78288581e | 2026-09-30T04:06:02Z | | 同步前验收 | dca932c6da3aea34af722f2a6772e621cf6143f5 | 6acda49e04eafc08fc12a9654d96b2512799cffa | 2026-09-30T04:20:54Z | | 同步前验收 | a58f85e0d0ade6e8b4da3afe9985985a38bae47a | 3e1cdbda1e7c7f218743132908dfdd2b39c71afc | 2026-09-30T04:44:49Z | +| 同步前验收 | f20c634fea9e4316db664b4da7b4a6c772dd855e | 15f0da63742d68036accdf9a6a5fffd445eb63a3 | 2026-09-30T05:56:09Z | -- 2.54.0 From cc9d8ec66d2597f47b6c7bafc7a607957c2de188 Mon Sep 17 00:00:00 2001 From: weichen Date: Wed, 30 Sep 2026 05:57:14 +0000 Subject: [PATCH 4/4] Record verification evidence in the task card Why: The delivery gate requires the task card to carry the acceptance evidence (PASS results for make test / make build / zero-behavior CSS check) and the PR link before requesting review. Evidence: tested_head c9e8e29; gitlink combo recorded; provider PR list referenced for the cross-repo five-step trail. Impact: Documentation only; PR #14 updated by push. Refs: modules/documents docs/proposals/2026-09-30-ui-inbox-command-workspace.md --- .task/feature-ui-foundation-r0.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.task/feature-ui-foundation-r0.md b/.task/feature-ui-foundation-r0.md index eb46c9b5..636575ec 100644 --- a/.task/feature-ui-foundation-r0.md +++ b/.task/feature-ui-foundation-r0.md @@ -1,25 +1,31 @@ # feature/ui-foundation-r0 任务卡 -任务主记录:;状态:进行中;owner:weichen +任务主记录:Dev PR #14 https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/14;状态:待合入(合入权在仓库所有者);owner:weichen ## 基线与授权 - 权威仓:ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Dev.git;目标分支:main;R0(initial_base_sha)= f20c634fea9e4316db664b4da7b4a6c772dd855e - 工作区:/home/weichen/projects/Agent-System-Dev-wt-feature-ui-foundation-r0(worktree);分支:feature/ui-foundation-r0 -- 授权与交付终点:<本次允许的动作与终点;未授权事项写明> +- 授权与交付终点:按已批准提案(documents 仓 docs/proposals/2026-09-30-ui-inbox-command-workspace.md)执行 T0:建 Agent-System-UI / Agent-Command 两仓(Gitea API,auto_init + main 保护)、骨架与迁移经 PR 合入、Dev 组合接线与编排扩展;交付终点 = Dev 组合 PR 创建并待所有者合入。未授权事项:改写历史、解除/变更既有分支保护、合入 Dev 组合 PR(由所有者执行)。 ## 目标与非目标 -<预期结果、受影响入口/模块/契约;明确不做什么。> +- 目标:两新仓建立并接进 Dev 组合(modules/ui、deps/agent-command);UIRenderer + 设计令牌 + 组件样式迁入 ui 仓(零行为变化);Makefile(contracts 双份 / test-ui / pin 12 子模块 / COMBO 含 ui);README/PROJECT 组合清单更新。 +- 非目标:Core 契约扩展与卡片/命令/工作区功能(T1–T4);backend 对 agent-command 的代码消费(仅 replace 接线,T1 起消费);移除右栏经典 tabs(T4)。 ## 同步记录 | 节点 | sync_base_sha | tested_head_sha | checked_at | |---|---|---|---| | 启动 | f20c634fea9e4316db664b4da7b4a6c772dd855e | f20c634fea9e4316db664b4da7b4a6c772dd855e | 2026-09-30T05:38:41Z | +| 合入前验收 | f20c634fea9e4316db664b4da7b4a6c772dd855e | 15f0da6374f7ad0f53d0988080208ee1e46ff032 | 2026-09-30T05:56:09Z | ## 结果与验证(完成后填写) -- 结果: -- 验证: -- 影响与剩余项: +- 结果:完成。两新仓上线(各 2 个 PR 合入 main:agent-command #1 骨架、ui #1 骨架 + #2 渲染器/令牌迁移);documents 提案 PR#8、frontend @ui 改造 PR#2、backend 接线 PR#6 均合入;Dev 组合 PR #14 待合入(gitlink:core=4ee1979 backend=a72c45f frontend=ab38738 ui=77c4bac documents=023daef agent-command=50f99d9)。 +- 验证(tested_head=c9e8e29,即 PR #14 head): + - PASS `make test`:core go test ok;backend 13 包 ok;frontend vitest 9/9;ui tsc --noEmit 干净 + vitest 6/6。 + - PASS `make build`:bin/agent-system(版本串 c9e8e29+core=4ee1979+backend=a72c45f+frontend=ab38738+ui=77c4bac+documents=023daef)。 + - PASS 零行为变化核查:新 tokens.css+ui.css+styles.css 按 import 顺序与迁移前 styles.css 规则逐字一致(仅注释与无碰撞的块位移);UIRenderer 原 store 直连改为 DocBridge 注入,两个调用点行为等价。 + - PASS contracts 双份生成后 ui/frontend 子模块均无脏 diff。 +- 影响与剩余项:组合从 10 子模块扩至 12;frontend 构建新增对 modules/ui 的依赖(Makefile 已编排 npm ci);已知权衡:ui 源码组合下 vite 以 dedupe 保证 react/marked 单副本。剩余:T1 Core 契约扩展 + Agent-Command v0(新任务)。 -- 2.54.0