@zshuangmu/agenthub 0.4.3 → 0.4.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zshuangmu/agenthub",
3
- "version": "0.4.3",
3
+ "version": "0.4.5",
4
4
  "description": "AI Agent 打包与分发平台 - 一句话打包上传,一键下载获得能力",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/cli.js CHANGED
@@ -115,11 +115,12 @@ agenthub pack - 打包 Agent
115
115
  --version <ver> 版本号 (默认: 1.0.0)
116
116
  --tags <tags> 标签,逗号分隔
117
117
  --category <cat> 分类
118
+ --featured 标记为精选 Agent
118
119
 
119
120
  示例:
120
121
  agenthub pack --workspace ./my-agent --config ./openclaw.json
121
122
  agenthub pack --workspace ./my-agent --config ./openclaw.json --version 2.0.0
122
- agenthub pack --workspace ./my-agent --config ./openclaw.json --name "Code Helper"
123
+ agenthub pack --workspace ./my-agent --config ./openclaw.json --name "Code Helper" --featured
123
124
  `,
124
125
  publish: `
125
126
  agenthub publish - 发布 Agent
@@ -103,6 +103,7 @@ export async function packCommand(options) {
103
103
  tags: options.tags ? options.tags.split(",").map((t) => t.trim()) : [],
104
104
  category: options.category,
105
105
  version,
106
+ featured: options.featured === true,
106
107
  });
107
108
 
108
109
  // 5. 验证 MANIFEST
package/src/lib/html.js CHANGED
@@ -719,6 +719,25 @@ function page(title, body, options = {}) {
719
719
  transform: translateY(-4px);
720
720
  box-shadow: 0 16px 40px rgba(250, 112, 154, 0.15);
721
721
  }
722
+ .agent-card-featured {
723
+ border-color: var(--color-1);
724
+ background: linear-gradient(135deg, rgba(250, 112, 154, 0.03), rgba(255, 154, 139, 0.03));
725
+ }
726
+ .agent-card-featured:hover {
727
+ box-shadow: 0 16px 40px rgba(250, 112, 154, 0.25);
728
+ }
729
+ .featured-badge {
730
+ position: absolute;
731
+ top: -8px;
732
+ right: 12px;
733
+ background: linear-gradient(135deg, var(--color-1), var(--color-3));
734
+ color: white;
735
+ padding: 4px 12px;
736
+ border-radius: 12px;
737
+ font-size: 12px;
738
+ font-weight: 600;
739
+ box-shadow: 0 4px 12px rgba(250, 112, 154, 0.3);
740
+ }
722
741
  .agent-header {
723
742
  display: flex;
724
743
  align-items: flex-start;
@@ -1469,6 +1488,7 @@ export function renderAgentListPage({ query, agents, totalDownloads, apiBase })
1469
1488
  const cards = agents.map(agent => {
1470
1489
  const tags = agent.metadata?.tags || [];
1471
1490
  const category = agent.metadata?.category || 'default';
1491
+ const featured = agent.metadata?.featured;
1472
1492
 
1473
1493
  const tagClass = {
1474
1494
  'ops': 'tag-ops',
@@ -1478,7 +1498,8 @@ export function renderAgentListPage({ query, agents, totalDownloads, apiBase })
1478
1498
  }[category] || 'tag-default';
1479
1499
 
1480
1500
  return `
1481
- <article class="agent-card" onclick="window.location='/agents/${agent.slug}'">
1501
+ <article class="agent-card${featured ? ' agent-card-featured' : ''}" onclick="window.location='/agents/${agent.slug}'">
1502
+ ${featured ? '<span class="featured-badge">⭐</span>' : ''}
1482
1503
  <div class="agent-header">
1483
1504
  <a href="/agents/${agent.slug}" class="agent-name" onclick="event.stopPropagation()">${agent.name || agent.slug}</a>
1484
1505
  <span class="agent-version">v${agent.version}</span>
@@ -5,7 +5,7 @@
5
5
 
6
6
  const WORKSPACE_FILES = ["AGENTS.md", "SOUL.md", "USER.md", "IDENTITY.md", "TOOLS.md", "HEARTBEAT.md", "BOOTSTRAP.md"];
7
7
 
8
- export function createManifest({ slug, name, description, author, memoryCounts, openclawTemplate, skills = [], prompts = [], tags = [], category, language = "zh-CN", version = "1.0.0" }) {
8
+ export function createManifest({ slug, name, description, author, memoryCounts, openclawTemplate, skills = [], prompts = [], tags = [], category, language = "zh-CN", version = "1.0.0", featured = false }) {
9
9
  const hasModel = openclawTemplate?.agents?.defaults?.model?.primary;
10
10
  const totalMemory = memoryCounts.public + memoryCounts.portable + memoryCounts.private;
11
11
 
@@ -69,6 +69,7 @@ export function createManifest({ slug, name, description, author, memoryCounts,
69
69
  category: category || "General",
70
70
  language: language,
71
71
  license: "MIT",
72
+ featured,
72
73
  },
73
74
  };
74
75
  }