add lil peek to in/output

This commit is contained in:
lda
2026-05-19 03:47:07 +07:00 Verified
parent 0b2159bc9c
commit 50fc6e3670
5 changed files with 37 additions and 2 deletions
+11
View File
@@ -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: