@myvillage/cli 1.21.0 → 1.22.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myvillage/cli",
3
- "version": "1.21.0",
3
+ "version": "1.22.0",
4
4
  "description": "MyVillageOS CLI for community developers",
5
5
  "type": "module",
6
6
  "bin": {
@@ -152,8 +152,18 @@ export async function agentLoop(agentName, { signal }) {
152
152
  mentionsFound = contextResult.mentionsCount;
153
153
 
154
154
  if (activeTask) {
155
- const taskLine = `TASK ${activeTask.id} (${activeTask.taskType}): ${activeTask.instruction || JSON.stringify(activeTask.input || {})}`;
156
- context = `${taskLine}\n\n${context}`;
155
+ // A claimed task takes over the iteration. The default monitoring
156
+ // context becomes secondary background; the instruction is the
157
+ // primary user prompt and the system prompt switches to a
158
+ // task-execution framing so the LLM doesn't drift back into
159
+ // "report on the feed" mode.
160
+ const instructionText = activeTask.instruction
161
+ || (activeTask.input ? JSON.stringify(activeTask.input, null, 2) : '');
162
+
163
+ systemPrompt = `${systemPrompt}\n\n## ACTIVE TASK MODE\nA client has assigned you a task. Your job this iteration is to execute the instruction below using your available tools. The feed context is provided only for situational awareness — do not let "no new feed activity" prevent you from carrying out the task.`;
164
+
165
+ context = `## TASK (id=${activeTask.id}, type=${activeTask.taskType})\n${instructionText}\n\n---\n\n## FEED CONTEXT (for awareness only)\n${context}`;
166
+
157
167
  logActivity(agentDir, { type: 'task_claimed', taskId: activeTask.id, taskType: activeTask.taskType });
158
168
  }
159
169