ideaco 1.1.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/.dockerignore +33 -0
- package/.nvmrc +1 -0
- package/ARCHITECTURE.md +394 -0
- package/Dockerfile +50 -0
- package/LICENSE +29 -0
- package/README.md +206 -0
- package/bin/i18n.js +46 -0
- package/bin/ideaco.js +494 -0
- package/deploy.sh +15 -0
- package/docker-compose.yml +30 -0
- package/electron/main.cjs +986 -0
- package/electron/preload.cjs +14 -0
- package/electron/web-backends.cjs +854 -0
- package/jsconfig.json +8 -0
- package/next.config.mjs +34 -0
- package/package.json +134 -0
- package/postcss.config.mjs +6 -0
- package/public/demo/dashboard.png +0 -0
- package/public/demo/employee.png +0 -0
- package/public/demo/messages.png +0 -0
- package/public/demo/office.png +0 -0
- package/public/demo/requirement.png +0 -0
- package/public/logo.jpeg +0 -0
- package/public/logo.png +0 -0
- package/scripts/prepare-electron.js +67 -0
- package/scripts/release.js +76 -0
- package/src/app/api/agents/[agentId]/chat/route.js +70 -0
- package/src/app/api/agents/[agentId]/conversations/route.js +35 -0
- package/src/app/api/agents/[agentId]/route.js +106 -0
- package/src/app/api/avatar/route.js +104 -0
- package/src/app/api/browse-dir/route.js +44 -0
- package/src/app/api/chat/route.js +265 -0
- package/src/app/api/company/factory-reset/route.js +43 -0
- package/src/app/api/company/route.js +82 -0
- package/src/app/api/departments/[deptId]/agents/[agentId]/dismiss/route.js +19 -0
- package/src/app/api/departments/route.js +92 -0
- package/src/app/api/group-chat-loop/events/route.js +70 -0
- package/src/app/api/group-chat-loop/route.js +94 -0
- package/src/app/api/mailbox/route.js +100 -0
- package/src/app/api/messages/route.js +14 -0
- package/src/app/api/providers/[id]/configure/route.js +21 -0
- package/src/app/api/providers/[id]/refresh-cookie/route.js +38 -0
- package/src/app/api/providers/[id]/test-cookie/route.js +28 -0
- package/src/app/api/providers/route.js +11 -0
- package/src/app/api/requirements/route.js +242 -0
- package/src/app/api/secretary/route.js +65 -0
- package/src/app/api/system/cli-backends/route.js +91 -0
- package/src/app/api/system/cron/route.js +110 -0
- package/src/app/api/system/knowledge/route.js +104 -0
- package/src/app/api/system/plugins/route.js +40 -0
- package/src/app/api/system/skills/route.js +46 -0
- package/src/app/api/system/status/route.js +46 -0
- package/src/app/api/talent-market/[profileId]/recall/route.js +22 -0
- package/src/app/api/talent-market/[profileId]/route.js +17 -0
- package/src/app/api/talent-market/route.js +26 -0
- package/src/app/api/teams/route.js +773 -0
- package/src/app/api/ws-files/[departmentId]/file/route.js +27 -0
- package/src/app/api/ws-files/[departmentId]/files/route.js +22 -0
- package/src/app/globals.css +130 -0
- package/src/app/layout.jsx +40 -0
- package/src/app/page.jsx +97 -0
- package/src/components/AgentChatModal.jsx +164 -0
- package/src/components/AgentDetailModal.jsx +425 -0
- package/src/components/AgentSpyModal.jsx +481 -0
- package/src/components/AvatarGrid.jsx +29 -0
- package/src/components/BossProfileModal.jsx +162 -0
- package/src/components/CachedAvatar.jsx +77 -0
- package/src/components/ChatPanel.jsx +219 -0
- package/src/components/ChatShared.jsx +255 -0
- package/src/components/DepartmentDetail.jsx +842 -0
- package/src/components/DepartmentView.jsx +367 -0
- package/src/components/FileReference.jsx +260 -0
- package/src/components/FilesView.jsx +465 -0
- package/src/components/GroupChatView.jsx +799 -0
- package/src/components/Mailbox.jsx +926 -0
- package/src/components/MessagesView.jsx +112 -0
- package/src/components/OnboardingGuide.jsx +209 -0
- package/src/components/OrgTree.jsx +151 -0
- package/src/components/Overview.jsx +391 -0
- package/src/components/PixelOffice.jsx +2281 -0
- package/src/components/ProviderGrid.jsx +551 -0
- package/src/components/ProvidersBoard.jsx +16 -0
- package/src/components/RequirementDetail.jsx +1279 -0
- package/src/components/RequirementsBoard.jsx +187 -0
- package/src/components/SecretarySettings.jsx +295 -0
- package/src/components/SetupWizard.jsx +388 -0
- package/src/components/Sidebar.jsx +169 -0
- package/src/components/SystemMonitor.jsx +808 -0
- package/src/components/TalentMarket.jsx +183 -0
- package/src/components/TeamDetail.jsx +697 -0
- package/src/core/agent/base-agent.js +104 -0
- package/src/core/agent/chat-store.js +602 -0
- package/src/core/agent/cli-agent/backends/claude-code/README.md +52 -0
- package/src/core/agent/cli-agent/backends/claude-code/config.js +27 -0
- package/src/core/agent/cli-agent/backends/codebuddy/README.md +236 -0
- package/src/core/agent/cli-agent/backends/codebuddy/config.js +27 -0
- package/src/core/agent/cli-agent/backends/codex/README.md +51 -0
- package/src/core/agent/cli-agent/backends/codex/config.js +27 -0
- package/src/core/agent/cli-agent/backends/index.js +27 -0
- package/src/core/agent/cli-agent/backends/registry.js +580 -0
- package/src/core/agent/cli-agent/index.js +154 -0
- package/src/core/agent/index.js +60 -0
- package/src/core/agent/llm-agent/client.js +320 -0
- package/src/core/agent/llm-agent/index.js +97 -0
- package/src/core/agent/message-bus.js +211 -0
- package/src/core/agent/session.js +608 -0
- package/src/core/agent/tools.js +596 -0
- package/src/core/agent/web-agent/backends/base-backend.js +180 -0
- package/src/core/agent/web-agent/backends/chatgpt/client.js +146 -0
- package/src/core/agent/web-agent/backends/chatgpt/config.js +148 -0
- package/src/core/agent/web-agent/backends/chatgpt/dom-scripts.js +303 -0
- package/src/core/agent/web-agent/backends/index.js +91 -0
- package/src/core/agent/web-agent/index.js +278 -0
- package/src/core/agent/web-agent/web-client.js +407 -0
- package/src/core/employee/base-employee.js +1088 -0
- package/src/core/employee/index.js +35 -0
- package/src/core/employee/knowledge.js +327 -0
- package/src/core/employee/lifecycle.js +990 -0
- package/src/core/employee/memory/index.js +642 -0
- package/src/core/employee/memory/store.js +143 -0
- package/src/core/employee/performance.js +224 -0
- package/src/core/employee/secretary.js +625 -0
- package/src/core/employee/skills.js +398 -0
- package/src/core/index.js +38 -0
- package/src/core/organization/company.js +2600 -0
- package/src/core/organization/department.js +737 -0
- package/src/core/organization/group-chat-loop.js +264 -0
- package/src/core/organization/index.js +8 -0
- package/src/core/organization/persistence.js +111 -0
- package/src/core/organization/team.js +267 -0
- package/src/core/organization/workforce/hr.js +377 -0
- package/src/core/organization/workforce/providers.js +468 -0
- package/src/core/organization/workforce/role-archetypes.js +805 -0
- package/src/core/organization/workforce/talent-market.js +205 -0
- package/src/core/prompts.js +532 -0
- package/src/core/requirement.js +1789 -0
- package/src/core/system/audit.js +483 -0
- package/src/core/system/cron.js +449 -0
- package/src/core/system/index.js +7 -0
- package/src/core/system/plugin.js +2183 -0
- package/src/core/utils/json-parse.js +188 -0
- package/src/core/workspace.js +239 -0
- package/src/lib/api-i18n.js +211 -0
- package/src/lib/avatar.js +268 -0
- package/src/lib/client-store.js +1025 -0
- package/src/lib/config-validator.js +483 -0
- package/src/lib/format-time.js +22 -0
- package/src/lib/hooks.js +414 -0
- package/src/lib/i18n.js +134 -0
- package/src/lib/paths.js +23 -0
- package/src/lib/store.js +72 -0
- package/src/locales/de.js +393 -0
- package/src/locales/en.js +1054 -0
- package/src/locales/es.js +393 -0
- package/src/locales/fr.js +393 -0
- package/src/locales/ja.js +501 -0
- package/src/locales/ko.js +513 -0
- package/src/locales/zh.js +828 -0
- package/tailwind.config.mjs +11 -0
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Talent Market - Buffer pool for dismissed Agents
|
|
5
|
+
*
|
|
6
|
+
* Dismissed employees enter the talent market, retaining their memories and skill experience.
|
|
7
|
+
* The secretary can recall former employees from the talent market; they'll return with their original memories and newly acquired skills.
|
|
8
|
+
* Alternatively, you can choose not to reuse them and recruit new hires instead.
|
|
9
|
+
*/
|
|
10
|
+
export class TalentMarket {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.pool = new Map(); // talentId => TalentProfile
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Register a dismissed Agent into the talent market
|
|
17
|
+
* @param {Agent} agent - The dismissed Agent
|
|
18
|
+
* @param {string} reason - Dismissal reason
|
|
19
|
+
* @param {object} performanceData - Performance data
|
|
20
|
+
* @returns {object} Talent profile
|
|
21
|
+
*/
|
|
22
|
+
register(agent, reason = 'Project ended', performanceData = null) {
|
|
23
|
+
const profile = {
|
|
24
|
+
id: uuidv4(),
|
|
25
|
+
originalAgentId: agent.id,
|
|
26
|
+
name: agent.name,
|
|
27
|
+
role: agent.role,
|
|
28
|
+
prompt: agent.prompt,
|
|
29
|
+
skills: [...agent.skills],
|
|
30
|
+
// Skills potentially acquired while in the talent market
|
|
31
|
+
acquiredSkills: [],
|
|
32
|
+
provider: agent.provider,
|
|
33
|
+
// Save avatar and personal attributes
|
|
34
|
+
avatar: agent.avatar,
|
|
35
|
+
avatarParams: agent.avatarParams || null,
|
|
36
|
+
gender: agent.gender,
|
|
37
|
+
age: agent.age,
|
|
38
|
+
personality: agent.personality,
|
|
39
|
+
signature: agent.signature,
|
|
40
|
+
// Save complete memory data
|
|
41
|
+
memorySnapshot: agent.memory ? agent.memory.serialize() : null,
|
|
42
|
+
// Save performance data
|
|
43
|
+
performanceData,
|
|
44
|
+
// Work history
|
|
45
|
+
workHistory: agent.taskHistory.map(h => ({
|
|
46
|
+
task: h.task,
|
|
47
|
+
completedAt: h.completedAt,
|
|
48
|
+
})),
|
|
49
|
+
previousDepartment: agent.department,
|
|
50
|
+
dismissalReason: reason,
|
|
51
|
+
registeredAt: new Date(),
|
|
52
|
+
status: 'available', // available | recalled | expired
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
this.pool.set(profile.id, profile);
|
|
56
|
+
|
|
57
|
+
console.log(` šŖ [${agent.name}] (${agent.role}) entered the talent market`);
|
|
58
|
+
console.log(` Dismissal reason: ${reason}`);
|
|
59
|
+
console.log(` Skills: ${agent.skills.join(', ')}`);
|
|
60
|
+
if (agent.memory) {
|
|
61
|
+
console.log(` Memories: short-term ${agent.memory.shortTerm.length}, long-term ${agent.memory.longTerm.length}`);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return profile;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Search for available talent in the talent market
|
|
69
|
+
* @param {object} criteria - Search criteria
|
|
70
|
+
* @param {string} [criteria.role] - Role/position
|
|
71
|
+
* @param {string[]} [criteria.skills] - Required skills
|
|
72
|
+
* @param {string} [criteria.name] - Name search
|
|
73
|
+
* @param {number} [criteria.minScore] - Minimum performance score
|
|
74
|
+
* @returns {Array} List of matching talent profiles
|
|
75
|
+
*/
|
|
76
|
+
search(criteria = {}) {
|
|
77
|
+
const results = [];
|
|
78
|
+
|
|
79
|
+
for (const profile of this.pool.values()) {
|
|
80
|
+
if (profile.status !== 'available') continue;
|
|
81
|
+
|
|
82
|
+
let match = true;
|
|
83
|
+
|
|
84
|
+
// Match by role
|
|
85
|
+
if (criteria.role && !profile.role.includes(criteria.role)) {
|
|
86
|
+
match = false;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Match by skills
|
|
90
|
+
if (criteria.skills && criteria.skills.length > 0) {
|
|
91
|
+
const allSkills = [...profile.skills, ...profile.acquiredSkills];
|
|
92
|
+
const hasSkills = criteria.skills.some(s =>
|
|
93
|
+
allSkills.some(ps => ps.includes(s))
|
|
94
|
+
);
|
|
95
|
+
if (!hasSkills) match = false;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// Match by name
|
|
99
|
+
if (criteria.name && !profile.name.includes(criteria.name)) {
|
|
100
|
+
match = false;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// Match by minimum performance score
|
|
104
|
+
if (criteria.minScore && profile.performanceData) {
|
|
105
|
+
if (profile.performanceData.averageScore < criteria.minScore) {
|
|
106
|
+
match = false;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
if (match) results.push(profile);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
return results;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Recall a talent from the talent market
|
|
118
|
+
* @param {string} profileId - Talent profile ID
|
|
119
|
+
* @param {string[]} [newSkills] - New skills acquired while in the talent market
|
|
120
|
+
* @returns {object} Recalled talent profile (with memories and new skills)
|
|
121
|
+
*/
|
|
122
|
+
recall(profileId, newSkills = []) {
|
|
123
|
+
const profile = this.pool.get(profileId);
|
|
124
|
+
if (!profile) {
|
|
125
|
+
throw new Error(`Profile not found in talent market: ${profileId}`);
|
|
126
|
+
}
|
|
127
|
+
if (profile.status !== 'available') {
|
|
128
|
+
throw new Error(`This talent is no longer available, status: ${profile.status}`);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// Add new skills
|
|
132
|
+
profile.acquiredSkills.push(...newSkills);
|
|
133
|
+
profile.status = 'recalled';
|
|
134
|
+
|
|
135
|
+
console.log(` š Recalled from talent market: [${profile.name}] (${profile.role})`);
|
|
136
|
+
console.log(` Original skills: ${profile.skills.join(', ')}`);
|
|
137
|
+
if (profile.acquiredSkills.length > 0) {
|
|
138
|
+
console.log(` Newly acquired skills: ${profile.acquiredSkills.join(', ')}`);
|
|
139
|
+
}
|
|
140
|
+
if (profile.memorySnapshot) {
|
|
141
|
+
const memData = profile.memorySnapshot;
|
|
142
|
+
console.log(` Memories: short-term ${memData.shortTerm?.length || 0}, long-term ${memData.longTerm?.length || 0}`);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
return profile;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Permanently remove a talent from the talent market
|
|
150
|
+
* @param {string} profileId - Talent profile ID
|
|
151
|
+
* @returns {object} The removed talent profile
|
|
152
|
+
*/
|
|
153
|
+
remove(profileId) {
|
|
154
|
+
const profile = this.pool.get(profileId);
|
|
155
|
+
if (!profile) {
|
|
156
|
+
throw new Error(`Profile not found in talent market: ${profileId}`);
|
|
157
|
+
}
|
|
158
|
+
this.pool.delete(profileId);
|
|
159
|
+
console.log(` šļø Permanently removed from talent market: [${profile.name}] (${profile.role})`);
|
|
160
|
+
return profile;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Get all available talent in the talent market
|
|
165
|
+
*/
|
|
166
|
+
listAvailable() {
|
|
167
|
+
return [...this.pool.values()].filter(p => p.status === 'available');
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Get talent market statistics
|
|
172
|
+
*/
|
|
173
|
+
getStats() {
|
|
174
|
+
const all = [...this.pool.values()];
|
|
175
|
+
return {
|
|
176
|
+
total: all.length,
|
|
177
|
+
available: all.filter(p => p.status === 'available').length,
|
|
178
|
+
recalled: all.filter(p => p.status === 'recalled').length,
|
|
179
|
+
byRole: all.reduce((acc, p) => {
|
|
180
|
+
acc[p.role] = (acc[p.role] || 0) + 1;
|
|
181
|
+
return acc;
|
|
182
|
+
}, {}),
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Print talent market information
|
|
188
|
+
*/
|
|
189
|
+
print() {
|
|
190
|
+
const available = this.listAvailable();
|
|
191
|
+
console.log(`\nšŖ Talent Market (${available.length} available):`);
|
|
192
|
+
if (available.length === 0) {
|
|
193
|
+
console.log(' (empty)');
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
available.forEach(p => {
|
|
197
|
+
const allSkills = [...p.skills, ...p.acquiredSkills.map(s => `${s}(new)`)];
|
|
198
|
+
console.log(` š¤ ${p.name} (${p.role}) - ${p.dismissalReason}`);
|
|
199
|
+
console.log(` Skills: ${allSkills.join(', ')}`);
|
|
200
|
+
if (p.performanceData) {
|
|
201
|
+
console.log(` Historical performance: ${p.performanceData.averageScore} pts`);
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
}
|