@agents-uni/core 0.1.1 → 0.1.3
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 +141 -17
- package/README.md +141 -17
- package/dist/bridge/agency-import.d.ts +85 -0
- package/dist/bridge/agency-import.d.ts.map +1 -0
- package/dist/bridge/agency-import.js +323 -0
- package/dist/bridge/agency-import.js.map +1 -0
- package/dist/bridge/agency-registry.d.ts +93 -0
- package/dist/bridge/agency-registry.d.ts.map +1 -0
- package/dist/bridge/agency-registry.js +250 -0
- package/dist/bridge/agency-registry.js.map +1 -0
- package/dist/bridge/index.d.ts +2 -0
- package/dist/bridge/index.d.ts.map +1 -1
- package/dist/bridge/index.js +4 -0
- package/dist/bridge/index.js.map +1 -1
- package/dist/cli/commands/init.d.ts +3 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +6 -6
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/index.js +218 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
<a href="#openclaw-bridge">OpenClaw Bridge</a> •
|
|
22
22
|
<a href="#dashboard">Dashboard</a> •
|
|
23
23
|
<a href="#multi-uni-management">Multi-Uni</a> •
|
|
24
|
+
<a href="#agency-agents-bridge">Agency-Agents</a> •
|
|
24
25
|
<a href="./DESIGN.md">Design Doc</a>
|
|
25
26
|
</p>
|
|
26
27
|
|
|
@@ -44,14 +45,6 @@ Each agent's SOUL.md defines not only its personality and capabilities, but its
|
|
|
44
45
|
|
|
45
46
|
## Quick Start
|
|
46
47
|
|
|
47
|
-
### Scaffold a new project
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
npx create-uni my-universe
|
|
51
|
-
# or with a specific template
|
|
52
|
-
npx create-uni my-universe --template competitive
|
|
53
|
-
```
|
|
54
|
-
|
|
55
48
|
### Install the CLI globally
|
|
56
49
|
|
|
57
50
|
```bash
|
|
@@ -223,7 +216,7 @@ Five ready-to-use organizational templates:
|
|
|
223
216
|
| `military` | Commander + executors | Single chain of command | Mission-critical execution |
|
|
224
217
|
|
|
225
218
|
```bash
|
|
226
|
-
|
|
219
|
+
uni init my-project --template competitive
|
|
227
220
|
```
|
|
228
221
|
|
|
229
222
|
## CLI
|
|
@@ -247,20 +240,30 @@ uni deploy universe.yaml --dir ./workspaces --lang zh
|
|
|
247
240
|
# Interactive project initialization
|
|
248
241
|
uni init
|
|
249
242
|
|
|
250
|
-
#
|
|
243
|
+
# Start the Dashboard web UI
|
|
251
244
|
uni dashboard [--port 8089]
|
|
252
245
|
|
|
253
|
-
#
|
|
246
|
+
# List all registered universes
|
|
254
247
|
uni list
|
|
255
248
|
|
|
256
|
-
#
|
|
249
|
+
# Overview of deployed unis and agents
|
|
257
250
|
uni status
|
|
258
251
|
|
|
259
|
-
#
|
|
252
|
+
# Remove a universe and all its files
|
|
260
253
|
uni cleanup <id>
|
|
261
254
|
|
|
262
|
-
#
|
|
255
|
+
# Reset runtime data, keep configuration
|
|
263
256
|
uni reset <id>
|
|
257
|
+
|
|
258
|
+
# 🆕 Agency-agents bridge
|
|
259
|
+
uni agency init # Download agency-agents repo
|
|
260
|
+
uni agency list # List available categories
|
|
261
|
+
uni agency update # Pull latest updates
|
|
262
|
+
uni agency import engineering design # Import by category
|
|
263
|
+
uni agency import all --name full-team # Import all agents
|
|
264
|
+
|
|
265
|
+
# Import from raw directory paths (advanced)
|
|
266
|
+
uni import ./path/to/agents/ --name my-team
|
|
264
267
|
```
|
|
265
268
|
|
|
266
269
|
| Command | Description |
|
|
@@ -275,6 +278,11 @@ uni reset <id>
|
|
|
275
278
|
| `uni status` | Overview of deployed unis and agents |
|
|
276
279
|
| `uni cleanup <id>` | Remove a universe and all its files |
|
|
277
280
|
| `uni reset <id>` | Reset runtime data, keep SOUL.md config |
|
|
281
|
+
| `uni agency init` | Download agency-agents repo locally |
|
|
282
|
+
| `uni agency list` | List available categories and agent counts |
|
|
283
|
+
| `uni agency update` | Pull latest agency-agents updates |
|
|
284
|
+
| `uni agency import` | Import agents by category name to universe.yaml |
|
|
285
|
+
| `uni import` | Import from raw directory paths (advanced) |
|
|
278
286
|
|
|
279
287
|
## OpenClaw Bridge
|
|
280
288
|
|
|
@@ -456,6 +464,115 @@ import {
|
|
|
456
464
|
| Update | `updateUni()` | Re-deploy SOUL.md, handle added/removed agents |
|
|
457
465
|
| Cleanup | `uni cleanup <id>` | Delete workspace + agent dirs + remove from openclaw.json + registry |
|
|
458
466
|
|
|
467
|
+
## Agency-Agents Bridge
|
|
468
|
+
|
|
469
|
+
agents-uni-core has built-in bridge support for [agency-agents](https://github.com/msitarzewski/agency-agents), a high-quality agent persona library with 140+ agents covering 14 domains (engineering, design, marketing, sales, product, testing, etc.).
|
|
470
|
+
|
|
471
|
+
With the bridge, you can **import these agents into agents-uni with one command**, auto-convert them to `universe.yaml`, and deploy to OpenClaw.
|
|
472
|
+
|
|
473
|
+
### Initialize
|
|
474
|
+
|
|
475
|
+
```bash
|
|
476
|
+
# Download agency-agents to ~/.agents-uni/agency-agents/ (one-time)
|
|
477
|
+
uni agency init
|
|
478
|
+
|
|
479
|
+
# List available categories
|
|
480
|
+
uni agency list
|
|
481
|
+
|
|
482
|
+
# Pull latest updates
|
|
483
|
+
uni agency update
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
### Import by Category
|
|
487
|
+
|
|
488
|
+
```bash
|
|
489
|
+
# Import the engineering team (23 agents)
|
|
490
|
+
uni agency import engineering
|
|
491
|
+
|
|
492
|
+
# Import multiple categories
|
|
493
|
+
uni agency import engineering design marketing
|
|
494
|
+
|
|
495
|
+
# Import all 140+ agents
|
|
496
|
+
uni agency import all --name full-team --type hybrid
|
|
497
|
+
|
|
498
|
+
# Import and deploy SOUL.md to OpenClaw
|
|
499
|
+
uni agency import engineering --name my-eng --deploy --deploy-dir ~/.openclaw
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
### Programmatic Usage
|
|
503
|
+
|
|
504
|
+
```typescript
|
|
505
|
+
import {
|
|
506
|
+
agencyInit,
|
|
507
|
+
agencyUpdate,
|
|
508
|
+
agencyListCategories,
|
|
509
|
+
resolveAgencyCategories,
|
|
510
|
+
importAgencyAgents,
|
|
511
|
+
toSoulMd,
|
|
512
|
+
} from '@agents-uni/core';
|
|
513
|
+
|
|
514
|
+
// 1. Initialize (first time only)
|
|
515
|
+
agencyInit();
|
|
516
|
+
|
|
517
|
+
// 2. List categories
|
|
518
|
+
const categories = agencyListCategories();
|
|
519
|
+
// [{ name: 'engineering', agentCount: 23, path: '...' }, ...]
|
|
520
|
+
|
|
521
|
+
// 3. Import by category
|
|
522
|
+
const dirs = resolveAgencyCategories(['engineering', 'design']);
|
|
523
|
+
const result = importAgencyAgents(dirs, {
|
|
524
|
+
name: 'my-team',
|
|
525
|
+
type: 'competitive',
|
|
526
|
+
relationships: 'peer',
|
|
527
|
+
});
|
|
528
|
+
|
|
529
|
+
// result.config → UniverseConfig (ready to deploy)
|
|
530
|
+
// result.agents → parsed agent data (with original personality)
|
|
531
|
+
console.log(`Imported ${result.agents.length} agents`);
|
|
532
|
+
|
|
533
|
+
// 4. Generate SOUL.md preserving original personality
|
|
534
|
+
for (const agent of result.agents) {
|
|
535
|
+
const soul = toSoulMd(agent, { universe: result.config, language: 'en' });
|
|
536
|
+
// soul contains agency-agents original personality + agents-uni org context
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
// 5. Periodic updates
|
|
540
|
+
const updateResult = agencyUpdate();
|
|
541
|
+
if (updateResult.updated) {
|
|
542
|
+
console.log(`Updated: ${updateResult.oldCommit} → ${updateResult.newCommit}`);
|
|
543
|
+
}
|
|
544
|
+
```
|
|
545
|
+
|
|
546
|
+
### Data Storage
|
|
547
|
+
|
|
548
|
+
```
|
|
549
|
+
~/.agents-uni/
|
|
550
|
+
├── agency-agents/ ← agency-agents repo (git clone)
|
|
551
|
+
│ ├── engineering/ ← 23 engineering agents
|
|
552
|
+
│ ├── design/ ← 8 design agents
|
|
553
|
+
│ ├── marketing/ ← 27 marketing agents
|
|
554
|
+
│ └── ... ← 14 categories total
|
|
555
|
+
└── agency-meta.json ← install and update metadata
|
|
556
|
+
```
|
|
557
|
+
|
|
558
|
+
### Available Categories
|
|
559
|
+
|
|
560
|
+
| Category | Agents | Includes |
|
|
561
|
+
|----------|--------|----------|
|
|
562
|
+
| engineering | 23 | Backend Architect, Frontend Developer, DevOps, SRE, Security Engineer... |
|
|
563
|
+
| marketing | 27 | SEO Specialist, TikTok/Douyin Strategist, Growth Hacker, Content Creator... |
|
|
564
|
+
| specialized | 27 | Blockchain Auditor, Compliance Auditor, MCP Builder, Salesforce Architect... |
|
|
565
|
+
| design | 8 | UI Designer, UX Architect, Brand Guardian, Visual Storyteller... |
|
|
566
|
+
| sales | 8 | Deal Strategist, Outbound Strategist, Pipeline Analyst, Sales Coach... |
|
|
567
|
+
| testing | 8 | API Tester, Performance Benchmarker, Accessibility Auditor... |
|
|
568
|
+
| paid-media | 7 | PPC Strategist, Paid Social, Programmatic Buyer, Ad Creative... |
|
|
569
|
+
| support | 6 | Analytics Reporter, Finance Tracker, Legal Compliance... |
|
|
570
|
+
| spatial-computing | 6 | visionOS Engineer, XR Developer, Terminal Integration... |
|
|
571
|
+
| project-management | 6 | Jira Steward, Project Shepherd, Studio Producer... |
|
|
572
|
+
| academic | 5 | Anthropologist, Historian, Psychologist, Narratologist... |
|
|
573
|
+
| product | 5 | Product Manager, Sprint Prioritizer, Feedback Synthesizer... |
|
|
574
|
+
| game-development | 5 | Game Designer, Level Designer, Narrative Designer, Audio Engineer... |
|
|
575
|
+
|
|
459
576
|
## Architecture
|
|
460
577
|
|
|
461
578
|
```
|
|
@@ -547,6 +664,14 @@ import {
|
|
|
547
664
|
TaskDispatcher, // Dispatch TASK.md → collect SUBMISSION.md
|
|
548
665
|
FileWorkspaceIO, // File-system I/O backend
|
|
549
666
|
MemoryWorkspaceIO, // In-memory I/O backend (for testing)
|
|
667
|
+
|
|
668
|
+
// 🆕 Agency-agents bridge
|
|
669
|
+
agencyInit, // Download agency-agents repo
|
|
670
|
+
agencyUpdate, // Pull latest updates
|
|
671
|
+
agencyListCategories, // List available categories
|
|
672
|
+
resolveAgencyCategories, // Category names → directory paths
|
|
673
|
+
importAgencyAgents, // Batch import and generate UniverseConfig
|
|
674
|
+
toSoulMd, // Generate SOUL.md preserving original personality
|
|
550
675
|
} from '@agents-uni/core';
|
|
551
676
|
```
|
|
552
677
|
|
|
@@ -571,12 +696,11 @@ agents-uni-core/
|
|
|
571
696
|
core/ # Runtime engine (Universe, Registry, Graph, StateMachine, ...)
|
|
572
697
|
evolution/ # Self-optimization (Performance, Promotion, Memory, ...)
|
|
573
698
|
spec/ # YAML parsing, validation, compilation
|
|
574
|
-
bridge/ # OpenClaw bridge (SOUL.md, task dispatch, workspace I/O, uni registry)
|
|
699
|
+
bridge/ # OpenClaw bridge (SOUL.md, task dispatch, workspace I/O, uni registry, agency-agents bridge)
|
|
575
700
|
dashboard/ # 🆕 Dashboard (Hono server, HTML templates, API routes, extension system)
|
|
576
701
|
schema/ # JSON Schema for spec validation
|
|
577
702
|
templates/ # 5 built-in organizational templates
|
|
578
|
-
cli/ # Command-line interface (
|
|
579
|
-
create-uni/ # npx create-uni scaffolding tool
|
|
703
|
+
cli/ # Command-line interface (15 commands)
|
|
580
704
|
tests/ # Unit tests (41 tests, 7 suites)
|
|
581
705
|
```
|
|
582
706
|
|
package/README.md
CHANGED
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
<a href="#openclaw-桥接">OpenClaw</a> •
|
|
22
22
|
<a href="#dashboard-仪表盘">Dashboard</a> •
|
|
23
23
|
<a href="#多-uni-管理">多 Uni 管理</a> •
|
|
24
|
+
<a href="#agency-agents-桥接">Agency-Agents</a> •
|
|
24
25
|
<a href="./DESIGN.md">设计文档</a>
|
|
25
26
|
</p>
|
|
26
27
|
|
|
@@ -44,14 +45,6 @@
|
|
|
44
45
|
|
|
45
46
|
## 快速开始
|
|
46
47
|
|
|
47
|
-
### 脚手架创建项目
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
npx create-uni my-universe
|
|
51
|
-
# 或指定模板
|
|
52
|
-
npx create-uni my-universe --template competitive
|
|
53
|
-
```
|
|
54
|
-
|
|
55
48
|
### 全局安装 CLI
|
|
56
49
|
|
|
57
50
|
```bash
|
|
@@ -223,7 +216,7 @@ protocols:
|
|
|
223
216
|
| `military` | 指挥官 + 执行者 | 单一指挥链 | 关键任务执行 |
|
|
224
217
|
|
|
225
218
|
```bash
|
|
226
|
-
|
|
219
|
+
uni init my-project --template competitive
|
|
227
220
|
```
|
|
228
221
|
|
|
229
222
|
## 命令行工具
|
|
@@ -247,20 +240,30 @@ uni deploy universe.yaml --dir ./workspaces --lang zh
|
|
|
247
240
|
# 交互式初始化项目
|
|
248
241
|
uni init
|
|
249
242
|
|
|
250
|
-
#
|
|
243
|
+
# 启动 Dashboard 仪表盘
|
|
251
244
|
uni dashboard [--port 8089]
|
|
252
245
|
|
|
253
|
-
#
|
|
246
|
+
# 列出所有已注册的 Universe
|
|
254
247
|
uni list
|
|
255
248
|
|
|
256
|
-
#
|
|
249
|
+
# 查看已部署的 Uni / Agent 概览
|
|
257
250
|
uni status
|
|
258
251
|
|
|
259
|
-
#
|
|
252
|
+
# 清理一个 Universe(删除所有相关文件 + 注册信息)
|
|
260
253
|
uni cleanup <id>
|
|
261
254
|
|
|
262
|
-
#
|
|
255
|
+
# 重置一个 Universe(清除运行时数据,保留配置)
|
|
263
256
|
uni reset <id>
|
|
257
|
+
|
|
258
|
+
# 🆕 agency-agents 桥接
|
|
259
|
+
uni agency init # 下载 agency-agents 仓库
|
|
260
|
+
uni agency list # 查看可用分类
|
|
261
|
+
uni agency update # 拉取最新
|
|
262
|
+
uni agency import engineering design # 按分类导入
|
|
263
|
+
uni agency import all --name full-team # 导入全部
|
|
264
|
+
|
|
265
|
+
# 从原始目录导入(高级用法)
|
|
266
|
+
uni import ./path/to/agents/ --name my-team
|
|
264
267
|
```
|
|
265
268
|
|
|
266
269
|
| 命令 | 说明 |
|
|
@@ -275,6 +278,11 @@ uni reset <id>
|
|
|
275
278
|
| `uni status` | 查看已部署的 Uni / Agent 概览 |
|
|
276
279
|
| `uni cleanup <id>` | 清理一个 Universe 及其所有文件 |
|
|
277
280
|
| `uni reset <id>` | 重置运行时数据,保留 SOUL.md 等配置 |
|
|
281
|
+
| `uni agency init` | 下载 agency-agents 仓库到本地 |
|
|
282
|
+
| `uni agency list` | 查看可用分类和 Agent 数量 |
|
|
283
|
+
| `uni agency update` | 拉取 agency-agents 最新更新 |
|
|
284
|
+
| `uni agency import` | 按分类名导入 Agent 到 universe.yaml |
|
|
285
|
+
| `uni import` | 从原始目录路径导入 Agent(高级用法) |
|
|
278
286
|
|
|
279
287
|
## OpenClaw 桥接
|
|
280
288
|
|
|
@@ -456,6 +464,115 @@ import {
|
|
|
456
464
|
| 更新 | `updateUni()` | 重新部署 SOUL.md,处理新增/移除的 Agent |
|
|
457
465
|
| 清理 | `uni cleanup <id>` | 删除工作区目录 + Agent 目录 + 从 openclaw.json 移除 + 从注册中心移除 |
|
|
458
466
|
|
|
467
|
+
## Agency-Agents 桥接
|
|
468
|
+
|
|
469
|
+
agents-uni-core 内置了对 [agency-agents](https://github.com/msitarzewski/agency-agents) 项目的桥接支持。agency-agents 是一个高质量的 Agent 人格模板库(140+ 个 Agent),覆盖工程、设计、营销、销售、产品、测试等 14 个领域。
|
|
470
|
+
|
|
471
|
+
通过桥接,你可以**一键将这些 Agent 导入 agents-uni**,自动转换为 `universe.yaml` 并部署到 OpenClaw。
|
|
472
|
+
|
|
473
|
+
### 初始化
|
|
474
|
+
|
|
475
|
+
```bash
|
|
476
|
+
# 下载 agency-agents 到 ~/.agents-uni/agency-agents/(仅需一次)
|
|
477
|
+
uni agency init
|
|
478
|
+
|
|
479
|
+
# 查看可用分类
|
|
480
|
+
uni agency list
|
|
481
|
+
|
|
482
|
+
# 拉取最新更新
|
|
483
|
+
uni agency update
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
### 按分类导入
|
|
487
|
+
|
|
488
|
+
```bash
|
|
489
|
+
# 导入工程团队(23 个 Agent)
|
|
490
|
+
uni agency import engineering
|
|
491
|
+
|
|
492
|
+
# 同时导入多个分类
|
|
493
|
+
uni agency import engineering design marketing
|
|
494
|
+
|
|
495
|
+
# 导入全部 140+ 个 Agent
|
|
496
|
+
uni agency import all --name full-team --type hybrid
|
|
497
|
+
|
|
498
|
+
# 导入并直接部署 SOUL.md 到 OpenClaw
|
|
499
|
+
uni agency import engineering --name my-eng --deploy --deploy-dir ~/.openclaw
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
### 编程式调用
|
|
503
|
+
|
|
504
|
+
```typescript
|
|
505
|
+
import {
|
|
506
|
+
agencyInit,
|
|
507
|
+
agencyUpdate,
|
|
508
|
+
agencyListCategories,
|
|
509
|
+
resolveAgencyCategories,
|
|
510
|
+
importAgencyAgents,
|
|
511
|
+
toSoulMd,
|
|
512
|
+
} from '@agents-uni/core';
|
|
513
|
+
|
|
514
|
+
// 1. 初始化(首次)
|
|
515
|
+
agencyInit();
|
|
516
|
+
|
|
517
|
+
// 2. 列出分类
|
|
518
|
+
const categories = agencyListCategories();
|
|
519
|
+
// [{ name: 'engineering', agentCount: 23, path: '...' }, ...]
|
|
520
|
+
|
|
521
|
+
// 3. 按分类导入
|
|
522
|
+
const dirs = resolveAgencyCategories(['engineering', 'design']);
|
|
523
|
+
const result = importAgencyAgents(dirs, {
|
|
524
|
+
name: 'my-team',
|
|
525
|
+
type: 'competitive',
|
|
526
|
+
relationships: 'peer',
|
|
527
|
+
});
|
|
528
|
+
|
|
529
|
+
// result.config → UniverseConfig (可直接部署)
|
|
530
|
+
// result.agents → 解析后的 Agent 数据 (含原始人格)
|
|
531
|
+
console.log(`导入了 ${result.agents.length} 个 Agent`);
|
|
532
|
+
|
|
533
|
+
// 4. 生成保留原始人格的 SOUL.md
|
|
534
|
+
for (const agent of result.agents) {
|
|
535
|
+
const soul = toSoulMd(agent, { universe: result.config, language: 'zh' });
|
|
536
|
+
// soul 包含 agency-agents 原始人格 + agents-uni 组织上下文
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
// 5. 定期更新
|
|
540
|
+
const updateResult = agencyUpdate();
|
|
541
|
+
if (updateResult.updated) {
|
|
542
|
+
console.log(`更新: ${updateResult.oldCommit} → ${updateResult.newCommit}`);
|
|
543
|
+
}
|
|
544
|
+
```
|
|
545
|
+
|
|
546
|
+
### 数据存储
|
|
547
|
+
|
|
548
|
+
```
|
|
549
|
+
~/.agents-uni/
|
|
550
|
+
├── agency-agents/ ← agency-agents 仓库(git clone)
|
|
551
|
+
│ ├── engineering/ ← 23 个工程 Agent
|
|
552
|
+
│ ├── design/ ← 8 个设计 Agent
|
|
553
|
+
│ ├── marketing/ ← 27 个营销 Agent
|
|
554
|
+
│ └── ... ← 共 14 个分类
|
|
555
|
+
└── agency-meta.json ← 安装和更新元数据
|
|
556
|
+
```
|
|
557
|
+
|
|
558
|
+
### 可用分类
|
|
559
|
+
|
|
560
|
+
| 分类 | Agent 数 | 包含 |
|
|
561
|
+
|------|---------|------|
|
|
562
|
+
| engineering | 23 | Backend Architect, Frontend Developer, DevOps, SRE, Security Engineer... |
|
|
563
|
+
| marketing | 27 | SEO Specialist, TikTok/Douyin Strategist, Growth Hacker, Content Creator... |
|
|
564
|
+
| specialized | 27 | Blockchain Auditor, Compliance Auditor, MCP Builder, Salesforce Architect... |
|
|
565
|
+
| design | 8 | UI Designer, UX Architect, Brand Guardian, Visual Storyteller... |
|
|
566
|
+
| sales | 8 | Deal Strategist, Outbound Strategist, Pipeline Analyst, Sales Coach... |
|
|
567
|
+
| testing | 8 | API Tester, Performance Benchmarker, Accessibility Auditor... |
|
|
568
|
+
| paid-media | 7 | PPC Strategist, Paid Social, Programmatic Buyer, Ad Creative... |
|
|
569
|
+
| support | 6 | Analytics Reporter, Finance Tracker, Legal Compliance... |
|
|
570
|
+
| spatial-computing | 6 | visionOS Engineer, XR Developer, Terminal Integration... |
|
|
571
|
+
| project-management | 6 | Jira Steward, Project Shepherd, Studio Producer... |
|
|
572
|
+
| academic | 5 | Anthropologist, Historian, Psychologist, Narratologist... |
|
|
573
|
+
| product | 5 | Product Manager, Sprint Prioritizer, Feedback Synthesizer... |
|
|
574
|
+
| game-development | 5 | Game Designer, Level Designer, Narrative Designer, Audio Engineer... |
|
|
575
|
+
|
|
459
576
|
## 架构
|
|
460
577
|
|
|
461
578
|
```
|
|
@@ -547,6 +664,14 @@ import {
|
|
|
547
664
|
TaskDispatcher, // 下发 TASK.md → 收集 SUBMISSION.md
|
|
548
665
|
FileWorkspaceIO, // 文件系统 I/O 后端
|
|
549
666
|
MemoryWorkspaceIO, // 内存 I/O 后端(用于测试)
|
|
667
|
+
|
|
668
|
+
// 🆕 Agency-agents 桥接
|
|
669
|
+
agencyInit, // 下载 agency-agents 仓库
|
|
670
|
+
agencyUpdate, // 拉取最新更新
|
|
671
|
+
agencyListCategories, // 列出可用分类
|
|
672
|
+
resolveAgencyCategories, // 分类名 → 目录路径
|
|
673
|
+
importAgencyAgents, // 批量导入并生成 UniverseConfig
|
|
674
|
+
toSoulMd, // 生成保留原始人格的 SOUL.md
|
|
550
675
|
} from '@agents-uni/core';
|
|
551
676
|
```
|
|
552
677
|
|
|
@@ -571,12 +696,11 @@ agents-uni-core/
|
|
|
571
696
|
core/ # 运行时引擎(Universe, Registry, Graph, StateMachine, ...)
|
|
572
697
|
evolution/ # 自优化(Performance, Promotion, Memory, ...)
|
|
573
698
|
spec/ # YAML 解析、验证、编译
|
|
574
|
-
bridge/ # OpenClaw 桥接(SOUL.md 生成、任务调度、工作区 I/O、Uni
|
|
699
|
+
bridge/ # OpenClaw 桥接(SOUL.md 生成、任务调度、工作区 I/O、Uni 注册中心、agency-agents 桥接)
|
|
575
700
|
dashboard/ # 🆕 Dashboard 仪表盘(Hono 服务器、HTML 模板、API 路由、扩展机制)
|
|
576
701
|
schema/ # JSON Schema 验证
|
|
577
702
|
templates/ # 5 种内置组织模板
|
|
578
|
-
cli/ # 命令行工具(
|
|
579
|
-
create-uni/ # npx create-uni 脚手架工具
|
|
703
|
+
cli/ # 命令行工具(15 个命令)
|
|
580
704
|
tests/ # 单元测试(41 个测试,7 个套件)
|
|
581
705
|
```
|
|
582
706
|
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agency-Agents Bridge
|
|
3
|
+
*
|
|
4
|
+
* 导入 agency-agents 项目的 Agent .md 文件,转换为 agents-uni 的
|
|
5
|
+
* AgentDefinition + SOUL.md 格式,让 193 个高质量 Agent 人格为我所用。
|
|
6
|
+
*
|
|
7
|
+
* 支持两种用法:
|
|
8
|
+
* 1. CLI: `uni import ./path/to/agency-agents/engineering/ --name my-team`
|
|
9
|
+
* 2. API: `importAgencyAgents('./engineering/', { name: 'my-team' })`
|
|
10
|
+
*/
|
|
11
|
+
import type { AgentDefinition, UniverseConfig } from '../types/index.js';
|
|
12
|
+
export interface AgencyAgentFrontmatter {
|
|
13
|
+
name: string;
|
|
14
|
+
description: string;
|
|
15
|
+
emoji?: string;
|
|
16
|
+
color?: string;
|
|
17
|
+
vibe?: string;
|
|
18
|
+
services?: Array<{
|
|
19
|
+
name: string;
|
|
20
|
+
url: string;
|
|
21
|
+
tier: string;
|
|
22
|
+
}>;
|
|
23
|
+
}
|
|
24
|
+
export interface AgencyAgentFile {
|
|
25
|
+
/** File path */
|
|
26
|
+
filePath: string;
|
|
27
|
+
/** Parsed YAML frontmatter */
|
|
28
|
+
frontmatter: AgencyAgentFrontmatter;
|
|
29
|
+
/** Full markdown body (after frontmatter) */
|
|
30
|
+
body: string;
|
|
31
|
+
/** Extracted sections by header */
|
|
32
|
+
sections: Map<string, string>;
|
|
33
|
+
/** Derived agent ID (from filename) */
|
|
34
|
+
id: string;
|
|
35
|
+
}
|
|
36
|
+
export interface ImportOptions {
|
|
37
|
+
/** Universe name */
|
|
38
|
+
name?: string;
|
|
39
|
+
/** Universe type */
|
|
40
|
+
type?: 'hierarchical' | 'flat' | 'competitive' | 'hybrid';
|
|
41
|
+
/** Default rank for imported agents (0-100) */
|
|
42
|
+
defaultRank?: number;
|
|
43
|
+
/** Category/department to assign (derived from directory name if omitted) */
|
|
44
|
+
department?: string;
|
|
45
|
+
/** Whether to infer traits from agent content */
|
|
46
|
+
inferTraits?: boolean;
|
|
47
|
+
/** Language for generated content */
|
|
48
|
+
language?: 'zh' | 'en';
|
|
49
|
+
/** Relationship strategy between imported agents */
|
|
50
|
+
relationships?: 'none' | 'peer' | 'competitive';
|
|
51
|
+
}
|
|
52
|
+
export interface ImportResult {
|
|
53
|
+
/** Generated UniverseConfig */
|
|
54
|
+
config: UniverseConfig;
|
|
55
|
+
/** Parsed agent files (for SOUL.md generation) */
|
|
56
|
+
agents: AgencyAgentFile[];
|
|
57
|
+
/** Warnings encountered during import */
|
|
58
|
+
warnings: string[];
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Parse a single agency-agents .md file
|
|
62
|
+
*/
|
|
63
|
+
export declare function parseAgencyAgentFile(filePath: string): AgencyAgentFile;
|
|
64
|
+
/**
|
|
65
|
+
* Convert an AgencyAgentFile to an agents-uni AgentDefinition
|
|
66
|
+
*/
|
|
67
|
+
export declare function toAgentDefinition(agent: AgencyAgentFile, opts?: {
|
|
68
|
+
rank?: number;
|
|
69
|
+
department?: string;
|
|
70
|
+
inferTraits?: boolean;
|
|
71
|
+
}): AgentDefinition;
|
|
72
|
+
/**
|
|
73
|
+
* Generate a SOUL.md that preserves the original agency-agents personality
|
|
74
|
+
* and wraps it with agents-uni organizational context
|
|
75
|
+
*/
|
|
76
|
+
export declare function toSoulMd(agent: AgencyAgentFile, opts?: {
|
|
77
|
+
universe?: UniverseConfig;
|
|
78
|
+
language?: 'zh' | 'en';
|
|
79
|
+
}): string;
|
|
80
|
+
/**
|
|
81
|
+
* Import all .md agents from a directory (or multiple directories)
|
|
82
|
+
* and generate a UniverseConfig
|
|
83
|
+
*/
|
|
84
|
+
export declare function importAgencyAgents(dirs: string | string[], opts?: ImportOptions): ImportResult;
|
|
85
|
+
//# sourceMappingURL=agency-import.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agency-import.d.ts","sourceRoot":"","sources":["../../src/bridge/agency-import.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAIzE,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC/D;AAED,MAAM,WAAW,eAAe;IAC9B,gBAAgB;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,8BAA8B;IAC9B,WAAW,EAAE,sBAAsB,CAAC;IACpC,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,uCAAuC;IACvC,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,aAAa;IAC5B,oBAAoB;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oBAAoB;IACpB,IAAI,CAAC,EAAE,cAAc,GAAG,MAAM,GAAG,aAAa,GAAG,QAAQ,CAAC;IAC1D,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6EAA6E;IAC7E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iDAAiD;IACjD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACvB,oDAAoD;IACpD,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,aAAa,CAAC;CACjD;AAED,MAAM,WAAW,YAAY;IAC3B,+BAA+B;IAC/B,MAAM,EAAE,cAAc,CAAC;IACvB,kDAAkD;IAClD,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,yCAAyC;IACzC,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAID;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,eAAe,CActE;AAwED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,eAAe,EACtB,IAAI,CAAC,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,GACnE,eAAe,CAuCjB;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CACtB,KAAK,EAAE,eAAe,EACtB,IAAI,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,cAAc,CAAC;IAAC,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;CAAE,GAC3D,MAAM,CAiDR;AAID;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,EACvB,IAAI,CAAC,EAAE,aAAa,GACnB,YAAY,CA8Gd"}
|