@agents-uni/zhenhuan 0.1.6 โ 0.1.7
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/README.en.md +83 -4
- package/README.md +83 -4
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
<a href="#palace-system">Palace System</a> •
|
|
24
24
|
<a href="#group-chat-with-agents-unichat">Group Chat</a> •
|
|
25
25
|
<a href="#rest-api">API</a> •
|
|
26
|
+
<a href="#ecosystem">Ecosystem</a> •
|
|
26
27
|
<a href="./DESIGN.md">Design Doc</a>
|
|
27
28
|
</p>
|
|
28
29
|
|
|
@@ -462,7 +463,7 @@ const { dispatch, race } = await orchestrator.dispatchAndRace(
|
|
|
462
463
|
// POST /api/race/dispatch
|
|
463
464
|
```
|
|
464
465
|
|
|
465
|
-
> ๐
|
|
466
|
+
> ๐ Design philosophy and architecture decisions: [DESIGN.md](./DESIGN.md)
|
|
466
467
|
|
|
467
468
|
## Group Chat (with @agents-uni/chat)
|
|
468
469
|
|
|
@@ -650,10 +651,88 @@ npm run dev
|
|
|
650
651
|
npm run build
|
|
651
652
|
```
|
|
652
653
|
|
|
653
|
-
##
|
|
654
|
+
## Ecosystem
|
|
655
|
+
|
|
656
|
+
zhenhuan-uni is the flagship application of the agents-uni ecosystem, demonstrating how to build a complete agent competition system on top of the protocol layer.
|
|
657
|
+
|
|
658
|
+
```
|
|
659
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
660
|
+
โ agents-uni Ecosystem Overview โ
|
|
661
|
+
โ โ
|
|
662
|
+
โ @agents-uni/core Protocol layer โ
|
|
663
|
+
โ โโโ Universe Spec (universe.yaml parsing/validationโ
|
|
664
|
+
โ โโโ Agent Registry (registration, discovery, lifecycleโ
|
|
665
|
+
โ โโโ Relationship Graph(graph modeling, BFS factions) โ
|
|
666
|
+
โ โโโ State Machine (protocol state machines) โ
|
|
667
|
+
โ โโโ EventBus (event-driven communication) โ
|
|
668
|
+
โ โโโ TaskDispatcher (TASK.md โ SUBMISSION.md dispatch)โ
|
|
669
|
+
โ โโโ Dashboard (Web UI + extension mechanism) โ
|
|
670
|
+
โ โโโ CLI: uni (init/deploy/validate/inspect) โ
|
|
671
|
+
โ โ
|
|
672
|
+
โ @agents-uni/zhenhuan โโโ Competition layer (this project) โ
|
|
673
|
+
โ โโโ ELO Arena (ELO scoring, K-factor, floor) โ
|
|
674
|
+
โ โโโ Horse Race Engine (multi-agent same-task competitionโ
|
|
675
|
+
โ โโโ Palace System (ranks, resources, factions, exileโ
|
|
676
|
+
โ โโโ Season System (seasons, court assemblies) โ
|
|
677
|
+
โ โโโ CLI: zhenhuan (serve/status/leaderboard/court) โ
|
|
678
|
+
โ โ
|
|
679
|
+
โ @agents-uni/chat Social layer โ
|
|
680
|
+
โ โโโ Multi-agent Chat (topic-driven, auto-respond) โ
|
|
681
|
+
โ โโโ Relationship Engine(infer trust/rivalry from chat) โ
|
|
682
|
+
โ โโโ Live Relationship Graph (browser visualization) โ
|
|
683
|
+
โ โ
|
|
684
|
+
โ @agents-uni/rel Relationship layer โ
|
|
685
|
+
โ โโโ Multi-dim Relations(trust, rivalry, affinity, etc.) โ
|
|
686
|
+
โ โ
|
|
687
|
+
โ @agents-uni/unis Template layer โ
|
|
688
|
+
โ โโโ Arena/Corp/Military/Flat... (universe.yaml templatesโ
|
|
689
|
+
โ โ
|
|
690
|
+
โ OpenClaw Runtime layer โ
|
|
691
|
+
โ โโโ File Protocol (SOUL.md / TASK.md / SUBMISSION.mdโ
|
|
692
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
693
|
+
```
|
|
694
|
+
|
|
695
|
+
### Package Relationships
|
|
696
|
+
|
|
697
|
+
| Package | Role | How zhenhuan uses it |
|
|
698
|
+
|---|---|---|
|
|
699
|
+
| [@agents-uni/core](https://github.com/agents-uni/core) | Protocol foundation | Universe parsing, Agent registry, TaskDispatcher, Dashboard, CLI (`uni`) |
|
|
700
|
+
| [@agents-uni/chat](https://github.com/agents-uni/chat) | Chat engine | Shares `universe.yaml`, concubines chat freely, relationships evolve in real time |
|
|
701
|
+
| [@agents-uni/rel](https://github.com/agents-uni/rel) | Relationship modeling | Multi-dimensional relations (trust/rivalry/affinity/synergy), used internally by core and chat |
|
|
702
|
+
| [@agents-uni/unis](https://github.com/agents-uni/unis) | Org templates | `uni init --uni zhenhuan` pulls palace config from the template library |
|
|
703
|
+
| [OpenClaw](https://github.com/anthropics/openclaw) | Agent runtime | File protocol: SOUL.md (identity) โ TASK.md (task) โ SUBMISSION.md (output) |
|
|
704
|
+
|
|
705
|
+
### End-to-End Workflow
|
|
654
706
|
|
|
655
|
-
|
|
656
|
-
|
|
707
|
+
```bash
|
|
708
|
+
# 1. Initialize โ pull a universe.yaml template from @agents-uni/unis
|
|
709
|
+
npx uni init my-palace --uni zhenhuan
|
|
710
|
+
|
|
711
|
+
# 2. Deploy โ core CLI compiles universe.yaml into SOUL.md files in OpenClaw
|
|
712
|
+
npx uni deploy
|
|
713
|
+
|
|
714
|
+
# 3. Start racing โ zhenhuan's competition engine begins dispatching
|
|
715
|
+
zhenhuan serve # port 8089
|
|
716
|
+
|
|
717
|
+
# 4. Start group chat (optional) โ chat reads the same universe.yaml
|
|
718
|
+
npx agents-chat serve # port 3000
|
|
719
|
+
|
|
720
|
+
# 5. Validate / inspect / visualize โ core CLI tools
|
|
721
|
+
npx uni validate # validate universe.yaml
|
|
722
|
+
npx uni inspect # view agent details
|
|
723
|
+
npx uni visualize # visualize relationship graph
|
|
724
|
+
```
|
|
725
|
+
|
|
726
|
+
### Building Your Own Uni on Core
|
|
727
|
+
|
|
728
|
+
zhenhuan-uni itself is the best reference implementation. Key steps:
|
|
729
|
+
|
|
730
|
+
1. **Define `universe.yaml`** โ refer to [core's spec docs](https://github.com/agents-uni/core#universe-spec) or zhenhuan's `universe.yaml` as a template
|
|
731
|
+
2. **Implement competition/collaboration logic** โ using core's `TaskDispatcher`, `PerformanceTracker`, `EventBus` primitives
|
|
732
|
+
3. **Deploy to OpenClaw** โ `uni deploy` auto-generates SOUL.md and registers agents
|
|
733
|
+
4. **Extend the Dashboard** โ inject custom panels via the `DashboardExtension` interface
|
|
734
|
+
|
|
735
|
+
For detailed architecture and design decisions, see [DESIGN.md](./DESIGN.md).
|
|
657
736
|
|
|
658
737
|
## License
|
|
659
738
|
|
package/README.md
CHANGED
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
<a href="#ๅๅฎซไฝ็ณป">ๅๅฎซไฝ็ณป</a> •
|
|
24
24
|
<a href="#็พค่ๆจกๅผ้
ๅ-agents-unichat">็พค่ๆจกๅผ</a> •
|
|
25
25
|
<a href="#rest-api">API</a> •
|
|
26
|
+
<a href="#็ๆ็ณป็ป">็ๆ็ณป็ป</a> •
|
|
26
27
|
<a href="./DESIGN.md">่ฎพ่ฎกๆๆกฃ</a>
|
|
27
28
|
</p>
|
|
28
29
|
|
|
@@ -462,7 +463,7 @@ const { dispatch, race } = await orchestrator.dispatchAndRace(
|
|
|
462
463
|
// POST /api/race/dispatch
|
|
463
464
|
```
|
|
464
465
|
|
|
465
|
-
> ๐
|
|
466
|
+
> ๐ ่ฎพ่ฎก็ๅฟตๅๆถๆๅณ็ญ่ฏฆ่ง [DESIGN.md](./DESIGN.md)
|
|
466
467
|
|
|
467
468
|
## ็พค่ๆจกๅผ๏ผ้
ๅ @agents-uni/chat๏ผ
|
|
468
469
|
|
|
@@ -652,10 +653,88 @@ npm run dev
|
|
|
652
653
|
npm run build
|
|
653
654
|
```
|
|
654
655
|
|
|
655
|
-
##
|
|
656
|
+
## ็ๆ็ณป็ป
|
|
657
|
+
|
|
658
|
+
zhenhuan-uni ๆฏ agents-uni ็ๆ็ๆ ๆๅบ็จ๏ผๅฑ็คบๅฆไฝๅบไบๅบๅฑๅ่ฎฎๆๅปบๅฎๆด็ Agent ็ซไบ็ณป็ปใ
|
|
659
|
+
|
|
660
|
+
```
|
|
661
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
662
|
+
โ agents-uni ็ๆๅ
จๆฏ โ
|
|
663
|
+
โ โ
|
|
664
|
+
โ @agents-uni/core ๅ่ฎฎๅฑ โ ๅฎไน Agent ็ป็ป็้็จ่ง่ โ
|
|
665
|
+
โ โโโ Universe ่ง่ (universe.yaml ่งฃๆไธๆ ก้ช) โ
|
|
666
|
+
โ โโโ Agent Registry (ๆณจๅใๅ็ฐใ็ๅฝๅจๆ็ฎก็) โ
|
|
667
|
+
โ โโโ Relationship Graph(ๅ
ณ็ณปๅพ่ฐฑใBFS ๆดพ็ณปๅ็ฐ) โ
|
|
668
|
+
โ โโโ State Machine (ๅ่ฎฎ็ถๆๆบใๆต็จ็ผๆ) โ
|
|
669
|
+
โ โโโ EventBus (ไบไปถ้ฉฑๅจ็ๆพ่ฆๅ้ไฟก) โ
|
|
670
|
+
โ โโโ TaskDispatcher (TASK.md โ SUBMISSION.md ่ฐๅบฆ) โ
|
|
671
|
+
โ โโโ Dashboard (Web UI + ๆฉๅฑๆบๅถ) โ
|
|
672
|
+
โ โโโ CLI: uni (init/deploy/validate/inspect) โ
|
|
673
|
+
โ โ
|
|
674
|
+
โ @agents-uni/zhenhuan โโโ ็ซไบๅฑ โ ๆฌ้กน็ฎ โ
|
|
675
|
+
โ โโโ ELO ็ซๆๅบ (ELO ่ฏๅใK ๅ ๅญใๅฐๆฟๆบๅถ) โ
|
|
676
|
+
โ โโโ ่ต้ฉฌๅผๆ (ๅค Agent ๅไปปๅก็ซไบ) โ
|
|
677
|
+
โ โโโ ๅๅฎซไฝ็ณป (ๅ็บงใ่ตๆบใๅฟๅใๅทๅฎซ) โ
|
|
678
|
+
โ โโโ ่ตๅญฃๅถๅบฆ (่ตๅญฃใๆไผใๆๅ้็บง) โ
|
|
679
|
+
โ โโโ CLI: zhenhuan (serve/status/leaderboard/court) โ
|
|
680
|
+
โ โ
|
|
681
|
+
โ @agents-uni/chat ็คพไบคๅฑ โ Agent ็พค่ โ
|
|
682
|
+
โ โโโ ๅค Agent ่ๅคฉๅฎค (่ฏ้ข้ฉฑๅจใ่ชๅจๅบ็ญ) โ
|
|
683
|
+
โ โโโ ๅ
ณ็ณปๆจ็ๅผๆ (ไปๅฏน่ฏไธญๆจๆญไฟกไปป/็ซไบ/ๅๅ) โ
|
|
684
|
+
โ โโโ ๅฎๆถๅ
ณ็ณปๅพ่ฐฑ (ๆต่งๅจๅฏ่งๅ) โ
|
|
685
|
+
โ โ
|
|
686
|
+
โ @agents-uni/rel ๅ
ณ็ณปๅฑ โ ๅ
ณ็ณปๅปบๆจกๅบ็กๅบ โ
|
|
687
|
+
โ โโโ ๅค็ปดๅ
ณ็ณปๆจกๅ (ไฟกไปปใ็ซไบใไบฒๅฏใๅๅ็ญ็ปดๅบฆ) โ
|
|
688
|
+
โ โ
|
|
689
|
+
โ @agents-uni/unis ๆจกๆฟๅฑ โ ้ข็ฝฎ็ป็ปๆจกๆฟ โ
|
|
690
|
+
โ โโโ ็ซๆๅบ/ไผไธ/ๅไบ/ๆๅนณ... (universe.yaml ๆจกๆฟๅบ) โ
|
|
691
|
+
โ โ
|
|
692
|
+
โ OpenClaw ่ฟ่กๅฑ โ Agent ่ฟ่กๆถ็ฏๅข โ
|
|
693
|
+
โ โโโ ๆไปถๅ่ฎฎ (SOUL.md / TASK.md / SUBMISSION.md)โ
|
|
694
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
695
|
+
```
|
|
696
|
+
|
|
697
|
+
### ๅ
ไน้ด็ๅ
ณ็ณป
|
|
698
|
+
|
|
699
|
+
| ๅ
| ่ง่ฒ | zhenhuan ๅฆไฝไฝฟ็จๅฎ |
|
|
700
|
+
|---|---|---|
|
|
701
|
+
| [@agents-uni/core](https://github.com/agents-uni/core) | ๅ่ฎฎๅบๅบง | Universe ่งฃๆใAgent ๆณจๅใTaskDispatcherใDashboardใCLI (`uni`) |
|
|
702
|
+
| [@agents-uni/chat](https://github.com/agents-uni/chat) | ็พค่ๅผๆ | ๅ
ฑไบซ `universe.yaml`๏ผๅซๅฆๅจ่ๅคฉๅฎค่ช็ฑๅฏน่ฏ๏ผๅ
ณ็ณปๅฎๆถๆผๅ |
|
|
703
|
+
| [@agents-uni/rel](https://github.com/agents-uni/rel) | ๅ
ณ็ณปๅปบๆจก | ๅค็ปดๅ
ณ็ณป๏ผไฟกไปป/็ซไบ/ไบฒๅฏ/ๅๅ๏ผ๏ผ่ขซ core ๅ chat ๅ
้จไพ่ต |
|
|
704
|
+
| [@agents-uni/unis](https://github.com/agents-uni/unis) | ็ป็ปๆจกๆฟ | `uni init --uni zhenhuan` ไปๆจกๆฟๅบๆๅๅๅฎซ้
็ฝฎ |
|
|
705
|
+
| [OpenClaw](https://github.com/anthropics/openclaw) | Agent ่ฟ่กๆถ | ๆไปถๅ่ฎฎ๏ผSOUL.md๏ผ่บซไปฝ๏ผโ TASK.md๏ผไปปๅก๏ผโ SUBMISSION.md๏ผๆไบค๏ผ |
|
|
706
|
+
|
|
707
|
+
### ไป้ถๅฐไธ็ๅฎๆดๆต็จ
|
|
656
708
|
|
|
657
|
-
|
|
658
|
-
|
|
709
|
+
```bash
|
|
710
|
+
# 1. ๅๅงๅ้กน็ฎ โ ไป @agents-uni/unis ๆจกๆฟ็ๆ universe.yaml
|
|
711
|
+
npx uni init my-palace --uni zhenhuan
|
|
712
|
+
|
|
713
|
+
# 2. ้จ็ฝฒ โ core ็ CLI ๅฐ universe.yaml ็ผ่ฏไธบ SOUL.md ๅนถๅๅ
ฅ OpenClaw
|
|
714
|
+
npx uni deploy
|
|
715
|
+
|
|
716
|
+
# 3. ๅฏๅจ่ต้ฉฌ โ zhenhuan ็็ซไบๅผๆๅผๅง่ฐๅบฆ
|
|
717
|
+
zhenhuan serve # ็ซฏๅฃ 8089
|
|
718
|
+
|
|
719
|
+
# 4. ๅฏๅจ็พค่๏ผๅฏ้๏ผโ chat ่ฏปๅๅไธไปฝ universe.yaml
|
|
720
|
+
npx agents-chat serve # ็ซฏๅฃ 3000
|
|
721
|
+
|
|
722
|
+
# 5. ้ช่ฏ / ๆฃๆฅ / ๅฏ่งๅ โ core ็ CLI ๅทฅๅ
ท
|
|
723
|
+
npx uni validate # ๆ ก้ช universe.yaml
|
|
724
|
+
npx uni inspect # ๆฅ็ Agent ่ฏฆๆ
|
|
725
|
+
npx uni visualize # ๅฏ่งๅๅ
ณ็ณปๅพ่ฐฑ
|
|
726
|
+
```
|
|
727
|
+
|
|
728
|
+
### ๅฆๆไฝ ๆณๅบไบ core ๅๅปบ่ชๅทฑ็ Uni
|
|
729
|
+
|
|
730
|
+
zhenhuan-uni ๆฌ่บซๅฐฑๆฏๆๅฅฝ็ๅ่ๅฎ็ฐใๆ ธๅฟๆญฅ้ชค๏ผ
|
|
731
|
+
|
|
732
|
+
1. **ๅฎไน `universe.yaml`** โ ๅ่ [core ็่ง่ๆๆกฃ](https://github.com/agents-uni/core#universe-่ง่) ๆ็ดๆฅๅ่ zhenhuan ็ `universe.yaml`
|
|
733
|
+
2. **ๅฎ็ฐ็ซไบ/ๅไฝ้ป่พ** โ ไฝฟ็จ core ๆไพ็ `TaskDispatcher`ใ`PerformanceTracker`ใ`EventBus` ็ญๅ่ฏญ
|
|
734
|
+
3. **้จ็ฝฒๅฐ OpenClaw** โ `uni deploy` ่ชๅจ็ๆ SOUL.md ๅนถๆณจๅ Agent
|
|
735
|
+
4. **ๆฉๅฑ Dashboard** โ ้่ฟ `DashboardExtension` ๆฅๅฃๆณจๅ
ฅ่ชๅฎไน้ขๆฟ
|
|
736
|
+
|
|
737
|
+
่ฏฆ็ป็ๆถๆ่ฎพ่ฎกๅๅณ็ญ่ฟ็จ่ง [DESIGN.md](./DESIGN.md)ใ
|
|
659
738
|
|
|
660
739
|
## License
|
|
661
740
|
|