mirror of
https://github.com/hansjone/netxops.git
synced 2026-10-09 04:00:46 +08:00
Fix Netx Ops tool schemas for DSH additionalProperties requirement.
positions[] items and layout params objects now declare additionalProperties explicitly. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
3c9a383071
commit
6e591be2b5
6 changed files with 121 additions and 12 deletions
22
lib/index.js
22
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(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue