agent-planner-mcp 1.5.13 → 1.5.14
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 +1 -1
- package/src/tools/bdi/desires.js +6 -6
package/package.json
CHANGED
package/src/tools/bdi/desires.js
CHANGED
|
@@ -114,15 +114,15 @@ async function updateGoalHandler(args, apiClient) {
|
|
|
114
114
|
// with the backend, but success_criteria must be camelCased to successCriteria
|
|
115
115
|
// — the goal update schema is .strict(), so the snake_case key was rejected
|
|
116
116
|
// with a 400 (the one multi-word field, hence "description writes but
|
|
117
|
-
// success_criteria fails").
|
|
118
|
-
// { criteria: [...] }
|
|
117
|
+
// success_criteria fails"). Send the array shape directly: it is the backend's
|
|
118
|
+
// preferred form. (The old { criteria: [...] } wrap made the backend count
|
|
119
|
+
// Object.keys()==1 and skip per-criterion knowledge grounding.)
|
|
119
120
|
const directFields = {};
|
|
120
121
|
for (const k of ['title', 'description', 'priority', 'status']) {
|
|
121
122
|
if (changes[k] !== undefined) directFields[k] = changes[k];
|
|
122
123
|
}
|
|
123
124
|
if (changes.success_criteria !== undefined) {
|
|
124
|
-
|
|
125
|
-
directFields.successCriteria = Array.isArray(sc) ? { criteria: sc } : sc;
|
|
125
|
+
directFields.successCriteria = changes.success_criteria;
|
|
126
126
|
}
|
|
127
127
|
// Map the public `committed` boolean onto the backend's commitment write
|
|
128
128
|
// (the API still accepts the legacy goalType field and translates it to
|
|
@@ -245,7 +245,7 @@ async function deriveSubgoalHandler(args, apiClient) {
|
|
|
245
245
|
parentGoalId: parent_goal_id,
|
|
246
246
|
organizationId: parent.organization_id || parent.organizationId || undefined,
|
|
247
247
|
};
|
|
248
|
-
if (success_criteria) payload.successCriteria =
|
|
248
|
+
if (success_criteria) payload.successCriteria = success_criteria;
|
|
249
249
|
if (typeof priority === 'number') payload.priority = priority;
|
|
250
250
|
|
|
251
251
|
let goal;
|
|
@@ -318,7 +318,7 @@ async function createGoalHandler(args, apiClient) {
|
|
|
318
318
|
|
|
319
319
|
const payload = { title, type, status };
|
|
320
320
|
if (description) payload.description = description;
|
|
321
|
-
if (success_criteria) payload.successCriteria =
|
|
321
|
+
if (success_criteria) payload.successCriteria = success_criteria;
|
|
322
322
|
if (typeof priority === 'number') payload.priority = priority;
|
|
323
323
|
if (workspace_id) payload.workspaceId = workspace_id;
|
|
324
324
|
|