comfyui-mcp 0.52.79 → 0.52.80
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.
|
@@ -4933,6 +4933,8 @@ function fixedCapHint(what, shown, total, targeted) {
|
|
|
4933
4933
|
const QUERY_GRAPH_MAX_CHARS_FLOOR = 500;
|
|
4934
4934
|
const QUERY_GRAPH_MAX_CHARS_DEFAULT = 12000;
|
|
4935
4935
|
const QUERY_GRAPH_MAX_CHARS_CEILING = 60000;
|
|
4936
|
+
const DETAIL_WIDGET_MAX_CHARS_DEFAULT = 2048;
|
|
4937
|
+
const DETAIL_WIDGET_MAX_CHARS_CEILING = 32768;
|
|
4936
4938
|
/** The panel's own clamp for graph_query's budget, mirrored so the figure this module
|
|
4937
4939
|
* reports and enforces is the one the panel was actually working to. */
|
|
4938
4940
|
function clampQueryGraphMaxChars(v) {
|
|
@@ -11915,7 +11917,7 @@ export function buildPanelToolDefs() {
|
|
|
11915
11917
|
// Local helper so each def reads like the original `tool(...)` call.
|
|
11916
11918
|
const def = (name, description, schema, handler) => ({ name, description, schema, handler });
|
|
11917
11919
|
const defs = [
|
|
11918
|
-
def("panel_query_graph", "FILTER or TRAVERSE a SUBSET of the live canvas, for when you ALREADY KNOW what you're looking for. NOT for 'show me the canvas' or any whole-graph overview — call panel_graph_outline FIRST for that. NOT get_workflow's query action (that queries a saved file or JSON you provide, not the live canvas). Filters, traverses, projects and aggregates over the workflow the user is CURRENTLY VIEWING without dumping the whole graph (replaces the old panel_get_graph full-JSON dump; output is TOKEN-BOUNDED with an explicit truncation marker, so a big graph can never flood your context). Combine: `types` (node type contains any), `title` (contains), `where` widget predicates ANDed ('cfg>7', 'steps<=20', 'sampler_name=euler', 'text~sunset' — ops = != >= <= > < ~contains), `ids` (exact nodes — THE way to read ONE node's exact slot/widget detail: {ids:[42], fields:'detail'}), `upstream_of`/`downstream_of` + `depth` (dependency traversal: upstream = what FEEDS that node, downstream = what CONSUMES it; seed at depth 0), `fields` ('compact' one line per node [default], 'ids', 'detail' = the full node summary with slots + connections + mode), `group_by:'type'` (counts only), `limit` (default 40). detail rows include each node's MODE — a 'bypass' node is skipped and a 'mute' node kills everything downstream, so check modes on the path you care about before running (fix with panel_set_node_mode). Every result also carries `groups` (id, title, member node_ids — groups are geometric, trust this list) and, when viewing a SUBGRAPH (after panel_enter_subgraph), `rails` (boundary rail ids/slots). `max_chars` bounds the WHOLE result, those riders included, and the rows you asked for are spent first: on a big graph the riders lose their member ids, then drop out entirely, rather than starving your query — and each says in-band
|
|
11920
|
+
def("panel_query_graph", "FILTER or TRAVERSE a SUBSET of the live canvas, for when you ALREADY KNOW what you're looking for. NOT for 'show me the canvas' or any whole-graph overview — call panel_graph_outline FIRST for that. NOT get_workflow's query action (that queries a saved file or JSON you provide, not the live canvas). Filters, traverses, projects and aggregates over the workflow the user is CURRENTLY VIEWING without dumping the whole graph (replaces the old panel_get_graph full-JSON dump; output is TOKEN-BOUNDED with an explicit truncation marker, so a big graph can never flood your context). Combine: `types` (node type contains any), `title` (contains), `where` widget predicates ANDed ('cfg>7', 'steps<=20', 'sampler_name=euler', 'text~sunset' — ops = != >= <= > < ~contains), `ids` (exact nodes — THE way to read ONE node's exact slot/widget detail: {ids:[42], fields:'detail'}), `upstream_of`/`downstream_of` + `depth` (dependency traversal: upstream = what FEEDS that node, downstream = what CONSUMES it; seed at depth 0), `fields` ('compact' one line per node [default], 'ids', 'detail' = the full node summary with slots + connections + mode), `group_by:'type'` (counts only), `limit` (default 40). detail rows include each node's MODE — a 'bypass' node is skipped and a 'mute' node kills everything downstream, so check modes on the path you care about before running (fix with panel_set_node_mode). Every result also carries `groups` (id, title, member node_ids — groups are geometric, trust this list) and, when viewing a SUBGRAPH (after panel_enter_subgraph), `rails` (boundary rail ids/slots). `max_chars` bounds the WHOLE result, those riders included, and the rows you asked for are spent first: on a big graph the riders lose their member ids, then drop out entirely, rather than starving your query — and each says in-band when it did, with the true counts. `widget_max_chars` raises the per-widget cap only for `fields:'detail'`; use it only with exactly one explicit `ids` entry (for example `{ids:[42], fields:'detail', widget_max_chars:8192}`), with a default of 2048 and a maximum of 32768. It does not change compact, ids, or broad reads. Typical flow: panel_graph_outline to orient → panel_query_graph to pinpoint/inspect → edit. Read-only.", {
|
|
11919
11921
|
types: z.array(z.string()).optional().describe("Node type contains ANY of these (case-insensitive)."),
|
|
11920
11922
|
title: z.string().optional().describe("Node title contains this."),
|
|
11921
11923
|
where: z
|
|
@@ -11954,6 +11956,13 @@ export function buildPanelToolDefs() {
|
|
|
11954
11956
|
.optional()
|
|
11955
11957
|
.describe(`Character bound for the WHOLE result, not just its rows (default ${QUERY_GRAPH_MAX_CHARS_DEFAULT}, max ${QUERY_GRAPH_MAX_CHARS_CEILING}). Raise only for deliberate full reads, e.g. layout passes needing every node's geometry. ` +
|
|
11956
11958
|
"The rows answering your query are spent FIRST and are never dropped to fit the contextual groups/rails riders; those are spent from what is left and say in-band when they were reduced or omitted (#807)."),
|
|
11959
|
+
widget_max_chars: z
|
|
11960
|
+
.number()
|
|
11961
|
+
.int()
|
|
11962
|
+
.min(DETAIL_WIDGET_MAX_CHARS_DEFAULT)
|
|
11963
|
+
.max(DETAIL_WIDGET_MAX_CHARS_CEILING)
|
|
11964
|
+
.optional()
|
|
11965
|
+
.describe(`Optional per-widget character cap for \`fields\`:'detail' only (default ${DETAIL_WIDGET_MAX_CHARS_DEFAULT}, max ${DETAIL_WIDGET_MAX_CHARS_CEILING}). Use only with exactly one explicit \`ids\` entry, such as {ids:[42], fields:'detail'}; compact, ids, and broad reads keep their normal cap.`),
|
|
11957
11966
|
},
|
|
11958
11967
|
// #807: the reply is fitted to `max_chars` as a WHOLE here — see fitQueryGraphReply.
|
|
11959
11968
|
// The panel bounds `text`; the `groups`/`rails` riders were never in that
|
|
@@ -11972,6 +11981,7 @@ export function buildPanelToolDefs() {
|
|
|
11972
11981
|
group_by: args.group_by,
|
|
11973
11982
|
limit: args.limit,
|
|
11974
11983
|
max_chars: args.max_chars,
|
|
11984
|
+
widget_max_chars: args.widget_max_chars,
|
|
11975
11985
|
}), args.max_chars)),
|
|
11976
11986
|
def("panel_graph_outline", "READ THE LIVE CANVAS the user is looking at, as text. 'Show me what's on the canvas' / 'what's on the graph right now' / 'read the current workflow' / 'describe the open graph' -> THIS TOOL, with no arguments. NOT visualize_workflow (it DRAWS A DIAGRAM of a workflow you PASS IN — a saved file or JSON — and never sees the live canvas). NOT panel_query_graph (that FILTERS a SUBSET, for when you already know what you're looking for). Returns one `outline` string covering the WHOLE open graph, topologically sorted (sources first, sinks last): each node as `id Type \"title\" [bypass/mute] [OUTPUT] · group:X widget=value …` with `← inputs` (source_node.output_name) and `→ outputs` (target_node.input_name), after a GROUPS index (title → member node ids). It gives you the WIRING you would otherwise reconstruct by hand — read it FIRST to get oriented, then panel_query_graph to inspect one node ({ids:[42], fields:'detail'}) or panel_find_nodes for free-text search. Over `max_chars` it never cuts the graph short: it sheds per-node detail, or refuses with a reason — never a partial outline. Read-only.", {
|
|
11977
11987
|
max_chars: z
|