diff --git a/lib/agent-tools-common.js b/lib/agent-tools-common.js index 3c89263..57b202a 100644 --- a/lib/agent-tools-common.js +++ b/lib/agent-tools-common.js @@ -1374,6 +1374,11 @@ var strArr = (description) => ({ items: { type: "string" }, ...description ? { description } : {} }); +var anyObj = (description) => ({ + type: "object", + additionalProperties: true, + ...description ? { description } : {} +}); function renderJson(_args, value) { return [{ type: "text", text: JSON.stringify(value, null, 0) }]; } @@ -1507,6 +1512,7 @@ function registerNetxTools(ctx, connection, options) { additionalProperties: false, properties: { ne_id: str3(), + nms_ne_id: str3(), ume_ne_id: str3(), commands: strArr() } @@ -1579,7 +1585,19 @@ function registerNetxTools(ctx, connection, options) { }, copyTopologyViewNodes, getClient, t), tool("netx__updateTopologyViewPositions", "Move nodes on a view via positions[] or layout=grid|offset|stack + filters.", { view_id: { type: "string", required: true }, - positions: { type: "array", items: { type: "object" } }, + positions: { + type: "array", + description: "Manual placements: [{ fabric_node_id, x, y }, …]", + items: { + type: "object", + additionalProperties: false, + properties: { + fabric_node_id: str3(), + x: num3(), + y: num3() + } + } + }, layout: str3("grid | offset | stack"), keyword: str3(), role: str3(), @@ -1684,7 +1702,7 @@ function registerNetxTools(ctx, connection, options) { preset: str3(), mode: str3("preview | apply"), tune: bool3(), - params: { type: "object" }, + params: anyObj("Action-specific options (move_nodes / recipes / polish)."), catalog: bool3(), fabric_node_ids: strArr(), park: bool3(), diff --git a/lib/agent-tools-nms.js b/lib/agent-tools-nms.js index 627575a..08fc284 100644 --- a/lib/agent-tools-nms.js +++ b/lib/agent-tools-nms.js @@ -1374,6 +1374,11 @@ var strArr = (description) => ({ items: { type: "string" }, ...description ? { description } : {} }); +var anyObj = (description) => ({ + type: "object", + additionalProperties: true, + ...description ? { description } : {} +}); function renderJson(_args, value) { return [{ type: "text", text: JSON.stringify(value, null, 0) }]; } @@ -1507,6 +1512,7 @@ function registerNetxTools(ctx, connection, options) { additionalProperties: false, properties: { ne_id: str3(), + nms_ne_id: str3(), ume_ne_id: str3(), commands: strArr() } @@ -1579,7 +1585,19 @@ function registerNetxTools(ctx, connection, options) { }, copyTopologyViewNodes, getClient, t), tool("netx__updateTopologyViewPositions", "Move nodes on a view via positions[] or layout=grid|offset|stack + filters.", { view_id: { type: "string", required: true }, - positions: { type: "array", items: { type: "object" } }, + positions: { + type: "array", + description: "Manual placements: [{ fabric_node_id, x, y }, …]", + items: { + type: "object", + additionalProperties: false, + properties: { + fabric_node_id: str3(), + x: num3(), + y: num3() + } + } + }, layout: str3("grid | offset | stack"), keyword: str3(), role: str3(), @@ -1684,7 +1702,7 @@ function registerNetxTools(ctx, connection, options) { preset: str3(), mode: str3("preview | apply"), tune: bool3(), - params: { type: "object" }, + params: anyObj("Action-specific options (move_nodes / recipes / polish)."), catalog: bool3(), fabric_node_ids: strArr(), park: bool3(), diff --git a/lib/agent-tools-topology.js b/lib/agent-tools-topology.js index ce08e72..b76ca5f 100644 --- a/lib/agent-tools-topology.js +++ b/lib/agent-tools-topology.js @@ -1374,6 +1374,11 @@ var strArr = (description) => ({ items: { type: "string" }, ...description ? { description } : {} }); +var anyObj = (description) => ({ + type: "object", + additionalProperties: true, + ...description ? { description } : {} +}); function renderJson(_args, value) { return [{ type: "text", text: JSON.stringify(value, null, 0) }]; } @@ -1507,6 +1512,7 @@ function registerNetxTools(ctx, connection, options) { additionalProperties: false, properties: { ne_id: str3(), + nms_ne_id: str3(), ume_ne_id: str3(), commands: strArr() } @@ -1579,7 +1585,19 @@ function registerNetxTools(ctx, connection, options) { }, copyTopologyViewNodes, getClient, t), tool("netx__updateTopologyViewPositions", "Move nodes on a view via positions[] or layout=grid|offset|stack + filters.", { view_id: { type: "string", required: true }, - positions: { type: "array", items: { type: "object" } }, + positions: { + type: "array", + description: "Manual placements: [{ fabric_node_id, x, y }, …]", + items: { + type: "object", + additionalProperties: false, + properties: { + fabric_node_id: str3(), + x: num3(), + y: num3() + } + } + }, layout: str3("grid | offset | stack"), keyword: str3(), role: str3(), @@ -1684,7 +1702,7 @@ function registerNetxTools(ctx, connection, options) { preset: str3(), mode: str3("preview | apply"), tune: bool3(), - params: { type: "object" }, + params: anyObj("Action-specific options (move_nodes / recipes / polish)."), catalog: bool3(), fabric_node_ids: strArr(), park: bool3(), diff --git a/lib/agent-tools.js b/lib/agent-tools.js index 25d8f36..2ab8afa 100644 --- a/lib/agent-tools.js +++ b/lib/agent-tools.js @@ -1374,6 +1374,11 @@ var strArr = (description) => ({ items: { type: "string" }, ...description ? { description } : {} }); +var anyObj = (description) => ({ + type: "object", + additionalProperties: true, + ...description ? { description } : {} +}); function renderJson(_args, value) { return [{ type: "text", text: JSON.stringify(value, null, 0) }]; } @@ -1507,6 +1512,7 @@ function registerNetxTools(ctx, connection, options) { additionalProperties: false, properties: { ne_id: str3(), + nms_ne_id: str3(), ume_ne_id: str3(), commands: strArr() } @@ -1579,7 +1585,19 @@ function registerNetxTools(ctx, connection, options) { }, copyTopologyViewNodes, getClient, t), tool("netx__updateTopologyViewPositions", "Move nodes on a view via positions[] or layout=grid|offset|stack + filters.", { view_id: { type: "string", required: true }, - positions: { type: "array", items: { type: "object" } }, + positions: { + type: "array", + description: "Manual placements: [{ fabric_node_id, x, y }, …]", + items: { + type: "object", + additionalProperties: false, + properties: { + fabric_node_id: str3(), + x: num3(), + y: num3() + } + } + }, layout: str3("grid | offset | stack"), keyword: str3(), role: str3(), @@ -1684,7 +1702,7 @@ function registerNetxTools(ctx, connection, options) { preset: str3(), mode: str3("preview | apply"), tune: bool3(), - params: { type: "object" }, + params: anyObj("Action-specific options (move_nodes / recipes / polish)."), catalog: bool3(), fabric_node_ids: strArr(), park: bool3(), diff --git a/lib/index.js b/lib/index.js index d194782..64de77c 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1791,6 +1791,11 @@ var strArr = (description) => ({ items: { type: "string" }, ...description ? { description } : {} }); +var anyObj = (description) => ({ + type: "object", + additionalProperties: true, + ...description ? { description } : {} +}); function renderJson(_args, value) { return [{ type: "text", text: JSON.stringify(value, null, 0) }]; } @@ -1924,6 +1929,7 @@ function registerNetxTools(ctx, connection, options) { additionalProperties: false, properties: { ne_id: str3(), + nms_ne_id: str3(), ume_ne_id: str3(), commands: strArr() } @@ -1996,7 +2002,19 @@ function registerNetxTools(ctx, connection, options) { }, copyTopologyViewNodes, getClient, t), tool("netx__updateTopologyViewPositions", "Move nodes on a view via positions[] or layout=grid|offset|stack + filters.", { view_id: { type: "string", required: true }, - positions: { type: "array", items: { type: "object" } }, + positions: { + type: "array", + description: "Manual placements: [{ fabric_node_id, x, y }, …]", + items: { + type: "object", + additionalProperties: false, + properties: { + fabric_node_id: str3(), + x: num3(), + y: num3() + } + } + }, layout: str3("grid | offset | stack"), keyword: str3(), role: str3(), @@ -2101,7 +2119,7 @@ function registerNetxTools(ctx, connection, options) { preset: str3(), mode: str3("preview | apply"), tune: bool3(), - params: { type: "object" }, + params: anyObj("Action-specific options (move_nodes / recipes / polish)."), catalog: bool3(), fabric_node_ids: strArr(), park: bool3(), diff --git a/src/netx/tools.ts b/src/netx/tools.ts index ff1364e..b3d8f77 100644 --- a/src/netx/tools.ts +++ b/src/netx/tools.ts @@ -34,6 +34,12 @@ const strArr = (description?: string) => ({ items: { type: 'string' as const }, ...(description ? { description } : {}), }) +/** Free-form JSON object — DSH requires an explicit additionalProperties boolean. */ +const anyObj = (description?: string) => ({ + type: 'object' as const, + additionalProperties: true as const, + ...(description ? { description } : {}), +}) function renderJson(_args: unknown, value: unknown) { return [{ type: 'text' as const, text: JSON.stringify(value, null, 0) }] @@ -262,6 +268,7 @@ export function registerNetxTools( additionalProperties: false, properties: { ne_id: str(), + nms_ne_id: str(), ume_ne_id: str(), commands: strArr(), }, @@ -380,7 +387,19 @@ export function registerNetxTools( 'Move nodes on a view via positions[] or layout=grid|offset|stack + filters.', { view_id: { type: 'string' as const, required: true as const }, - positions: { type: 'array' as const, items: { type: 'object' as const } }, + positions: { + type: 'array' as const, + description: 'Manual placements: [{ fabric_node_id, x, y }, …]', + items: { + type: 'object' as const, + additionalProperties: false, + properties: { + fabric_node_id: str(), + x: num(), + y: num(), + }, + }, + }, layout: str('grid | offset | stack'), keyword: str(), role: str(), @@ -530,7 +549,7 @@ export function registerNetxTools( preset: str(), mode: str('preview | apply'), tune: bool(), - params: { type: 'object' as const }, + params: anyObj('Action-specific options (move_nodes / recipes / polish).'), catalog: bool(), fabric_node_ids: strArr(), park: bool(),