@thehammer/danx-dashboard-mcp 0.1.125 → 0.1.126
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/handlers.js +8 -2
- package/dist/index.js +8 -7
- package/package.json +1 -1
package/dist/handlers.js
CHANGED
|
@@ -432,9 +432,15 @@ const STRUCTURAL_ACTION_FIELDS = ["id", "action", "board"];
|
|
|
432
432
|
* always allowed) is named in one error, so a caller fixes every offending
|
|
433
433
|
* field in one round trip rather than one at a time.
|
|
434
434
|
*/
|
|
435
|
+
// A9 (code-review fix) — takes `object` rather than `Record<string, unknown>`
|
|
436
|
+
// so every caller (each with its own specific `*Args` interface, no index
|
|
437
|
+
// signature) passes `args` directly, with no `as unknown as Record<...>`
|
|
438
|
+
// bridge cast at the call site. `Object.entries` reads the key/value pairs
|
|
439
|
+
// without needing an index signature on the input type either.
|
|
435
440
|
function refuseInapplicableFields(tool, mode, args, allowed) {
|
|
436
|
-
const offending = Object.
|
|
437
|
-
.filter((key) =>
|
|
441
|
+
const offending = Object.entries(args)
|
|
442
|
+
.filter(([key, value]) => value !== undefined && !STRUCTURAL_ACTION_FIELDS.includes(key) && !allowed.has(key))
|
|
443
|
+
.map(([key]) => key)
|
|
438
444
|
.sort();
|
|
439
445
|
if (offending.length > 0) {
|
|
440
446
|
throw new Error(`${tool} ${mode} refuses fields that do not apply to this action: ${offending.join(", ")}`);
|
package/dist/index.js
CHANGED
|
@@ -634,11 +634,11 @@ const STEP_INPUT = z.lazy(() => z
|
|
|
634
634
|
.positive()
|
|
635
635
|
.optional()
|
|
636
636
|
.describe("present -> this node IS an existing step (matched on this id, 400 if it does not resolve to a live " +
|
|
637
|
-
"child of this exact parent scope — a supplied id is NEVER claimed by the
|
|
638
|
-
"
|
|
639
|
-
"created new.
|
|
640
|
-
"
|
|
641
|
-
"progress, a later single-step edit)."),
|
|
637
|
+
"child of this exact parent scope — a supplied id is NEVER claimed by the fallback below); absent -> " +
|
|
638
|
+
"id-less nodes match the first unclaimed sibling with the same title under the same parent, else " +
|
|
639
|
+
"created new. This title-based match (never positional) is what lets an id-less MIDDLE insert keep " +
|
|
640
|
+
"every later id-less sibling's id — send ids anyway whenever an existing step's identity matters " +
|
|
641
|
+
"(checked progress, a later single-step edit), or when two siblings under the same parent share a title."),
|
|
642
642
|
title: z
|
|
643
643
|
.string()
|
|
644
644
|
.min(1)
|
|
@@ -714,8 +714,9 @@ strictTool("issue_solution", "One problem's options via /api/issues/:id/problems
|
|
|
714
714
|
"changed fields, steps?, steps_base_hash?}: `steps` omitted leaves the stored procedure untouched, an explicit " +
|
|
715
715
|
"array (including [], refused if it would leave an action's solution with zero steps) DIFFS against it — send " +
|
|
716
716
|
"back an existing step's `id` (read from the card) to keep it (even while retitling/reordering it) and omit " +
|
|
717
|
-
"`id` for a genuinely new step; any existing step you don't include gets removed
|
|
718
|
-
"
|
|
717
|
+
"`id` for a genuinely new step; any existing step you don't include gets removed. An id-less node matches the " +
|
|
718
|
+
"first unclaimed sibling with the same title under the same parent (never positional), so an id-less MIDDLE " +
|
|
719
|
+
"insert keeps every later id-less sibling's id — send ids anyway whenever an existing step's identity matters. " +
|
|
719
720
|
"`steps_base_hash` is REQUIRED whenever `steps` is sent — the solution's current `steps_hash` (read it off the " +
|
|
720
721
|
"card first); a stale value → 409 `stale_steps` carrying the current tree, so a step added/removed since your " +
|
|
721
722
|
"read is never silently dropped. NEVER resend the whole tree just to fix one word — see add_step/edit_step/" +
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thehammer/danx-dashboard-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.126",
|
|
4
4
|
"description": "Stdio MCP server wrapping danxbot's dashboard /api/issues/* normalized DB-backed HTTP routes for dispatched agents (DX-704 Phase 2).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|