@agents-uni/core 0.1.1 → 0.1.2
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 +140 -7
- package/README.md +140 -7
- 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/index.js +215 -0
- 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
|
|
|
@@ -247,20 +248,30 @@ uni deploy universe.yaml --dir ./workspaces --lang zh
|
|
|
247
248
|
# Interactive project initialization
|
|
248
249
|
uni init
|
|
249
250
|
|
|
250
|
-
#
|
|
251
|
+
# Start the Dashboard web UI
|
|
251
252
|
uni dashboard [--port 8089]
|
|
252
253
|
|
|
253
|
-
#
|
|
254
|
+
# List all registered universes
|
|
254
255
|
uni list
|
|
255
256
|
|
|
256
|
-
#
|
|
257
|
+
# Overview of deployed unis and agents
|
|
257
258
|
uni status
|
|
258
259
|
|
|
259
|
-
#
|
|
260
|
+
# Remove a universe and all its files
|
|
260
261
|
uni cleanup <id>
|
|
261
262
|
|
|
262
|
-
#
|
|
263
|
+
# Reset runtime data, keep configuration
|
|
263
264
|
uni reset <id>
|
|
265
|
+
|
|
266
|
+
# 🆕 Agency-agents bridge
|
|
267
|
+
uni agency init # Download agency-agents repo
|
|
268
|
+
uni agency list # List available categories
|
|
269
|
+
uni agency update # Pull latest updates
|
|
270
|
+
uni agency import engineering design # Import by category
|
|
271
|
+
uni agency import all --name full-team # Import all agents
|
|
272
|
+
|
|
273
|
+
# Import from raw directory paths (advanced)
|
|
274
|
+
uni import ./path/to/agents/ --name my-team
|
|
264
275
|
```
|
|
265
276
|
|
|
266
277
|
| Command | Description |
|
|
@@ -275,6 +286,11 @@ uni reset <id>
|
|
|
275
286
|
| `uni status` | Overview of deployed unis and agents |
|
|
276
287
|
| `uni cleanup <id>` | Remove a universe and all its files |
|
|
277
288
|
| `uni reset <id>` | Reset runtime data, keep SOUL.md config |
|
|
289
|
+
| `uni agency init` | Download agency-agents repo locally |
|
|
290
|
+
| `uni agency list` | List available categories and agent counts |
|
|
291
|
+
| `uni agency update` | Pull latest agency-agents updates |
|
|
292
|
+
| `uni agency import` | Import agents by category name to universe.yaml |
|
|
293
|
+
| `uni import` | Import from raw directory paths (advanced) |
|
|
278
294
|
|
|
279
295
|
## OpenClaw Bridge
|
|
280
296
|
|
|
@@ -456,6 +472,115 @@ import {
|
|
|
456
472
|
| Update | `updateUni()` | Re-deploy SOUL.md, handle added/removed agents |
|
|
457
473
|
| Cleanup | `uni cleanup <id>` | Delete workspace + agent dirs + remove from openclaw.json + registry |
|
|
458
474
|
|
|
475
|
+
## Agency-Agents Bridge
|
|
476
|
+
|
|
477
|
+
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.).
|
|
478
|
+
|
|
479
|
+
With the bridge, you can **import these agents into agents-uni with one command**, auto-convert them to `universe.yaml`, and deploy to OpenClaw.
|
|
480
|
+
|
|
481
|
+
### Initialize
|
|
482
|
+
|
|
483
|
+
```bash
|
|
484
|
+
# Download agency-agents to ~/.agents-uni/agency-agents/ (one-time)
|
|
485
|
+
uni agency init
|
|
486
|
+
|
|
487
|
+
# List available categories
|
|
488
|
+
uni agency list
|
|
489
|
+
|
|
490
|
+
# Pull latest updates
|
|
491
|
+
uni agency update
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
### Import by Category
|
|
495
|
+
|
|
496
|
+
```bash
|
|
497
|
+
# Import the engineering team (23 agents)
|
|
498
|
+
uni agency import engineering
|
|
499
|
+
|
|
500
|
+
# Import multiple categories
|
|
501
|
+
uni agency import engineering design marketing
|
|
502
|
+
|
|
503
|
+
# Import all 140+ agents
|
|
504
|
+
uni agency import all --name full-team --type hybrid
|
|
505
|
+
|
|
506
|
+
# Import and deploy SOUL.md to OpenClaw
|
|
507
|
+
uni agency import engineering --name my-eng --deploy --deploy-dir ~/.openclaw
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
### Programmatic Usage
|
|
511
|
+
|
|
512
|
+
```typescript
|
|
513
|
+
import {
|
|
514
|
+
agencyInit,
|
|
515
|
+
agencyUpdate,
|
|
516
|
+
agencyListCategories,
|
|
517
|
+
resolveAgencyCategories,
|
|
518
|
+
importAgencyAgents,
|
|
519
|
+
toSoulMd,
|
|
520
|
+
} from '@agents-uni/core';
|
|
521
|
+
|
|
522
|
+
// 1. Initialize (first time only)
|
|
523
|
+
agencyInit();
|
|
524
|
+
|
|
525
|
+
// 2. List categories
|
|
526
|
+
const categories = agencyListCategories();
|
|
527
|
+
// [{ name: 'engineering', agentCount: 23, path: '...' }, ...]
|
|
528
|
+
|
|
529
|
+
// 3. Import by category
|
|
530
|
+
const dirs = resolveAgencyCategories(['engineering', 'design']);
|
|
531
|
+
const result = importAgencyAgents(dirs, {
|
|
532
|
+
name: 'my-team',
|
|
533
|
+
type: 'competitive',
|
|
534
|
+
relationships: 'peer',
|
|
535
|
+
});
|
|
536
|
+
|
|
537
|
+
// result.config → UniverseConfig (ready to deploy)
|
|
538
|
+
// result.agents → parsed agent data (with original personality)
|
|
539
|
+
console.log(`Imported ${result.agents.length} agents`);
|
|
540
|
+
|
|
541
|
+
// 4. Generate SOUL.md preserving original personality
|
|
542
|
+
for (const agent of result.agents) {
|
|
543
|
+
const soul = toSoulMd(agent, { universe: result.config, language: 'en' });
|
|
544
|
+
// soul contains agency-agents original personality + agents-uni org context
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
// 5. Periodic updates
|
|
548
|
+
const updateResult = agencyUpdate();
|
|
549
|
+
if (updateResult.updated) {
|
|
550
|
+
console.log(`Updated: ${updateResult.oldCommit} → ${updateResult.newCommit}`);
|
|
551
|
+
}
|
|
552
|
+
```
|
|
553
|
+
|
|
554
|
+
### Data Storage
|
|
555
|
+
|
|
556
|
+
```
|
|
557
|
+
~/.agents-uni/
|
|
558
|
+
├── agency-agents/ ← agency-agents repo (git clone)
|
|
559
|
+
│ ├── engineering/ ← 23 engineering agents
|
|
560
|
+
│ ├── design/ ← 8 design agents
|
|
561
|
+
│ ├── marketing/ ← 27 marketing agents
|
|
562
|
+
│ └── ... ← 14 categories total
|
|
563
|
+
└── agency-meta.json ← install and update metadata
|
|
564
|
+
```
|
|
565
|
+
|
|
566
|
+
### Available Categories
|
|
567
|
+
|
|
568
|
+
| Category | Agents | Includes |
|
|
569
|
+
|----------|--------|----------|
|
|
570
|
+
| engineering | 23 | Backend Architect, Frontend Developer, DevOps, SRE, Security Engineer... |
|
|
571
|
+
| marketing | 27 | SEO Specialist, TikTok/Douyin Strategist, Growth Hacker, Content Creator... |
|
|
572
|
+
| specialized | 27 | Blockchain Auditor, Compliance Auditor, MCP Builder, Salesforce Architect... |
|
|
573
|
+
| design | 8 | UI Designer, UX Architect, Brand Guardian, Visual Storyteller... |
|
|
574
|
+
| sales | 8 | Deal Strategist, Outbound Strategist, Pipeline Analyst, Sales Coach... |
|
|
575
|
+
| testing | 8 | API Tester, Performance Benchmarker, Accessibility Auditor... |
|
|
576
|
+
| paid-media | 7 | PPC Strategist, Paid Social, Programmatic Buyer, Ad Creative... |
|
|
577
|
+
| support | 6 | Analytics Reporter, Finance Tracker, Legal Compliance... |
|
|
578
|
+
| spatial-computing | 6 | visionOS Engineer, XR Developer, Terminal Integration... |
|
|
579
|
+
| project-management | 6 | Jira Steward, Project Shepherd, Studio Producer... |
|
|
580
|
+
| academic | 5 | Anthropologist, Historian, Psychologist, Narratologist... |
|
|
581
|
+
| product | 5 | Product Manager, Sprint Prioritizer, Feedback Synthesizer... |
|
|
582
|
+
| game-development | 5 | Game Designer, Level Designer, Narrative Designer, Audio Engineer... |
|
|
583
|
+
|
|
459
584
|
## Architecture
|
|
460
585
|
|
|
461
586
|
```
|
|
@@ -547,6 +672,14 @@ import {
|
|
|
547
672
|
TaskDispatcher, // Dispatch TASK.md → collect SUBMISSION.md
|
|
548
673
|
FileWorkspaceIO, // File-system I/O backend
|
|
549
674
|
MemoryWorkspaceIO, // In-memory I/O backend (for testing)
|
|
675
|
+
|
|
676
|
+
// 🆕 Agency-agents bridge
|
|
677
|
+
agencyInit, // Download agency-agents repo
|
|
678
|
+
agencyUpdate, // Pull latest updates
|
|
679
|
+
agencyListCategories, // List available categories
|
|
680
|
+
resolveAgencyCategories, // Category names → directory paths
|
|
681
|
+
importAgencyAgents, // Batch import and generate UniverseConfig
|
|
682
|
+
toSoulMd, // Generate SOUL.md preserving original personality
|
|
550
683
|
} from '@agents-uni/core';
|
|
551
684
|
```
|
|
552
685
|
|
|
@@ -571,11 +704,11 @@ agents-uni-core/
|
|
|
571
704
|
core/ # Runtime engine (Universe, Registry, Graph, StateMachine, ...)
|
|
572
705
|
evolution/ # Self-optimization (Performance, Promotion, Memory, ...)
|
|
573
706
|
spec/ # YAML parsing, validation, compilation
|
|
574
|
-
bridge/ # OpenClaw bridge (SOUL.md, task dispatch, workspace I/O, uni registry)
|
|
707
|
+
bridge/ # OpenClaw bridge (SOUL.md, task dispatch, workspace I/O, uni registry, agency-agents bridge)
|
|
575
708
|
dashboard/ # 🆕 Dashboard (Hono server, HTML templates, API routes, extension system)
|
|
576
709
|
schema/ # JSON Schema for spec validation
|
|
577
710
|
templates/ # 5 built-in organizational templates
|
|
578
|
-
cli/ # Command-line interface (
|
|
711
|
+
cli/ # Command-line interface (15 commands)
|
|
579
712
|
create-uni/ # npx create-uni scaffolding tool
|
|
580
713
|
tests/ # Unit tests (41 tests, 7 suites)
|
|
581
714
|
```
|
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
|
|
|
@@ -247,20 +248,30 @@ uni deploy universe.yaml --dir ./workspaces --lang zh
|
|
|
247
248
|
# 交互式初始化项目
|
|
248
249
|
uni init
|
|
249
250
|
|
|
250
|
-
#
|
|
251
|
+
# 启动 Dashboard 仪表盘
|
|
251
252
|
uni dashboard [--port 8089]
|
|
252
253
|
|
|
253
|
-
#
|
|
254
|
+
# 列出所有已注册的 Universe
|
|
254
255
|
uni list
|
|
255
256
|
|
|
256
|
-
#
|
|
257
|
+
# 查看已部署的 Uni / Agent 概览
|
|
257
258
|
uni status
|
|
258
259
|
|
|
259
|
-
#
|
|
260
|
+
# 清理一个 Universe(删除所有相关文件 + 注册信息)
|
|
260
261
|
uni cleanup <id>
|
|
261
262
|
|
|
262
|
-
#
|
|
263
|
+
# 重置一个 Universe(清除运行时数据,保留配置)
|
|
263
264
|
uni reset <id>
|
|
265
|
+
|
|
266
|
+
# 🆕 agency-agents 桥接
|
|
267
|
+
uni agency init # 下载 agency-agents 仓库
|
|
268
|
+
uni agency list # 查看可用分类
|
|
269
|
+
uni agency update # 拉取最新
|
|
270
|
+
uni agency import engineering design # 按分类导入
|
|
271
|
+
uni agency import all --name full-team # 导入全部
|
|
272
|
+
|
|
273
|
+
# 从原始目录导入(高级用法)
|
|
274
|
+
uni import ./path/to/agents/ --name my-team
|
|
264
275
|
```
|
|
265
276
|
|
|
266
277
|
| 命令 | 说明 |
|
|
@@ -275,6 +286,11 @@ uni reset <id>
|
|
|
275
286
|
| `uni status` | 查看已部署的 Uni / Agent 概览 |
|
|
276
287
|
| `uni cleanup <id>` | 清理一个 Universe 及其所有文件 |
|
|
277
288
|
| `uni reset <id>` | 重置运行时数据,保留 SOUL.md 等配置 |
|
|
289
|
+
| `uni agency init` | 下载 agency-agents 仓库到本地 |
|
|
290
|
+
| `uni agency list` | 查看可用分类和 Agent 数量 |
|
|
291
|
+
| `uni agency update` | 拉取 agency-agents 最新更新 |
|
|
292
|
+
| `uni agency import` | 按分类名导入 Agent 到 universe.yaml |
|
|
293
|
+
| `uni import` | 从原始目录路径导入 Agent(高级用法) |
|
|
278
294
|
|
|
279
295
|
## OpenClaw 桥接
|
|
280
296
|
|
|
@@ -456,6 +472,115 @@ import {
|
|
|
456
472
|
| 更新 | `updateUni()` | 重新部署 SOUL.md,处理新增/移除的 Agent |
|
|
457
473
|
| 清理 | `uni cleanup <id>` | 删除工作区目录 + Agent 目录 + 从 openclaw.json 移除 + 从注册中心移除 |
|
|
458
474
|
|
|
475
|
+
## Agency-Agents 桥接
|
|
476
|
+
|
|
477
|
+
agents-uni-core 内置了对 [agency-agents](https://github.com/msitarzewski/agency-agents) 项目的桥接支持。agency-agents 是一个高质量的 Agent 人格模板库(140+ 个 Agent),覆盖工程、设计、营销、销售、产品、测试等 14 个领域。
|
|
478
|
+
|
|
479
|
+
通过桥接,你可以**一键将这些 Agent 导入 agents-uni**,自动转换为 `universe.yaml` 并部署到 OpenClaw。
|
|
480
|
+
|
|
481
|
+
### 初始化
|
|
482
|
+
|
|
483
|
+
```bash
|
|
484
|
+
# 下载 agency-agents 到 ~/.agents-uni/agency-agents/(仅需一次)
|
|
485
|
+
uni agency init
|
|
486
|
+
|
|
487
|
+
# 查看可用分类
|
|
488
|
+
uni agency list
|
|
489
|
+
|
|
490
|
+
# 拉取最新更新
|
|
491
|
+
uni agency update
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
### 按分类导入
|
|
495
|
+
|
|
496
|
+
```bash
|
|
497
|
+
# 导入工程团队(23 个 Agent)
|
|
498
|
+
uni agency import engineering
|
|
499
|
+
|
|
500
|
+
# 同时导入多个分类
|
|
501
|
+
uni agency import engineering design marketing
|
|
502
|
+
|
|
503
|
+
# 导入全部 140+ 个 Agent
|
|
504
|
+
uni agency import all --name full-team --type hybrid
|
|
505
|
+
|
|
506
|
+
# 导入并直接部署 SOUL.md 到 OpenClaw
|
|
507
|
+
uni agency import engineering --name my-eng --deploy --deploy-dir ~/.openclaw
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
### 编程式调用
|
|
511
|
+
|
|
512
|
+
```typescript
|
|
513
|
+
import {
|
|
514
|
+
agencyInit,
|
|
515
|
+
agencyUpdate,
|
|
516
|
+
agencyListCategories,
|
|
517
|
+
resolveAgencyCategories,
|
|
518
|
+
importAgencyAgents,
|
|
519
|
+
toSoulMd,
|
|
520
|
+
} from '@agents-uni/core';
|
|
521
|
+
|
|
522
|
+
// 1. 初始化(首次)
|
|
523
|
+
agencyInit();
|
|
524
|
+
|
|
525
|
+
// 2. 列出分类
|
|
526
|
+
const categories = agencyListCategories();
|
|
527
|
+
// [{ name: 'engineering', agentCount: 23, path: '...' }, ...]
|
|
528
|
+
|
|
529
|
+
// 3. 按分类导入
|
|
530
|
+
const dirs = resolveAgencyCategories(['engineering', 'design']);
|
|
531
|
+
const result = importAgencyAgents(dirs, {
|
|
532
|
+
name: 'my-team',
|
|
533
|
+
type: 'competitive',
|
|
534
|
+
relationships: 'peer',
|
|
535
|
+
});
|
|
536
|
+
|
|
537
|
+
// result.config → UniverseConfig (可直接部署)
|
|
538
|
+
// result.agents → 解析后的 Agent 数据 (含原始人格)
|
|
539
|
+
console.log(`导入了 ${result.agents.length} 个 Agent`);
|
|
540
|
+
|
|
541
|
+
// 4. 生成保留原始人格的 SOUL.md
|
|
542
|
+
for (const agent of result.agents) {
|
|
543
|
+
const soul = toSoulMd(agent, { universe: result.config, language: 'zh' });
|
|
544
|
+
// soul 包含 agency-agents 原始人格 + agents-uni 组织上下文
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
// 5. 定期更新
|
|
548
|
+
const updateResult = agencyUpdate();
|
|
549
|
+
if (updateResult.updated) {
|
|
550
|
+
console.log(`更新: ${updateResult.oldCommit} → ${updateResult.newCommit}`);
|
|
551
|
+
}
|
|
552
|
+
```
|
|
553
|
+
|
|
554
|
+
### 数据存储
|
|
555
|
+
|
|
556
|
+
```
|
|
557
|
+
~/.agents-uni/
|
|
558
|
+
├── agency-agents/ ← agency-agents 仓库(git clone)
|
|
559
|
+
│ ├── engineering/ ← 23 个工程 Agent
|
|
560
|
+
│ ├── design/ ← 8 个设计 Agent
|
|
561
|
+
│ ├── marketing/ ← 27 个营销 Agent
|
|
562
|
+
│ └── ... ← 共 14 个分类
|
|
563
|
+
└── agency-meta.json ← 安装和更新元数据
|
|
564
|
+
```
|
|
565
|
+
|
|
566
|
+
### 可用分类
|
|
567
|
+
|
|
568
|
+
| 分类 | Agent 数 | 包含 |
|
|
569
|
+
|------|---------|------|
|
|
570
|
+
| engineering | 23 | Backend Architect, Frontend Developer, DevOps, SRE, Security Engineer... |
|
|
571
|
+
| marketing | 27 | SEO Specialist, TikTok/Douyin Strategist, Growth Hacker, Content Creator... |
|
|
572
|
+
| specialized | 27 | Blockchain Auditor, Compliance Auditor, MCP Builder, Salesforce Architect... |
|
|
573
|
+
| design | 8 | UI Designer, UX Architect, Brand Guardian, Visual Storyteller... |
|
|
574
|
+
| sales | 8 | Deal Strategist, Outbound Strategist, Pipeline Analyst, Sales Coach... |
|
|
575
|
+
| testing | 8 | API Tester, Performance Benchmarker, Accessibility Auditor... |
|
|
576
|
+
| paid-media | 7 | PPC Strategist, Paid Social, Programmatic Buyer, Ad Creative... |
|
|
577
|
+
| support | 6 | Analytics Reporter, Finance Tracker, Legal Compliance... |
|
|
578
|
+
| spatial-computing | 6 | visionOS Engineer, XR Developer, Terminal Integration... |
|
|
579
|
+
| project-management | 6 | Jira Steward, Project Shepherd, Studio Producer... |
|
|
580
|
+
| academic | 5 | Anthropologist, Historian, Psychologist, Narratologist... |
|
|
581
|
+
| product | 5 | Product Manager, Sprint Prioritizer, Feedback Synthesizer... |
|
|
582
|
+
| game-development | 5 | Game Designer, Level Designer, Narrative Designer, Audio Engineer... |
|
|
583
|
+
|
|
459
584
|
## 架构
|
|
460
585
|
|
|
461
586
|
```
|
|
@@ -547,6 +672,14 @@ import {
|
|
|
547
672
|
TaskDispatcher, // 下发 TASK.md → 收集 SUBMISSION.md
|
|
548
673
|
FileWorkspaceIO, // 文件系统 I/O 后端
|
|
549
674
|
MemoryWorkspaceIO, // 内存 I/O 后端(用于测试)
|
|
675
|
+
|
|
676
|
+
// 🆕 Agency-agents 桥接
|
|
677
|
+
agencyInit, // 下载 agency-agents 仓库
|
|
678
|
+
agencyUpdate, // 拉取最新更新
|
|
679
|
+
agencyListCategories, // 列出可用分类
|
|
680
|
+
resolveAgencyCategories, // 分类名 → 目录路径
|
|
681
|
+
importAgencyAgents, // 批量导入并生成 UniverseConfig
|
|
682
|
+
toSoulMd, // 生成保留原始人格的 SOUL.md
|
|
550
683
|
} from '@agents-uni/core';
|
|
551
684
|
```
|
|
552
685
|
|
|
@@ -571,11 +704,11 @@ agents-uni-core/
|
|
|
571
704
|
core/ # 运行时引擎(Universe, Registry, Graph, StateMachine, ...)
|
|
572
705
|
evolution/ # 自优化(Performance, Promotion, Memory, ...)
|
|
573
706
|
spec/ # YAML 解析、验证、编译
|
|
574
|
-
bridge/ # OpenClaw 桥接(SOUL.md 生成、任务调度、工作区 I/O、Uni
|
|
707
|
+
bridge/ # OpenClaw 桥接(SOUL.md 生成、任务调度、工作区 I/O、Uni 注册中心、agency-agents 桥接)
|
|
575
708
|
dashboard/ # 🆕 Dashboard 仪表盘(Hono 服务器、HTML 模板、API 路由、扩展机制)
|
|
576
709
|
schema/ # JSON Schema 验证
|
|
577
710
|
templates/ # 5 种内置组织模板
|
|
578
|
-
cli/ # 命令行工具(
|
|
711
|
+
cli/ # 命令行工具(15 个命令)
|
|
579
712
|
create-uni/ # npx create-uni 脚手架工具
|
|
580
713
|
tests/ # 单元测试(41 个测试,7 个套件)
|
|
581
714
|
```
|
|
@@ -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"}
|