Topolo Docs Topolo Platform
Open workspace

Get Compose workspace metrics

Read the canonical Compose widget response for the workspace resolved through platform grants, including active document, review, approval and saved-version counts.

Outcome

Read the canonical Compose widget response for the workspace resolved through platform grants, including active document, review, approval and saved-version counts.

Before you start

  • Verify the authenticated identity, environment and pinned organization before preparing an action.
  • The published application permission is workspace:read. Discover and select a granted Compose workspace separately from action input. A supplied identifier does not grant access.
  • Document reads require a read workspace grant; mirror initialization does not confer new access.

Discover the target

topolo whoami --json
topolo actions get app_topolo_compose.widget.get --detail --json
topolo resources topolo-compose --json
topolo workspaces list topolo-compose --json
  • Select the granted workspace id as COMPOSE_WORKSPACE_ID. Use document and version ids returned by accessible reads; fixture ids confer no live access.

Request

GET /api/widget

Save action input as payload.json. Inspect the plan for the exact path, query and body. Set COMPOSE_WORKSPACE_ID from granted resource discovery.

Inspect and test this action in the signed action console, then perform the verification below.

Input fields

Supply an empty input object; credential and resource context are separate.

Exact input schema:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {},
  "additionalProperties": false
}

Effects

  • Reads workspace-scoped counts in the core and history stores.
  • An unavailable organization or workspace produces an empty-state widget; a successful response is not evidence that every requested workspace was granted.
  • Widget identity comes from the application catalog.

Interpret the response

Use response path $.workspace.id for workspace. An empty list does not discover a target.

Inspect success, widget state, resource.resourceId, observation time and each metric. Use documents.list in the same granted workspace for document inventory; widget counts do not identify individual documents or prove notification delivery.

The success schema below was checked against captured handler responses. Optional structured generation metadata and integration-dependent values can vary. Error examples retain their actual refusal shapes.

Success schema:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean",
      "const": true
    },
    "contractVersion": {
      "type": "string",
      "const": "3.0.0"
    },
    "appId": {
      "type": "string",
      "minLength": 1
    },
    "serviceName": {
      "type": "string",
      "minLength": 1
    },
    "generatedAt": {
      "type": "string",
      "minLength": 1
    },
    "widgets": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "string",
            "minLength": 1
          },
          "appId": {
            "type": "string",
            "minLength": 1
          },
          "serviceName": {
            "type": "string",
            "minLength": 1
          },
          "lastUpdated": {
            "type": "string",
            "minLength": 1
          },
          "type": {
            "enum": [
              "stats",
              "chart",
              "activity",
              "notifications",
              "actions"
            ]
          },
          "presentation": {
            "type": "object",
            "properties": {
              "title": {
                "type": "string",
                "minLength": 1
              },
              "description": {
                "type": "string",
                "minLength": 1
              },
              "contexts": {
                "type": "array",
                "minItems": 1,
                "items": {
                  "enum": [
                    "personal",
                    "organization",
                    "workspace",
                    "resource"
                  ]
                }
              },
              "supportedSizes": {
                "type": "array",
                "minItems": 1,
                "items": {
                  "enum": [
                    "compact",
                    "medium",
                    "wide",
                    "full"
                  ]
                }
              },
              "defaultSize": {
                "enum": [
                  "compact",
                  "medium",
                  "wide",
                  "full"
                ]
              }
            },
            "required": [
              "title",
              "contexts",
              "supportedSizes",
              "defaultSize"
            ],
            "additionalProperties": false
          },
          "resource": {
            "type": "object",
            "properties": {
              "resourceType": {
                "type": "string",
                "minLength": 1
              },
              "resourceId": {
                "type": "string",
                "minLength": 1
              },
              "requiredPermissions": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              }
            },
            "required": [
              "resourceType",
              "requiredPermissions"
            ],
            "additionalProperties": false
          },
          "state": {
            "type": "object",
            "properties": {
              "status": {
                "enum": [
                  "ready",
                  "empty",
                  "unavailable",
                  "stale",
                  "error"
                ]
              },
              "observedAt": {
                "type": "string",
                "minLength": 1
              },
              "lastSuccessfulAt": {
                "type": "string",
                "minLength": 1
              },
              "code": {
                "type": "string",
                "minLength": 1
              },
              "message": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "status",
              "observedAt"
            ],
            "additionalProperties": false
          },
          "refresh": {
            "type": "object",
            "properties": {
              "intervalSeconds": {
                "type": "number"
              },
              "timeoutSeconds": {
                "type": "number"
              },
              "maxAgeSeconds": {
                "type": "number"
              },
              "staleWhileRevalidateSeconds": {
                "type": "number"
              }
            },
            "required": [
              "intervalSeconds",
              "timeoutSeconds",
              "maxAgeSeconds",
              "staleWhileRevalidateSeconds"
            ],
            "additionalProperties": false
          },
          "configuration": {
            "type": "object",
            "properties": {
              "allowMultipleInstances": {
                "type": "boolean"
              },
              "fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string",
                      "minLength": 1
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1
                    },
                    "type": {
                      "enum": [
                        "string",
                        "number",
                        "boolean",
                        "select",
                        "multi-select",
                        "date-range"
                      ]
                    },
                    "required": {
                      "type": "boolean"
                    },
                    "options": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "type": "string",
                            "minLength": 1
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "value",
                          "label"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "key",
                    "label",
                    "type",
                    "required"
                  ],
                  "additionalProperties": false
                }
              },
              "defaults": {
                "type": "object"
              }
            },
            "required": [
              "allowMultipleInstances",
              "fields",
              "defaults"
            ],
            "additionalProperties": false
          },
          "drilldowns": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "label": {
                  "type": "string",
                  "minLength": 1
                },
                "href": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "id",
                "label",
                "href"
              ],
              "additionalProperties": false
            }
          },
          "controls": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "label": {
                  "type": "string",
                  "minLength": 1
                },
                "actionId": {
                  "type": "string",
                  "minLength": 1
                },
                "resourceType": {
                  "type": "string",
                  "minLength": 1
                },
                "resourceId": {
                  "type": "string",
                  "minLength": 1
                },
                "input": {
                  "type": "object"
                },
                "requiresConfirmation": {
                  "type": "boolean"
                },
                "destructive": {
                  "type": "boolean"
                },
                "effects": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "verification": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "recovery": {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "enum": [
                        "not_applicable",
                        "retry",
                        "compensating_action"
                      ]
                    },
                    "actionId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "instructions": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "mode",
                    "instructions"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "id",
                "label",
                "actionId",
                "resourceType",
                "input",
                "requiresConfirmation",
                "destructive",
                "effects",
                "verification",
                "recovery"
              ],
              "additionalProperties": false
            }
          },
          "localization": {
            "type": "object",
            "properties": {
              "locale": {
                "type": "string",
                "minLength": 1
              },
              "titleKey": {
                "type": "string",
                "minLength": 1
              },
              "descriptionKey": {
                "type": "string",
                "minLength": 1
              },
              "title": {
                "type": "string",
                "minLength": 1
              },
              "description": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "locale",
              "titleKey"
            ],
            "additionalProperties": false
          },
          "accessibility": {
            "type": "object",
            "properties": {
              "label": {
                "type": "string",
                "minLength": 1
              },
              "description": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "label"
            ],
            "additionalProperties": false
          },
          "contribution": {
            "type": "object",
            "properties": {
              "summary": {
                "type": "string",
                "minLength": 1
              },
              "identity": {
                "type": "object",
                "properties": {
                  "iconSource": {
                    "const": "catalog"
                  }
                },
                "required": [
                  "iconSource"
                ],
                "additionalProperties": false
              },
              "workspaceSelector": {
                "type": "object",
                "properties": {
                  "mode": {
                    "enum": [
                      "none",
                      "optional",
                      "required"
                    ]
                  },
                  "resourceType": {
                    "type": "string",
                    "minLength": 1
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1
                  },
                  "supportsMultiple": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "mode",
                  "resourceType",
                  "label",
                  "supportsMultiple"
                ],
                "additionalProperties": false
              },
              "metricDefinitions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string",
                      "minLength": 1
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1
                    },
                    "description": {
                      "type": "string",
                      "minLength": 1
                    },
                    "unit": {
                      "type": "string",
                      "minLength": 1
                    },
                    "semantic": {
                      "enum": [
                        "gauge",
                        "counter",
                        "rate",
                        "duration",
                        "currency",
                        "percentage"
                      ]
                    },
                    "aggregation": {
                      "enum": [
                        "last",
                        "sum",
                        "average",
                        "minimum",
                        "maximum",
                        "count",
                        "distinct_count"
                      ]
                    }
                  },
                  "required": [
                    "key",
                    "label",
                    "description",
                    "unit",
                    "semantic",
                    "aggregation"
                  ],
                  "additionalProperties": false
                }
              },
              "seriesDefinitions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string",
                      "minLength": 1
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1
                    },
                    "metricKey": {
                      "type": "string",
                      "minLength": 1
                    },
                    "unit": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "key",
                    "label",
                    "metricKey",
                    "unit"
                  ],
                  "additionalProperties": false
                }
              },
              "dimensions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string",
                      "minLength": 1
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1
                    },
                    "description": {
                      "type": "string",
                      "minLength": 1
                    },
                    "valueType": {
                      "enum": [
                        "string",
                        "number",
                        "boolean",
                        "date",
                        "datetime"
                      ]
                    }
                  },
                  "required": [
                    "key",
                    "label",
                    "description",
                    "valueType"
                  ],
                  "additionalProperties": false
                }
              },
              "lifecycleStages": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string",
                      "minLength": 1
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1
                    },
                    "order": {
                      "type": "number"
                    },
                    "terminal": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "key",
                    "label",
                    "order",
                    "terminal"
                  ],
                  "additionalProperties": false
                }
              },
              "events": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string",
                      "minLength": 1
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1
                    },
                    "description": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "key",
                    "label",
                    "description"
                  ],
                  "additionalProperties": false
                }
              },
              "datasets": {
                "type": "array",
                "minItems": 1,
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1
                    },
                    "description": {
                      "type": "string",
                      "minLength": 1
                    },
                    "grain": {
                      "type": "string",
                      "minLength": 1
                    },
                    "metricKeys": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "seriesKeys": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "dimensionKeys": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "eventKeys": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "actionIds": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    }
                  },
                  "required": [
                    "id",
                    "label",
                    "description",
                    "grain",
                    "metricKeys",
                    "seriesKeys",
                    "dimensionKeys",
                    "eventKeys",
                    "actionIds"
                  ],
                  "additionalProperties": false
                }
              },
              "compatibleVisualizations": {
                "type": "array",
                "minItems": 1,
                "items": {
                  "enum": [
                    "number",
                    "line",
                    "area",
                    "bar",
                    "donut",
                    "table",
                    "funnel",
                    "timeline",
                    "actions"
                  ]
                }
              },
              "defaultVisualization": {
                "enum": [
                  "number",
                  "line",
                  "area",
                  "bar",
                  "donut",
                  "table",
                  "funnel",
                  "timeline",
                  "actions"
                ]
              }
            },
            "required": [
              "summary",
              "identity",
              "workspaceSelector",
              "metricDefinitions",
              "seriesDefinitions",
              "dimensions",
              "lifecycleStages",
              "events",
              "datasets",
              "compatibleVisualizations",
              "defaultVisualization"
            ],
            "additionalProperties": false
          },
          "metrics": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "minLength": 1
                },
                "label": {
                  "type": "string",
                  "minLength": 1
                },
                "value": {
                  "type": "number"
                },
                "unit": {
                  "type": "string",
                  "minLength": 1
                },
                "semantic": {
                  "enum": [
                    "gauge",
                    "counter",
                    "rate",
                    "duration",
                    "currency",
                    "percentage"
                  ]
                },
                "aggregation": {
                  "enum": [
                    "last",
                    "sum",
                    "average",
                    "minimum",
                    "maximum",
                    "count",
                    "distinct_count"
                  ]
                },
                "period": {
                  "type": "object",
                  "properties": {
                    "start": {
                      "type": "string",
                      "minLength": 1
                    },
                    "end": {
                      "type": "string",
                      "minLength": 1
                    },
                    "timezone": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "start",
                    "end",
                    "timezone"
                  ],
                  "additionalProperties": false
                },
                "dimensions": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "key": {
                        "type": "string",
                        "minLength": 1
                      },
                      "label": {
                        "type": "string",
                        "minLength": 1
                      },
                      "value": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "key",
                      "label",
                      "value"
                    ],
                    "additionalProperties": false
                  }
                },
                "series": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1
                    },
                    "unit": {
                      "type": "string",
                      "minLength": 1
                    },
                    "points": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "timestamp": {
                            "type": "string",
                            "minLength": 1
                          },
                          "value": {
                            "type": "number"
                          },
                          "dimensions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "key": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "label": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "value": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              },
                              "required": [
                                "key",
                                "label",
                                "value"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "timestamp",
                          "value",
                          "dimensions"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "label",
                    "unit",
                    "points"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "key",
                "label",
                "value",
                "unit",
                "semantic",
                "aggregation",
                "period",
                "dimensions"
              ],
              "additionalProperties": false
            }
          },
          "chartType": {
            "enum": [
              "line",
              "bar",
              "area",
              "pie",
              "donut"
            ]
          },
          "series": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "label": {
                  "type": "string",
                  "minLength": 1
                },
                "unit": {
                  "type": "string",
                  "minLength": 1
                },
                "points": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "timestamp": {
                        "type": "string",
                        "minLength": 1
                      },
                      "value": {
                        "type": "number"
                      },
                      "dimensions": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "key": {
                              "type": "string",
                              "minLength": 1
                            },
                            "label": {
                              "type": "string",
                              "minLength": 1
                            },
                            "value": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "key",
                            "label",
                            "value"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "timestamp",
                      "value",
                      "dimensions"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "id",
                "label",
                "unit",
                "points"
              ],
              "additionalProperties": false
            }
          },
          "activities": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "notifications": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "unreadCount": {
            "type": "number"
          },
          "actions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "label": {
                  "type": "string",
                  "minLength": 1
                },
                "actionId": {
                  "type": "string",
                  "minLength": 1
                },
                "resourceType": {
                  "type": "string",
                  "minLength": 1
                },
                "resourceId": {
                  "type": "string",
                  "minLength": 1
                },
                "input": {
                  "type": "object"
                },
                "requiresConfirmation": {
                  "type": "boolean"
                },
                "destructive": {
                  "type": "boolean"
                },
                "effects": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "verification": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "recovery": {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "enum": [
                        "not_applicable",
                        "retry",
                        "compensating_action"
                      ]
                    },
                    "actionId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "instructions": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "mode",
                    "instructions"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "id",
                "label",
                "actionId",
                "resourceType",
                "input",
                "requiresConfirmation",
                "destructive",
                "effects",
                "verification",
                "recovery"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "id",
          "version",
          "appId",
          "serviceName",
          "lastUpdated",
          "type",
          "presentation",
          "resource",
          "state",
          "refresh",
          "configuration",
          "drilldowns",
          "controls",
          "localization",
          "accessibility",
          "contribution"
        ],
        "allOf": [
          {
            "if": {
              "properties": {
                "type": {
                  "const": "stats"
                }
              }
            },
            "then": {
              "required": [
                "metrics"
              ]
            }
          },
          {
            "if": {
              "properties": {
                "type": {
                  "const": "chart"
                }
              }
            },
            "then": {
              "required": [
                "chartType",
                "series"
              ]
            }
          },
          {
            "if": {
              "properties": {
                "type": {
                  "const": "activity"
                }
              }
            },
            "then": {
              "required": [
                "activities"
              ]
            }
          },
          {
            "if": {
              "properties": {
                "type": {
                  "const": "notifications"
                }
              }
            },
            "then": {
              "required": [
                "notifications",
                "unreadCount"
              ]
            }
          },
          {
            "if": {
              "properties": {
                "type": {
                  "const": "actions"
                }
              }
            },
            "then": {
              "required": [
                "actions"
              ]
            }
          }
        ],
        "additionalProperties": false
      }
    },
    "workspace": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                }
              ]
            },
            "name": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "id",
            "name"
          ],
          "additionalProperties": true
        },
        {
          "type": "null"
        }
      ]
    },
    "workspaces": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "isDefault": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "success",
    "contractVersion",
    "appId",
    "serviceName",
    "generatedAt",
    "widgets"
  ],
  "additionalProperties": false
}

Worked examples

Responses were captured from the actual Compose Worker using synthetic users, organizations, content and identifiers. Tests simulate Auth, Nexus, Notify, metering and platform workspace transport and use an in-memory D1 adapter or local SQLite. They prove local handler behavior, not live model correctness, provider cost, notification delivery, real workspace grants or cross-store atomicity. HTTP 204 responses are exactly empty strings in the SDK transport. Replace fixture identifiers through credential-scoped discovery. Refused examples demonstrate boundaries and must not be executed as successful workflows.

Successful request

Actual Compose Worker response. Auth, Nexus, notifications, metering and platform workspace transport are simulated. D1 is an in-memory adapter or local SQLite as stated by the test. This does not prove a live model completion or notification delivery. No request credentials are captured. Captured scenario: actual widget response satisfies the published SDK output schema.

Input · payload.json:

{}

CLI:

topolo actions validate app_topolo_compose.widget.get --data @payload.json --json
topolo actions plan app_topolo_compose.widget.get --resource-type workspace --resource-id "$COMPOSE_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_compose.widget.get --resource-type workspace --resource-id "$COMPOSE_WORKSPACE_ID" --data @payload.json --json

MCP tool and arguments:

{
  "tool": "topolo_read_action",
  "arguments": {
    "actionId": "app_topolo_compose.widget.get",
    "input": {},
    "resourceType": "workspace",
    "resourceId": "<identifier returned by granted resource discovery>"
  }
}

Captured local response · HTTP 200:

{
  "success": true,
  "contractVersion": "3.0.0",
  "appId": "app_topolo_compose",
  "serviceName": "Compose",
  "generatedAt": "2026-10-04T02:26:27.207Z",
  "widgets": [
    {
      "id": "compose.workspace-summary",
      "version": "2.0.0",
      "type": "stats",
      "presentation": {
        "title": "Compose workspace",
        "description": "Overview of your Compose workspace: drafted documents alongside the available templates, styles, and exports.",
        "contexts": [
          "workspace"
        ],
        "supportedSizes": [
          "compact",
          "medium",
          "wide"
        ],
        "defaultSize": "medium"
      },
      "resource": {
        "resourceType": "workspace",
        "resourceId": "ws_compose_test",
        "requiredPermissions": [
          "workspace:read"
        ]
      },
      "state": {
        "status": "ready",
        "observedAt": "2026-10-04T02:26:27.207Z",
        "lastSuccessfulAt": "2026-10-04T02:26:27.207Z"
      },
      "refresh": {
        "intervalSeconds": 60,
        "timeoutSeconds": 10,
        "maxAgeSeconds": 60,
        "staleWhileRevalidateSeconds": 120
      },
      "configuration": {
        "allowMultipleInstances": false,
        "fields": [],
        "defaults": {}
      },
      "drilldowns": [
        {
          "id": "documents",
          "label": "View documents",
          "href": "/dashboard/documents"
        }
      ],
      "controls": [],
      "localization": {
        "locale": "en",
        "titleKey": "compose.widget.title",
        "descriptionKey": "compose.widget.summary"
      },
      "accessibility": {
        "label": "Compose workspace metrics",
        "description": "Overview of your Compose workspace: drafted documents alongside the available templates, styles, and exports."
      },
      "contribution": {
        "summary": "Document inventory, approval readiness, and version activity for the selected Compose workspace.",
        "identity": {
          "iconSource": "catalog"
        },
        "workspaceSelector": {
          "mode": "required",
          "resourceType": "workspace",
          "label": "Compose workspace",
          "supportsMultiple": false
        },
        "metricDefinitions": [
          {
            "key": "documents",
            "label": "Documents",
            "description": "Active documents in the selected workspace.",
            "unit": "count",
            "semantic": "gauge",
            "aggregation": "last"
          },
          {
            "key": "in_review",
            "label": "In review",
            "description": "Documents currently awaiting review.",
            "unit": "count",
            "semantic": "gauge",
            "aggregation": "last"
          },
          {
            "key": "approved",
            "label": "Approved",
            "description": "Documents currently approved.",
            "unit": "count",
            "semantic": "gauge",
            "aggregation": "last"
          },
          {
            "key": "versions",
            "label": "Versions",
            "description": "Document versions recorded in the selected workspace.",
            "unit": "count",
            "semantic": "gauge",
            "aggregation": "last"
          }
        ],
        "seriesDefinitions": [],
        "dimensions": [],
        "lifecycleStages": [
          {
            "key": "draft",
            "label": "Draft",
            "order": 0,
            "terminal": false
          },
          {
            "key": "in_review",
            "label": "In review",
            "order": 1,
            "terminal": false
          },
          {
            "key": "approved",
            "label": "Approved",
            "order": 2,
            "terminal": true
          },
          {
            "key": "rejected",
            "label": "Rejected",
            "order": 3,
            "terminal": true
          }
        ],
        "events": [
          {
            "key": "document_created",
            "label": "Document created",
            "description": "A document was created in the workspace."
          },
          {
            "key": "review_requested",
            "label": "Review requested",
            "description": "A document entered review."
          },
          {
            "key": "document_approved",
            "label": "Document approved",
            "description": "A document was approved."
          },
          {
            "key": "version_created",
            "label": "Version created",
            "description": "A new document version was recorded."
          }
        ],
        "datasets": [
          {
            "id": "document_operations",
            "label": "Document operations",
            "description": "Current document, approval, and version aggregates.",
            "grain": "One aggregate row per Compose workspace.",
            "metricKeys": [
              "documents",
              "in_review",
              "approved",
              "versions"
            ],
            "seriesKeys": [],
            "dimensionKeys": [],
            "eventKeys": [
              "document_created",
              "review_requested",
              "document_approved",
              "version_created"
            ],
            "actionIds": []
          }
        ],
        "compatibleVisualizations": [
          "number",
          "bar",
          "table"
        ],
        "defaultVisualization": "bar"
      },
      "metrics": [
        {
          "key": "documents",
          "label": "Documents",
          "value": 0,
          "unit": "count",
          "semantic": "gauge",
          "aggregation": "last",
          "period": {
            "start": "2026-10-04T02:26:27.207Z",
            "end": "2026-10-04T02:26:27.207Z",
            "timezone": "UTC"
          },
          "dimensions": []
        },
        {
          "key": "in_review",
          "label": "In review",
          "value": 0,
          "unit": "count",
          "semantic": "gauge",
          "aggregation": "last",
          "period": {
            "start": "2026-10-04T02:26:27.207Z",
            "end": "2026-10-04T02:26:27.207Z",
            "timezone": "UTC"
          },
          "dimensions": []
        },
        {
          "key": "approved",
          "label": "Approved",
          "value": 0,
          "unit": "count",
          "semantic": "gauge",
          "aggregation": "last",
          "period": {
            "start": "2026-10-04T02:26:27.207Z",
            "end": "2026-10-04T02:26:27.207Z",
            "timezone": "UTC"
          },
          "dimensions": []
        },
        {
          "key": "versions",
          "label": "Versions",
          "value": 0,
          "unit": "count",
          "semantic": "gauge",
          "aggregation": "last",
          "period": {
            "start": "2026-10-04T02:26:27.207Z",
            "end": "2026-10-04T02:26:27.207Z",
            "timezone": "UTC"
          },
          "dimensions": []
        }
      ],
      "appId": "app_topolo_compose",
      "serviceName": "Compose",
      "lastUpdated": "2026-10-04T02:26:27.207Z"
    }
  ],
  "workspace": {
    "id": "ws_compose_test",
    "name": "Compose test workspace"
  },
  "workspaces": [
    {
      "id": "ws_compose_test",
      "name": "Compose test workspace",
      "isDefault": true
    }
  ]
}

HTTP 200. Inspect success, widget state, resource.resourceId, observation time and each metric. Use documents.list in the same granted workspace for document inventory; widget counts do not identify individual documents or prove notification delivery.

Another supported request

Actual Compose Worker response. Auth, Nexus, notifications, metering and platform workspace transport are simulated. D1 is an in-memory adapter or local SQLite as stated by the test. This does not prove a live model completion or notification delivery. No request credentials are captured. Captured scenario: bootstrap + widget > GET /api/widget serves without an app-supplied workspace list.

Input · payload.json:

{}

CLI:

topolo actions validate app_topolo_compose.widget.get --data @payload.json --json
topolo actions plan app_topolo_compose.widget.get --resource-type workspace --resource-id "$COMPOSE_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_compose.widget.get --resource-type workspace --resource-id "$COMPOSE_WORKSPACE_ID" --data @payload.json --json

MCP tool and arguments:

{
  "tool": "topolo_read_action",
  "arguments": {
    "actionId": "app_topolo_compose.widget.get",
    "input": {},
    "resourceType": "workspace",
    "resourceId": "<identifier returned by granted resource discovery>"
  }
}

Captured local response · HTTP 200:

{
  "success": true,
  "contractVersion": "3.0.0",
  "appId": "app_topolo_compose",
  "serviceName": "Compose",
  "generatedAt": "2026-10-04T02:26:27.248Z",
  "widgets": [
    {
      "id": "compose.workspace-summary",
      "version": "2.0.0",
      "type": "stats",
      "presentation": {
        "title": "Compose workspace",
        "description": "Overview of your Compose workspace: drafted documents alongside the available templates, styles, and exports.",
        "contexts": [
          "workspace"
        ],
        "supportedSizes": [
          "compact",
          "medium",
          "wide"
        ],
        "defaultSize": "medium"
      },
      "resource": {
        "resourceType": "workspace",
        "resourceId": "ws_compose_test",
        "requiredPermissions": [
          "workspace:read"
        ]
      },
      "state": {
        "status": "ready",
        "observedAt": "2026-10-04T02:26:27.248Z",
        "lastSuccessfulAt": "2026-10-04T02:26:27.248Z"
      },
      "refresh": {
        "intervalSeconds": 60,
        "timeoutSeconds": 10,
        "maxAgeSeconds": 60,
        "staleWhileRevalidateSeconds": 120
      },
      "configuration": {
        "allowMultipleInstances": false,
        "fields": [],
        "defaults": {}
      },
      "drilldowns": [
        {
          "id": "documents",
          "label": "View documents",
          "href": "/dashboard/documents"
        }
      ],
      "controls": [],
      "localization": {
        "locale": "en",
        "titleKey": "compose.widget.title",
        "descriptionKey": "compose.widget.summary"
      },
      "accessibility": {
        "label": "Compose workspace metrics",
        "description": "Overview of your Compose workspace: drafted documents alongside the available templates, styles, and exports."
      },
      "contribution": {
        "summary": "Document inventory, approval readiness, and version activity for the selected Compose workspace.",
        "identity": {
          "iconSource": "catalog"
        },
        "workspaceSelector": {
          "mode": "required",
          "resourceType": "workspace",
          "label": "Compose workspace",
          "supportsMultiple": false
        },
        "metricDefinitions": [
          {
            "key": "documents",
            "label": "Documents",
            "description": "Active documents in the selected workspace.",
            "unit": "count",
            "semantic": "gauge",
            "aggregation": "last"
          },
          {
            "key": "in_review",
            "label": "In review",
            "description": "Documents currently awaiting review.",
            "unit": "count",
            "semantic": "gauge",
            "aggregation": "last"
          },
          {
            "key": "approved",
            "label": "Approved",
            "description": "Documents currently approved.",
            "unit": "count",
            "semantic": "gauge",
            "aggregation": "last"
          },
          {
            "key": "versions",
            "label": "Versions",
            "description": "Document versions recorded in the selected workspace.",
            "unit": "count",
            "semantic": "gauge",
            "aggregation": "last"
          }
        ],
        "seriesDefinitions": [],
        "dimensions": [],
        "lifecycleStages": [
          {
            "key": "draft",
            "label": "Draft",
            "order": 0,
            "terminal": false
          },
          {
            "key": "in_review",
            "label": "In review",
            "order": 1,
            "terminal": false
          },
          {
            "key": "approved",
            "label": "Approved",
            "order": 2,
            "terminal": true
          },
          {
            "key": "rejected",
            "label": "Rejected",
            "order": 3,
            "terminal": true
          }
        ],
        "events": [
          {
            "key": "document_created",
            "label": "Document created",
            "description": "A document was created in the workspace."
          },
          {
            "key": "review_requested",
            "label": "Review requested",
            "description": "A document entered review."
          },
          {
            "key": "document_approved",
            "label": "Document approved",
            "description": "A document was approved."
          },
          {
            "key": "version_created",
            "label": "Version created",
            "description": "A new document version was recorded."
          }
        ],
        "datasets": [
          {
            "id": "document_operations",
            "label": "Document operations",
            "description": "Current document, approval, and version aggregates.",
            "grain": "One aggregate row per Compose workspace.",
            "metricKeys": [
              "documents",
              "in_review",
              "approved",
              "versions"
            ],
            "seriesKeys": [],
            "dimensionKeys": [],
            "eventKeys": [
              "document_created",
              "review_requested",
              "document_approved",
              "version_created"
            ],
            "actionIds": []
          }
        ],
        "compatibleVisualizations": [
          "number",
          "bar",
          "table"
        ],
        "defaultVisualization": "bar"
      },
      "metrics": [
        {
          "key": "documents",
          "label": "Documents",
          "value": 1,
          "unit": "count",
          "semantic": "gauge",
          "aggregation": "last",
          "period": {
            "start": "2026-10-04T02:26:27.248Z",
            "end": "2026-10-04T02:26:27.248Z",
            "timezone": "UTC"
          },
          "dimensions": []
        },
        {
          "key": "in_review",
          "label": "In review",
          "value": 0,
          "unit": "count",
          "semantic": "gauge",
          "aggregation": "last",
          "period": {
            "start": "2026-10-04T02:26:27.248Z",
            "end": "2026-10-04T02:26:27.248Z",
            "timezone": "UTC"
          },
          "dimensions": []
        },
        {
          "key": "approved",
          "label": "Approved",
          "value": 0,
          "unit": "count",
          "semantic": "gauge",
          "aggregation": "last",
          "period": {
            "start": "2026-10-04T02:26:27.248Z",
            "end": "2026-10-04T02:26:27.248Z",
            "timezone": "UTC"
          },
          "dimensions": []
        },
        {
          "key": "versions",
          "label": "Versions",
          "value": 1,
          "unit": "count",
          "semantic": "gauge",
          "aggregation": "last",
          "period": {
            "start": "2026-10-04T02:26:27.248Z",
            "end": "2026-10-04T02:26:27.248Z",
            "timezone": "UTC"
          },
          "dimensions": []
        }
      ],
      "appId": "app_topolo_compose",
      "serviceName": "Compose",
      "lastUpdated": "2026-10-04T02:26:27.248Z"
    }
  ],
  "workspace": {
    "id": "ws_compose_test",
    "name": "Compose test workspace"
  },
  "workspaces": [
    {
      "id": "ws_compose_test",
      "name": "Compose test workspace",
      "isDefault": true
    }
  ]
}

HTTP 200. Inspect success, widget state, resource.resourceId, observation time and each metric. Use documents.list in the same granted workspace for document inventory; widget counts do not identify individual documents or prove notification delivery.

Refused request · HTTP 401

Actual Compose Worker response. Auth, Nexus, notifications, metering and platform workspace transport are simulated. D1 is an in-memory adapter or local SQLite as stated by the test. This does not prove a live model completion or notification delivery. No request credentials are captured. Captured scenario: bootstrap + widget > GET /api/widget is 401 without auth.

Input · payload.json:

{}

CLI:

topolo actions validate app_topolo_compose.widget.get --data @payload.json --json
topolo actions plan app_topolo_compose.widget.get --resource-type workspace --resource-id "$COMPOSE_WORKSPACE_ID" --data @payload.json --json

Captured local response · HTTP 401:

{
  "error": "Authentication token required"
}

HTTP 401. The handler refused this request. Resolve its exact cause before retrying; input validation can reject an invalid fixture before it reaches the handler.

Verify the result

  • Inspect success, widget state, resource.resourceId, observation time and each metric.
  • Use documents.list in the same granted workspace for document inventory; widget counts do not identify individual documents or prove notification delivery.

Errors and recovery

  • Authentication token required (HTTP 401): Refresh the authorized credential in the same environment and pinned organization; do not switch scope to bypass this refusal.

Auth, action-input validation and platform resource resolution can refuse a request before its handler. Retain the exact error, request id and context; requesting another context is not a legitimate way to bypass a refusal.

Recovery boundary

The widget read changes no document. Refresh through the same verified context if it becomes stale.

  • List Compose documents: List up to 200 documents created by the authenticated user in the selected authorized workspace, optionally including archived records. The read can initialize the local workspace mirror.

Evidence

Responses were captured from the actual Compose Worker using synthetic users, organizations, content and identifiers. Tests simulate Auth, Nexus, Notify, metering and platform workspace transport and use an in-memory D1 adapter or local SQLite. They prove local handler behavior, not live model correctness, provider cost, notification delivery, real workspace grants or cross-store atomicity. HTTP 204 responses are exactly empty strings in the SDK transport. Replace fixture identifiers through credential-scoped discovery. Capture digests and test scenarios are retained in the source fixture records.