myaiforone 1.0.0
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.md +113 -0
- package/agents/_template/CLAUDE.md +18 -0
- package/agents/_template/agent.json +7 -0
- package/agents/platform/agentcreator/CLAUDE.md +300 -0
- package/agents/platform/appcreator/CLAUDE.md +158 -0
- package/agents/platform/gym/CLAUDE.md +486 -0
- package/agents/platform/gym/agent.json +40 -0
- package/agents/platform/gym/programs/agent-building/program.json +160 -0
- package/agents/platform/gym/programs/automations-mastery/program.json +129 -0
- package/agents/platform/gym/programs/getting-started/program.json +124 -0
- package/agents/platform/gym/programs/mcp-integrations/program.json +116 -0
- package/agents/platform/gym/programs/multi-model-strategy/program.json +115 -0
- package/agents/platform/gym/programs/prompt-engineering/program.json +136 -0
- package/agents/platform/gym/souls/alex.md +12 -0
- package/agents/platform/gym/souls/jordan.md +12 -0
- package/agents/platform/gym/souls/morgan.md +12 -0
- package/agents/platform/gym/souls/riley.md +12 -0
- package/agents/platform/gym/souls/sam.md +12 -0
- package/agents/platform/hub/CLAUDE.md +372 -0
- package/agents/platform/promptcreator/CLAUDE.md +130 -0
- package/agents/platform/skillcreator/CLAUDE.md +163 -0
- package/bin/cli.js +566 -0
- package/config.example.json +310 -0
- package/dist/agent-registry.d.ts +32 -0
- package/dist/agent-registry.d.ts.map +1 -0
- package/dist/agent-registry.js +144 -0
- package/dist/agent-registry.js.map +1 -0
- package/dist/channels/discord.d.ts +17 -0
- package/dist/channels/discord.d.ts.map +1 -0
- package/dist/channels/discord.js +114 -0
- package/dist/channels/discord.js.map +1 -0
- package/dist/channels/imessage.d.ts +23 -0
- package/dist/channels/imessage.d.ts.map +1 -0
- package/dist/channels/imessage.js +214 -0
- package/dist/channels/imessage.js.map +1 -0
- package/dist/channels/slack.d.ts +19 -0
- package/dist/channels/slack.d.ts.map +1 -0
- package/dist/channels/slack.js +167 -0
- package/dist/channels/slack.js.map +1 -0
- package/dist/channels/telegram.d.ts +19 -0
- package/dist/channels/telegram.d.ts.map +1 -0
- package/dist/channels/telegram.js +274 -0
- package/dist/channels/telegram.js.map +1 -0
- package/dist/channels/types.d.ts +44 -0
- package/dist/channels/types.d.ts.map +1 -0
- package/dist/channels/types.js +18 -0
- package/dist/channels/types.js.map +1 -0
- package/dist/channels/whatsapp.d.ts +23 -0
- package/dist/channels/whatsapp.d.ts.map +1 -0
- package/dist/channels/whatsapp.js +189 -0
- package/dist/channels/whatsapp.js.map +1 -0
- package/dist/config.d.ts +134 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +127 -0
- package/dist/config.js.map +1 -0
- package/dist/cron.d.ts +8 -0
- package/dist/cron.d.ts.map +1 -0
- package/dist/cron.js +35 -0
- package/dist/cron.js.map +1 -0
- package/dist/decrypt-keys.d.ts +7 -0
- package/dist/decrypt-keys.d.ts.map +1 -0
- package/dist/decrypt-keys.js +53 -0
- package/dist/decrypt-keys.js.map +1 -0
- package/dist/encrypt-keys.d.ts +8 -0
- package/dist/encrypt-keys.d.ts.map +1 -0
- package/dist/encrypt-keys.js +62 -0
- package/dist/encrypt-keys.js.map +1 -0
- package/dist/executor.d.ts +31 -0
- package/dist/executor.d.ts.map +1 -0
- package/dist/executor.js +2009 -0
- package/dist/executor.js.map +1 -0
- package/dist/gemini-executor.d.ts +27 -0
- package/dist/gemini-executor.d.ts.map +1 -0
- package/dist/gemini-executor.js +160 -0
- package/dist/gemini-executor.js.map +1 -0
- package/dist/goals.d.ts +24 -0
- package/dist/goals.d.ts.map +1 -0
- package/dist/goals.js +189 -0
- package/dist/goals.js.map +1 -0
- package/dist/gym/activity-digest.d.ts +30 -0
- package/dist/gym/activity-digest.d.ts.map +1 -0
- package/dist/gym/activity-digest.js +506 -0
- package/dist/gym/activity-digest.js.map +1 -0
- package/dist/gym/dimension-scorer.d.ts +76 -0
- package/dist/gym/dimension-scorer.d.ts.map +1 -0
- package/dist/gym/dimension-scorer.js +236 -0
- package/dist/gym/dimension-scorer.js.map +1 -0
- package/dist/gym/gym-router.d.ts +7 -0
- package/dist/gym/gym-router.d.ts.map +1 -0
- package/dist/gym/gym-router.js +718 -0
- package/dist/gym/gym-router.js.map +1 -0
- package/dist/gym/index.d.ts +11 -0
- package/dist/gym/index.d.ts.map +1 -0
- package/dist/gym/index.js +11 -0
- package/dist/gym/index.js.map +1 -0
- package/dist/heartbeat.d.ts +21 -0
- package/dist/heartbeat.d.ts.map +1 -0
- package/dist/heartbeat.js +163 -0
- package/dist/heartbeat.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +254 -0
- package/dist/index.js.map +1 -0
- package/dist/keystore.d.ts +22 -0
- package/dist/keystore.d.ts.map +1 -0
- package/dist/keystore.js +178 -0
- package/dist/keystore.js.map +1 -0
- package/dist/logger.d.ts +9 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +45 -0
- package/dist/logger.js.map +1 -0
- package/dist/memory/daily.d.ts +22 -0
- package/dist/memory/daily.d.ts.map +1 -0
- package/dist/memory/daily.js +82 -0
- package/dist/memory/daily.js.map +1 -0
- package/dist/memory/embeddings.d.ts +15 -0
- package/dist/memory/embeddings.d.ts.map +1 -0
- package/dist/memory/embeddings.js +154 -0
- package/dist/memory/embeddings.js.map +1 -0
- package/dist/memory/index.d.ts +32 -0
- package/dist/memory/index.d.ts.map +1 -0
- package/dist/memory/index.js +159 -0
- package/dist/memory/index.js.map +1 -0
- package/dist/memory/search.d.ts +21 -0
- package/dist/memory/search.d.ts.map +1 -0
- package/dist/memory/search.js +77 -0
- package/dist/memory/search.js.map +1 -0
- package/dist/memory/store.d.ts +23 -0
- package/dist/memory/store.d.ts.map +1 -0
- package/dist/memory/store.js +144 -0
- package/dist/memory/store.js.map +1 -0
- package/dist/ollama-executor.d.ts +17 -0
- package/dist/ollama-executor.d.ts.map +1 -0
- package/dist/ollama-executor.js +112 -0
- package/dist/ollama-executor.js.map +1 -0
- package/dist/openai-executor.d.ts +38 -0
- package/dist/openai-executor.d.ts.map +1 -0
- package/dist/openai-executor.js +197 -0
- package/dist/openai-executor.js.map +1 -0
- package/dist/router.d.ts +11 -0
- package/dist/router.d.ts.map +1 -0
- package/dist/router.js +185 -0
- package/dist/router.js.map +1 -0
- package/dist/test-message.d.ts +2 -0
- package/dist/test-message.d.ts.map +1 -0
- package/dist/test-message.js +60 -0
- package/dist/test-message.js.map +1 -0
- package/dist/utils/imsg-db-reader.d.ts +24 -0
- package/dist/utils/imsg-db-reader.d.ts.map +1 -0
- package/dist/utils/imsg-db-reader.js +92 -0
- package/dist/utils/imsg-db-reader.js.map +1 -0
- package/dist/utils/imsg-rpc.d.ts +25 -0
- package/dist/utils/imsg-rpc.d.ts.map +1 -0
- package/dist/utils/imsg-rpc.js +149 -0
- package/dist/utils/imsg-rpc.js.map +1 -0
- package/dist/utils/message-formatter.d.ts +3 -0
- package/dist/utils/message-formatter.d.ts.map +1 -0
- package/dist/utils/message-formatter.js +69 -0
- package/dist/utils/message-formatter.js.map +1 -0
- package/dist/web-ui.d.ts +12 -0
- package/dist/web-ui.d.ts.map +1 -0
- package/dist/web-ui.js +5784 -0
- package/dist/web-ui.js.map +1 -0
- package/dist/whatsapp-chats.d.ts +2 -0
- package/dist/whatsapp-chats.d.ts.map +1 -0
- package/dist/whatsapp-chats.js +76 -0
- package/dist/whatsapp-chats.js.map +1 -0
- package/dist/whatsapp-login.d.ts +2 -0
- package/dist/whatsapp-login.d.ts.map +1 -0
- package/dist/whatsapp-login.js +90 -0
- package/dist/whatsapp-login.js.map +1 -0
- package/dist/wiki-sync.d.ts +21 -0
- package/dist/wiki-sync.d.ts.map +1 -0
- package/dist/wiki-sync.js +147 -0
- package/dist/wiki-sync.js.map +1 -0
- package/docs/AddNewAgentGuide.md +100 -0
- package/docs/AddNewMcpGuide.md +72 -0
- package/docs/Architecture.md +795 -0
- package/docs/CLAUDE-AI-SETUP.md +166 -0
- package/docs/Setup.md +297 -0
- package/docs/ai-gym-architecture.md +1040 -0
- package/docs/ai-gym-build-plan.md +343 -0
- package/docs/ai-gym-onboarding.md +122 -0
- package/docs/appcreator_plan.md +348 -0
- package/docs/platform-mcp-audit.md +320 -0
- package/docs/server-deployment-plan.md +503 -0
- package/docs/superpowers/plans/2026-03-25-marketplace.md +1281 -0
- package/docs/superpowers/specs/2026-03-25-marketplace-design.md +287 -0
- package/docs/user-guide.md +2016 -0
- package/mcp-catalog.json +628 -0
- package/package.json +63 -0
- package/public/MyAIforOne-logomark-512.svg +16 -0
- package/public/MyAIforOne-logomark-transparent.svg +15 -0
- package/public/activity.html +314 -0
- package/public/admin.html +1674 -0
- package/public/agent-dashboard.html +670 -0
- package/public/api-docs.html +1106 -0
- package/public/automations.html +722 -0
- package/public/canvas.css +223 -0
- package/public/canvas.js +588 -0
- package/public/changelog.html +231 -0
- package/public/gym.html +2766 -0
- package/public/home.html +1930 -0
- package/public/index.html +2809 -0
- package/public/lab.html +1643 -0
- package/public/library.html +1442 -0
- package/public/marketplace.html +1101 -0
- package/public/mcp-docs.html +441 -0
- package/public/mini.html +390 -0
- package/public/monitor.html +584 -0
- package/public/org.html +4304 -0
- package/public/projects.html +734 -0
- package/public/settings.html +645 -0
- package/public/tasks.html +932 -0
- package/public/trainers/alex.svg +12 -0
- package/public/trainers/jordan.svg +12 -0
- package/public/trainers/morgan.svg +12 -0
- package/public/trainers/riley.svg +12 -0
- package/public/trainers/sam.svg +12 -0
- package/public/user-guide.html +218 -0
- package/registry/agents.json +3 -0
- package/registry/apps.json +20 -0
- package/registry/installed-drafts.json +3 -0
- package/registry/mcps.json +1084 -0
- package/registry/prompts/personal/mcp-test-prompt.md +6 -0
- package/registry/prompts/personal/memory-recall.md +6 -0
- package/registry/prompts/platform/brainstorm.md +15 -0
- package/registry/prompts/platform/code-review.md +16 -0
- package/registry/prompts/platform/explain.md +16 -0
- package/registry/prompts.json +58 -0
- package/registry/skills/external/brainstorming.md +5 -0
- package/registry/skills/external/code-review.md +40 -0
- package/registry/skills/external/frontend-patterns.md +642 -0
- package/registry/skills/external/frontend-slides.md +184 -0
- package/registry/skills/external/systematic-debugging.md +5 -0
- package/registry/skills/external/tdd.md +328 -0
- package/registry/skills/external/verification-before-completion.md +5 -0
- package/registry/skills/external/writing-plans.md +5 -0
- package/registry/skills/platform/ai41_app_build.md +930 -0
- package/registry/skills/platform/ai41_app_deploy.md +168 -0
- package/registry/skills/platform/ai41_app_orchestrator.md +239 -0
- package/registry/skills/platform/ai41_app_patterns.md +359 -0
- package/registry/skills/platform/ai41_app_register.md +85 -0
- package/registry/skills/platform/ai41_app_scaffold.md +421 -0
- package/registry/skills/platform/ai41_app_verify.md +107 -0
- package/registry/skills/platform/opProjectCreate.md +239 -0
- package/registry/skills/platform/op_devbrowser.md +136 -0
- package/registry/skills/platform/sop_brandguidelines.md +103 -0
- package/registry/skills/platform/sop_docx.md +117 -0
- package/registry/skills/platform/sop_frontenddesign.md +44 -0
- package/registry/skills/platform/sop_frontenddesign_v2.md +659 -0
- package/registry/skills/platform/sop_mcpbuilder.md +133 -0
- package/registry/skills/platform/sop_pdf.md +172 -0
- package/registry/skills/platform/sop_pptx.md +133 -0
- package/registry/skills/platform/sop_skillcreator.md +104 -0
- package/registry/skills/platform/sop_themefactory.md +128 -0
- package/registry/skills/platform/sop_webapptesting.md +75 -0
- package/registry/skills/platform/sop_webartifactsbuilder.md +97 -0
- package/registry/skills/platform/sop_xlsx.md +134 -0
- package/registry/skills.json +1055 -0
- package/scripts/discover-chats.sh +11 -0
- package/scripts/install-service-windows.ps1 +87 -0
- package/scripts/install-service.sh +52 -0
- package/scripts/seed-registry.ts +195 -0
- package/scripts/test-send.sh +5 -0
- package/scripts/tray-indicator.ps1 +35 -0
- package/scripts/uninstall-service-windows.ps1 +23 -0
- package/scripts/uninstall-service.sh +15 -0
- package/scripts/xbar-myagent.5s.sh +32 -0
- package/server/mcp-server/dist/index.d.ts +11 -0
- package/server/mcp-server/dist/index.js +1332 -0
- package/server/mcp-server/dist/lib/api-client.d.ts +165 -0
- package/server/mcp-server/dist/lib/api-client.js +241 -0
- package/server/mcp-server/index.ts +1545 -0
- package/server/mcp-server/lib/api-client.ts +366 -0
- package/server/mcp-server/tsconfig.json +14 -0
- package/src/agent-registry.ts +180 -0
- package/src/channels/discord.ts +129 -0
- package/src/channels/imessage.ts +261 -0
- package/src/channels/slack.ts +208 -0
- package/src/channels/telegram.ts +307 -0
- package/src/channels/types.ts +62 -0
- package/src/channels/whatsapp.ts +227 -0
- package/src/config.ts +281 -0
- package/src/cron.ts +43 -0
- package/src/decrypt-keys.ts +60 -0
- package/src/encrypt-keys.ts +70 -0
- package/src/executor.ts +2190 -0
- package/src/gemini-executor.ts +212 -0
- package/src/goals.ts +240 -0
- package/src/gym/activity-digest.ts +546 -0
- package/src/gym/dimension-scorer.ts +297 -0
- package/src/gym/gym-router.ts +801 -0
- package/src/gym/index.ts +19 -0
- package/src/heartbeat.ts +220 -0
- package/src/index.ts +275 -0
- package/src/keystore.ts +190 -0
- package/src/logger.ts +51 -0
- package/src/memory/daily.ts +101 -0
- package/src/memory/embeddings.ts +185 -0
- package/src/memory/index.ts +218 -0
- package/src/memory/search.ts +124 -0
- package/src/memory/store.ts +189 -0
- package/src/ollama-executor.ts +126 -0
- package/src/openai-executor.ts +259 -0
- package/src/router.ts +230 -0
- package/src/test-message.ts +72 -0
- package/src/utils/imsg-db-reader.ts +109 -0
- package/src/utils/imsg-rpc.ts +178 -0
- package/src/utils/message-formatter.ts +90 -0
- package/src/web-ui.ts +5778 -0
- package/src/whatsapp-chats.ts +91 -0
- package/src/whatsapp-login.ts +110 -0
- package/src/wiki-sync.ts +199 -0
- package/tsconfig.json +19 -0
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI Gym — Dimension Scorer
|
|
3
|
+
*
|
|
4
|
+
* Scores learners across 5 AI skill dimensions based on observable
|
|
5
|
+
* platform activity. Each dimension is scored 0–5.
|
|
6
|
+
*
|
|
7
|
+
* Scoring is heuristic — it works with whatever data is available
|
|
8
|
+
* and errs on the side of encouragement (never penalizes absence,
|
|
9
|
+
* only rewards observed activity).
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
export interface ActivitySummary {
|
|
13
|
+
agentId: string;
|
|
14
|
+
messageCount: number;
|
|
15
|
+
activeDays: number;
|
|
16
|
+
uniqueDates: string[];
|
|
17
|
+
topics: string[];
|
|
18
|
+
toolUseCounts: Record<string, number>;
|
|
19
|
+
lastActive: string | null;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface AgentInfo {
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
description?: string;
|
|
26
|
+
agentClass?: string;
|
|
27
|
+
workspace?: string;
|
|
28
|
+
allowedTools?: string[];
|
|
29
|
+
mcps?: string[];
|
|
30
|
+
goals?: any[];
|
|
31
|
+
cron?: any[];
|
|
32
|
+
claudeMd?: string;
|
|
33
|
+
systemPromptLength?: number;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface DimensionScores {
|
|
37
|
+
application: number;
|
|
38
|
+
communication: number;
|
|
39
|
+
knowledge: number;
|
|
40
|
+
orchestration: number;
|
|
41
|
+
craft: number;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function clamp(n: number, min: number, max: number): number {
|
|
45
|
+
return Math.max(min, Math.min(max, n));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Application — How deeply is AI integrated into actual work?
|
|
50
|
+
* Measures: usage frequency, breadth of agents used, session depth.
|
|
51
|
+
*/
|
|
52
|
+
export function scoreApplication(summaries: ActivitySummary[]): number {
|
|
53
|
+
if (!summaries.length) return 0;
|
|
54
|
+
|
|
55
|
+
// Filter out platform/gym agents — we want real usage agents
|
|
56
|
+
const userAgents = summaries.filter(
|
|
57
|
+
(s) => !["hub", "gym", "agentcreator"].includes(s.agentId) && s.messageCount > 0
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
if (!userAgents.length) return 0;
|
|
61
|
+
|
|
62
|
+
let score = 0;
|
|
63
|
+
|
|
64
|
+
// Breadth: how many distinct agents used?
|
|
65
|
+
const agentsUsed = userAgents.length;
|
|
66
|
+
if (agentsUsed >= 1) score += 1;
|
|
67
|
+
if (agentsUsed >= 3) score += 1;
|
|
68
|
+
if (agentsUsed >= 5) score += 0.5;
|
|
69
|
+
|
|
70
|
+
// Frequency: total messages across all agents
|
|
71
|
+
const totalMessages = userAgents.reduce((sum, s) => sum + s.messageCount, 0);
|
|
72
|
+
if (totalMessages >= 10) score += 0.5;
|
|
73
|
+
if (totalMessages >= 50) score += 0.5;
|
|
74
|
+
if (totalMessages >= 200) score += 0.5;
|
|
75
|
+
|
|
76
|
+
// Consistency: total active days
|
|
77
|
+
const allDates = new Set<string>();
|
|
78
|
+
for (const s of userAgents) {
|
|
79
|
+
for (const d of s.uniqueDates) allDates.add(d);
|
|
80
|
+
}
|
|
81
|
+
if (allDates.size >= 3) score += 0.5;
|
|
82
|
+
if (allDates.size >= 7) score += 0.5;
|
|
83
|
+
|
|
84
|
+
return clamp(Math.round(score), 0, 5);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Communication — How effectively do you talk to AI?
|
|
89
|
+
* Measures: prompt patterns, correction frequency, tool use diversity.
|
|
90
|
+
* Note: Without full log analysis, this is a rough proxy.
|
|
91
|
+
*/
|
|
92
|
+
export function scoreCommunication(summaries: ActivitySummary[]): number {
|
|
93
|
+
if (!summaries.length) return 0;
|
|
94
|
+
|
|
95
|
+
const userAgents = summaries.filter(
|
|
96
|
+
(s) => !["hub", "gym", "agentcreator"].includes(s.agentId) && s.messageCount > 0
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
if (!userAgents.length) return 0;
|
|
100
|
+
|
|
101
|
+
let score = 0;
|
|
102
|
+
|
|
103
|
+
// Basic usage means some communication skill
|
|
104
|
+
const totalMessages = userAgents.reduce((sum, s) => sum + s.messageCount, 0);
|
|
105
|
+
if (totalMessages >= 5) score += 1;
|
|
106
|
+
if (totalMessages >= 20) score += 0.5;
|
|
107
|
+
|
|
108
|
+
// Tool diversity in responses suggests effective prompting
|
|
109
|
+
const allTools = new Set<string>();
|
|
110
|
+
for (const s of userAgents) {
|
|
111
|
+
for (const tool of Object.keys(s.toolUseCounts)) allTools.add(tool);
|
|
112
|
+
}
|
|
113
|
+
if (allTools.size >= 2) score += 0.5;
|
|
114
|
+
if (allTools.size >= 4) score += 0.5;
|
|
115
|
+
|
|
116
|
+
// Multi-topic conversations suggest context-rich prompting
|
|
117
|
+
const allTopics = new Set<string>();
|
|
118
|
+
for (const s of userAgents) {
|
|
119
|
+
for (const t of s.topics) allTopics.add(t);
|
|
120
|
+
}
|
|
121
|
+
if (allTopics.size >= 5) score += 0.5;
|
|
122
|
+
if (allTopics.size >= 15) score += 0.5;
|
|
123
|
+
|
|
124
|
+
// Repeat usage of same agent with good results
|
|
125
|
+
const hasDeepAgent = userAgents.some((s) => s.messageCount >= 30);
|
|
126
|
+
if (hasDeepAgent) score += 0.5;
|
|
127
|
+
|
|
128
|
+
// File operations suggest context-sharing (Read, Write, Edit)
|
|
129
|
+
const hasFileOps = userAgents.some(
|
|
130
|
+
(s) => s.toolUseCounts.Read || s.toolUseCounts.Write || s.toolUseCounts.Edit
|
|
131
|
+
);
|
|
132
|
+
if (hasFileOps) score += 0.5;
|
|
133
|
+
|
|
134
|
+
return clamp(Math.round(score), 0, 5);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Knowledge — How much do you understand about AI concepts?
|
|
139
|
+
* Measures: program completions, breadth of engagement.
|
|
140
|
+
* This dimension is hard to measure from activity alone —
|
|
141
|
+
* the coach supplements with direct assessment during sessions.
|
|
142
|
+
*/
|
|
143
|
+
export function scoreKnowledge(
|
|
144
|
+
programsCompleted: string[],
|
|
145
|
+
totalPrograms: number,
|
|
146
|
+
agentsUsed: number
|
|
147
|
+
): number {
|
|
148
|
+
let score = 0;
|
|
149
|
+
|
|
150
|
+
// Program completion is the primary signal
|
|
151
|
+
if (programsCompleted.length >= 1) score += 1.5;
|
|
152
|
+
if (programsCompleted.length >= 2) score += 1;
|
|
153
|
+
if (programsCompleted.length >= 3) score += 0.5;
|
|
154
|
+
|
|
155
|
+
// Engagement with multiple programs shows breadth
|
|
156
|
+
if (totalPrograms >= 2) score += 0.5;
|
|
157
|
+
|
|
158
|
+
// Using multiple agents suggests understanding of agent concepts
|
|
159
|
+
if (agentsUsed >= 2) score += 0.5;
|
|
160
|
+
if (agentsUsed >= 4) score += 0.5;
|
|
161
|
+
|
|
162
|
+
// Getting Started completion is a strong knowledge signal
|
|
163
|
+
if (programsCompleted.includes("getting-started")) score += 0.5;
|
|
164
|
+
|
|
165
|
+
return clamp(Math.round(score), 0, 5);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Orchestration — Can you design multi-agent, automated workflows?
|
|
170
|
+
* Measures: goals/cron usage, multi-agent patterns, delegation.
|
|
171
|
+
*/
|
|
172
|
+
export function scoreOrchestration(agents: AgentInfo[]): number {
|
|
173
|
+
if (!agents.length) return 0;
|
|
174
|
+
|
|
175
|
+
let score = 0;
|
|
176
|
+
|
|
177
|
+
// Check for goals/cron setup
|
|
178
|
+
const hasGoals = agents.some((a) => a.goals && a.goals.length > 0);
|
|
179
|
+
const hasCron = agents.some((a) => a.cron && a.cron.length > 0);
|
|
180
|
+
if (hasGoals) score += 1.5;
|
|
181
|
+
if (hasCron) score += 1;
|
|
182
|
+
|
|
183
|
+
// Multiple agents is a prerequisite for orchestration
|
|
184
|
+
const customAgents = agents.filter(
|
|
185
|
+
(a) => !["hub", "gym", "agentcreator"].includes(a.id)
|
|
186
|
+
);
|
|
187
|
+
if (customAgents.length >= 3) score += 0.5;
|
|
188
|
+
if (customAgents.length >= 5) score += 0.5;
|
|
189
|
+
|
|
190
|
+
// Agents with MCPs suggest integration workflows
|
|
191
|
+
const hasIntegrations = agents.some((a) => a.mcps && a.mcps.length > 0);
|
|
192
|
+
if (hasIntegrations) score += 0.5;
|
|
193
|
+
|
|
194
|
+
// Multiple enabled goals/crons suggest active automation
|
|
195
|
+
const totalGoals = agents.reduce(
|
|
196
|
+
(sum, a) => sum + (a.goals?.filter((g: any) => g.enabled)?.length || 0),
|
|
197
|
+
0
|
|
198
|
+
);
|
|
199
|
+
if (totalGoals >= 2) score += 0.5;
|
|
200
|
+
if (totalGoals >= 4) score += 0.5;
|
|
201
|
+
|
|
202
|
+
return clamp(Math.round(score), 0, 5);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Craft — Can you build, configure, and tune AI systems?
|
|
207
|
+
* Measures: agents created, system prompt quality, MCP configs, tool selection.
|
|
208
|
+
*/
|
|
209
|
+
export function scoreCraft(agents: AgentInfo[]): number {
|
|
210
|
+
if (!agents.length) return 0;
|
|
211
|
+
|
|
212
|
+
let score = 0;
|
|
213
|
+
|
|
214
|
+
// Custom agents created (exclude platform agents)
|
|
215
|
+
const customAgents = agents.filter(
|
|
216
|
+
(a) => !["hub", "gym", "agentcreator"].includes(a.id) && a.agentClass !== "platform"
|
|
217
|
+
);
|
|
218
|
+
|
|
219
|
+
if (customAgents.length >= 1) score += 1;
|
|
220
|
+
if (customAgents.length >= 3) score += 0.5;
|
|
221
|
+
if (customAgents.length >= 5) score += 0.5;
|
|
222
|
+
|
|
223
|
+
// System prompt quality (proxy: non-trivial length)
|
|
224
|
+
const hasGoodPrompts = customAgents.some(
|
|
225
|
+
(a) => (a.systemPromptLength || 0) > 200
|
|
226
|
+
);
|
|
227
|
+
if (hasGoodPrompts) score += 1;
|
|
228
|
+
|
|
229
|
+
// Tool configuration (agents with customized tool sets)
|
|
230
|
+
const hasCustomTools = customAgents.some(
|
|
231
|
+
(a) => a.allowedTools && a.allowedTools.length > 0
|
|
232
|
+
);
|
|
233
|
+
if (hasCustomTools) score += 0.5;
|
|
234
|
+
|
|
235
|
+
// MCP configuration
|
|
236
|
+
const hasMcps = customAgents.some((a) => a.mcps && a.mcps.length > 0);
|
|
237
|
+
if (hasMcps) score += 0.5;
|
|
238
|
+
|
|
239
|
+
// Workspace configuration (agents with real project workspaces, not ~)
|
|
240
|
+
const hasWorkspaces = customAgents.some(
|
|
241
|
+
(a) => a.workspace && a.workspace !== "~" && a.workspace !== "~/"
|
|
242
|
+
);
|
|
243
|
+
if (hasWorkspaces) score += 0.5;
|
|
244
|
+
|
|
245
|
+
// Multiple distinct tool configs shows thoughtful design
|
|
246
|
+
const toolConfigs = new Set(
|
|
247
|
+
customAgents.map((a) => JSON.stringify(a.allowedTools?.sort() || []))
|
|
248
|
+
);
|
|
249
|
+
if (toolConfigs.size >= 2) score += 0.5;
|
|
250
|
+
|
|
251
|
+
return clamp(Math.round(score), 0, 5);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Score all dimensions from available data.
|
|
256
|
+
*/
|
|
257
|
+
export function scoreAllDimensions(
|
|
258
|
+
summaries: ActivitySummary[],
|
|
259
|
+
agents: AgentInfo[],
|
|
260
|
+
programsCompleted: string[],
|
|
261
|
+
totalPrograms: number
|
|
262
|
+
): DimensionScores {
|
|
263
|
+
const userAgentCount = summaries.filter(
|
|
264
|
+
(s) => !["hub", "gym", "agentcreator"].includes(s.agentId) && s.messageCount > 0
|
|
265
|
+
).length;
|
|
266
|
+
|
|
267
|
+
return {
|
|
268
|
+
application: scoreApplication(summaries),
|
|
269
|
+
communication: scoreCommunication(summaries),
|
|
270
|
+
knowledge: scoreKnowledge(programsCompleted, totalPrograms, userAgentCount),
|
|
271
|
+
orchestration: scoreOrchestration(agents),
|
|
272
|
+
craft: scoreCraft(agents),
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Determine trend from comparing current scores to previous scores.
|
|
278
|
+
*/
|
|
279
|
+
export function computeTrends(
|
|
280
|
+
current: DimensionScores,
|
|
281
|
+
previous: DimensionScores | null
|
|
282
|
+
): Record<keyof DimensionScores, "up" | "down" | "stable"> {
|
|
283
|
+
const dims = ["application", "communication", "knowledge", "orchestration", "craft"] as const;
|
|
284
|
+
const result: any = {};
|
|
285
|
+
for (const dim of dims) {
|
|
286
|
+
if (!previous) {
|
|
287
|
+
result[dim] = "stable";
|
|
288
|
+
} else if (current[dim] > previous[dim]) {
|
|
289
|
+
result[dim] = "up";
|
|
290
|
+
} else if (current[dim] < previous[dim]) {
|
|
291
|
+
result[dim] = "down";
|
|
292
|
+
} else {
|
|
293
|
+
result[dim] = "stable";
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
return result;
|
|
297
|
+
}
|