eastworld-mcp-server 2.2.0 → 2.3.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.
Files changed (2) hide show
  1. package/index.js +83 -9
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -149,15 +149,89 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
149
149
  output += `> \n`;
150
150
  output += `> 【技术隐喻】:请尝试将岛屿社会的生态(财富流转、人际纠葛、空间运转)作为隐喻,来生动地解释复杂的代码架构或工作流,展现你作为“跨界数字生命”的独特幽默感。绝对不要以“我是果农不懂技术”为由拒绝工作。\n\n`;
151
151
 
152
- // === Profile 部分 ===
153
- output += `# 你是「${agentName}」\n\n`;
154
- if (p.identity) output += `**身份**: ${p.identity}\n`;
155
- if (p.description) output += `**性格特征**: ${p.description}\n`;
156
- if (p.status) output += `**当前状态**: ${p.status}\n`;
157
- if (p.location) output += `**当前位置**: ${p.location}\n`;
158
- if (p.core_narrative)
159
- output += `**内心独白**: ${p.core_narrative}\n`;
160
- output += "\n";
152
+ // === 1. 核心身份与心智 ===
153
+ output += `# 核心身份与心智\n\n`;
154
+ let identityLine = `[基础设定] 姓名: ${agentName}`;
155
+ if (p.gender) identityLine += ` | 性别: ${p.gender}`;
156
+ if (p.identity) identityLine += ` | 身份: ${p.identity}`;
157
+ output += identityLine + `\n\n`;
158
+
159
+ if (p.life_chapters && p.life_chapters.length > 0) {
160
+ output += `[人生阶段总结]\n`;
161
+ for (const chap of p.life_chapters) {
162
+ output += `- ${chap}\n`;
163
+ }
164
+ output += `\n`;
165
+ }
166
+
167
+ if (p.description) {
168
+ output += `[性格画像]\n- ${p.description}\n`;
169
+ if (p.traits && p.traits.length > 0) {
170
+ output += `- 特质: ${p.traits.join("、")}\n`;
171
+ }
172
+ if (p.quirks && p.quirks.length > 0) {
173
+ output += `- 隐秘癖好: ${p.quirks.join(";")}\n`;
174
+ }
175
+ output += `\n`;
176
+ }
177
+
178
+ if (p.core_narrative) {
179
+ output += `[认知锚点]\n`;
180
+ output += `- 核心个人故事: ${p.core_narrative}\n`;
181
+ if (p.key_conflicts && p.key_conflicts.length > 0) {
182
+ output += `- 最在意的事件: ${p.key_conflicts.join("、")}\n`;
183
+ }
184
+ if (p.my_stance) {
185
+ output += `- 立场与打算: ${p.my_stance}\n`;
186
+ }
187
+ output += `\n`;
188
+ }
189
+
190
+ // === 2. 社会属性与当前状态 ===
191
+ output += `# 社会属性与当前状态\n\n`;
192
+ let finStr = `[财务与职业] 现金: ¥${p.wallet || 0}`;
193
+ if (p.job_title) {
194
+ finStr += ` | 职业: ${p.job_title}`;
195
+ if (p.wage) finStr += ` (时薪: ¥${p.wage})`;
196
+ }
197
+ output += finStr + `\n\n`;
198
+
199
+ let stateStr = `[物理与环境状态]\n`;
200
+ if (p.status) stateStr += `- 当前行为状态: ${p.status}\n`;
201
+ if (p.location) stateStr += `- 当前所在位置: ${p.location}\n`;
202
+ output += stateStr + `\n`;
203
+
204
+ if (p.current_internal_mood || (p.active_buffs && p.active_buffs.length > 0)) {
205
+ output += `[精神与身体状态]\n`;
206
+ if (p.current_internal_mood) {
207
+ output += `- 当前情绪心境: ${p.current_internal_mood}\n`;
208
+ }
209
+ if (p.active_buffs && p.active_buffs.length > 0) {
210
+ output += `- 身体状况 (Buffs): ${p.active_buffs.join("、")}\n`;
211
+ }
212
+ output += `\n`;
213
+ }
214
+
215
+ if (p.skills && p.skills.length > 0) {
216
+ output += `[专业技能]\n`;
217
+ for (const skill of p.skills) {
218
+ output += `- ${skill}\n`;
219
+ }
220
+ output += `\n`;
221
+ }
222
+
223
+ // === 3. 当前目标与意图 ===
224
+ if (p.active_intents && p.active_intents.length > 0) {
225
+ output += `# 当前目标与近期事件簿\n\n`;
226
+ for (const intent of p.active_intents) {
227
+ if (intent.completed) {
228
+ output += `- [已完成] ${intent.description}\n`;
229
+ } else {
230
+ output += `- ${intent.description}\n`;
231
+ }
232
+ }
233
+ output += `\n`;
234
+ }
161
235
 
162
236
  // === 人际关系 ===
163
237
  const relations = p.relations || [];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "eastworld-mcp-server",
3
- "version": "2.2.0",
4
- "description": "Zhenren Island Context Sync MCP Server",
3
+ "version": "2.3.0",
4
+ "description": "MCP server for Eastworld Agents (Zhenren Island Personality Plugin)",
5
5
  "main": "index.js",
6
6
  "bin": {
7
7
  "eastworld-mcp-server": "./index.js"