@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 +10 -5
- package/package.json +1 -1
- package/src/index.ts +11 -5
package/dist/index.js
CHANGED
|
@@ -1047,7 +1047,11 @@ Fields:
|
|
|
1047
1047
|
status: entry.status,
|
|
1048
1048
|
});
|
|
1049
1049
|
widget.update();
|
|
1050
|
-
|
|
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
|
-
"
|
|
1085
|
-
"
|
|
1086
|
-
"When
|
|
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
package/src/index.ts
CHANGED
|
@@ -1130,7 +1130,12 @@ Fields:
|
|
|
1130
1130
|
status: entry.status,
|
|
1131
1131
|
});
|
|
1132
1132
|
widget.update();
|
|
1133
|
-
|
|
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
|
-
"
|
|
1170
|
-
"
|
|
1171
|
-
"When
|
|
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" }),
|