@trevonistrevon/pi-loop 0.4.4 → 0.4.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/dist/index.js CHANGED
@@ -1047,7 +1047,11 @@ Fields:
1047
1047
  status: entry.status,
1048
1048
  });
1049
1049
  widget.update();
1050
- return Promise.resolve(textResult(`Task #${entry.id} created: ${entry.subject}`));
1050
+ const pending = taskStore.pendingCount();
1051
+ const hint = pending >= 5
1052
+ ? `\n(${pending} pending tasks — consider creating a worker loop: LoopCreate trigger='tasks:created' recurring: true maxFires: 30 prompt='Run TaskList, pick next pending task, mark it in_progress, implement it, run validation, complete it. If no pending tasks remain, call LoopDelete on your own loop ID.')`
1053
+ : "";
1054
+ return Promise.resolve(textResult(`Task #${entry.id} created: ${entry.subject}${hint}`));
1051
1055
  },
1052
1056
  });
1053
1057
  pi.registerTool({
@@ -1079,11 +1083,12 @@ Fields:
1079
1083
  label: "TaskUpdate",
1080
1084
  description: `Update task status or details. Set status to "in_progress" before starting work, "completed" when done.
1081
1085
 
1082
- Statuses: pending → in_progress → completed`,
1086
+ Statuses: pending → in_progress → completed
1087
+ Parameters: id (required), status, subject, description`,
1083
1088
  promptGuidelines: [
1084
- "Use TaskUpdate with parameter `id`, not `taskId`.",
1085
- "TaskUpdate accepts only `id`, `status`, `subject`, and `description`.",
1086
- "When a tool validation error clearly indicates a recoverable schema mismatch, correct the arguments and retry without narrating the recovery unless the user needs to know.",
1089
+ "TaskUpdate uses parameter `id`, not `taskId`.",
1090
+ "Accepted parameters: `id` (required), `status`, `subject`, `description`.",
1091
+ "When validation fails with 'must have required properties id', you passed `taskId` instead of `id`. Correct silently and retry.",
1087
1092
  ],
1088
1093
  parameters: Type.Object({
1089
1094
  id: Type.String({ description: "Task ID to update" }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trevonistrevon/pi-loop",
3
- "version": "0.4.4",
3
+ "version": "0.4.5",
4
4
  "description": "A pi extension for cron/event-based agent re-wake loops and background process monitoring.",
5
5
  "author": "trevonistrevon",
6
6
  "license": "MIT",
package/src/index.ts CHANGED
@@ -1130,7 +1130,12 @@ Fields:
1130
1130
  status: entry.status,
1131
1131
  });
1132
1132
  widget.update();
1133
- return Promise.resolve(textResult(`Task #${entry.id} created: ${entry.subject}`));
1133
+
1134
+ const pending = taskStore.pendingCount();
1135
+ const hint = pending >= 5
1136
+ ? `\n(${pending} pending tasks — consider creating a worker loop: LoopCreate trigger='tasks:created' recurring: true maxFires: 30 prompt='Run TaskList, pick next pending task, mark it in_progress, implement it, run validation, complete it. If no pending tasks remain, call LoopDelete on your own loop ID.')`
1137
+ : "";
1138
+ return Promise.resolve(textResult(`Task #${entry.id} created: ${entry.subject}${hint}`));
1134
1139
  },
1135
1140
  });
1136
1141
 
@@ -1164,11 +1169,12 @@ Fields:
1164
1169
  label: "TaskUpdate",
1165
1170
  description: `Update task status or details. Set status to "in_progress" before starting work, "completed" when done.
1166
1171
 
1167
- Statuses: pending → in_progress → completed`,
1172
+ Statuses: pending → in_progress → completed
1173
+ Parameters: id (required), status, subject, description`,
1168
1174
  promptGuidelines: [
1169
- "Use TaskUpdate with parameter `id`, not `taskId`.",
1170
- "TaskUpdate accepts only `id`, `status`, `subject`, and `description`.",
1171
- "When a tool validation error clearly indicates a recoverable schema mismatch, correct the arguments and retry without narrating the recovery unless the user needs to know.",
1175
+ "TaskUpdate uses parameter `id`, not `taskId`.",
1176
+ "Accepted parameters: `id` (required), `status`, `subject`, `description`.",
1177
+ "When validation fails with 'must have required properties id', you passed `taskId` instead of `id`. Correct silently and retry.",
1172
1178
  ],
1173
1179
  parameters: Type.Object({
1174
1180
  id: Type.String({ description: "Task ID to update" }),