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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-planner-mcp",
3
- "version": "1.5.13",
3
+ "version": "1.5.14",
4
4
  "description": "MCP server for AgentPlanner — AI agent orchestration with planning, dependencies, knowledge graphs, and human oversight",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -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"). Match the create shape: wrap a bare array as
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
- const sc = changes.success_criteria;
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 = { criteria: success_criteria };
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 = { criteria: success_criteria };
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