agent-planner-mcp 1.5.13 → 1.5.15

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.15",
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": {
package/src/api-client.js CHANGED
@@ -1087,6 +1087,12 @@ function createApiClient(token, options = {}) {
1087
1087
  // Export the axios instance for direct use
1088
1088
  const axiosInstance = apiClient;
1089
1089
 
1090
+ // ─── System ───────────────────────────────────────────────────
1091
+ // Operational metadata about the backend the MCP is talking to.
1092
+ const system = {
1093
+ version: () => apiClient.get('/version').then(r => r.data),
1094
+ };
1095
+
1090
1096
  // ─── Coherence ────────────────────────────────────────────────
1091
1097
  const coherence = {
1092
1098
  getPending: () => apiClient.get('/coherence/pending').then(r => r.data),
@@ -1112,6 +1118,7 @@ module.exports = {
1112
1118
  coherence,
1113
1119
  users,
1114
1120
  agentLoop,
1121
+ system,
1115
1122
  v1,
1116
1123
  axiosInstance, // Export for direct API calls
1117
1124
  createApiClient // Factory for per-session clients (HTTP mode)
@@ -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
 
@@ -19,10 +19,22 @@ const getStartedDefinition = {
19
19
  },
20
20
  };
21
21
 
22
- async function getStartedHandler(args) {
22
+ async function getStartedHandler(args, apiClient) {
23
+ // Best-effort backend version so one call shows which builds are in play
24
+ // (the MCP and the API it is actually talking to are deployed separately).
25
+ let api = { version: 'unavailable' };
26
+ try {
27
+ if (apiClient?.system?.version) api = await apiClient.system.version();
28
+ } catch {
29
+ api = { version: 'unavailable' };
30
+ }
31
+
23
32
  return formatResponse({
24
33
  as_of: asOf(),
25
34
  mcp_version: MCP_VERSION,
35
+ api_url: process.env.API_URL || 'http://localhost:3000',
36
+ api_version: api.version,
37
+ api_build: api.commit ? { commit: api.commit, started_at: api.started_at } : undefined,
26
38
  overview:
27
39
  "AgentPlanner exposes a BDI-aligned MCP surface. Tools are grouped by " +
28
40
  "Beliefs (state queries), Desires (goals), and Intentions (committed actions). " +
@@ -31,7 +43,7 @@ async function getStartedHandler(args) {
31
43
  beliefs: ['briefing', 'list_plans', 'task_context', 'goal_state', 'recall_knowledge', 'search', 'plan_analysis'],
32
44
  desires: ['list_goals', 'create_goal', 'update_goal', 'derive_subgoal'],
33
45
  intentions: ['form_intention', 'extend_intention', 'link_intentions', 'propose_research_chain', 'claim_next_task', 'update_task', 'update_node', 'release_task', 'queue_decision', 'resolve_decision', 'add_learning'],
34
- workspaces: ['list_workspaces', 'create_workspace', 'list_blueprints', 'fork_blueprint', 'save_as_blueprint'],
46
+ workspaces: ['list_workspaces', 'create_workspace', 'list_blueprints', 'fork_blueprint', 'save_as_blueprint', 'delete_blueprint'],
35
47
  },
36
48
  recommended_workflows: [
37
49
  {