agent-planner-mcp 1.5.12 → 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/SKILL.md +1 -0
- package/package.json +1 -1
- package/src/tools/bdi/desires.js +6 -6
- package/src/tools/bdi/workspaces.js +34 -1
package/SKILL.md
CHANGED
|
@@ -83,6 +83,7 @@ A Workspace is a folder under an Organization that owns goals + plans — a grou
|
|
|
83
83
|
- `list_blueprints` — list blueprints visible to user (owned + public/unlisted), filterable by scope
|
|
84
84
|
- `fork_blueprint` — instantiate a plan-scope blueprint as a new plan in a target workspace
|
|
85
85
|
- `save_as_blueprint` — snapshot a live plan as a reusable blueprint. Captures structure, agent_instructions, and dependencies; excludes statuses, claims, knowledge episodes, logs, decisions, and agent assignments
|
|
86
|
+
- `delete_blueprint` — delete a blueprint you own (hard delete; already-forked plans are unaffected)
|
|
86
87
|
|
|
87
88
|
### Utility
|
|
88
89
|
|
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
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* agent-planner/docs/WORKSPACE_BLUEPRINT_SKETCH.md for the design.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
const { asOf, formatResponse, errorResponse, safeArray } = require('./_shared');
|
|
11
|
+
const { asOf, formatResponse, errorResponse, safeArray, apiErrorMessage } = require('./_shared');
|
|
12
12
|
|
|
13
13
|
// ─── Workspaces ──────────────────────────────────────────────────
|
|
14
14
|
|
|
@@ -197,6 +197,37 @@ async function saveAsBlueprintHandler(args, apiClient) {
|
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
+
const deleteBlueprintDefinition = {
|
|
201
|
+
name: 'delete_blueprint',
|
|
202
|
+
description:
|
|
203
|
+
"Delete a blueprint you own. Hard delete (the snapshot is removed); plans " +
|
|
204
|
+
"already forked from it are unaffected. Owner-only. Completes the blueprint " +
|
|
205
|
+
"lifecycle alongside save_as_blueprint and fork_blueprint.",
|
|
206
|
+
inputSchema: {
|
|
207
|
+
type: 'object',
|
|
208
|
+
properties: {
|
|
209
|
+
blueprint_id: { type: 'string' },
|
|
210
|
+
},
|
|
211
|
+
required: ['blueprint_id'],
|
|
212
|
+
},
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
async function deleteBlueprintHandler(args, apiClient) {
|
|
216
|
+
const { blueprint_id } = args;
|
|
217
|
+
if (!blueprint_id) {
|
|
218
|
+
return errorResponse('invalid_arg', 'delete_blueprint requires blueprint_id');
|
|
219
|
+
}
|
|
220
|
+
try {
|
|
221
|
+
await apiClient.blueprints.delete(blueprint_id);
|
|
222
|
+
return formatResponse({ as_of: asOf(), blueprint_id, deleted: true });
|
|
223
|
+
} catch (err) {
|
|
224
|
+
const status = err.response?.status;
|
|
225
|
+
if (status === 404) return errorResponse('not_found', `Blueprint ${blueprint_id} not found`);
|
|
226
|
+
if (status === 403) return errorResponse('forbidden', 'Only the owner can delete this blueprint');
|
|
227
|
+
return errorResponse('upstream_unavailable', `delete_blueprint failed: ${apiErrorMessage(err)}`);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
200
231
|
module.exports = {
|
|
201
232
|
definitions: [
|
|
202
233
|
listWorkspacesDefinition,
|
|
@@ -204,6 +235,7 @@ module.exports = {
|
|
|
204
235
|
listBlueprintsDefinition,
|
|
205
236
|
forkBlueprintDefinition,
|
|
206
237
|
saveAsBlueprintDefinition,
|
|
238
|
+
deleteBlueprintDefinition,
|
|
207
239
|
],
|
|
208
240
|
handlers: {
|
|
209
241
|
list_workspaces: listWorkspacesHandler,
|
|
@@ -211,5 +243,6 @@ module.exports = {
|
|
|
211
243
|
list_blueprints: listBlueprintsHandler,
|
|
212
244
|
fork_blueprint: forkBlueprintHandler,
|
|
213
245
|
save_as_blueprint: saveAsBlueprintHandler,
|
|
246
|
+
delete_blueprint: deleteBlueprintHandler,
|
|
214
247
|
},
|
|
215
248
|
};
|