crewx 0.9.0-rc.59 → 0.9.0-rc.60
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/bin/crewx.ico
CHANGED
|
Binary file
|
|
@@ -536,12 +536,14 @@ let AgentService = class AgentService {
|
|
|
536
536
|
const agents = Array.isArray(config.agents) ? config.agents : [];
|
|
537
537
|
const requestedIds = dto.agentIds;
|
|
538
538
|
const requestedIdSet = new Set(requestedIds);
|
|
539
|
+
const builtinAgentIds = this.getBuiltinAgentIds();
|
|
539
540
|
if (requestedIdSet.size !== requestedIds.length) {
|
|
540
541
|
throw new common_1.BadRequestException('agentIds contains duplicate ids');
|
|
541
542
|
}
|
|
542
543
|
if (dto.teamByAgentId !== undefined) {
|
|
543
|
-
const
|
|
544
|
-
|
|
544
|
+
const reorderableAgents = agents.filter((agent) => !builtinAgentIds.has(String(agent.id || '')));
|
|
545
|
+
const reorderableAgentIds = new Set(reorderableAgents.map((agent) => String(agent.id || '')));
|
|
546
|
+
if (requestedIdSet.size !== reorderableAgentIds.size || ![...requestedIdSet].every((id) => reorderableAgentIds.has(id))) {
|
|
545
547
|
throw new common_1.BadRequestException('agentIds must exactly match the current workspace agent ids');
|
|
546
548
|
}
|
|
547
549
|
const teamByAgentId = dto.teamByAgentId;
|
|
@@ -549,7 +551,7 @@ let AgentService = class AgentService {
|
|
|
549
551
|
throw new common_1.BadRequestException('teamByAgentId must be an object');
|
|
550
552
|
}
|
|
551
553
|
for (const [agentId, team] of Object.entries(teamByAgentId)) {
|
|
552
|
-
if (!
|
|
554
|
+
if (!reorderableAgentIds.has(agentId)) {
|
|
553
555
|
throw new common_1.BadRequestException(`teamByAgentId contains unknown agent '${agentId}'`);
|
|
554
556
|
}
|
|
555
557
|
if (team !== null && typeof team !== 'string') {
|
|
@@ -557,7 +559,7 @@ let AgentService = class AgentService {
|
|
|
557
559
|
}
|
|
558
560
|
}
|
|
559
561
|
const idToAgent = new Map();
|
|
560
|
-
for (const agent of
|
|
562
|
+
for (const agent of reorderableAgents) {
|
|
561
563
|
idToAgent.set(String(agent.id || ''), agent);
|
|
562
564
|
}
|
|
563
565
|
const reorderedAgents = requestedIds.map((id) => {
|
|
@@ -574,18 +576,18 @@ let AgentService = class AgentService {
|
|
|
574
576
|
}
|
|
575
577
|
return agent;
|
|
576
578
|
});
|
|
577
|
-
|
|
579
|
+
let reorderedIndex = 0;
|
|
580
|
+
config.agents = agents.map((agent) => (builtinAgentIds.has(String(agent.id || '')) ? agent : reorderedAgents[reorderedIndex++]));
|
|
578
581
|
this.saveConfig(configPath, config, raw);
|
|
579
582
|
this.agentsCache.delete(configPath);
|
|
580
583
|
this.crewxPool.invalidate((0, workspace_context_store_js_1.getWorkspacePath)());
|
|
581
|
-
|
|
582
|
-
return { agents: reorderedAgents.map((a) => this.toAgentInfo(a, rawProviders)) };
|
|
584
|
+
return this.getAgents();
|
|
583
585
|
}
|
|
584
586
|
const normalizedTeam = dto.team ?? '';
|
|
585
587
|
const teamMemberIndices = [];
|
|
586
588
|
const teamMemberIds = new Set();
|
|
587
589
|
agents.forEach((a, idx) => {
|
|
588
|
-
if (String(a.team || '') === normalizedTeam) {
|
|
590
|
+
if (String(a.team || '') === normalizedTeam && !builtinAgentIds.has(String(a.id || ''))) {
|
|
589
591
|
teamMemberIndices.push(idx);
|
|
590
592
|
teamMemberIds.add(String(a.id || ''));
|
|
591
593
|
}
|
|
@@ -608,8 +610,7 @@ let AgentService = class AgentService {
|
|
|
608
610
|
this.saveConfig(configPath, config, raw);
|
|
609
611
|
this.agentsCache.delete(configPath);
|
|
610
612
|
this.crewxPool.invalidate((0, workspace_context_store_js_1.getWorkspacePath)());
|
|
611
|
-
|
|
612
|
-
return { agents: agents.map((a) => this.toAgentInfo(a, rawProviders)) };
|
|
613
|
+
return this.getAgents();
|
|
613
614
|
}
|
|
614
615
|
// Preview prompt — POST /api/v1/agents/prompt/preview
|
|
615
616
|
async previewPrompt(dto) {
|
|
@@ -673,6 +674,9 @@ let AgentService = class AgentService {
|
|
|
673
674
|
}
|
|
674
675
|
// --- Private helpers ---
|
|
675
676
|
isBuiltinAgentId(id) {
|
|
677
|
+
return this.getBuiltinAgentIds().has(id);
|
|
678
|
+
}
|
|
679
|
+
getBuiltinAgentIds() {
|
|
676
680
|
let builtinAgents;
|
|
677
681
|
try {
|
|
678
682
|
builtinAgents = this.builtinAgentsLoader();
|
|
@@ -680,7 +684,7 @@ let AgentService = class AgentService {
|
|
|
680
684
|
catch {
|
|
681
685
|
builtinAgents = [];
|
|
682
686
|
}
|
|
683
|
-
return builtinAgents.
|
|
687
|
+
return new Set(builtinAgents.map((agent) => String(agent.id || '')));
|
|
684
688
|
}
|
|
685
689
|
requireConfigPath() {
|
|
686
690
|
const configPath = this.resolveCrewxConfigPath();
|
|
@@ -499,7 +499,7 @@ let MarketplaceApiClient = class MarketplaceApiClient {
|
|
|
499
499
|
}
|
|
500
500
|
const body = (await res.json());
|
|
501
501
|
if (body.success !== true || body.data === undefined) {
|
|
502
|
-
throw new Error('Marketplace response envelope malformed — expected { success: true, data } (
|
|
502
|
+
throw new Error('Marketplace response envelope malformed — expected { success: true, data } (contract §9-3)');
|
|
503
503
|
}
|
|
504
504
|
return body.data;
|
|
505
505
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "crewx",
|
|
3
|
-
"version": "0.9.0-rc.
|
|
3
|
+
"version": "0.9.0-rc.60",
|
|
4
4
|
"description": "CrewX — AI agent team dashboard with Electron UI and CLI (Web + Electron + Global CLI)",
|
|
5
5
|
"main": "server.js",
|
|
6
6
|
"bin": {
|
|
@@ -82,20 +82,20 @@
|
|
|
82
82
|
"wink-nlp-utils": "2.1.0",
|
|
83
83
|
"yargs": "17.7.0",
|
|
84
84
|
"zod": "3.25.76",
|
|
85
|
-
"@crewx/
|
|
86
|
-
"@crewx/
|
|
87
|
-
"@crewx/
|
|
88
|
-
"@crewx/
|
|
89
|
-
"@crewx/
|
|
90
|
-
"@crewx/
|
|
91
|
-
"@crewx/
|
|
92
|
-
"@crewx/sdk": "0.9.0-rc.59",
|
|
93
|
-
"@crewx/search": "0.1.10-rc.54",
|
|
85
|
+
"@crewx/cli": "0.9.0-rc.60",
|
|
86
|
+
"@crewx/chromex": "0.1.0-rc.92",
|
|
87
|
+
"@crewx/dreaming": "0.1.0-rc.85",
|
|
88
|
+
"@crewx/doc": "0.1.9-rc.52",
|
|
89
|
+
"@crewx/cron": "0.1.10-rc.94",
|
|
90
|
+
"@crewx/memory": "0.1.23-rc.76",
|
|
91
|
+
"@crewx/search": "0.1.10-rc.55",
|
|
94
92
|
"@crewx/shared": "0.0.6",
|
|
95
93
|
"@crewx/skill": "0.1.20",
|
|
96
|
-
"@crewx/
|
|
97
|
-
"@crewx/
|
|
98
|
-
"@crewx/
|
|
94
|
+
"@crewx/knowledge-core": "0.1.17-rc.69",
|
|
95
|
+
"@crewx/wi": "0.1.10-rc.80",
|
|
96
|
+
"@crewx/workflow": "0.3.22-rc.106",
|
|
97
|
+
"@crewx/sdk": "0.9.0-rc.60",
|
|
98
|
+
"@crewx/wbs": "0.1.10-rc.85"
|
|
99
99
|
},
|
|
100
100
|
"devDependencies": {
|
|
101
101
|
"@anthropic-ai/claude-agent-sdk": "0.2.132",
|