add lil peek to in/output
This commit is contained in:
@@ -59,9 +59,12 @@ class WorkflowSurfaceHandlers:
|
||||
capabilities = [
|
||||
{
|
||||
"name": detail.name,
|
||||
"source_id": source.id,
|
||||
"description": detail.description,
|
||||
"outcomes": list(detail.outcomes),
|
||||
"is_async": detail.is_async,
|
||||
"input_fields": _schema_field_names(detail.input_schema),
|
||||
"output_fields": _schema_field_names(detail.output_schema),
|
||||
}
|
||||
for source in sorted(
|
||||
self.service.capability_sources.values(),
|
||||
@@ -555,6 +558,14 @@ def _observed_node_specs(service: WfMcpService) -> dict[str, NodeSpecInventory]:
|
||||
return observed
|
||||
|
||||
|
||||
def _schema_field_names(schema: dict[str, Any]) -> list[str]:
|
||||
"""Return top-level JSON object property names for compact discovery rows."""
|
||||
properties = schema.get("properties")
|
||||
if not isinstance(properties, dict):
|
||||
return []
|
||||
return sorted(str(name) for name in properties)
|
||||
|
||||
|
||||
def _capability_name(qualified_name: str) -> str | None:
|
||||
"""Return the local name of one qualified capability ref if it is valid."""
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user