{
  "version": 1,
  "product": {
    "id": "goodvibes",
    "surface": "operator",
    "version": "2.0.23"
  },
  "auth": {
    "modes": [
      "shared-bearer",
      "session-login"
    ],
    "login": {
      "method": "POST",
      "path": "/login",
      "requestSchema": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string"
          }
        },
        "required": [
          "username",
          "password"
        ],
        "additionalProperties": false
      },
      "responseSchema": {
        "type": "object",
        "properties": {
          "authenticated": {
            "type": "boolean"
          },
          "token": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "expiresAt": {
            "type": "number"
          }
        },
        "required": [
          "authenticated",
          "token",
          "username",
          "expiresAt"
        ],
        "additionalProperties": false
      }
    },
    "current": {
      "method": "GET",
      "path": "/api/control-plane/auth",
      "responseSchema": {
        "type": "object",
        "properties": {
          "authenticated": {
            "type": "boolean"
          },
          "authMode": {
            "type": "string",
            "enum": [
              "anonymous",
              "invalid",
              "session",
              "shared-token"
            ]
          },
          "tokenPresent": {
            "type": "boolean"
          },
          "authorizationHeaderPresent": {
            "type": "boolean"
          },
          "sessionCookiePresent": {
            "type": "boolean"
          },
          "principalId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "principalKind": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "user",
                  "bot",
                  "service",
                  "token"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "admin": {
            "type": "boolean"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "authenticated",
          "authMode",
          "tokenPresent",
          "authorizationHeaderPresent",
          "sessionCookiePresent",
          "principalId",
          "principalKind",
          "admin",
          "scopes",
          "roles"
        ],
        "additionalProperties": false
      },
      "aliasPaths": [
        "/api/control-plane/whoami"
      ]
    },
    "sessionCookie": {
      "name": "goodvibes_session",
      "httpOnly": true,
      "sameSite": "Lax",
      "path": "/"
    },
    "bearer": {
      "header": "Authorization: Bearer <token>",
      "queryParameters": []
    }
  },
  "transports": {
    "http": {
      "statusPath": "/status",
      "methodsPath": "/api/control-plane/methods",
      "eventsCatalogPath": "/api/control-plane/events/catalog"
    },
    "sse": {
      "path": "/api/control-plane/events",
      "query": {
        "domains": "comma-separated runtime domains"
      }
    },
    "websocket": {
      "path": "/api/control-plane/ws",
      "clientFrames": [
        {
          "type": "ping"
        },
        {
          "type": "auth",
          "fields": [
            "token?",
            "domains?",
            "label?",
            "capabilities?"
          ]
        },
        {
          "type": "subscribe",
          "fields": [
            "domains"
          ]
        },
        {
          "type": "unsubscribe",
          "fields": [
            "domains"
          ]
        },
        {
          "type": "call",
          "fields": [
            "id?",
            "methodId?",
            "method?",
            "path?",
            "query?",
            "body?"
          ]
        }
      ],
      "serverFrames": [
        {
          "type": "event",
          "fields": [
            "event",
            "payload"
          ]
        },
        {
          "type": "pong",
          "fields": [
            "ts"
          ]
        },
        {
          "type": "auth",
          "fields": [
            "ok",
            "clientId?",
            "principalId?",
            "error?"
          ]
        },
        {
          "type": "subscribed",
          "fields": [
            "clientId",
            "domains"
          ]
        },
        {
          "type": "unsubscribed",
          "fields": [
            "clientId",
            "domains"
          ]
        },
        {
          "type": "response",
          "fields": [
            "id",
            "ok",
            "status",
            "body"
          ]
        },
        {
          "type": "error",
          "fields": [
            "error"
          ]
        }
      ]
    }
  },
  "operator": {
    "methods": [
      {
        "id": "accounts.snapshot",
        "title": "Accounts Snapshot",
        "description": "Return provider account posture.",
        "category": "accounts",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:accounts"
        ],
        "http": {
          "method": "GET",
          "path": "/api/accounts"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "capturedAt": {
              "type": "number"
            },
            "providers": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "providerId": {
                    "type": "string"
                  },
                  "active": {
                    "type": "boolean"
                  },
                  "modelCount": {
                    "type": "number"
                  },
                  "configured": {
                    "type": "boolean"
                  },
                  "oauthReady": {
                    "type": "boolean"
                  },
                  "pendingLogin": {
                    "type": "boolean"
                  },
                  "availableRoutes": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "api-key",
                        "subscription",
                        "service-oauth",
                        "unconfigured"
                      ]
                    }
                  },
                  "preferredRoute": {
                    "type": "string",
                    "enum": [
                      "api-key",
                      "subscription",
                      "service-oauth",
                      "unconfigured"
                    ]
                  },
                  "activeRoute": {
                    "type": "string",
                    "enum": [
                      "api-key",
                      "subscription",
                      "service-oauth",
                      "unconfigured"
                    ]
                  },
                  "activeRouteReason": {
                    "type": "string"
                  },
                  "authFreshness": {
                    "type": "string",
                    "enum": [
                      "healthy",
                      "expiring",
                      "expired",
                      "pending",
                      "unconfigured"
                    ]
                  },
                  "fallbackRoute": {
                    "type": "string",
                    "enum": [
                      "api-key",
                      "subscription",
                      "service-oauth",
                      "unconfigured"
                    ]
                  },
                  "fallbackRisk": {
                    "type": "string"
                  },
                  "expiresAt": {
                    "type": "number"
                  },
                  "tokenType": {
                    "type": "string"
                  },
                  "notes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "usageWindows": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string"
                        },
                        "detail": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "label",
                        "detail"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "issues": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "recommendedActions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "description": {
                          "type": "string"
                        },
                        "command": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "args": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "name",
                            "args"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "description"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "routeRecords": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "route": {
                          "type": "string",
                          "enum": [
                            "api-key",
                            "subscription",
                            "service-oauth",
                            "unconfigured"
                          ]
                        },
                        "usable": {
                          "type": "boolean"
                        },
                        "freshness": {
                          "type": "string",
                          "enum": [
                            "healthy",
                            "expiring",
                            "expired",
                            "pending",
                            "unconfigured"
                          ]
                        },
                        "detail": {
                          "type": "string"
                        },
                        "issues": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "route",
                        "usable",
                        "freshness",
                        "detail",
                        "issues"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "providerId",
                  "active",
                  "modelCount",
                  "configured",
                  "oauthReady",
                  "pendingLogin",
                  "availableRoutes",
                  "preferredRoute",
                  "activeRoute",
                  "activeRouteReason",
                  "authFreshness",
                  "notes",
                  "usageWindows",
                  "issues",
                  "recommendedActions",
                  "routeRecords"
                ],
                "additionalProperties": true
              }
            },
            "configuredCount": {
              "type": "number"
            },
            "issueCount": {
              "type": "number"
            }
          },
          "required": [
            "capturedAt",
            "providers",
            "configuredCount",
            "issueCount"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "acp.agents.list",
        "title": "List Installed Third-Party Coding Agents",
        "description": "READ-ONLY discovery of installed ACP-capable third-party coding agents (Claude Code, Codex CLI, opencode): existence checks over $PATH and known install directories, no process is ever executed, no registration ceremony. Returns only what is present (id, title, resolved binary path, ACP launch args); absence is a quiet empty list, never a nag.",
        "category": "acp",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "read:fleet"
        ],
        "outputSchema": {
          "type": "object",
          "properties": {
            "agents": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "binaryPath": {
                    "type": "string"
                  },
                  "args": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "id",
                  "title",
                  "binaryPath",
                  "args"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "agents"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "acp.sessions.create",
        "title": "Spawn a Third-Party Coding Agent Session",
        "description": "Spawn a discovered third-party agent into a working directory as a hosted daemon session in ONE act: the binary is launched in ACP stdio mode, the handshake and session creation run under a bound timeout, and the result is the hosted record, which appears as a steerable/stoppable fleet row (kind acp-agent) whose permission asks classify as waiting-on-human. A binary that fails the handshake returns the SAME record with state \"failed\" and a structured error (which binary, which stage, what happened), an honest outcome, never a hung row and never a bare string. An optional initial prompt starts the first turn.",
        "category": "acp",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:fleet"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "agentId": {
              "type": "string"
            },
            "cwd": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "prompt": {
              "type": "string"
            }
          },
          "required": [
            "agentId",
            "cwd"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "hosted": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "agentId": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "binaryPath": {
                  "type": "string"
                },
                "cwd": {
                  "type": "string"
                },
                "state": {
                  "type": "string"
                },
                "startedAt": {
                  "type": "number"
                },
                "completedAt": {
                  "type": "number"
                },
                "sessionId": {
                  "type": "string"
                },
                "progress": {
                  "type": "string"
                },
                "pendingPermission": {
                  "type": "string"
                },
                "error": {
                  "type": "object",
                  "properties": {
                    "binary": {
                      "type": "string"
                    },
                    "stage": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "binary",
                    "stage",
                    "message"
                  ],
                  "additionalProperties": false
                },
                "promptCount": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "agentId",
                "title",
                "binaryPath",
                "cwd",
                "state",
                "startedAt",
                "promptCount"
              ],
              "additionalProperties": false
            },
            "started": {
              "type": "boolean"
            }
          },
          "required": [
            "hosted",
            "started"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "approvals.approve",
        "title": "Approve Approval",
        "description": "Approve a pending approval. Optionally pass selectedHunks (edit-tool approvals only): the daemon filters the approval's own edit list to those hunk indices server-side, so every surface produces identical modified-edit args. Omitting selectedHunks approves the whole request (back-compat). An out-of-range index or a non-edit approval is rejected with a 400. rememberTier generalizes the decision (a generalizing tier persists a durable rule and sweeps queued asks it covers); modifiedArgs carries an argument-modifying approval, e.g. the typed answer to a command's terminal prompt, to the waiting call (selectedHunks supersedes it when both are present). The response's recorded block reports what the broker actually recorded.",
        "category": "approvals",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:approvals"
        ],
        "http": {
          "method": "POST",
          "path": "/api/approvals/{approvalId}/approve"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "approvalId": {
              "type": "string"
            },
            "note": {
              "type": "string"
            },
            "remember": {
              "type": "boolean"
            },
            "selectedHunks": {
              "type": "array",
              "items": {
                "type": "number"
              }
            },
            "rememberTier": {
              "type": "string",
              "enum": [
                "session",
                "exact",
                "command-class",
                "path",
                "tool"
              ]
            },
            "reason": {
              "type": "string"
            },
            "modifiedArgs": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "approvalId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "approval": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "callId": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                },
                "routeId": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "claimed",
                    "approved",
                    "denied",
                    "cancelled",
                    "expired"
                  ]
                },
                "request": {
                  "type": "object",
                  "properties": {
                    "callId": {
                      "type": "string"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "args": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    },
                    "category": {
                      "type": "string",
                      "enum": [
                        "read",
                        "write",
                        "execute",
                        "delegate"
                      ]
                    },
                    "analysis": {
                      "type": "object",
                      "properties": {
                        "classification": {
                          "type": "string"
                        },
                        "riskLevel": {
                          "type": "string",
                          "enum": [
                            "low",
                            "medium",
                            "high",
                            "critical"
                          ]
                        },
                        "summary": {
                          "type": "string"
                        },
                        "reasons": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "target": {
                          "type": "string"
                        },
                        "targetKind": {
                          "type": "string",
                          "enum": [
                            "command",
                            "path",
                            "url",
                            "task",
                            "generic"
                          ]
                        },
                        "surface": {
                          "type": "string",
                          "enum": [
                            "filesystem",
                            "shell",
                            "network",
                            "orchestration",
                            "platform",
                            "generic"
                          ]
                        },
                        "blastRadius": {
                          "type": "string",
                          "enum": [
                            "local",
                            "project",
                            "external",
                            "delegated",
                            "platform"
                          ]
                        },
                        "sideEffects": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "host": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "classification",
                        "riskLevel",
                        "summary",
                        "reasons"
                      ],
                      "additionalProperties": false
                    },
                    "workingDirectory": {
                      "type": "string"
                    },
                    "attribution": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "background-agent"
                              ]
                            },
                            "agentId": {
                              "type": "string"
                            },
                            "template": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "agentId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "mcp-server"
                              ]
                            },
                            "serverName": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "serverName"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "sandbox-escalation"
                              ]
                            },
                            "sandbox": {
                              "type": "string"
                            },
                            "escalations": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "kind",
                            "sandbox",
                            "escalations"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "rememberOptions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tier": {
                            "type": "string",
                            "enum": [
                              "session",
                              "exact",
                              "command-class",
                              "path",
                              "tool"
                            ]
                          },
                          "label": {
                            "type": "string"
                          },
                          "detail": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "tier",
                          "label",
                          "detail"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "callId",
                    "tool",
                    "args",
                    "category",
                    "analysis"
                  ],
                  "additionalProperties": false
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "claimedBy": {
                  "type": "string"
                },
                "claimedAt": {
                  "type": "number"
                },
                "resolvedAt": {
                  "type": "number"
                },
                "resolvedBy": {
                  "type": "string"
                },
                "decision": {
                  "type": "object",
                  "properties": {
                    "approved": {
                      "type": "boolean"
                    },
                    "remember": {
                      "type": "boolean"
                    },
                    "rememberTier": {
                      "type": "string",
                      "enum": [
                        "session",
                        "exact",
                        "command-class",
                        "path",
                        "tool"
                      ]
                    },
                    "reason": {
                      "type": "string"
                    },
                    "modifiedArgs": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "approved"
                  ],
                  "additionalProperties": false
                },
                "fixSessionId": {
                  "type": "string"
                },
                "fixSessionError": {
                  "type": "string"
                },
                "expiresAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "audit": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "action": {
                        "type": "string",
                        "enum": [
                          "created",
                          "claimed",
                          "approved",
                          "denied",
                          "cancelled",
                          "expired",
                          "updated"
                        ]
                      },
                      "actor": {
                        "type": "string"
                      },
                      "actorSurface": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "note": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "action",
                      "actor",
                      "createdAt"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "id",
                "callId",
                "status",
                "request",
                "createdAt",
                "updatedAt",
                "metadata",
                "audit"
              ],
              "additionalProperties": false
            },
            "recorded": {
              "type": "object",
              "properties": {
                "approved": {
                  "type": "boolean"
                },
                "rememberTier": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "session",
                        "exact",
                        "command-class",
                        "path",
                        "tool"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reasonStored": {
                  "type": "boolean"
                },
                "modifiedArgsDelivered": {
                  "type": "boolean"
                }
              },
              "required": [
                "approved",
                "rememberTier",
                "reasonStored",
                "modifiedArgsDelivered"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "approval"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "approvals.cancel",
        "title": "Cancel Approval",
        "description": "Cancel a pending approval.",
        "category": "approvals",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:approvals"
        ],
        "http": {
          "method": "POST",
          "path": "/api/approvals/{approvalId}/cancel"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "approvalId": {
              "type": "string"
            },
            "note": {
              "type": "string"
            },
            "remember": {
              "type": "boolean"
            }
          },
          "required": [
            "approvalId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "approval": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "callId": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                },
                "routeId": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "claimed",
                    "approved",
                    "denied",
                    "cancelled",
                    "expired"
                  ]
                },
                "request": {
                  "type": "object",
                  "properties": {
                    "callId": {
                      "type": "string"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "args": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    },
                    "category": {
                      "type": "string",
                      "enum": [
                        "read",
                        "write",
                        "execute",
                        "delegate"
                      ]
                    },
                    "analysis": {
                      "type": "object",
                      "properties": {
                        "classification": {
                          "type": "string"
                        },
                        "riskLevel": {
                          "type": "string",
                          "enum": [
                            "low",
                            "medium",
                            "high",
                            "critical"
                          ]
                        },
                        "summary": {
                          "type": "string"
                        },
                        "reasons": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "target": {
                          "type": "string"
                        },
                        "targetKind": {
                          "type": "string",
                          "enum": [
                            "command",
                            "path",
                            "url",
                            "task",
                            "generic"
                          ]
                        },
                        "surface": {
                          "type": "string",
                          "enum": [
                            "filesystem",
                            "shell",
                            "network",
                            "orchestration",
                            "platform",
                            "generic"
                          ]
                        },
                        "blastRadius": {
                          "type": "string",
                          "enum": [
                            "local",
                            "project",
                            "external",
                            "delegated",
                            "platform"
                          ]
                        },
                        "sideEffects": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "host": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "classification",
                        "riskLevel",
                        "summary",
                        "reasons"
                      ],
                      "additionalProperties": false
                    },
                    "workingDirectory": {
                      "type": "string"
                    },
                    "attribution": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "background-agent"
                              ]
                            },
                            "agentId": {
                              "type": "string"
                            },
                            "template": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "agentId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "mcp-server"
                              ]
                            },
                            "serverName": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "serverName"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "sandbox-escalation"
                              ]
                            },
                            "sandbox": {
                              "type": "string"
                            },
                            "escalations": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "kind",
                            "sandbox",
                            "escalations"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "rememberOptions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tier": {
                            "type": "string",
                            "enum": [
                              "session",
                              "exact",
                              "command-class",
                              "path",
                              "tool"
                            ]
                          },
                          "label": {
                            "type": "string"
                          },
                          "detail": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "tier",
                          "label",
                          "detail"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "callId",
                    "tool",
                    "args",
                    "category",
                    "analysis"
                  ],
                  "additionalProperties": false
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "claimedBy": {
                  "type": "string"
                },
                "claimedAt": {
                  "type": "number"
                },
                "resolvedAt": {
                  "type": "number"
                },
                "resolvedBy": {
                  "type": "string"
                },
                "decision": {
                  "type": "object",
                  "properties": {
                    "approved": {
                      "type": "boolean"
                    },
                    "remember": {
                      "type": "boolean"
                    },
                    "rememberTier": {
                      "type": "string",
                      "enum": [
                        "session",
                        "exact",
                        "command-class",
                        "path",
                        "tool"
                      ]
                    },
                    "reason": {
                      "type": "string"
                    },
                    "modifiedArgs": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "approved"
                  ],
                  "additionalProperties": false
                },
                "fixSessionId": {
                  "type": "string"
                },
                "fixSessionError": {
                  "type": "string"
                },
                "expiresAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "audit": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "action": {
                        "type": "string",
                        "enum": [
                          "created",
                          "claimed",
                          "approved",
                          "denied",
                          "cancelled",
                          "expired",
                          "updated"
                        ]
                      },
                      "actor": {
                        "type": "string"
                      },
                      "actorSurface": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "note": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "action",
                      "actor",
                      "createdAt"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "id",
                "callId",
                "status",
                "request",
                "createdAt",
                "updatedAt",
                "metadata",
                "audit"
              ],
              "additionalProperties": false
            },
            "recorded": {
              "type": "object",
              "properties": {
                "approved": {
                  "type": "boolean"
                },
                "rememberTier": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "session",
                        "exact",
                        "command-class",
                        "path",
                        "tool"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reasonStored": {
                  "type": "boolean"
                },
                "modifiedArgsDelivered": {
                  "type": "boolean"
                }
              },
              "required": [
                "approved",
                "rememberTier",
                "reasonStored",
                "modifiedArgsDelivered"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "approval"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "approvals.claim",
        "title": "Claim Approval",
        "description": "Claim a pending approval for operator handling.",
        "category": "approvals",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:approvals"
        ],
        "http": {
          "method": "POST",
          "path": "/api/approvals/{approvalId}/claim"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "approvalId": {
              "type": "string"
            }
          },
          "required": [
            "approvalId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "approval": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "callId": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                },
                "routeId": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "claimed",
                    "approved",
                    "denied",
                    "cancelled",
                    "expired"
                  ]
                },
                "request": {
                  "type": "object",
                  "properties": {
                    "callId": {
                      "type": "string"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "args": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    },
                    "category": {
                      "type": "string",
                      "enum": [
                        "read",
                        "write",
                        "execute",
                        "delegate"
                      ]
                    },
                    "analysis": {
                      "type": "object",
                      "properties": {
                        "classification": {
                          "type": "string"
                        },
                        "riskLevel": {
                          "type": "string",
                          "enum": [
                            "low",
                            "medium",
                            "high",
                            "critical"
                          ]
                        },
                        "summary": {
                          "type": "string"
                        },
                        "reasons": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "target": {
                          "type": "string"
                        },
                        "targetKind": {
                          "type": "string",
                          "enum": [
                            "command",
                            "path",
                            "url",
                            "task",
                            "generic"
                          ]
                        },
                        "surface": {
                          "type": "string",
                          "enum": [
                            "filesystem",
                            "shell",
                            "network",
                            "orchestration",
                            "platform",
                            "generic"
                          ]
                        },
                        "blastRadius": {
                          "type": "string",
                          "enum": [
                            "local",
                            "project",
                            "external",
                            "delegated",
                            "platform"
                          ]
                        },
                        "sideEffects": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "host": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "classification",
                        "riskLevel",
                        "summary",
                        "reasons"
                      ],
                      "additionalProperties": false
                    },
                    "workingDirectory": {
                      "type": "string"
                    },
                    "attribution": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "background-agent"
                              ]
                            },
                            "agentId": {
                              "type": "string"
                            },
                            "template": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "agentId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "mcp-server"
                              ]
                            },
                            "serverName": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "serverName"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "sandbox-escalation"
                              ]
                            },
                            "sandbox": {
                              "type": "string"
                            },
                            "escalations": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "kind",
                            "sandbox",
                            "escalations"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "rememberOptions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tier": {
                            "type": "string",
                            "enum": [
                              "session",
                              "exact",
                              "command-class",
                              "path",
                              "tool"
                            ]
                          },
                          "label": {
                            "type": "string"
                          },
                          "detail": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "tier",
                          "label",
                          "detail"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "callId",
                    "tool",
                    "args",
                    "category",
                    "analysis"
                  ],
                  "additionalProperties": false
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "claimedBy": {
                  "type": "string"
                },
                "claimedAt": {
                  "type": "number"
                },
                "resolvedAt": {
                  "type": "number"
                },
                "resolvedBy": {
                  "type": "string"
                },
                "decision": {
                  "type": "object",
                  "properties": {
                    "approved": {
                      "type": "boolean"
                    },
                    "remember": {
                      "type": "boolean"
                    },
                    "rememberTier": {
                      "type": "string",
                      "enum": [
                        "session",
                        "exact",
                        "command-class",
                        "path",
                        "tool"
                      ]
                    },
                    "reason": {
                      "type": "string"
                    },
                    "modifiedArgs": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "approved"
                  ],
                  "additionalProperties": false
                },
                "fixSessionId": {
                  "type": "string"
                },
                "fixSessionError": {
                  "type": "string"
                },
                "expiresAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "audit": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "action": {
                        "type": "string",
                        "enum": [
                          "created",
                          "claimed",
                          "approved",
                          "denied",
                          "cancelled",
                          "expired",
                          "updated"
                        ]
                      },
                      "actor": {
                        "type": "string"
                      },
                      "actorSurface": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "note": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "action",
                      "actor",
                      "createdAt"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "id",
                "callId",
                "status",
                "request",
                "createdAt",
                "updatedAt",
                "metadata",
                "audit"
              ],
              "additionalProperties": false
            },
            "recorded": {
              "type": "object",
              "properties": {
                "approved": {
                  "type": "boolean"
                },
                "rememberTier": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "session",
                        "exact",
                        "command-class",
                        "path",
                        "tool"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reasonStored": {
                  "type": "boolean"
                },
                "modifiedArgsDelivered": {
                  "type": "boolean"
                }
              },
              "required": [
                "approved",
                "rememberTier",
                "reasonStored",
                "modifiedArgsDelivered"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "approval"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "approvals.deny",
        "title": "Deny Approval",
        "description": "Deny a pending approval. rememberTier generalizes the denial (a generalizing tier persists a durable deny rule and sweeps queued asks it covers); reason is the user's free-text feedback, which rides the structured declined result so the model adapts instead of guessing. The response's recorded block reports what the broker actually recorded.",
        "category": "approvals",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:approvals"
        ],
        "http": {
          "method": "POST",
          "path": "/api/approvals/{approvalId}/deny"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "approvalId": {
              "type": "string"
            },
            "note": {
              "type": "string"
            },
            "remember": {
              "type": "boolean"
            },
            "rememberTier": {
              "type": "string",
              "enum": [
                "session",
                "exact",
                "command-class",
                "path",
                "tool"
              ]
            },
            "reason": {
              "type": "string"
            }
          },
          "required": [
            "approvalId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "approval": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "callId": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                },
                "routeId": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "claimed",
                    "approved",
                    "denied",
                    "cancelled",
                    "expired"
                  ]
                },
                "request": {
                  "type": "object",
                  "properties": {
                    "callId": {
                      "type": "string"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "args": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    },
                    "category": {
                      "type": "string",
                      "enum": [
                        "read",
                        "write",
                        "execute",
                        "delegate"
                      ]
                    },
                    "analysis": {
                      "type": "object",
                      "properties": {
                        "classification": {
                          "type": "string"
                        },
                        "riskLevel": {
                          "type": "string",
                          "enum": [
                            "low",
                            "medium",
                            "high",
                            "critical"
                          ]
                        },
                        "summary": {
                          "type": "string"
                        },
                        "reasons": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "target": {
                          "type": "string"
                        },
                        "targetKind": {
                          "type": "string",
                          "enum": [
                            "command",
                            "path",
                            "url",
                            "task",
                            "generic"
                          ]
                        },
                        "surface": {
                          "type": "string",
                          "enum": [
                            "filesystem",
                            "shell",
                            "network",
                            "orchestration",
                            "platform",
                            "generic"
                          ]
                        },
                        "blastRadius": {
                          "type": "string",
                          "enum": [
                            "local",
                            "project",
                            "external",
                            "delegated",
                            "platform"
                          ]
                        },
                        "sideEffects": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "host": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "classification",
                        "riskLevel",
                        "summary",
                        "reasons"
                      ],
                      "additionalProperties": false
                    },
                    "workingDirectory": {
                      "type": "string"
                    },
                    "attribution": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "background-agent"
                              ]
                            },
                            "agentId": {
                              "type": "string"
                            },
                            "template": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "agentId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "mcp-server"
                              ]
                            },
                            "serverName": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "serverName"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "sandbox-escalation"
                              ]
                            },
                            "sandbox": {
                              "type": "string"
                            },
                            "escalations": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "kind",
                            "sandbox",
                            "escalations"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "rememberOptions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tier": {
                            "type": "string",
                            "enum": [
                              "session",
                              "exact",
                              "command-class",
                              "path",
                              "tool"
                            ]
                          },
                          "label": {
                            "type": "string"
                          },
                          "detail": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "tier",
                          "label",
                          "detail"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "callId",
                    "tool",
                    "args",
                    "category",
                    "analysis"
                  ],
                  "additionalProperties": false
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "claimedBy": {
                  "type": "string"
                },
                "claimedAt": {
                  "type": "number"
                },
                "resolvedAt": {
                  "type": "number"
                },
                "resolvedBy": {
                  "type": "string"
                },
                "decision": {
                  "type": "object",
                  "properties": {
                    "approved": {
                      "type": "boolean"
                    },
                    "remember": {
                      "type": "boolean"
                    },
                    "rememberTier": {
                      "type": "string",
                      "enum": [
                        "session",
                        "exact",
                        "command-class",
                        "path",
                        "tool"
                      ]
                    },
                    "reason": {
                      "type": "string"
                    },
                    "modifiedArgs": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "approved"
                  ],
                  "additionalProperties": false
                },
                "fixSessionId": {
                  "type": "string"
                },
                "fixSessionError": {
                  "type": "string"
                },
                "expiresAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "audit": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "action": {
                        "type": "string",
                        "enum": [
                          "created",
                          "claimed",
                          "approved",
                          "denied",
                          "cancelled",
                          "expired",
                          "updated"
                        ]
                      },
                      "actor": {
                        "type": "string"
                      },
                      "actorSurface": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "note": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "action",
                      "actor",
                      "createdAt"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "id",
                "callId",
                "status",
                "request",
                "createdAt",
                "updatedAt",
                "metadata",
                "audit"
              ],
              "additionalProperties": false
            },
            "recorded": {
              "type": "object",
              "properties": {
                "approved": {
                  "type": "boolean"
                },
                "rememberTier": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "session",
                        "exact",
                        "command-class",
                        "path",
                        "tool"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reasonStored": {
                  "type": "boolean"
                },
                "modifiedArgsDelivered": {
                  "type": "boolean"
                }
              },
              "required": [
                "approved",
                "rememberTier",
                "reasonStored",
                "modifiedArgsDelivered"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "approval"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "approvals.list",
        "title": "List Approvals",
        "description": "Return pending and historical approval records.",
        "category": "approvals",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:approvals"
        ],
        "http": {
          "method": "GET",
          "path": "/api/approvals"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "awaitingDecision": {
              "type": "boolean"
            },
            "mode": {
              "type": "string",
              "enum": [
                "default",
                "plan",
                "allow-all",
                "custom",
                "background-restricted"
              ]
            },
            "lastDecision": {
              "type": "object",
              "properties": {
                "callId": {
                  "type": "string"
                },
                "toolName": {
                  "type": "string"
                },
                "category": {
                  "type": "string",
                  "enum": [
                    "read",
                    "write",
                    "execute",
                    "delegate"
                  ]
                },
                "machineState": {
                  "type": "string",
                  "enum": [
                    "collect_rules",
                    "normalize_input",
                    "evaluate_policy",
                    "evaluate_runtime_mode",
                    "evaluate_session_override",
                    "final_safety_checks",
                    "decision_emitted"
                  ]
                },
                "outcome": {
                  "type": "string",
                  "enum": [
                    "approved",
                    "denied",
                    "deferred"
                  ]
                },
                "reason": {
                  "type": "string",
                  "enum": [
                    "config_allow",
                    "config_deny",
                    "managed_policy_allow",
                    "managed_policy_deny",
                    "mode_allow_all",
                    "mode_denied",
                    "mode_plan_deny",
                    "mode_background_restricted",
                    "session_cached_approval",
                    "session_cached_denial",
                    "safety_guardrail",
                    "user_rule_allow",
                    "user_rule_deny",
                    "user_approved",
                    "user_denied"
                  ]
                },
                "sourceLayer": {
                  "type": "string",
                  "enum": [
                    "config_policy",
                    "managed_policy",
                    "runtime_mode",
                    "session_override",
                    "safety_check",
                    "user_rule",
                    "user_prompt"
                  ]
                },
                "persisted": {
                  "type": "boolean"
                },
                "classification": {
                  "type": "string"
                },
                "riskLevel": {
                  "type": "string",
                  "enum": [
                    "low",
                    "medium",
                    "high",
                    "critical"
                  ]
                },
                "summary": {
                  "type": "string"
                },
                "decidedAt": {
                  "type": "number"
                }
              },
              "required": [
                "callId",
                "toolName",
                "category",
                "machineState",
                "outcome",
                "reason",
                "sourceLayer",
                "persisted",
                "decidedAt"
              ],
              "additionalProperties": false
            },
            "approvalCount": {
              "type": "number"
            },
            "denialCount": {
              "type": "number"
            },
            "cachedChecks": {
              "type": "number"
            },
            "totalChecks": {
              "type": "number"
            },
            "approvals": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "callId": {
                    "type": "string"
                  },
                  "sessionId": {
                    "type": "string"
                  },
                  "routeId": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "pending",
                      "claimed",
                      "approved",
                      "denied",
                      "cancelled",
                      "expired"
                    ]
                  },
                  "request": {
                    "type": "object",
                    "properties": {
                      "callId": {
                        "type": "string"
                      },
                      "tool": {
                        "type": "string"
                      },
                      "args": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      },
                      "category": {
                        "type": "string",
                        "enum": [
                          "read",
                          "write",
                          "execute",
                          "delegate"
                        ]
                      },
                      "analysis": {
                        "type": "object",
                        "properties": {
                          "classification": {
                            "type": "string"
                          },
                          "riskLevel": {
                            "type": "string",
                            "enum": [
                              "low",
                              "medium",
                              "high",
                              "critical"
                            ]
                          },
                          "summary": {
                            "type": "string"
                          },
                          "reasons": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "target": {
                            "type": "string"
                          },
                          "targetKind": {
                            "type": "string",
                            "enum": [
                              "command",
                              "path",
                              "url",
                              "task",
                              "generic"
                            ]
                          },
                          "surface": {
                            "type": "string",
                            "enum": [
                              "filesystem",
                              "shell",
                              "network",
                              "orchestration",
                              "platform",
                              "generic"
                            ]
                          },
                          "blastRadius": {
                            "type": "string",
                            "enum": [
                              "local",
                              "project",
                              "external",
                              "delegated",
                              "platform"
                            ]
                          },
                          "sideEffects": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "host": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "classification",
                          "riskLevel",
                          "summary",
                          "reasons"
                        ],
                        "additionalProperties": false
                      },
                      "workingDirectory": {
                        "type": "string"
                      },
                      "attribution": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "background-agent"
                                ]
                              },
                              "agentId": {
                                "type": "string"
                              },
                              "template": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "kind",
                              "agentId"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "mcp-server"
                                ]
                              },
                              "serverName": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "kind",
                              "serverName"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "sandbox-escalation"
                                ]
                              },
                              "sandbox": {
                                "type": "string"
                              },
                              "escalations": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            },
                            "required": [
                              "kind",
                              "sandbox",
                              "escalations"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      },
                      "rememberOptions": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "tier": {
                              "type": "string",
                              "enum": [
                                "session",
                                "exact",
                                "command-class",
                                "path",
                                "tool"
                              ]
                            },
                            "label": {
                              "type": "string"
                            },
                            "detail": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "tier",
                            "label",
                            "detail"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "callId",
                      "tool",
                      "args",
                      "category",
                      "analysis"
                    ],
                    "additionalProperties": false
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  },
                  "claimedBy": {
                    "type": "string"
                  },
                  "claimedAt": {
                    "type": "number"
                  },
                  "resolvedAt": {
                    "type": "number"
                  },
                  "resolvedBy": {
                    "type": "string"
                  },
                  "decision": {
                    "type": "object",
                    "properties": {
                      "approved": {
                        "type": "boolean"
                      },
                      "remember": {
                        "type": "boolean"
                      },
                      "rememberTier": {
                        "type": "string",
                        "enum": [
                          "session",
                          "exact",
                          "command-class",
                          "path",
                          "tool"
                        ]
                      },
                      "reason": {
                        "type": "string"
                      },
                      "modifiedArgs": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "approved"
                    ],
                    "additionalProperties": false
                  },
                  "fixSessionId": {
                    "type": "string"
                  },
                  "fixSessionError": {
                    "type": "string"
                  },
                  "expiresAt": {
                    "type": "number"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "audit": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "action": {
                          "type": "string",
                          "enum": [
                            "created",
                            "claimed",
                            "approved",
                            "denied",
                            "cancelled",
                            "expired",
                            "updated"
                          ]
                        },
                        "actor": {
                          "type": "string"
                        },
                        "actorSurface": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "number"
                        },
                        "note": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "action",
                        "actor",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "id",
                  "callId",
                  "status",
                  "request",
                  "createdAt",
                  "updatedAt",
                  "metadata",
                  "audit"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "awaitingDecision",
            "mode",
            "approvalCount",
            "denialCount",
            "cachedChecks",
            "totalChecks",
            "approvals"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "approvals.raise",
        "title": "Raise Approval",
        "description": "Raise a permission ask INTO the shared broker from a surface that is not in the daemon's process, the write counterpart to approvals.list/claim/approve/deny/cancel, which could only ever act on asks the daemon's own in-process callers had created. The ask becomes a record every surface can see and decide, and the daemon's attention machinery (web push, blocked-on-user) fans it out. Returns the PENDING record immediately and does NOT block waiting for an answer: the decision arrives on the control.approval_update event (SSE/WS, `permissions` domain), which is the channel to watch using the returned id. An identical ask already in flight (same session, tool and args) coalesces onto the existing record, one prompt, one decision, `coalesced: true`, and the returned record is that earlier one. Optional timeoutMs expires the ask if nobody answers (clamped to 12h); optional waitMs waits inline for a decision for callers that want one round trip (clamped to 60s) and reports `decided: false` with the record still pending when it runs out, never a decision that was not made. ws-only invoke verb; no REST binding.",
        "category": "approvals",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:approvals"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "request": {
              "type": "object",
              "properties": {
                "callId": {
                  "type": "string"
                },
                "tool": {
                  "type": "string"
                },
                "args": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "category": {
                  "type": "string",
                  "enum": [
                    "read",
                    "write",
                    "execute",
                    "delegate"
                  ]
                },
                "analysis": {
                  "type": "object",
                  "properties": {
                    "classification": {
                      "type": "string"
                    },
                    "riskLevel": {
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high",
                        "critical"
                      ]
                    },
                    "summary": {
                      "type": "string"
                    },
                    "reasons": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "target": {
                      "type": "string"
                    },
                    "targetKind": {
                      "type": "string",
                      "enum": [
                        "command",
                        "path",
                        "url",
                        "task",
                        "generic"
                      ]
                    },
                    "surface": {
                      "type": "string",
                      "enum": [
                        "filesystem",
                        "shell",
                        "network",
                        "orchestration",
                        "platform",
                        "generic"
                      ]
                    },
                    "blastRadius": {
                      "type": "string",
                      "enum": [
                        "local",
                        "project",
                        "external",
                        "delegated",
                        "platform"
                      ]
                    },
                    "sideEffects": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "host": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "classification",
                    "riskLevel",
                    "summary",
                    "reasons"
                  ],
                  "additionalProperties": false
                },
                "workingDirectory": {
                  "type": "string"
                },
                "attribution": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "background-agent"
                          ]
                        },
                        "agentId": {
                          "type": "string"
                        },
                        "template": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "kind",
                        "agentId"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "mcp-server"
                          ]
                        },
                        "serverName": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "kind",
                        "serverName"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "sandbox-escalation"
                          ]
                        },
                        "sandbox": {
                          "type": "string"
                        },
                        "escalations": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "kind",
                        "sandbox",
                        "escalations"
                      ],
                      "additionalProperties": false
                    }
                  ]
                },
                "rememberOptions": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "tier": {
                        "type": "string",
                        "enum": [
                          "session",
                          "exact",
                          "command-class",
                          "path",
                          "tool"
                        ]
                      },
                      "label": {
                        "type": "string"
                      },
                      "detail": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "tier",
                      "label",
                      "detail"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "callId",
                "tool",
                "args",
                "category",
                "analysis"
              ],
              "additionalProperties": false
            },
            "sessionId": {
              "type": "string"
            },
            "routeId": {
              "type": "string"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "timeoutMs": {
              "type": "number"
            },
            "waitMs": {
              "type": "number"
            }
          },
          "required": [
            "request"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "approval": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "callId": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                },
                "routeId": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "claimed",
                    "approved",
                    "denied",
                    "cancelled",
                    "expired"
                  ]
                },
                "request": {
                  "type": "object",
                  "properties": {
                    "callId": {
                      "type": "string"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "args": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    },
                    "category": {
                      "type": "string",
                      "enum": [
                        "read",
                        "write",
                        "execute",
                        "delegate"
                      ]
                    },
                    "analysis": {
                      "type": "object",
                      "properties": {
                        "classification": {
                          "type": "string"
                        },
                        "riskLevel": {
                          "type": "string",
                          "enum": [
                            "low",
                            "medium",
                            "high",
                            "critical"
                          ]
                        },
                        "summary": {
                          "type": "string"
                        },
                        "reasons": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "target": {
                          "type": "string"
                        },
                        "targetKind": {
                          "type": "string",
                          "enum": [
                            "command",
                            "path",
                            "url",
                            "task",
                            "generic"
                          ]
                        },
                        "surface": {
                          "type": "string",
                          "enum": [
                            "filesystem",
                            "shell",
                            "network",
                            "orchestration",
                            "platform",
                            "generic"
                          ]
                        },
                        "blastRadius": {
                          "type": "string",
                          "enum": [
                            "local",
                            "project",
                            "external",
                            "delegated",
                            "platform"
                          ]
                        },
                        "sideEffects": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "host": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "classification",
                        "riskLevel",
                        "summary",
                        "reasons"
                      ],
                      "additionalProperties": false
                    },
                    "workingDirectory": {
                      "type": "string"
                    },
                    "attribution": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "background-agent"
                              ]
                            },
                            "agentId": {
                              "type": "string"
                            },
                            "template": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "agentId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "mcp-server"
                              ]
                            },
                            "serverName": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "serverName"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "sandbox-escalation"
                              ]
                            },
                            "sandbox": {
                              "type": "string"
                            },
                            "escalations": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "kind",
                            "sandbox",
                            "escalations"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "rememberOptions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tier": {
                            "type": "string",
                            "enum": [
                              "session",
                              "exact",
                              "command-class",
                              "path",
                              "tool"
                            ]
                          },
                          "label": {
                            "type": "string"
                          },
                          "detail": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "tier",
                          "label",
                          "detail"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "callId",
                    "tool",
                    "args",
                    "category",
                    "analysis"
                  ],
                  "additionalProperties": false
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "claimedBy": {
                  "type": "string"
                },
                "claimedAt": {
                  "type": "number"
                },
                "resolvedAt": {
                  "type": "number"
                },
                "resolvedBy": {
                  "type": "string"
                },
                "decision": {
                  "type": "object",
                  "properties": {
                    "approved": {
                      "type": "boolean"
                    },
                    "remember": {
                      "type": "boolean"
                    },
                    "rememberTier": {
                      "type": "string",
                      "enum": [
                        "session",
                        "exact",
                        "command-class",
                        "path",
                        "tool"
                      ]
                    },
                    "reason": {
                      "type": "string"
                    },
                    "modifiedArgs": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "approved"
                  ],
                  "additionalProperties": false
                },
                "fixSessionId": {
                  "type": "string"
                },
                "fixSessionError": {
                  "type": "string"
                },
                "expiresAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "audit": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "action": {
                        "type": "string",
                        "enum": [
                          "created",
                          "claimed",
                          "approved",
                          "denied",
                          "cancelled",
                          "expired",
                          "updated"
                        ]
                      },
                      "actor": {
                        "type": "string"
                      },
                      "actorSurface": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "note": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "action",
                      "actor",
                      "createdAt"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "id",
                "callId",
                "status",
                "request",
                "createdAt",
                "updatedAt",
                "metadata",
                "audit"
              ],
              "additionalProperties": false
            },
            "coalesced": {
              "type": "boolean"
            },
            "decided": {
              "type": "boolean"
            }
          },
          "required": [
            "approval",
            "coalesced",
            "decided"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "artifacts.content.get",
        "title": "Get Artifact Content",
        "description": "Return the raw content bytes for a stored artifact.",
        "category": "artifacts",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http"
        ],
        "scopes": [
          "read:artifacts"
        ],
        "http": {
          "method": "GET",
          "path": "/api/artifacts/{artifactId}/content"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "artifactId": {
              "type": "string"
            },
            "download": {
              "type": "string"
            }
          },
          "required": [
            "artifactId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "contentType": {
              "type": "string"
            },
            "contentLength": {
              "type": "number"
            }
          },
          "required": [
            "contentType",
            "contentLength"
          ],
          "additionalProperties": false
        },
        "invokable": false,
        "metadata": {
          "responseKind": "binary"
        }
      },
      {
        "id": "artifacts.create",
        "title": "Create Artifact",
        "description": "Store a file or attachment artifact for later delivery, analysis, or knowledge ingest. JSON supports small inline bodies and daemon-local path/URI references; HTTP callers can also send multipart/form-data or a raw binary body for large uploads.",
        "category": "artifacts",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:artifacts"
        ],
        "http": {
          "method": "POST",
          "path": "/api/artifacts"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string"
            },
            "mimeType": {
              "type": "string"
            },
            "filename": {
              "type": "string"
            },
            "dataBase64": {
              "type": "string"
            },
            "text": {
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "uri": {
              "type": "string"
            },
            "allowPrivateHosts": {
              "type": "boolean"
            },
            "retentionMs": {
              "type": "number"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "additionalProperties": true,
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "dataBase64": {
                  "type": "string"
                }
              },
              "required": [
                "dataBase64"
              ],
              "additionalProperties": true
            },
            {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string"
                }
              },
              "required": [
                "text"
              ],
              "additionalProperties": true
            },
            {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string"
                }
              },
              "required": [
                "path"
              ],
              "additionalProperties": true
            },
            {
              "type": "object",
              "properties": {
                "uri": {
                  "type": "string"
                }
              },
              "required": [
                "uri"
              ],
              "additionalProperties": true
            }
          ]
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "artifact": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "mimeType": {
                  "type": "string"
                },
                "filename": {
                  "type": "string"
                },
                "sizeBytes": {
                  "type": "number"
                },
                "sha256": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "expiresAt": {
                  "type": "number"
                },
                "sourceUri": {
                  "type": "string"
                },
                "acquisitionMode": {
                  "type": "string"
                },
                "fetchMode": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "kind",
                "mimeType",
                "sizeBytes",
                "sha256",
                "createdAt",
                "metadata"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "artifact"
          ],
          "additionalProperties": false
        },
        "invokable": true,
        "metadata": {
          "uploadModes": [
            "json-inline",
            "json-path-or-uri",
            "multipart-file",
            "raw-body"
          ],
          "largeUploadConfigKey": "storage.artifacts.maxBytes"
        }
      },
      {
        "id": "artifacts.get",
        "title": "Get Artifact",
        "description": "Return metadata for a stored artifact.",
        "category": "artifacts",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:artifacts"
        ],
        "http": {
          "method": "GET",
          "path": "/api/artifacts/{artifactId}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "artifactId": {
              "type": "string"
            }
          },
          "required": [
            "artifactId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "artifact": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "mimeType": {
                  "type": "string"
                },
                "filename": {
                  "type": "string"
                },
                "sizeBytes": {
                  "type": "number"
                },
                "sha256": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "expiresAt": {
                  "type": "number"
                },
                "sourceUri": {
                  "type": "string"
                },
                "acquisitionMode": {
                  "type": "string"
                },
                "fetchMode": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "kind",
                "mimeType",
                "sizeBytes",
                "sha256",
                "createdAt",
                "metadata"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "artifact"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "artifacts.list",
        "title": "List Artifacts",
        "description": "Return stored artifact metadata for files and attachments.",
        "category": "artifacts",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:artifacts"
        ],
        "http": {
          "method": "GET",
          "path": "/api/artifacts"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "artifacts": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string"
                  },
                  "mimeType": {
                    "type": "string"
                  },
                  "filename": {
                    "type": "string"
                  },
                  "sizeBytes": {
                    "type": "number"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "expiresAt": {
                    "type": "number"
                  },
                  "sourceUri": {
                    "type": "string"
                  },
                  "acquisitionMode": {
                    "type": "string"
                  },
                  "fetchMode": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "kind",
                  "mimeType",
                  "sizeBytes",
                  "sha256",
                  "createdAt",
                  "metadata"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "artifacts"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "local_auth.bootstrap.delete",
        "title": "Delete Bootstrap File",
        "description": "Delete the local-auth bootstrap credential file.",
        "category": "auth",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:auth"
        ],
        "http": {
          "method": "DELETE",
          "path": "/api/local-auth/bootstrap-file"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "removed": {
              "type": "boolean"
            }
          },
          "required": [
            "removed"
          ],
          "additionalProperties": false
        },
        "dangerous": true,
        "invokable": true
      },
      {
        "id": "local_auth.sessions.delete",
        "title": "Revoke Local Auth Session",
        "description": "Revoke a local auth session.",
        "category": "auth",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:auth"
        ],
        "http": {
          "method": "DELETE",
          "path": "/api/local-auth/sessions/{sessionId}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "revoked": {
              "type": "boolean"
            }
          },
          "required": [
            "revoked"
          ],
          "additionalProperties": false
        },
        "dangerous": true,
        "invokable": true
      },
      {
        "id": "local_auth.status",
        "title": "Local Auth Status",
        "description": "Return local auth posture, users, and sessions.",
        "category": "auth",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:auth"
        ],
        "http": {
          "method": "GET",
          "path": "/api/local-auth"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "userStorePath": {
              "type": "string"
            },
            "bootstrapCredentialPath": {
              "type": "string"
            },
            "bootstrapCredentialPresent": {
              "type": "boolean"
            },
            "userCount": {
              "type": "number"
            },
            "sessionCount": {
              "type": "number"
            },
            "users": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "username": {
                    "type": "string"
                  },
                  "roles": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "username",
                  "roles"
                ],
                "additionalProperties": false
              }
            },
            "sessions": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "tokenFingerprint": {
                    "type": "string"
                  },
                  "username": {
                    "type": "string"
                  },
                  "expiresAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "tokenFingerprint",
                  "username",
                  "expiresAt"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "userStorePath",
            "bootstrapCredentialPath",
            "bootstrapCredentialPresent",
            "userCount",
            "sessionCount",
            "users",
            "sessions"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "local_auth.users.create",
        "title": "Create Local Auth User",
        "description": "Create a local auth user.",
        "category": "auth",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:auth"
        ],
        "http": {
          "method": "POST",
          "path": "/api/local-auth/users"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "username": {
              "type": "string"
            },
            "password": {
              "type": "string"
            }
          },
          "required": [
            "username",
            "password"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "user": {
              "type": "object",
              "properties": {
                "username": {
                  "type": "string"
                },
                "roles": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "username",
                "roles"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "user"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "local_auth.users.delete",
        "title": "Delete Local Auth User",
        "description": "Delete a local auth user.",
        "category": "auth",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:auth"
        ],
        "http": {
          "method": "DELETE",
          "path": "/api/local-auth/users/{username}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "username": {
              "type": "string"
            }
          },
          "required": [
            "username"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "deleted": {
              "type": "boolean"
            }
          },
          "required": [
            "deleted"
          ],
          "additionalProperties": false
        },
        "dangerous": true,
        "invokable": true
      },
      {
        "id": "local_auth.users.password.rotate",
        "title": "Rotate Local Auth Password",
        "description": "Rotate a local auth user password.",
        "category": "auth",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:auth"
        ],
        "http": {
          "method": "POST",
          "path": "/api/local-auth/users/{username}/password"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "password": {
              "type": "string"
            }
          },
          "required": [
            "password"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "rotated": {
              "type": "boolean"
            }
          },
          "required": [
            "rotated"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "automation.heartbeat.list",
        "title": "List Automation Heartbeat Queue",
        "description": "Return automation jobs queued for the next heartbeat.",
        "category": "automation",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:automation"
        ],
        "http": {
          "method": "GET",
          "path": "/api/automation/heartbeat"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "pending": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "jobId": {
                    "type": "string"
                  },
                  "jobName": {
                    "type": "string"
                  },
                  "trigger": {
                    "type": "string",
                    "enum": [
                      "scheduled",
                      "manual",
                      "catch_up",
                      "webhook",
                      "surface",
                      "watcher"
                    ]
                  },
                  "dueRun": {
                    "type": "boolean"
                  },
                  "attempt": {
                    "type": "number"
                  },
                  "queuedAt": {
                    "type": "number"
                  },
                  "reason": {
                    "type": "string"
                  }
                },
                "required": [
                  "jobId",
                  "jobName",
                  "trigger",
                  "dueRun",
                  "attempt",
                  "queuedAt",
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "pending"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "automation.heartbeat.run",
        "title": "Run Automation Heartbeat",
        "description": "Process automation jobs queued for the next heartbeat.",
        "category": "automation",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:automation"
        ],
        "http": {
          "method": "POST",
          "path": "/api/automation/heartbeat"
        },
        "events": [
          "runtime.automation"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "source": {
              "type": "string"
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "processed": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "jobId": {
                    "type": "string"
                  },
                  "labels": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "queued",
                      "running",
                      "completed",
                      "failed",
                      "cancelled",
                      "missed"
                    ]
                  },
                  "agentId": {
                    "type": "string"
                  },
                  "triggeredBy": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "schedule",
                          "manual",
                          "hook",
                          "webhook",
                          "surface",
                          "watcher"
                        ]
                      },
                      "label": {
                        "type": "string"
                      },
                      "surfaceKind": {
                        "type": "string",
                        "enum": [
                          "tui",
                          "web",
                          "slack",
                          "discord",
                          "ntfy",
                          "webhook",
                          "homeassistant",
                          "telegram",
                          "google-chat",
                          "signal",
                          "whatsapp",
                          "telephony",
                          "imessage",
                          "msteams",
                          "bluebubbles",
                          "mattermost",
                          "matrix",
                          "service"
                        ]
                      },
                      "routeId": {
                        "type": "string"
                      },
                      "enabled": {
                        "type": "boolean"
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "updatedAt": {
                        "type": "number"
                      },
                      "lastSeenAt": {
                        "type": "number"
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "id",
                      "kind",
                      "label",
                      "enabled",
                      "createdAt",
                      "updatedAt",
                      "metadata"
                    ],
                    "additionalProperties": true
                  },
                  "target": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "isolated",
                          "current",
                          "pinned",
                          "background",
                          "main",
                          "session",
                          "route"
                        ]
                      },
                      "sessionId": {
                        "type": "string"
                      },
                      "routeId": {
                        "type": "string"
                      },
                      "threadId": {
                        "type": "string"
                      },
                      "channelId": {
                        "type": "string"
                      },
                      "surfaceKind": {
                        "type": "string",
                        "enum": [
                          "tui",
                          "web",
                          "slack",
                          "discord",
                          "ntfy",
                          "webhook",
                          "homeassistant",
                          "telegram",
                          "google-chat",
                          "signal",
                          "whatsapp",
                          "telephony",
                          "imessage",
                          "msteams",
                          "bluebubbles",
                          "mattermost",
                          "matrix",
                          "service"
                        ]
                      },
                      "pinnedSessionId": {
                        "type": "string"
                      },
                      "preserveThread": {
                        "type": "boolean"
                      },
                      "createIfMissing": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "kind"
                    ],
                    "additionalProperties": false
                  },
                  "execution": {
                    "type": "object",
                    "properties": {
                      "prompt": {
                        "type": "string"
                      },
                      "template": {
                        "type": "string"
                      },
                      "target": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "isolated",
                              "current",
                              "pinned",
                              "background",
                              "main",
                              "session",
                              "route"
                            ]
                          },
                          "sessionId": {
                            "type": "string"
                          },
                          "routeId": {
                            "type": "string"
                          },
                          "threadId": {
                            "type": "string"
                          },
                          "channelId": {
                            "type": "string"
                          },
                          "surfaceKind": {
                            "type": "string",
                            "enum": [
                              "tui",
                              "web",
                              "slack",
                              "discord",
                              "ntfy",
                              "webhook",
                              "homeassistant",
                              "telegram",
                              "google-chat",
                              "signal",
                              "whatsapp",
                              "telephony",
                              "imessage",
                              "msteams",
                              "bluebubbles",
                              "mattermost",
                              "matrix",
                              "service"
                            ]
                          },
                          "pinnedSessionId": {
                            "type": "string"
                          },
                          "preserveThread": {
                            "type": "boolean"
                          },
                          "createIfMissing": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "kind"
                        ],
                        "additionalProperties": false
                      },
                      "modelProvider": {
                        "type": "string"
                      },
                      "modelId": {
                        "type": "string"
                      },
                      "fallbackModels": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "routing": {
                        "type": "object",
                        "properties": {
                          "providerSelection": {
                            "type": "string",
                            "enum": [
                              "inherit-current",
                              "concrete",
                              "synthetic"
                            ]
                          },
                          "providerFailurePolicy": {
                            "type": "string",
                            "enum": [
                              "ordered-fallbacks",
                              "fail"
                            ]
                          },
                          "fallbackModels": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "additionalProperties": false
                      },
                      "executionIntent": {
                        "type": "object",
                        "properties": {
                          "riskClass": {
                            "type": "string",
                            "enum": [
                              "safe",
                              "elevated",
                              "dangerous"
                            ]
                          },
                          "requiresApproval": {
                            "type": "boolean"
                          },
                          "networkPolicy": {
                            "type": "string",
                            "enum": [
                              "inherit",
                              "allow",
                              "deny",
                              "scoped"
                            ]
                          },
                          "filesystemPolicy": {
                            "type": "string",
                            "enum": [
                              "inherit",
                              "workspace-write",
                              "read-only",
                              "isolated"
                            ]
                          }
                        },
                        "additionalProperties": false
                      },
                      "reasoningEffort": {
                        "type": "string",
                        "enum": [
                          "none",
                          "instant",
                          "minimal",
                          "low",
                          "medium",
                          "high",
                          "xhigh",
                          "max"
                        ]
                      },
                      "thinking": {
                        "type": "string"
                      },
                      "wakeMode": {
                        "type": "string",
                        "enum": [
                          "next-heartbeat",
                          "now"
                        ]
                      },
                      "timeoutMs": {
                        "type": "number"
                      },
                      "maxAttempts": {
                        "type": "number"
                      },
                      "toolAllowlist": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "autoApprove": {
                        "type": "boolean"
                      },
                      "sandboxMode": {
                        "type": "string",
                        "enum": [
                          "inherit",
                          "isolate",
                          "off"
                        ]
                      },
                      "allowUnsafeExternalContent": {
                        "type": "boolean"
                      },
                      "externalContentSource": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "gmail",
                              "email",
                              "webhook",
                              "api",
                              "browser",
                              "channel_metadata",
                              "web_search",
                              "web_fetch",
                              "slack",
                              "discord",
                              "ntfy",
                              "unknown"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "url": {
                                "type": "string"
                              },
                              "routeId": {
                                "type": "string"
                              },
                              "surfaceKind": {
                                "type": "string",
                                "enum": [
                                  "tui",
                                  "web",
                                  "slack",
                                  "discord",
                                  "ntfy",
                                  "webhook",
                                  "homeassistant",
                                  "telegram",
                                  "google-chat",
                                  "signal",
                                  "whatsapp",
                                  "telephony",
                                  "imessage",
                                  "msteams",
                                  "bluebubbles",
                                  "mattermost",
                                  "matrix",
                                  "service"
                                ]
                              },
                              "metadata": {
                                "type": "object",
                                "additionalProperties": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "boolean"
                                    },
                                    {
                                      "type": "null"
                                    },
                                    {
                                      "type": "object",
                                      "additionalProperties": {}
                                    },
                                    {
                                      "type": "array",
                                      "items": {}
                                    }
                                  ]
                                }
                              }
                            },
                            "required": [
                              "kind"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      },
                      "lightContext": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "target"
                    ],
                    "additionalProperties": false
                  },
                  "scheduleKind": {
                    "type": "string",
                    "enum": [
                      "at",
                      "every",
                      "cron"
                    ]
                  },
                  "queuedAt": {
                    "type": "number"
                  },
                  "startedAt": {
                    "type": "number"
                  },
                  "endedAt": {
                    "type": "number"
                  },
                  "durationMs": {
                    "type": "number"
                  },
                  "forceRun": {
                    "type": "boolean"
                  },
                  "dueRun": {
                    "type": "boolean"
                  },
                  "attempt": {
                    "type": "number"
                  },
                  "sessionId": {
                    "type": "string"
                  },
                  "routeId": {
                    "type": "string"
                  },
                  "route": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "session",
                          "thread",
                          "channel",
                          "message"
                        ]
                      },
                      "surfaceKind": {
                        "type": "string",
                        "enum": [
                          "tui",
                          "web",
                          "slack",
                          "discord",
                          "ntfy",
                          "webhook",
                          "homeassistant",
                          "telegram",
                          "google-chat",
                          "signal",
                          "whatsapp",
                          "telephony",
                          "imessage",
                          "msteams",
                          "bluebubbles",
                          "mattermost",
                          "matrix",
                          "service"
                        ]
                      },
                      "surfaceId": {
                        "type": "string"
                      },
                      "externalId": {
                        "type": "string"
                      },
                      "sessionPolicy": {
                        "type": "string",
                        "enum": [
                          "create-or-bind",
                          "continue-existing",
                          "require-existing"
                        ]
                      },
                      "threadPolicy": {
                        "type": "string",
                        "enum": [
                          "preserve",
                          "replace",
                          "detached"
                        ]
                      },
                      "deliveryGuarantee": {
                        "type": "string",
                        "enum": [
                          "best-effort",
                          "at-least-once"
                        ]
                      },
                      "threadId": {
                        "type": "string"
                      },
                      "channelId": {
                        "type": "string"
                      },
                      "sessionId": {
                        "type": "string"
                      },
                      "jobId": {
                        "type": "string"
                      },
                      "runId": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "lastSeenAt": {
                        "type": "number"
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "updatedAt": {
                        "type": "number"
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "id",
                      "kind",
                      "surfaceKind",
                      "surfaceId",
                      "externalId",
                      "lastSeenAt",
                      "createdAt",
                      "updatedAt",
                      "metadata"
                    ],
                    "additionalProperties": true
                  },
                  "continuationMode": {
                    "type": "string",
                    "enum": [
                      "spawn",
                      "shared-session",
                      "continued-live",
                      "background"
                    ]
                  },
                  "executionIntent": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "spawn",
                          "shared-session",
                          "continued-live",
                          "background"
                        ]
                      },
                      "targetKind": {
                        "type": "string",
                        "enum": [
                          "isolated",
                          "current",
                          "pinned",
                          "background",
                          "main",
                          "session",
                          "route"
                        ]
                      }
                    },
                    "required": [
                      "mode",
                      "targetKind"
                    ],
                    "additionalProperties": false
                  },
                  "deliveryIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "deliveryAttempts": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "runId": {
                          "type": "string"
                        },
                        "jobId": {
                          "type": "string"
                        },
                        "target": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "none",
                                "webhook",
                                "surface",
                                "integration",
                                "link"
                              ]
                            },
                            "surfaceKind": {
                              "type": "string",
                              "enum": [
                                "tui",
                                "web",
                                "slack",
                                "discord",
                                "ntfy",
                                "webhook",
                                "homeassistant",
                                "telegram",
                                "google-chat",
                                "signal",
                                "whatsapp",
                                "telephony",
                                "imessage",
                                "msteams",
                                "bluebubbles",
                                "mattermost",
                                "matrix",
                                "service"
                              ]
                            },
                            "address": {
                              "type": "string"
                            },
                            "routeId": {
                              "type": "string"
                            },
                            "label": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind"
                          ],
                          "additionalProperties": false
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "sending",
                            "sent",
                            "failed",
                            "dead_lettered"
                          ]
                        },
                        "startedAt": {
                          "type": "number"
                        },
                        "endedAt": {
                          "type": "number"
                        },
                        "error": {
                          "type": "string"
                        },
                        "responseId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "runId",
                        "jobId",
                        "target",
                        "status"
                      ],
                      "additionalProperties": true
                    }
                  },
                  "modelId": {
                    "type": "string"
                  },
                  "providerId": {
                    "type": "string"
                  },
                  "telemetry": {
                    "type": "object",
                    "properties": {
                      "usage": {
                        "type": "object",
                        "properties": {
                          "inputTokens": {
                            "type": "number"
                          },
                          "outputTokens": {
                            "type": "number"
                          },
                          "cacheReadTokens": {
                            "type": "number"
                          },
                          "cacheWriteTokens": {
                            "type": "number"
                          },
                          "reasoningTokens": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "inputTokens",
                          "outputTokens",
                          "cacheReadTokens",
                          "cacheWriteTokens"
                        ],
                        "additionalProperties": false
                      },
                      "llmCallCount": {
                        "type": "number"
                      },
                      "toolCallCount": {
                        "type": "number"
                      },
                      "turnCount": {
                        "type": "number"
                      },
                      "modelId": {
                        "type": "string"
                      },
                      "providerId": {
                        "type": "string"
                      },
                      "reasoningSummaryPresent": {
                        "type": "boolean"
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "local-agent",
                          "shared-session",
                          "remote-node",
                          "remote-device"
                        ]
                      }
                    },
                    "required": [
                      "usage"
                    ],
                    "additionalProperties": true
                  },
                  "result": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  },
                  "error": {
                    "type": "string"
                  },
                  "cancelledReason": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "jobId",
                  "labels",
                  "createdAt",
                  "updatedAt",
                  "status",
                  "triggeredBy",
                  "target",
                  "execution",
                  "queuedAt",
                  "forceRun",
                  "dueRun",
                  "attempt",
                  "deliveryIds"
                ],
                "additionalProperties": true
              }
            },
            "failed": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "jobId": {
                    "type": "string"
                  },
                  "error": {
                    "type": "string"
                  }
                },
                "required": [
                  "jobId",
                  "error"
                ],
                "additionalProperties": false
              }
            },
            "pending": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "jobId": {
                    "type": "string"
                  },
                  "jobName": {
                    "type": "string"
                  },
                  "trigger": {
                    "type": "string",
                    "enum": [
                      "scheduled",
                      "manual",
                      "catch_up",
                      "webhook",
                      "surface",
                      "watcher"
                    ]
                  },
                  "dueRun": {
                    "type": "boolean"
                  },
                  "attempt": {
                    "type": "number"
                  },
                  "queuedAt": {
                    "type": "number"
                  },
                  "reason": {
                    "type": "string"
                  }
                },
                "required": [
                  "jobId",
                  "jobName",
                  "trigger",
                  "dueRun",
                  "attempt",
                  "queuedAt",
                  "reason"
                ],
                "additionalProperties": false
              }
            },
            "checkedAt": {
              "type": "number"
            }
          },
          "required": [
            "processed",
            "failed",
            "pending",
            "checkedAt"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "automation.integration.snapshot",
        "title": "Automation Integration Snapshot",
        "description": "Return the automation integration snapshot.",
        "category": "automation",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:automation"
        ],
        "http": {
          "method": "GET",
          "path": "/api/automation"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "totals": {
              "type": "object",
              "properties": {
                "jobs": {
                  "type": "number"
                },
                "enabled": {
                  "type": "number"
                },
                "paused": {
                  "type": "number"
                },
                "runs": {
                  "type": "number"
                }
              },
              "required": [
                "jobs",
                "enabled",
                "paused",
                "runs"
              ],
              "additionalProperties": false
            },
            "jobs": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "enabled",
                      "paused",
                      "error",
                      "archived"
                    ]
                  },
                  "schedule": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "at"
                            ]
                          },
                          "at": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "kind",
                          "at"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "every"
                            ]
                          },
                          "intervalMs": {
                            "type": "number"
                          },
                          "anchorAt": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "kind",
                          "intervalMs"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "cron"
                            ]
                          },
                          "expression": {
                            "type": "string"
                          },
                          "timezone": {
                            "type": "string"
                          },
                          "staggerMs": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "kind",
                          "expression"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  "nextRunAt": {
                    "type": "number"
                  },
                  "lastRunAt": {
                    "type": "number"
                  },
                  "runCount": {
                    "type": "number"
                  },
                  "failureCount": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "name",
                  "enabled",
                  "status",
                  "schedule",
                  "runCount",
                  "failureCount"
                ],
                "additionalProperties": true
              }
            },
            "recentRuns": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "jobId": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  },
                  "trigger": {
                    "type": "string"
                  },
                  "queuedAt": {
                    "type": "number"
                  },
                  "startedAt": {
                    "type": "number"
                  },
                  "endedAt": {
                    "type": "number"
                  },
                  "agentId": {
                    "type": "string"
                  },
                  "error": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "jobId",
                  "status",
                  "trigger",
                  "queuedAt"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "totals",
            "jobs",
            "recentRuns"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "automation.jobs.create",
        "title": "Create Automation Job",
        "description": "Create a durable automation job.",
        "category": "automation",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:automation"
        ],
        "http": {
          "method": "POST",
          "path": "/api/automation/jobs"
        },
        "events": [
          "runtime.automation"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "prompt": {
              "type": "string"
            },
            "cron": {
              "type": "string"
            },
            "every": {
              "type": "string"
            },
            "at": {
              "type": "string"
            },
            "timezone": {
              "type": "string"
            },
            "staggerMs": {
              "type": "number"
            },
            "model": {
              "type": "string"
            },
            "provider": {
              "type": "string"
            },
            "fallbackModels": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "executionIntent": {
              "type": "object",
              "properties": {
                "riskClass": {
                  "type": "string",
                  "enum": [
                    "safe",
                    "elevated",
                    "dangerous"
                  ]
                },
                "requiresApproval": {
                  "type": "boolean"
                },
                "networkPolicy": {
                  "type": "string",
                  "enum": [
                    "inherit",
                    "allow",
                    "deny",
                    "scoped"
                  ]
                },
                "filesystemPolicy": {
                  "type": "string",
                  "enum": [
                    "inherit",
                    "workspace-write",
                    "read-only",
                    "isolated"
                  ]
                }
              },
              "additionalProperties": false
            },
            "template": {
              "type": "string"
            },
            "target": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "isolated",
                    "current",
                    "pinned",
                    "background",
                    "main",
                    "session",
                    "route"
                  ]
                },
                "sessionId": {
                  "type": "string"
                },
                "routeId": {
                  "type": "string"
                },
                "threadId": {
                  "type": "string"
                },
                "channelId": {
                  "type": "string"
                },
                "surfaceKind": {
                  "type": "string",
                  "enum": [
                    "tui",
                    "web",
                    "slack",
                    "discord",
                    "ntfy",
                    "webhook",
                    "homeassistant",
                    "telegram",
                    "google-chat",
                    "signal",
                    "whatsapp",
                    "telephony",
                    "imessage",
                    "msteams",
                    "bluebubbles",
                    "mattermost",
                    "matrix",
                    "service"
                  ]
                },
                "pinnedSessionId": {
                  "type": "string"
                },
                "preserveThread": {
                  "type": "boolean"
                },
                "createIfMissing": {
                  "type": "boolean"
                }
              },
              "required": [
                "kind"
              ],
              "additionalProperties": false
            },
            "reasoningEffort": {
              "type": "string"
            },
            "thinking": {
              "type": "string"
            },
            "wakeMode": {
              "type": "string"
            },
            "timeoutMs": {
              "type": "number"
            },
            "toolAllowlist": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "autoApprove": {
              "type": "boolean"
            },
            "allowUnsafeExternalContent": {
              "type": "boolean"
            },
            "externalContentSource": {
              "type": "string"
            },
            "lightContext": {
              "type": "boolean"
            },
            "delivery": {
              "type": "object",
              "properties": {
                "mode": {
                  "type": "string",
                  "enum": [
                    "none",
                    "webhook",
                    "surface",
                    "integration",
                    "link"
                  ]
                },
                "targets": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "none",
                          "webhook",
                          "surface",
                          "integration",
                          "link"
                        ]
                      },
                      "surfaceKind": {
                        "type": "string",
                        "enum": [
                          "tui",
                          "web",
                          "slack",
                          "discord",
                          "ntfy",
                          "webhook",
                          "homeassistant",
                          "telegram",
                          "google-chat",
                          "signal",
                          "whatsapp",
                          "telephony",
                          "imessage",
                          "msteams",
                          "bluebubbles",
                          "mattermost",
                          "matrix",
                          "service"
                        ]
                      },
                      "address": {
                        "type": "string"
                      },
                      "routeId": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind"
                    ],
                    "additionalProperties": false
                  }
                },
                "fallbackTargets": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "none",
                          "webhook",
                          "surface",
                          "integration",
                          "link"
                        ]
                      },
                      "surfaceKind": {
                        "type": "string",
                        "enum": [
                          "tui",
                          "web",
                          "slack",
                          "discord",
                          "ntfy",
                          "webhook",
                          "homeassistant",
                          "telegram",
                          "google-chat",
                          "signal",
                          "whatsapp",
                          "telephony",
                          "imessage",
                          "msteams",
                          "bluebubbles",
                          "mattermost",
                          "matrix",
                          "service"
                        ]
                      },
                      "address": {
                        "type": "string"
                      },
                      "routeId": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind"
                    ],
                    "additionalProperties": false
                  }
                },
                "includeSummary": {
                  "type": "boolean"
                },
                "includeTranscript": {
                  "type": "boolean"
                },
                "includeLinks": {
                  "type": "boolean"
                },
                "replyToRouteId": {
                  "type": "string"
                }
              },
              "required": [
                "mode",
                "targets",
                "fallbackTargets",
                "includeSummary",
                "includeTranscript",
                "includeLinks"
              ],
              "additionalProperties": false
            },
            "failure": {
              "type": "object",
              "properties": {
                "action": {
                  "type": "string",
                  "enum": [
                    "retry",
                    "cooldown",
                    "disable",
                    "dead_letter"
                  ]
                },
                "maxConsecutiveFailures": {
                  "type": "number"
                },
                "cooldownMs": {
                  "type": "number"
                },
                "retryPolicy": {
                  "type": "object",
                  "properties": {
                    "maxAttempts": {
                      "type": "number"
                    },
                    "delayMs": {
                      "type": "number"
                    },
                    "strategy": {
                      "type": "string",
                      "enum": [
                        "fixed",
                        "linear",
                        "exponential"
                      ]
                    },
                    "maxDelayMs": {
                      "type": "number"
                    },
                    "jitterMs": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "maxAttempts",
                    "delayMs",
                    "strategy"
                  ],
                  "additionalProperties": false
                },
                "deadLetterRouteId": {
                  "type": "string"
                },
                "disableAfterFailures": {
                  "type": "boolean"
                },
                "notifyRouteId": {
                  "type": "string"
                }
              },
              "required": [
                "action",
                "maxConsecutiveFailures",
                "cooldownMs",
                "retryPolicy"
              ],
              "additionalProperties": false
            },
            "enabled": {
              "type": "boolean"
            },
            "deleteAfterRun": {
              "type": "boolean"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "kind": {
              "type": "string",
              "enum": [
                "cron",
                "every",
                "at"
              ]
            },
            "schedule": {
              "type": "object",
              "properties": {
                "expression": {
                  "type": "string"
                }
              },
              "required": [
                "expression"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "prompt"
          ],
          "additionalProperties": true,
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "cron"
                  ]
                },
                "cron": {
                  "type": "string"
                }
              },
              "required": [
                "cron"
              ],
              "additionalProperties": true
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "cron"
                  ]
                },
                "schedule": {
                  "type": "object",
                  "properties": {
                    "expression": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "expression"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "schedule"
              ],
              "additionalProperties": true
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "every"
                  ]
                },
                "every": {
                  "type": "string"
                }
              },
              "required": [
                "every"
              ],
              "additionalProperties": true
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "at"
                  ]
                },
                "at": {
                  "type": "string"
                }
              },
              "required": [
                "at"
              ],
              "additionalProperties": true
            }
          ]
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "labels": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "createdAt": {
              "type": "number"
            },
            "updatedAt": {
              "type": "number"
            },
            "status": {
              "type": "string",
              "enum": [
                "enabled",
                "paused",
                "error",
                "archived"
              ]
            },
            "enabled": {
              "type": "boolean"
            },
            "schedule": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "at"
                      ]
                    },
                    "at": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "kind",
                    "at"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "every"
                      ]
                    },
                    "intervalMs": {
                      "type": "number"
                    },
                    "anchorAt": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "kind",
                    "intervalMs"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "cron"
                      ]
                    },
                    "expression": {
                      "type": "string"
                    },
                    "timezone": {
                      "type": "string"
                    },
                    "staggerMs": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "kind",
                    "expression"
                  ],
                  "additionalProperties": false
                }
              ]
            },
            "execution": {
              "type": "object",
              "properties": {
                "prompt": {
                  "type": "string"
                },
                "template": {
                  "type": "string"
                },
                "target": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "isolated",
                        "current",
                        "pinned",
                        "background",
                        "main",
                        "session",
                        "route"
                      ]
                    },
                    "sessionId": {
                      "type": "string"
                    },
                    "routeId": {
                      "type": "string"
                    },
                    "threadId": {
                      "type": "string"
                    },
                    "channelId": {
                      "type": "string"
                    },
                    "surfaceKind": {
                      "type": "string",
                      "enum": [
                        "tui",
                        "web",
                        "slack",
                        "discord",
                        "ntfy",
                        "webhook",
                        "homeassistant",
                        "telegram",
                        "google-chat",
                        "signal",
                        "whatsapp",
                        "telephony",
                        "imessage",
                        "msteams",
                        "bluebubbles",
                        "mattermost",
                        "matrix",
                        "service"
                      ]
                    },
                    "pinnedSessionId": {
                      "type": "string"
                    },
                    "preserveThread": {
                      "type": "boolean"
                    },
                    "createIfMissing": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "kind"
                  ],
                  "additionalProperties": false
                },
                "modelProvider": {
                  "type": "string"
                },
                "modelId": {
                  "type": "string"
                },
                "fallbackModels": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "routing": {
                  "type": "object",
                  "properties": {
                    "providerSelection": {
                      "type": "string",
                      "enum": [
                        "inherit-current",
                        "concrete",
                        "synthetic"
                      ]
                    },
                    "providerFailurePolicy": {
                      "type": "string",
                      "enum": [
                        "ordered-fallbacks",
                        "fail"
                      ]
                    },
                    "fallbackModels": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "executionIntent": {
                  "type": "object",
                  "properties": {
                    "riskClass": {
                      "type": "string",
                      "enum": [
                        "safe",
                        "elevated",
                        "dangerous"
                      ]
                    },
                    "requiresApproval": {
                      "type": "boolean"
                    },
                    "networkPolicy": {
                      "type": "string",
                      "enum": [
                        "inherit",
                        "allow",
                        "deny",
                        "scoped"
                      ]
                    },
                    "filesystemPolicy": {
                      "type": "string",
                      "enum": [
                        "inherit",
                        "workspace-write",
                        "read-only",
                        "isolated"
                      ]
                    }
                  },
                  "additionalProperties": false
                },
                "reasoningEffort": {
                  "type": "string",
                  "enum": [
                    "none",
                    "instant",
                    "minimal",
                    "low",
                    "medium",
                    "high",
                    "xhigh",
                    "max"
                  ]
                },
                "thinking": {
                  "type": "string"
                },
                "wakeMode": {
                  "type": "string",
                  "enum": [
                    "next-heartbeat",
                    "now"
                  ]
                },
                "timeoutMs": {
                  "type": "number"
                },
                "maxAttempts": {
                  "type": "number"
                },
                "toolAllowlist": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "autoApprove": {
                  "type": "boolean"
                },
                "sandboxMode": {
                  "type": "string",
                  "enum": [
                    "inherit",
                    "isolate",
                    "off"
                  ]
                },
                "allowUnsafeExternalContent": {
                  "type": "boolean"
                },
                "externalContentSource": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "gmail",
                        "email",
                        "webhook",
                        "api",
                        "browser",
                        "channel_metadata",
                        "web_search",
                        "web_fetch",
                        "slack",
                        "discord",
                        "ntfy",
                        "unknown"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string"
                        },
                        "id": {
                          "type": "string"
                        },
                        "url": {
                          "type": "string"
                        },
                        "routeId": {
                          "type": "string"
                        },
                        "surfaceKind": {
                          "type": "string",
                          "enum": [
                            "tui",
                            "web",
                            "slack",
                            "discord",
                            "ntfy",
                            "webhook",
                            "homeassistant",
                            "telegram",
                            "google-chat",
                            "signal",
                            "whatsapp",
                            "telephony",
                            "imessage",
                            "msteams",
                            "bluebubbles",
                            "mattermost",
                            "matrix",
                            "service"
                          ]
                        },
                        "metadata": {
                          "type": "object",
                          "additionalProperties": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "kind"
                      ],
                      "additionalProperties": false
                    }
                  ]
                },
                "lightContext": {
                  "type": "boolean"
                }
              },
              "required": [
                "target"
              ],
              "additionalProperties": false
            },
            "delivery": {
              "type": "object",
              "properties": {
                "mode": {
                  "type": "string",
                  "enum": [
                    "none",
                    "webhook",
                    "surface",
                    "integration",
                    "link"
                  ]
                },
                "targets": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "none",
                          "webhook",
                          "surface",
                          "integration",
                          "link"
                        ]
                      },
                      "surfaceKind": {
                        "type": "string",
                        "enum": [
                          "tui",
                          "web",
                          "slack",
                          "discord",
                          "ntfy",
                          "webhook",
                          "homeassistant",
                          "telegram",
                          "google-chat",
                          "signal",
                          "whatsapp",
                          "telephony",
                          "imessage",
                          "msteams",
                          "bluebubbles",
                          "mattermost",
                          "matrix",
                          "service"
                        ]
                      },
                      "address": {
                        "type": "string"
                      },
                      "routeId": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind"
                    ],
                    "additionalProperties": false
                  }
                },
                "fallbackTargets": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "none",
                          "webhook",
                          "surface",
                          "integration",
                          "link"
                        ]
                      },
                      "surfaceKind": {
                        "type": "string",
                        "enum": [
                          "tui",
                          "web",
                          "slack",
                          "discord",
                          "ntfy",
                          "webhook",
                          "homeassistant",
                          "telegram",
                          "google-chat",
                          "signal",
                          "whatsapp",
                          "telephony",
                          "imessage",
                          "msteams",
                          "bluebubbles",
                          "mattermost",
                          "matrix",
                          "service"
                        ]
                      },
                      "address": {
                        "type": "string"
                      },
                      "routeId": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind"
                    ],
                    "additionalProperties": false
                  }
                },
                "includeSummary": {
                  "type": "boolean"
                },
                "includeTranscript": {
                  "type": "boolean"
                },
                "includeLinks": {
                  "type": "boolean"
                },
                "replyToRouteId": {
                  "type": "string"
                }
              },
              "required": [
                "mode",
                "targets",
                "fallbackTargets",
                "includeSummary",
                "includeTranscript",
                "includeLinks"
              ],
              "additionalProperties": false
            },
            "failure": {
              "type": "object",
              "properties": {
                "action": {
                  "type": "string",
                  "enum": [
                    "retry",
                    "cooldown",
                    "disable",
                    "dead_letter"
                  ]
                },
                "maxConsecutiveFailures": {
                  "type": "number"
                },
                "cooldownMs": {
                  "type": "number"
                },
                "retryPolicy": {
                  "type": "object",
                  "properties": {
                    "maxAttempts": {
                      "type": "number"
                    },
                    "delayMs": {
                      "type": "number"
                    },
                    "strategy": {
                      "type": "string",
                      "enum": [
                        "fixed",
                        "linear",
                        "exponential"
                      ]
                    },
                    "maxDelayMs": {
                      "type": "number"
                    },
                    "jitterMs": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "maxAttempts",
                    "delayMs",
                    "strategy"
                  ],
                  "additionalProperties": false
                },
                "deadLetterRouteId": {
                  "type": "string"
                },
                "disableAfterFailures": {
                  "type": "boolean"
                },
                "notifyRouteId": {
                  "type": "string"
                }
              },
              "required": [
                "action",
                "maxConsecutiveFailures",
                "cooldownMs",
                "retryPolicy"
              ],
              "additionalProperties": false
            },
            "source": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "schedule",
                    "manual",
                    "hook",
                    "webhook",
                    "surface",
                    "watcher"
                  ]
                },
                "label": {
                  "type": "string"
                },
                "surfaceKind": {
                  "type": "string",
                  "enum": [
                    "tui",
                    "web",
                    "slack",
                    "discord",
                    "ntfy",
                    "webhook",
                    "homeassistant",
                    "telegram",
                    "google-chat",
                    "signal",
                    "whatsapp",
                    "telephony",
                    "imessage",
                    "msteams",
                    "bluebubbles",
                    "mattermost",
                    "matrix",
                    "service"
                  ]
                },
                "routeId": {
                  "type": "string"
                },
                "enabled": {
                  "type": "boolean"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "lastSeenAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "kind",
                "label",
                "enabled",
                "createdAt",
                "updatedAt",
                "metadata"
              ],
              "additionalProperties": true
            },
            "nextRunAt": {
              "type": "number"
            },
            "lastRunAt": {
              "type": "number"
            },
            "lastRunId": {
              "type": "string"
            },
            "runCount": {
              "type": "number"
            },
            "successCount": {
              "type": "number"
            },
            "failureCount": {
              "type": "number"
            },
            "pausedReason": {
              "type": "string"
            },
            "deleteAfterRun": {
              "type": "boolean"
            },
            "archivedAt": {
              "type": "number"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "id",
            "name",
            "labels",
            "createdAt",
            "updatedAt",
            "status",
            "enabled",
            "schedule",
            "execution",
            "delivery",
            "failure",
            "source",
            "runCount",
            "successCount",
            "failureCount",
            "deleteAfterRun"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "automation.jobs.delete",
        "title": "Delete Automation Job",
        "description": "Delete a durable automation job.",
        "category": "automation",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:automation"
        ],
        "http": {
          "method": "DELETE",
          "path": "/api/automation/jobs/{jobId}"
        },
        "events": [
          "runtime.automation"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "jobId": {
              "type": "string"
            }
          },
          "required": [
            "jobId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "removed": {
              "type": "boolean"
            },
            "id": {
              "type": "string"
            }
          },
          "required": [
            "removed"
          ],
          "additionalProperties": true
        },
        "dangerous": true,
        "invokable": true
      },
      {
        "id": "automation.jobs.disable",
        "title": "Disable Automation Job",
        "description": "Disable a durable automation job.",
        "category": "automation",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:automation"
        ],
        "http": {
          "method": "POST",
          "path": "/api/automation/jobs/{jobId}/disable"
        },
        "events": [
          "runtime.automation"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "jobId": {
              "type": "string"
            }
          },
          "required": [
            "jobId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "enabled": {
              "type": "boolean"
            }
          },
          "required": [
            "id",
            "enabled"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "automation.jobs.enable",
        "title": "Enable Automation Job",
        "description": "Enable a durable automation job.",
        "category": "automation",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:automation"
        ],
        "http": {
          "method": "POST",
          "path": "/api/automation/jobs/{jobId}/enable"
        },
        "events": [
          "runtime.automation"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "jobId": {
              "type": "string"
            }
          },
          "required": [
            "jobId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "enabled": {
              "type": "boolean"
            }
          },
          "required": [
            "id",
            "enabled"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "automation.jobs.list",
        "title": "List Automation Jobs",
        "description": "Return automation jobs and recent runs. Without ?limit/?cursor returns { jobs: [...] } (backward compatible). With ?limit=N (1–500, default 100) and optional ?cursor=<opaque> returns a PaginatedResponse envelope { items, hasMore, nextCursor? }. Invalid cursors return HTTP 400.",
        "category": "automation",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:automation"
        ],
        "http": {
          "method": "GET",
          "path": "/api/automation/jobs"
        },
        "events": [
          "runtime.automation"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "number"
            },
            "cursor": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "jobs": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "labels": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "enabled",
                      "paused",
                      "error",
                      "archived"
                    ]
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "schedule": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "at"
                            ]
                          },
                          "at": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "kind",
                          "at"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "every"
                            ]
                          },
                          "intervalMs": {
                            "type": "number"
                          },
                          "anchorAt": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "kind",
                          "intervalMs"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "cron"
                            ]
                          },
                          "expression": {
                            "type": "string"
                          },
                          "timezone": {
                            "type": "string"
                          },
                          "staggerMs": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "kind",
                          "expression"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  "execution": {
                    "type": "object",
                    "properties": {
                      "prompt": {
                        "type": "string"
                      },
                      "template": {
                        "type": "string"
                      },
                      "target": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "isolated",
                              "current",
                              "pinned",
                              "background",
                              "main",
                              "session",
                              "route"
                            ]
                          },
                          "sessionId": {
                            "type": "string"
                          },
                          "routeId": {
                            "type": "string"
                          },
                          "threadId": {
                            "type": "string"
                          },
                          "channelId": {
                            "type": "string"
                          },
                          "surfaceKind": {
                            "type": "string",
                            "enum": [
                              "tui",
                              "web",
                              "slack",
                              "discord",
                              "ntfy",
                              "webhook",
                              "homeassistant",
                              "telegram",
                              "google-chat",
                              "signal",
                              "whatsapp",
                              "telephony",
                              "imessage",
                              "msteams",
                              "bluebubbles",
                              "mattermost",
                              "matrix",
                              "service"
                            ]
                          },
                          "pinnedSessionId": {
                            "type": "string"
                          },
                          "preserveThread": {
                            "type": "boolean"
                          },
                          "createIfMissing": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "kind"
                        ],
                        "additionalProperties": false
                      },
                      "modelProvider": {
                        "type": "string"
                      },
                      "modelId": {
                        "type": "string"
                      },
                      "fallbackModels": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "routing": {
                        "type": "object",
                        "properties": {
                          "providerSelection": {
                            "type": "string",
                            "enum": [
                              "inherit-current",
                              "concrete",
                              "synthetic"
                            ]
                          },
                          "providerFailurePolicy": {
                            "type": "string",
                            "enum": [
                              "ordered-fallbacks",
                              "fail"
                            ]
                          },
                          "fallbackModels": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "additionalProperties": false
                      },
                      "executionIntent": {
                        "type": "object",
                        "properties": {
                          "riskClass": {
                            "type": "string",
                            "enum": [
                              "safe",
                              "elevated",
                              "dangerous"
                            ]
                          },
                          "requiresApproval": {
                            "type": "boolean"
                          },
                          "networkPolicy": {
                            "type": "string",
                            "enum": [
                              "inherit",
                              "allow",
                              "deny",
                              "scoped"
                            ]
                          },
                          "filesystemPolicy": {
                            "type": "string",
                            "enum": [
                              "inherit",
                              "workspace-write",
                              "read-only",
                              "isolated"
                            ]
                          }
                        },
                        "additionalProperties": false
                      },
                      "reasoningEffort": {
                        "type": "string",
                        "enum": [
                          "none",
                          "instant",
                          "minimal",
                          "low",
                          "medium",
                          "high",
                          "xhigh",
                          "max"
                        ]
                      },
                      "thinking": {
                        "type": "string"
                      },
                      "wakeMode": {
                        "type": "string",
                        "enum": [
                          "next-heartbeat",
                          "now"
                        ]
                      },
                      "timeoutMs": {
                        "type": "number"
                      },
                      "maxAttempts": {
                        "type": "number"
                      },
                      "toolAllowlist": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "autoApprove": {
                        "type": "boolean"
                      },
                      "sandboxMode": {
                        "type": "string",
                        "enum": [
                          "inherit",
                          "isolate",
                          "off"
                        ]
                      },
                      "allowUnsafeExternalContent": {
                        "type": "boolean"
                      },
                      "externalContentSource": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "gmail",
                              "email",
                              "webhook",
                              "api",
                              "browser",
                              "channel_metadata",
                              "web_search",
                              "web_fetch",
                              "slack",
                              "discord",
                              "ntfy",
                              "unknown"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "url": {
                                "type": "string"
                              },
                              "routeId": {
                                "type": "string"
                              },
                              "surfaceKind": {
                                "type": "string",
                                "enum": [
                                  "tui",
                                  "web",
                                  "slack",
                                  "discord",
                                  "ntfy",
                                  "webhook",
                                  "homeassistant",
                                  "telegram",
                                  "google-chat",
                                  "signal",
                                  "whatsapp",
                                  "telephony",
                                  "imessage",
                                  "msteams",
                                  "bluebubbles",
                                  "mattermost",
                                  "matrix",
                                  "service"
                                ]
                              },
                              "metadata": {
                                "type": "object",
                                "additionalProperties": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "boolean"
                                    },
                                    {
                                      "type": "null"
                                    },
                                    {
                                      "type": "object",
                                      "additionalProperties": {}
                                    },
                                    {
                                      "type": "array",
                                      "items": {}
                                    }
                                  ]
                                }
                              }
                            },
                            "required": [
                              "kind"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      },
                      "lightContext": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "target"
                    ],
                    "additionalProperties": false
                  },
                  "delivery": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "none",
                          "webhook",
                          "surface",
                          "integration",
                          "link"
                        ]
                      },
                      "targets": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "none",
                                "webhook",
                                "surface",
                                "integration",
                                "link"
                              ]
                            },
                            "surfaceKind": {
                              "type": "string",
                              "enum": [
                                "tui",
                                "web",
                                "slack",
                                "discord",
                                "ntfy",
                                "webhook",
                                "homeassistant",
                                "telegram",
                                "google-chat",
                                "signal",
                                "whatsapp",
                                "telephony",
                                "imessage",
                                "msteams",
                                "bluebubbles",
                                "mattermost",
                                "matrix",
                                "service"
                              ]
                            },
                            "address": {
                              "type": "string"
                            },
                            "routeId": {
                              "type": "string"
                            },
                            "label": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "fallbackTargets": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "none",
                                "webhook",
                                "surface",
                                "integration",
                                "link"
                              ]
                            },
                            "surfaceKind": {
                              "type": "string",
                              "enum": [
                                "tui",
                                "web",
                                "slack",
                                "discord",
                                "ntfy",
                                "webhook",
                                "homeassistant",
                                "telegram",
                                "google-chat",
                                "signal",
                                "whatsapp",
                                "telephony",
                                "imessage",
                                "msteams",
                                "bluebubbles",
                                "mattermost",
                                "matrix",
                                "service"
                              ]
                            },
                            "address": {
                              "type": "string"
                            },
                            "routeId": {
                              "type": "string"
                            },
                            "label": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "includeSummary": {
                        "type": "boolean"
                      },
                      "includeTranscript": {
                        "type": "boolean"
                      },
                      "includeLinks": {
                        "type": "boolean"
                      },
                      "replyToRouteId": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "mode",
                      "targets",
                      "fallbackTargets",
                      "includeSummary",
                      "includeTranscript",
                      "includeLinks"
                    ],
                    "additionalProperties": false
                  },
                  "failure": {
                    "type": "object",
                    "properties": {
                      "action": {
                        "type": "string",
                        "enum": [
                          "retry",
                          "cooldown",
                          "disable",
                          "dead_letter"
                        ]
                      },
                      "maxConsecutiveFailures": {
                        "type": "number"
                      },
                      "cooldownMs": {
                        "type": "number"
                      },
                      "retryPolicy": {
                        "type": "object",
                        "properties": {
                          "maxAttempts": {
                            "type": "number"
                          },
                          "delayMs": {
                            "type": "number"
                          },
                          "strategy": {
                            "type": "string",
                            "enum": [
                              "fixed",
                              "linear",
                              "exponential"
                            ]
                          },
                          "maxDelayMs": {
                            "type": "number"
                          },
                          "jitterMs": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "maxAttempts",
                          "delayMs",
                          "strategy"
                        ],
                        "additionalProperties": false
                      },
                      "deadLetterRouteId": {
                        "type": "string"
                      },
                      "disableAfterFailures": {
                        "type": "boolean"
                      },
                      "notifyRouteId": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "action",
                      "maxConsecutiveFailures",
                      "cooldownMs",
                      "retryPolicy"
                    ],
                    "additionalProperties": false
                  },
                  "source": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "schedule",
                          "manual",
                          "hook",
                          "webhook",
                          "surface",
                          "watcher"
                        ]
                      },
                      "label": {
                        "type": "string"
                      },
                      "surfaceKind": {
                        "type": "string",
                        "enum": [
                          "tui",
                          "web",
                          "slack",
                          "discord",
                          "ntfy",
                          "webhook",
                          "homeassistant",
                          "telegram",
                          "google-chat",
                          "signal",
                          "whatsapp",
                          "telephony",
                          "imessage",
                          "msteams",
                          "bluebubbles",
                          "mattermost",
                          "matrix",
                          "service"
                        ]
                      },
                      "routeId": {
                        "type": "string"
                      },
                      "enabled": {
                        "type": "boolean"
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "updatedAt": {
                        "type": "number"
                      },
                      "lastSeenAt": {
                        "type": "number"
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "id",
                      "kind",
                      "label",
                      "enabled",
                      "createdAt",
                      "updatedAt",
                      "metadata"
                    ],
                    "additionalProperties": true
                  },
                  "nextRunAt": {
                    "type": "number"
                  },
                  "lastRunAt": {
                    "type": "number"
                  },
                  "lastRunId": {
                    "type": "string"
                  },
                  "runCount": {
                    "type": "number"
                  },
                  "successCount": {
                    "type": "number"
                  },
                  "failureCount": {
                    "type": "number"
                  },
                  "pausedReason": {
                    "type": "string"
                  },
                  "deleteAfterRun": {
                    "type": "boolean"
                  },
                  "archivedAt": {
                    "type": "number"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "name",
                  "labels",
                  "createdAt",
                  "updatedAt",
                  "status",
                  "enabled",
                  "schedule",
                  "execution",
                  "delivery",
                  "failure",
                  "source",
                  "runCount",
                  "successCount",
                  "failureCount",
                  "deleteAfterRun"
                ],
                "additionalProperties": true
              }
            },
            "emptyState": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string"
                },
                "body": {
                  "type": "string"
                }
              },
              "required": [
                "title",
                "body"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "jobs"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "automation.jobs.run",
        "title": "Run Automation Job Now",
        "description": "Trigger an automation job immediately.",
        "category": "automation",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:automation"
        ],
        "http": {
          "method": "POST",
          "path": "/api/automation/jobs/{jobId}/run"
        },
        "events": [
          "runtime.automation"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "jobId": {
              "type": "string"
            }
          },
          "required": [
            "jobId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "jobId": {
              "type": "string"
            },
            "runId": {
              "type": "string"
            },
            "agentId": {
              "type": "string"
            },
            "status": {
              "type": "string"
            }
          },
          "required": [
            "jobId",
            "runId",
            "status"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "automation.jobs.update",
        "title": "Update Automation Job",
        "description": "Update a durable automation job. (Renamed from automation.jobs.patch in the 1.0.0 core-verb rename, canonical verb is update, not patch.)",
        "category": "automation",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:automation"
        ],
        "http": {
          "method": "PATCH",
          "path": "/api/automation/jobs/{jobId}"
        },
        "events": [
          "runtime.automation"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "jobId": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "prompt": {
              "type": "string"
            },
            "schedule": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "at"
                      ]
                    },
                    "at": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "kind",
                    "at"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "every"
                      ]
                    },
                    "intervalMs": {
                      "type": "number"
                    },
                    "anchorAt": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "kind",
                    "intervalMs"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "cron"
                      ]
                    },
                    "expression": {
                      "type": "string"
                    },
                    "timezone": {
                      "type": "string"
                    },
                    "staggerMs": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "kind",
                    "expression"
                  ],
                  "additionalProperties": false
                }
              ]
            },
            "model": {
              "type": "string"
            },
            "provider": {
              "type": "string"
            },
            "fallbackModels": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "executionIntent": {
              "type": "object",
              "properties": {
                "riskClass": {
                  "type": "string",
                  "enum": [
                    "safe",
                    "elevated",
                    "dangerous"
                  ]
                },
                "requiresApproval": {
                  "type": "boolean"
                },
                "networkPolicy": {
                  "type": "string",
                  "enum": [
                    "inherit",
                    "allow",
                    "deny",
                    "scoped"
                  ]
                },
                "filesystemPolicy": {
                  "type": "string",
                  "enum": [
                    "inherit",
                    "workspace-write",
                    "read-only",
                    "isolated"
                  ]
                }
              },
              "additionalProperties": false
            },
            "template": {
              "type": "string"
            },
            "target": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "isolated",
                    "current",
                    "pinned",
                    "background",
                    "main",
                    "session",
                    "route"
                  ]
                },
                "sessionId": {
                  "type": "string"
                },
                "routeId": {
                  "type": "string"
                },
                "threadId": {
                  "type": "string"
                },
                "channelId": {
                  "type": "string"
                },
                "surfaceKind": {
                  "type": "string",
                  "enum": [
                    "tui",
                    "web",
                    "slack",
                    "discord",
                    "ntfy",
                    "webhook",
                    "homeassistant",
                    "telegram",
                    "google-chat",
                    "signal",
                    "whatsapp",
                    "telephony",
                    "imessage",
                    "msteams",
                    "bluebubbles",
                    "mattermost",
                    "matrix",
                    "service"
                  ]
                },
                "pinnedSessionId": {
                  "type": "string"
                },
                "preserveThread": {
                  "type": "boolean"
                },
                "createIfMissing": {
                  "type": "boolean"
                }
              },
              "required": [
                "kind"
              ],
              "additionalProperties": false
            },
            "reasoningEffort": {
              "type": "string"
            },
            "thinking": {
              "type": "string"
            },
            "wakeMode": {
              "type": "string"
            },
            "timeoutMs": {
              "type": "number"
            },
            "toolAllowlist": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "autoApprove": {
              "type": "boolean"
            },
            "allowUnsafeExternalContent": {
              "type": "boolean"
            },
            "externalContentSource": {
              "type": "string"
            },
            "lightContext": {
              "type": "boolean"
            },
            "delivery": {
              "type": "object",
              "properties": {
                "mode": {
                  "type": "string",
                  "enum": [
                    "none",
                    "webhook",
                    "surface",
                    "integration",
                    "link"
                  ]
                },
                "targets": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "none",
                          "webhook",
                          "surface",
                          "integration",
                          "link"
                        ]
                      },
                      "surfaceKind": {
                        "type": "string",
                        "enum": [
                          "tui",
                          "web",
                          "slack",
                          "discord",
                          "ntfy",
                          "webhook",
                          "homeassistant",
                          "telegram",
                          "google-chat",
                          "signal",
                          "whatsapp",
                          "telephony",
                          "imessage",
                          "msteams",
                          "bluebubbles",
                          "mattermost",
                          "matrix",
                          "service"
                        ]
                      },
                      "address": {
                        "type": "string"
                      },
                      "routeId": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind"
                    ],
                    "additionalProperties": false
                  }
                },
                "fallbackTargets": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "none",
                          "webhook",
                          "surface",
                          "integration",
                          "link"
                        ]
                      },
                      "surfaceKind": {
                        "type": "string",
                        "enum": [
                          "tui",
                          "web",
                          "slack",
                          "discord",
                          "ntfy",
                          "webhook",
                          "homeassistant",
                          "telegram",
                          "google-chat",
                          "signal",
                          "whatsapp",
                          "telephony",
                          "imessage",
                          "msteams",
                          "bluebubbles",
                          "mattermost",
                          "matrix",
                          "service"
                        ]
                      },
                      "address": {
                        "type": "string"
                      },
                      "routeId": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind"
                    ],
                    "additionalProperties": false
                  }
                },
                "includeSummary": {
                  "type": "boolean"
                },
                "includeTranscript": {
                  "type": "boolean"
                },
                "includeLinks": {
                  "type": "boolean"
                },
                "replyToRouteId": {
                  "type": "string"
                }
              },
              "required": [
                "mode",
                "targets",
                "fallbackTargets",
                "includeSummary",
                "includeTranscript",
                "includeLinks"
              ],
              "additionalProperties": false
            },
            "failure": {
              "type": "object",
              "properties": {
                "action": {
                  "type": "string",
                  "enum": [
                    "retry",
                    "cooldown",
                    "disable",
                    "dead_letter"
                  ]
                },
                "maxConsecutiveFailures": {
                  "type": "number"
                },
                "cooldownMs": {
                  "type": "number"
                },
                "retryPolicy": {
                  "type": "object",
                  "properties": {
                    "maxAttempts": {
                      "type": "number"
                    },
                    "delayMs": {
                      "type": "number"
                    },
                    "strategy": {
                      "type": "string",
                      "enum": [
                        "fixed",
                        "linear",
                        "exponential"
                      ]
                    },
                    "maxDelayMs": {
                      "type": "number"
                    },
                    "jitterMs": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "maxAttempts",
                    "delayMs",
                    "strategy"
                  ],
                  "additionalProperties": false
                },
                "deadLetterRouteId": {
                  "type": "string"
                },
                "disableAfterFailures": {
                  "type": "boolean"
                },
                "notifyRouteId": {
                  "type": "string"
                }
              },
              "required": [
                "action",
                "maxConsecutiveFailures",
                "cooldownMs",
                "retryPolicy"
              ],
              "additionalProperties": false
            },
            "enabled": {
              "type": "boolean"
            },
            "deleteAfterRun": {
              "type": "boolean"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "labels": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "createdAt": {
              "type": "number"
            },
            "updatedAt": {
              "type": "number"
            },
            "status": {
              "type": "string",
              "enum": [
                "enabled",
                "paused",
                "error",
                "archived"
              ]
            },
            "enabled": {
              "type": "boolean"
            },
            "schedule": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "at"
                      ]
                    },
                    "at": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "kind",
                    "at"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "every"
                      ]
                    },
                    "intervalMs": {
                      "type": "number"
                    },
                    "anchorAt": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "kind",
                    "intervalMs"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "cron"
                      ]
                    },
                    "expression": {
                      "type": "string"
                    },
                    "timezone": {
                      "type": "string"
                    },
                    "staggerMs": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "kind",
                    "expression"
                  ],
                  "additionalProperties": false
                }
              ]
            },
            "execution": {
              "type": "object",
              "properties": {
                "prompt": {
                  "type": "string"
                },
                "template": {
                  "type": "string"
                },
                "target": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "isolated",
                        "current",
                        "pinned",
                        "background",
                        "main",
                        "session",
                        "route"
                      ]
                    },
                    "sessionId": {
                      "type": "string"
                    },
                    "routeId": {
                      "type": "string"
                    },
                    "threadId": {
                      "type": "string"
                    },
                    "channelId": {
                      "type": "string"
                    },
                    "surfaceKind": {
                      "type": "string",
                      "enum": [
                        "tui",
                        "web",
                        "slack",
                        "discord",
                        "ntfy",
                        "webhook",
                        "homeassistant",
                        "telegram",
                        "google-chat",
                        "signal",
                        "whatsapp",
                        "telephony",
                        "imessage",
                        "msteams",
                        "bluebubbles",
                        "mattermost",
                        "matrix",
                        "service"
                      ]
                    },
                    "pinnedSessionId": {
                      "type": "string"
                    },
                    "preserveThread": {
                      "type": "boolean"
                    },
                    "createIfMissing": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "kind"
                  ],
                  "additionalProperties": false
                },
                "modelProvider": {
                  "type": "string"
                },
                "modelId": {
                  "type": "string"
                },
                "fallbackModels": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "routing": {
                  "type": "object",
                  "properties": {
                    "providerSelection": {
                      "type": "string",
                      "enum": [
                        "inherit-current",
                        "concrete",
                        "synthetic"
                      ]
                    },
                    "providerFailurePolicy": {
                      "type": "string",
                      "enum": [
                        "ordered-fallbacks",
                        "fail"
                      ]
                    },
                    "fallbackModels": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "executionIntent": {
                  "type": "object",
                  "properties": {
                    "riskClass": {
                      "type": "string",
                      "enum": [
                        "safe",
                        "elevated",
                        "dangerous"
                      ]
                    },
                    "requiresApproval": {
                      "type": "boolean"
                    },
                    "networkPolicy": {
                      "type": "string",
                      "enum": [
                        "inherit",
                        "allow",
                        "deny",
                        "scoped"
                      ]
                    },
                    "filesystemPolicy": {
                      "type": "string",
                      "enum": [
                        "inherit",
                        "workspace-write",
                        "read-only",
                        "isolated"
                      ]
                    }
                  },
                  "additionalProperties": false
                },
                "reasoningEffort": {
                  "type": "string",
                  "enum": [
                    "none",
                    "instant",
                    "minimal",
                    "low",
                    "medium",
                    "high",
                    "xhigh",
                    "max"
                  ]
                },
                "thinking": {
                  "type": "string"
                },
                "wakeMode": {
                  "type": "string",
                  "enum": [
                    "next-heartbeat",
                    "now"
                  ]
                },
                "timeoutMs": {
                  "type": "number"
                },
                "maxAttempts": {
                  "type": "number"
                },
                "toolAllowlist": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "autoApprove": {
                  "type": "boolean"
                },
                "sandboxMode": {
                  "type": "string",
                  "enum": [
                    "inherit",
                    "isolate",
                    "off"
                  ]
                },
                "allowUnsafeExternalContent": {
                  "type": "boolean"
                },
                "externalContentSource": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "gmail",
                        "email",
                        "webhook",
                        "api",
                        "browser",
                        "channel_metadata",
                        "web_search",
                        "web_fetch",
                        "slack",
                        "discord",
                        "ntfy",
                        "unknown"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string"
                        },
                        "id": {
                          "type": "string"
                        },
                        "url": {
                          "type": "string"
                        },
                        "routeId": {
                          "type": "string"
                        },
                        "surfaceKind": {
                          "type": "string",
                          "enum": [
                            "tui",
                            "web",
                            "slack",
                            "discord",
                            "ntfy",
                            "webhook",
                            "homeassistant",
                            "telegram",
                            "google-chat",
                            "signal",
                            "whatsapp",
                            "telephony",
                            "imessage",
                            "msteams",
                            "bluebubbles",
                            "mattermost",
                            "matrix",
                            "service"
                          ]
                        },
                        "metadata": {
                          "type": "object",
                          "additionalProperties": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "kind"
                      ],
                      "additionalProperties": false
                    }
                  ]
                },
                "lightContext": {
                  "type": "boolean"
                }
              },
              "required": [
                "target"
              ],
              "additionalProperties": false
            },
            "delivery": {
              "type": "object",
              "properties": {
                "mode": {
                  "type": "string",
                  "enum": [
                    "none",
                    "webhook",
                    "surface",
                    "integration",
                    "link"
                  ]
                },
                "targets": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "none",
                          "webhook",
                          "surface",
                          "integration",
                          "link"
                        ]
                      },
                      "surfaceKind": {
                        "type": "string",
                        "enum": [
                          "tui",
                          "web",
                          "slack",
                          "discord",
                          "ntfy",
                          "webhook",
                          "homeassistant",
                          "telegram",
                          "google-chat",
                          "signal",
                          "whatsapp",
                          "telephony",
                          "imessage",
                          "msteams",
                          "bluebubbles",
                          "mattermost",
                          "matrix",
                          "service"
                        ]
                      },
                      "address": {
                        "type": "string"
                      },
                      "routeId": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind"
                    ],
                    "additionalProperties": false
                  }
                },
                "fallbackTargets": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "none",
                          "webhook",
                          "surface",
                          "integration",
                          "link"
                        ]
                      },
                      "surfaceKind": {
                        "type": "string",
                        "enum": [
                          "tui",
                          "web",
                          "slack",
                          "discord",
                          "ntfy",
                          "webhook",
                          "homeassistant",
                          "telegram",
                          "google-chat",
                          "signal",
                          "whatsapp",
                          "telephony",
                          "imessage",
                          "msteams",
                          "bluebubbles",
                          "mattermost",
                          "matrix",
                          "service"
                        ]
                      },
                      "address": {
                        "type": "string"
                      },
                      "routeId": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind"
                    ],
                    "additionalProperties": false
                  }
                },
                "includeSummary": {
                  "type": "boolean"
                },
                "includeTranscript": {
                  "type": "boolean"
                },
                "includeLinks": {
                  "type": "boolean"
                },
                "replyToRouteId": {
                  "type": "string"
                }
              },
              "required": [
                "mode",
                "targets",
                "fallbackTargets",
                "includeSummary",
                "includeTranscript",
                "includeLinks"
              ],
              "additionalProperties": false
            },
            "failure": {
              "type": "object",
              "properties": {
                "action": {
                  "type": "string",
                  "enum": [
                    "retry",
                    "cooldown",
                    "disable",
                    "dead_letter"
                  ]
                },
                "maxConsecutiveFailures": {
                  "type": "number"
                },
                "cooldownMs": {
                  "type": "number"
                },
                "retryPolicy": {
                  "type": "object",
                  "properties": {
                    "maxAttempts": {
                      "type": "number"
                    },
                    "delayMs": {
                      "type": "number"
                    },
                    "strategy": {
                      "type": "string",
                      "enum": [
                        "fixed",
                        "linear",
                        "exponential"
                      ]
                    },
                    "maxDelayMs": {
                      "type": "number"
                    },
                    "jitterMs": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "maxAttempts",
                    "delayMs",
                    "strategy"
                  ],
                  "additionalProperties": false
                },
                "deadLetterRouteId": {
                  "type": "string"
                },
                "disableAfterFailures": {
                  "type": "boolean"
                },
                "notifyRouteId": {
                  "type": "string"
                }
              },
              "required": [
                "action",
                "maxConsecutiveFailures",
                "cooldownMs",
                "retryPolicy"
              ],
              "additionalProperties": false
            },
            "source": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "schedule",
                    "manual",
                    "hook",
                    "webhook",
                    "surface",
                    "watcher"
                  ]
                },
                "label": {
                  "type": "string"
                },
                "surfaceKind": {
                  "type": "string",
                  "enum": [
                    "tui",
                    "web",
                    "slack",
                    "discord",
                    "ntfy",
                    "webhook",
                    "homeassistant",
                    "telegram",
                    "google-chat",
                    "signal",
                    "whatsapp",
                    "telephony",
                    "imessage",
                    "msteams",
                    "bluebubbles",
                    "mattermost",
                    "matrix",
                    "service"
                  ]
                },
                "routeId": {
                  "type": "string"
                },
                "enabled": {
                  "type": "boolean"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "lastSeenAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "kind",
                "label",
                "enabled",
                "createdAt",
                "updatedAt",
                "metadata"
              ],
              "additionalProperties": true
            },
            "nextRunAt": {
              "type": "number"
            },
            "lastRunAt": {
              "type": "number"
            },
            "lastRunId": {
              "type": "string"
            },
            "runCount": {
              "type": "number"
            },
            "successCount": {
              "type": "number"
            },
            "failureCount": {
              "type": "number"
            },
            "pausedReason": {
              "type": "string"
            },
            "deleteAfterRun": {
              "type": "boolean"
            },
            "archivedAt": {
              "type": "number"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "id",
            "name",
            "labels",
            "createdAt",
            "updatedAt",
            "status",
            "enabled",
            "schedule",
            "execution",
            "delivery",
            "failure",
            "source",
            "runCount",
            "successCount",
            "failureCount",
            "deleteAfterRun"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "automation.runs.cancel",
        "title": "Cancel Automation Run",
        "description": "Cancel an active automation run.",
        "category": "automation",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:automation"
        ],
        "http": {
          "method": "POST",
          "path": "/api/automation/runs/{runId}/cancel"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "runId": {
              "type": "string"
            }
          },
          "required": [
            "runId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "run": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "jobId": {
                  "type": "string"
                },
                "labels": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "running",
                    "completed",
                    "failed",
                    "cancelled",
                    "missed"
                  ]
                },
                "agentId": {
                  "type": "string"
                },
                "triggeredBy": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "schedule",
                        "manual",
                        "hook",
                        "webhook",
                        "surface",
                        "watcher"
                      ]
                    },
                    "label": {
                      "type": "string"
                    },
                    "surfaceKind": {
                      "type": "string",
                      "enum": [
                        "tui",
                        "web",
                        "slack",
                        "discord",
                        "ntfy",
                        "webhook",
                        "homeassistant",
                        "telegram",
                        "google-chat",
                        "signal",
                        "whatsapp",
                        "telephony",
                        "imessage",
                        "msteams",
                        "bluebubbles",
                        "mattermost",
                        "matrix",
                        "service"
                      ]
                    },
                    "routeId": {
                      "type": "string"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "updatedAt": {
                      "type": "number"
                    },
                    "lastSeenAt": {
                      "type": "number"
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "label",
                    "enabled",
                    "createdAt",
                    "updatedAt",
                    "metadata"
                  ],
                  "additionalProperties": true
                },
                "target": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "isolated",
                        "current",
                        "pinned",
                        "background",
                        "main",
                        "session",
                        "route"
                      ]
                    },
                    "sessionId": {
                      "type": "string"
                    },
                    "routeId": {
                      "type": "string"
                    },
                    "threadId": {
                      "type": "string"
                    },
                    "channelId": {
                      "type": "string"
                    },
                    "surfaceKind": {
                      "type": "string",
                      "enum": [
                        "tui",
                        "web",
                        "slack",
                        "discord",
                        "ntfy",
                        "webhook",
                        "homeassistant",
                        "telegram",
                        "google-chat",
                        "signal",
                        "whatsapp",
                        "telephony",
                        "imessage",
                        "msteams",
                        "bluebubbles",
                        "mattermost",
                        "matrix",
                        "service"
                      ]
                    },
                    "pinnedSessionId": {
                      "type": "string"
                    },
                    "preserveThread": {
                      "type": "boolean"
                    },
                    "createIfMissing": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "kind"
                  ],
                  "additionalProperties": false
                },
                "execution": {
                  "type": "object",
                  "properties": {
                    "prompt": {
                      "type": "string"
                    },
                    "template": {
                      "type": "string"
                    },
                    "target": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "isolated",
                            "current",
                            "pinned",
                            "background",
                            "main",
                            "session",
                            "route"
                          ]
                        },
                        "sessionId": {
                          "type": "string"
                        },
                        "routeId": {
                          "type": "string"
                        },
                        "threadId": {
                          "type": "string"
                        },
                        "channelId": {
                          "type": "string"
                        },
                        "surfaceKind": {
                          "type": "string",
                          "enum": [
                            "tui",
                            "web",
                            "slack",
                            "discord",
                            "ntfy",
                            "webhook",
                            "homeassistant",
                            "telegram",
                            "google-chat",
                            "signal",
                            "whatsapp",
                            "telephony",
                            "imessage",
                            "msteams",
                            "bluebubbles",
                            "mattermost",
                            "matrix",
                            "service"
                          ]
                        },
                        "pinnedSessionId": {
                          "type": "string"
                        },
                        "preserveThread": {
                          "type": "boolean"
                        },
                        "createIfMissing": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "kind"
                      ],
                      "additionalProperties": false
                    },
                    "modelProvider": {
                      "type": "string"
                    },
                    "modelId": {
                      "type": "string"
                    },
                    "fallbackModels": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "routing": {
                      "type": "object",
                      "properties": {
                        "providerSelection": {
                          "type": "string",
                          "enum": [
                            "inherit-current",
                            "concrete",
                            "synthetic"
                          ]
                        },
                        "providerFailurePolicy": {
                          "type": "string",
                          "enum": [
                            "ordered-fallbacks",
                            "fail"
                          ]
                        },
                        "fallbackModels": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "additionalProperties": false
                    },
                    "executionIntent": {
                      "type": "object",
                      "properties": {
                        "riskClass": {
                          "type": "string",
                          "enum": [
                            "safe",
                            "elevated",
                            "dangerous"
                          ]
                        },
                        "requiresApproval": {
                          "type": "boolean"
                        },
                        "networkPolicy": {
                          "type": "string",
                          "enum": [
                            "inherit",
                            "allow",
                            "deny",
                            "scoped"
                          ]
                        },
                        "filesystemPolicy": {
                          "type": "string",
                          "enum": [
                            "inherit",
                            "workspace-write",
                            "read-only",
                            "isolated"
                          ]
                        }
                      },
                      "additionalProperties": false
                    },
                    "reasoningEffort": {
                      "type": "string",
                      "enum": [
                        "none",
                        "instant",
                        "minimal",
                        "low",
                        "medium",
                        "high",
                        "xhigh",
                        "max"
                      ]
                    },
                    "thinking": {
                      "type": "string"
                    },
                    "wakeMode": {
                      "type": "string",
                      "enum": [
                        "next-heartbeat",
                        "now"
                      ]
                    },
                    "timeoutMs": {
                      "type": "number"
                    },
                    "maxAttempts": {
                      "type": "number"
                    },
                    "toolAllowlist": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "autoApprove": {
                      "type": "boolean"
                    },
                    "sandboxMode": {
                      "type": "string",
                      "enum": [
                        "inherit",
                        "isolate",
                        "off"
                      ]
                    },
                    "allowUnsafeExternalContent": {
                      "type": "boolean"
                    },
                    "externalContentSource": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "gmail",
                            "email",
                            "webhook",
                            "api",
                            "browser",
                            "channel_metadata",
                            "web_search",
                            "web_fetch",
                            "slack",
                            "discord",
                            "ntfy",
                            "unknown"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string"
                            },
                            "id": {
                              "type": "string"
                            },
                            "url": {
                              "type": "string"
                            },
                            "routeId": {
                              "type": "string"
                            },
                            "surfaceKind": {
                              "type": "string",
                              "enum": [
                                "tui",
                                "web",
                                "slack",
                                "discord",
                                "ntfy",
                                "webhook",
                                "homeassistant",
                                "telegram",
                                "google-chat",
                                "signal",
                                "whatsapp",
                                "telephony",
                                "imessage",
                                "msteams",
                                "bluebubbles",
                                "mattermost",
                                "matrix",
                                "service"
                              ]
                            },
                            "metadata": {
                              "type": "object",
                              "additionalProperties": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "array",
                                    "items": {}
                                  }
                                ]
                              }
                            }
                          },
                          "required": [
                            "kind"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "lightContext": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "target"
                  ],
                  "additionalProperties": false
                },
                "scheduleKind": {
                  "type": "string",
                  "enum": [
                    "at",
                    "every",
                    "cron"
                  ]
                },
                "queuedAt": {
                  "type": "number"
                },
                "startedAt": {
                  "type": "number"
                },
                "endedAt": {
                  "type": "number"
                },
                "durationMs": {
                  "type": "number"
                },
                "forceRun": {
                  "type": "boolean"
                },
                "dueRun": {
                  "type": "boolean"
                },
                "attempt": {
                  "type": "number"
                },
                "sessionId": {
                  "type": "string"
                },
                "routeId": {
                  "type": "string"
                },
                "route": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "session",
                        "thread",
                        "channel",
                        "message"
                      ]
                    },
                    "surfaceKind": {
                      "type": "string",
                      "enum": [
                        "tui",
                        "web",
                        "slack",
                        "discord",
                        "ntfy",
                        "webhook",
                        "homeassistant",
                        "telegram",
                        "google-chat",
                        "signal",
                        "whatsapp",
                        "telephony",
                        "imessage",
                        "msteams",
                        "bluebubbles",
                        "mattermost",
                        "matrix",
                        "service"
                      ]
                    },
                    "surfaceId": {
                      "type": "string"
                    },
                    "externalId": {
                      "type": "string"
                    },
                    "sessionPolicy": {
                      "type": "string",
                      "enum": [
                        "create-or-bind",
                        "continue-existing",
                        "require-existing"
                      ]
                    },
                    "threadPolicy": {
                      "type": "string",
                      "enum": [
                        "preserve",
                        "replace",
                        "detached"
                      ]
                    },
                    "deliveryGuarantee": {
                      "type": "string",
                      "enum": [
                        "best-effort",
                        "at-least-once"
                      ]
                    },
                    "threadId": {
                      "type": "string"
                    },
                    "channelId": {
                      "type": "string"
                    },
                    "sessionId": {
                      "type": "string"
                    },
                    "jobId": {
                      "type": "string"
                    },
                    "runId": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "lastSeenAt": {
                      "type": "number"
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "updatedAt": {
                      "type": "number"
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "surfaceKind",
                    "surfaceId",
                    "externalId",
                    "lastSeenAt",
                    "createdAt",
                    "updatedAt",
                    "metadata"
                  ],
                  "additionalProperties": true
                },
                "continuationMode": {
                  "type": "string",
                  "enum": [
                    "spawn",
                    "shared-session",
                    "continued-live",
                    "background"
                  ]
                },
                "executionIntent": {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "enum": [
                        "spawn",
                        "shared-session",
                        "continued-live",
                        "background"
                      ]
                    },
                    "targetKind": {
                      "type": "string",
                      "enum": [
                        "isolated",
                        "current",
                        "pinned",
                        "background",
                        "main",
                        "session",
                        "route"
                      ]
                    }
                  },
                  "required": [
                    "mode",
                    "targetKind"
                  ],
                  "additionalProperties": false
                },
                "deliveryIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "deliveryAttempts": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "runId": {
                        "type": "string"
                      },
                      "jobId": {
                        "type": "string"
                      },
                      "target": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "none",
                              "webhook",
                              "surface",
                              "integration",
                              "link"
                            ]
                          },
                          "surfaceKind": {
                            "type": "string",
                            "enum": [
                              "tui",
                              "web",
                              "slack",
                              "discord",
                              "ntfy",
                              "webhook",
                              "homeassistant",
                              "telegram",
                              "google-chat",
                              "signal",
                              "whatsapp",
                              "telephony",
                              "imessage",
                              "msteams",
                              "bluebubbles",
                              "mattermost",
                              "matrix",
                              "service"
                            ]
                          },
                          "address": {
                            "type": "string"
                          },
                          "routeId": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "kind"
                        ],
                        "additionalProperties": false
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "pending",
                          "sending",
                          "sent",
                          "failed",
                          "dead_lettered"
                        ]
                      },
                      "startedAt": {
                        "type": "number"
                      },
                      "endedAt": {
                        "type": "number"
                      },
                      "error": {
                        "type": "string"
                      },
                      "responseId": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "runId",
                      "jobId",
                      "target",
                      "status"
                    ],
                    "additionalProperties": true
                  }
                },
                "modelId": {
                  "type": "string"
                },
                "providerId": {
                  "type": "string"
                },
                "telemetry": {
                  "type": "object",
                  "properties": {
                    "usage": {
                      "type": "object",
                      "properties": {
                        "inputTokens": {
                          "type": "number"
                        },
                        "outputTokens": {
                          "type": "number"
                        },
                        "cacheReadTokens": {
                          "type": "number"
                        },
                        "cacheWriteTokens": {
                          "type": "number"
                        },
                        "reasoningTokens": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "inputTokens",
                        "outputTokens",
                        "cacheReadTokens",
                        "cacheWriteTokens"
                      ],
                      "additionalProperties": false
                    },
                    "llmCallCount": {
                      "type": "number"
                    },
                    "toolCallCount": {
                      "type": "number"
                    },
                    "turnCount": {
                      "type": "number"
                    },
                    "modelId": {
                      "type": "string"
                    },
                    "providerId": {
                      "type": "string"
                    },
                    "reasoningSummaryPresent": {
                      "type": "boolean"
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "local-agent",
                        "shared-session",
                        "remote-node",
                        "remote-device"
                      ]
                    }
                  },
                  "required": [
                    "usage"
                  ],
                  "additionalProperties": true
                },
                "result": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    },
                    {
                      "type": "object",
                      "additionalProperties": {}
                    },
                    {
                      "type": "array",
                      "items": {}
                    }
                  ]
                },
                "error": {
                  "type": "string"
                },
                "cancelledReason": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "jobId",
                "labels",
                "createdAt",
                "updatedAt",
                "status",
                "triggeredBy",
                "target",
                "execution",
                "queuedAt",
                "forceRun",
                "dueRun",
                "attempt",
                "deliveryIds"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "run"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "automation.runs.get",
        "title": "Get Automation Run",
        "description": "Return a single automation run record.",
        "category": "automation",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:automation"
        ],
        "http": {
          "method": "GET",
          "path": "/api/automation/runs/{runId}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "runId": {
              "type": "string"
            }
          },
          "required": [
            "runId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "run": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "jobId": {
                  "type": "string"
                },
                "labels": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "running",
                    "completed",
                    "failed",
                    "cancelled",
                    "missed"
                  ]
                },
                "agentId": {
                  "type": "string"
                },
                "triggeredBy": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "schedule",
                        "manual",
                        "hook",
                        "webhook",
                        "surface",
                        "watcher"
                      ]
                    },
                    "label": {
                      "type": "string"
                    },
                    "surfaceKind": {
                      "type": "string",
                      "enum": [
                        "tui",
                        "web",
                        "slack",
                        "discord",
                        "ntfy",
                        "webhook",
                        "homeassistant",
                        "telegram",
                        "google-chat",
                        "signal",
                        "whatsapp",
                        "telephony",
                        "imessage",
                        "msteams",
                        "bluebubbles",
                        "mattermost",
                        "matrix",
                        "service"
                      ]
                    },
                    "routeId": {
                      "type": "string"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "updatedAt": {
                      "type": "number"
                    },
                    "lastSeenAt": {
                      "type": "number"
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "label",
                    "enabled",
                    "createdAt",
                    "updatedAt",
                    "metadata"
                  ],
                  "additionalProperties": true
                },
                "target": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "isolated",
                        "current",
                        "pinned",
                        "background",
                        "main",
                        "session",
                        "route"
                      ]
                    },
                    "sessionId": {
                      "type": "string"
                    },
                    "routeId": {
                      "type": "string"
                    },
                    "threadId": {
                      "type": "string"
                    },
                    "channelId": {
                      "type": "string"
                    },
                    "surfaceKind": {
                      "type": "string",
                      "enum": [
                        "tui",
                        "web",
                        "slack",
                        "discord",
                        "ntfy",
                        "webhook",
                        "homeassistant",
                        "telegram",
                        "google-chat",
                        "signal",
                        "whatsapp",
                        "telephony",
                        "imessage",
                        "msteams",
                        "bluebubbles",
                        "mattermost",
                        "matrix",
                        "service"
                      ]
                    },
                    "pinnedSessionId": {
                      "type": "string"
                    },
                    "preserveThread": {
                      "type": "boolean"
                    },
                    "createIfMissing": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "kind"
                  ],
                  "additionalProperties": false
                },
                "execution": {
                  "type": "object",
                  "properties": {
                    "prompt": {
                      "type": "string"
                    },
                    "template": {
                      "type": "string"
                    },
                    "target": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "isolated",
                            "current",
                            "pinned",
                            "background",
                            "main",
                            "session",
                            "route"
                          ]
                        },
                        "sessionId": {
                          "type": "string"
                        },
                        "routeId": {
                          "type": "string"
                        },
                        "threadId": {
                          "type": "string"
                        },
                        "channelId": {
                          "type": "string"
                        },
                        "surfaceKind": {
                          "type": "string",
                          "enum": [
                            "tui",
                            "web",
                            "slack",
                            "discord",
                            "ntfy",
                            "webhook",
                            "homeassistant",
                            "telegram",
                            "google-chat",
                            "signal",
                            "whatsapp",
                            "telephony",
                            "imessage",
                            "msteams",
                            "bluebubbles",
                            "mattermost",
                            "matrix",
                            "service"
                          ]
                        },
                        "pinnedSessionId": {
                          "type": "string"
                        },
                        "preserveThread": {
                          "type": "boolean"
                        },
                        "createIfMissing": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "kind"
                      ],
                      "additionalProperties": false
                    },
                    "modelProvider": {
                      "type": "string"
                    },
                    "modelId": {
                      "type": "string"
                    },
                    "fallbackModels": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "routing": {
                      "type": "object",
                      "properties": {
                        "providerSelection": {
                          "type": "string",
                          "enum": [
                            "inherit-current",
                            "concrete",
                            "synthetic"
                          ]
                        },
                        "providerFailurePolicy": {
                          "type": "string",
                          "enum": [
                            "ordered-fallbacks",
                            "fail"
                          ]
                        },
                        "fallbackModels": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "additionalProperties": false
                    },
                    "executionIntent": {
                      "type": "object",
                      "properties": {
                        "riskClass": {
                          "type": "string",
                          "enum": [
                            "safe",
                            "elevated",
                            "dangerous"
                          ]
                        },
                        "requiresApproval": {
                          "type": "boolean"
                        },
                        "networkPolicy": {
                          "type": "string",
                          "enum": [
                            "inherit",
                            "allow",
                            "deny",
                            "scoped"
                          ]
                        },
                        "filesystemPolicy": {
                          "type": "string",
                          "enum": [
                            "inherit",
                            "workspace-write",
                            "read-only",
                            "isolated"
                          ]
                        }
                      },
                      "additionalProperties": false
                    },
                    "reasoningEffort": {
                      "type": "string",
                      "enum": [
                        "none",
                        "instant",
                        "minimal",
                        "low",
                        "medium",
                        "high",
                        "xhigh",
                        "max"
                      ]
                    },
                    "thinking": {
                      "type": "string"
                    },
                    "wakeMode": {
                      "type": "string",
                      "enum": [
                        "next-heartbeat",
                        "now"
                      ]
                    },
                    "timeoutMs": {
                      "type": "number"
                    },
                    "maxAttempts": {
                      "type": "number"
                    },
                    "toolAllowlist": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "autoApprove": {
                      "type": "boolean"
                    },
                    "sandboxMode": {
                      "type": "string",
                      "enum": [
                        "inherit",
                        "isolate",
                        "off"
                      ]
                    },
                    "allowUnsafeExternalContent": {
                      "type": "boolean"
                    },
                    "externalContentSource": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "gmail",
                            "email",
                            "webhook",
                            "api",
                            "browser",
                            "channel_metadata",
                            "web_search",
                            "web_fetch",
                            "slack",
                            "discord",
                            "ntfy",
                            "unknown"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string"
                            },
                            "id": {
                              "type": "string"
                            },
                            "url": {
                              "type": "string"
                            },
                            "routeId": {
                              "type": "string"
                            },
                            "surfaceKind": {
                              "type": "string",
                              "enum": [
                                "tui",
                                "web",
                                "slack",
                                "discord",
                                "ntfy",
                                "webhook",
                                "homeassistant",
                                "telegram",
                                "google-chat",
                                "signal",
                                "whatsapp",
                                "telephony",
                                "imessage",
                                "msteams",
                                "bluebubbles",
                                "mattermost",
                                "matrix",
                                "service"
                              ]
                            },
                            "metadata": {
                              "type": "object",
                              "additionalProperties": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "array",
                                    "items": {}
                                  }
                                ]
                              }
                            }
                          },
                          "required": [
                            "kind"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "lightContext": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "target"
                  ],
                  "additionalProperties": false
                },
                "scheduleKind": {
                  "type": "string",
                  "enum": [
                    "at",
                    "every",
                    "cron"
                  ]
                },
                "queuedAt": {
                  "type": "number"
                },
                "startedAt": {
                  "type": "number"
                },
                "endedAt": {
                  "type": "number"
                },
                "durationMs": {
                  "type": "number"
                },
                "forceRun": {
                  "type": "boolean"
                },
                "dueRun": {
                  "type": "boolean"
                },
                "attempt": {
                  "type": "number"
                },
                "sessionId": {
                  "type": "string"
                },
                "routeId": {
                  "type": "string"
                },
                "route": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "session",
                        "thread",
                        "channel",
                        "message"
                      ]
                    },
                    "surfaceKind": {
                      "type": "string",
                      "enum": [
                        "tui",
                        "web",
                        "slack",
                        "discord",
                        "ntfy",
                        "webhook",
                        "homeassistant",
                        "telegram",
                        "google-chat",
                        "signal",
                        "whatsapp",
                        "telephony",
                        "imessage",
                        "msteams",
                        "bluebubbles",
                        "mattermost",
                        "matrix",
                        "service"
                      ]
                    },
                    "surfaceId": {
                      "type": "string"
                    },
                    "externalId": {
                      "type": "string"
                    },
                    "sessionPolicy": {
                      "type": "string",
                      "enum": [
                        "create-or-bind",
                        "continue-existing",
                        "require-existing"
                      ]
                    },
                    "threadPolicy": {
                      "type": "string",
                      "enum": [
                        "preserve",
                        "replace",
                        "detached"
                      ]
                    },
                    "deliveryGuarantee": {
                      "type": "string",
                      "enum": [
                        "best-effort",
                        "at-least-once"
                      ]
                    },
                    "threadId": {
                      "type": "string"
                    },
                    "channelId": {
                      "type": "string"
                    },
                    "sessionId": {
                      "type": "string"
                    },
                    "jobId": {
                      "type": "string"
                    },
                    "runId": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "lastSeenAt": {
                      "type": "number"
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "updatedAt": {
                      "type": "number"
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "surfaceKind",
                    "surfaceId",
                    "externalId",
                    "lastSeenAt",
                    "createdAt",
                    "updatedAt",
                    "metadata"
                  ],
                  "additionalProperties": true
                },
                "continuationMode": {
                  "type": "string",
                  "enum": [
                    "spawn",
                    "shared-session",
                    "continued-live",
                    "background"
                  ]
                },
                "executionIntent": {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "enum": [
                        "spawn",
                        "shared-session",
                        "continued-live",
                        "background"
                      ]
                    },
                    "targetKind": {
                      "type": "string",
                      "enum": [
                        "isolated",
                        "current",
                        "pinned",
                        "background",
                        "main",
                        "session",
                        "route"
                      ]
                    }
                  },
                  "required": [
                    "mode",
                    "targetKind"
                  ],
                  "additionalProperties": false
                },
                "deliveryIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "deliveryAttempts": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "runId": {
                        "type": "string"
                      },
                      "jobId": {
                        "type": "string"
                      },
                      "target": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "none",
                              "webhook",
                              "surface",
                              "integration",
                              "link"
                            ]
                          },
                          "surfaceKind": {
                            "type": "string",
                            "enum": [
                              "tui",
                              "web",
                              "slack",
                              "discord",
                              "ntfy",
                              "webhook",
                              "homeassistant",
                              "telegram",
                              "google-chat",
                              "signal",
                              "whatsapp",
                              "telephony",
                              "imessage",
                              "msteams",
                              "bluebubbles",
                              "mattermost",
                              "matrix",
                              "service"
                            ]
                          },
                          "address": {
                            "type": "string"
                          },
                          "routeId": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "kind"
                        ],
                        "additionalProperties": false
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "pending",
                          "sending",
                          "sent",
                          "failed",
                          "dead_lettered"
                        ]
                      },
                      "startedAt": {
                        "type": "number"
                      },
                      "endedAt": {
                        "type": "number"
                      },
                      "error": {
                        "type": "string"
                      },
                      "responseId": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "runId",
                      "jobId",
                      "target",
                      "status"
                    ],
                    "additionalProperties": true
                  }
                },
                "modelId": {
                  "type": "string"
                },
                "providerId": {
                  "type": "string"
                },
                "telemetry": {
                  "type": "object",
                  "properties": {
                    "usage": {
                      "type": "object",
                      "properties": {
                        "inputTokens": {
                          "type": "number"
                        },
                        "outputTokens": {
                          "type": "number"
                        },
                        "cacheReadTokens": {
                          "type": "number"
                        },
                        "cacheWriteTokens": {
                          "type": "number"
                        },
                        "reasoningTokens": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "inputTokens",
                        "outputTokens",
                        "cacheReadTokens",
                        "cacheWriteTokens"
                      ],
                      "additionalProperties": false
                    },
                    "llmCallCount": {
                      "type": "number"
                    },
                    "toolCallCount": {
                      "type": "number"
                    },
                    "turnCount": {
                      "type": "number"
                    },
                    "modelId": {
                      "type": "string"
                    },
                    "providerId": {
                      "type": "string"
                    },
                    "reasoningSummaryPresent": {
                      "type": "boolean"
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "local-agent",
                        "shared-session",
                        "remote-node",
                        "remote-device"
                      ]
                    }
                  },
                  "required": [
                    "usage"
                  ],
                  "additionalProperties": true
                },
                "result": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    },
                    {
                      "type": "object",
                      "additionalProperties": {}
                    },
                    {
                      "type": "array",
                      "items": {}
                    }
                  ]
                },
                "error": {
                  "type": "string"
                },
                "cancelledReason": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "jobId",
                "labels",
                "createdAt",
                "updatedAt",
                "status",
                "triggeredBy",
                "target",
                "execution",
                "queuedAt",
                "forceRun",
                "dueRun",
                "attempt",
                "deliveryIds"
              ],
              "additionalProperties": true
            },
            "deliveries": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "runId": {
                    "type": "string"
                  },
                  "jobId": {
                    "type": "string"
                  },
                  "target": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "none",
                          "webhook",
                          "surface",
                          "integration",
                          "link"
                        ]
                      },
                      "surfaceKind": {
                        "type": "string",
                        "enum": [
                          "tui",
                          "web",
                          "slack",
                          "discord",
                          "ntfy",
                          "webhook",
                          "homeassistant",
                          "telegram",
                          "google-chat",
                          "signal",
                          "whatsapp",
                          "telephony",
                          "imessage",
                          "msteams",
                          "bluebubbles",
                          "mattermost",
                          "matrix",
                          "service"
                        ]
                      },
                      "address": {
                        "type": "string"
                      },
                      "routeId": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind"
                    ],
                    "additionalProperties": false
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "pending",
                      "sending",
                      "sent",
                      "failed",
                      "dead_lettered"
                    ]
                  },
                  "startedAt": {
                    "type": "number"
                  },
                  "endedAt": {
                    "type": "number"
                  },
                  "error": {
                    "type": "string"
                  },
                  "responseId": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "runId",
                  "jobId",
                  "target",
                  "status"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "run",
            "deliveries"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "automation.runs.list",
        "title": "List Automation Runs",
        "description": "Return automation run history. Without ?limit/?cursor returns { runs: [...] } (backward compatible). With ?limit=N (1–500, default 100) and optional ?cursor=<opaque> returns a PaginatedResponse envelope { items, hasMore, nextCursor? }. Invalid cursors return HTTP 400. Optional ?since=<epoch-ms> returns only runs active on or after that time (by queuedAt, or endedAt when set), the host-side source an away-digest reads to report the failed, missed, completed, and delivered runs since the operator was last present.",
        "category": "automation",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:automation"
        ],
        "http": {
          "method": "GET",
          "path": "/api/automation/runs"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "number"
            },
            "cursor": {
              "type": "string"
            },
            "since": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "runs": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "jobId": {
                    "type": "string"
                  },
                  "labels": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "queued",
                      "running",
                      "completed",
                      "failed",
                      "cancelled",
                      "missed"
                    ]
                  },
                  "agentId": {
                    "type": "string"
                  },
                  "triggeredBy": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "schedule",
                          "manual",
                          "hook",
                          "webhook",
                          "surface",
                          "watcher"
                        ]
                      },
                      "label": {
                        "type": "string"
                      },
                      "surfaceKind": {
                        "type": "string",
                        "enum": [
                          "tui",
                          "web",
                          "slack",
                          "discord",
                          "ntfy",
                          "webhook",
                          "homeassistant",
                          "telegram",
                          "google-chat",
                          "signal",
                          "whatsapp",
                          "telephony",
                          "imessage",
                          "msteams",
                          "bluebubbles",
                          "mattermost",
                          "matrix",
                          "service"
                        ]
                      },
                      "routeId": {
                        "type": "string"
                      },
                      "enabled": {
                        "type": "boolean"
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "updatedAt": {
                        "type": "number"
                      },
                      "lastSeenAt": {
                        "type": "number"
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "id",
                      "kind",
                      "label",
                      "enabled",
                      "createdAt",
                      "updatedAt",
                      "metadata"
                    ],
                    "additionalProperties": true
                  },
                  "target": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "isolated",
                          "current",
                          "pinned",
                          "background",
                          "main",
                          "session",
                          "route"
                        ]
                      },
                      "sessionId": {
                        "type": "string"
                      },
                      "routeId": {
                        "type": "string"
                      },
                      "threadId": {
                        "type": "string"
                      },
                      "channelId": {
                        "type": "string"
                      },
                      "surfaceKind": {
                        "type": "string",
                        "enum": [
                          "tui",
                          "web",
                          "slack",
                          "discord",
                          "ntfy",
                          "webhook",
                          "homeassistant",
                          "telegram",
                          "google-chat",
                          "signal",
                          "whatsapp",
                          "telephony",
                          "imessage",
                          "msteams",
                          "bluebubbles",
                          "mattermost",
                          "matrix",
                          "service"
                        ]
                      },
                      "pinnedSessionId": {
                        "type": "string"
                      },
                      "preserveThread": {
                        "type": "boolean"
                      },
                      "createIfMissing": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "kind"
                    ],
                    "additionalProperties": false
                  },
                  "execution": {
                    "type": "object",
                    "properties": {
                      "prompt": {
                        "type": "string"
                      },
                      "template": {
                        "type": "string"
                      },
                      "target": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "isolated",
                              "current",
                              "pinned",
                              "background",
                              "main",
                              "session",
                              "route"
                            ]
                          },
                          "sessionId": {
                            "type": "string"
                          },
                          "routeId": {
                            "type": "string"
                          },
                          "threadId": {
                            "type": "string"
                          },
                          "channelId": {
                            "type": "string"
                          },
                          "surfaceKind": {
                            "type": "string",
                            "enum": [
                              "tui",
                              "web",
                              "slack",
                              "discord",
                              "ntfy",
                              "webhook",
                              "homeassistant",
                              "telegram",
                              "google-chat",
                              "signal",
                              "whatsapp",
                              "telephony",
                              "imessage",
                              "msteams",
                              "bluebubbles",
                              "mattermost",
                              "matrix",
                              "service"
                            ]
                          },
                          "pinnedSessionId": {
                            "type": "string"
                          },
                          "preserveThread": {
                            "type": "boolean"
                          },
                          "createIfMissing": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "kind"
                        ],
                        "additionalProperties": false
                      },
                      "modelProvider": {
                        "type": "string"
                      },
                      "modelId": {
                        "type": "string"
                      },
                      "fallbackModels": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "routing": {
                        "type": "object",
                        "properties": {
                          "providerSelection": {
                            "type": "string",
                            "enum": [
                              "inherit-current",
                              "concrete",
                              "synthetic"
                            ]
                          },
                          "providerFailurePolicy": {
                            "type": "string",
                            "enum": [
                              "ordered-fallbacks",
                              "fail"
                            ]
                          },
                          "fallbackModels": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "additionalProperties": false
                      },
                      "executionIntent": {
                        "type": "object",
                        "properties": {
                          "riskClass": {
                            "type": "string",
                            "enum": [
                              "safe",
                              "elevated",
                              "dangerous"
                            ]
                          },
                          "requiresApproval": {
                            "type": "boolean"
                          },
                          "networkPolicy": {
                            "type": "string",
                            "enum": [
                              "inherit",
                              "allow",
                              "deny",
                              "scoped"
                            ]
                          },
                          "filesystemPolicy": {
                            "type": "string",
                            "enum": [
                              "inherit",
                              "workspace-write",
                              "read-only",
                              "isolated"
                            ]
                          }
                        },
                        "additionalProperties": false
                      },
                      "reasoningEffort": {
                        "type": "string",
                        "enum": [
                          "none",
                          "instant",
                          "minimal",
                          "low",
                          "medium",
                          "high",
                          "xhigh",
                          "max"
                        ]
                      },
                      "thinking": {
                        "type": "string"
                      },
                      "wakeMode": {
                        "type": "string",
                        "enum": [
                          "next-heartbeat",
                          "now"
                        ]
                      },
                      "timeoutMs": {
                        "type": "number"
                      },
                      "maxAttempts": {
                        "type": "number"
                      },
                      "toolAllowlist": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "autoApprove": {
                        "type": "boolean"
                      },
                      "sandboxMode": {
                        "type": "string",
                        "enum": [
                          "inherit",
                          "isolate",
                          "off"
                        ]
                      },
                      "allowUnsafeExternalContent": {
                        "type": "boolean"
                      },
                      "externalContentSource": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "gmail",
                              "email",
                              "webhook",
                              "api",
                              "browser",
                              "channel_metadata",
                              "web_search",
                              "web_fetch",
                              "slack",
                              "discord",
                              "ntfy",
                              "unknown"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "url": {
                                "type": "string"
                              },
                              "routeId": {
                                "type": "string"
                              },
                              "surfaceKind": {
                                "type": "string",
                                "enum": [
                                  "tui",
                                  "web",
                                  "slack",
                                  "discord",
                                  "ntfy",
                                  "webhook",
                                  "homeassistant",
                                  "telegram",
                                  "google-chat",
                                  "signal",
                                  "whatsapp",
                                  "telephony",
                                  "imessage",
                                  "msteams",
                                  "bluebubbles",
                                  "mattermost",
                                  "matrix",
                                  "service"
                                ]
                              },
                              "metadata": {
                                "type": "object",
                                "additionalProperties": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "boolean"
                                    },
                                    {
                                      "type": "null"
                                    },
                                    {
                                      "type": "object",
                                      "additionalProperties": {}
                                    },
                                    {
                                      "type": "array",
                                      "items": {}
                                    }
                                  ]
                                }
                              }
                            },
                            "required": [
                              "kind"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      },
                      "lightContext": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "target"
                    ],
                    "additionalProperties": false
                  },
                  "scheduleKind": {
                    "type": "string",
                    "enum": [
                      "at",
                      "every",
                      "cron"
                    ]
                  },
                  "queuedAt": {
                    "type": "number"
                  },
                  "startedAt": {
                    "type": "number"
                  },
                  "endedAt": {
                    "type": "number"
                  },
                  "durationMs": {
                    "type": "number"
                  },
                  "forceRun": {
                    "type": "boolean"
                  },
                  "dueRun": {
                    "type": "boolean"
                  },
                  "attempt": {
                    "type": "number"
                  },
                  "sessionId": {
                    "type": "string"
                  },
                  "routeId": {
                    "type": "string"
                  },
                  "route": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "session",
                          "thread",
                          "channel",
                          "message"
                        ]
                      },
                      "surfaceKind": {
                        "type": "string",
                        "enum": [
                          "tui",
                          "web",
                          "slack",
                          "discord",
                          "ntfy",
                          "webhook",
                          "homeassistant",
                          "telegram",
                          "google-chat",
                          "signal",
                          "whatsapp",
                          "telephony",
                          "imessage",
                          "msteams",
                          "bluebubbles",
                          "mattermost",
                          "matrix",
                          "service"
                        ]
                      },
                      "surfaceId": {
                        "type": "string"
                      },
                      "externalId": {
                        "type": "string"
                      },
                      "sessionPolicy": {
                        "type": "string",
                        "enum": [
                          "create-or-bind",
                          "continue-existing",
                          "require-existing"
                        ]
                      },
                      "threadPolicy": {
                        "type": "string",
                        "enum": [
                          "preserve",
                          "replace",
                          "detached"
                        ]
                      },
                      "deliveryGuarantee": {
                        "type": "string",
                        "enum": [
                          "best-effort",
                          "at-least-once"
                        ]
                      },
                      "threadId": {
                        "type": "string"
                      },
                      "channelId": {
                        "type": "string"
                      },
                      "sessionId": {
                        "type": "string"
                      },
                      "jobId": {
                        "type": "string"
                      },
                      "runId": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "lastSeenAt": {
                        "type": "number"
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "updatedAt": {
                        "type": "number"
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "id",
                      "kind",
                      "surfaceKind",
                      "surfaceId",
                      "externalId",
                      "lastSeenAt",
                      "createdAt",
                      "updatedAt",
                      "metadata"
                    ],
                    "additionalProperties": true
                  },
                  "continuationMode": {
                    "type": "string",
                    "enum": [
                      "spawn",
                      "shared-session",
                      "continued-live",
                      "background"
                    ]
                  },
                  "executionIntent": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "spawn",
                          "shared-session",
                          "continued-live",
                          "background"
                        ]
                      },
                      "targetKind": {
                        "type": "string",
                        "enum": [
                          "isolated",
                          "current",
                          "pinned",
                          "background",
                          "main",
                          "session",
                          "route"
                        ]
                      }
                    },
                    "required": [
                      "mode",
                      "targetKind"
                    ],
                    "additionalProperties": false
                  },
                  "deliveryIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "deliveryAttempts": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "runId": {
                          "type": "string"
                        },
                        "jobId": {
                          "type": "string"
                        },
                        "target": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "none",
                                "webhook",
                                "surface",
                                "integration",
                                "link"
                              ]
                            },
                            "surfaceKind": {
                              "type": "string",
                              "enum": [
                                "tui",
                                "web",
                                "slack",
                                "discord",
                                "ntfy",
                                "webhook",
                                "homeassistant",
                                "telegram",
                                "google-chat",
                                "signal",
                                "whatsapp",
                                "telephony",
                                "imessage",
                                "msteams",
                                "bluebubbles",
                                "mattermost",
                                "matrix",
                                "service"
                              ]
                            },
                            "address": {
                              "type": "string"
                            },
                            "routeId": {
                              "type": "string"
                            },
                            "label": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind"
                          ],
                          "additionalProperties": false
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "sending",
                            "sent",
                            "failed",
                            "dead_lettered"
                          ]
                        },
                        "startedAt": {
                          "type": "number"
                        },
                        "endedAt": {
                          "type": "number"
                        },
                        "error": {
                          "type": "string"
                        },
                        "responseId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "runId",
                        "jobId",
                        "target",
                        "status"
                      ],
                      "additionalProperties": true
                    }
                  },
                  "modelId": {
                    "type": "string"
                  },
                  "providerId": {
                    "type": "string"
                  },
                  "telemetry": {
                    "type": "object",
                    "properties": {
                      "usage": {
                        "type": "object",
                        "properties": {
                          "inputTokens": {
                            "type": "number"
                          },
                          "outputTokens": {
                            "type": "number"
                          },
                          "cacheReadTokens": {
                            "type": "number"
                          },
                          "cacheWriteTokens": {
                            "type": "number"
                          },
                          "reasoningTokens": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "inputTokens",
                          "outputTokens",
                          "cacheReadTokens",
                          "cacheWriteTokens"
                        ],
                        "additionalProperties": false
                      },
                      "llmCallCount": {
                        "type": "number"
                      },
                      "toolCallCount": {
                        "type": "number"
                      },
                      "turnCount": {
                        "type": "number"
                      },
                      "modelId": {
                        "type": "string"
                      },
                      "providerId": {
                        "type": "string"
                      },
                      "reasoningSummaryPresent": {
                        "type": "boolean"
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "local-agent",
                          "shared-session",
                          "remote-node",
                          "remote-device"
                        ]
                      }
                    },
                    "required": [
                      "usage"
                    ],
                    "additionalProperties": true
                  },
                  "result": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  },
                  "error": {
                    "type": "string"
                  },
                  "cancelledReason": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "jobId",
                  "labels",
                  "createdAt",
                  "updatedAt",
                  "status",
                  "triggeredBy",
                  "target",
                  "execution",
                  "queuedAt",
                  "forceRun",
                  "dueRun",
                  "attempt",
                  "deliveryIds"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "runs"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "automation.runs.retry",
        "title": "Retry Automation Run",
        "description": "Retry a completed or failed automation run.",
        "category": "automation",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:automation"
        ],
        "http": {
          "method": "POST",
          "path": "/api/automation/runs/{runId}/retry"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "runId": {
              "type": "string"
            }
          },
          "required": [
            "runId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "run": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "jobId": {
                  "type": "string"
                },
                "labels": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "running",
                    "completed",
                    "failed",
                    "cancelled",
                    "missed"
                  ]
                },
                "agentId": {
                  "type": "string"
                },
                "triggeredBy": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "schedule",
                        "manual",
                        "hook",
                        "webhook",
                        "surface",
                        "watcher"
                      ]
                    },
                    "label": {
                      "type": "string"
                    },
                    "surfaceKind": {
                      "type": "string",
                      "enum": [
                        "tui",
                        "web",
                        "slack",
                        "discord",
                        "ntfy",
                        "webhook",
                        "homeassistant",
                        "telegram",
                        "google-chat",
                        "signal",
                        "whatsapp",
                        "telephony",
                        "imessage",
                        "msteams",
                        "bluebubbles",
                        "mattermost",
                        "matrix",
                        "service"
                      ]
                    },
                    "routeId": {
                      "type": "string"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "updatedAt": {
                      "type": "number"
                    },
                    "lastSeenAt": {
                      "type": "number"
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "label",
                    "enabled",
                    "createdAt",
                    "updatedAt",
                    "metadata"
                  ],
                  "additionalProperties": true
                },
                "target": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "isolated",
                        "current",
                        "pinned",
                        "background",
                        "main",
                        "session",
                        "route"
                      ]
                    },
                    "sessionId": {
                      "type": "string"
                    },
                    "routeId": {
                      "type": "string"
                    },
                    "threadId": {
                      "type": "string"
                    },
                    "channelId": {
                      "type": "string"
                    },
                    "surfaceKind": {
                      "type": "string",
                      "enum": [
                        "tui",
                        "web",
                        "slack",
                        "discord",
                        "ntfy",
                        "webhook",
                        "homeassistant",
                        "telegram",
                        "google-chat",
                        "signal",
                        "whatsapp",
                        "telephony",
                        "imessage",
                        "msteams",
                        "bluebubbles",
                        "mattermost",
                        "matrix",
                        "service"
                      ]
                    },
                    "pinnedSessionId": {
                      "type": "string"
                    },
                    "preserveThread": {
                      "type": "boolean"
                    },
                    "createIfMissing": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "kind"
                  ],
                  "additionalProperties": false
                },
                "execution": {
                  "type": "object",
                  "properties": {
                    "prompt": {
                      "type": "string"
                    },
                    "template": {
                      "type": "string"
                    },
                    "target": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "isolated",
                            "current",
                            "pinned",
                            "background",
                            "main",
                            "session",
                            "route"
                          ]
                        },
                        "sessionId": {
                          "type": "string"
                        },
                        "routeId": {
                          "type": "string"
                        },
                        "threadId": {
                          "type": "string"
                        },
                        "channelId": {
                          "type": "string"
                        },
                        "surfaceKind": {
                          "type": "string",
                          "enum": [
                            "tui",
                            "web",
                            "slack",
                            "discord",
                            "ntfy",
                            "webhook",
                            "homeassistant",
                            "telegram",
                            "google-chat",
                            "signal",
                            "whatsapp",
                            "telephony",
                            "imessage",
                            "msteams",
                            "bluebubbles",
                            "mattermost",
                            "matrix",
                            "service"
                          ]
                        },
                        "pinnedSessionId": {
                          "type": "string"
                        },
                        "preserveThread": {
                          "type": "boolean"
                        },
                        "createIfMissing": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "kind"
                      ],
                      "additionalProperties": false
                    },
                    "modelProvider": {
                      "type": "string"
                    },
                    "modelId": {
                      "type": "string"
                    },
                    "fallbackModels": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "routing": {
                      "type": "object",
                      "properties": {
                        "providerSelection": {
                          "type": "string",
                          "enum": [
                            "inherit-current",
                            "concrete",
                            "synthetic"
                          ]
                        },
                        "providerFailurePolicy": {
                          "type": "string",
                          "enum": [
                            "ordered-fallbacks",
                            "fail"
                          ]
                        },
                        "fallbackModels": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "additionalProperties": false
                    },
                    "executionIntent": {
                      "type": "object",
                      "properties": {
                        "riskClass": {
                          "type": "string",
                          "enum": [
                            "safe",
                            "elevated",
                            "dangerous"
                          ]
                        },
                        "requiresApproval": {
                          "type": "boolean"
                        },
                        "networkPolicy": {
                          "type": "string",
                          "enum": [
                            "inherit",
                            "allow",
                            "deny",
                            "scoped"
                          ]
                        },
                        "filesystemPolicy": {
                          "type": "string",
                          "enum": [
                            "inherit",
                            "workspace-write",
                            "read-only",
                            "isolated"
                          ]
                        }
                      },
                      "additionalProperties": false
                    },
                    "reasoningEffort": {
                      "type": "string",
                      "enum": [
                        "none",
                        "instant",
                        "minimal",
                        "low",
                        "medium",
                        "high",
                        "xhigh",
                        "max"
                      ]
                    },
                    "thinking": {
                      "type": "string"
                    },
                    "wakeMode": {
                      "type": "string",
                      "enum": [
                        "next-heartbeat",
                        "now"
                      ]
                    },
                    "timeoutMs": {
                      "type": "number"
                    },
                    "maxAttempts": {
                      "type": "number"
                    },
                    "toolAllowlist": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "autoApprove": {
                      "type": "boolean"
                    },
                    "sandboxMode": {
                      "type": "string",
                      "enum": [
                        "inherit",
                        "isolate",
                        "off"
                      ]
                    },
                    "allowUnsafeExternalContent": {
                      "type": "boolean"
                    },
                    "externalContentSource": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "gmail",
                            "email",
                            "webhook",
                            "api",
                            "browser",
                            "channel_metadata",
                            "web_search",
                            "web_fetch",
                            "slack",
                            "discord",
                            "ntfy",
                            "unknown"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string"
                            },
                            "id": {
                              "type": "string"
                            },
                            "url": {
                              "type": "string"
                            },
                            "routeId": {
                              "type": "string"
                            },
                            "surfaceKind": {
                              "type": "string",
                              "enum": [
                                "tui",
                                "web",
                                "slack",
                                "discord",
                                "ntfy",
                                "webhook",
                                "homeassistant",
                                "telegram",
                                "google-chat",
                                "signal",
                                "whatsapp",
                                "telephony",
                                "imessage",
                                "msteams",
                                "bluebubbles",
                                "mattermost",
                                "matrix",
                                "service"
                              ]
                            },
                            "metadata": {
                              "type": "object",
                              "additionalProperties": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "array",
                                    "items": {}
                                  }
                                ]
                              }
                            }
                          },
                          "required": [
                            "kind"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "lightContext": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "target"
                  ],
                  "additionalProperties": false
                },
                "scheduleKind": {
                  "type": "string",
                  "enum": [
                    "at",
                    "every",
                    "cron"
                  ]
                },
                "queuedAt": {
                  "type": "number"
                },
                "startedAt": {
                  "type": "number"
                },
                "endedAt": {
                  "type": "number"
                },
                "durationMs": {
                  "type": "number"
                },
                "forceRun": {
                  "type": "boolean"
                },
                "dueRun": {
                  "type": "boolean"
                },
                "attempt": {
                  "type": "number"
                },
                "sessionId": {
                  "type": "string"
                },
                "routeId": {
                  "type": "string"
                },
                "route": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "session",
                        "thread",
                        "channel",
                        "message"
                      ]
                    },
                    "surfaceKind": {
                      "type": "string",
                      "enum": [
                        "tui",
                        "web",
                        "slack",
                        "discord",
                        "ntfy",
                        "webhook",
                        "homeassistant",
                        "telegram",
                        "google-chat",
                        "signal",
                        "whatsapp",
                        "telephony",
                        "imessage",
                        "msteams",
                        "bluebubbles",
                        "mattermost",
                        "matrix",
                        "service"
                      ]
                    },
                    "surfaceId": {
                      "type": "string"
                    },
                    "externalId": {
                      "type": "string"
                    },
                    "sessionPolicy": {
                      "type": "string",
                      "enum": [
                        "create-or-bind",
                        "continue-existing",
                        "require-existing"
                      ]
                    },
                    "threadPolicy": {
                      "type": "string",
                      "enum": [
                        "preserve",
                        "replace",
                        "detached"
                      ]
                    },
                    "deliveryGuarantee": {
                      "type": "string",
                      "enum": [
                        "best-effort",
                        "at-least-once"
                      ]
                    },
                    "threadId": {
                      "type": "string"
                    },
                    "channelId": {
                      "type": "string"
                    },
                    "sessionId": {
                      "type": "string"
                    },
                    "jobId": {
                      "type": "string"
                    },
                    "runId": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "lastSeenAt": {
                      "type": "number"
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "updatedAt": {
                      "type": "number"
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "surfaceKind",
                    "surfaceId",
                    "externalId",
                    "lastSeenAt",
                    "createdAt",
                    "updatedAt",
                    "metadata"
                  ],
                  "additionalProperties": true
                },
                "continuationMode": {
                  "type": "string",
                  "enum": [
                    "spawn",
                    "shared-session",
                    "continued-live",
                    "background"
                  ]
                },
                "executionIntent": {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "enum": [
                        "spawn",
                        "shared-session",
                        "continued-live",
                        "background"
                      ]
                    },
                    "targetKind": {
                      "type": "string",
                      "enum": [
                        "isolated",
                        "current",
                        "pinned",
                        "background",
                        "main",
                        "session",
                        "route"
                      ]
                    }
                  },
                  "required": [
                    "mode",
                    "targetKind"
                  ],
                  "additionalProperties": false
                },
                "deliveryIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "deliveryAttempts": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "runId": {
                        "type": "string"
                      },
                      "jobId": {
                        "type": "string"
                      },
                      "target": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "none",
                              "webhook",
                              "surface",
                              "integration",
                              "link"
                            ]
                          },
                          "surfaceKind": {
                            "type": "string",
                            "enum": [
                              "tui",
                              "web",
                              "slack",
                              "discord",
                              "ntfy",
                              "webhook",
                              "homeassistant",
                              "telegram",
                              "google-chat",
                              "signal",
                              "whatsapp",
                              "telephony",
                              "imessage",
                              "msteams",
                              "bluebubbles",
                              "mattermost",
                              "matrix",
                              "service"
                            ]
                          },
                          "address": {
                            "type": "string"
                          },
                          "routeId": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "kind"
                        ],
                        "additionalProperties": false
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "pending",
                          "sending",
                          "sent",
                          "failed",
                          "dead_lettered"
                        ]
                      },
                      "startedAt": {
                        "type": "number"
                      },
                      "endedAt": {
                        "type": "number"
                      },
                      "error": {
                        "type": "string"
                      },
                      "responseId": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "runId",
                      "jobId",
                      "target",
                      "status"
                    ],
                    "additionalProperties": true
                  }
                },
                "modelId": {
                  "type": "string"
                },
                "providerId": {
                  "type": "string"
                },
                "telemetry": {
                  "type": "object",
                  "properties": {
                    "usage": {
                      "type": "object",
                      "properties": {
                        "inputTokens": {
                          "type": "number"
                        },
                        "outputTokens": {
                          "type": "number"
                        },
                        "cacheReadTokens": {
                          "type": "number"
                        },
                        "cacheWriteTokens": {
                          "type": "number"
                        },
                        "reasoningTokens": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "inputTokens",
                        "outputTokens",
                        "cacheReadTokens",
                        "cacheWriteTokens"
                      ],
                      "additionalProperties": false
                    },
                    "llmCallCount": {
                      "type": "number"
                    },
                    "toolCallCount": {
                      "type": "number"
                    },
                    "turnCount": {
                      "type": "number"
                    },
                    "modelId": {
                      "type": "string"
                    },
                    "providerId": {
                      "type": "string"
                    },
                    "reasoningSummaryPresent": {
                      "type": "boolean"
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "local-agent",
                        "shared-session",
                        "remote-node",
                        "remote-device"
                      ]
                    }
                  },
                  "required": [
                    "usage"
                  ],
                  "additionalProperties": true
                },
                "result": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    },
                    {
                      "type": "object",
                      "additionalProperties": {}
                    },
                    {
                      "type": "array",
                      "items": {}
                    }
                  ]
                },
                "error": {
                  "type": "string"
                },
                "cancelledReason": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "jobId",
                "labels",
                "createdAt",
                "updatedAt",
                "status",
                "triggeredBy",
                "target",
                "execution",
                "queuedAt",
                "forceRun",
                "dueRun",
                "attempt",
                "deliveryIds"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "run"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "automation.schedules.create",
        "title": "Create Schedule",
        "description": "Create a schedule record.",
        "category": "automation",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:automation"
        ],
        "http": {
          "method": "POST",
          "path": "/api/automation/schedules"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "prompt": {
              "type": "string"
            },
            "cron": {
              "type": "string"
            },
            "every": {
              "type": "string"
            },
            "at": {
              "type": "string"
            },
            "timezone": {
              "type": "string"
            },
            "staggerMs": {
              "type": "number"
            },
            "model": {
              "type": "string"
            },
            "provider": {
              "type": "string"
            },
            "fallbackModels": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "template": {
              "type": "string"
            },
            "target": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "isolated",
                    "current",
                    "pinned",
                    "background",
                    "main",
                    "session",
                    "route"
                  ]
                },
                "sessionId": {
                  "type": "string"
                },
                "routeId": {
                  "type": "string"
                },
                "threadId": {
                  "type": "string"
                },
                "channelId": {
                  "type": "string"
                },
                "surfaceKind": {
                  "type": "string",
                  "enum": [
                    "tui",
                    "web",
                    "slack",
                    "discord",
                    "ntfy",
                    "webhook",
                    "homeassistant",
                    "telegram",
                    "google-chat",
                    "signal",
                    "whatsapp",
                    "telephony",
                    "imessage",
                    "msteams",
                    "bluebubbles",
                    "mattermost",
                    "matrix",
                    "service"
                  ]
                },
                "pinnedSessionId": {
                  "type": "string"
                },
                "preserveThread": {
                  "type": "boolean"
                },
                "createIfMissing": {
                  "type": "boolean"
                }
              },
              "required": [
                "kind"
              ],
              "additionalProperties": false
            },
            "reasoningEffort": {
              "type": "string"
            },
            "thinking": {
              "type": "string"
            },
            "wakeMode": {
              "type": "string"
            },
            "timeoutMs": {
              "type": "number"
            },
            "toolAllowlist": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "autoApprove": {
              "type": "boolean"
            },
            "allowUnsafeExternalContent": {
              "type": "boolean"
            },
            "externalContentSource": {
              "type": "string"
            },
            "lightContext": {
              "type": "boolean"
            },
            "delivery": {
              "type": "object",
              "properties": {
                "mode": {
                  "type": "string",
                  "enum": [
                    "none",
                    "webhook",
                    "surface",
                    "integration",
                    "link"
                  ]
                },
                "targets": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "none",
                          "webhook",
                          "surface",
                          "integration",
                          "link"
                        ]
                      },
                      "surfaceKind": {
                        "type": "string",
                        "enum": [
                          "tui",
                          "web",
                          "slack",
                          "discord",
                          "ntfy",
                          "webhook",
                          "homeassistant",
                          "telegram",
                          "google-chat",
                          "signal",
                          "whatsapp",
                          "telephony",
                          "imessage",
                          "msteams",
                          "bluebubbles",
                          "mattermost",
                          "matrix",
                          "service"
                        ]
                      },
                      "address": {
                        "type": "string"
                      },
                      "routeId": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind"
                    ],
                    "additionalProperties": false
                  }
                },
                "fallbackTargets": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "none",
                          "webhook",
                          "surface",
                          "integration",
                          "link"
                        ]
                      },
                      "surfaceKind": {
                        "type": "string",
                        "enum": [
                          "tui",
                          "web",
                          "slack",
                          "discord",
                          "ntfy",
                          "webhook",
                          "homeassistant",
                          "telegram",
                          "google-chat",
                          "signal",
                          "whatsapp",
                          "telephony",
                          "imessage",
                          "msteams",
                          "bluebubbles",
                          "mattermost",
                          "matrix",
                          "service"
                        ]
                      },
                      "address": {
                        "type": "string"
                      },
                      "routeId": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind"
                    ],
                    "additionalProperties": false
                  }
                },
                "includeSummary": {
                  "type": "boolean"
                },
                "includeTranscript": {
                  "type": "boolean"
                },
                "includeLinks": {
                  "type": "boolean"
                },
                "replyToRouteId": {
                  "type": "string"
                }
              },
              "required": [
                "mode",
                "targets",
                "fallbackTargets",
                "includeSummary",
                "includeTranscript",
                "includeLinks"
              ],
              "additionalProperties": false
            },
            "failure": {
              "type": "object",
              "properties": {
                "action": {
                  "type": "string",
                  "enum": [
                    "retry",
                    "cooldown",
                    "disable",
                    "dead_letter"
                  ]
                },
                "maxConsecutiveFailures": {
                  "type": "number"
                },
                "cooldownMs": {
                  "type": "number"
                },
                "retryPolicy": {
                  "type": "object",
                  "properties": {
                    "maxAttempts": {
                      "type": "number"
                    },
                    "delayMs": {
                      "type": "number"
                    },
                    "strategy": {
                      "type": "string",
                      "enum": [
                        "fixed",
                        "linear",
                        "exponential"
                      ]
                    },
                    "maxDelayMs": {
                      "type": "number"
                    },
                    "jitterMs": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "maxAttempts",
                    "delayMs",
                    "strategy"
                  ],
                  "additionalProperties": false
                },
                "deadLetterRouteId": {
                  "type": "string"
                },
                "disableAfterFailures": {
                  "type": "boolean"
                },
                "notifyRouteId": {
                  "type": "string"
                }
              },
              "required": [
                "action",
                "maxConsecutiveFailures",
                "cooldownMs",
                "retryPolicy"
              ],
              "additionalProperties": false
            },
            "enabled": {
              "type": "boolean"
            },
            "deleteAfterRun": {
              "type": "boolean"
            },
            "kind": {
              "type": "string",
              "enum": [
                "cron",
                "every",
                "at"
              ]
            },
            "schedule": {
              "type": "object",
              "properties": {
                "expression": {
                  "type": "string"
                }
              },
              "required": [
                "expression"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "prompt"
          ],
          "additionalProperties": true,
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "cron"
                  ]
                },
                "cron": {
                  "type": "string"
                }
              },
              "required": [
                "cron"
              ],
              "additionalProperties": true
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "cron"
                  ]
                },
                "schedule": {
                  "type": "object",
                  "properties": {
                    "expression": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "expression"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "schedule"
              ],
              "additionalProperties": true
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "every"
                  ]
                },
                "every": {
                  "type": "string"
                }
              },
              "required": [
                "every"
              ],
              "additionalProperties": true
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "at"
                  ]
                },
                "at": {
                  "type": "string"
                }
              },
              "required": [
                "at"
              ],
              "additionalProperties": true
            }
          ]
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "labels": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "createdAt": {
              "type": "number"
            },
            "updatedAt": {
              "type": "number"
            },
            "status": {
              "type": "string",
              "enum": [
                "enabled",
                "paused",
                "error",
                "archived"
              ]
            },
            "enabled": {
              "type": "boolean"
            },
            "schedule": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "at"
                      ]
                    },
                    "at": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "kind",
                    "at"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "every"
                      ]
                    },
                    "intervalMs": {
                      "type": "number"
                    },
                    "anchorAt": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "kind",
                    "intervalMs"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "cron"
                      ]
                    },
                    "expression": {
                      "type": "string"
                    },
                    "timezone": {
                      "type": "string"
                    },
                    "staggerMs": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "kind",
                    "expression"
                  ],
                  "additionalProperties": false
                }
              ]
            },
            "execution": {
              "type": "object",
              "properties": {
                "prompt": {
                  "type": "string"
                },
                "template": {
                  "type": "string"
                },
                "target": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "isolated",
                        "current",
                        "pinned",
                        "background",
                        "main",
                        "session",
                        "route"
                      ]
                    },
                    "sessionId": {
                      "type": "string"
                    },
                    "routeId": {
                      "type": "string"
                    },
                    "threadId": {
                      "type": "string"
                    },
                    "channelId": {
                      "type": "string"
                    },
                    "surfaceKind": {
                      "type": "string",
                      "enum": [
                        "tui",
                        "web",
                        "slack",
                        "discord",
                        "ntfy",
                        "webhook",
                        "homeassistant",
                        "telegram",
                        "google-chat",
                        "signal",
                        "whatsapp",
                        "telephony",
                        "imessage",
                        "msteams",
                        "bluebubbles",
                        "mattermost",
                        "matrix",
                        "service"
                      ]
                    },
                    "pinnedSessionId": {
                      "type": "string"
                    },
                    "preserveThread": {
                      "type": "boolean"
                    },
                    "createIfMissing": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "kind"
                  ],
                  "additionalProperties": false
                },
                "modelProvider": {
                  "type": "string"
                },
                "modelId": {
                  "type": "string"
                },
                "fallbackModels": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "routing": {
                  "type": "object",
                  "properties": {
                    "providerSelection": {
                      "type": "string",
                      "enum": [
                        "inherit-current",
                        "concrete",
                        "synthetic"
                      ]
                    },
                    "providerFailurePolicy": {
                      "type": "string",
                      "enum": [
                        "ordered-fallbacks",
                        "fail"
                      ]
                    },
                    "fallbackModels": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "executionIntent": {
                  "type": "object",
                  "properties": {
                    "riskClass": {
                      "type": "string",
                      "enum": [
                        "safe",
                        "elevated",
                        "dangerous"
                      ]
                    },
                    "requiresApproval": {
                      "type": "boolean"
                    },
                    "networkPolicy": {
                      "type": "string",
                      "enum": [
                        "inherit",
                        "allow",
                        "deny",
                        "scoped"
                      ]
                    },
                    "filesystemPolicy": {
                      "type": "string",
                      "enum": [
                        "inherit",
                        "workspace-write",
                        "read-only",
                        "isolated"
                      ]
                    }
                  },
                  "additionalProperties": false
                },
                "reasoningEffort": {
                  "type": "string",
                  "enum": [
                    "none",
                    "instant",
                    "minimal",
                    "low",
                    "medium",
                    "high",
                    "xhigh",
                    "max"
                  ]
                },
                "thinking": {
                  "type": "string"
                },
                "wakeMode": {
                  "type": "string",
                  "enum": [
                    "next-heartbeat",
                    "now"
                  ]
                },
                "timeoutMs": {
                  "type": "number"
                },
                "maxAttempts": {
                  "type": "number"
                },
                "toolAllowlist": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "autoApprove": {
                  "type": "boolean"
                },
                "sandboxMode": {
                  "type": "string",
                  "enum": [
                    "inherit",
                    "isolate",
                    "off"
                  ]
                },
                "allowUnsafeExternalContent": {
                  "type": "boolean"
                },
                "externalContentSource": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "gmail",
                        "email",
                        "webhook",
                        "api",
                        "browser",
                        "channel_metadata",
                        "web_search",
                        "web_fetch",
                        "slack",
                        "discord",
                        "ntfy",
                        "unknown"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string"
                        },
                        "id": {
                          "type": "string"
                        },
                        "url": {
                          "type": "string"
                        },
                        "routeId": {
                          "type": "string"
                        },
                        "surfaceKind": {
                          "type": "string",
                          "enum": [
                            "tui",
                            "web",
                            "slack",
                            "discord",
                            "ntfy",
                            "webhook",
                            "homeassistant",
                            "telegram",
                            "google-chat",
                            "signal",
                            "whatsapp",
                            "telephony",
                            "imessage",
                            "msteams",
                            "bluebubbles",
                            "mattermost",
                            "matrix",
                            "service"
                          ]
                        },
                        "metadata": {
                          "type": "object",
                          "additionalProperties": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "kind"
                      ],
                      "additionalProperties": false
                    }
                  ]
                },
                "lightContext": {
                  "type": "boolean"
                }
              },
              "required": [
                "target"
              ],
              "additionalProperties": false
            },
            "delivery": {
              "type": "object",
              "properties": {
                "mode": {
                  "type": "string",
                  "enum": [
                    "none",
                    "webhook",
                    "surface",
                    "integration",
                    "link"
                  ]
                },
                "targets": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "none",
                          "webhook",
                          "surface",
                          "integration",
                          "link"
                        ]
                      },
                      "surfaceKind": {
                        "type": "string",
                        "enum": [
                          "tui",
                          "web",
                          "slack",
                          "discord",
                          "ntfy",
                          "webhook",
                          "homeassistant",
                          "telegram",
                          "google-chat",
                          "signal",
                          "whatsapp",
                          "telephony",
                          "imessage",
                          "msteams",
                          "bluebubbles",
                          "mattermost",
                          "matrix",
                          "service"
                        ]
                      },
                      "address": {
                        "type": "string"
                      },
                      "routeId": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind"
                    ],
                    "additionalProperties": false
                  }
                },
                "fallbackTargets": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "none",
                          "webhook",
                          "surface",
                          "integration",
                          "link"
                        ]
                      },
                      "surfaceKind": {
                        "type": "string",
                        "enum": [
                          "tui",
                          "web",
                          "slack",
                          "discord",
                          "ntfy",
                          "webhook",
                          "homeassistant",
                          "telegram",
                          "google-chat",
                          "signal",
                          "whatsapp",
                          "telephony",
                          "imessage",
                          "msteams",
                          "bluebubbles",
                          "mattermost",
                          "matrix",
                          "service"
                        ]
                      },
                      "address": {
                        "type": "string"
                      },
                      "routeId": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind"
                    ],
                    "additionalProperties": false
                  }
                },
                "includeSummary": {
                  "type": "boolean"
                },
                "includeTranscript": {
                  "type": "boolean"
                },
                "includeLinks": {
                  "type": "boolean"
                },
                "replyToRouteId": {
                  "type": "string"
                }
              },
              "required": [
                "mode",
                "targets",
                "fallbackTargets",
                "includeSummary",
                "includeTranscript",
                "includeLinks"
              ],
              "additionalProperties": false
            },
            "failure": {
              "type": "object",
              "properties": {
                "action": {
                  "type": "string",
                  "enum": [
                    "retry",
                    "cooldown",
                    "disable",
                    "dead_letter"
                  ]
                },
                "maxConsecutiveFailures": {
                  "type": "number"
                },
                "cooldownMs": {
                  "type": "number"
                },
                "retryPolicy": {
                  "type": "object",
                  "properties": {
                    "maxAttempts": {
                      "type": "number"
                    },
                    "delayMs": {
                      "type": "number"
                    },
                    "strategy": {
                      "type": "string",
                      "enum": [
                        "fixed",
                        "linear",
                        "exponential"
                      ]
                    },
                    "maxDelayMs": {
                      "type": "number"
                    },
                    "jitterMs": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "maxAttempts",
                    "delayMs",
                    "strategy"
                  ],
                  "additionalProperties": false
                },
                "deadLetterRouteId": {
                  "type": "string"
                },
                "disableAfterFailures": {
                  "type": "boolean"
                },
                "notifyRouteId": {
                  "type": "string"
                }
              },
              "required": [
                "action",
                "maxConsecutiveFailures",
                "cooldownMs",
                "retryPolicy"
              ],
              "additionalProperties": false
            },
            "source": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "schedule",
                    "manual",
                    "hook",
                    "webhook",
                    "surface",
                    "watcher"
                  ]
                },
                "label": {
                  "type": "string"
                },
                "surfaceKind": {
                  "type": "string",
                  "enum": [
                    "tui",
                    "web",
                    "slack",
                    "discord",
                    "ntfy",
                    "webhook",
                    "homeassistant",
                    "telegram",
                    "google-chat",
                    "signal",
                    "whatsapp",
                    "telephony",
                    "imessage",
                    "msteams",
                    "bluebubbles",
                    "mattermost",
                    "matrix",
                    "service"
                  ]
                },
                "routeId": {
                  "type": "string"
                },
                "enabled": {
                  "type": "boolean"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "lastSeenAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "kind",
                "label",
                "enabled",
                "createdAt",
                "updatedAt",
                "metadata"
              ],
              "additionalProperties": true
            },
            "nextRunAt": {
              "type": "number"
            },
            "lastRunAt": {
              "type": "number"
            },
            "lastRunId": {
              "type": "string"
            },
            "runCount": {
              "type": "number"
            },
            "successCount": {
              "type": "number"
            },
            "failureCount": {
              "type": "number"
            },
            "pausedReason": {
              "type": "string"
            },
            "deleteAfterRun": {
              "type": "boolean"
            },
            "archivedAt": {
              "type": "number"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "id",
            "name",
            "labels",
            "createdAt",
            "updatedAt",
            "status",
            "enabled",
            "schedule",
            "execution",
            "delivery",
            "failure",
            "source",
            "runCount",
            "successCount",
            "failureCount",
            "deleteAfterRun"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "automation.schedules.delete",
        "title": "Delete Schedule",
        "description": "Delete a schedule record.",
        "category": "automation",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:automation"
        ],
        "http": {
          "method": "DELETE",
          "path": "/api/automation/schedules/{scheduleId}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "scheduleId": {
              "type": "string"
            }
          },
          "required": [
            "scheduleId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "removed": {
              "type": "boolean"
            },
            "id": {
              "type": "string"
            }
          },
          "required": [
            "removed"
          ],
          "additionalProperties": true
        },
        "dangerous": true,
        "invokable": true
      },
      {
        "id": "automation.schedules.disable",
        "title": "Disable Schedule",
        "description": "Disable a schedule record.",
        "category": "automation",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:automation"
        ],
        "http": {
          "method": "POST",
          "path": "/api/automation/schedules/{scheduleId}/disable"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "scheduleId": {
              "type": "string"
            }
          },
          "required": [
            "scheduleId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "enabled": {
              "type": "boolean"
            }
          },
          "required": [
            "id",
            "enabled"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "automation.schedules.enable",
        "title": "Enable Schedule",
        "description": "Enable a schedule record.",
        "category": "automation",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:automation"
        ],
        "http": {
          "method": "POST",
          "path": "/api/automation/schedules/{scheduleId}/enable"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "scheduleId": {
              "type": "string"
            }
          },
          "required": [
            "scheduleId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "enabled": {
              "type": "boolean"
            }
          },
          "required": [
            "id",
            "enabled"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "automation.schedules.list",
        "title": "List Schedules",
        "description": "Return schedule records.",
        "category": "automation",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:automation"
        ],
        "http": {
          "method": "GET",
          "path": "/api/automation/schedules"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "jobs": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "labels": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "enabled",
                      "paused",
                      "error",
                      "archived"
                    ]
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "schedule": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "at"
                            ]
                          },
                          "at": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "kind",
                          "at"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "every"
                            ]
                          },
                          "intervalMs": {
                            "type": "number"
                          },
                          "anchorAt": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "kind",
                          "intervalMs"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "cron"
                            ]
                          },
                          "expression": {
                            "type": "string"
                          },
                          "timezone": {
                            "type": "string"
                          },
                          "staggerMs": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "kind",
                          "expression"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  "execution": {
                    "type": "object",
                    "properties": {
                      "prompt": {
                        "type": "string"
                      },
                      "template": {
                        "type": "string"
                      },
                      "target": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "isolated",
                              "current",
                              "pinned",
                              "background",
                              "main",
                              "session",
                              "route"
                            ]
                          },
                          "sessionId": {
                            "type": "string"
                          },
                          "routeId": {
                            "type": "string"
                          },
                          "threadId": {
                            "type": "string"
                          },
                          "channelId": {
                            "type": "string"
                          },
                          "surfaceKind": {
                            "type": "string",
                            "enum": [
                              "tui",
                              "web",
                              "slack",
                              "discord",
                              "ntfy",
                              "webhook",
                              "homeassistant",
                              "telegram",
                              "google-chat",
                              "signal",
                              "whatsapp",
                              "telephony",
                              "imessage",
                              "msteams",
                              "bluebubbles",
                              "mattermost",
                              "matrix",
                              "service"
                            ]
                          },
                          "pinnedSessionId": {
                            "type": "string"
                          },
                          "preserveThread": {
                            "type": "boolean"
                          },
                          "createIfMissing": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "kind"
                        ],
                        "additionalProperties": false
                      },
                      "modelProvider": {
                        "type": "string"
                      },
                      "modelId": {
                        "type": "string"
                      },
                      "fallbackModels": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "routing": {
                        "type": "object",
                        "properties": {
                          "providerSelection": {
                            "type": "string",
                            "enum": [
                              "inherit-current",
                              "concrete",
                              "synthetic"
                            ]
                          },
                          "providerFailurePolicy": {
                            "type": "string",
                            "enum": [
                              "ordered-fallbacks",
                              "fail"
                            ]
                          },
                          "fallbackModels": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "additionalProperties": false
                      },
                      "executionIntent": {
                        "type": "object",
                        "properties": {
                          "riskClass": {
                            "type": "string",
                            "enum": [
                              "safe",
                              "elevated",
                              "dangerous"
                            ]
                          },
                          "requiresApproval": {
                            "type": "boolean"
                          },
                          "networkPolicy": {
                            "type": "string",
                            "enum": [
                              "inherit",
                              "allow",
                              "deny",
                              "scoped"
                            ]
                          },
                          "filesystemPolicy": {
                            "type": "string",
                            "enum": [
                              "inherit",
                              "workspace-write",
                              "read-only",
                              "isolated"
                            ]
                          }
                        },
                        "additionalProperties": false
                      },
                      "reasoningEffort": {
                        "type": "string",
                        "enum": [
                          "none",
                          "instant",
                          "minimal",
                          "low",
                          "medium",
                          "high",
                          "xhigh",
                          "max"
                        ]
                      },
                      "thinking": {
                        "type": "string"
                      },
                      "wakeMode": {
                        "type": "string",
                        "enum": [
                          "next-heartbeat",
                          "now"
                        ]
                      },
                      "timeoutMs": {
                        "type": "number"
                      },
                      "maxAttempts": {
                        "type": "number"
                      },
                      "toolAllowlist": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "autoApprove": {
                        "type": "boolean"
                      },
                      "sandboxMode": {
                        "type": "string",
                        "enum": [
                          "inherit",
                          "isolate",
                          "off"
                        ]
                      },
                      "allowUnsafeExternalContent": {
                        "type": "boolean"
                      },
                      "externalContentSource": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "gmail",
                              "email",
                              "webhook",
                              "api",
                              "browser",
                              "channel_metadata",
                              "web_search",
                              "web_fetch",
                              "slack",
                              "discord",
                              "ntfy",
                              "unknown"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "url": {
                                "type": "string"
                              },
                              "routeId": {
                                "type": "string"
                              },
                              "surfaceKind": {
                                "type": "string",
                                "enum": [
                                  "tui",
                                  "web",
                                  "slack",
                                  "discord",
                                  "ntfy",
                                  "webhook",
                                  "homeassistant",
                                  "telegram",
                                  "google-chat",
                                  "signal",
                                  "whatsapp",
                                  "telephony",
                                  "imessage",
                                  "msteams",
                                  "bluebubbles",
                                  "mattermost",
                                  "matrix",
                                  "service"
                                ]
                              },
                              "metadata": {
                                "type": "object",
                                "additionalProperties": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "boolean"
                                    },
                                    {
                                      "type": "null"
                                    },
                                    {
                                      "type": "object",
                                      "additionalProperties": {}
                                    },
                                    {
                                      "type": "array",
                                      "items": {}
                                    }
                                  ]
                                }
                              }
                            },
                            "required": [
                              "kind"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      },
                      "lightContext": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "target"
                    ],
                    "additionalProperties": false
                  },
                  "delivery": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "none",
                          "webhook",
                          "surface",
                          "integration",
                          "link"
                        ]
                      },
                      "targets": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "none",
                                "webhook",
                                "surface",
                                "integration",
                                "link"
                              ]
                            },
                            "surfaceKind": {
                              "type": "string",
                              "enum": [
                                "tui",
                                "web",
                                "slack",
                                "discord",
                                "ntfy",
                                "webhook",
                                "homeassistant",
                                "telegram",
                                "google-chat",
                                "signal",
                                "whatsapp",
                                "telephony",
                                "imessage",
                                "msteams",
                                "bluebubbles",
                                "mattermost",
                                "matrix",
                                "service"
                              ]
                            },
                            "address": {
                              "type": "string"
                            },
                            "routeId": {
                              "type": "string"
                            },
                            "label": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "fallbackTargets": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "none",
                                "webhook",
                                "surface",
                                "integration",
                                "link"
                              ]
                            },
                            "surfaceKind": {
                              "type": "string",
                              "enum": [
                                "tui",
                                "web",
                                "slack",
                                "discord",
                                "ntfy",
                                "webhook",
                                "homeassistant",
                                "telegram",
                                "google-chat",
                                "signal",
                                "whatsapp",
                                "telephony",
                                "imessage",
                                "msteams",
                                "bluebubbles",
                                "mattermost",
                                "matrix",
                                "service"
                              ]
                            },
                            "address": {
                              "type": "string"
                            },
                            "routeId": {
                              "type": "string"
                            },
                            "label": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "includeSummary": {
                        "type": "boolean"
                      },
                      "includeTranscript": {
                        "type": "boolean"
                      },
                      "includeLinks": {
                        "type": "boolean"
                      },
                      "replyToRouteId": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "mode",
                      "targets",
                      "fallbackTargets",
                      "includeSummary",
                      "includeTranscript",
                      "includeLinks"
                    ],
                    "additionalProperties": false
                  },
                  "failure": {
                    "type": "object",
                    "properties": {
                      "action": {
                        "type": "string",
                        "enum": [
                          "retry",
                          "cooldown",
                          "disable",
                          "dead_letter"
                        ]
                      },
                      "maxConsecutiveFailures": {
                        "type": "number"
                      },
                      "cooldownMs": {
                        "type": "number"
                      },
                      "retryPolicy": {
                        "type": "object",
                        "properties": {
                          "maxAttempts": {
                            "type": "number"
                          },
                          "delayMs": {
                            "type": "number"
                          },
                          "strategy": {
                            "type": "string",
                            "enum": [
                              "fixed",
                              "linear",
                              "exponential"
                            ]
                          },
                          "maxDelayMs": {
                            "type": "number"
                          },
                          "jitterMs": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "maxAttempts",
                          "delayMs",
                          "strategy"
                        ],
                        "additionalProperties": false
                      },
                      "deadLetterRouteId": {
                        "type": "string"
                      },
                      "disableAfterFailures": {
                        "type": "boolean"
                      },
                      "notifyRouteId": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "action",
                      "maxConsecutiveFailures",
                      "cooldownMs",
                      "retryPolicy"
                    ],
                    "additionalProperties": false
                  },
                  "source": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "schedule",
                          "manual",
                          "hook",
                          "webhook",
                          "surface",
                          "watcher"
                        ]
                      },
                      "label": {
                        "type": "string"
                      },
                      "surfaceKind": {
                        "type": "string",
                        "enum": [
                          "tui",
                          "web",
                          "slack",
                          "discord",
                          "ntfy",
                          "webhook",
                          "homeassistant",
                          "telegram",
                          "google-chat",
                          "signal",
                          "whatsapp",
                          "telephony",
                          "imessage",
                          "msteams",
                          "bluebubbles",
                          "mattermost",
                          "matrix",
                          "service"
                        ]
                      },
                      "routeId": {
                        "type": "string"
                      },
                      "enabled": {
                        "type": "boolean"
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "updatedAt": {
                        "type": "number"
                      },
                      "lastSeenAt": {
                        "type": "number"
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "id",
                      "kind",
                      "label",
                      "enabled",
                      "createdAt",
                      "updatedAt",
                      "metadata"
                    ],
                    "additionalProperties": true
                  },
                  "nextRunAt": {
                    "type": "number"
                  },
                  "lastRunAt": {
                    "type": "number"
                  },
                  "lastRunId": {
                    "type": "string"
                  },
                  "runCount": {
                    "type": "number"
                  },
                  "successCount": {
                    "type": "number"
                  },
                  "failureCount": {
                    "type": "number"
                  },
                  "pausedReason": {
                    "type": "string"
                  },
                  "deleteAfterRun": {
                    "type": "boolean"
                  },
                  "archivedAt": {
                    "type": "number"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "name",
                  "labels",
                  "createdAt",
                  "updatedAt",
                  "status",
                  "enabled",
                  "schedule",
                  "execution",
                  "delivery",
                  "failure",
                  "source",
                  "runCount",
                  "successCount",
                  "failureCount",
                  "deleteAfterRun"
                ],
                "additionalProperties": true
              }
            },
            "runs": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "jobId": {
                    "type": "string"
                  },
                  "labels": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "queued",
                      "running",
                      "completed",
                      "failed",
                      "cancelled",
                      "missed"
                    ]
                  },
                  "agentId": {
                    "type": "string"
                  },
                  "triggeredBy": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "schedule",
                          "manual",
                          "hook",
                          "webhook",
                          "surface",
                          "watcher"
                        ]
                      },
                      "label": {
                        "type": "string"
                      },
                      "surfaceKind": {
                        "type": "string",
                        "enum": [
                          "tui",
                          "web",
                          "slack",
                          "discord",
                          "ntfy",
                          "webhook",
                          "homeassistant",
                          "telegram",
                          "google-chat",
                          "signal",
                          "whatsapp",
                          "telephony",
                          "imessage",
                          "msteams",
                          "bluebubbles",
                          "mattermost",
                          "matrix",
                          "service"
                        ]
                      },
                      "routeId": {
                        "type": "string"
                      },
                      "enabled": {
                        "type": "boolean"
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "updatedAt": {
                        "type": "number"
                      },
                      "lastSeenAt": {
                        "type": "number"
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "id",
                      "kind",
                      "label",
                      "enabled",
                      "createdAt",
                      "updatedAt",
                      "metadata"
                    ],
                    "additionalProperties": true
                  },
                  "target": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "isolated",
                          "current",
                          "pinned",
                          "background",
                          "main",
                          "session",
                          "route"
                        ]
                      },
                      "sessionId": {
                        "type": "string"
                      },
                      "routeId": {
                        "type": "string"
                      },
                      "threadId": {
                        "type": "string"
                      },
                      "channelId": {
                        "type": "string"
                      },
                      "surfaceKind": {
                        "type": "string",
                        "enum": [
                          "tui",
                          "web",
                          "slack",
                          "discord",
                          "ntfy",
                          "webhook",
                          "homeassistant",
                          "telegram",
                          "google-chat",
                          "signal",
                          "whatsapp",
                          "telephony",
                          "imessage",
                          "msteams",
                          "bluebubbles",
                          "mattermost",
                          "matrix",
                          "service"
                        ]
                      },
                      "pinnedSessionId": {
                        "type": "string"
                      },
                      "preserveThread": {
                        "type": "boolean"
                      },
                      "createIfMissing": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "kind"
                    ],
                    "additionalProperties": false
                  },
                  "execution": {
                    "type": "object",
                    "properties": {
                      "prompt": {
                        "type": "string"
                      },
                      "template": {
                        "type": "string"
                      },
                      "target": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "isolated",
                              "current",
                              "pinned",
                              "background",
                              "main",
                              "session",
                              "route"
                            ]
                          },
                          "sessionId": {
                            "type": "string"
                          },
                          "routeId": {
                            "type": "string"
                          },
                          "threadId": {
                            "type": "string"
                          },
                          "channelId": {
                            "type": "string"
                          },
                          "surfaceKind": {
                            "type": "string",
                            "enum": [
                              "tui",
                              "web",
                              "slack",
                              "discord",
                              "ntfy",
                              "webhook",
                              "homeassistant",
                              "telegram",
                              "google-chat",
                              "signal",
                              "whatsapp",
                              "telephony",
                              "imessage",
                              "msteams",
                              "bluebubbles",
                              "mattermost",
                              "matrix",
                              "service"
                            ]
                          },
                          "pinnedSessionId": {
                            "type": "string"
                          },
                          "preserveThread": {
                            "type": "boolean"
                          },
                          "createIfMissing": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "kind"
                        ],
                        "additionalProperties": false
                      },
                      "modelProvider": {
                        "type": "string"
                      },
                      "modelId": {
                        "type": "string"
                      },
                      "fallbackModels": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "routing": {
                        "type": "object",
                        "properties": {
                          "providerSelection": {
                            "type": "string",
                            "enum": [
                              "inherit-current",
                              "concrete",
                              "synthetic"
                            ]
                          },
                          "providerFailurePolicy": {
                            "type": "string",
                            "enum": [
                              "ordered-fallbacks",
                              "fail"
                            ]
                          },
                          "fallbackModels": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "additionalProperties": false
                      },
                      "executionIntent": {
                        "type": "object",
                        "properties": {
                          "riskClass": {
                            "type": "string",
                            "enum": [
                              "safe",
                              "elevated",
                              "dangerous"
                            ]
                          },
                          "requiresApproval": {
                            "type": "boolean"
                          },
                          "networkPolicy": {
                            "type": "string",
                            "enum": [
                              "inherit",
                              "allow",
                              "deny",
                              "scoped"
                            ]
                          },
                          "filesystemPolicy": {
                            "type": "string",
                            "enum": [
                              "inherit",
                              "workspace-write",
                              "read-only",
                              "isolated"
                            ]
                          }
                        },
                        "additionalProperties": false
                      },
                      "reasoningEffort": {
                        "type": "string",
                        "enum": [
                          "none",
                          "instant",
                          "minimal",
                          "low",
                          "medium",
                          "high",
                          "xhigh",
                          "max"
                        ]
                      },
                      "thinking": {
                        "type": "string"
                      },
                      "wakeMode": {
                        "type": "string",
                        "enum": [
                          "next-heartbeat",
                          "now"
                        ]
                      },
                      "timeoutMs": {
                        "type": "number"
                      },
                      "maxAttempts": {
                        "type": "number"
                      },
                      "toolAllowlist": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "autoApprove": {
                        "type": "boolean"
                      },
                      "sandboxMode": {
                        "type": "string",
                        "enum": [
                          "inherit",
                          "isolate",
                          "off"
                        ]
                      },
                      "allowUnsafeExternalContent": {
                        "type": "boolean"
                      },
                      "externalContentSource": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "gmail",
                              "email",
                              "webhook",
                              "api",
                              "browser",
                              "channel_metadata",
                              "web_search",
                              "web_fetch",
                              "slack",
                              "discord",
                              "ntfy",
                              "unknown"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "url": {
                                "type": "string"
                              },
                              "routeId": {
                                "type": "string"
                              },
                              "surfaceKind": {
                                "type": "string",
                                "enum": [
                                  "tui",
                                  "web",
                                  "slack",
                                  "discord",
                                  "ntfy",
                                  "webhook",
                                  "homeassistant",
                                  "telegram",
                                  "google-chat",
                                  "signal",
                                  "whatsapp",
                                  "telephony",
                                  "imessage",
                                  "msteams",
                                  "bluebubbles",
                                  "mattermost",
                                  "matrix",
                                  "service"
                                ]
                              },
                              "metadata": {
                                "type": "object",
                                "additionalProperties": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "boolean"
                                    },
                                    {
                                      "type": "null"
                                    },
                                    {
                                      "type": "object",
                                      "additionalProperties": {}
                                    },
                                    {
                                      "type": "array",
                                      "items": {}
                                    }
                                  ]
                                }
                              }
                            },
                            "required": [
                              "kind"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      },
                      "lightContext": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "target"
                    ],
                    "additionalProperties": false
                  },
                  "scheduleKind": {
                    "type": "string",
                    "enum": [
                      "at",
                      "every",
                      "cron"
                    ]
                  },
                  "queuedAt": {
                    "type": "number"
                  },
                  "startedAt": {
                    "type": "number"
                  },
                  "endedAt": {
                    "type": "number"
                  },
                  "durationMs": {
                    "type": "number"
                  },
                  "forceRun": {
                    "type": "boolean"
                  },
                  "dueRun": {
                    "type": "boolean"
                  },
                  "attempt": {
                    "type": "number"
                  },
                  "sessionId": {
                    "type": "string"
                  },
                  "routeId": {
                    "type": "string"
                  },
                  "route": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "session",
                          "thread",
                          "channel",
                          "message"
                        ]
                      },
                      "surfaceKind": {
                        "type": "string",
                        "enum": [
                          "tui",
                          "web",
                          "slack",
                          "discord",
                          "ntfy",
                          "webhook",
                          "homeassistant",
                          "telegram",
                          "google-chat",
                          "signal",
                          "whatsapp",
                          "telephony",
                          "imessage",
                          "msteams",
                          "bluebubbles",
                          "mattermost",
                          "matrix",
                          "service"
                        ]
                      },
                      "surfaceId": {
                        "type": "string"
                      },
                      "externalId": {
                        "type": "string"
                      },
                      "sessionPolicy": {
                        "type": "string",
                        "enum": [
                          "create-or-bind",
                          "continue-existing",
                          "require-existing"
                        ]
                      },
                      "threadPolicy": {
                        "type": "string",
                        "enum": [
                          "preserve",
                          "replace",
                          "detached"
                        ]
                      },
                      "deliveryGuarantee": {
                        "type": "string",
                        "enum": [
                          "best-effort",
                          "at-least-once"
                        ]
                      },
                      "threadId": {
                        "type": "string"
                      },
                      "channelId": {
                        "type": "string"
                      },
                      "sessionId": {
                        "type": "string"
                      },
                      "jobId": {
                        "type": "string"
                      },
                      "runId": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "lastSeenAt": {
                        "type": "number"
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "updatedAt": {
                        "type": "number"
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "id",
                      "kind",
                      "surfaceKind",
                      "surfaceId",
                      "externalId",
                      "lastSeenAt",
                      "createdAt",
                      "updatedAt",
                      "metadata"
                    ],
                    "additionalProperties": true
                  },
                  "continuationMode": {
                    "type": "string",
                    "enum": [
                      "spawn",
                      "shared-session",
                      "continued-live",
                      "background"
                    ]
                  },
                  "executionIntent": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "spawn",
                          "shared-session",
                          "continued-live",
                          "background"
                        ]
                      },
                      "targetKind": {
                        "type": "string",
                        "enum": [
                          "isolated",
                          "current",
                          "pinned",
                          "background",
                          "main",
                          "session",
                          "route"
                        ]
                      }
                    },
                    "required": [
                      "mode",
                      "targetKind"
                    ],
                    "additionalProperties": false
                  },
                  "deliveryIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "deliveryAttempts": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "runId": {
                          "type": "string"
                        },
                        "jobId": {
                          "type": "string"
                        },
                        "target": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "none",
                                "webhook",
                                "surface",
                                "integration",
                                "link"
                              ]
                            },
                            "surfaceKind": {
                              "type": "string",
                              "enum": [
                                "tui",
                                "web",
                                "slack",
                                "discord",
                                "ntfy",
                                "webhook",
                                "homeassistant",
                                "telegram",
                                "google-chat",
                                "signal",
                                "whatsapp",
                                "telephony",
                                "imessage",
                                "msteams",
                                "bluebubbles",
                                "mattermost",
                                "matrix",
                                "service"
                              ]
                            },
                            "address": {
                              "type": "string"
                            },
                            "routeId": {
                              "type": "string"
                            },
                            "label": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind"
                          ],
                          "additionalProperties": false
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "sending",
                            "sent",
                            "failed",
                            "dead_lettered"
                          ]
                        },
                        "startedAt": {
                          "type": "number"
                        },
                        "endedAt": {
                          "type": "number"
                        },
                        "error": {
                          "type": "string"
                        },
                        "responseId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "runId",
                        "jobId",
                        "target",
                        "status"
                      ],
                      "additionalProperties": true
                    }
                  },
                  "modelId": {
                    "type": "string"
                  },
                  "providerId": {
                    "type": "string"
                  },
                  "telemetry": {
                    "type": "object",
                    "properties": {
                      "usage": {
                        "type": "object",
                        "properties": {
                          "inputTokens": {
                            "type": "number"
                          },
                          "outputTokens": {
                            "type": "number"
                          },
                          "cacheReadTokens": {
                            "type": "number"
                          },
                          "cacheWriteTokens": {
                            "type": "number"
                          },
                          "reasoningTokens": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "inputTokens",
                          "outputTokens",
                          "cacheReadTokens",
                          "cacheWriteTokens"
                        ],
                        "additionalProperties": false
                      },
                      "llmCallCount": {
                        "type": "number"
                      },
                      "toolCallCount": {
                        "type": "number"
                      },
                      "turnCount": {
                        "type": "number"
                      },
                      "modelId": {
                        "type": "string"
                      },
                      "providerId": {
                        "type": "string"
                      },
                      "reasoningSummaryPresent": {
                        "type": "boolean"
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "local-agent",
                          "shared-session",
                          "remote-node",
                          "remote-device"
                        ]
                      }
                    },
                    "required": [
                      "usage"
                    ],
                    "additionalProperties": true
                  },
                  "result": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  },
                  "error": {
                    "type": "string"
                  },
                  "cancelledReason": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "jobId",
                  "labels",
                  "createdAt",
                  "updatedAt",
                  "status",
                  "triggeredBy",
                  "target",
                  "execution",
                  "queuedAt",
                  "forceRun",
                  "dueRun",
                  "attempt",
                  "deliveryIds"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "jobs",
            "runs"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "automation.schedules.run",
        "title": "Run Schedule Now",
        "description": "Trigger a schedule immediately.",
        "category": "automation",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:automation"
        ],
        "http": {
          "method": "POST",
          "path": "/api/automation/schedules/{scheduleId}/run"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "scheduleId": {
              "type": "string"
            }
          },
          "required": [
            "scheduleId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "jobId": {
              "type": "string"
            },
            "runId": {
              "type": "string"
            },
            "agentId": {
              "type": "string"
            },
            "status": {
              "type": "string"
            }
          },
          "required": [
            "jobId",
            "runId",
            "status"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "browser.click",
        "title": "Click Element",
        "description": "Click an element resolved from the latest snapshot of this page. Activating a control that submits a form is an outward effect and is refused when this turn has read untrusted page content.",
        "category": "browser",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:browser"
        ],
        "http": {
          "method": "POST",
          "path": "/api/browser/click"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "pageId": {
              "type": "string"
            },
            "ref": {
              "type": "string"
            },
            "button": {
              "type": "string"
            },
            "clickCount": {
              "type": "number"
            },
            "timeoutMs": {
              "type": "number"
            }
          },
          "required": [
            "ref"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "pageId": {
              "type": "string"
            },
            "url": {
              "type": "string"
            },
            "clicked": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {},
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "urlBefore": {
              "type": "string"
            },
            "navigated": {
              "type": "boolean"
            },
            "next": {
              "type": "string"
            }
          },
          "required": [
            "sessionId",
            "pageId"
          ],
          "additionalProperties": true
        },
        "dangerous": true,
        "invokable": true
      },
      {
        "id": "browser.extract",
        "title": "Extract Page Data",
        "description": "Read named fields out of elements matched by a snapshot ref or a CSS selector. The function that runs in the page is fixed and ships in the engine; there is no way to express code here. Password input values are never returned.",
        "category": "browser",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:browser"
        ],
        "http": {
          "method": "POST",
          "path": "/api/browser/extract"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "pageId": {
              "type": "string"
            },
            "ref": {
              "type": "string"
            },
            "selector": {
              "type": "string"
            },
            "fields": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "all": {
              "type": "boolean"
            },
            "limit": {
              "type": "number"
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "pageId": {
              "type": "string"
            },
            "url": {
              "type": "string"
            },
            "matched": {
              "type": "number"
            },
            "returned": {
              "type": "number"
            },
            "note": {
              "type": "string"
            },
            "data": {
              "type": "object",
              "properties": {
                "trust": {
                  "type": "string"
                },
                "surface": {
                  "type": "string"
                },
                "origin": {
                  "type": "string"
                },
                "retrievedAt": {
                  "type": "string"
                },
                "text": {
                  "type": "string"
                },
                "truncated": {
                  "type": "boolean"
                },
                "rule": {
                  "type": "string"
                }
              },
              "required": [
                "trust",
                "surface",
                "origin",
                "retrievedAt",
                "text",
                "truncated",
                "rule"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "sessionId",
            "pageId"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "browser.history.back",
        "title": "Go Back",
        "description": "Move the page back one entry in its history.",
        "category": "browser",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:browser"
        ],
        "http": {
          "method": "POST",
          "path": "/api/browser/history/back"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "pageId": {
              "type": "string"
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "pageId": {
              "type": "string"
            },
            "url": {
              "type": "string"
            },
            "moved": {
              "type": "boolean"
            }
          },
          "required": [
            "sessionId",
            "pageId"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "browser.history.forward",
        "title": "Go Forward",
        "description": "Move the page forward one entry in its history.",
        "category": "browser",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:browser"
        ],
        "http": {
          "method": "POST",
          "path": "/api/browser/history/forward"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "pageId": {
              "type": "string"
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "pageId": {
              "type": "string"
            },
            "url": {
              "type": "string"
            },
            "moved": {
              "type": "boolean"
            }
          },
          "required": [
            "sessionId",
            "pageId"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "browser.navigate",
        "title": "Navigate",
        "description": "Load a URL, opening a session first if none is open. http, https, file and about schemes only; a javascript: URL is refused because it runs script against whatever page is already loaded.",
        "category": "browser",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:browser"
        ],
        "http": {
          "method": "POST",
          "path": "/api/browser/navigate"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "pageId": {
              "type": "string"
            },
            "url": {
              "type": "string"
            },
            "waitUntil": {
              "type": "string"
            },
            "timeoutMs": {
              "type": "number"
            },
            "profileName": {
              "type": "string"
            },
            "headless": {
              "type": "boolean"
            }
          },
          "required": [
            "url"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "pageId": {
              "type": "string"
            },
            "url": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "httpStatus": {
              "type": "number"
            },
            "setup": {
              "type": "string"
            },
            "next": {
              "type": "string"
            }
          },
          "required": [
            "sessionId",
            "pageId"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "browser.press",
        "title": "Press Key",
        "description": "Send one key to an element resolved from the latest snapshot. Enter is treated as a form submission and is an outward effect.",
        "category": "browser",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:browser"
        ],
        "http": {
          "method": "POST",
          "path": "/api/browser/press"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "pageId": {
              "type": "string"
            },
            "ref": {
              "type": "string"
            },
            "key": {
              "type": "string"
            },
            "timeoutMs": {
              "type": "number"
            }
          },
          "required": [
            "ref",
            "key"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "pageId": {
              "type": "string"
            },
            "url": {
              "type": "string"
            },
            "pressed": {
              "type": "string"
            },
            "on": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {},
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "sessionId",
            "pageId"
          ],
          "additionalProperties": true
        },
        "dangerous": true,
        "invokable": true
      },
      {
        "id": "browser.provision",
        "title": "Provision Browser",
        "description": "Install the browser driver and binary this machine needs, reporting each step it actually ran. Slow on a clean machine; every other verb provisions on demand.",
        "category": "browser",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:browser"
        ],
        "http": {
          "method": "POST",
          "path": "/api/browser/provision"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "repair": {
              "type": "boolean"
            },
            "allowDownload": {
              "type": "boolean"
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "provision": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {},
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "provision"
          ],
          "additionalProperties": true
        },
        "dangerous": true,
        "invokable": true
      },
      {
        "id": "browser.readText",
        "title": "Read Page Text",
        "description": "Read the page as text, including open shadow roots and embedded frames, each frame origin recorded separately. Returns the text inside an untrusted-content envelope.",
        "category": "browser",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:browser"
        ],
        "http": {
          "method": "POST",
          "path": "/api/browser/read-text"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "pageId": {
              "type": "string"
            },
            "maxChars": {
              "type": "number"
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "pageId": {
              "type": "string"
            },
            "url": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "content": {
              "type": "object",
              "properties": {
                "trust": {
                  "type": "string"
                },
                "surface": {
                  "type": "string"
                },
                "origin": {
                  "type": "string"
                },
                "retrievedAt": {
                  "type": "string"
                },
                "text": {
                  "type": "string"
                },
                "truncated": {
                  "type": "boolean"
                },
                "rule": {
                  "type": "string"
                }
              },
              "required": [
                "trust",
                "surface",
                "origin",
                "retrievedAt",
                "text",
                "truncated",
                "rule"
              ],
              "additionalProperties": false
            },
            "truncated": {
              "type": "boolean"
            }
          },
          "required": [
            "sessionId",
            "pageId"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "browser.screenshot",
        "title": "Screenshot Page",
        "description": "Write a PNG of the visible area or the whole scrollable page and report the exact path written.",
        "category": "browser",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:browser"
        ],
        "http": {
          "method": "POST",
          "path": "/api/browser/screenshot"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "pageId": {
              "type": "string"
            },
            "fullPage": {
              "type": "boolean"
            },
            "path": {
              "type": "string"
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "pageId": {
              "type": "string"
            },
            "url": {
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "bytes": {
              "type": "number"
            },
            "next": {
              "type": "string"
            }
          },
          "required": [
            "sessionId",
            "pageId"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "browser.scroll",
        "title": "Scroll Page",
        "description": "Scroll the page by an amount, or bring a snapshot element into view.",
        "category": "browser",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:browser"
        ],
        "http": {
          "method": "POST",
          "path": "/api/browser/scroll"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "pageId": {
              "type": "string"
            },
            "ref": {
              "type": "string"
            },
            "direction": {
              "type": "string"
            },
            "amount": {
              "type": "number"
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "pageId": {
              "type": "string"
            },
            "url": {
              "type": "string"
            },
            "scrolledBy": {
              "type": "number"
            },
            "scrolledTo": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {},
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "scrollY": {
              "type": "number"
            },
            "scrollHeight": {
              "type": "number"
            }
          },
          "required": [
            "sessionId",
            "pageId"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "browser.select",
        "title": "Select Options",
        "description": "Choose option values in a select element resolved from the latest snapshot.",
        "category": "browser",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:browser"
        ],
        "http": {
          "method": "POST",
          "path": "/api/browser/select"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "pageId": {
              "type": "string"
            },
            "ref": {
              "type": "string"
            },
            "values": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "timeoutMs": {
              "type": "number"
            }
          },
          "required": [
            "ref",
            "values"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "pageId": {
              "type": "string"
            },
            "url": {
              "type": "string"
            },
            "selectedIn": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {},
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "selected": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "sessionId",
            "pageId"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "browser.sessions.attach",
        "title": "Attach To Running Browser",
        "description": "Connect to a browser already running at a remote debugging endpoint. The daemon can drive it but can never close it.",
        "category": "browser",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:browser"
        ],
        "http": {
          "method": "POST",
          "path": "/api/browser/sessions/attach"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "cdpEndpoint": {
              "type": "string"
            }
          },
          "required": [
            "cdpEndpoint"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "session": {
              "type": "object",
              "properties": {
                "sessionId": {
                  "type": "string"
                },
                "origin": {
                  "type": "string"
                },
                "profileDirectory": {
                  "type": "string"
                },
                "cdpEndpoint": {
                  "type": "string"
                },
                "executablePath": {
                  "type": "string"
                },
                "source": {
                  "type": "string"
                },
                "headless": {
                  "type": "boolean"
                },
                "startedAt": {
                  "type": "string"
                },
                "pageCount": {
                  "type": "number"
                },
                "activePageId": {
                  "type": "string"
                },
                "closableByAgent": {
                  "type": "boolean"
                }
              },
              "required": [
                "sessionId",
                "origin",
                "headless",
                "startedAt",
                "pageCount",
                "closableByAgent"
              ],
              "additionalProperties": false
            },
            "pages": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "pageId": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "active": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "pageId",
                  "url",
                  "title",
                  "active"
                ],
                "additionalProperties": false
              }
            },
            "note": {
              "type": "string"
            }
          },
          "required": [
            "session"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "browser.sessions.close",
        "title": "Close Browser Session",
        "description": "End a browser the daemon started. A session attached to a browser the daemon did not start is refused; release it instead.",
        "category": "browser",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:browser"
        ],
        "http": {
          "method": "POST",
          "path": "/api/browser/sessions/close"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "closed": {
              "type": "object",
              "properties": {
                "sessionId": {
                  "type": "string"
                },
                "origin": {
                  "type": "string"
                },
                "profileDirectory": {
                  "type": "string"
                },
                "cdpEndpoint": {
                  "type": "string"
                },
                "executablePath": {
                  "type": "string"
                },
                "source": {
                  "type": "string"
                },
                "headless": {
                  "type": "boolean"
                },
                "startedAt": {
                  "type": "string"
                },
                "pageCount": {
                  "type": "number"
                },
                "activePageId": {
                  "type": "string"
                },
                "closableByAgent": {
                  "type": "boolean"
                }
              },
              "required": [
                "sessionId",
                "origin",
                "headless",
                "startedAt",
                "pageCount",
                "closableByAgent"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "closed"
          ],
          "additionalProperties": true
        },
        "dangerous": true,
        "invokable": true
      },
      {
        "id": "browser.sessions.launch",
        "title": "Launch Browser Session",
        "description": "Start a browser the daemon owns. Pass a profileName to keep sign-ins across runs; headless defaults to true where no display exists.",
        "category": "browser",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:browser"
        ],
        "http": {
          "method": "POST",
          "path": "/api/browser/sessions/launch"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "profileName": {
              "type": "string"
            },
            "headless": {
              "type": "boolean"
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "session": {
              "type": "object",
              "properties": {
                "sessionId": {
                  "type": "string"
                },
                "origin": {
                  "type": "string"
                },
                "profileDirectory": {
                  "type": "string"
                },
                "cdpEndpoint": {
                  "type": "string"
                },
                "executablePath": {
                  "type": "string"
                },
                "source": {
                  "type": "string"
                },
                "headless": {
                  "type": "boolean"
                },
                "startedAt": {
                  "type": "string"
                },
                "pageCount": {
                  "type": "number"
                },
                "activePageId": {
                  "type": "string"
                },
                "closableByAgent": {
                  "type": "boolean"
                }
              },
              "required": [
                "sessionId",
                "origin",
                "headless",
                "startedAt",
                "pageCount",
                "closableByAgent"
              ],
              "additionalProperties": false
            },
            "setup": {
              "type": "string"
            },
            "note": {
              "type": "string"
            }
          },
          "required": [
            "session"
          ],
          "additionalProperties": true
        },
        "dangerous": true,
        "invokable": true
      },
      {
        "id": "browser.sessions.list",
        "title": "List Browser Sessions",
        "description": "Return every open browser session, including whether the daemon started it and may therefore close it.",
        "category": "browser",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:browser"
        ],
        "http": {
          "method": "GET",
          "path": "/api/browser/sessions"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessions": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "sessionId": {
                    "type": "string"
                  },
                  "origin": {
                    "type": "string"
                  },
                  "profileDirectory": {
                    "type": "string"
                  },
                  "cdpEndpoint": {
                    "type": "string"
                  },
                  "executablePath": {
                    "type": "string"
                  },
                  "source": {
                    "type": "string"
                  },
                  "headless": {
                    "type": "boolean"
                  },
                  "startedAt": {
                    "type": "string"
                  },
                  "pageCount": {
                    "type": "number"
                  },
                  "activePageId": {
                    "type": "string"
                  },
                  "closableByAgent": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "sessionId",
                  "origin",
                  "headless",
                  "startedAt",
                  "pageCount",
                  "closableByAgent"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "sessions"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "browser.sessions.release",
        "title": "Release Browser Session",
        "description": "Disconnect from a session and leave the browser running. This is how an attached browser is let go of.",
        "category": "browser",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:browser"
        ],
        "http": {
          "method": "POST",
          "path": "/api/browser/sessions/release"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "released": {
              "type": "object",
              "properties": {
                "sessionId": {
                  "type": "string"
                },
                "origin": {
                  "type": "string"
                },
                "profileDirectory": {
                  "type": "string"
                },
                "cdpEndpoint": {
                  "type": "string"
                },
                "executablePath": {
                  "type": "string"
                },
                "source": {
                  "type": "string"
                },
                "headless": {
                  "type": "boolean"
                },
                "startedAt": {
                  "type": "string"
                },
                "pageCount": {
                  "type": "number"
                },
                "activePageId": {
                  "type": "string"
                },
                "closableByAgent": {
                  "type": "boolean"
                }
              },
              "required": [
                "sessionId",
                "origin",
                "headless",
                "startedAt",
                "pageCount",
                "closableByAgent"
              ],
              "additionalProperties": false
            },
            "note": {
              "type": "string"
            }
          },
          "required": [
            "released"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "browser.snapshot",
        "title": "Snapshot Page",
        "description": "Return addressable element refs for the current page. Element names come from the page, so the result is untrusted content and is labelled as such.",
        "category": "browser",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:browser"
        ],
        "http": {
          "method": "POST",
          "path": "/api/browser/snapshot"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "pageId": {
              "type": "string"
            },
            "limit": {
              "type": "number"
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "pageId": {
              "type": "string"
            },
            "url": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "contentTrust": {
              "type": "string"
            },
            "origin": {
              "type": "string"
            },
            "rule": {
              "type": "string"
            },
            "snapshotId": {
              "type": "string"
            },
            "elementCount": {
              "type": "number"
            },
            "truncated": {
              "type": "boolean"
            },
            "elements": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "ref": {
                    "type": "string"
                  },
                  "role": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "value": {
                    "type": "string"
                  },
                  "disabled": {
                    "type": "boolean"
                  },
                  "checked": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "ref",
                  "role",
                  "name"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "sessionId",
            "pageId"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "browser.status",
        "title": "Browser Status",
        "description": "Report whether a browser is available on this machine, where its binary came from, whether a display exists, and which sessions are open.",
        "category": "browser",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:browser"
        ],
        "http": {
          "method": "GET",
          "path": "/api/browser/status"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "browserAvailable": {
              "type": "boolean"
            },
            "binarySource": {
              "type": "string"
            },
            "executablePath": {
              "type": "string"
            },
            "driverVersion": {
              "type": "string"
            },
            "browsersPath": {
              "type": "string"
            },
            "displayAvailable": {
              "type": "boolean"
            },
            "defaultMode": {
              "type": "string"
            },
            "sessions": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "sessionId": {
                    "type": "string"
                  },
                  "origin": {
                    "type": "string"
                  },
                  "profileDirectory": {
                    "type": "string"
                  },
                  "cdpEndpoint": {
                    "type": "string"
                  },
                  "executablePath": {
                    "type": "string"
                  },
                  "source": {
                    "type": "string"
                  },
                  "headless": {
                    "type": "boolean"
                  },
                  "startedAt": {
                    "type": "string"
                  },
                  "pageCount": {
                    "type": "number"
                  },
                  "activePageId": {
                    "type": "string"
                  },
                  "closableByAgent": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "sessionId",
                  "origin",
                  "headless",
                  "startedAt",
                  "pageCount",
                  "closableByAgent"
                ],
                "additionalProperties": false
              }
            },
            "provisionSteps": {
              "type": "array",
              "items": {
                "type": "object",
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    },
                    {},
                    {
                      "type": "array",
                      "items": {}
                    }
                  ]
                }
              }
            },
            "problem": {
              "type": "string"
            },
            "fix": {
              "type": "string"
            }
          },
          "required": [
            "browserAvailable"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "browser.tabs.close",
        "title": "Close Tab",
        "description": "Close one tab. The browser itself keeps running.",
        "category": "browser",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:browser"
        ],
        "http": {
          "method": "POST",
          "path": "/api/browser/tabs/close"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "pageId": {
              "type": "string"
            }
          },
          "required": [
            "pageId"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "closedPageId": {
              "type": "string"
            },
            "pages": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "pageId": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "active": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "pageId",
                  "url",
                  "title",
                  "active"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "sessionId",
            "closedPageId",
            "pages"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "browser.tabs.create",
        "title": "Open Tab",
        "description": "Open a new tab, optionally at a URL, opening a session first if none is open.",
        "category": "browser",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:browser"
        ],
        "http": {
          "method": "POST",
          "path": "/api/browser/tabs"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "pageId": {
              "type": "string"
            },
            "url": {
              "type": "string"
            },
            "profileName": {
              "type": "string"
            },
            "headless": {
              "type": "boolean"
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "pageId": {
              "type": "string"
            },
            "url": {
              "type": "string"
            },
            "pages": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "pageId": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "active": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "pageId",
                  "url",
                  "title",
                  "active"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "sessionId",
            "pageId"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "browser.tabs.list",
        "title": "List Tabs",
        "description": "Return every open page in a session, with which one is active.",
        "category": "browser",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:browser"
        ],
        "http": {
          "method": "GET",
          "path": "/api/browser/tabs"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "pages": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "pageId": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "active": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "pageId",
                  "url",
                  "title",
                  "active"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "sessionId",
            "pages"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "browser.tabs.switch",
        "title": "Switch Tab",
        "description": "Make another open tab the active one for later page verbs.",
        "category": "browser",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:browser"
        ],
        "http": {
          "method": "POST",
          "path": "/api/browser/tabs/switch"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "pageId": {
              "type": "string"
            }
          },
          "required": [
            "pageId"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "activePageId": {
              "type": "string"
            }
          },
          "required": [
            "sessionId",
            "activePageId"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "browser.type",
        "title": "Type Into Element",
        "description": "Type into an element resolved from the latest snapshot. There is no variant that types into whatever window has focus. submit:true presses Enter afterwards and is an outward effect.",
        "category": "browser",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:browser"
        ],
        "http": {
          "method": "POST",
          "path": "/api/browser/type"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "pageId": {
              "type": "string"
            },
            "ref": {
              "type": "string"
            },
            "text": {
              "type": "string"
            },
            "submit": {
              "type": "boolean"
            },
            "replace": {
              "type": "boolean"
            },
            "timeoutMs": {
              "type": "number"
            }
          },
          "required": [
            "ref",
            "text"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "pageId": {
              "type": "string"
            },
            "url": {
              "type": "string"
            },
            "typedInto": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {},
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "submitted": {
              "type": "boolean"
            }
          },
          "required": [
            "sessionId",
            "pageId"
          ],
          "additionalProperties": true
        },
        "dangerous": true,
        "invokable": true
      },
      {
        "id": "browser.waitFor",
        "title": "Wait For Page State",
        "description": "Wait for text to become visible, for the URL to match, or for the network to settle. The timeout bounds this call only and never ends the browser.",
        "category": "browser",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:browser"
        ],
        "http": {
          "method": "POST",
          "path": "/api/browser/wait-for"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "pageId": {
              "type": "string"
            },
            "text": {
              "type": "string"
            },
            "url": {
              "type": "string"
            },
            "timeoutMs": {
              "type": "number"
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "pageId": {
              "type": "string"
            },
            "url": {
              "type": "string"
            },
            "waitedFor": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {},
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "found": {
              "type": "boolean"
            }
          },
          "required": [
            "sessionId",
            "pageId"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "calendar.events.create",
        "title": "Create Calendar Event",
        "description": "Create an event on the configured CalDAV calendar. Requires explicit confirmation.",
        "category": "calendar",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:calendar"
        ],
        "http": {
          "method": "POST",
          "path": "/api/calendar/events"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "start": {
              "type": "string"
            },
            "end": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "attendees": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "location": {
              "type": "string"
            },
            "calendarId": {
              "type": "string"
            },
            "confirm": {
              "type": "boolean"
            }
          },
          "required": [
            "title",
            "start",
            "end",
            "confirm"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "eventId": {
              "type": "string"
            },
            "uid": {
              "type": "string"
            },
            "createdAt": {
              "type": "string"
            }
          },
          "required": [
            "eventId",
            "uid",
            "createdAt"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "calendar.events.get",
        "title": "Get Calendar Event",
        "description": "Return the full event object including attendees, recurrence, and raw iCalendar UID.",
        "category": "calendar",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:calendar"
        ],
        "http": {
          "method": "GET",
          "path": "/api/calendar/events/{eventId}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "eventId": {
              "type": "string"
            },
            "calendarId": {
              "type": "string"
            }
          },
          "required": [
            "eventId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "uid": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "start": {
              "type": "string"
            },
            "end": {
              "type": "string"
            },
            "location": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "attendees": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "recurrence": {
              "type": "string"
            }
          },
          "required": [
            "id",
            "title",
            "start",
            "end"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "calendar.events.list",
        "title": "List Calendar Events",
        "description": "Return calendar event summaries from the configured CalDAV calendar within an optional time window.",
        "category": "calendar",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:calendar"
        ],
        "http": {
          "method": "GET",
          "path": "/api/calendar/events"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "calendarId": {
              "type": "string"
            },
            "from": {
              "type": "string"
            },
            "to": {
              "type": "string"
            },
            "limit": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "events": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "start": {
                    "type": "string"
                  },
                  "end": {
                    "type": "string"
                  },
                  "location": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "attendees": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "id",
                  "title",
                  "start",
                  "end"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "events"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "calendar.ics.export",
        "title": "Export iCalendar",
        "description": "Export events from the configured CalDAV calendar as raw .ics content within an optional time window.",
        "category": "calendar",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:calendar"
        ],
        "http": {
          "method": "GET",
          "path": "/api/calendar/ics/export"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "calendarId": {
              "type": "string"
            },
            "from": {
              "type": "string"
            },
            "to": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "icsContent": {
              "type": "string"
            },
            "eventCount": {
              "type": "number"
            }
          },
          "required": [
            "icsContent",
            "eventCount"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "calendar.ics.import",
        "title": "Import iCalendar",
        "description": "Import raw .ics content into the configured CalDAV calendar. Requires explicit confirmation.",
        "category": "calendar",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:calendar"
        ],
        "http": {
          "method": "POST",
          "path": "/api/calendar/ics/import"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "icsContent": {
              "type": "string"
            },
            "calendarId": {
              "type": "string"
            },
            "confirm": {
              "type": "boolean"
            }
          },
          "required": [
            "icsContent",
            "confirm"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "imported": {
              "type": "number"
            },
            "eventIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "errors": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "imported",
            "eventIds",
            "errors"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "channels.accounts.action.default",
        "title": "Run Channel Account Action",
        "description": "Run a lifecycle action on the default channel account for a surface.",
        "category": "channels",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:channels"
        ],
        "http": {
          "method": "POST",
          "path": "/api/channels/accounts/{surface}/actions/{action}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "accountId": {
              "type": "string"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "surface": {
              "type": "string"
            },
            "accountId": {
              "type": "string"
            },
            "action": {
              "type": "string"
            },
            "result": {
              "type": "object",
              "properties": {
                "surface": {
                  "type": "string"
                },
                "accountId": {
                  "type": "string"
                },
                "action": {
                  "type": "string"
                },
                "ok": {
                  "type": "boolean"
                },
                "state": {
                  "type": "string"
                },
                "authState": {
                  "type": "string"
                },
                "account": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "surface": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "configured": {
                          "type": "boolean"
                        },
                        "linked": {
                          "type": "boolean"
                        },
                        "state": {
                          "type": "string"
                        },
                        "authState": {
                          "type": "string"
                        },
                        "accountId": {
                          "type": "string"
                        },
                        "workspaceId": {
                          "type": "string"
                        },
                        "secrets": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "field": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "configured": {
                                "type": "boolean"
                              },
                              "source": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "field",
                              "label",
                              "configured",
                              "source"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "actions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "kind": {
                                "type": "string"
                              },
                              "available": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "id",
                              "label",
                              "kind",
                              "available"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "metadata": {
                          "type": "object",
                          "additionalProperties": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "id",
                        "surface",
                        "label",
                        "enabled",
                        "configured",
                        "linked",
                        "state",
                        "authState",
                        "secrets",
                        "actions",
                        "metadata"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "message": {
                  "type": "string"
                },
                "login": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    },
                    "qr": {
                      "type": "string"
                    },
                    "expiresAt": {
                      "type": "number"
                    },
                    "instructions": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "kind"
                  ],
                  "additionalProperties": false
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "surface",
                "action",
                "ok",
                "metadata"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "surface",
            "action",
            "result"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "channels.accounts.action.named",
        "title": "Run Named Channel Account Action",
        "description": "Run a lifecycle action on a specific channel account.",
        "category": "channels",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:channels"
        ],
        "http": {
          "method": "POST",
          "path": "/api/channels/accounts/{surface}/{accountId}/actions/{action}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "accountId": {
              "type": "string"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "surface": {
              "type": "string"
            },
            "accountId": {
              "type": "string"
            },
            "action": {
              "type": "string"
            },
            "result": {
              "type": "object",
              "properties": {
                "surface": {
                  "type": "string"
                },
                "accountId": {
                  "type": "string"
                },
                "action": {
                  "type": "string"
                },
                "ok": {
                  "type": "boolean"
                },
                "state": {
                  "type": "string"
                },
                "authState": {
                  "type": "string"
                },
                "account": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "surface": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "configured": {
                          "type": "boolean"
                        },
                        "linked": {
                          "type": "boolean"
                        },
                        "state": {
                          "type": "string"
                        },
                        "authState": {
                          "type": "string"
                        },
                        "accountId": {
                          "type": "string"
                        },
                        "workspaceId": {
                          "type": "string"
                        },
                        "secrets": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "field": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "configured": {
                                "type": "boolean"
                              },
                              "source": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "field",
                              "label",
                              "configured",
                              "source"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "actions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "kind": {
                                "type": "string"
                              },
                              "available": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "id",
                              "label",
                              "kind",
                              "available"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "metadata": {
                          "type": "object",
                          "additionalProperties": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "id",
                        "surface",
                        "label",
                        "enabled",
                        "configured",
                        "linked",
                        "state",
                        "authState",
                        "secrets",
                        "actions",
                        "metadata"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "message": {
                  "type": "string"
                },
                "login": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    },
                    "qr": {
                      "type": "string"
                    },
                    "expiresAt": {
                      "type": "number"
                    },
                    "instructions": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "kind"
                  ],
                  "additionalProperties": false
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "surface",
                "action",
                "ok",
                "metadata"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "surface",
            "action",
            "result"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "channels.accounts.get",
        "title": "Get Channel Account",
        "description": "Return a single channel account record.",
        "category": "channels",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:channels"
        ],
        "http": {
          "method": "GET",
          "path": "/api/channels/accounts/{surface}/{accountId}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "surface": {
              "type": "string"
            },
            "accountId": {
              "type": "string"
            }
          },
          "required": [
            "surface",
            "accountId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "surface": {
              "type": "string"
            },
            "label": {
              "type": "string"
            },
            "enabled": {
              "type": "boolean"
            },
            "configured": {
              "type": "boolean"
            },
            "linked": {
              "type": "boolean"
            },
            "state": {
              "type": "string"
            },
            "authState": {
              "type": "string"
            },
            "accountId": {
              "type": "string"
            },
            "workspaceId": {
              "type": "string"
            },
            "secrets": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "field": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "configured": {
                    "type": "boolean"
                  },
                  "source": {
                    "type": "string"
                  }
                },
                "required": [
                  "field",
                  "label",
                  "configured",
                  "source"
                ],
                "additionalProperties": false
              }
            },
            "actions": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string"
                  },
                  "available": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "id",
                  "label",
                  "kind",
                  "available"
                ],
                "additionalProperties": false
              }
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "id",
            "surface",
            "label",
            "enabled",
            "configured",
            "linked",
            "state",
            "authState",
            "secrets",
            "actions",
            "metadata"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "channels.accounts.list",
        "title": "List Channel Accounts",
        "description": "Return channel account lifecycle posture.",
        "category": "channels",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:channels"
        ],
        "http": {
          "method": "GET",
          "path": "/api/channels/accounts"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "accounts": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "surface": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "configured": {
                    "type": "boolean"
                  },
                  "linked": {
                    "type": "boolean"
                  },
                  "state": {
                    "type": "string"
                  },
                  "authState": {
                    "type": "string"
                  },
                  "accountId": {
                    "type": "string"
                  },
                  "workspaceId": {
                    "type": "string"
                  },
                  "secrets": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "field": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "configured": {
                          "type": "boolean"
                        },
                        "source": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "field",
                        "label",
                        "configured",
                        "source"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "actions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "kind": {
                          "type": "string"
                        },
                        "available": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "id",
                        "label",
                        "kind",
                        "available"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "surface",
                  "label",
                  "enabled",
                  "configured",
                  "linked",
                  "state",
                  "authState",
                  "secrets",
                  "actions",
                  "metadata"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "accounts"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "channels.accounts.surface.list",
        "title": "List Channel Surface Accounts",
        "description": "Return account posture for a single channel surface.",
        "category": "channels",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:channels"
        ],
        "http": {
          "method": "GET",
          "path": "/api/channels/accounts/{surface}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "surface": {
              "type": "string"
            }
          },
          "required": [
            "surface"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "accounts": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "surface": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "configured": {
                    "type": "boolean"
                  },
                  "linked": {
                    "type": "boolean"
                  },
                  "state": {
                    "type": "string"
                  },
                  "authState": {
                    "type": "string"
                  },
                  "accountId": {
                    "type": "string"
                  },
                  "workspaceId": {
                    "type": "string"
                  },
                  "secrets": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "field": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "configured": {
                          "type": "boolean"
                        },
                        "source": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "field",
                        "label",
                        "configured",
                        "source"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "actions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "kind": {
                          "type": "string"
                        },
                        "available": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "id",
                        "label",
                        "kind",
                        "available"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "surface",
                  "label",
                  "enabled",
                  "configured",
                  "linked",
                  "state",
                  "authState",
                  "secrets",
                  "actions",
                  "metadata"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "accounts"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "channels.actions.invoke",
        "title": "Run Channel Action",
        "description": "Run a channel-owned operator action.",
        "category": "channels",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:channels"
        ],
        "http": {
          "method": "POST",
          "path": "/api/channels/actions/{surface}/{actionId}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "accountId": {
              "type": "string"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "actionId": {
              "type": "string"
            },
            "surface": {
              "type": "string"
            },
            "result": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "actionId",
            "surface",
            "result"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "channels.actions.list",
        "title": "List Channel Actions",
        "description": "Return operator actions registered by channel plugins.",
        "category": "channels",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:channels"
        ],
        "http": {
          "method": "GET",
          "path": "/api/channels/actions"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "actions": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "surface": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "dangerous": {
                    "type": "boolean"
                  },
                  "inputSchema": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "surface",
                  "label",
                  "description",
                  "dangerous",
                  "metadata"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "actions"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "channels.actions.surface.list",
        "title": "List Channel Surface Actions",
        "description": "Return operator actions for a single channel surface.",
        "category": "channels",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:channels"
        ],
        "http": {
          "method": "GET",
          "path": "/api/channels/actions/{surface}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "surface": {
              "type": "string"
            }
          },
          "required": [
            "surface"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "actions": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "surface": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "dangerous": {
                    "type": "boolean"
                  },
                  "inputSchema": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "surface",
                  "label",
                  "description",
                  "dangerous",
                  "metadata"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "actions"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "channels.agent_tools.list",
        "title": "List Channel Agent Tools",
        "description": "Return LLM agent tools exposed through channel plugins.",
        "category": "channels",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:channels"
        ],
        "http": {
          "method": "GET",
          "path": "/api/channels/agent-tools"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "tools": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "parameters": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "sideEffects": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "concurrency": {
                    "type": "string"
                  },
                  "supportsProgress": {
                    "type": "boolean"
                  },
                  "supportsStreamingOutput": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "description",
                  "parameters"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "tools"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "channels.agent_tools.surface.list",
        "title": "List Channel Surface Agent Tools",
        "description": "Return LLM agent tools for a single channel surface.",
        "category": "channels",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:channels"
        ],
        "http": {
          "method": "GET",
          "path": "/api/channels/agent-tools/{surface}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "surface": {
              "type": "string"
            }
          },
          "required": [
            "surface"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "tools": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "parameters": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "sideEffects": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "concurrency": {
                    "type": "string"
                  },
                  "supportsProgress": {
                    "type": "boolean"
                  },
                  "supportsStreamingOutput": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "description",
                  "parameters"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "tools"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "channels.allowlist.edit",
        "title": "Edit Channel Allowlist",
        "description": "Apply allowlist additions or removals for a channel surface.",
        "category": "channels",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:channels"
        ],
        "http": {
          "method": "POST",
          "path": "/api/channels/allowlist/{surface}/edit"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "add": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "remove": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "groupId": {
              "type": "string"
            },
            "channelId": {
              "type": "string"
            },
            "workspaceId": {
              "type": "string"
            },
            "kind": {
              "type": "string"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "surface": {
              "type": "string"
            },
            "updatedPolicy": {
              "type": "object",
              "properties": {
                "surface": {
                  "type": "string"
                },
                "enabled": {
                  "type": "boolean"
                },
                "requireMention": {
                  "type": "boolean"
                },
                "allowDirectMessages": {
                  "type": "boolean"
                },
                "allowGroupMessages": {
                  "type": "boolean"
                },
                "allowThreadMessages": {
                  "type": "boolean"
                },
                "dmPolicy": {
                  "type": "string"
                },
                "groupPolicy": {
                  "type": "string"
                },
                "allowTextCommandsWithoutMention": {
                  "type": "boolean"
                },
                "allowlistUserIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "allowlistChannelIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "allowlistGroupIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "allowedCommands": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "groupPolicies": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      },
                      "groupId": {
                        "type": "string"
                      },
                      "channelId": {
                        "type": "string"
                      },
                      "workspaceId": {
                        "type": "string"
                      },
                      "requireMention": {
                        "type": "boolean"
                      },
                      "allowGroupMessages": {
                        "type": "boolean"
                      },
                      "allowThreadMessages": {
                        "type": "boolean"
                      },
                      "allowTextCommandsWithoutMention": {
                        "type": "boolean"
                      },
                      "allowlistUserIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "allowlistChannelIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "allowlistGroupIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "allowedCommands": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "additionalProperties": false
                  }
                },
                "updatedAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "surface",
                "enabled",
                "requireMention",
                "allowDirectMessages",
                "allowGroupMessages",
                "allowThreadMessages",
                "dmPolicy",
                "groupPolicy",
                "allowTextCommandsWithoutMention",
                "allowlistUserIds",
                "allowlistChannelIds",
                "allowlistGroupIds",
                "allowedCommands",
                "groupPolicies",
                "updatedAt",
                "metadata"
              ],
              "additionalProperties": false
            },
            "resolution": {
              "type": "object",
              "properties": {
                "surface": {
                  "type": "string"
                },
                "resolved": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string"
                      },
                      "input": {
                        "type": "string"
                      },
                      "id": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "kind",
                      "input",
                      "id",
                      "label",
                      "metadata"
                    ],
                    "additionalProperties": false
                  }
                },
                "unresolved": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "surface",
                "resolved",
                "unresolved",
                "metadata"
              ],
              "additionalProperties": false
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "surface",
            "updatedPolicy",
            "resolution",
            "metadata"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "channels.allowlist.resolve",
        "title": "Resolve Channel Allowlist",
        "description": "Resolve allowlist candidates into stable channel identities.",
        "category": "channels",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:channels"
        ],
        "http": {
          "method": "POST",
          "path": "/api/channels/allowlist/{surface}/resolve"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "add": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "remove": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "groupId": {
              "type": "string"
            },
            "channelId": {
              "type": "string"
            },
            "workspaceId": {
              "type": "string"
            },
            "kind": {
              "type": "string"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "surface": {
              "type": "string"
            },
            "resolved": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string"
                  },
                  "input": {
                    "type": "string"
                  },
                  "id": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "kind",
                  "input",
                  "id",
                  "label",
                  "metadata"
                ],
                "additionalProperties": false
              }
            },
            "unresolved": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "surface",
            "resolved",
            "unresolved",
            "metadata"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "channels.authorize",
        "title": "Authorize Channel Action",
        "description": "Evaluate channel authorization and availability for a requested action.",
        "category": "channels",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:channels"
        ],
        "http": {
          "method": "POST",
          "path": "/api/channels/authorize/{surface}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "actionId": {
              "type": "string"
            },
            "actorId": {
              "type": "string"
            },
            "accountId": {
              "type": "string"
            },
            "target": {
              "type": "string"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "actionId"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "surface": {
              "type": "string"
            },
            "result": {
              "type": "object",
              "properties": {
                "allowed": {
                  "type": "boolean"
                },
                "reason": {
                  "type": "string"
                },
                "account": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "surface": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "configured": {
                          "type": "boolean"
                        },
                        "linked": {
                          "type": "boolean"
                        },
                        "state": {
                          "type": "string"
                        },
                        "authState": {
                          "type": "string"
                        },
                        "accountId": {
                          "type": "string"
                        },
                        "workspaceId": {
                          "type": "string"
                        },
                        "secrets": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "field": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "configured": {
                                "type": "boolean"
                              },
                              "source": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "field",
                              "label",
                              "configured",
                              "source"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "actions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "kind": {
                                "type": "string"
                              },
                              "available": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "id",
                              "label",
                              "kind",
                              "available"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "metadata": {
                          "type": "object",
                          "additionalProperties": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "id",
                        "surface",
                        "label",
                        "enabled",
                        "configured",
                        "linked",
                        "state",
                        "authState",
                        "secrets",
                        "actions",
                        "metadata"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "actionAvailable": {
                  "type": "boolean"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "allowed",
                "reason",
                "metadata"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "surface",
            "result"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "channels.capabilities.list",
        "title": "List Channel Capabilities",
        "description": "Return capability posture for all registered channel surfaces.",
        "category": "channels",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:channels"
        ],
        "http": {
          "method": "GET",
          "path": "/api/channels/capabilities"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "capabilities": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "surface": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "scope": {
                    "type": "string"
                  },
                  "supported": {
                    "type": "boolean"
                  },
                  "detail": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "surface",
                  "label",
                  "scope",
                  "supported",
                  "detail",
                  "metadata"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "capabilities"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "channels.capabilities.surface.list",
        "title": "List Channel Surface Capabilities",
        "description": "Return capability posture for a single surface.",
        "category": "channels",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:channels"
        ],
        "http": {
          "method": "GET",
          "path": "/api/channels/capabilities/{surface}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "surface": {
              "type": "string"
            }
          },
          "required": [
            "surface"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "capabilities": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "surface": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "scope": {
                    "type": "string"
                  },
                  "supported": {
                    "type": "boolean"
                  },
                  "detail": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "surface",
                  "label",
                  "scope",
                  "supported",
                  "detail",
                  "metadata"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "capabilities"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "channels.directory.query",
        "title": "Query Channel Directory",
        "description": "Query a channel directory surface for users, groups, threads, or services.",
        "category": "channels",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:channels"
        ],
        "http": {
          "method": "GET",
          "path": "/api/channels/directory/{surface}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "surface": {
              "type": "string"
            },
            "q": {
              "type": "string"
            },
            "scope": {
              "type": "string"
            },
            "groupId": {
              "type": "string"
            },
            "limit": {
              "type": "number"
            },
            "live": {
              "type": "boolean"
            }
          },
          "required": [
            "surface"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "entries": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "surface": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "handle": {
                    "type": "string"
                  },
                  "accountId": {
                    "type": "string"
                  },
                  "workspaceId": {
                    "type": "string"
                  },
                  "groupId": {
                    "type": "string"
                  },
                  "threadId": {
                    "type": "string"
                  },
                  "parentId": {
                    "type": "string"
                  },
                  "memberCount": {
                    "type": "number"
                  },
                  "memberIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "aliases": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "isSelf": {
                    "type": "boolean"
                  },
                  "isDirect": {
                    "type": "boolean"
                  },
                  "isGroupConversation": {
                    "type": "boolean"
                  },
                  "searchText": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "surface",
                  "kind",
                  "label",
                  "metadata"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "entries"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "channels.doctor.get",
        "title": "Get Channel Doctor Report",
        "description": "Return doctor checks and repair posture for a channel surface.",
        "category": "channels",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:channels"
        ],
        "http": {
          "method": "GET",
          "path": "/api/channels/doctor/{surface}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "surface": {
              "type": "string"
            }
          },
          "required": [
            "surface"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "surface": {
              "type": "string"
            },
            "accountId": {
              "type": "string"
            },
            "state": {
              "type": "string"
            },
            "summary": {
              "type": "string"
            },
            "checkedAt": {
              "type": "number"
            },
            "checks": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  },
                  "detail": {
                    "type": "string"
                  },
                  "repairActionId": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "label",
                  "status",
                  "detail"
                ],
                "additionalProperties": false
              }
            },
            "repairActions": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "dangerous": {
                    "type": "boolean"
                  },
                  "inputSchema": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "label",
                  "description",
                  "dangerous",
                  "metadata"
                ],
                "additionalProperties": false
              }
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "surface",
            "state",
            "summary",
            "checkedAt",
            "checks",
            "repairActions",
            "metadata"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "channels.drafts.delete",
        "title": "Delete Channel Draft",
        "description": "Remove a channel draft from the daemon-side store.",
        "category": "channels",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:channels"
        ],
        "http": {
          "method": "DELETE",
          "path": "/api/channels/drafts/{draftId}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "draftId": {
              "type": "string"
            }
          },
          "required": [
            "draftId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "deleted": {
              "type": "boolean"
            },
            "draftId": {
              "type": "string"
            }
          },
          "required": [
            "deleted",
            "draftId"
          ],
          "additionalProperties": false
        },
        "dangerous": true,
        "invokable": true
      },
      {
        "id": "channels.drafts.get",
        "title": "Get Channel Draft",
        "description": "Return a single daemon-mirrored channel draft by id, or a notFound marker.",
        "category": "channels",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:channels"
        ],
        "http": {
          "method": "GET",
          "path": "/api/channels/drafts/{draftId}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "draftId": {
              "type": "string"
            }
          },
          "required": [
            "draftId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "version": {
              "type": "number"
            },
            "id": {
              "type": "string"
            },
            "createdAt": {
              "type": "string"
            },
            "updatedAt": {
              "type": "string"
            },
            "status": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "message": {
              "type": "string"
            },
            "channel": {
              "type": "string"
            },
            "route": {
              "type": "string"
            },
            "webhook": {
              "type": "string"
            },
            "link": {
              "type": "string"
            },
            "tags": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "sentResponseId": {
              "type": "string"
            },
            "sendError": {
              "type": "string"
            },
            "notFound": {
              "type": "boolean"
            }
          },
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "channels.drafts.list",
        "title": "List Channel Drafts",
        "description": "Return daemon-mirrored channel drafts for cross-device sync. Webhook values are stored redacted.",
        "category": "channels",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:channels"
        ],
        "http": {
          "method": "GET",
          "path": "/api/channels/drafts"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string"
            },
            "limit": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "drafts": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "version": {
                    "type": "number"
                  },
                  "id": {
                    "type": "string"
                  },
                  "createdAt": {
                    "type": "string"
                  },
                  "updatedAt": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "channel": {
                    "type": "string"
                  },
                  "route": {
                    "type": "string"
                  },
                  "webhook": {
                    "type": "string"
                  },
                  "link": {
                    "type": "string"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "sentResponseId": {
                    "type": "string"
                  },
                  "sendError": {
                    "type": "string"
                  }
                },
                "required": [
                  "version",
                  "id",
                  "createdAt",
                  "updatedAt",
                  "status",
                  "message"
                ],
                "additionalProperties": false
              }
            },
            "total": {
              "type": "number"
            }
          },
          "required": [
            "drafts",
            "total"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "channels.drafts.save",
        "title": "Save Channel Draft",
        "description": "Mirror a channel draft to the daemon-side store. Webhook values must be redacted before transmission; raw webhook tokens are rejected. Requires explicit confirmation.",
        "category": "channels",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:channels"
        ],
        "http": {
          "method": "POST",
          "path": "/api/channels/drafts"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "version": {
              "type": "number"
            },
            "id": {
              "type": "string"
            },
            "createdAt": {
              "type": "string"
            },
            "updatedAt": {
              "type": "string"
            },
            "status": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "message": {
              "type": "string"
            },
            "channel": {
              "type": "string"
            },
            "route": {
              "type": "string"
            },
            "webhook": {
              "type": "string"
            },
            "link": {
              "type": "string"
            },
            "tags": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "sentResponseId": {
              "type": "string"
            },
            "sendError": {
              "type": "string"
            }
          },
          "required": [
            "version",
            "id",
            "createdAt",
            "updatedAt",
            "status",
            "message"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "draft": {
              "type": "object",
              "properties": {
                "version": {
                  "type": "number"
                },
                "id": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string"
                },
                "updatedAt": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "channel": {
                  "type": "string"
                },
                "route": {
                  "type": "string"
                },
                "webhook": {
                  "type": "string"
                },
                "link": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "sentResponseId": {
                  "type": "string"
                },
                "sendError": {
                  "type": "string"
                }
              },
              "required": [
                "version",
                "id",
                "createdAt",
                "updatedAt",
                "status",
                "message"
              ],
              "additionalProperties": false
            },
            "created": {
              "type": "boolean"
            }
          },
          "required": [
            "draft",
            "created"
          ],
          "additionalProperties": false
        },
        "dangerous": true,
        "invokable": true
      },
      {
        "id": "channels.inbox.list",
        "title": "List Channel Inbox",
        "description": "Return the merged inbound message feed (Slack DMs, Discord messages, email threads) from the host's synced provider mirror, newest first. Read-only; no provider write. Every known provider reports its own state in `providers`, including the unconfigured and the failing ones, so a short list is never ambiguous, and `partial` is true whenever a configured provider's items are missing because its last sync failed. Page with ?limit and ?cursor (opaque, from nextCursor); ?since=<epoch-ms> returns only items newer than a previous answer's `cursor` watermark; ?provider=<id> narrows to one provider.",
        "category": "channels",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:channels"
        ],
        "http": {
          "method": "GET",
          "path": "/api/channels/inbox"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "provider": {
              "type": "string"
            },
            "limit": {
              "type": "number"
            },
            "since": {
              "type": "number"
            },
            "cursor": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "items": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "provider": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string"
                  },
                  "from": {
                    "type": "string"
                  },
                  "fromAddress": {
                    "type": "string"
                  },
                  "subject": {
                    "type": "string"
                  },
                  "bodyPreview": {
                    "type": "string"
                  },
                  "receivedAt": {
                    "type": "number"
                  },
                  "unread": {
                    "type": "boolean"
                  },
                  "routeId": {
                    "type": "string"
                  },
                  "threadId": {
                    "type": "string"
                  },
                  "attachmentCount": {
                    "type": "number"
                  },
                  "triageScore": {
                    "type": "number"
                  },
                  "triageLabel": {
                    "type": "string"
                  },
                  "triageTags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "id",
                  "provider",
                  "kind",
                  "from",
                  "bodyPreview",
                  "receivedAt",
                  "unread"
                ],
                "additionalProperties": false
              }
            },
            "total": {
              "type": "number"
            },
            "truncated": {
              "type": "boolean"
            },
            "hasMore": {
              "type": "boolean"
            },
            "cursor": {
              "type": "string"
            },
            "nextCursor": {
              "type": "string"
            },
            "providers": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "provider": {
                    "type": "string"
                  },
                  "state": {
                    "type": "string"
                  },
                  "itemCount": {
                    "type": "number"
                  },
                  "storedCount": {
                    "type": "number"
                  },
                  "configured": {
                    "type": "boolean"
                  },
                  "lastSyncAt": {
                    "type": "number"
                  },
                  "syncing": {
                    "type": "boolean"
                  },
                  "error": {
                    "type": "string"
                  }
                },
                "required": [
                  "provider",
                  "state",
                  "itemCount",
                  "storedCount"
                ],
                "additionalProperties": false
              }
            },
            "partial": {
              "type": "boolean"
            }
          },
          "required": [
            "items",
            "total",
            "truncated",
            "hasMore",
            "providers",
            "partial"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "channels.lifecycle.get",
        "title": "Get Channel Lifecycle State",
        "description": "Return lifecycle version posture for a channel surface.",
        "category": "channels",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:channels"
        ],
        "http": {
          "method": "GET",
          "path": "/api/channels/lifecycle/{surface}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "surface": {
              "type": "string"
            }
          },
          "required": [
            "surface"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "surface": {
              "type": "string"
            },
            "accountId": {
              "type": "string"
            },
            "currentVersion": {
              "type": "number"
            },
            "targetVersion": {
              "type": "number"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "surface",
            "currentVersion",
            "targetVersion",
            "metadata"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "channels.policies.audit",
        "title": "List Channel Policy Audit",
        "description": "Return channel ingress policy audit records.",
        "category": "channels",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:channels"
        ],
        "http": {
          "method": "GET",
          "path": "/api/channels/policies/audit"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "audit": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "surface": {
                    "type": "string"
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "allowed": {
                    "type": "boolean"
                  },
                  "reason": {
                    "type": "string"
                  },
                  "userId": {
                    "type": "string"
                  },
                  "channelId": {
                    "type": "string"
                  },
                  "groupId": {
                    "type": "string"
                  },
                  "threadId": {
                    "type": "string"
                  },
                  "conversationKind": {
                    "type": "string"
                  },
                  "matchedGroupPolicyId": {
                    "type": "string"
                  },
                  "text": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "surface",
                  "createdAt",
                  "allowed",
                  "reason",
                  "metadata"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "audit"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "channels.policies.list",
        "title": "List Channel Policies",
        "description": "Return ingress policy configuration for channels.",
        "category": "channels",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:channels"
        ],
        "http": {
          "method": "GET",
          "path": "/api/channels/policies"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "policies": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "surface": {
                    "type": "string"
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "requireMention": {
                    "type": "boolean"
                  },
                  "allowDirectMessages": {
                    "type": "boolean"
                  },
                  "allowGroupMessages": {
                    "type": "boolean"
                  },
                  "allowThreadMessages": {
                    "type": "boolean"
                  },
                  "dmPolicy": {
                    "type": "string"
                  },
                  "groupPolicy": {
                    "type": "string"
                  },
                  "allowTextCommandsWithoutMention": {
                    "type": "boolean"
                  },
                  "allowlistUserIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "allowlistChannelIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "allowlistGroupIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "allowedCommands": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "groupPolicies": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "groupId": {
                          "type": "string"
                        },
                        "channelId": {
                          "type": "string"
                        },
                        "workspaceId": {
                          "type": "string"
                        },
                        "requireMention": {
                          "type": "boolean"
                        },
                        "allowGroupMessages": {
                          "type": "boolean"
                        },
                        "allowThreadMessages": {
                          "type": "boolean"
                        },
                        "allowTextCommandsWithoutMention": {
                          "type": "boolean"
                        },
                        "allowlistUserIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "allowlistChannelIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "allowlistGroupIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "allowedCommands": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "metadata": {
                          "type": "object",
                          "additionalProperties": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "updatedAt": {
                    "type": "number"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "surface",
                  "enabled",
                  "requireMention",
                  "allowDirectMessages",
                  "allowGroupMessages",
                  "allowThreadMessages",
                  "dmPolicy",
                  "groupPolicy",
                  "allowTextCommandsWithoutMention",
                  "allowlistUserIds",
                  "allowlistChannelIds",
                  "allowlistGroupIds",
                  "allowedCommands",
                  "groupPolicies",
                  "updatedAt",
                  "metadata"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "policies"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "channels.policies.update",
        "title": "Update Channel Policy",
        "description": "Update ingress policy configuration for a channel surface.",
        "category": "channels",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:channels"
        ],
        "http": {
          "method": "POST",
          "path": "/api/channels/policies/{surface}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "requireMention": {
              "type": "boolean"
            },
            "allowDirectMessages": {
              "type": "boolean"
            },
            "allowGroupMessages": {
              "type": "boolean"
            },
            "allowThreadMessages": {
              "type": "boolean"
            },
            "dmPolicy": {
              "type": "string"
            },
            "groupPolicy": {
              "type": "string"
            },
            "allowTextCommandsWithoutMention": {
              "type": "boolean"
            },
            "allowlistUserIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "allowlistChannelIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "allowlistGroupIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "allowedCommands": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "groupPolicies": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "groupId": {
                    "type": "string"
                  },
                  "channelId": {
                    "type": "string"
                  },
                  "workspaceId": {
                    "type": "string"
                  },
                  "requireMention": {
                    "type": "boolean"
                  },
                  "allowGroupMessages": {
                    "type": "boolean"
                  },
                  "allowThreadMessages": {
                    "type": "boolean"
                  },
                  "allowTextCommandsWithoutMention": {
                    "type": "boolean"
                  },
                  "allowlistUserIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "allowlistChannelIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "allowlistGroupIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "allowedCommands": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "surface": {
              "type": "string"
            },
            "enabled": {
              "type": "boolean"
            },
            "requireMention": {
              "type": "boolean"
            },
            "allowDirectMessages": {
              "type": "boolean"
            },
            "allowGroupMessages": {
              "type": "boolean"
            },
            "allowThreadMessages": {
              "type": "boolean"
            },
            "dmPolicy": {
              "type": "string"
            },
            "groupPolicy": {
              "type": "string"
            },
            "allowTextCommandsWithoutMention": {
              "type": "boolean"
            },
            "allowlistUserIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "allowlistChannelIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "allowlistGroupIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "allowedCommands": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "groupPolicies": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "groupId": {
                    "type": "string"
                  },
                  "channelId": {
                    "type": "string"
                  },
                  "workspaceId": {
                    "type": "string"
                  },
                  "requireMention": {
                    "type": "boolean"
                  },
                  "allowGroupMessages": {
                    "type": "boolean"
                  },
                  "allowThreadMessages": {
                    "type": "boolean"
                  },
                  "allowTextCommandsWithoutMention": {
                    "type": "boolean"
                  },
                  "allowlistUserIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "allowlistChannelIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "allowlistGroupIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "allowedCommands": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            },
            "updatedAt": {
              "type": "number"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "surface",
            "enabled",
            "requireMention",
            "allowDirectMessages",
            "allowGroupMessages",
            "allowThreadMessages",
            "dmPolicy",
            "groupPolicy",
            "allowTextCommandsWithoutMention",
            "allowlistUserIds",
            "allowlistChannelIds",
            "allowlistGroupIds",
            "allowedCommands",
            "groupPolicies",
            "updatedAt",
            "metadata"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "channels.profiles.delete",
        "title": "Unbind Channel Profile",
        "description": "Remove a channel profile binding. Returns { deleted: false } when no binding for that key existed, an honest boolean, never a phantom removal.",
        "category": "channels",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:channels"
        ],
        "http": {
          "method": "DELETE",
          "path": "/api/channels/profiles/{surfaceKind}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "surfaceKind": {
              "type": "string"
            },
            "channelId": {
              "type": "string"
            }
          },
          "required": [
            "surfaceKind"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "surfaceKind": {
              "type": "string"
            },
            "channelId": {
              "type": "string"
            },
            "deleted": {
              "type": "boolean"
            }
          },
          "required": [
            "surfaceKind",
            "deleted"
          ],
          "additionalProperties": false
        },
        "dangerous": true,
        "invokable": true
      },
      {
        "id": "channels.profiles.get",
        "title": "Get Channel Profile Binding",
        "description": "Return the profile binding for a channel (surfaceKind plus optional channelId). Returns 404 when no binding for that exact key exists.",
        "category": "channels",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:channels"
        ],
        "http": {
          "method": "GET",
          "path": "/api/channels/profiles/{surfaceKind}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "surfaceKind": {
              "type": "string"
            },
            "channelId": {
              "type": "string"
            }
          },
          "required": [
            "surfaceKind"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "binding": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "surfaceKind": {
                  "type": "string"
                },
                "channelId": {
                  "type": "string"
                },
                "model": {
                  "type": "string"
                },
                "provider": {
                  "type": "string"
                },
                "permissionMode": {
                  "type": "string",
                  "enum": [
                    "plan",
                    "normal",
                    "accept-edits",
                    "auto"
                  ]
                },
                "updatedAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "surfaceKind",
                "updatedAt"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "binding"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "channels.profiles.list",
        "title": "List Channel Profile Bindings",
        "description": "Return every per-channel profile binding (the model/permission defaults applied to sessions each channel originates).",
        "category": "channels",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:channels"
        ],
        "http": {
          "method": "GET",
          "path": "/api/channels/profiles"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "bindings": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "surfaceKind": {
                    "type": "string"
                  },
                  "channelId": {
                    "type": "string"
                  },
                  "model": {
                    "type": "string"
                  },
                  "provider": {
                    "type": "string"
                  },
                  "permissionMode": {
                    "type": "string",
                    "enum": [
                      "plan",
                      "normal",
                      "accept-edits",
                      "auto"
                    ]
                  },
                  "updatedAt": {
                    "type": "number"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "surfaceKind",
                  "updatedAt"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "bindings"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "channels.profiles.set",
        "title": "Bind Channel Profile",
        "description": "Bind (upsert) the model/provider and permission-mode defaults for a channel. Keyed on (surfaceKind, channelId?): a channelId-scoped binding wins over the surface-wide default; setting the same key again replaces it.",
        "category": "channels",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:channels"
        ],
        "http": {
          "method": "POST",
          "path": "/api/channels/profiles"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "surfaceKind": {
              "type": "string"
            },
            "channelId": {
              "type": "string"
            },
            "model": {
              "type": "string"
            },
            "provider": {
              "type": "string"
            },
            "permissionMode": {
              "type": "string",
              "enum": [
                "plan",
                "normal",
                "accept-edits",
                "auto"
              ]
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "surfaceKind"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "binding": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "surfaceKind": {
                  "type": "string"
                },
                "channelId": {
                  "type": "string"
                },
                "model": {
                  "type": "string"
                },
                "provider": {
                  "type": "string"
                },
                "permissionMode": {
                  "type": "string",
                  "enum": [
                    "plan",
                    "normal",
                    "accept-edits",
                    "auto"
                  ]
                },
                "updatedAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "surfaceKind",
                "updatedAt"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "binding"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "channels.repairs.list",
        "title": "List Channel Repair Actions",
        "description": "Return repair actions exposed by a channel surface.",
        "category": "channels",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:channels"
        ],
        "http": {
          "method": "GET",
          "path": "/api/channels/repair-actions/{surface}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "surface": {
              "type": "string"
            }
          },
          "required": [
            "surface"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "actions": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "dangerous": {
                    "type": "boolean"
                  },
                  "inputSchema": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "label",
                  "description",
                  "dangerous",
                  "metadata"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "actions"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "channels.routing.assign",
        "title": "Assign Channel Routing Rule",
        "description": "Create or update a channel-to-profile routing rule in the daemon-persisted routing table. Requires explicit confirmation.",
        "category": "channels",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:channels"
        ],
        "http": {
          "method": "POST",
          "path": "/api/channels/routing"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "channelId": {
              "type": "string"
            },
            "surfaceKind": {
              "type": "string"
            },
            "routeId": {
              "type": "string"
            },
            "profileId": {
              "type": "string"
            },
            "label": {
              "type": "string"
            }
          },
          "required": [
            "surfaceKind",
            "profileId"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "assignmentId": {
              "type": "string"
            },
            "channelId": {
              "type": "string"
            },
            "surfaceKind": {
              "type": "string"
            },
            "routeId": {
              "type": "string"
            },
            "profileId": {
              "type": "string"
            },
            "label": {
              "type": "string"
            },
            "createdAt": {
              "type": "string"
            },
            "updatedAt": {
              "type": "string"
            }
          },
          "required": [
            "assignmentId",
            "surfaceKind",
            "profileId",
            "createdAt",
            "updatedAt"
          ],
          "additionalProperties": false
        },
        "dangerous": true,
        "invokable": true
      },
      {
        "id": "channels.routing.delete",
        "title": "Delete Channel Routing Rule",
        "description": "Remove a channel-to-profile routing rule from the daemon-persisted routing table.",
        "category": "channels",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:channels"
        ],
        "http": {
          "method": "DELETE",
          "path": "/api/channels/routing/{assignmentId}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "assignmentId": {
              "type": "string"
            }
          },
          "required": [
            "assignmentId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "deleted": {
              "type": "boolean"
            },
            "assignmentId": {
              "type": "string"
            }
          },
          "required": [
            "deleted",
            "assignmentId"
          ],
          "additionalProperties": false
        },
        "dangerous": true,
        "invokable": true
      },
      {
        "id": "channels.routing.list",
        "title": "List Channel Routing Rules",
        "description": "Return the daemon-persisted channel-to-profile routing table.",
        "category": "channels",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:channels"
        ],
        "http": {
          "method": "GET",
          "path": "/api/channels/routing"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "profileId": {
              "type": "string"
            },
            "surfaceKind": {
              "type": "string"
            },
            "limit": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "routes": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "createdAt": {
                    "type": "string"
                  },
                  "updatedAt": {
                    "type": "string"
                  },
                  "surfaceKind": {
                    "type": "string"
                  },
                  "routeId": {
                    "type": "string"
                  },
                  "profileId": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "createdAt",
                  "updatedAt",
                  "surfaceKind",
                  "profileId"
                ],
                "additionalProperties": false
              }
            },
            "total": {
              "type": "number"
            }
          },
          "required": [
            "routes",
            "total"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "channels.setup.get",
        "title": "Get Channel Setup Schema",
        "description": "Return the versioned setup schema, secret targets, and external steps for a channel surface.",
        "category": "channels",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:channels"
        ],
        "http": {
          "method": "GET",
          "path": "/api/channels/setup/{surface}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "surface": {
              "type": "string"
            }
          },
          "required": [
            "surface"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "surface": {
              "type": "string"
            },
            "version": {
              "type": "number"
            },
            "label": {
              "type": "string"
            },
            "setupMode": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "fields": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string"
                  },
                  "required": {
                    "type": "boolean"
                  },
                  "detail": {
                    "type": "string"
                  },
                  "placeholder": {
                    "type": "string"
                  },
                  "configKey": {
                    "type": "string"
                  },
                  "secretTargetId": {
                    "type": "string"
                  },
                  "defaultValue": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  },
                  "options": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "value",
                        "label"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "label",
                  "kind",
                  "required",
                  "metadata"
                ],
                "additionalProperties": false
              }
            },
            "secretTargets": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "surface": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "required": {
                    "type": "boolean"
                  },
                  "supports": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "serviceName": {
                    "type": "string"
                  },
                  "serviceField": {
                    "type": "string"
                  },
                  "envKeys": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "configKeys": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "detail": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "surface",
                  "label",
                  "required",
                  "supports",
                  "metadata"
                ],
                "additionalProperties": false
              }
            },
            "externalSteps": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "surface",
            "version",
            "label",
            "setupMode",
            "description",
            "fields",
            "secretTargets",
            "externalSteps",
            "metadata"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "channels.status",
        "title": "Channel Status",
        "description": "Return status for channel plugins and provider-backed channels.",
        "category": "channels",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:channels"
        ],
        "http": {
          "method": "GET",
          "path": "/api/channels/status"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "channels": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "surface": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "state": {
                    "type": "string"
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "accountId": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "surface",
                  "label",
                  "state",
                  "enabled",
                  "metadata"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "channels"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "channels.targets.resolve",
        "title": "Resolve Channel Target",
        "description": "Resolve a typed channel target for outbound delivery or routing.",
        "category": "channels",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:channels"
        ],
        "http": {
          "method": "POST",
          "path": "/api/channels/targets/{surface}/resolve"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "target": {
              "type": "string"
            },
            "input": {
              "type": "string"
            },
            "query": {
              "type": "string"
            },
            "accountId": {
              "type": "string"
            },
            "preferredKind": {
              "type": "string"
            },
            "threadId": {
              "type": "string"
            },
            "sessionId": {
              "type": "string"
            },
            "createIfMissing": {
              "type": "boolean"
            },
            "live": {
              "type": "boolean"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "additionalProperties": true,
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "target": {
                  "type": "string"
                }
              },
              "required": [
                "target"
              ],
              "additionalProperties": true
            },
            {
              "type": "object",
              "properties": {
                "input": {
                  "type": "string"
                }
              },
              "required": [
                "input"
              ],
              "additionalProperties": true
            },
            {
              "type": "object",
              "properties": {
                "query": {
                  "type": "string"
                }
              },
              "required": [
                "query"
              ],
              "additionalProperties": true
            }
          ]
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "surface": {
              "type": "string"
            },
            "target": {
              "type": "object",
              "properties": {
                "surface": {
                  "type": "string"
                },
                "input": {
                  "type": "string"
                },
                "normalized": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "to": {
                  "type": "string"
                },
                "display": {
                  "type": "string"
                },
                "accountId": {
                  "type": "string"
                },
                "workspaceId": {
                  "type": "string"
                },
                "channelId": {
                  "type": "string"
                },
                "groupId": {
                  "type": "string"
                },
                "threadId": {
                  "type": "string"
                },
                "parentId": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                },
                "sessionTarget": {
                  "type": "string"
                },
                "bindingId": {
                  "type": "string"
                },
                "directoryEntryId": {
                  "type": "string"
                },
                "source": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "surface",
                "input",
                "normalized",
                "kind",
                "to",
                "source",
                "metadata"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "surface",
            "target"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "channels.test.send",
        "title": "Send Channel Test Message",
        "description": "Send a real test message through a configured channel surface and report the actual delivery outcome. delivered:true means the daemon's delivery router accepted and sent it (with the surface's responseId when it returns one); a failed send is delivered:false with the real error (unconfigured/unsupported surface, provider/transport error), never a fabricated success. Provide address to target a specific recipient/channel, or omit it to use the surface's configured default.",
        "category": "channels",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:channels"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "surface": {
              "type": "string"
            },
            "address": {
              "type": "string"
            },
            "body": {
              "type": "string"
            }
          },
          "required": [
            "surface"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "surface": {
              "type": "string"
            },
            "delivered": {
              "type": "boolean"
            },
            "responseId": {
              "type": "string"
            },
            "address": {
              "type": "string"
            },
            "error": {
              "type": "string"
            }
          },
          "required": [
            "surface",
            "delivered"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "channels.tools.invoke",
        "title": "Run Channel Tool",
        "description": "Run a channel-owned operator tool.",
        "category": "channels",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:channels"
        ],
        "http": {
          "method": "POST",
          "path": "/api/channels/tools/{surface}/{toolId}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "accountId": {
              "type": "string"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "toolId": {
              "type": "string"
            },
            "surface": {
              "type": "string"
            },
            "result": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "toolId",
            "surface",
            "result"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "channels.tools.list",
        "title": "List Channel Tools",
        "description": "Return operator tools registered by channel plugins.",
        "category": "channels",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:channels"
        ],
        "http": {
          "method": "GET",
          "path": "/api/channels/tools"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "tools": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "surface": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "actionIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "inputSchema": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "surface",
                  "name",
                  "description",
                  "actionIds",
                  "metadata"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "tools"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "channels.tools.surface.list",
        "title": "List Channel Surface Tools",
        "description": "Return operator tools for a single channel surface.",
        "category": "channels",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:channels"
        ],
        "http": {
          "method": "GET",
          "path": "/api/channels/tools/{surface}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "surface": {
              "type": "string"
            }
          },
          "required": [
            "surface"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "tools": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "surface": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "actionIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "inputSchema": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "surface",
                  "name",
                  "description",
                  "actionIds",
                  "metadata"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "tools"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "checkin.config.get",
        "title": "Get Check-in Config",
        "description": "Return the proactive check-in configuration: enabled, cadence (cron), delivery channel, and quiet hours.",
        "category": "checkin",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:checkin"
        ],
        "http": {
          "method": "GET",
          "path": "/api/checkin/config"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "config": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean"
                },
                "cadence": {
                  "type": "string"
                },
                "deliveryChannel": {
                  "type": "string"
                },
                "quietHours": {
                  "type": "string"
                }
              },
              "required": [
                "enabled",
                "cadence",
                "deliveryChannel",
                "quietHours"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "config"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "checkin.config.set",
        "title": "Update Check-in Config",
        "description": "Update the proactive check-in configuration. Absent fields are left unchanged. Enabling syncs the kind:checkin automation job onto the scheduler; disabling stops it.",
        "category": "checkin",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:checkin"
        ],
        "http": {
          "method": "POST",
          "path": "/api/checkin/config"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "cadence": {
              "type": "string"
            },
            "deliveryChannel": {
              "type": "string"
            },
            "quietHours": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "config": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean"
                },
                "cadence": {
                  "type": "string"
                },
                "deliveryChannel": {
                  "type": "string"
                },
                "quietHours": {
                  "type": "string"
                }
              },
              "required": [
                "enabled",
                "cadence",
                "deliveryChannel",
                "quietHours"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "config"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "checkin.receipts.list",
        "title": "List Check-in Receipts",
        "description": "Return the visible receipts of past check-in runs (newest first): each run records whether it stayed quiet, delivered a message (and what), or was skipped.",
        "category": "checkin",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:checkin"
        ],
        "http": {
          "method": "GET",
          "path": "/api/checkin/receipts"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "receipts": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "ranAt": {
                    "type": "number"
                  },
                  "trigger": {
                    "type": "string",
                    "enum": [
                      "scheduled",
                      "manual"
                    ]
                  },
                  "outcome": {
                    "type": "string",
                    "enum": [
                      "delivered",
                      "quiet",
                      "skipped-disabled",
                      "skipped-quiet-hours",
                      "error"
                    ]
                  },
                  "briefingSummary": {
                    "type": "string"
                  },
                  "decisionReason": {
                    "type": "string"
                  },
                  "deliveredMessage": {
                    "type": "string"
                  },
                  "deliveryChannel": {
                    "type": "string"
                  },
                  "deliveryId": {
                    "type": "string"
                  },
                  "error": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "ranAt",
                  "trigger",
                  "outcome",
                  "briefingSummary"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "receipts"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "checkin.run",
        "title": "Run Check-in Now",
        "description": "Trigger one check-in evaluation immediately (a manual run): assemble the briefing, judge whether to contact the user, deliver if so, and record a receipt.",
        "category": "checkin",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:checkin"
        ],
        "http": {
          "method": "POST",
          "path": "/api/checkin/run"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "outcome": {
              "type": "string",
              "enum": [
                "delivered",
                "quiet",
                "skipped",
                "error"
              ]
            },
            "summary": {
              "type": "string"
            },
            "deliveryId": {
              "type": "string"
            }
          },
          "required": [
            "outcome",
            "summary"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "checkpoints.create",
        "title": "Create Workspace Checkpoint",
        "description": "Create a new workspace checkpoint. Returns checkpoint:null, noop:true (not an error) when the workspace tree is identical to the most recent checkpoint, no commit, ref, or manifest entry is created in that case.",
        "category": "checkpoints",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:checkpoints"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "turn",
                "agent-run",
                "manual"
              ]
            },
            "label": {
              "type": "string"
            },
            "retentionClass": {
              "type": "string",
              "enum": [
                "short",
                "standard",
                "forensic"
              ]
            },
            "turnId": {
              "type": "string"
            },
            "agentId": {
              "type": "string"
            },
            "sessionId": {
              "type": "string"
            },
            "paths": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "kind"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "checkpoint": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "turn",
                        "agent-run",
                        "manual"
                      ]
                    },
                    "label": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "parentId": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "turnId": {
                      "type": "string"
                    },
                    "agentId": {
                      "type": "string"
                    },
                    "sessionId": {
                      "type": "string"
                    },
                    "retentionClass": {
                      "type": "string",
                      "enum": [
                        "short",
                        "standard",
                        "forensic"
                      ]
                    },
                    "commit": {
                      "type": "string"
                    },
                    "sizeBytes": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "label",
                    "createdAt",
                    "parentId",
                    "retentionClass",
                    "commit",
                    "sizeBytes"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "noop": {
              "type": "boolean"
            }
          },
          "required": [
            "checkpoint",
            "noop"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "checkpoints.diff",
        "title": "Diff Workspace Checkpoints",
        "description": "Diff two checkpoints, or one checkpoint against the live working tree when `b` is omitted. An unknown/gc'd checkpoint id is an honest 404, not a silent empty diff.",
        "category": "checkpoints",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "read:checkpoints"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "a": {
              "type": "string"
            },
            "b": {
              "type": "string"
            }
          },
          "required": [
            "a"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "diff": {
              "type": "object",
              "properties": {
                "from": {
                  "type": "string"
                },
                "to": {
                  "type": "string"
                },
                "files": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "unifiedDiff": {
                  "type": "string"
                },
                "stat": {
                  "type": "string"
                }
              },
              "required": [
                "from",
                "to",
                "files",
                "unifiedDiff",
                "stat"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "diff"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "checkpoints.list",
        "title": "List Workspace Checkpoints",
        "description": "Return workspace checkpoints (whole-workspace filesystem snapshots), newest first, optionally filtered by kind/since and capped by limit.",
        "category": "checkpoints",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "read:checkpoints"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "turn",
                "agent-run",
                "manual"
              ]
            },
            "sessionId": {
              "type": "string"
            },
            "since": {
              "type": "number"
            },
            "limit": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "checkpoints": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "turn",
                      "agent-run",
                      "manual"
                    ]
                  },
                  "label": {
                    "type": "string"
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "parentId": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "turnId": {
                    "type": "string"
                  },
                  "agentId": {
                    "type": "string"
                  },
                  "sessionId": {
                    "type": "string"
                  },
                  "retentionClass": {
                    "type": "string",
                    "enum": [
                      "short",
                      "standard",
                      "forensic"
                    ]
                  },
                  "commit": {
                    "type": "string"
                  },
                  "sizeBytes": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "kind",
                  "label",
                  "createdAt",
                  "parentId",
                  "retentionClass",
                  "commit",
                  "sizeBytes"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "checkpoints"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "checkpoints.restore",
        "title": "Restore Workspace Checkpoint",
        "description": "DESTRUCTIVE: restore the workspace to the state captured by a checkpoint (git-backed workspace rewrite). Refuses to run unconfirmed: pass confirm:true to execute immediately, OR a confirmToken from checkpoints.restorePreview. An unconfirmed call returns a structured refusal (result:null, refused:true, refusal naming both options), not an error. An unknown/gc'd checkpoint id (once confirmed) is an honest 404, not a silent no-op.",
        "category": "checkpoints",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:checkpoints"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "paths": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "safetyCheckpoint": {
              "type": "boolean"
            },
            "confirm": {
              "type": "boolean"
            },
            "confirmToken": {
              "type": "string"
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "result": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "checkpointId": {
                      "type": "string"
                    },
                    "safetyCheckpointId": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "restoredFiles": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "removedFiles": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "checkpointId",
                    "safetyCheckpointId",
                    "restoredFiles",
                    "removedFiles"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "refused": {
              "type": "boolean"
            },
            "refusal": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "reason": {
                      "type": "string"
                    },
                    "confirmField": {
                      "type": "string"
                    },
                    "previewMethod": {
                      "type": "string"
                    },
                    "options": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "reason",
                    "confirmField",
                    "previewMethod",
                    "options"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "result",
            "refused",
            "refusal"
          ],
          "additionalProperties": false
        },
        "dangerous": true,
        "invokable": true
      },
      {
        "id": "checkpoints.restorePreview",
        "title": "Preview Workspace Checkpoint Restore",
        "description": "Read-only: preview what a checkpoints.restore of this checkpoint would change (label, affected-path count + sample, diffstat) and mint a short-lived (~2 min), single-use confirmToken that authorizes the matching restore. No workspace mutation. An unknown/gc'd checkpoint id is an honest 404.",
        "category": "checkpoints",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "read:checkpoints"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "paths": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "token": {
              "type": "string"
            },
            "expiresAt": {
              "type": "number"
            },
            "preview": {
              "type": "object",
              "properties": {
                "checkpointId": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "affectedPathCount": {
                  "type": "number"
                },
                "affectedPathSample": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "stat": {
                  "type": "string"
                }
              },
              "required": [
                "checkpointId",
                "label",
                "affectedPathCount",
                "affectedPathSample",
                "stat"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "token",
            "expiresAt",
            "preview"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "checkpoints.revertHunk",
        "title": "Revert a Single Hunk",
        "description": "DESTRUCTIVE: reverse-apply ONE unified-diff hunk to its file in the live working tree, undoing exactly that hunk and nothing else. The hunk must still apply cleanly in reverse, a stale/drifted hunk is an honest 409 conflict, never a partial write. Refuses to run unconfirmed: pass confirm:true to execute immediately, OR a confirmToken from checkpoints.revertHunkPreview. An unconfirmed call returns a structured refusal (receipt:null, refused:true, refusal naming both options), not an error. Snapshots the whole tree (a manual checkpoint) before writing, so the revert is itself reversible; returns a receipt whose undo block carries that checkpoint id. Emits a HUNK_REVERTED receipt event.",
        "category": "checkpoints",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:checkpoints"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "hunk": {
              "type": "string"
            },
            "sessionId": {
              "type": "string"
            },
            "confirm": {
              "type": "boolean"
            },
            "confirmToken": {
              "type": "string"
            }
          },
          "required": [
            "path",
            "hunk"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "receipt": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "reverted": {
                      "type": "boolean"
                    },
                    "path": {
                      "type": "string"
                    },
                    "hunkHeader": {
                      "type": "string"
                    },
                    "addedLinesRemoved": {
                      "type": "number"
                    },
                    "removedLinesRestored": {
                      "type": "number"
                    },
                    "safetyCheckpointId": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "undo": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "restoreCheckpointId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "restoreCheckpointId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "reverted",
                    "path",
                    "hunkHeader",
                    "addedLinesRemoved",
                    "removedLinesRestored",
                    "safetyCheckpointId",
                    "undo"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "refused": {
              "type": "boolean"
            },
            "refusal": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "reason": {
                      "type": "string"
                    },
                    "confirmField": {
                      "type": "string"
                    },
                    "previewMethod": {
                      "type": "string"
                    },
                    "options": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "reason",
                    "confirmField",
                    "previewMethod",
                    "options"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "receipt",
            "refused",
            "refusal"
          ],
          "additionalProperties": false
        },
        "dangerous": true,
        "invokable": true
      },
      {
        "id": "checkpoints.revertHunkPreview",
        "title": "Preview a Single-Hunk Revert",
        "description": "Read-only: check whether reverse-applying ONE unified-diff hunk (copied from a checkpoints.diff / sessions.changes.get diff) to its file in the live working tree would apply cleanly right now, and mint a short-lived (~2 min), single-use confirmToken authorizing the matching checkpoints.revertHunk. A stale/drifted hunk returns applies:false with a human-readable conflict and a null token, an honest \"this hunk no longer applies\", not an error. No workspace mutation.",
        "category": "checkpoints",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "read:checkpoints"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "hunk": {
              "type": "string"
            },
            "sessionId": {
              "type": "string"
            }
          },
          "required": [
            "path",
            "hunk"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "applies": {
              "type": "boolean"
            },
            "conflict": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "hunkHeader": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "addedLinesRemoved": {
              "type": "number"
            },
            "removedLinesRestored": {
              "type": "number"
            },
            "matchedAtLine": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            },
            "token": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "expiresAt": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "path",
            "applies",
            "conflict",
            "hunkHeader",
            "addedLinesRemoved",
            "removedLinesRestored",
            "matchedAtLine",
            "token",
            "expiresAt"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "ci.status",
        "title": "CI Per-Job Status",
        "description": "Poll GitHub for a repo/ref/PR and return EVERY job with its conclusion. The overall verdict is derived from the per-job conclusions (never a rollup); continue-on-error jobs are surfaced as violations and force the verdict off \"passed\".",
        "category": "ci",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:ci"
        ],
        "http": {
          "method": "POST",
          "path": "/api/ci/status"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "repo": {
              "type": "string"
            },
            "ref": {
              "type": "string"
            },
            "prNumber": {
              "type": "number"
            }
          },
          "required": [
            "repo"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "report": {
              "type": "object",
              "properties": {
                "repo": {
                  "type": "string"
                },
                "ref": {
                  "type": "string"
                },
                "prNumber": {
                  "type": "number"
                },
                "overall": {
                  "type": "string",
                  "enum": [
                    "passed",
                    "failed",
                    "pending",
                    "unknown"
                  ]
                },
                "jobs": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "queued",
                          "in_progress",
                          "completed"
                        ]
                      },
                      "conclusion": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "continueOnError": {
                        "type": "boolean"
                      },
                      "url": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name",
                      "status",
                      "conclusion"
                    ],
                    "additionalProperties": false
                  }
                },
                "violations": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "checkedAt": {
                  "type": "number"
                }
              },
              "required": [
                "repo",
                "overall",
                "jobs",
                "violations",
                "checkedAt"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "report"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "ci.watches.create",
        "title": "Create CI Watch",
        "description": "Create a standing watch on a repo/ref or PR. On transition to a terminal verdict it notifies the delivery channel; set triggerFixSession to opt in to starting a fix-session pre-briefed with the failing jobs on failure.",
        "category": "ci",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:ci"
        ],
        "http": {
          "method": "POST",
          "path": "/api/ci/watches"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "repo": {
              "type": "string"
            },
            "ref": {
              "type": "string"
            },
            "prNumber": {
              "type": "number"
            },
            "deliveryChannel": {
              "type": "string"
            },
            "triggerFixSession": {
              "type": "boolean"
            }
          },
          "required": [
            "repo",
            "deliveryChannel"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "watch": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "repo": {
                  "type": "string"
                },
                "ref": {
                  "type": "string"
                },
                "prNumber": {
                  "type": "number"
                },
                "deliveryChannel": {
                  "type": "string"
                },
                "triggerFixSession": {
                  "type": "boolean"
                },
                "lastOverall": {
                  "type": "string",
                  "enum": [
                    "passed",
                    "failed",
                    "pending",
                    "unknown"
                  ]
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "repo",
                "deliveryChannel",
                "triggerFixSession",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "watch"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "ci.watches.delete",
        "title": "Delete CI Watch",
        "description": "Remove a standing CI watch. Returns { deleted: false } when no watch with that id existed.",
        "category": "ci",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:ci"
        ],
        "http": {
          "method": "DELETE",
          "path": "/api/ci/watches/{watchId}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "watchId": {
              "type": "string"
            }
          },
          "required": [
            "watchId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "watchId": {
              "type": "string"
            },
            "deleted": {
              "type": "boolean"
            }
          },
          "required": [
            "watchId",
            "deleted"
          ],
          "additionalProperties": false
        },
        "dangerous": true,
        "invokable": true
      },
      {
        "id": "ci.watches.list",
        "title": "List CI Watches",
        "description": "Return every standing CI watch (repo/ref/PR, delivery channel, and whether a fix-session is opted in on failure).",
        "category": "ci",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:ci"
        ],
        "http": {
          "method": "GET",
          "path": "/api/ci/watches"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "watches": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "repo": {
                    "type": "string"
                  },
                  "ref": {
                    "type": "string"
                  },
                  "prNumber": {
                    "type": "number"
                  },
                  "deliveryChannel": {
                    "type": "string"
                  },
                  "triggerFixSession": {
                    "type": "boolean"
                  },
                  "lastOverall": {
                    "type": "string",
                    "enum": [
                      "passed",
                      "failed",
                      "pending",
                      "unknown"
                    ]
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "repo",
                  "deliveryChannel",
                  "triggerFixSession",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "watches"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "ci.watches.run",
        "title": "Check CI Watch Now",
        "description": "Poll a standing watch immediately: returns the per-job report, whether a completion notification fired, and whether an opted-in fix-session was triggered on failure.",
        "category": "ci",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:ci"
        ],
        "http": {
          "method": "POST",
          "path": "/api/ci/watches/{watchId}/run"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "watchId": {
              "type": "string"
            }
          },
          "required": [
            "watchId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "report": {
              "type": "object",
              "properties": {
                "repo": {
                  "type": "string"
                },
                "ref": {
                  "type": "string"
                },
                "prNumber": {
                  "type": "number"
                },
                "overall": {
                  "type": "string",
                  "enum": [
                    "passed",
                    "failed",
                    "pending",
                    "unknown"
                  ]
                },
                "jobs": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "queued",
                          "in_progress",
                          "completed"
                        ]
                      },
                      "conclusion": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "continueOnError": {
                        "type": "boolean"
                      },
                      "url": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name",
                      "status",
                      "conclusion"
                    ],
                    "additionalProperties": false
                  }
                },
                "violations": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "checkedAt": {
                  "type": "number"
                }
              },
              "required": [
                "repo",
                "overall",
                "jobs",
                "violations",
                "checkedAt"
              ],
              "additionalProperties": false
            },
            "notified": {
              "type": "boolean"
            },
            "notificationId": {
              "type": "string"
            },
            "fixSessionTriggered": {
              "type": "boolean"
            },
            "fixSessionId": {
              "type": "string"
            },
            "fixSessionError": {
              "type": "string"
            },
            "fixSessionOffered": {
              "type": "boolean"
            },
            "retired": {
              "type": "boolean"
            }
          },
          "required": [
            "report",
            "notified",
            "fixSessionTriggered"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "companion.chat.events.stream",
        "title": "Stream Companion Chat Events",
        "description": "Server-Sent Events stream of turn and agent events scoped to a single companion-chat session.",
        "category": "companion",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http"
        ],
        "scopes": [
          "read:sessions"
        ],
        "http": {
          "method": "GET",
          "path": "/api/companion/chat/sessions/{sessionId}/events"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "invokable": false,
        "metadata": {
          "responseKind": "sse",
          "stream": true,
          "wireEventPrefix": "companion-chat."
        }
      },
      {
        "id": "companion.chat.messages.create",
        "title": "Send Companion Chat Message",
        "description": "Post a user message to a companion-chat session. Accepts either `body` or `content` in the payload; `body` wins when both are provided. Attachments reference artifacts created through `artifacts.create`.",
        "category": "companion",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:sessions"
        ],
        "http": {
          "method": "POST",
          "path": "/api/companion/chat/sessions/{sessionId}/messages"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "body": {
              "type": "string"
            },
            "content": {
              "type": "string"
            },
            "attachments": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "artifactId": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": false
                  }
                },
                "required": [
                  "artifactId"
                ],
                "additionalProperties": false
              }
            },
            "metadata": {
              "type": "object",
              "properties": {},
              "additionalProperties": false
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": true,
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "body": {
                  "type": "string"
                }
              },
              "required": [
                "body"
              ],
              "additionalProperties": true
            },
            {
              "type": "object",
              "properties": {
                "content": {
                  "type": "string"
                }
              },
              "required": [
                "content"
              ],
              "additionalProperties": true
            },
            {
              "type": "object",
              "properties": {
                "attachments": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "artifactId": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      },
                      "metadata": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "artifactId"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "attachments"
              ],
              "additionalProperties": true
            }
          ]
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "messageId": {
              "type": "string"
            }
          },
          "required": [
            "messageId"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "companion.chat.messages.edit",
        "title": "Edit Companion Chat Message And Branch",
        "description": "Edit a user message and branch the conversation from it. `messageId` (required) is the user message to edit; the edited text is passed as `body` or `content` (as message create accepts), with optional `attachments` referencing artifacts. The original message and everything after it are SUPERSEDED, retained as history, never deleted, a new user message carrying `revisionOf` back to the original is appended, and a fresh turn answers it. Returns the new message id and the superseded ids for honest lineage. Same closed/unknown-session refusals as companion.chat.messages.retry.",
        "category": "companion",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:sessions"
        ],
        "http": {
          "method": "POST",
          "path": "/api/companion/chat/sessions/{sessionId}/messages/edit"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "messageId": {
              "type": "string"
            },
            "body": {
              "type": "string"
            },
            "content": {
              "type": "string"
            },
            "attachments": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "artifactId": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": false
                  }
                },
                "required": [
                  "artifactId"
                ],
                "additionalProperties": false
              }
            },
            "metadata": {
              "type": "object",
              "properties": {},
              "additionalProperties": false
            }
          },
          "required": [
            "sessionId",
            "messageId"
          ],
          "additionalProperties": true,
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "body": {
                  "type": "string"
                }
              },
              "required": [
                "body"
              ],
              "additionalProperties": true
            },
            {
              "type": "object",
              "properties": {
                "content": {
                  "type": "string"
                }
              },
              "required": [
                "content"
              ],
              "additionalProperties": true
            },
            {
              "type": "object",
              "properties": {
                "attachments": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "artifactId": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      },
                      "metadata": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "artifactId"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "attachments"
              ],
              "additionalProperties": true
            }
          ]
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "editedFrom": {
              "type": "string"
            },
            "messageId": {
              "type": "string"
            },
            "supersededMessageIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "turnStarted": {
              "type": "boolean"
            }
          },
          "required": [
            "sessionId",
            "editedFrom",
            "messageId",
            "supersededMessageIds",
            "turnStarted"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "companion.chat.messages.list",
        "title": "List Companion Chat Messages",
        "description": "Return the message list for a companion-chat session.",
        "category": "companion",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:sessions"
        ],
        "http": {
          "method": "GET",
          "path": "/api/companion/chat/sessions/{sessionId}/messages"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "messages": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "sessionId": {
                    "type": "string"
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "user",
                      "assistant"
                    ]
                  },
                  "content": {
                    "type": "string"
                  },
                  "attachments": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "artifactId": {
                          "type": "string"
                        },
                        "kind": {
                          "type": "string"
                        },
                        "mimeType": {
                          "type": "string"
                        },
                        "filename": {
                          "type": "string"
                        },
                        "sizeBytes": {
                          "type": "number"
                        },
                        "sha256": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "number"
                        },
                        "expiresAt": {
                          "type": "number"
                        },
                        "sourceUri": {
                          "type": "string"
                        },
                        "acquisitionMode": {
                          "type": "string"
                        },
                        "fetchMode": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "metadata": {
                          "type": "object",
                          "additionalProperties": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "id",
                        "artifactId",
                        "kind",
                        "mimeType",
                        "sizeBytes",
                        "sha256",
                        "createdAt",
                        "metadata"
                      ],
                      "additionalProperties": true
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "deliveryState": {
                    "type": "string",
                    "enum": [
                      "cancelled",
                      "queued"
                    ]
                  },
                  "inReplyTo": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "sessionId",
                  "role",
                  "content",
                  "attachments",
                  "createdAt"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "sessionId",
            "messages"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "companion.chat.messages.retry",
        "title": "Regenerate Companion Chat Response",
        "description": "Regenerate an assistant response. Optional `messageId` targets a specific assistant message; omitted, the latest assistant response is re-run. The prior response (and any turns after it) is SUPERSEDED, kept in the message list and on disk, flagged as retained history, never deleted, then a fresh turn re-runs from the preceding user message. Returns the superseded message ids so the caller can render the honest lineage. Rejected on a closed session (409 SESSION_CLOSED) or unknown session (404 SESSION_NOT_FOUND), and with an honest machine code (409 NO_ASSISTANT_MESSAGE) when there is nothing to regenerate.",
        "category": "companion",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:sessions"
        ],
        "http": {
          "method": "POST",
          "path": "/api/companion/chat/sessions/{sessionId}/messages/retry"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "messageId": {
              "type": "string"
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "regeneratedFrom": {
              "type": "string"
            },
            "supersededMessageIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "turnStarted": {
              "type": "boolean"
            }
          },
          "required": [
            "sessionId",
            "regeneratedFrom",
            "supersededMessageIds",
            "turnStarted"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "companion.chat.messages.steer",
        "title": "Steer Companion Chat (Interrupt And Send)",
        "description": "Send a message that runs IMMEDIATELY, interrupting the in-flight turn if one is running. The message jumps to the front of the pending-turn queue; the active turn is cancelled through the same finalization path as companion.chat.turns.cancel (any non-empty partial reply is persisted with `deliveryState: \"cancelled\"` and the terminal `turn.cancelled` event reaches every subscriber), then the steered message's turn starts. Messages queued behind an active turn keep their places behind the steer. With no turn running this behaves as an ordinary send. Accepts the same payload as companion.chat.messages.create (`body`/`content`, `attachments`, `metadata`). Returns the new message id, `steered: true`, and `cancelledTurnId` when a turn was interrupted. Ordinary sends posted while a turn is running are QUEUED (transcript-visible immediately with `deliveryState: \"queued\"`, answered in order), steer is the explicit jump-the-line verb.",
        "category": "companion",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:sessions"
        ],
        "http": {
          "method": "POST",
          "path": "/api/companion/chat/sessions/{sessionId}/messages/steer"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "body": {
              "type": "string"
            },
            "content": {
              "type": "string"
            },
            "attachments": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "artifactId": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": false
                  }
                },
                "required": [
                  "artifactId"
                ],
                "additionalProperties": false
              }
            },
            "metadata": {
              "type": "object",
              "properties": {},
              "additionalProperties": false
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": true,
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "body": {
                  "type": "string"
                }
              },
              "required": [
                "body"
              ],
              "additionalProperties": true
            },
            {
              "type": "object",
              "properties": {
                "content": {
                  "type": "string"
                }
              },
              "required": [
                "content"
              ],
              "additionalProperties": true
            },
            {
              "type": "object",
              "properties": {
                "attachments": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "artifactId": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      },
                      "metadata": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "artifactId"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "attachments"
              ],
              "additionalProperties": true
            }
          ]
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "messageId": {
              "type": "string"
            },
            "steered": {
              "type": "boolean"
            },
            "cancelledTurnId": {
              "type": "string"
            },
            "turnStarted": {
              "type": "boolean"
            }
          },
          "required": [
            "sessionId",
            "messageId",
            "steered",
            "turnStarted"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "companion.chat.sessions.close",
        "title": "Close Companion Chat Session",
        "description": "Close a companion-chat session (soft close). The session record and its messages are preserved in closed state and remain listable with includeClosed. Distinct from companion.chat.sessions.delete, which permanently removes the record.",
        "category": "companion",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:sessions"
        ],
        "http": {
          "method": "POST",
          "path": "/api/companion/chat/sessions/{sessionId}/close"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "status": {
              "type": "string"
            }
          },
          "required": [
            "sessionId",
            "status"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "companion.chat.sessions.create",
        "title": "Create Companion Chat Session",
        "description": "Create a new companion-chat session. Optional `provider` / `model` override the registry default; `title` and `systemPrompt` are stored on the session record.",
        "category": "companion",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:sessions"
        ],
        "http": {
          "method": "POST",
          "path": "/api/companion/chat/sessions"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "model": {
              "type": "string"
            },
            "provider": {
              "type": "string"
            },
            "systemPrompt": {
              "type": "string"
            }
          },
          "additionalProperties": true,
          "dependentRequired": {
            "model": [
              "provider"
            ],
            "provider": [
              "model"
            ]
          }
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "createdAt": {
              "type": "number"
            },
            "session": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "companion-chat"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "model": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "provider": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "systemPrompt": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "active",
                    "closed"
                  ]
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "closedAt": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "messageCount": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "kind",
                "title",
                "model",
                "provider",
                "systemPrompt",
                "status",
                "createdAt",
                "updatedAt",
                "closedAt",
                "messageCount"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "sessionId",
            "createdAt",
            "session"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "companion.chat.sessions.delete",
        "title": "Delete Companion Chat Session",
        "description": "Permanently remove a companion-chat session: the on-disk record file is deleted and the session is dropped from the shared session store, this does NOT merely close it (use companion.chat.sessions.close for a soft close). Requires the session to already be closed: deleting a still-active session is rejected with 409 SESSION_ACTIVE (close it, then delete). An unknown or already-deleted id is a 404 SESSION_NOT_FOUND, never a 200-noop.",
        "category": "companion",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:sessions"
        ],
        "http": {
          "method": "DELETE",
          "path": "/api/companion/chat/sessions/{sessionId}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "deleted": {
              "type": "boolean"
            }
          },
          "required": [
            "sessionId",
            "deleted"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "companion.chat.sessions.get",
        "title": "Get Companion Chat Session",
        "description": "Return a companion-chat session record together with its full message history.",
        "category": "companion",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:sessions"
        ],
        "http": {
          "method": "GET",
          "path": "/api/companion/chat/sessions/{sessionId}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "session": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "companion-chat"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "model": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "provider": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "systemPrompt": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "active",
                    "closed"
                  ]
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "closedAt": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "messageCount": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "kind",
                "title",
                "model",
                "provider",
                "systemPrompt",
                "status",
                "createdAt",
                "updatedAt",
                "closedAt",
                "messageCount"
              ],
              "additionalProperties": false
            },
            "messages": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "sessionId": {
                    "type": "string"
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "user",
                      "assistant"
                    ]
                  },
                  "content": {
                    "type": "string"
                  },
                  "attachments": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "artifactId": {
                          "type": "string"
                        },
                        "kind": {
                          "type": "string"
                        },
                        "mimeType": {
                          "type": "string"
                        },
                        "filename": {
                          "type": "string"
                        },
                        "sizeBytes": {
                          "type": "number"
                        },
                        "sha256": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "number"
                        },
                        "expiresAt": {
                          "type": "number"
                        },
                        "sourceUri": {
                          "type": "string"
                        },
                        "acquisitionMode": {
                          "type": "string"
                        },
                        "fetchMode": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "metadata": {
                          "type": "object",
                          "additionalProperties": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "id",
                        "artifactId",
                        "kind",
                        "mimeType",
                        "sizeBytes",
                        "sha256",
                        "createdAt",
                        "metadata"
                      ],
                      "additionalProperties": true
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "deliveryState": {
                    "type": "string",
                    "enum": [
                      "cancelled",
                      "queued"
                    ]
                  },
                  "inReplyTo": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "sessionId",
                  "role",
                  "content",
                  "attachments",
                  "createdAt"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "session",
            "messages"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "companion.chat.sessions.list",
        "title": "List Companion Chat Sessions",
        "description": "List active companion-chat sessions. Pass `includeClosed` to include recently closed sessions.",
        "category": "companion",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:sessions"
        ],
        "http": {
          "method": "GET",
          "path": "/api/companion/chat/sessions"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "includeClosed": {
              "type": "boolean"
            },
            "limit": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessions": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "companion-chat"
                    ]
                  },
                  "title": {
                    "type": "string"
                  },
                  "model": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "provider": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "systemPrompt": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "active",
                      "closed"
                    ]
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  },
                  "closedAt": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "messageCount": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "kind",
                  "title",
                  "model",
                  "provider",
                  "systemPrompt",
                  "status",
                  "createdAt",
                  "updatedAt",
                  "closedAt",
                  "messageCount"
                ],
                "additionalProperties": false
              }
            },
            "totals": {
              "type": "object",
              "properties": {
                "sessions": {
                  "type": "number"
                },
                "active": {
                  "type": "number"
                },
                "closed": {
                  "type": "number"
                }
              },
              "required": [
                "sessions",
                "active",
                "closed"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "sessions",
            "totals"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "companion.chat.sessions.update",
        "title": "Update Companion Chat Session",
        "description": "Update companion-chat session metadata, including session-local `provider` and `model`, without changing the daemon/TUI current model.",
        "category": "companion",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:sessions"
        ],
        "http": {
          "method": "PATCH",
          "path": "/api/companion/chat/sessions/{sessionId}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "model": {
              "type": "string"
            },
            "provider": {
              "type": "string"
            },
            "systemPrompt": {
              "type": "string"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": true,
          "dependentRequired": {
            "model": [
              "provider"
            ],
            "provider": [
              "model"
            ]
          },
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string"
                }
              },
              "required": [
                "title"
              ],
              "additionalProperties": true
            },
            {
              "type": "object",
              "properties": {
                "model": {
                  "type": "string"
                }
              },
              "required": [
                "model"
              ],
              "additionalProperties": true
            },
            {
              "type": "object",
              "properties": {
                "provider": {
                  "type": "string"
                }
              },
              "required": [
                "provider"
              ],
              "additionalProperties": true
            },
            {
              "type": "object",
              "properties": {
                "systemPrompt": {
                  "type": "string"
                }
              },
              "required": [
                "systemPrompt"
              ],
              "additionalProperties": true
            }
          ]
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "session": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "companion-chat"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "model": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "provider": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "systemPrompt": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "active",
                    "closed"
                  ]
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "closedAt": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "messageCount": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "kind",
                "title",
                "model",
                "provider",
                "systemPrompt",
                "status",
                "createdAt",
                "updatedAt",
                "closedAt",
                "messageCount"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "session"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "companion.chat.turns.cancel",
        "title": "Cancel Companion Chat Turn",
        "description": "Stop the in-flight turn for a companion chat session, a true server-side stop: the provider stream is aborted, any non-empty partial reply is persisted to the transcript with an explicit `deliveryState: \"cancelled\"` marker (an honest partial, never disguised as a complete reply) AND committed to the model-facing conversation history with an explicit interruption note, later turns can reason about what the user saw and stopped, which is usually what a follow-up or steer refers to, and the terminal `turn.cancelled` event is published to every subscriber of the session stream so a stop from one client converges on all others. Any announced tool call without a result is closed with a synthetic error `turn.tool_result` before the terminal event. Optional `turnId` guards against cancelling a newer turn a stale stop raced against (409 TURN_MISMATCH). No turn in flight is the benign 404 NO_ACTIVE_TURN (the turn finished before the stop landed). Repeat cancels are idempotent successes. The session stays open; the next message starts a fresh turn normally.",
        "category": "companion",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:sessions"
        ],
        "http": {
          "method": "POST",
          "path": "/api/companion/chat/sessions/{sessionId}/turns/cancel"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "turnId": {
              "type": "string"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "turnId": {
              "type": "string"
            },
            "cancelled": {
              "type": "boolean"
            },
            "alreadyCancelled": {
              "type": "boolean"
            },
            "partialPersisted": {
              "type": "boolean"
            }
          },
          "required": [
            "sessionId",
            "turnId",
            "cancelled",
            "partialPersisted"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "config.get",
        "title": "Get Config",
        "description": "Return the resolved GoodVibes config snapshot.",
        "category": "config",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:config"
        ],
        "http": {
          "method": "GET",
          "path": "/config"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "danger": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "controlPlane": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "web": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "network": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "service": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "providers": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "ui": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "channels": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "watchers": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "memory": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "config.set",
        "title": "Set Config Value",
        "description": "Set a config value through the daemon API.",
        "category": "config",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:config"
        ],
        "http": {
          "method": "POST",
          "path": "/config"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "key": {
              "type": "string"
            }
          },
          "required": [
            "key"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "success": {
              "type": "boolean"
            },
            "key": {
              "type": "string"
            },
            "value": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                },
                {
                  "type": "object",
                  "additionalProperties": {}
                },
                {
                  "type": "array",
                  "items": {}
                }
              ]
            },
            "persistedTo": {
              "type": "string"
            },
            "tier": {
              "type": "string"
            },
            "daemonOwned": {
              "type": "boolean"
            }
          },
          "required": [
            "success",
            "key"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "credentials.delete",
        "title": "Delete Credential",
        "description": "Remove a credential: the stored secret first, then the config reference pointing at it. That order is deliberate, clearing the config first would strand a secret nothing points at and nothing reaps, while this order leaves, for an instant, a reference resolving to nothing, which every reader already treats as configured-but-broken (the honest state for a credential mid-removal). `cleared: false` means nothing was stored under that key: a miss, not an error, because asking for a credential to be gone when it already is has succeeded. ws-only invoke verb; no REST binding. Mutating, so a relay call is covered by relay.requireStepUpForMutations exactly as config.set is.",
        "category": "config",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:config"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "key": {
              "type": "string"
            }
          },
          "required": [
            "key"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "success": {
              "type": "boolean"
            },
            "key": {
              "type": "string"
            },
            "secretKey": {
              "type": "string"
            },
            "scope": {
              "type": "string"
            },
            "cleared": {
              "type": "boolean"
            }
          },
          "required": [
            "success",
            "key",
            "secretKey",
            "scope",
            "cleared"
          ],
          "additionalProperties": false
        },
        "dangerous": true,
        "invokable": true
      },
      {
        "id": "credentials.get",
        "title": "Get Credential Status",
        "description": "Return secret-free credential status (configured/usable) for the shared store. Never returns raw secret bytes. Optional ?key= narrows to one credential.",
        "category": "config",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:config"
        ],
        "http": {
          "method": "GET",
          "path": "/config/credentials"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "key": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "available": {
              "type": "boolean"
            },
            "credentials": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string"
                  },
                  "configured": {
                    "type": "boolean"
                  },
                  "usable": {
                    "type": "boolean"
                  },
                  "source": {
                    "type": "string"
                  },
                  "scope": {
                    "type": "string"
                  },
                  "secure": {
                    "type": "boolean"
                  },
                  "overriddenByEnv": {
                    "type": "boolean"
                  },
                  "refSource": {
                    "type": "string"
                  }
                },
                "required": [
                  "key",
                  "configured",
                  "usable",
                  "source",
                  "scope",
                  "secure",
                  "overriddenByEnv"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "available",
            "credentials"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "credentials.set",
        "title": "Set Credential",
        "description": "Store a credential for a secret-bearing config key THROUGH the daemon, so a surface no longer has to write it into its own on-disk secret store, the write counterpart to credentials.get, and the reason a client on another machine can now finish a settings modal at all. `key` is the config path (e.g. surfaces.telegram.botToken); the secret-store name is derived from it. The value goes into the encrypted store at the scope the ownership rules resolve (a daemon-needed credential lands in the daemon tier whoever asked), is read BACK and compared, and only then does the config key take its goodvibes://secrets/goodvibes/<KEY> reference. A read-back mismatch fails the call and leaves the setting exactly as it was, because a reference resolving to nothing reads as a configured-but-broken credential. The response is secret-free: key names, the resolved scope, the reference now in config, and two plain sentences about where the setting and the credential are filed, never the value. Refuses a key that is not credential-bearing (use config.set) and refuses a value that is itself a goodvibes:// reference. ws-only invoke verb; no REST binding. Mutating, so a relay call is covered by relay.requireStepUpForMutations exactly as config.set is.",
        "category": "config",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:config"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "key": {
              "type": "string"
            },
            "value": {
              "type": "string"
            }
          },
          "required": [
            "key",
            "value"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "success": {
              "type": "boolean"
            },
            "key": {
              "type": "string"
            },
            "secretKey": {
              "type": "string"
            },
            "scope": {
              "type": "string"
            },
            "reference": {
              "type": "string"
            },
            "configScope": {
              "type": "string"
            },
            "ownership": {
              "type": "string"
            },
            "credentialScope": {
              "type": "string"
            }
          },
          "required": [
            "success",
            "key",
            "secretKey",
            "scope",
            "reference"
          ],
          "additionalProperties": false
        },
        "dangerous": true,
        "invokable": true
      },
      {
        "id": "continuity.snapshot",
        "title": "Continuity Snapshot",
        "description": "Return the continuity integration snapshot.",
        "category": "continuity",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:continuity"
        ],
        "http": {
          "method": "GET",
          "path": "/api/continuity"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "status": {
              "type": "string"
            },
            "recoveryState": {
              "type": "string"
            },
            "lastSessionPointer": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "recoveryFilePresent": {
              "type": "boolean"
            },
            "recoveryFile": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "number"
                    },
                    "sessionId": {
                      "type": "string"
                    },
                    "returnContext": {
                      "type": "object",
                      "properties": {
                        "activityLabel": {
                          "type": "string"
                        },
                        "statusLabel": {
                          "type": "string"
                        },
                        "lastUserPrompt": {
                          "type": "string"
                        },
                        "lastAssistantReply": {
                          "type": "string"
                        },
                        "pendingApprovals": {
                          "type": "number"
                        },
                        "toolCallCount": {
                          "type": "number"
                        },
                        "toolResultCount": {
                          "type": "number"
                        },
                        "assistantTurnCount": {
                          "type": "number"
                        },
                        "userTurnCount": {
                          "type": "number"
                        },
                        "lastRole": {
                          "type": "string"
                        },
                        "activeTasks": {
                          "type": "number"
                        },
                        "blockedTasks": {
                          "type": "number"
                        },
                        "remoteContracts": {
                          "type": "number"
                        },
                        "remoteRunners": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "worktreeCount": {
                          "type": "number"
                        },
                        "worktreePaths": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "openPanels": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "lines": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "assistedNarrative": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "activityLabel",
                        "statusLabel",
                        "pendingApprovals",
                        "toolCallCount",
                        "toolResultCount",
                        "assistantTurnCount",
                        "userTurnCount",
                        "lines"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "title",
                    "timestamp",
                    "sessionId"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "sessionId",
            "status",
            "recoveryState",
            "lastSessionPointer",
            "recoveryFilePresent",
            "recoveryFile"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "control.auth.current",
        "title": "Current Auth Context",
        "description": "Return the current control-plane principal, granted scopes, and authentication mode.",
        "category": "control-plane",
        "source": "builtin",
        "access": "public",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [],
        "http": {
          "method": "GET",
          "path": "/api/control-plane/auth"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "authenticated": {
              "type": "boolean"
            },
            "authMode": {
              "type": "string",
              "enum": [
                "anonymous",
                "invalid",
                "session",
                "shared-token"
              ]
            },
            "tokenPresent": {
              "type": "boolean"
            },
            "authorizationHeaderPresent": {
              "type": "boolean"
            },
            "sessionCookiePresent": {
              "type": "boolean"
            },
            "principalId": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "principalKind": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "user",
                    "bot",
                    "service",
                    "token"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "admin": {
              "type": "boolean"
            },
            "scopes": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "roles": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "authenticated",
            "authMode",
            "tokenPresent",
            "authorizationHeaderPresent",
            "sessionCookiePresent",
            "principalId",
            "principalKind",
            "admin",
            "scopes",
            "roles"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "control.auth.login",
        "title": "Login",
        "description": "Authenticate a local control-plane user and create a session token.",
        "category": "control-plane",
        "source": "builtin",
        "access": "public",
        "transport": [
          "http"
        ],
        "scopes": [],
        "http": {
          "method": "POST",
          "path": "/login"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "username": {
              "type": "string"
            },
            "password": {
              "type": "string"
            }
          },
          "required": [
            "username",
            "password"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "authenticated": {
              "type": "boolean"
            },
            "token": {
              "type": "string"
            },
            "username": {
              "type": "string"
            },
            "expiresAt": {
              "type": "number"
            }
          },
          "required": [
            "authenticated",
            "token",
            "username",
            "expiresAt"
          ],
          "additionalProperties": false
        },
        "invokable": false
      },
      {
        "id": "control.clients.list",
        "title": "List Control-Plane Clients",
        "description": "Return authenticated and recently connected control-plane clients.",
        "category": "control-plane",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:control-plane"
        ],
        "http": {
          "method": "GET",
          "path": "/api/control-plane/clients"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "clients": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "surface": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "connectedAt": {
                    "type": "number"
                  },
                  "lastSeenAt": {
                    "type": "number"
                  },
                  "userId": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "surface",
                  "label",
                  "connectedAt",
                  "lastSeenAt"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "clients"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "control.contract",
        "title": "Operator Contract",
        "description": "Return the operator-facing control-plane contract manifest, including auth, transport, method, and event metadata.",
        "category": "control-plane",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:control-plane"
        ],
        "http": {
          "method": "GET",
          "path": "/api/control-plane/contract"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "contract": {
              "type": "object",
              "properties": {
                "version": {
                  "type": "number"
                },
                "product": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "surface": {
                      "type": "string"
                    },
                    "version": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "surface",
                    "version"
                  ],
                  "additionalProperties": false
                },
                "auth": {
                  "type": "object",
                  "properties": {
                    "modes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "login": {
                      "type": "object",
                      "properties": {
                        "method": {
                          "type": "string"
                        },
                        "path": {
                          "type": "string"
                        },
                        "requestSchema": {
                          "type": "object",
                          "properties": {
                            "username": {
                              "type": "string"
                            },
                            "password": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "username",
                            "password"
                          ],
                          "additionalProperties": false
                        },
                        "responseSchema": {
                          "type": "object",
                          "properties": {
                            "authenticated": {
                              "type": "boolean"
                            },
                            "token": {
                              "type": "string"
                            },
                            "username": {
                              "type": "string"
                            },
                            "expiresAt": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "authenticated",
                            "token",
                            "username",
                            "expiresAt"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "method",
                        "path",
                        "requestSchema",
                        "responseSchema"
                      ],
                      "additionalProperties": false
                    },
                    "current": {
                      "type": "object",
                      "properties": {
                        "method": {
                          "type": "string"
                        },
                        "path": {
                          "type": "string"
                        },
                        "aliasPaths": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "responseSchema": {
                          "type": "object",
                          "properties": {
                            "authenticated": {
                              "type": "boolean"
                            },
                            "authMode": {
                              "type": "string",
                              "enum": [
                                "anonymous",
                                "invalid",
                                "session",
                                "shared-token"
                              ]
                            },
                            "tokenPresent": {
                              "type": "boolean"
                            },
                            "authorizationHeaderPresent": {
                              "type": "boolean"
                            },
                            "sessionCookiePresent": {
                              "type": "boolean"
                            },
                            "principalId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "principalKind": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "user",
                                    "bot",
                                    "service",
                                    "token"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "admin": {
                              "type": "boolean"
                            },
                            "scopes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "roles": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "authenticated",
                            "authMode",
                            "tokenPresent",
                            "authorizationHeaderPresent",
                            "sessionCookiePresent",
                            "principalId",
                            "principalKind",
                            "admin",
                            "scopes",
                            "roles"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "method",
                        "path",
                        "responseSchema"
                      ],
                      "additionalProperties": false
                    },
                    "sessionCookie": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "httpOnly": {
                          "type": "boolean"
                        },
                        "sameSite": {
                          "type": "string"
                        },
                        "path": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "httpOnly",
                        "sameSite",
                        "path"
                      ],
                      "additionalProperties": false
                    },
                    "bearer": {
                      "type": "object",
                      "properties": {
                        "header": {
                          "type": "string"
                        },
                        "queryParameters": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "header",
                        "queryParameters"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "modes",
                    "login",
                    "current",
                    "sessionCookie",
                    "bearer"
                  ],
                  "additionalProperties": false
                },
                "transports": {
                  "type": "object",
                  "properties": {
                    "http": {
                      "type": "object",
                      "properties": {
                        "statusPath": {
                          "type": "string"
                        },
                        "methodsPath": {
                          "type": "string"
                        },
                        "eventsCatalogPath": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "statusPath",
                        "methodsPath",
                        "eventsCatalogPath"
                      ],
                      "additionalProperties": false
                    },
                    "sse": {
                      "type": "object",
                      "properties": {
                        "path": {
                          "type": "string"
                        },
                        "query": {
                          "type": "object",
                          "properties": {
                            "domains": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "domains"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "path",
                        "query"
                      ],
                      "additionalProperties": false
                    },
                    "websocket": {
                      "type": "object",
                      "properties": {
                        "path": {
                          "type": "string"
                        },
                        "clientFrames": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "fields": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "serverFrames": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "fields": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "path",
                        "clientFrames",
                        "serverFrames"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "http",
                    "sse",
                    "websocket"
                  ],
                  "additionalProperties": false
                },
                "operator": {
                  "type": "object",
                  "properties": {
                    "methods": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "category": {
                            "type": "string"
                          },
                          "source": {
                            "type": "string"
                          },
                          "access": {
                            "type": "string"
                          },
                          "transport": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "scopes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "http": {
                            "type": "object",
                            "properties": {
                              "method": {
                                "type": "string"
                              },
                              "path": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "method",
                              "path"
                            ],
                            "additionalProperties": false
                          },
                          "events": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "inputSchema": {
                            "type": "object",
                            "additionalProperties": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                },
                                {},
                                {
                                  "type": "array",
                                  "items": {}
                                }
                              ]
                            }
                          },
                          "outputSchema": {
                            "type": "object",
                            "additionalProperties": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                },
                                {},
                                {
                                  "type": "array",
                                  "items": {}
                                }
                              ]
                            }
                          },
                          "pluginId": {
                            "type": "string"
                          },
                          "dangerous": {
                            "type": "boolean"
                          },
                          "invokable": {
                            "type": "boolean"
                          },
                          "metadata": {
                            "type": "object",
                            "additionalProperties": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                },
                                {},
                                {
                                  "type": "array",
                                  "items": {}
                                }
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "description",
                          "category",
                          "source",
                          "access",
                          "transport",
                          "scopes"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "events": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "category": {
                            "type": "string"
                          },
                          "source": {
                            "type": "string"
                          },
                          "transport": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "scopes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "domains": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "wireEvents": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "outputSchema": {
                            "type": "object",
                            "additionalProperties": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                },
                                {},
                                {
                                  "type": "array",
                                  "items": {}
                                }
                              ]
                            }
                          },
                          "pluginId": {
                            "type": "string"
                          },
                          "metadata": {
                            "type": "object",
                            "additionalProperties": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                },
                                {},
                                {
                                  "type": "array",
                                  "items": {}
                                }
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "description",
                          "category",
                          "source",
                          "transport",
                          "scopes"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "schemaCoverage": {
                      "type": "object",
                      "properties": {
                        "methods": {
                          "type": "number"
                        },
                        "typedInputs": {
                          "type": "number"
                        },
                        "genericInputs": {
                          "type": "number"
                        },
                        "typedOutputs": {
                          "type": "number"
                        },
                        "genericOutputs": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "methods",
                        "typedInputs",
                        "genericInputs",
                        "typedOutputs",
                        "genericOutputs"
                      ],
                      "additionalProperties": false
                    },
                    "eventCoverage": {
                      "type": "object",
                      "properties": {
                        "events": {
                          "type": "number"
                        },
                        "withDomains": {
                          "type": "number"
                        },
                        "withWireEvents": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "events",
                        "withDomains",
                        "withWireEvents"
                      ],
                      "additionalProperties": false
                    },
                    "validationCoverage": {
                      "type": "object",
                      "properties": {
                        "methods": {
                          "type": "number"
                        },
                        "validated": {
                          "type": "number"
                        },
                        "skippedGeneric": {
                          "type": "number"
                        },
                        "skippedUntyped": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "methods",
                        "validated",
                        "skippedGeneric",
                        "skippedUntyped"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "methods",
                    "events",
                    "schemaCoverage",
                    "eventCoverage"
                  ],
                  "additionalProperties": false
                },
                "peer": {
                  "type": "object",
                  "properties": {
                    "contractPath": {
                      "type": "string"
                    },
                    "relationship": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "contractPath",
                    "relationship"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "version",
                "product",
                "auth",
                "transports",
                "operator",
                "peer"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "contract"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "control.events.catalog",
        "title": "List Gateway Events",
        "description": "Return the event catalog for SSE and WebSocket control-plane subscriptions.",
        "category": "control-plane",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:control-plane",
          "read:events"
        ],
        "http": {
          "method": "GET",
          "path": "/api/control-plane/events/catalog"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "category": {
              "type": "string"
            },
            "domain": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "events": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "category": {
                    "type": "string"
                  },
                  "source": {
                    "type": "string"
                  },
                  "transport": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "scopes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "domains": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "wireEvents": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "outputSchema": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {},
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "pluginId": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {},
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "title",
                  "description",
                  "category",
                  "source",
                  "transport",
                  "scopes"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "events"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "control.events.stream",
        "title": "Open Control-Plane Event Stream",
        "description": "Open the SSE control-plane event stream.",
        "category": "control-plane",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http"
        ],
        "scopes": [
          "read:events"
        ],
        "http": {
          "method": "GET",
          "path": "/api/control-plane/events"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "domains": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "contentType": {
              "type": "string"
            },
            "mode": {
              "type": "string"
            }
          },
          "required": [
            "contentType",
            "mode"
          ],
          "additionalProperties": false
        },
        "invokable": false,
        "metadata": {
          "responseKind": "sse",
          "stream": true
        }
      },
      {
        "id": "control.messages.list",
        "title": "List Control-Plane Messages",
        "description": "Return recent surface messages published through the control plane.",
        "category": "control-plane",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:control-plane"
        ],
        "http": {
          "method": "GET",
          "path": "/api/control-plane/messages"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "messages": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "surface": {
                    "type": "string"
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "title": {
                    "type": "string"
                  },
                  "body": {
                    "type": "string"
                  },
                  "level": {
                    "type": "string",
                    "enum": [
                      "info",
                      "success",
                      "warn",
                      "error"
                    ]
                  },
                  "routeId": {
                    "type": "string"
                  },
                  "surfaceId": {
                    "type": "string"
                  },
                  "clientId": {
                    "type": "string"
                  },
                  "attachments": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "artifactId": {
                          "type": "string"
                        },
                        "kind": {
                          "type": "string"
                        },
                        "mimeType": {
                          "type": "string"
                        },
                        "filename": {
                          "type": "string"
                        },
                        "sizeBytes": {
                          "type": "number"
                        },
                        "sha256": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "number"
                        },
                        "expiresAt": {
                          "type": "number"
                        },
                        "sourceUri": {
                          "type": "string"
                        },
                        "acquisitionMode": {
                          "type": "string"
                        },
                        "fetchMode": {
                          "type": "string"
                        },
                        "contentPath": {
                          "type": "string"
                        },
                        "contentUrl": {
                          "type": "string"
                        },
                        "dataBase64": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "metadata": {
                          "type": "object",
                          "additionalProperties": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "id",
                        "artifactId",
                        "kind",
                        "mimeType",
                        "sizeBytes",
                        "sha256",
                        "createdAt",
                        "contentPath",
                        "metadata"
                      ],
                      "additionalProperties": true
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "surface",
                  "createdAt",
                  "title",
                  "body"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "messages"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "control.methods.get",
        "title": "Get Gateway Method",
        "description": "Return a single gateway method descriptor.",
        "category": "control-plane",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:control-plane"
        ],
        "http": {
          "method": "GET",
          "path": "/api/control-plane/methods/{methodId}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "methodId": {
              "type": "string"
            }
          },
          "required": [
            "methodId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "method": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "category": {
                  "type": "string"
                },
                "source": {
                  "type": "string"
                },
                "access": {
                  "type": "string"
                },
                "transport": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "scopes": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "http": {
                  "type": "object",
                  "properties": {
                    "method": {
                      "type": "string"
                    },
                    "path": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "method",
                    "path"
                  ],
                  "additionalProperties": false
                },
                "events": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "inputSchema": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {},
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "outputSchema": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {},
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "pluginId": {
                  "type": "string"
                },
                "dangerous": {
                  "type": "boolean"
                },
                "invokable": {
                  "type": "boolean"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {},
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "title",
                "description",
                "category",
                "source",
                "access",
                "transport",
                "scopes"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "method"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "control.methods.list",
        "title": "List Gateway Methods",
        "description": "Return the gateway method catalog.",
        "category": "control-plane",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:control-plane"
        ],
        "http": {
          "method": "GET",
          "path": "/api/control-plane/methods"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "category": {
              "type": "string"
            },
            "source": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "methods": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "category": {
                    "type": "string"
                  },
                  "source": {
                    "type": "string"
                  },
                  "access": {
                    "type": "string"
                  },
                  "transport": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "scopes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "http": {
                    "type": "object",
                    "properties": {
                      "method": {
                        "type": "string"
                      },
                      "path": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "method",
                      "path"
                    ],
                    "additionalProperties": false
                  },
                  "events": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "inputSchema": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {},
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "outputSchema": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {},
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "pluginId": {
                    "type": "string"
                  },
                  "dangerous": {
                    "type": "boolean"
                  },
                  "invokable": {
                    "type": "boolean"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {},
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "title",
                  "description",
                  "category",
                  "source",
                  "access",
                  "transport",
                  "scopes"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "methods"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "control.snapshot",
        "title": "Control-Plane Snapshot",
        "description": "Return the current control-plane gateway snapshot.",
        "category": "control-plane",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:control-plane"
        ],
        "http": {
          "method": "GET",
          "path": "/api/control-plane"
        },
        "events": [
          "runtime.control-plane"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "server": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean"
                },
                "host": {
                  "type": "string"
                },
                "port": {
                  "type": "number"
                },
                "baseUrl": {
                  "type": "string"
                },
                "streamingMode": {
                  "type": "string",
                  "enum": [
                    "sse",
                    "websocket",
                    "both"
                  ]
                },
                "sessionTtlMs": {
                  "type": "number"
                }
              },
              "required": [
                "enabled",
                "host",
                "port",
                "streamingMode",
                "sessionTtlMs"
              ],
              "additionalProperties": false
            },
            "totals": {
              "type": "object",
              "properties": {
                "clients": {
                  "type": "number"
                },
                "activeClients": {
                  "type": "number"
                },
                "surfaceMessages": {
                  "type": "number"
                },
                "recentEvents": {
                  "type": "number"
                },
                "requests": {
                  "type": "number"
                },
                "errors": {
                  "type": "number"
                }
              },
              "required": [
                "clients",
                "activeClients",
                "surfaceMessages",
                "recentEvents",
                "requests",
                "errors"
              ],
              "additionalProperties": false
            },
            "clients": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "surface": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "connectedAt": {
                    "type": "number"
                  },
                  "lastSeenAt": {
                    "type": "number"
                  },
                  "userId": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "surface",
                  "label",
                  "connectedAt",
                  "lastSeenAt"
                ],
                "additionalProperties": false
              }
            },
            "messages": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "surface": {
                    "type": "string"
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "title": {
                    "type": "string"
                  },
                  "body": {
                    "type": "string"
                  },
                  "level": {
                    "type": "string",
                    "enum": [
                      "info",
                      "success",
                      "warn",
                      "error"
                    ]
                  },
                  "routeId": {
                    "type": "string"
                  },
                  "surfaceId": {
                    "type": "string"
                  },
                  "clientId": {
                    "type": "string"
                  },
                  "attachments": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "artifactId": {
                          "type": "string"
                        },
                        "kind": {
                          "type": "string"
                        },
                        "mimeType": {
                          "type": "string"
                        },
                        "filename": {
                          "type": "string"
                        },
                        "sizeBytes": {
                          "type": "number"
                        },
                        "sha256": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "number"
                        },
                        "expiresAt": {
                          "type": "number"
                        },
                        "sourceUri": {
                          "type": "string"
                        },
                        "acquisitionMode": {
                          "type": "string"
                        },
                        "fetchMode": {
                          "type": "string"
                        },
                        "contentPath": {
                          "type": "string"
                        },
                        "contentUrl": {
                          "type": "string"
                        },
                        "dataBase64": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "metadata": {
                          "type": "object",
                          "additionalProperties": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "id",
                        "artifactId",
                        "kind",
                        "mimeType",
                        "sizeBytes",
                        "sha256",
                        "createdAt",
                        "contentPath",
                        "metadata"
                      ],
                      "additionalProperties": true
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "surface",
                  "createdAt",
                  "title",
                  "body"
                ],
                "additionalProperties": false
              }
            },
            "recentEvents": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "event": {
                    "type": "string"
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "payload": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "event",
                  "createdAt",
                  "payload"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "server",
            "totals",
            "clients",
            "messages",
            "recentEvents"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "control.status",
        "title": "Daemon Status",
        "description": "Return daemon status and version. THREE version fields, because there are two versions and they are not the same number: `buildVersion` is the running artifact's own release version, what a person installed, and what the auto-update loop compares against release tags, and `platformVersion` is the SDK build it is composed from. `version` carries the build version and exists because every client already reads it; on an embedded daemon that ships no artifact of its own, all three are the platform build. Pass receipts=consume to also receive undelivered daemon receipts (update/crash/migration notices) and mark them delivered, exactly once across all consuming readers. Without the flag no receipts are returned or consumed, so identity probes and keepalives never eat them.",
        "category": "control-plane",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:control-plane"
        ],
        "http": {
          "method": "GET",
          "path": "/status"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "receipts": {
              "type": "string",
              "enum": [
                "consume"
              ],
              "description": "Set to \"consume\" to receive undelivered daemon receipts and mark them delivered. Omit for a read that never consumes receipts."
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string"
            },
            "version": {
              "type": "string"
            },
            "buildVersion": {
              "type": "string"
            },
            "platformVersion": {
              "type": "string"
            },
            "receipts": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "text": {
                    "type": "string"
                  },
                  "at": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "text",
                  "at"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "status",
            "version",
            "buildVersion",
            "platformVersion"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "control.web",
        "title": "Control-Plane Web Shell",
        "description": "Return the built-in control-plane HTML shell for external clients.",
        "category": "control-plane",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http"
        ],
        "scopes": [
          "read:control-plane"
        ],
        "http": {
          "method": "GET",
          "path": "/api/control-plane/web"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "html": {
              "type": "string"
            }
          },
          "required": [
            "html"
          ],
          "additionalProperties": false
        },
        "invokable": false,
        "metadata": {
          "responseKind": "html"
        }
      },
      {
        "id": "relay.pairing.mint",
        "title": "Mint A Relay Pairing Payload",
        "description": "Return the pairing payload a surface scans to reach this daemon through the relay: the relay URL to dial, the rendezvous id the daemon registered under, and the daemon's static public key. `pairing` is null, not an error, when there is no live registration to mint against, which is the honest answer for a daemon whose relay is off or has not connected yet, and is the same value the in-process capability returns. Minting does not create a second identity or a second registration; it describes the one that exists.",
        "category": "control-plane",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:control-plane"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "pairing": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "protocol": {
                      "type": "number"
                    },
                    "relayUrl": {
                      "type": "string"
                    },
                    "rid": {
                      "type": "string"
                    },
                    "daemonPublicKey": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "protocol",
                    "relayUrl",
                    "rid",
                    "daemonPublicKey"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "status": {
              "type": "string",
              "enum": [
                "disabled",
                "idle",
                "connecting",
                "registered",
                "reconnecting",
                "stopped"
              ]
            }
          },
          "required": [
            "pairing",
            "status"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "relay.reachability.get",
        "title": "Relay Reachability",
        "description": "Whether this daemon is registered with the relay, and what state its registration is in. `disabled` is a distinct answer from every other one and the distinction is the point: it means a gate is off, `relay.enabled`, the relay-connect capability, or an empty `relay.url`, rather than that a connection is failing. `idle` means the gates are open and nothing has started; `connecting`, `registered` and `reconnecting` are the live registration; `stopped` is a controller that was told to stop. `configured` says whether all three gates are open, so a caller can render \"turn it on\" instead of \"it is broken\". ws-only invoke verb; no REST binding.",
        "category": "control-plane",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "read:control-plane"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "enum": [
                "disabled",
                "idle",
                "connecting",
                "registered",
                "reconnecting",
                "stopped"
              ]
            },
            "configured": {
              "type": "boolean"
            }
          },
          "required": [
            "status",
            "configured"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "update.check",
        "title": "Check For An Update Now",
        "description": "Run one update check immediately instead of waiting for the next interval, and return the status afterwards. This is the same tick the schedule runs, so an on-demand check and the hourly one cannot reach different conclusions. It never forces an install: a downloaded-and-verified release still waits for a moment when no work is in flight, which the returned `pendingVersion` reports. A check that fails is reported in `failedCheckCount` and `lastCheckFailure` rather than refused, the caller asked what the state is, and \"the check failed\" is the answer. On a daemon with no loop armed this returns the same status `update.status` would, with `offReason` saying why nothing ran.",
        "category": "control-plane",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:control-plane"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "armed": {
              "type": "boolean"
            },
            "offReason": {
              "type": "string"
            },
            "currentVersion": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "releasesUrl": {
              "type": "string"
            },
            "checkIntervalMs": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            },
            "firstCheckDelayMs": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            },
            "failedCheckCount": {
              "type": "number"
            },
            "lastCheckFailure": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "pendingVersion": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "rejectedVersion": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "armed",
            "offReason",
            "currentVersion",
            "releasesUrl",
            "checkIntervalMs",
            "firstCheckDelayMs",
            "failedCheckCount",
            "lastCheckFailure",
            "pendingVersion",
            "rejectedVersion"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "update.status",
        "title": "Self-Update Status",
        "description": "Whether this daemon is keeping itself current, and, when it is not, the reason in one line. `armed` is false whenever no loop is running and `offReason` says which gate stopped it: update.auto not set, no artifact identity (a host that manages its own updates), or no release URL to resolve tags from. `failedCheckCount` with `lastCheckFailure` is the case that used to be invisible: checks running on schedule and failing every time, which looks exactly like having nothing to update to. `pendingVersion` is a release already downloaded and verified, waiting for a moment when no work is in flight. `rejectedVersion` is a release that was installed here, failed to start, and was rolled back, it is deliberately not reinstalled.",
        "category": "control-plane",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "read:control-plane"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "armed": {
              "type": "boolean"
            },
            "offReason": {
              "type": "string"
            },
            "currentVersion": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "releasesUrl": {
              "type": "string"
            },
            "checkIntervalMs": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            },
            "firstCheckDelayMs": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            },
            "failedCheckCount": {
              "type": "number"
            },
            "lastCheckFailure": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "pendingVersion": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "rejectedVersion": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "armed",
            "offReason",
            "currentVersion",
            "releasesUrl",
            "checkIntervalMs",
            "firstCheckDelayMs",
            "failedCheckCount",
            "lastCheckFailure",
            "pendingVersion",
            "rejectedVersion"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "cost.attribution.get",
        "title": "Get Cost Attribution",
        "description": "Return windowed (24h/7d) cost attribution over observed LLM usage, grouped by a dimension (agent, tool, hook, mcp, model, provider, session), with cache-aware pricing (fresh input vs cache-read vs cache-write). Honest-unpriced: an unknown model contributes to unpricedRecordCount with a null cost, never a fabricated amount; costState is priced, unpriced, or estimated (a mix). totalCostUsd is null when every contributor is unpriced.",
        "category": "cost",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "read:telemetry"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "window": {
              "type": "string",
              "enum": [
                "24h",
                "7d"
              ]
            },
            "dimension": {
              "type": "string",
              "enum": [
                "agent",
                "tool",
                "hook",
                "mcp",
                "model",
                "provider",
                "session"
              ]
            }
          },
          "required": [
            "window",
            "dimension"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "window": {
              "type": "string",
              "enum": [
                "24h",
                "7d"
              ]
            },
            "windowStartMs": {
              "type": "number"
            },
            "dimension": {
              "type": "string",
              "enum": [
                "agent",
                "tool",
                "hook",
                "mcp",
                "model",
                "provider",
                "session"
              ]
            },
            "totalCostUsd": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            },
            "costState": {
              "type": "string",
              "enum": [
                "priced",
                "estimated",
                "unpriced"
              ]
            },
            "costSource": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "user",
                    "provider",
                    "catalog",
                    "mixed"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "pricingAsOf": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "pricedRecordCount": {
              "type": "number"
            },
            "unpricedRecordCount": {
              "type": "number"
            },
            "tokens": {
              "type": "object",
              "properties": {
                "inputTokens": {
                  "type": "number"
                },
                "outputTokens": {
                  "type": "number"
                },
                "cacheReadTokens": {
                  "type": "number"
                },
                "cacheWriteTokens": {
                  "type": "number"
                }
              },
              "required": [
                "inputTokens",
                "outputTokens",
                "cacheReadTokens",
                "cacheWriteTokens"
              ],
              "additionalProperties": false
            },
            "rows": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string"
                  },
                  "costUsd": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "costState": {
                    "type": "string",
                    "enum": [
                      "priced",
                      "estimated",
                      "unpriced"
                    ]
                  },
                  "costSource": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "user",
                          "provider",
                          "catalog",
                          "mixed"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "pricingAsOf": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "pricedRecordCount": {
                    "type": "number"
                  },
                  "unpricedRecordCount": {
                    "type": "number"
                  },
                  "tokens": {
                    "type": "object",
                    "properties": {
                      "inputTokens": {
                        "type": "number"
                      },
                      "outputTokens": {
                        "type": "number"
                      },
                      "cacheReadTokens": {
                        "type": "number"
                      },
                      "cacheWriteTokens": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "inputTokens",
                      "outputTokens",
                      "cacheReadTokens",
                      "cacheWriteTokens"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "key",
                  "costUsd",
                  "costState",
                  "costSource",
                  "pricingAsOf",
                  "pricedRecordCount",
                  "unpricedRecordCount",
                  "tokens"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "window",
            "windowStartMs",
            "dimension",
            "totalCostUsd",
            "costState",
            "costSource",
            "pricingAsOf",
            "pricedRecordCount",
            "unpricedRecordCount",
            "tokens",
            "rows"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "deliveries.get",
        "title": "Get Delivery",
        "description": "Return a single delivery record.",
        "category": "deliveries",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:deliveries"
        ],
        "http": {
          "method": "GET",
          "path": "/api/deliveries/{deliveryId}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "deliveryId": {
              "type": "string"
            }
          },
          "required": [
            "deliveryId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "delivery": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "runId": {
                  "type": "string"
                },
                "jobId": {
                  "type": "string"
                },
                "target": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "none",
                        "webhook",
                        "surface",
                        "integration",
                        "link"
                      ]
                    },
                    "surfaceKind": {
                      "type": "string",
                      "enum": [
                        "tui",
                        "web",
                        "slack",
                        "discord",
                        "ntfy",
                        "webhook",
                        "homeassistant",
                        "telegram",
                        "google-chat",
                        "signal",
                        "whatsapp",
                        "telephony",
                        "imessage",
                        "msteams",
                        "bluebubbles",
                        "mattermost",
                        "matrix",
                        "service"
                      ]
                    },
                    "address": {
                      "type": "string"
                    },
                    "routeId": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "kind"
                  ],
                  "additionalProperties": false
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "sending",
                    "sent",
                    "failed",
                    "dead_lettered"
                  ]
                },
                "startedAt": {
                  "type": "number"
                },
                "endedAt": {
                  "type": "number"
                },
                "error": {
                  "type": "string"
                },
                "responseId": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "runId",
                "jobId",
                "target",
                "status"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "delivery"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "deliveries.list",
        "title": "List Deliveries",
        "description": "Return delivery records and integration snapshot data.",
        "category": "deliveries",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:deliveries"
        ],
        "http": {
          "method": "GET",
          "path": "/api/deliveries"
        },
        "events": [
          "runtime.deliveries"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "totals": {
              "type": "object",
              "properties": {
                "queued": {
                  "type": "number"
                },
                "started": {
                  "type": "number"
                },
                "succeeded": {
                  "type": "number"
                },
                "failed": {
                  "type": "number"
                },
                "deadLettered": {
                  "type": "number"
                }
              },
              "required": [
                "queued",
                "started",
                "succeeded",
                "failed",
                "deadLettered"
              ],
              "additionalProperties": false
            },
            "attempts": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "runId": {
                    "type": "string"
                  },
                  "jobId": {
                    "type": "string"
                  },
                  "target": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "none",
                          "webhook",
                          "surface",
                          "integration",
                          "link"
                        ]
                      },
                      "surfaceKind": {
                        "type": "string",
                        "enum": [
                          "tui",
                          "web",
                          "slack",
                          "discord",
                          "ntfy",
                          "webhook",
                          "homeassistant",
                          "telegram",
                          "google-chat",
                          "signal",
                          "whatsapp",
                          "telephony",
                          "imessage",
                          "msteams",
                          "bluebubbles",
                          "mattermost",
                          "matrix",
                          "service"
                        ]
                      },
                      "address": {
                        "type": "string"
                      },
                      "routeId": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind"
                    ],
                    "additionalProperties": false
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "pending",
                      "sending",
                      "sent",
                      "failed",
                      "dead_lettered"
                    ]
                  },
                  "startedAt": {
                    "type": "number"
                  },
                  "endedAt": {
                    "type": "number"
                  },
                  "error": {
                    "type": "string"
                  },
                  "responseId": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "runId",
                  "jobId",
                  "target",
                  "status"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "totals",
            "attempts"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "email.draft.create",
        "title": "Create Email Draft",
        "description": "Append a draft message to the configured IMAP Drafts folder. Distinct from the local channel draft store. Requires explicit confirmation.",
        "category": "email",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:email"
        ],
        "http": {
          "method": "POST",
          "path": "/api/email/drafts"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "to": {
              "type": "string"
            },
            "subject": {
              "type": "string"
            },
            "body": {
              "type": "string"
            },
            "inReplyTo": {
              "type": "string"
            },
            "references": {
              "type": "string"
            }
          },
          "required": [
            "to",
            "subject",
            "body"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "draftId": {
              "type": "string"
            },
            "uid": {
              "type": "number"
            },
            "mailbox": {
              "type": "string"
            }
          },
          "required": [
            "draftId",
            "mailbox"
          ],
          "additionalProperties": false
        },
        "dangerous": true,
        "invokable": true
      },
      {
        "id": "email.expectation.cancel",
        "title": "Cancel Verification Expectation",
        "description": "Close an expectation the workstream abandoned. A signup dropped before submission otherwise leaves a live correlation key for an address nobody is waiting on, occupying one of the bounded open slots until its window elapses. Cancelling an id that is not open is an answer, not a failure.",
        "category": "email",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:email"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "cancelled": {
              "type": "boolean"
            },
            "expectation": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "serviceDomain": {
                  "type": "string"
                },
                "recipientAddress": {
                  "type": "string"
                },
                "purpose": {
                  "type": "string"
                },
                "openedAt": {
                  "type": "string"
                },
                "expiresAt": {
                  "type": "string"
                },
                "authority": {
                  "type": "string"
                },
                "remainingMs": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "kind",
                "serviceDomain",
                "recipientAddress",
                "purpose",
                "openedAt",
                "expiresAt",
                "authority"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "cancelled"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "email.expectation.list",
        "title": "List Verification Expectations",
        "description": "Return every open verification expectation with its recipient, service domain, purpose and remaining window. Disclosure: an expectation is a live correlation key, and the owner is entitled to see which ones exist.",
        "category": "email",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "read:email"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "expectations": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string"
                  },
                  "serviceDomain": {
                    "type": "string"
                  },
                  "recipientAddress": {
                    "type": "string"
                  },
                  "purpose": {
                    "type": "string"
                  },
                  "openedAt": {
                    "type": "string"
                  },
                  "expiresAt": {
                    "type": "string"
                  },
                  "authority": {
                    "type": "string"
                  },
                  "remainingMs": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "kind",
                  "serviceDomain",
                  "recipientAddress",
                  "purpose",
                  "openedAt",
                  "expiresAt",
                  "authority"
                ],
                "additionalProperties": false
              }
            },
            "total": {
              "type": "number"
            }
          },
          "required": [
            "expectations",
            "total"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "email.expectation.open",
        "title": "Open Verification Expectation",
        "description": "Register, in advance, that a verification message is expected at one address from one service domain, within a bounded window. Called by the workstream that already holds authority BEFORE it submits the signup or checkout form. Grants evidence-only authority: a matching message proves control of the address and can never start work, widen the expectation or extend its window.",
        "category": "email",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:email"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "serviceDomain": {
              "type": "string"
            },
            "recipientAddress": {
              "type": "string"
            },
            "purpose": {
              "type": "string"
            },
            "windowMs": {
              "type": "number"
            },
            "kind": {
              "type": "string"
            }
          },
          "required": [
            "serviceDomain",
            "recipientAddress",
            "purpose"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "kind": {
              "type": "string"
            },
            "serviceDomain": {
              "type": "string"
            },
            "recipientAddress": {
              "type": "string"
            },
            "purpose": {
              "type": "string"
            },
            "openedAt": {
              "type": "string"
            },
            "expiresAt": {
              "type": "string"
            },
            "authority": {
              "type": "string"
            },
            "remainingMs": {
              "type": "number"
            }
          },
          "required": [
            "id",
            "kind",
            "serviceDomain",
            "recipientAddress",
            "purpose",
            "openedAt",
            "expiresAt",
            "authority"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "email.inbound.status",
        "title": "Inbound Mail Status",
        "description": "Disclose the inbound-mail watcher: whether it is running and why, which source is reading the mailbox and the delay that source actually costs, the current capability verdict, every persisted cursor with its position and age, every open verification expectation with its remaining window, whether each store could be read, whether arriving mail is actually being announced to the owner, and what each store retains before it is reaped. Read-only.",
        "category": "email",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "read:email"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "running": {
              "type": "boolean"
            },
            "mode": {
              "type": "string"
            },
            "reason": {
              "type": "string"
            },
            "account": {
              "type": "string"
            },
            "mailbox": {
              "type": "string"
            },
            "source": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string"
                },
                "basis": {
                  "type": "string"
                },
                "detail": {
                  "type": "string"
                },
                "latency": {
                  "type": "string"
                }
              },
              "required": [
                "basis",
                "detail",
                "latency"
              ],
              "additionalProperties": false
            },
            "capability": {
              "type": "object",
              "properties": {
                "state": {
                  "type": "string"
                },
                "reason": {
                  "type": "string"
                },
                "detail": {
                  "type": "string"
                },
                "fix": {
                  "type": "string"
                }
              },
              "required": [
                "state",
                "reason",
                "detail",
                "fix"
              ],
              "additionalProperties": false
            },
            "cursors": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "account": {
                    "type": "string"
                  },
                  "mailbox": {
                    "type": "string"
                  },
                  "source": {
                    "type": "string"
                  },
                  "position": {
                    "type": "string"
                  },
                  "updatedAt": {
                    "type": "string"
                  },
                  "ageMs": {
                    "type": "number"
                  }
                },
                "required": [
                  "account",
                  "mailbox",
                  "source",
                  "position",
                  "updatedAt",
                  "ageMs"
                ],
                "additionalProperties": false
              }
            },
            "expectations": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "serviceDomain": {
                    "type": "string"
                  },
                  "recipientAddress": {
                    "type": "string"
                  },
                  "purpose": {
                    "type": "string"
                  },
                  "openedAt": {
                    "type": "string"
                  },
                  "expiresAt": {
                    "type": "string"
                  },
                  "remainingMs": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "serviceDomain",
                  "recipientAddress",
                  "purpose",
                  "openedAt",
                  "expiresAt",
                  "remainingMs"
                ],
                "additionalProperties": false
              }
            },
            "retention": {
              "type": "object",
              "properties": {
                "cursors": {
                  "type": "object",
                  "properties": {
                    "kept": {
                      "type": "number"
                    },
                    "maxCursors": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "kept",
                    "maxCursors"
                  ],
                  "additionalProperties": false
                },
                "records": {
                  "type": "object",
                  "properties": {
                    "kept": {
                      "type": "number"
                    },
                    "stored": {
                      "type": "number"
                    },
                    "retentionDays": {
                      "type": "number"
                    },
                    "maxRecords": {
                      "type": "number"
                    },
                    "maxBodyExcerptChars": {
                      "type": "number"
                    },
                    "reapedOnWrite": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "kept",
                    "stored",
                    "retentionDays",
                    "maxRecords",
                    "maxBodyExcerptChars",
                    "reapedOnWrite"
                  ],
                  "additionalProperties": false
                },
                "expectations": {
                  "type": "object",
                  "properties": {
                    "open": {
                      "type": "number"
                    },
                    "maxOpen": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "open",
                    "maxOpen"
                  ],
                  "additionalProperties": false
                },
                "lastSweep": {
                  "type": "object",
                  "properties": {
                    "sweptAt": {
                      "type": "number"
                    },
                    "trigger": {
                      "type": "string"
                    },
                    "summary": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "sweptAt",
                    "trigger",
                    "summary"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "cursors",
                "records",
                "expectations"
              ],
              "additionalProperties": false
            },
            "stores": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "store": {
                    "type": "string"
                  },
                  "state": {
                    "type": "string"
                  },
                  "detail": {
                    "type": "string"
                  }
                },
                "required": [
                  "store",
                  "state",
                  "detail"
                ],
                "additionalProperties": false
              }
            },
            "noticeDelivery": {
              "type": "object",
              "properties": {
                "state": {
                  "type": "string"
                },
                "reason": {
                  "type": "string"
                },
                "detail": {
                  "type": "string"
                },
                "fix": {
                  "type": "string"
                },
                "since": {
                  "type": "string"
                },
                "unannounced": {
                  "type": "number"
                }
              },
              "required": [
                "state"
              ],
              "additionalProperties": false
            },
            "health": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "state": {
                  "type": "string"
                },
                "enabled": {
                  "type": "boolean"
                },
                "account": {
                  "type": "string"
                },
                "mailbox": {
                  "type": "string"
                },
                "mode": {
                  "type": "string"
                },
                "reason": {
                  "type": "string"
                }
              },
              "required": [
                "kind",
                "id",
                "label",
                "state",
                "enabled",
                "account",
                "mailbox",
                "mode",
                "reason"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "enabled",
            "running",
            "mode",
            "reason",
            "account",
            "mailbox",
            "source",
            "cursors",
            "expectations",
            "retention",
            "stores",
            "noticeDelivery",
            "health"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "email.inbox.list",
        "title": "List Email Inbox",
        "description": "Return inbox message summaries fetched live from the configured IMAP account, newest first (ordered by server-assigned UID, never by the sender-written Date header). Read-only (EXAMINE / BODY.PEEK); never marks messages read. When the server answered for a message and the daemon could not read the answer, the page is short and `unreadable` says so, an omitted message is not by itself evidence that it was deleted.",
        "category": "email",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:email"
        ],
        "http": {
          "method": "GET",
          "path": "/api/email/inbox"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "number"
            },
            "since": {
              "type": "string"
            },
            "unreadOnly": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "messages": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "uid": {
                    "type": "number"
                  },
                  "from": {
                    "type": "string"
                  },
                  "subject": {
                    "type": "string"
                  },
                  "date": {
                    "type": "string"
                  },
                  "unread": {
                    "type": "boolean"
                  },
                  "bodyPreview": {
                    "type": "string"
                  },
                  "messageId": {
                    "type": "string"
                  }
                },
                "required": [
                  "uid",
                  "from",
                  "subject",
                  "date",
                  "unread",
                  "bodyPreview",
                  "messageId"
                ],
                "additionalProperties": false
              }
            },
            "total": {
              "type": "number"
            },
            "unreadable": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "uid": {
                    "type": "number"
                  },
                  "detail": {
                    "type": "string"
                  }
                },
                "required": [
                  "detail"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "messages",
            "total"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "email.inbox.read",
        "title": "Read Email Message",
        "description": "Return the full body and attachment metadata for a single inbox message by IMAP UID. Read-only (BODY.PEEK; does not mark as read).",
        "category": "email",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:email"
        ],
        "http": {
          "method": "GET",
          "path": "/api/email/inbox/{uid}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "uid": {
              "type": "number"
            }
          },
          "required": [
            "uid"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "uid": {
              "type": "number"
            },
            "from": {
              "type": "string"
            },
            "subject": {
              "type": "string"
            },
            "date": {
              "type": "string"
            },
            "messageId": {
              "type": "string"
            },
            "bodyText": {
              "type": "string"
            },
            "bodyHtml": {
              "type": "string"
            },
            "attachments": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "filename": {
                    "type": "string"
                  },
                  "contentType": {
                    "type": "string"
                  },
                  "sizeBytes": {
                    "type": "number"
                  }
                },
                "required": [
                  "filename",
                  "contentType",
                  "sizeBytes"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "uid",
            "from",
            "subject",
            "date",
            "messageId",
            "bodyText"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "email.send",
        "title": "Send Email",
        "description": "Send a composed email via the configured SMTP account. Irreversible external send; requires confirm: true and explicit user review of recipients and body.",
        "category": "email",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:email"
        ],
        "http": {
          "method": "POST",
          "path": "/api/email/send"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "to": {
              "type": "string"
            },
            "subject": {
              "type": "string"
            },
            "body": {
              "type": "string"
            },
            "inReplyTo": {
              "type": "string"
            },
            "confirm": {
              "type": "boolean"
            }
          },
          "required": [
            "to",
            "subject",
            "body",
            "confirm"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "messageId": {
              "type": "string"
            },
            "sentAt": {
              "type": "string"
            }
          },
          "required": [
            "messageId",
            "sentAt"
          ],
          "additionalProperties": false
        },
        "dangerous": true,
        "invokable": true
      },
      {
        "id": "flags.graduation.report",
        "title": "Feature Defaults Report",
        "description": "Return the feature defaults report: every platform capability with its current default, default-disposition state (dark = default-off with no evidence, soaking = accumulating evidence, graduate-candidate = judged ready and awaiting a release decision, graduated = default on, blocked = held off with a dated reason), and its validation evidence. Evidence is real-only: a capability with no instrumentation reports \"no evidence collected\", never a fabricated readiness; the permissions divergence simulation is the one wired instrumentation today. releaseBlockers lists every graduate-candidate entry, the release policy (bun run flags:graduation) fails while that list is non-empty, forcing each ready default to flip on or record a dated blocker.",
        "category": "flags",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "read:config"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "generatedAt": {
              "type": "number"
            },
            "entries": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "flagId": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "tier": {
                    "type": "number"
                  },
                  "currentDefault": {
                    "type": "string",
                    "enum": [
                      "enabled",
                      "disabled",
                      "killed"
                    ]
                  },
                  "runtimeToggleable": {
                    "type": "boolean"
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "dark",
                      "soaking",
                      "graduate-candidate",
                      "graduated",
                      "blocked"
                    ]
                  },
                  "evidence": {
                    "type": "object",
                    "properties": {
                      "instrumentation": {
                        "type": "string",
                        "enum": [
                          "divergence-simulation",
                          "none"
                        ]
                      },
                      "divergence": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "divergenceRate": {
                                "type": "number"
                              },
                              "totalEvaluations": {
                                "type": "number"
                              },
                              "gateStatus": {
                                "type": "string",
                                "enum": [
                                  "allowed",
                                  "blocked",
                                  "no_data"
                                ]
                              }
                            },
                            "required": [
                              "divergenceRate",
                              "totalEvaluations",
                              "gateStatus"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "note": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "instrumentation",
                      "divergence",
                      "note"
                    ],
                    "additionalProperties": false
                  },
                  "blocker": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "reason": {
                            "type": "string"
                          },
                          "date": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "reason",
                          "date"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "note": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "flagId",
                  "name",
                  "tier",
                  "currentDefault",
                  "runtimeToggleable",
                  "state",
                  "evidence",
                  "blocker",
                  "note"
                ],
                "additionalProperties": false
              }
            },
            "summary": {
              "type": "object",
              "properties": {
                "total": {
                  "type": "number"
                },
                "dark": {
                  "type": "number"
                },
                "soaking": {
                  "type": "number"
                },
                "graduateCandidate": {
                  "type": "number"
                },
                "graduated": {
                  "type": "number"
                },
                "blocked": {
                  "type": "number"
                }
              },
              "required": [
                "total",
                "dark",
                "soaking",
                "graduateCandidate",
                "graduated",
                "blocked"
              ],
              "additionalProperties": false
            },
            "releaseBlockers": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "generatedAt",
            "entries",
            "summary",
            "releaseBlockers"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "fleet.archive",
        "title": "Archive Finished Fleet Subtree",
        "description": "Move one FINISHED process subtree (root id + all descendants, every node terminal) out of the live fleet view into the session archive. Honest refusal (archived:false + reason) for an unknown id or a subtree with live members. Archived nodes stay inspectable via fleet.archived.list.",
        "category": "fleet",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:fleet"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "archived": {
              "type": "boolean"
            },
            "count": {
              "type": "number"
            },
            "reason": {
              "type": "string"
            }
          },
          "required": [
            "archived",
            "count"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "fleet.archived.list",
        "title": "List Archived Fleet Processes",
        "description": "Return the session-archived process nodes (same node shape as fleet.snapshot; still live-derived from the source managers, so usage/cost stay current).",
        "category": "fleet",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "read:fleet"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "capturedAt": {
              "type": "number"
            },
            "nodes": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "agent",
                      "wrfc-chain",
                      "wrfc-subtask",
                      "workflow",
                      "trigger",
                      "schedule",
                      "watcher",
                      "background-process",
                      "workstream",
                      "phase",
                      "work-item",
                      "acp-agent",
                      "observed-external",
                      "code-index"
                    ]
                  },
                  "parentId": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "task": {
                    "type": "string"
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "thinking",
                      "executing-tool",
                      "awaiting-approval",
                      "streaming",
                      "stalled",
                      "retrying",
                      "done",
                      "failed",
                      "killed",
                      "interrupted",
                      "idle",
                      "queued",
                      "paused"
                    ]
                  },
                  "startedAt": {
                    "type": "number"
                  },
                  "completedAt": {
                    "type": "number"
                  },
                  "elapsedMs": {
                    "type": "number"
                  },
                  "usage": {
                    "type": "object",
                    "properties": {
                      "inputTokens": {
                        "type": "number"
                      },
                      "outputTokens": {
                        "type": "number"
                      },
                      "cacheReadTokens": {
                        "type": "number"
                      },
                      "cacheWriteTokens": {
                        "type": "number"
                      },
                      "reasoningTokens": {
                        "type": "number"
                      },
                      "llmCallCount": {
                        "type": "number"
                      },
                      "turnCount": {
                        "type": "number"
                      },
                      "toolCallCount": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "inputTokens",
                      "outputTokens",
                      "cacheReadTokens",
                      "cacheWriteTokens",
                      "llmCallCount",
                      "turnCount",
                      "toolCallCount"
                    ],
                    "additionalProperties": false
                  },
                  "model": {
                    "type": "string"
                  },
                  "provider": {
                    "type": "string"
                  },
                  "costUsd": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "costState": {
                    "type": "string",
                    "enum": [
                      "priced",
                      "unpriced",
                      "estimated"
                    ]
                  },
                  "costSource": {
                    "type": "string",
                    "enum": [
                      "user",
                      "provider",
                      "catalog",
                      "mixed"
                    ]
                  },
                  "pricingAsOf": {
                    "type": "string"
                  },
                  "currentActivity": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "tool",
                          "output-line",
                          "phase"
                        ]
                      },
                      "text": {
                        "type": "string"
                      },
                      "toolName": {
                        "type": "string"
                      },
                      "at": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "kind",
                      "text",
                      "at"
                    ],
                    "additionalProperties": false
                  },
                  "capabilities": {
                    "type": "object",
                    "properties": {
                      "interruptible": {
                        "type": "boolean"
                      },
                      "killable": {
                        "type": "boolean"
                      },
                      "pausable": {
                        "type": "boolean"
                      },
                      "resumable": {
                        "type": "boolean"
                      },
                      "steerable": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "interruptible",
                      "killable",
                      "pausable",
                      "resumable",
                      "steerable"
                    ],
                    "additionalProperties": false
                  },
                  "needsAttention": {
                    "type": "object",
                    "properties": {
                      "reason": {
                        "type": "string",
                        "enum": [
                          "approval",
                          "input",
                          "pick",
                          "conflict"
                        ]
                      },
                      "detail": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "reason"
                    ],
                    "additionalProperties": false
                  },
                  "sessionRef": {
                    "type": "object",
                    "properties": {
                      "sessionId": {
                        "type": "string"
                      },
                      "agentId": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  },
                  "review": {
                    "type": "object",
                    "properties": {
                      "score": {
                        "type": "number"
                      },
                      "passed": {
                        "type": "boolean"
                      },
                      "cycles": {
                        "type": "number"
                      },
                      "checklist": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "item": {
                              "type": "string"
                            },
                            "verified": {
                              "type": "boolean"
                            },
                            "evidence": {
                              "type": "string"
                            },
                            "howExercised": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "item",
                            "verified",
                            "evidence"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "score",
                      "passed",
                      "cycles",
                      "checklist"
                    ],
                    "additionalProperties": false
                  },
                  "observed": {
                    "type": "object",
                    "properties": {
                      "externalKind": {
                        "type": "string",
                        "enum": [
                          "claude-code",
                          "codex",
                          "opencode",
                          "unknown"
                        ]
                      },
                      "pid": {
                        "type": "number"
                      },
                      "cwd": {
                        "type": "string"
                      },
                      "liveness": {
                        "type": "object",
                        "properties": {
                          "state": {
                            "type": "string",
                            "enum": [
                              "active",
                              "quiet"
                            ]
                          },
                          "cpuSeconds": {
                            "type": "number"
                          },
                          "detail": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "state",
                          "cpuSeconds",
                          "detail"
                        ],
                        "additionalProperties": false
                      },
                      "steer": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "tmux",
                              "none"
                            ]
                          },
                          "paneId": {
                            "type": "string"
                          },
                          "tty": {
                            "type": "string"
                          },
                          "reason": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "kind"
                        ],
                        "additionalProperties": false
                      },
                      "steerDrillInOnly": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "externalKind",
                      "pid",
                      "liveness",
                      "steer",
                      "steerDrillInOnly"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "id",
                  "kind",
                  "label",
                  "state",
                  "elapsedMs",
                  "costState",
                  "capabilities"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "capturedAt",
            "nodes"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "fleet.archiveFinished",
        "title": "Archive All Finished Fleet Subtrees",
        "description": "Archive every root subtree whose nodes are all terminal (done/failed/killed/interrupted). A finished member of a still-running swarm stays with its parent. Returns the number of nodes archived.",
        "category": "fleet",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:fleet"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "archivedCount": {
              "type": "number"
            }
          },
          "required": [
            "archivedCount"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "fleet.attempts.judge",
        "title": "Propose a Best-of-N Winner (Model Judgment)",
        "description": "Run the optional judge model over a best-of-N group's candidates and PROPOSE a winner, with reasons. The output is explicitly model judgment (scoredBy:\"model\"), it never auto-picks unless the source item opted into auto-accept; a human still confirms via fleet.attempts.pick. An engine with no judge configured returns an honest 501.",
        "category": "fleet",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "read:fleet"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "groupId": {
              "type": "string"
            }
          },
          "required": [
            "groupId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "proposedWinnerItemId": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "reasons": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "model": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "scoredBy": {
              "type": "string",
              "enum": [
                "model"
              ]
            }
          },
          "required": [
            "proposedWinnerItemId",
            "reasons",
            "model",
            "scoredBy"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "fleet.attempts.list",
        "title": "List Best-of-N Held-Merge Groups",
        "description": "Return the best-of-N attempt groups whose siblings ran in isolated worktrees and are HELD for a winner pick instead of auto-merging (optionally filtered to one workstream). Each group lists its candidates with their per-attempt diff, usage, and outcome, plus any prior judge proposal. Read-only.",
        "category": "fleet",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "read:fleet"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "workstreamId": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "groups": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "groupId": {
                    "type": "string"
                  },
                  "workstreamId": {
                    "type": "string"
                  },
                  "sourceTitle": {
                    "type": "string"
                  },
                  "ready": {
                    "type": "boolean"
                  },
                  "candidates": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "itemId": {
                          "type": "string"
                        },
                        "attemptIndex": {
                          "type": "number"
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "held-merge",
                            "failed"
                          ]
                        },
                        "title": {
                          "type": "string"
                        },
                        "worktreePath": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "branch": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "usage": {
                          "type": "object",
                          "properties": {
                            "inputTokens": {
                              "type": "number"
                            },
                            "outputTokens": {
                              "type": "number"
                            },
                            "cacheReadTokens": {
                              "type": "number"
                            },
                            "cacheWriteTokens": {
                              "type": "number"
                            },
                            "reasoningTokens": {
                              "type": "number"
                            },
                            "llmCallCount": {
                              "type": "number"
                            },
                            "turnCount": {
                              "type": "number"
                            },
                            "toolCallCount": {
                              "type": "number"
                            },
                            "costUsd": {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "costState": {
                              "type": "string",
                              "enum": [
                                "priced",
                                "unpriced",
                                "estimated"
                              ]
                            },
                            "costSource": {
                              "type": "string",
                              "enum": [
                                "user",
                                "provider",
                                "catalog",
                                "mixed"
                              ]
                            },
                            "pricingAsOf": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "inputTokens",
                            "outputTokens",
                            "cacheReadTokens",
                            "cacheWriteTokens",
                            "llmCallCount",
                            "turnCount",
                            "toolCallCount",
                            "costUsd",
                            "costState"
                          ],
                          "additionalProperties": false
                        },
                        "failureReason": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "diff": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "files": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "unifiedDiff": {
                                  "type": "string"
                                },
                                "stat": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "files",
                                "unifiedDiff",
                                "stat"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "itemId",
                        "attemptIndex",
                        "state",
                        "title",
                        "worktreePath",
                        "branch",
                        "usage",
                        "failureReason",
                        "diff"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "autoAccept": {
                    "type": "boolean"
                  },
                  "judgment": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "proposedWinnerItemId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reasons": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "model": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "scoredBy": {
                            "type": "string",
                            "enum": [
                              "model"
                            ]
                          }
                        },
                        "required": [
                          "proposedWinnerItemId",
                          "reasons",
                          "model",
                          "scoredBy"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "groupId",
                  "workstreamId",
                  "sourceTitle",
                  "ready",
                  "candidates",
                  "autoAccept",
                  "judgment"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "groups"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "fleet.attempts.pick",
        "title": "Pick a Best-of-N Winner",
        "description": "Accept one attempt as the winner of its best-of-N group: its worktree branch is merged through the existing sequential integration lane and every losing sibling's worktree is cleaned. The winner must be a held (passed) candidate of a group whose siblings are all terminal, an unknown/not-ready group or an invalid winner is an honest 409, never a partial merge.",
        "category": "fleet",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:fleet"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "groupId": {
              "type": "string"
            },
            "winnerItemId": {
              "type": "string"
            },
            "confirm": {
              "type": "boolean"
            }
          },
          "required": [
            "groupId",
            "winnerItemId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "applied": {
              "type": "boolean"
            },
            "groupId": {
              "type": "string"
            },
            "winnerItemId": {
              "type": "string"
            },
            "loserItemIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "auto": {
              "type": "boolean"
            },
            "requiresConfirm": {
              "type": "boolean"
            },
            "group": {
              "type": "object",
              "properties": {
                "groupId": {
                  "type": "string"
                },
                "workstreamId": {
                  "type": "string"
                },
                "sourceTitle": {
                  "type": "string"
                },
                "ready": {
                  "type": "boolean"
                },
                "candidates": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "itemId": {
                        "type": "string"
                      },
                      "attemptIndex": {
                        "type": "number"
                      },
                      "state": {
                        "type": "string",
                        "enum": [
                          "held-merge",
                          "failed"
                        ]
                      },
                      "title": {
                        "type": "string"
                      },
                      "worktreePath": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "branch": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "usage": {
                        "type": "object",
                        "properties": {
                          "inputTokens": {
                            "type": "number"
                          },
                          "outputTokens": {
                            "type": "number"
                          },
                          "cacheReadTokens": {
                            "type": "number"
                          },
                          "cacheWriteTokens": {
                            "type": "number"
                          },
                          "reasoningTokens": {
                            "type": "number"
                          },
                          "llmCallCount": {
                            "type": "number"
                          },
                          "turnCount": {
                            "type": "number"
                          },
                          "toolCallCount": {
                            "type": "number"
                          },
                          "costUsd": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "costState": {
                            "type": "string",
                            "enum": [
                              "priced",
                              "unpriced",
                              "estimated"
                            ]
                          },
                          "costSource": {
                            "type": "string",
                            "enum": [
                              "user",
                              "provider",
                              "catalog",
                              "mixed"
                            ]
                          },
                          "pricingAsOf": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "inputTokens",
                          "outputTokens",
                          "cacheReadTokens",
                          "cacheWriteTokens",
                          "llmCallCount",
                          "turnCount",
                          "toolCallCount",
                          "costUsd",
                          "costState"
                        ],
                        "additionalProperties": false
                      },
                      "failureReason": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "diff": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "files": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "unifiedDiff": {
                                "type": "string"
                              },
                              "stat": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "files",
                              "unifiedDiff",
                              "stat"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "itemId",
                      "attemptIndex",
                      "state",
                      "title",
                      "worktreePath",
                      "branch",
                      "usage",
                      "failureReason",
                      "diff"
                    ],
                    "additionalProperties": false
                  }
                },
                "autoAccept": {
                  "type": "boolean"
                },
                "judgment": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "proposedWinnerItemId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reasons": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "model": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "scoredBy": {
                          "type": "string",
                          "enum": [
                            "model"
                          ]
                        }
                      },
                      "required": [
                        "proposedWinnerItemId",
                        "reasons",
                        "model",
                        "scoredBy"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "groupId",
                "workstreamId",
                "sourceTitle",
                "ready",
                "candidates",
                "autoAccept",
                "judgment"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "applied",
            "groupId",
            "winnerItemId"
          ],
          "additionalProperties": false
        },
        "dangerous": true,
        "invokable": true
      },
      {
        "id": "fleet.conflicts.list",
        "title": "List Merge-Conflict Rows",
        "description": "Return every work item whose integration merge CONFLICTED and is waiting on a human: the kept worktree path, item branch, the STRUCTURED conflicting-file list, and the resolution session id once one was spawned. Optionally filtered to one workstream. Read-only.",
        "category": "fleet",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "read:fleet"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "workstreamId": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "conflicts": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "workstreamId": {
                    "type": "string"
                  },
                  "itemId": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "worktreePath": {
                    "type": "string"
                  },
                  "branch": {
                    "type": "string"
                  },
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "resolutionSessionId": {
                    "type": "string"
                  }
                },
                "required": [
                  "workstreamId",
                  "itemId",
                  "title",
                  "worktreePath",
                  "files"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "conflicts"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "fleet.conflicts.resolve",
        "title": "Spawn a Conflict-Resolution Session",
        "description": "The conflict row's one action: spawn a resolution session INSIDE the kept worktree, seeded with the structured conflict list and tree path (the same seeded-session machinery as the CI fix flow), and stamp the REAL session id back onto the item. When the resolution lands and the re-merge succeeds, the kept tree is reclaimed automatically. An item with no unresolved conflict is an honest 409.",
        "category": "fleet",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:fleet"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "itemId": {
              "type": "string"
            }
          },
          "required": [
            "itemId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "itemId": {
              "type": "string"
            },
            "sessionId": {
              "type": "string"
            },
            "worktreePath": {
              "type": "string"
            },
            "files": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "itemId",
            "sessionId",
            "worktreePath",
            "files"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "fleet.graph.get",
        "title": "Get Workstream Task Graph",
        "description": "The dependency-graph view of one workstream: nodes (id, title, state, cluster, files, merge state, blocked reason, orphaned flag, deepest-remaining-path depth, stalled tell, agent), edges (from depends on to), and the elastic-pool state (ready/running counts, at-cap, cap key + size, any spawn refusal). Surfaces render the task graph under the chain from this, the fleet/observability idiom. 404 when the workstream is unknown to this daemon.",
        "category": "fleet",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:fleet"
        ],
        "http": {
          "method": "GET",
          "path": "/api/fleet/workstreams/{workstreamId}/graph"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "workstreamId": {
              "type": "string"
            }
          },
          "required": [
            "workstreamId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "workstreamId": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "nodes": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "state": {
                    "type": "string"
                  },
                  "cluster": {
                    "type": "string"
                  },
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "mergeState": {
                    "type": "string"
                  },
                  "blockedReason": {
                    "type": "string"
                  },
                  "orphaned": {
                    "type": "boolean"
                  },
                  "remainingDepth": {
                    "type": "number"
                  },
                  "stalled": {
                    "type": "boolean"
                  },
                  "agentId": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "title",
                  "state",
                  "files",
                  "orphaned",
                  "remainingDepth",
                  "stalled"
                ],
                "additionalProperties": false
              }
            },
            "edges": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "string"
                  },
                  "to": {
                    "type": "string"
                  }
                },
                "required": [
                  "from",
                  "to"
                ],
                "additionalProperties": false
              }
            },
            "pool": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "ready": {
                      "type": "number"
                    },
                    "running": {
                      "type": "number"
                    },
                    "atCap": {
                      "type": "boolean"
                    },
                    "capKey": {
                      "type": "string"
                    },
                    "maxSize": {
                      "type": "number"
                    },
                    "refusal": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ready",
                    "running",
                    "atCap",
                    "capKey",
                    "maxSize"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "workstreamId",
            "title",
            "nodes",
            "edges",
            "pool"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "fleet.list",
        "title": "List Fleet Processes",
        "description": "Paginated, filtered (kinds/states) query over the live process registry. Cursor pagination returns disjoint pages that union to the full matching set at query time.",
        "category": "fleet",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "read:fleet"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "kinds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "states": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "limit": {
              "type": "number"
            },
            "cursor": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "items": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "agent",
                      "wrfc-chain",
                      "wrfc-subtask",
                      "workflow",
                      "trigger",
                      "schedule",
                      "watcher",
                      "background-process",
                      "workstream",
                      "phase",
                      "work-item",
                      "acp-agent",
                      "observed-external",
                      "code-index"
                    ]
                  },
                  "parentId": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "task": {
                    "type": "string"
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "thinking",
                      "executing-tool",
                      "awaiting-approval",
                      "streaming",
                      "stalled",
                      "retrying",
                      "done",
                      "failed",
                      "killed",
                      "interrupted",
                      "idle",
                      "queued",
                      "paused"
                    ]
                  },
                  "startedAt": {
                    "type": "number"
                  },
                  "completedAt": {
                    "type": "number"
                  },
                  "elapsedMs": {
                    "type": "number"
                  },
                  "usage": {
                    "type": "object",
                    "properties": {
                      "inputTokens": {
                        "type": "number"
                      },
                      "outputTokens": {
                        "type": "number"
                      },
                      "cacheReadTokens": {
                        "type": "number"
                      },
                      "cacheWriteTokens": {
                        "type": "number"
                      },
                      "reasoningTokens": {
                        "type": "number"
                      },
                      "llmCallCount": {
                        "type": "number"
                      },
                      "turnCount": {
                        "type": "number"
                      },
                      "toolCallCount": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "inputTokens",
                      "outputTokens",
                      "cacheReadTokens",
                      "cacheWriteTokens",
                      "llmCallCount",
                      "turnCount",
                      "toolCallCount"
                    ],
                    "additionalProperties": false
                  },
                  "model": {
                    "type": "string"
                  },
                  "provider": {
                    "type": "string"
                  },
                  "costUsd": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "costState": {
                    "type": "string",
                    "enum": [
                      "priced",
                      "unpriced",
                      "estimated"
                    ]
                  },
                  "costSource": {
                    "type": "string",
                    "enum": [
                      "user",
                      "provider",
                      "catalog",
                      "mixed"
                    ]
                  },
                  "pricingAsOf": {
                    "type": "string"
                  },
                  "currentActivity": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "tool",
                          "output-line",
                          "phase"
                        ]
                      },
                      "text": {
                        "type": "string"
                      },
                      "toolName": {
                        "type": "string"
                      },
                      "at": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "kind",
                      "text",
                      "at"
                    ],
                    "additionalProperties": false
                  },
                  "capabilities": {
                    "type": "object",
                    "properties": {
                      "interruptible": {
                        "type": "boolean"
                      },
                      "killable": {
                        "type": "boolean"
                      },
                      "pausable": {
                        "type": "boolean"
                      },
                      "resumable": {
                        "type": "boolean"
                      },
                      "steerable": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "interruptible",
                      "killable",
                      "pausable",
                      "resumable",
                      "steerable"
                    ],
                    "additionalProperties": false
                  },
                  "needsAttention": {
                    "type": "object",
                    "properties": {
                      "reason": {
                        "type": "string",
                        "enum": [
                          "approval",
                          "input",
                          "pick",
                          "conflict"
                        ]
                      },
                      "detail": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "reason"
                    ],
                    "additionalProperties": false
                  },
                  "sessionRef": {
                    "type": "object",
                    "properties": {
                      "sessionId": {
                        "type": "string"
                      },
                      "agentId": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  },
                  "review": {
                    "type": "object",
                    "properties": {
                      "score": {
                        "type": "number"
                      },
                      "passed": {
                        "type": "boolean"
                      },
                      "cycles": {
                        "type": "number"
                      },
                      "checklist": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "item": {
                              "type": "string"
                            },
                            "verified": {
                              "type": "boolean"
                            },
                            "evidence": {
                              "type": "string"
                            },
                            "howExercised": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "item",
                            "verified",
                            "evidence"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "score",
                      "passed",
                      "cycles",
                      "checklist"
                    ],
                    "additionalProperties": false
                  },
                  "observed": {
                    "type": "object",
                    "properties": {
                      "externalKind": {
                        "type": "string",
                        "enum": [
                          "claude-code",
                          "codex",
                          "opencode",
                          "unknown"
                        ]
                      },
                      "pid": {
                        "type": "number"
                      },
                      "cwd": {
                        "type": "string"
                      },
                      "liveness": {
                        "type": "object",
                        "properties": {
                          "state": {
                            "type": "string",
                            "enum": [
                              "active",
                              "quiet"
                            ]
                          },
                          "cpuSeconds": {
                            "type": "number"
                          },
                          "detail": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "state",
                          "cpuSeconds",
                          "detail"
                        ],
                        "additionalProperties": false
                      },
                      "steer": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "tmux",
                              "none"
                            ]
                          },
                          "paneId": {
                            "type": "string"
                          },
                          "tty": {
                            "type": "string"
                          },
                          "reason": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "kind"
                        ],
                        "additionalProperties": false
                      },
                      "steerDrillInOnly": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "externalKind",
                      "pid",
                      "liveness",
                      "steer",
                      "steerDrillInOnly"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "id",
                  "kind",
                  "label",
                  "state",
                  "elapsedMs",
                  "costState",
                  "capabilities"
                ],
                "additionalProperties": true
              }
            },
            "nextCursor": {
              "type": "string"
            },
            "hasMore": {
              "type": "boolean"
            },
            "capturedAt": {
              "type": "number"
            }
          },
          "required": [
            "items",
            "hasMore",
            "capturedAt"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "fleet.observed.steer",
        "title": "Steer an Observed Foreign Agent",
        "description": "Drill-in steer of an externally-launched coding-agent session goodvibes only OBSERVES (a Claude Code / Codex process it did not spawn or host). The steer rides the foreign session's own control channel, for a tmux-hosted session, the exact three-send recipe (message text, then two Enters) targeted at its pane. queued:false with an honest reason when the row exposes no channel (no controlling terminal / no tmux pane) or a send fails. STOP is never offered on an observed row, observing and steering is not owning the lifecycle. Weighted as a drill-in capability (see the node's observed.steerDrillInOnly), never a bulk affordance.",
        "category": "fleet",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:fleet"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "text": {
              "type": "string"
            }
          },
          "required": [
            "id",
            "text"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "queued": {
              "type": "boolean"
            },
            "messageId": {
              "type": "string"
            },
            "reason": {
              "type": "string"
            }
          },
          "required": [
            "queued"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "fleet.snapshot",
        "title": "Fleet Snapshot",
        "description": "Return a point-in-time capture of every live/completed runtime process (agents, WRFC chains/subtasks, workflow FSMs/triggers/schedules, watchers, background processes) as a flat, parentId-linked node list. Capped at 2000 nodes (truncated:true + totalCount when the live fleet exceeds the cap), use fleet.list to page through a larger fleet.",
        "category": "fleet",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "read:fleet"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "capturedAt": {
              "type": "number"
            },
            "nodes": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "agent",
                      "wrfc-chain",
                      "wrfc-subtask",
                      "workflow",
                      "trigger",
                      "schedule",
                      "watcher",
                      "background-process",
                      "workstream",
                      "phase",
                      "work-item",
                      "acp-agent",
                      "observed-external",
                      "code-index"
                    ]
                  },
                  "parentId": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "task": {
                    "type": "string"
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "thinking",
                      "executing-tool",
                      "awaiting-approval",
                      "streaming",
                      "stalled",
                      "retrying",
                      "done",
                      "failed",
                      "killed",
                      "interrupted",
                      "idle",
                      "queued",
                      "paused"
                    ]
                  },
                  "startedAt": {
                    "type": "number"
                  },
                  "completedAt": {
                    "type": "number"
                  },
                  "elapsedMs": {
                    "type": "number"
                  },
                  "usage": {
                    "type": "object",
                    "properties": {
                      "inputTokens": {
                        "type": "number"
                      },
                      "outputTokens": {
                        "type": "number"
                      },
                      "cacheReadTokens": {
                        "type": "number"
                      },
                      "cacheWriteTokens": {
                        "type": "number"
                      },
                      "reasoningTokens": {
                        "type": "number"
                      },
                      "llmCallCount": {
                        "type": "number"
                      },
                      "turnCount": {
                        "type": "number"
                      },
                      "toolCallCount": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "inputTokens",
                      "outputTokens",
                      "cacheReadTokens",
                      "cacheWriteTokens",
                      "llmCallCount",
                      "turnCount",
                      "toolCallCount"
                    ],
                    "additionalProperties": false
                  },
                  "model": {
                    "type": "string"
                  },
                  "provider": {
                    "type": "string"
                  },
                  "costUsd": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "costState": {
                    "type": "string",
                    "enum": [
                      "priced",
                      "unpriced",
                      "estimated"
                    ]
                  },
                  "costSource": {
                    "type": "string",
                    "enum": [
                      "user",
                      "provider",
                      "catalog",
                      "mixed"
                    ]
                  },
                  "pricingAsOf": {
                    "type": "string"
                  },
                  "currentActivity": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "tool",
                          "output-line",
                          "phase"
                        ]
                      },
                      "text": {
                        "type": "string"
                      },
                      "toolName": {
                        "type": "string"
                      },
                      "at": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "kind",
                      "text",
                      "at"
                    ],
                    "additionalProperties": false
                  },
                  "capabilities": {
                    "type": "object",
                    "properties": {
                      "interruptible": {
                        "type": "boolean"
                      },
                      "killable": {
                        "type": "boolean"
                      },
                      "pausable": {
                        "type": "boolean"
                      },
                      "resumable": {
                        "type": "boolean"
                      },
                      "steerable": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "interruptible",
                      "killable",
                      "pausable",
                      "resumable",
                      "steerable"
                    ],
                    "additionalProperties": false
                  },
                  "needsAttention": {
                    "type": "object",
                    "properties": {
                      "reason": {
                        "type": "string",
                        "enum": [
                          "approval",
                          "input",
                          "pick",
                          "conflict"
                        ]
                      },
                      "detail": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "reason"
                    ],
                    "additionalProperties": false
                  },
                  "sessionRef": {
                    "type": "object",
                    "properties": {
                      "sessionId": {
                        "type": "string"
                      },
                      "agentId": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  },
                  "review": {
                    "type": "object",
                    "properties": {
                      "score": {
                        "type": "number"
                      },
                      "passed": {
                        "type": "boolean"
                      },
                      "cycles": {
                        "type": "number"
                      },
                      "checklist": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "item": {
                              "type": "string"
                            },
                            "verified": {
                              "type": "boolean"
                            },
                            "evidence": {
                              "type": "string"
                            },
                            "howExercised": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "item",
                            "verified",
                            "evidence"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "score",
                      "passed",
                      "cycles",
                      "checklist"
                    ],
                    "additionalProperties": false
                  },
                  "observed": {
                    "type": "object",
                    "properties": {
                      "externalKind": {
                        "type": "string",
                        "enum": [
                          "claude-code",
                          "codex",
                          "opencode",
                          "unknown"
                        ]
                      },
                      "pid": {
                        "type": "number"
                      },
                      "cwd": {
                        "type": "string"
                      },
                      "liveness": {
                        "type": "object",
                        "properties": {
                          "state": {
                            "type": "string",
                            "enum": [
                              "active",
                              "quiet"
                            ]
                          },
                          "cpuSeconds": {
                            "type": "number"
                          },
                          "detail": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "state",
                          "cpuSeconds",
                          "detail"
                        ],
                        "additionalProperties": false
                      },
                      "steer": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "tmux",
                              "none"
                            ]
                          },
                          "paneId": {
                            "type": "string"
                          },
                          "tty": {
                            "type": "string"
                          },
                          "reason": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "kind"
                        ],
                        "additionalProperties": false
                      },
                      "steerDrillInOnly": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "externalKind",
                      "pid",
                      "liveness",
                      "steer",
                      "steerDrillInOnly"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "id",
                  "kind",
                  "label",
                  "state",
                  "elapsedMs",
                  "costState",
                  "capabilities"
                ],
                "additionalProperties": true
              }
            },
            "truncated": {
              "type": "boolean"
            },
            "totalCount": {
              "type": "number"
            }
          },
          "required": [
            "capturedAt",
            "nodes",
            "truncated",
            "totalCount"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "fleet.unarchive",
        "title": "Restore Archived Fleet Subtree",
        "description": "Return an archived subtree to the live fleet view. Returns the number of nodes restored (0 when nothing under the id was archived).",
        "category": "fleet",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:fleet"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "restored": {
              "type": "number"
            }
          },
          "required": [
            "restored"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "health.snapshot",
        "title": "Health Snapshot",
        "description": "Return the health integration snapshot.",
        "category": "health",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:health"
        ],
        "http": {
          "method": "GET",
          "path": "/api/health"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "overall": {
              "type": "string",
              "enum": [
                "healthy",
                "degraded"
              ]
            },
            "degradedDomains": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "providerProblems": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "mcpProblems": {
              "type": "object",
              "properties": {
                "degraded": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "quarantined": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "degraded",
                "quarantined"
              ],
              "additionalProperties": false
            },
            "integrationProblems": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "network": {
              "type": "object",
              "properties": {
                "controlPlane": {
                  "type": "object",
                  "properties": {
                    "surface": {
                      "type": "string",
                      "enum": [
                        "controlPlane",
                        "httpListener"
                      ]
                    },
                    "host": {
                      "type": "string"
                    },
                    "port": {
                      "type": "number"
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "off",
                        "proxy",
                        "direct"
                      ]
                    },
                    "scheme": {
                      "type": "string",
                      "enum": [
                        "http",
                        "https"
                      ]
                    },
                    "trustProxy": {
                      "type": "boolean"
                    },
                    "certFile": {
                      "type": "string"
                    },
                    "keyFile": {
                      "type": "string"
                    },
                    "usingDefaultPaths": {
                      "type": "boolean"
                    },
                    "ready": {
                      "type": "boolean"
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "keyPermissions": {
                      "type": "object",
                      "properties": {
                        "available": {
                          "type": "boolean"
                        },
                        "safe": {
                          "type": "boolean"
                        },
                        "mode": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "available"
                      ],
                      "additionalProperties": true
                    }
                  },
                  "required": [
                    "surface",
                    "host",
                    "port",
                    "mode",
                    "scheme",
                    "trustProxy",
                    "usingDefaultPaths",
                    "ready",
                    "errors"
                  ],
                  "additionalProperties": true
                },
                "httpListener": {
                  "type": "object",
                  "properties": {
                    "surface": {
                      "type": "string",
                      "enum": [
                        "controlPlane",
                        "httpListener"
                      ]
                    },
                    "host": {
                      "type": "string"
                    },
                    "port": {
                      "type": "number"
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "off",
                        "proxy",
                        "direct"
                      ]
                    },
                    "scheme": {
                      "type": "string",
                      "enum": [
                        "http",
                        "https"
                      ]
                    },
                    "trustProxy": {
                      "type": "boolean"
                    },
                    "certFile": {
                      "type": "string"
                    },
                    "keyFile": {
                      "type": "string"
                    },
                    "usingDefaultPaths": {
                      "type": "boolean"
                    },
                    "ready": {
                      "type": "boolean"
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "keyPermissions": {
                      "type": "object",
                      "properties": {
                        "available": {
                          "type": "boolean"
                        },
                        "safe": {
                          "type": "boolean"
                        },
                        "mode": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "available"
                      ],
                      "additionalProperties": true
                    }
                  },
                  "required": [
                    "surface",
                    "host",
                    "port",
                    "mode",
                    "scheme",
                    "trustProxy",
                    "usingDefaultPaths",
                    "ready",
                    "errors"
                  ],
                  "additionalProperties": true
                },
                "outbound": {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "enum": [
                        "bundled",
                        "bundled+custom",
                        "custom"
                      ]
                    },
                    "allowInsecureLocalhost": {
                      "type": "boolean"
                    },
                    "customCaFile": {
                      "type": "string"
                    },
                    "customCaDir": {
                      "type": "string"
                    },
                    "customCaEntryCount": {
                      "type": "number"
                    },
                    "effectiveCaStrategy": {
                      "type": "string",
                      "enum": [
                        "bun-default",
                        "bundled+custom",
                        "custom"
                      ]
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "mode",
                    "allowInsecureLocalhost",
                    "customCaEntryCount",
                    "effectiveCaStrategy",
                    "errors"
                  ],
                  "additionalProperties": true
                }
              },
              "required": [
                "controlPlane",
                "httpListener",
                "outbound"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "overall",
            "degradedDomains",
            "providerProblems",
            "mcpProblems",
            "integrationProblems"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "ops.memory.get",
        "title": "Get Memory Governance State",
        "description": "The MemoryGovernor snapshot: the current memory-pressure tier and budget, resident set size and heap, per-cache footprints the governor can shrink, which deferrable background jobs are paused, and the leak-tripwire state. Read-only observability so operators can see the daemon shedding memory before it approaches OOM.",
        "category": "health",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:health"
        ],
        "http": {
          "method": "GET",
          "path": "/api/ops/memory"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "tier": {
              "type": "string",
              "enum": [
                "normal",
                "elevated",
                "high",
                "critical"
              ]
            },
            "budgetMb": {
              "type": "number"
            },
            "rssMb": {
              "type": "number"
            },
            "heapUsedMb": {
              "type": "number"
            },
            "heapTotalMb": {
              "type": "number"
            },
            "usedPct": {
              "type": "number"
            },
            "refusingExpensiveWork": {
              "type": "boolean"
            },
            "caches": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "entries": {
                    "type": "number"
                  },
                  "estimatedBytes": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "name",
                  "entries"
                ],
                "additionalProperties": false
              }
            },
            "pausedJobs": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "tripwire": {
              "type": "object",
              "properties": {
                "armed": {
                  "type": "boolean"
                },
                "sustainedSec": {
                  "type": "number"
                },
                "rateMbPerSec": {
                  "type": "number"
                }
              },
              "required": [
                "armed",
                "sustainedSec",
                "rateMbPerSec"
              ],
              "additionalProperties": false
            },
            "thresholds": {
              "type": "object",
              "properties": {
                "elevatedPct": {
                  "type": "number"
                },
                "highPct": {
                  "type": "number"
                },
                "criticalPct": {
                  "type": "number"
                }
              },
              "required": [
                "elevatedPct",
                "highPct",
                "criticalPct"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "tier",
            "budgetMb",
            "rssMb",
            "heapUsedMb",
            "usedPct",
            "refusingExpensiveWork",
            "caches",
            "pausedJobs",
            "tripwire",
            "thresholds"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "power.keepAwake.set",
        "title": "Set the Owner Keep-Awake Toggle",
        "description": "Turn the owner keep-awake toggle on or off: a daemon-held sleep inhibitor INDEPENDENT of work state, surviving surface closes, persisted as power.keepAwake. Covers idle + sleep + lid-switch classes where grantable; the returned state names any refused class honestly. No timers, no AC-only sub-options, the always-visible chip is the safety mechanism. Emits runtime.ops OPS_POWER_STATE_CHANGED so every attached surface updates its chip.",
        "category": "health",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:config"
        ],
        "http": {
          "method": "POST",
          "path": "/api/power/keep-awake"
        },
        "events": [
          "runtime.ops"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            }
          },
          "required": [
            "enabled"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "platform": {
              "type": "string"
            },
            "work": {
              "type": "object",
              "properties": {
                "held": {
                  "type": "boolean"
                },
                "grantedClasses": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "handle-lid-switch",
                      "idle",
                      "sleep"
                    ]
                  }
                },
                "deniedClasses": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "handle-lid-switch",
                      "idle",
                      "sleep"
                    ]
                  }
                },
                "reasons": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "heldSince": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "capMinutes": {
                  "type": "number"
                },
                "capExpiresAt": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "capExpired": {
                  "type": "boolean"
                }
              },
              "required": [
                "held",
                "grantedClasses",
                "deniedClasses",
                "reasons",
                "heldSince",
                "capMinutes",
                "capExpiresAt",
                "capExpired"
              ],
              "additionalProperties": false
            },
            "keepAwake": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean"
                },
                "held": {
                  "type": "boolean"
                },
                "grantedClasses": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "handle-lid-switch",
                      "idle",
                      "sleep"
                    ]
                  }
                },
                "deniedClasses": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "handle-lid-switch",
                      "idle",
                      "sleep"
                    ]
                  }
                },
                "note": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "enabled",
                "held",
                "grantedClasses",
                "deniedClasses",
                "note"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "platform",
            "work",
            "keepAwake"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "power.status.get",
        "title": "Get Sleep-Ownership State",
        "description": "The host sleep-ownership state: whether the automatic work inhibitor is held (and the live \"held because X\" reasons, cap, and expiry), and the owner keep-awake toggle with the classes the OS actually granted vs refused, a refused lid-switch block is stated honestly (\"idle sleep blocked; lid-close suspend is controlled by your OS here\"), never papered over. Surfaces render the always-visible \"sleep disabled\" chip from this state and the runtime.ops OPS_POWER_STATE_CHANGED event.",
        "category": "health",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:health"
        ],
        "http": {
          "method": "GET",
          "path": "/api/power/status"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "platform": {
              "type": "string"
            },
            "work": {
              "type": "object",
              "properties": {
                "held": {
                  "type": "boolean"
                },
                "grantedClasses": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "handle-lid-switch",
                      "idle",
                      "sleep"
                    ]
                  }
                },
                "deniedClasses": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "handle-lid-switch",
                      "idle",
                      "sleep"
                    ]
                  }
                },
                "reasons": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "heldSince": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "capMinutes": {
                  "type": "number"
                },
                "capExpiresAt": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "capExpired": {
                  "type": "boolean"
                }
              },
              "required": [
                "held",
                "grantedClasses",
                "deniedClasses",
                "reasons",
                "heldSince",
                "capMinutes",
                "capExpiresAt",
                "capExpired"
              ],
              "additionalProperties": false
            },
            "keepAwake": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean"
                },
                "held": {
                  "type": "boolean"
                },
                "grantedClasses": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "handle-lid-switch",
                      "idle",
                      "sleep"
                    ]
                  }
                },
                "deniedClasses": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "handle-lid-switch",
                      "idle",
                      "sleep"
                    ]
                  }
                },
                "note": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "enabled",
                "held",
                "grantedClasses",
                "deniedClasses",
                "note"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "platform",
            "work",
            "keepAwake"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "voice.local.install",
        "title": "Install the Managed Local-Voice Runtime",
        "description": "One-act setup: download + checksum-verify the piper TTS engine, a default voice, and (where a pinned goodvibes-built bundle exists) the whisper.cpp STT engine with its default model into the goodvibes-managed directory, then point the voice.local.* config keys at the managed install, never overwriting a key you already set to a custom value (skipped keys are reported). After this, local TTS works with zero further configuration. Downloads only when you ask; a failed or checksum-mismatched download keeps nothing.",
        "category": "health",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:config"
        ],
        "http": {
          "method": "POST",
          "path": "/api/voice/local/install"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "provisioned": {
              "type": "boolean"
            },
            "platform": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "tts": {
              "type": "object",
              "properties": {
                "engine": {
                  "type": "string"
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "provisioned",
                    "unsupported-platform",
                    "download-failed",
                    "checksum-mismatch"
                  ]
                },
                "binaryPath": {
                  "type": "string"
                },
                "modelPath": {
                  "type": "string"
                },
                "reason": {
                  "type": "string"
                }
              },
              "required": [
                "engine",
                "state"
              ],
              "additionalProperties": false
            },
            "stt": {
              "type": "object",
              "properties": {
                "engine": {
                  "type": "string"
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "provisioned",
                    "unsupported-platform",
                    "download-failed",
                    "checksum-mismatch",
                    "bundle-unavailable",
                    "sideload-mismatch"
                  ]
                },
                "binaryPath": {
                  "type": "string"
                },
                "modelPath": {
                  "type": "string"
                },
                "reason": {
                  "type": "string"
                }
              },
              "required": [
                "engine",
                "state"
              ],
              "additionalProperties": false
            },
            "components": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "installed",
                      "skipped",
                      "failed"
                    ]
                  },
                  "bytes": {
                    "type": "number"
                  },
                  "error": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "state"
                ],
                "additionalProperties": false
              }
            },
            "configured": {
              "type": "object",
              "properties": {
                "set": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "key": {
                        "type": "string"
                      },
                      "value": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "key",
                      "value"
                    ],
                    "additionalProperties": false
                  }
                },
                "skipped": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "key": {
                        "type": "string"
                      },
                      "reason": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "key",
                      "reason"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "set",
                "skipped"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "provisioned",
            "platform",
            "tts",
            "stt",
            "components",
            "configured"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "voice.local.status",
        "title": "Get Managed Local-Voice Runtime State",
        "description": "Whether the managed local voice runtime (piper TTS + a default voice) is installed: not-provisioned (with a size-labeled offer), partial, provisioned, or unsupported-platform. STT (whisper.cpp) reports its own managed state: goodvibes builds and pins the whisper.cpp bundle per platform (no official prebuilt exists; provisioning never compiles on your machine), so where a pinned bundle exists STT provisions like TTS, and elsewhere it reports unsupported honestly. While a voice.local.install run is active, the response also carries installInProgress, the live per-component progress (phase, byte sizes where known) of that run, so surfaces poll this read during the install to render real progress; the section is absent when no install is running. Read-only.",
        "category": "health",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:health"
        ],
        "http": {
          "method": "GET",
          "path": "/api/voice/local/status"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "platform": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "state": {
              "type": "string",
              "enum": [
                "not-provisioned",
                "partial",
                "provisioned",
                "unsupported-platform"
              ]
            },
            "tts": {
              "type": "object",
              "properties": {
                "engine": {
                  "type": "string"
                },
                "binaryPresent": {
                  "type": "boolean"
                },
                "voicePresent": {
                  "type": "boolean"
                },
                "binaryPath": {
                  "type": "string"
                },
                "modelPath": {
                  "type": "string"
                }
              },
              "required": [
                "engine",
                "binaryPresent",
                "voicePresent",
                "binaryPath",
                "modelPath"
              ],
              "additionalProperties": false
            },
            "stt": {
              "type": "object",
              "properties": {
                "engine": {
                  "type": "string"
                },
                "supported": {
                  "type": "boolean"
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "not-provisioned",
                    "partial",
                    "provisioned",
                    "unsupported-platform"
                  ]
                },
                "binaryPresent": {
                  "type": "boolean"
                },
                "modelPresent": {
                  "type": "boolean"
                },
                "binaryPath": {
                  "type": "string"
                },
                "modelPath": {
                  "type": "string"
                },
                "reason": {
                  "type": "string"
                }
              },
              "required": [
                "engine",
                "supported",
                "state",
                "binaryPresent",
                "modelPresent",
                "binaryPath",
                "modelPath"
              ],
              "additionalProperties": false
            },
            "offerBytes": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            },
            "installInProgress": {
              "type": "object",
              "properties": {
                "startedAt": {
                  "type": "number"
                },
                "components": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "component": {
                        "type": "string"
                      },
                      "phase": {
                        "type": "string",
                        "enum": [
                          "skip",
                          "download",
                          "verify",
                          "extract",
                          "done",
                          "error"
                        ]
                      },
                      "message": {
                        "type": "string"
                      },
                      "bytesTotal": {
                        "type": "number"
                      },
                      "bytesDone": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "component",
                      "phase"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "startedAt",
                "components"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "platform",
            "state",
            "tts",
            "stt",
            "offerBytes"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "voice.wake.model.get",
        "title": "Read Wake-Word Model Bytes",
        "description": "Read one provisioned wake artifact in bounded chunks, for a surface that cannot fetch it itself, a browser tab, whose cross-origin fetch of the release asset is refused because that asset answers with no CORS header. Each chunk carries the offset, the whole artifact's size, and its PINNED sha256, so a client reassembles the file and verifies it against the pin: a truncated transfer fails at the consumer instead of loading as a model that silently never detects. Both classifier formats are served, \"classifier\" is the onnx build a browser tab loads, \"tflite\" the same classifier for a runtime that cannot, as is the speech gate voice.wake.vadThreshold runs (\"vad\"), and so is the attribution NOTICE of each redistributable artifact (\"notice\" for the classifier, \"embedding-notice\" for the front end, \"vad-notice\" for the gate), because a client that can fetch the bytes but not the NOTICE cannot satisfy the terms it received them under. Serves what is on disk and does not download; installation puts it there, and voice.wake.provision is the recovery path when it is missing.",
        "category": "health",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:health"
        ],
        "http": {
          "method": "GET",
          "path": "/api/voice/wake/model"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "component": {
              "type": "string",
              "enum": [
                "classifier",
                "tflite",
                "embedding",
                "notice",
                "embedding-notice",
                "vad",
                "vad-notice"
              ]
            },
            "offset": {
              "type": "number"
            },
            "maxBytes": {
              "type": "number"
            }
          },
          "required": [
            "component"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "component": {
              "type": "string",
              "enum": [
                "classifier",
                "tflite",
                "embedding",
                "notice",
                "embedding-notice",
                "vad",
                "vad-notice"
              ]
            },
            "offset": {
              "type": "number"
            },
            "bytes": {
              "type": "number"
            },
            "totalBytes": {
              "type": "number"
            },
            "sha256": {
              "type": "string"
            },
            "dataBase64": {
              "type": "string"
            },
            "complete": {
              "type": "boolean"
            }
          },
          "required": [
            "component",
            "offset",
            "bytes",
            "totalBytes",
            "sha256",
            "dataBase64",
            "complete"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "voice.wake.provision",
        "title": "Download the Wake-Word Models",
        "description": "Download and checksum-verify the pinned wake-word classifier in both runtime formats (onnx and tflite), the speech-embedding front end, the speech gate voice.wake.vadThreshold runs, and the attribution NOTICE of each, into the goodvibes-managed directory, about 6.1 MB. Installing goodvibes already does this, and a daemon retries at boot, so this verb is the RECOVERY path: an install that was offline, an artifact that failed verification, or a re-provision after the pinned model changes. Resumable by re-running: an artifact that already matches its pin is skipped, and one that is present but fails verification is replaced rather than used. A failed or mismatched download keeps nothing at the destination. Single-flight: two surfaces asking at once, or a boot attempt and a user asking, join one download instead of racing for the same files.",
        "category": "health",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:config"
        ],
        "http": {
          "method": "POST",
          "path": "/api/voice/wake/provision"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ready": {
              "type": "boolean"
            },
            "mobileFormatReady": {
              "type": "boolean"
            },
            "vadReady": {
              "type": "boolean"
            },
            "modelVersion": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "noticePath": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "embeddingNoticePath": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "recallIsSyntheticOnly": {
              "type": "boolean"
            },
            "outcomes": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "component": {
                    "type": "string",
                    "enum": [
                      "classifier",
                      "mobile-classifier",
                      "notice",
                      "embedding",
                      "embedding-notice",
                      "vad",
                      "vad-notice"
                    ]
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "installed",
                      "skipped",
                      "failed"
                    ]
                  },
                  "path": {
                    "type": "string"
                  },
                  "bytes": {
                    "type": "number"
                  },
                  "error": {
                    "type": "string"
                  }
                },
                "required": [
                  "component",
                  "state",
                  "path"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "ready",
            "mobileFormatReady",
            "vadReady",
            "modelVersion",
            "noticePath",
            "embeddingNoticePath",
            "recallIsSyntheticOnly",
            "outcomes"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "voice.wake.status",
        "title": "Get Wake-Word Model State",
        "description": "Whether the pinned wake-word artifacts are on disk and VERIFIED BY CONTENT: the \"hey goodvibes\" classifier, the tflite form of the same classifier, the speech-embedding front end the classifier sits behind, the speech gate voice.wake.vadThreshold runs, and the attribution NOTICE belonging to each of the three redistributable artifacts (the classifier's, the front end's and the gate's). Each reports verified, corrupt (present but failing its checksum, a truncated or swapped file, distinct from missing) and its byte size, with the total a fresh provision would download. Installing goodvibes provisions these, and a daemon retries at boot whatever the install could not fetch, so on a normal machine this reads ready without anyone having run a setup command; an offline install reports not-provisioned here until it is retried. The overall ready flag covers the classifier, the front end and both of THEIR NOTICEs, an artifact whose attribution is missing is not one this daemon may serve, and excludes two things: the tflite twin, which nothing here loads, so a host missing just that can still detect; and the speech gate, reported as vadReady instead, because voice.wake.vadThreshold defaults to 0 and the detector runs without it. Also restates that the model's published recall figures are measured on synthesised speech only, which any surface describing the model must carry. Never downloads. Read-only.",
        "category": "health",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:health"
        ],
        "http": {
          "method": "GET",
          "path": "/api/voice/wake/status"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ready": {
              "type": "boolean"
            },
            "reason": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "classifier": {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string"
                },
                "verified": {
                  "type": "boolean"
                },
                "corrupt": {
                  "type": "boolean"
                },
                "bytes": {
                  "type": "number"
                }
              },
              "required": [
                "path",
                "verified",
                "corrupt",
                "bytes"
              ],
              "additionalProperties": false
            },
            "mobileClassifier": {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string"
                },
                "verified": {
                  "type": "boolean"
                },
                "corrupt": {
                  "type": "boolean"
                },
                "bytes": {
                  "type": "number"
                }
              },
              "required": [
                "path",
                "verified",
                "corrupt",
                "bytes"
              ],
              "additionalProperties": false
            },
            "notice": {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string"
                },
                "verified": {
                  "type": "boolean"
                },
                "corrupt": {
                  "type": "boolean"
                },
                "bytes": {
                  "type": "number"
                }
              },
              "required": [
                "path",
                "verified",
                "corrupt",
                "bytes"
              ],
              "additionalProperties": false
            },
            "embedding": {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string"
                },
                "verified": {
                  "type": "boolean"
                },
                "corrupt": {
                  "type": "boolean"
                },
                "bytes": {
                  "type": "number"
                }
              },
              "required": [
                "path",
                "verified",
                "corrupt",
                "bytes"
              ],
              "additionalProperties": false
            },
            "embeddingNotice": {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string"
                },
                "verified": {
                  "type": "boolean"
                },
                "corrupt": {
                  "type": "boolean"
                },
                "bytes": {
                  "type": "number"
                }
              },
              "required": [
                "path",
                "verified",
                "corrupt",
                "bytes"
              ],
              "additionalProperties": false
            },
            "vad": {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string"
                },
                "verified": {
                  "type": "boolean"
                },
                "corrupt": {
                  "type": "boolean"
                },
                "bytes": {
                  "type": "number"
                }
              },
              "required": [
                "path",
                "verified",
                "corrupt",
                "bytes"
              ],
              "additionalProperties": false
            },
            "vadNotice": {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string"
                },
                "verified": {
                  "type": "boolean"
                },
                "corrupt": {
                  "type": "boolean"
                },
                "bytes": {
                  "type": "number"
                }
              },
              "required": [
                "path",
                "verified",
                "corrupt",
                "bytes"
              ],
              "additionalProperties": false
            },
            "vadReady": {
              "type": "boolean"
            },
            "downloadBytes": {
              "type": "number"
            },
            "modelVersion": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "recallIsSyntheticOnly": {
              "type": "boolean"
            }
          },
          "required": [
            "ready",
            "reason",
            "classifier",
            "mobileClassifier",
            "notice",
            "embedding",
            "embeddingNotice",
            "vad",
            "vadNotice",
            "vadReady",
            "downloadBytes",
            "modelVersion",
            "recallIsSyntheticOnly"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "intelligence.snapshot",
        "title": "Intelligence Snapshot",
        "description": "Return the intelligence integration snapshot.",
        "category": "intelligence",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:intelligence"
        ],
        "http": {
          "method": "GET",
          "path": "/api/intelligence"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "diagnosticsStatus": {
              "type": "string"
            },
            "symbolSearchStatus": {
              "type": "string"
            },
            "completionsStatus": {
              "type": "string"
            },
            "hoverStatus": {
              "type": "string"
            },
            "errorCount": {
              "type": "number"
            },
            "warningCount": {
              "type": "number"
            },
            "totalRequests": {
              "type": "number"
            },
            "avgLatencyMs": {
              "type": "number"
            }
          },
          "required": [
            "diagnosticsStatus",
            "symbolSearchStatus",
            "completionsStatus",
            "hoverStatus",
            "errorCount",
            "warningCount",
            "totalRequests",
            "avgLatencyMs"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "homeassistant.homeGraph.askHomeGraph",
        "title": "Ask Home Graph",
        "description": "Search a Home Graph knowledge space and return a source-backed answer.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/homeassistant/home-graph/ask"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "installationId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "query": {
              "type": "string"
            },
            "limit": {
              "type": "number"
            },
            "mode": {
              "type": "string"
            },
            "includeSources": {
              "type": "boolean"
            },
            "includeConfidence": {
              "type": "boolean"
            },
            "includeLinkedObjects": {
              "type": "boolean"
            },
            "timeoutMs": {
              "type": "number"
            }
          },
          "required": [
            "query"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "spaceId": {
              "type": "string"
            },
            "query": {
              "type": "string"
            },
            "answer": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "results": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {}
                ]
              }
            }
          },
          "required": [
            "ok",
            "spaceId",
            "query",
            "answer",
            "results"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "homeassistant.homeGraph.browse",
        "title": "Browse Home Graph",
        "description": "Return namespace-filtered Home Graph sources, nodes, edges, and issues.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/homeassistant/home-graph/browse"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "installationId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "limit": {
              "type": "number"
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "spaceId": {
              "type": "string"
            },
            "nodes": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string"
                  },
                  "slug": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "summary": {
                    "type": "string"
                  },
                  "aliases": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "status": {
                    "type": "string"
                  },
                  "confidence": {
                    "type": "number"
                  },
                  "sourceId": {
                    "type": "string"
                  },
                  "subject": {
                    "type": "string"
                  },
                  "subjectIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "targetHints": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    }
                  },
                  "linkedObjectIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "kind",
                  "slug",
                  "title",
                  "aliases",
                  "status",
                  "confidence",
                  "metadata",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            },
            "edges": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "fromKind": {
                    "type": "string"
                  },
                  "fromId": {
                    "type": "string"
                  },
                  "toKind": {
                    "type": "string"
                  },
                  "toId": {
                    "type": "string"
                  },
                  "relation": {
                    "type": "string"
                  },
                  "weight": {
                    "type": "number"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "fromKind",
                  "fromId",
                  "toKind",
                  "toId",
                  "relation",
                  "weight",
                  "metadata",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            },
            "sources": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "connectorId": {
                    "type": "string"
                  },
                  "sourceType": {
                    "type": "string",
                    "enum": [
                      "url",
                      "bookmark",
                      "bookmark-list",
                      "history",
                      "document",
                      "repo",
                      "dataset",
                      "image",
                      "manual",
                      "other"
                    ]
                  },
                  "title": {
                    "type": "string"
                  },
                  "sourceUri": {
                    "type": "string"
                  },
                  "canonicalUri": {
                    "type": "string"
                  },
                  "summary": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "folderPath": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  },
                  "artifactId": {
                    "type": "string"
                  },
                  "contentHash": {
                    "type": "string"
                  },
                  "lastCrawledAt": {
                    "type": "number"
                  },
                  "crawlError": {
                    "type": "string"
                  },
                  "sessionId": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "connectorId",
                  "sourceType",
                  "tags",
                  "status",
                  "metadata",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            },
            "issues": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "severity": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  },
                  "sourceId": {
                    "type": "string"
                  },
                  "nodeId": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "severity",
                  "code",
                  "message",
                  "status",
                  "metadata",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "ok",
            "spaceId",
            "nodes",
            "edges",
            "sources",
            "issues"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "homeassistant.homeGraph.export",
        "title": "Export Home Graph Space",
        "description": "Export a complete Home Graph knowledge space.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/homeassistant/home-graph/export"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "installationId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "version": {
              "type": "number"
            },
            "exportedAt": {
              "type": "number"
            },
            "spaceId": {
              "type": "string"
            },
            "installationId": {
              "type": "string"
            },
            "sources": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "connectorId": {
                    "type": "string"
                  },
                  "sourceType": {
                    "type": "string",
                    "enum": [
                      "url",
                      "bookmark",
                      "bookmark-list",
                      "history",
                      "document",
                      "repo",
                      "dataset",
                      "image",
                      "manual",
                      "other"
                    ]
                  },
                  "title": {
                    "type": "string"
                  },
                  "sourceUri": {
                    "type": "string"
                  },
                  "canonicalUri": {
                    "type": "string"
                  },
                  "summary": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "folderPath": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  },
                  "artifactId": {
                    "type": "string"
                  },
                  "contentHash": {
                    "type": "string"
                  },
                  "lastCrawledAt": {
                    "type": "number"
                  },
                  "crawlError": {
                    "type": "string"
                  },
                  "sessionId": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "connectorId",
                  "sourceType",
                  "tags",
                  "status",
                  "metadata",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            },
            "nodes": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string"
                  },
                  "slug": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "summary": {
                    "type": "string"
                  },
                  "aliases": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "status": {
                    "type": "string"
                  },
                  "confidence": {
                    "type": "number"
                  },
                  "sourceId": {
                    "type": "string"
                  },
                  "subject": {
                    "type": "string"
                  },
                  "subjectIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "targetHints": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    }
                  },
                  "linkedObjectIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "kind",
                  "slug",
                  "title",
                  "aliases",
                  "status",
                  "confidence",
                  "metadata",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            },
            "edges": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "fromKind": {
                    "type": "string"
                  },
                  "fromId": {
                    "type": "string"
                  },
                  "toKind": {
                    "type": "string"
                  },
                  "toId": {
                    "type": "string"
                  },
                  "relation": {
                    "type": "string"
                  },
                  "weight": {
                    "type": "number"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "fromKind",
                  "fromId",
                  "toKind",
                  "toId",
                  "relation",
                  "weight",
                  "metadata",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            },
            "issues": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "severity": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  },
                  "sourceId": {
                    "type": "string"
                  },
                  "nodeId": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "severity",
                  "code",
                  "message",
                  "status",
                  "metadata",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            },
            "extractions": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "sourceId": {
                    "type": "string"
                  },
                  "artifactId": {
                    "type": "string"
                  },
                  "extractorId": {
                    "type": "string"
                  },
                  "format": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "summary": {
                    "type": "string"
                  },
                  "excerpt": {
                    "type": "string"
                  },
                  "sections": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "links": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "estimatedTokens": {
                    "type": "number"
                  },
                  "structure": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "sourceId",
                  "extractorId",
                  "format",
                  "sections",
                  "links",
                  "estimatedTokens",
                  "structure",
                  "metadata",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "version",
            "exportedAt",
            "spaceId",
            "installationId",
            "sources",
            "nodes",
            "edges",
            "issues",
            "extractions"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "homeassistant.homeGraph.generateHomeGraphPacket",
        "title": "Generate Home Graph Packet",
        "description": "Render a scoped Home Graph packet with SDK-owned inclusion/exclusion profile rules.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/homeassistant/home-graph/packet"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "installationId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "packetKind": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "sharingProfile": {
              "type": "string"
            },
            "includeFields": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "excludeFields": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "spaceId": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "markdown": {
              "type": "string"
            },
            "source": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "connectorId": {
                  "type": "string"
                },
                "sourceType": {
                  "type": "string",
                  "enum": [
                    "url",
                    "bookmark",
                    "bookmark-list",
                    "history",
                    "document",
                    "repo",
                    "dataset",
                    "image",
                    "manual",
                    "other"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "sourceUri": {
                  "type": "string"
                },
                "canonicalUri": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "folderPath": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "artifactId": {
                  "type": "string"
                },
                "contentHash": {
                  "type": "string"
                },
                "lastCrawledAt": {
                  "type": "number"
                },
                "crawlError": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "connectorId",
                "sourceType",
                "tags",
                "status",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "linked": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "fromKind": {
                  "type": "string"
                },
                "fromId": {
                  "type": "string"
                },
                "toKind": {
                  "type": "string"
                },
                "toId": {
                  "type": "string"
                },
                "relation": {
                  "type": "string"
                },
                "weight": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "fromKind",
                "fromId",
                "toKind",
                "toId",
                "relation",
                "weight",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "artifact": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "ok",
            "spaceId",
            "title",
            "markdown",
            "artifact"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "homeassistant.homeGraph.generateRoomPage",
        "title": "Generate Room Page",
        "description": "Render a Home Graph room/area page and materialize it as markdown.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/homeassistant/home-graph/room-page"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "installationId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "areaId": {
              "type": "string"
            },
            "roomId": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "spaceId": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "markdown": {
              "type": "string"
            },
            "source": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "connectorId": {
                  "type": "string"
                },
                "sourceType": {
                  "type": "string",
                  "enum": [
                    "url",
                    "bookmark",
                    "bookmark-list",
                    "history",
                    "document",
                    "repo",
                    "dataset",
                    "image",
                    "manual",
                    "other"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "sourceUri": {
                  "type": "string"
                },
                "canonicalUri": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "folderPath": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "artifactId": {
                  "type": "string"
                },
                "contentHash": {
                  "type": "string"
                },
                "lastCrawledAt": {
                  "type": "number"
                },
                "crawlError": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "connectorId",
                "sourceType",
                "tags",
                "status",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "linked": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "fromKind": {
                  "type": "string"
                },
                "fromId": {
                  "type": "string"
                },
                "toKind": {
                  "type": "string"
                },
                "toId": {
                  "type": "string"
                },
                "relation": {
                  "type": "string"
                },
                "weight": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "fromKind",
                "fromId",
                "toKind",
                "toId",
                "relation",
                "weight",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "artifact": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "ok",
            "spaceId",
            "title",
            "markdown",
            "artifact"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "homeassistant.homeGraph.import",
        "title": "Import Home Graph Space",
        "description": "Restore a Home Graph knowledge space export into the current daemon knowledge store.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/homeassistant/home-graph/import"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "installationId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "data": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "data"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "spaceId": {
              "type": "string"
            },
            "imported": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "ok",
            "spaceId",
            "imported"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "homeassistant.homeGraph.ingestHomeGraphArtifact",
        "title": "Ingest Home Graph Artifact",
        "description": "Index an existing artifact reference, JSON path/URI reference, multipart file upload, or raw binary upload as a Home Graph document, receipt, warranty, manual, or photo.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/homeassistant/home-graph/ingest/artifact"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "installationId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "artifactId": {
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "uri": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "tags": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "target": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "allowPrivateHosts": {
              "type": "boolean"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "additionalProperties": true,
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "artifactId": {
                  "type": "string"
                }
              },
              "required": [
                "artifactId"
              ],
              "additionalProperties": true
            },
            {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string"
                }
              },
              "required": [
                "path"
              ],
              "additionalProperties": true
            },
            {
              "type": "object",
              "properties": {
                "uri": {
                  "type": "string"
                }
              },
              "required": [
                "uri"
              ],
              "additionalProperties": true
            }
          ]
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "spaceId": {
              "type": "string"
            },
            "source": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "connectorId": {
                  "type": "string"
                },
                "sourceType": {
                  "type": "string",
                  "enum": [
                    "url",
                    "bookmark",
                    "bookmark-list",
                    "history",
                    "document",
                    "repo",
                    "dataset",
                    "image",
                    "manual",
                    "other"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "sourceUri": {
                  "type": "string"
                },
                "canonicalUri": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "folderPath": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "artifactId": {
                  "type": "string"
                },
                "contentHash": {
                  "type": "string"
                },
                "lastCrawledAt": {
                  "type": "number"
                },
                "crawlError": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "connectorId",
                "sourceType",
                "tags",
                "status",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "artifactId": {
              "type": "string"
            },
            "extraction": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "sourceId": {
                  "type": "string"
                },
                "artifactId": {
                  "type": "string"
                },
                "extractorId": {
                  "type": "string"
                },
                "format": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "excerpt": {
                  "type": "string"
                },
                "sections": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "links": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "estimatedTokens": {
                  "type": "number"
                },
                "structure": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "sourceId",
                "extractorId",
                "format",
                "sections",
                "links",
                "estimatedTokens",
                "structure",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "linked": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "fromKind": {
                  "type": "string"
                },
                "fromId": {
                  "type": "string"
                },
                "toKind": {
                  "type": "string"
                },
                "toId": {
                  "type": "string"
                },
                "relation": {
                  "type": "string"
                },
                "weight": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "fromKind",
                "fromId",
                "toKind",
                "toId",
                "relation",
                "weight",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "ok",
            "spaceId",
            "source"
          ],
          "additionalProperties": true
        },
        "invokable": true,
        "metadata": {
          "uploadModes": [
            "json-artifact-reference",
            "json-path-or-uri",
            "multipart-file",
            "raw-body"
          ],
          "largeUploadConfigKey": "storage.artifacts.maxBytes"
        }
      },
      {
        "id": "homeassistant.homeGraph.ingestHomeGraphNote",
        "title": "Ingest Home Graph Note",
        "description": "Store a Home Assistant note or remember-this fact as a Home Graph source.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/homeassistant/home-graph/ingest/note"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "installationId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "body": {
              "type": "string"
            },
            "category": {
              "type": "string"
            },
            "tags": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "target": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "body"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "spaceId": {
              "type": "string"
            },
            "source": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "connectorId": {
                  "type": "string"
                },
                "sourceType": {
                  "type": "string",
                  "enum": [
                    "url",
                    "bookmark",
                    "bookmark-list",
                    "history",
                    "document",
                    "repo",
                    "dataset",
                    "image",
                    "manual",
                    "other"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "sourceUri": {
                  "type": "string"
                },
                "canonicalUri": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "folderPath": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "artifactId": {
                  "type": "string"
                },
                "contentHash": {
                  "type": "string"
                },
                "lastCrawledAt": {
                  "type": "number"
                },
                "crawlError": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "connectorId",
                "sourceType",
                "tags",
                "status",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "artifactId": {
              "type": "string"
            },
            "extraction": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "sourceId": {
                  "type": "string"
                },
                "artifactId": {
                  "type": "string"
                },
                "extractorId": {
                  "type": "string"
                },
                "format": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "excerpt": {
                  "type": "string"
                },
                "sections": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "links": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "estimatedTokens": {
                  "type": "number"
                },
                "structure": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "sourceId",
                "extractorId",
                "format",
                "sections",
                "links",
                "estimatedTokens",
                "structure",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "linked": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "fromKind": {
                  "type": "string"
                },
                "fromId": {
                  "type": "string"
                },
                "toKind": {
                  "type": "string"
                },
                "toId": {
                  "type": "string"
                },
                "relation": {
                  "type": "string"
                },
                "weight": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "fromKind",
                "fromId",
                "toKind",
                "toId",
                "relation",
                "weight",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "ok",
            "spaceId",
            "source"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "homeassistant.homeGraph.ingestHomeGraphUrl",
        "title": "Ingest Home Graph URL",
        "description": "Fetch and index a URL as a Home Graph source without writing to the default knowledge space.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/homeassistant/home-graph/ingest/url"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "installationId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "url": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "tags": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "target": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "allowPrivateHosts": {
              "type": "boolean"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "url"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "spaceId": {
              "type": "string"
            },
            "source": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "connectorId": {
                  "type": "string"
                },
                "sourceType": {
                  "type": "string",
                  "enum": [
                    "url",
                    "bookmark",
                    "bookmark-list",
                    "history",
                    "document",
                    "repo",
                    "dataset",
                    "image",
                    "manual",
                    "other"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "sourceUri": {
                  "type": "string"
                },
                "canonicalUri": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "folderPath": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "artifactId": {
                  "type": "string"
                },
                "contentHash": {
                  "type": "string"
                },
                "lastCrawledAt": {
                  "type": "number"
                },
                "crawlError": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "connectorId",
                "sourceType",
                "tags",
                "status",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "artifactId": {
              "type": "string"
            },
            "extraction": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "sourceId": {
                  "type": "string"
                },
                "artifactId": {
                  "type": "string"
                },
                "extractorId": {
                  "type": "string"
                },
                "format": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "excerpt": {
                  "type": "string"
                },
                "sections": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "links": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "estimatedTokens": {
                  "type": "number"
                },
                "structure": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "sourceId",
                "extractorId",
                "format",
                "sections",
                "links",
                "estimatedTokens",
                "structure",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "linked": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "fromKind": {
                  "type": "string"
                },
                "fromId": {
                  "type": "string"
                },
                "toKind": {
                  "type": "string"
                },
                "toId": {
                  "type": "string"
                },
                "relation": {
                  "type": "string"
                },
                "weight": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "fromKind",
                "fromId",
                "toKind",
                "toId",
                "relation",
                "weight",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "ok",
            "spaceId",
            "source"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "homeassistant.homeGraph.linkHomeGraphKnowledge",
        "title": "Link Home Graph Knowledge",
        "description": "Attach a Home Graph source or node to a Home Assistant object.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/homeassistant/home-graph/link"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "installationId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "sourceId": {
              "type": "string"
            },
            "nodeId": {
              "type": "string"
            },
            "target": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "relation": {
              "type": "string"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "target"
          ],
          "additionalProperties": true,
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "sourceId": {
                  "type": "string"
                }
              },
              "required": [
                "sourceId"
              ],
              "additionalProperties": true
            },
            {
              "type": "object",
              "properties": {
                "nodeId": {
                  "type": "string"
                }
              },
              "required": [
                "nodeId"
              ],
              "additionalProperties": true
            }
          ]
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "spaceId": {
              "type": "string"
            },
            "edge": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "fromKind": {
                  "type": "string"
                },
                "fromId": {
                  "type": "string"
                },
                "toKind": {
                  "type": "string"
                },
                "toId": {
                  "type": "string"
                },
                "relation": {
                  "type": "string"
                },
                "weight": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "fromKind",
                "fromId",
                "toKind",
                "toId",
                "relation",
                "weight",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "target": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "ok",
            "spaceId",
            "edge"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "homeassistant.homeGraph.listHomeGraphIssues",
        "title": "List Home Graph Issues",
        "description": "Return Home Graph data quality, review, and maintenance issues.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/homeassistant/home-graph/issues"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "installationId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "limit": {
              "type": "number"
            },
            "status": {
              "type": "string"
            },
            "severity": {
              "type": "string"
            },
            "code": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "spaceId": {
              "type": "string"
            },
            "issues": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "severity": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  },
                  "sourceId": {
                    "type": "string"
                  },
                  "nodeId": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "severity",
                  "code",
                  "message",
                  "status",
                  "metadata",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "ok",
            "spaceId",
            "issues"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "homeassistant.homeGraph.map",
        "title": "Map Home Graph",
        "description": "Return a visual Home Graph node/edge map with deterministic layout data and SVG.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/homeassistant/home-graph/map"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "installationId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "limit": {
              "type": "number"
            },
            "includeSources": {
              "type": "boolean"
            },
            "includeIssues": {
              "type": "boolean"
            },
            "includeGenerated": {
              "type": "boolean"
            },
            "query": {
              "type": "string"
            },
            "recordKinds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "ids": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "linkedToIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "nodeKinds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "sourceTypes": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "sourceStatuses": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "nodeStatuses": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "issueCodes": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "issueStatuses": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "issueSeverities": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "edgeRelations": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "tags": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "minConfidence": {
              "type": "number"
            },
            "objectKinds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "entityIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "deviceIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "areaIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "integrationIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "integrationDomains": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "domains": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "deviceClasses": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "labels": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "ha": {
              "type": "object",
              "properties": {
                "objectKinds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "entityIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "deviceIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "areaIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "integrationIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "integrationDomains": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "domains": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "deviceClasses": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "labels": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "additionalProperties": false
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "spaceId": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "generatedAt": {
              "type": "number"
            },
            "width": {
              "type": "number"
            },
            "height": {
              "type": "number"
            },
            "nodeCount": {
              "type": "number"
            },
            "edgeCount": {
              "type": "number"
            },
            "totalNodeCount": {
              "type": "number"
            },
            "totalEdgeCount": {
              "type": "number"
            },
            "facets": {
              "type": "object",
              "properties": {
                "recordKinds": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "string"
                      },
                      "count": {
                        "type": "number"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "value",
                      "count"
                    ],
                    "additionalProperties": true
                  }
                },
                "nodeKinds": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "string"
                      },
                      "count": {
                        "type": "number"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "value",
                      "count"
                    ],
                    "additionalProperties": true
                  }
                },
                "sourceTypes": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "string"
                      },
                      "count": {
                        "type": "number"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "value",
                      "count"
                    ],
                    "additionalProperties": true
                  }
                },
                "sourceStatuses": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "string"
                      },
                      "count": {
                        "type": "number"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "value",
                      "count"
                    ],
                    "additionalProperties": true
                  }
                },
                "nodeStatuses": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "string"
                      },
                      "count": {
                        "type": "number"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "value",
                      "count"
                    ],
                    "additionalProperties": true
                  }
                },
                "issueCodes": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "string"
                      },
                      "count": {
                        "type": "number"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "value",
                      "count"
                    ],
                    "additionalProperties": true
                  }
                },
                "issueStatuses": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "string"
                      },
                      "count": {
                        "type": "number"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "value",
                      "count"
                    ],
                    "additionalProperties": true
                  }
                },
                "issueSeverities": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "string"
                      },
                      "count": {
                        "type": "number"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "value",
                      "count"
                    ],
                    "additionalProperties": true
                  }
                },
                "edgeRelations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "string"
                      },
                      "count": {
                        "type": "number"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "value",
                      "count"
                    ],
                    "additionalProperties": true
                  }
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "string"
                      },
                      "count": {
                        "type": "number"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "value",
                      "count"
                    ],
                    "additionalProperties": true
                  }
                },
                "homeAssistant": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "string"
                        },
                        "count": {
                          "type": "number"
                        },
                        "label": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "value",
                        "count"
                      ],
                      "additionalProperties": true
                    }
                  }
                }
              },
              "additionalProperties": true
            },
            "nodes": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "recordKind": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "summary": {
                    "type": "string"
                  },
                  "x": {
                    "type": "number"
                  },
                  "y": {
                    "type": "number"
                  },
                  "radius": {
                    "type": "number"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "recordKind",
                  "kind",
                  "title",
                  "x",
                  "y",
                  "radius",
                  "metadata"
                ],
                "additionalProperties": true
              }
            },
            "edges": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "fromId": {
                    "type": "string"
                  },
                  "toId": {
                    "type": "string"
                  },
                  "source": {
                    "type": "string"
                  },
                  "target": {
                    "type": "string"
                  },
                  "fromTitle": {
                    "type": "string"
                  },
                  "toTitle": {
                    "type": "string"
                  },
                  "sourceTitle": {
                    "type": "string"
                  },
                  "targetTitle": {
                    "type": "string"
                  },
                  "relation": {
                    "type": "string"
                  },
                  "weight": {
                    "type": "number"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "fromId",
                  "toId",
                  "relation",
                  "weight",
                  "metadata"
                ],
                "additionalProperties": true
              }
            },
            "svg": {
              "type": "string"
            }
          },
          "required": [
            "ok",
            "title",
            "generatedAt",
            "width",
            "height",
            "nodeCount",
            "edgeCount",
            "nodes",
            "edges",
            "svg"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "homeassistant.homeGraph.pages.list",
        "title": "List Home Graph Pages",
        "description": "Return generated Home Graph wiki pages with optional markdown content.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/homeassistant/home-graph/pages"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "installationId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "limit": {
              "type": "number"
            },
            "includeMarkdown": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "spaceId": {
              "type": "string"
            },
            "pages": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {}
                ]
              }
            }
          },
          "required": [
            "ok",
            "spaceId",
            "pages"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "homeassistant.homeGraph.refinement.run",
        "title": "Run Home Graph Refinement",
        "description": "Run source-backed Home Graph self-improvement for a space, source list, or specific gaps.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/homeassistant/home-graph/refinement/run"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "installationId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "gapIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "sourceIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "limit": {
              "type": "number"
            },
            "maxRunMs": {
              "type": "number"
            },
            "force": {
              "type": "boolean"
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "spaceId": {
              "type": "string"
            },
            "result": {
              "type": "object",
              "properties": {
                "scannedGaps": {
                  "type": "number"
                },
                "candidateGaps": {
                  "type": "number"
                },
                "processedGaps": {
                  "type": "number"
                },
                "createdGaps": {
                  "type": "number"
                },
                "repairableGaps": {
                  "type": "number"
                },
                "suppressedGaps": {
                  "type": "number"
                },
                "skippedGaps": {
                  "type": "number"
                },
                "searched": {
                  "type": "number"
                },
                "ingestedSources": {
                  "type": "number"
                },
                "linkedRepairs": {
                  "type": "number"
                },
                "blockedGaps": {
                  "type": "number"
                },
                "closedGaps": {
                  "type": "number"
                },
                "queuedTasks": {
                  "type": "number"
                },
                "requestedLimit": {
                  "type": "number"
                },
                "effectiveLimit": {
                  "type": "number"
                },
                "coalesced": {
                  "type": "boolean"
                },
                "truncated": {
                  "type": "boolean"
                },
                "budgetExhausted": {
                  "type": "boolean"
                },
                "taskIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "ingestedSourceIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "errors": {
                  "type": "array",
                  "items": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {}
                    ]
                  }
                }
              },
              "required": [
                "scannedGaps",
                "createdGaps",
                "repairableGaps",
                "suppressedGaps",
                "skippedGaps",
                "searched",
                "ingestedSources",
                "linkedRepairs",
                "errors"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "ok",
            "spaceId",
            "result"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "homeassistant.homeGraph.refinement.task.cancel",
        "title": "Cancel Home Graph Refinement Task",
        "description": "Mark a queued or active Home Graph refinement task as cancelled.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/homeassistant/home-graph/refinement/tasks/{id}/cancel"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "installationId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "id": {
              "type": "string"
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "spaceId": {
              "type": "string"
            },
            "task": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "spaceId": {
                      "type": "string"
                    },
                    "subjectKind": {
                      "type": "string"
                    },
                    "subjectId": {
                      "type": "string"
                    },
                    "subjectTitle": {
                      "type": "string"
                    },
                    "subjectType": {
                      "type": "string"
                    },
                    "gapId": {
                      "type": "string"
                    },
                    "issueId": {
                      "type": "string"
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "detected",
                        "queued",
                        "searching",
                        "evaluating",
                        "extracting",
                        "applying",
                        "verified",
                        "closed",
                        "blocked",
                        "suppressed",
                        "needs_review",
                        "cancelled",
                        "failed"
                      ]
                    },
                    "priority": {
                      "type": "string",
                      "enum": [
                        "low",
                        "normal",
                        "high",
                        "urgent"
                      ]
                    },
                    "trigger": {
                      "type": "string",
                      "enum": [
                        "ingest",
                        "homegraph-sync",
                        "reindex",
                        "scheduled",
                        "answer",
                        "manual"
                      ]
                    },
                    "budget": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "number"
                      }
                    },
                    "attemptCount": {
                      "type": "number"
                    },
                    "blockedReason": {
                      "type": "string"
                    },
                    "nextRepairAttemptAt": {
                      "type": "number"
                    },
                    "acceptedSourceIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "ingestedSourceIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "rejectedSourceUrls": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "promotedFactCount": {
                      "type": "number"
                    },
                    "sourceAssessments": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {}
                        ]
                      }
                    },
                    "trace": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {}
                        ]
                      }
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "updatedAt": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "id",
                    "spaceId",
                    "state",
                    "priority",
                    "trigger",
                    "budget",
                    "attemptCount",
                    "trace",
                    "metadata",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "ok",
            "spaceId",
            "task"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "homeassistant.homeGraph.refinement.task.get",
        "title": "Get Home Graph Refinement Task",
        "description": "Return one Home Graph refinement task and its trace.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/homeassistant/home-graph/refinement/tasks/{id}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "installationId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "limit": {
              "type": "number"
            },
            "id": {
              "type": "string"
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "spaceId": {
              "type": "string"
            },
            "task": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "spaceId": {
                      "type": "string"
                    },
                    "subjectKind": {
                      "type": "string"
                    },
                    "subjectId": {
                      "type": "string"
                    },
                    "subjectTitle": {
                      "type": "string"
                    },
                    "subjectType": {
                      "type": "string"
                    },
                    "gapId": {
                      "type": "string"
                    },
                    "issueId": {
                      "type": "string"
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "detected",
                        "queued",
                        "searching",
                        "evaluating",
                        "extracting",
                        "applying",
                        "verified",
                        "closed",
                        "blocked",
                        "suppressed",
                        "needs_review",
                        "cancelled",
                        "failed"
                      ]
                    },
                    "priority": {
                      "type": "string",
                      "enum": [
                        "low",
                        "normal",
                        "high",
                        "urgent"
                      ]
                    },
                    "trigger": {
                      "type": "string",
                      "enum": [
                        "ingest",
                        "homegraph-sync",
                        "reindex",
                        "scheduled",
                        "answer",
                        "manual"
                      ]
                    },
                    "budget": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "number"
                      }
                    },
                    "attemptCount": {
                      "type": "number"
                    },
                    "blockedReason": {
                      "type": "string"
                    },
                    "nextRepairAttemptAt": {
                      "type": "number"
                    },
                    "acceptedSourceIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "ingestedSourceIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "rejectedSourceUrls": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "promotedFactCount": {
                      "type": "number"
                    },
                    "sourceAssessments": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {}
                        ]
                      }
                    },
                    "trace": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {}
                        ]
                      }
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "updatedAt": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "id",
                    "spaceId",
                    "state",
                    "priority",
                    "trigger",
                    "budget",
                    "attemptCount",
                    "trace",
                    "metadata",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "ok",
            "spaceId",
            "task"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "homeassistant.homeGraph.refinement.tasks.list",
        "title": "List Home Graph Refinement Tasks",
        "description": "Return durable Home Graph refinement tasks with states, traces, source assessments, and blocked reasons.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/homeassistant/home-graph/refinement/tasks"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "installationId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "limit": {
              "type": "number"
            },
            "state": {
              "type": "string"
            },
            "subjectId": {
              "type": "string"
            },
            "gapId": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "spaceId": {
              "type": "string"
            },
            "tasks": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "spaceId": {
                    "type": "string"
                  },
                  "subjectKind": {
                    "type": "string"
                  },
                  "subjectId": {
                    "type": "string"
                  },
                  "subjectTitle": {
                    "type": "string"
                  },
                  "subjectType": {
                    "type": "string"
                  },
                  "gapId": {
                    "type": "string"
                  },
                  "issueId": {
                    "type": "string"
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "detected",
                      "queued",
                      "searching",
                      "evaluating",
                      "extracting",
                      "applying",
                      "verified",
                      "closed",
                      "blocked",
                      "suppressed",
                      "needs_review",
                      "cancelled",
                      "failed"
                    ]
                  },
                  "priority": {
                    "type": "string",
                    "enum": [
                      "low",
                      "normal",
                      "high",
                      "urgent"
                    ]
                  },
                  "trigger": {
                    "type": "string",
                    "enum": [
                      "ingest",
                      "homegraph-sync",
                      "reindex",
                      "scheduled",
                      "answer",
                      "manual"
                    ]
                  },
                  "budget": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "number"
                    }
                  },
                  "attemptCount": {
                    "type": "number"
                  },
                  "blockedReason": {
                    "type": "string"
                  },
                  "nextRepairAttemptAt": {
                    "type": "number"
                  },
                  "acceptedSourceIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "ingestedSourceIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "rejectedSourceUrls": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "promotedFactCount": {
                    "type": "number"
                  },
                  "sourceAssessments": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {}
                      ]
                    }
                  },
                  "trace": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {}
                      ]
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "spaceId",
                  "state",
                  "priority",
                  "trigger",
                  "budget",
                  "attemptCount",
                  "trace",
                  "metadata",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "ok",
            "spaceId",
            "tasks"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "homeassistant.homeGraph.refreshDevicePassport",
        "title": "Refresh Device Passport",
        "description": "Generate or refresh the living passport page for one Home Assistant device.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/homeassistant/home-graph/device-passport"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "installationId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "deviceId": {
              "type": "string"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "deviceId"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "spaceId": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "markdown": {
              "type": "string"
            },
            "source": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "connectorId": {
                  "type": "string"
                },
                "sourceType": {
                  "type": "string",
                  "enum": [
                    "url",
                    "bookmark",
                    "bookmark-list",
                    "history",
                    "document",
                    "repo",
                    "dataset",
                    "image",
                    "manual",
                    "other"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "sourceUri": {
                  "type": "string"
                },
                "canonicalUri": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "folderPath": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "artifactId": {
                  "type": "string"
                },
                "contentHash": {
                  "type": "string"
                },
                "lastCrawledAt": {
                  "type": "number"
                },
                "crawlError": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "connectorId",
                "sourceType",
                "tags",
                "status",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "linked": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "fromKind": {
                  "type": "string"
                },
                "fromId": {
                  "type": "string"
                },
                "toKind": {
                  "type": "string"
                },
                "toId": {
                  "type": "string"
                },
                "relation": {
                  "type": "string"
                },
                "weight": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "fromKind",
                "fromId",
                "toKind",
                "toId",
                "relation",
                "weight",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "artifact": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "ok",
            "spaceId",
            "title",
            "markdown",
            "artifact"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "homeassistant.homeGraph.reindex",
        "title": "Reindex Home Graph Sources",
        "description": "Re-extract already-stored Home Graph artifacts with missing or sparse extraction records.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/homeassistant/home-graph/reindex"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "installationId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "limit": {
              "type": "number"
            },
            "maxRunMs": {
              "type": "number"
            },
            "semanticLimit": {
              "type": "number"
            },
            "semanticMaxRunMs": {
              "type": "number"
            },
            "generatedPageLimit": {
              "type": "number"
            },
            "force": {
              "type": "boolean"
            },
            "refreshPages": {
              "type": "boolean"
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "spaceId": {
              "type": "string"
            },
            "scanned": {
              "type": "number"
            },
            "reparsed": {
              "type": "number"
            },
            "skipped": {
              "type": "number"
            },
            "failed": {
              "type": "number"
            },
            "changedSourceCount": {
              "type": "number"
            },
            "forcedSourceCount": {
              "type": "number"
            },
            "skippedGeneratedPageArtifactCount": {
              "type": "number"
            },
            "refreshedGeneratedPageCount": {
              "type": "number"
            },
            "generatedPagePolicyVersion": {
              "type": "string"
            },
            "coalesced": {
              "type": "boolean"
            },
            "truncated": {
              "type": "boolean"
            },
            "budgetExhausted": {
              "type": "boolean"
            },
            "sources": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "connectorId": {
                    "type": "string"
                  },
                  "sourceType": {
                    "type": "string",
                    "enum": [
                      "url",
                      "bookmark",
                      "bookmark-list",
                      "history",
                      "document",
                      "repo",
                      "dataset",
                      "image",
                      "manual",
                      "other"
                    ]
                  },
                  "title": {
                    "type": "string"
                  },
                  "sourceUri": {
                    "type": "string"
                  },
                  "canonicalUri": {
                    "type": "string"
                  },
                  "summary": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "folderPath": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  },
                  "artifactId": {
                    "type": "string"
                  },
                  "contentHash": {
                    "type": "string"
                  },
                  "lastCrawledAt": {
                    "type": "number"
                  },
                  "crawlError": {
                    "type": "string"
                  },
                  "sessionId": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "connectorId",
                  "sourceType",
                  "tags",
                  "status",
                  "metadata",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            },
            "failures": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {}
                ]
              }
            },
            "linked": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {}
                ]
              }
            },
            "semantic": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "generated": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "ok",
            "spaceId",
            "scanned",
            "reparsed",
            "skipped",
            "failed",
            "sources",
            "failures"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "homeassistant.homeGraph.reset",
        "title": "Reset Home Graph Space",
        "description": "Clear one Home Assistant Home Graph knowledge space after callers export any diagnostic backup they need.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/homeassistant/home-graph/reset"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "installationId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "dryRun": {
              "type": "boolean"
            },
            "preserveArtifacts": {
              "type": "boolean"
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "spaceId": {
              "type": "string"
            },
            "installationId": {
              "type": "string"
            },
            "dryRun": {
              "type": "boolean"
            },
            "deleted": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "artifactDeleteCandidates": {
              "type": "number"
            },
            "deletedArtifacts": {
              "type": "number"
            },
            "preservedArtifacts": {
              "type": "number"
            },
            "artifactsDeleted": {
              "type": "boolean"
            }
          },
          "required": [
            "ok",
            "spaceId",
            "installationId",
            "dryRun",
            "deleted",
            "artifactDeleteCandidates",
            "deletedArtifacts",
            "preservedArtifacts",
            "artifactsDeleted"
          ],
          "additionalProperties": true
        },
        "dangerous": true,
        "invokable": true
      },
      {
        "id": "homeassistant.homeGraph.reviewHomeGraphFact",
        "title": "Review Home Graph Fact",
        "description": "Accept, reject, resolve, edit, or forget a Home Graph issue, source, or node.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/homeassistant/home-graph/facts/review"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "installationId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "issueId": {
              "type": "string"
            },
            "nodeId": {
              "type": "string"
            },
            "sourceId": {
              "type": "string"
            },
            "action": {
              "type": "string"
            },
            "value": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "reviewer": {
              "type": "string"
            }
          },
          "required": [
            "action"
          ],
          "additionalProperties": true,
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "issueId": {
                  "type": "string"
                }
              },
              "required": [
                "issueId"
              ],
              "additionalProperties": true
            },
            {
              "type": "object",
              "properties": {
                "nodeId": {
                  "type": "string"
                }
              },
              "required": [
                "nodeId"
              ],
              "additionalProperties": true
            },
            {
              "type": "object",
              "properties": {
                "sourceId": {
                  "type": "string"
                }
              },
              "required": [
                "sourceId"
              ],
              "additionalProperties": true
            }
          ]
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "spaceId": {
              "type": "string"
            },
            "issue": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "severity": {
                  "type": "string"
                },
                "code": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "sourceId": {
                  "type": "string"
                },
                "nodeId": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "severity",
                "code",
                "message",
                "status",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "node": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "slug": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "aliases": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "status": {
                  "type": "string"
                },
                "confidence": {
                  "type": "number"
                },
                "sourceId": {
                  "type": "string"
                },
                "subject": {
                  "type": "string"
                },
                "subjectIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "targetHints": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "linkedObjectIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "kind",
                "slug",
                "title",
                "aliases",
                "status",
                "confidence",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "source": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "connectorId": {
                  "type": "string"
                },
                "sourceType": {
                  "type": "string",
                  "enum": [
                    "url",
                    "bookmark",
                    "bookmark-list",
                    "history",
                    "document",
                    "repo",
                    "dataset",
                    "image",
                    "manual",
                    "other"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "sourceUri": {
                  "type": "string"
                },
                "canonicalUri": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "folderPath": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "artifactId": {
                  "type": "string"
                },
                "contentHash": {
                  "type": "string"
                },
                "lastCrawledAt": {
                  "type": "number"
                },
                "crawlError": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "connectorId",
                "sourceType",
                "tags",
                "status",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "ok",
            "spaceId"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "homeassistant.homeGraph.sources.list",
        "title": "List Home Graph Sources",
        "description": "Return source inventory for a Home Graph space.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/homeassistant/home-graph/sources"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "installationId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "limit": {
              "type": "number"
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "spaceId": {
              "type": "string"
            },
            "sources": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "connectorId": {
                    "type": "string"
                  },
                  "sourceType": {
                    "type": "string",
                    "enum": [
                      "url",
                      "bookmark",
                      "bookmark-list",
                      "history",
                      "document",
                      "repo",
                      "dataset",
                      "image",
                      "manual",
                      "other"
                    ]
                  },
                  "title": {
                    "type": "string"
                  },
                  "sourceUri": {
                    "type": "string"
                  },
                  "canonicalUri": {
                    "type": "string"
                  },
                  "summary": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "folderPath": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  },
                  "artifactId": {
                    "type": "string"
                  },
                  "contentHash": {
                    "type": "string"
                  },
                  "lastCrawledAt": {
                    "type": "number"
                  },
                  "crawlError": {
                    "type": "string"
                  },
                  "sessionId": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "connectorId",
                  "sourceType",
                  "tags",
                  "status",
                  "metadata",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "ok",
            "spaceId",
            "sources"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "homeassistant.homeGraph.status",
        "title": "Home Graph Status",
        "description": "Return Home Assistant Home Graph status for an isolated knowledge space.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/homeassistant/home-graph/status"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "installationId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "spaceId": {
              "type": "string"
            },
            "installationId": {
              "type": "string"
            },
            "sourceCount": {
              "type": "number"
            },
            "nodeCount": {
              "type": "number"
            },
            "edgeCount": {
              "type": "number"
            },
            "issueCount": {
              "type": "number"
            },
            "extractionCount": {
              "type": "number"
            },
            "lastSnapshotAt": {
              "type": "number"
            },
            "readiness": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "capabilities": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "ok",
            "spaceId",
            "installationId",
            "sourceCount",
            "nodeCount",
            "edgeCount",
            "issueCount",
            "extractionCount",
            "capabilities"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "homeassistant.homeGraph.syncHomeGraph",
        "title": "Sync Home Graph",
        "description": "Ingest a Home Assistant registry snapshot into an isolated Home Graph knowledge space.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/homeassistant/home-graph/sync"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "installationId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "homeId": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "capturedAt": {
              "type": "number"
            },
            "entities": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {}
                ]
              }
            },
            "devices": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {}
                ]
              }
            },
            "areas": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {}
                ]
              }
            },
            "automations": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {}
                ]
              }
            },
            "scripts": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {}
                ]
              }
            },
            "scenes": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {}
                ]
              }
            },
            "labels": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {}
                ]
              }
            },
            "integrations": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {}
                ]
              }
            },
            "helpers": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {}
                ]
              }
            },
            "pageAutomation": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "spaceId": {
              "type": "string"
            },
            "installationId": {
              "type": "string"
            },
            "source": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "connectorId": {
                  "type": "string"
                },
                "sourceType": {
                  "type": "string",
                  "enum": [
                    "url",
                    "bookmark",
                    "bookmark-list",
                    "history",
                    "document",
                    "repo",
                    "dataset",
                    "image",
                    "manual",
                    "other"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "sourceUri": {
                  "type": "string"
                },
                "canonicalUri": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "folderPath": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "artifactId": {
                  "type": "string"
                },
                "contentHash": {
                  "type": "string"
                },
                "lastCrawledAt": {
                  "type": "number"
                },
                "crawlError": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "connectorId",
                "sourceType",
                "tags",
                "status",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "home": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "slug": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "aliases": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "status": {
                  "type": "string"
                },
                "confidence": {
                  "type": "number"
                },
                "sourceId": {
                  "type": "string"
                },
                "subject": {
                  "type": "string"
                },
                "subjectIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "targetHints": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "linkedObjectIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "kind",
                "slug",
                "title",
                "aliases",
                "status",
                "confidence",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "created": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "generated": {
              "type": "object",
              "properties": {
                "devicePassports": {
                  "type": "number"
                },
                "roomPages": {
                  "type": "number"
                },
                "artifacts": {
                  "type": "number"
                },
                "sources": {
                  "type": "number"
                },
                "deferredDevicePassports": {
                  "type": "number"
                },
                "deferredRoomPages": {
                  "type": "number"
                },
                "truncated": {
                  "type": "boolean"
                },
                "errors": {
                  "type": "array",
                  "items": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {}
                    ]
                  }
                }
              },
              "required": [
                "devicePassports",
                "roomPages",
                "artifacts",
                "sources",
                "errors"
              ],
              "additionalProperties": true
            },
            "counts": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "ok",
            "spaceId",
            "installationId",
            "source",
            "home",
            "created",
            "generated",
            "counts"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "homeassistant.homeGraph.unlinkHomeGraphKnowledge",
        "title": "Unlink Home Graph Knowledge",
        "description": "Remove an active Home Graph source/object link without deleting source history.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/homeassistant/home-graph/unlink"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "installationId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "sourceId": {
              "type": "string"
            },
            "nodeId": {
              "type": "string"
            },
            "target": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "relation": {
              "type": "string"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "target"
          ],
          "additionalProperties": true,
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "sourceId": {
                  "type": "string"
                }
              },
              "required": [
                "sourceId"
              ],
              "additionalProperties": true
            },
            {
              "type": "object",
              "properties": {
                "nodeId": {
                  "type": "string"
                }
              },
              "required": [
                "nodeId"
              ],
              "additionalProperties": true
            }
          ]
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "spaceId": {
              "type": "string"
            },
            "edge": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "fromKind": {
                  "type": "string"
                },
                "fromId": {
                  "type": "string"
                },
                "toKind": {
                  "type": "string"
                },
                "toId": {
                  "type": "string"
                },
                "relation": {
                  "type": "string"
                },
                "weight": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "fromKind",
                "fromId",
                "toKind",
                "toId",
                "relation",
                "weight",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "target": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "ok",
            "spaceId",
            "edge"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "knowledge.ask",
        "title": "Ask Knowledge",
        "description": "Search, semantically synthesize, and return a source-backed answer from the structured knowledge/wiki store.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/knowledge/ask"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "query": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "limit": {
              "type": "number"
            },
            "mode": {
              "type": "string"
            },
            "includeSources": {
              "type": "boolean"
            },
            "includeConfidence": {
              "type": "boolean"
            },
            "includeLinkedObjects": {
              "type": "boolean"
            },
            "candidateSourceIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "candidateNodeIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "strictCandidates": {
              "type": "boolean"
            },
            "timeoutMs": {
              "type": "number"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "query"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "spaceId": {
              "type": "string"
            },
            "query": {
              "type": "string"
            },
            "answer": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string"
                },
                "mode": {
                  "type": "string"
                },
                "confidence": {
                  "type": "number"
                },
                "sources": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "connectorId": {
                        "type": "string"
                      },
                      "sourceType": {
                        "type": "string",
                        "enum": [
                          "url",
                          "bookmark",
                          "bookmark-list",
                          "history",
                          "document",
                          "repo",
                          "dataset",
                          "image",
                          "manual",
                          "other"
                        ]
                      },
                      "title": {
                        "type": "string"
                      },
                      "sourceUri": {
                        "type": "string"
                      },
                      "canonicalUri": {
                        "type": "string"
                      },
                      "summary": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "tags": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "folderPath": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string"
                      },
                      "artifactId": {
                        "type": "string"
                      },
                      "contentHash": {
                        "type": "string"
                      },
                      "lastCrawledAt": {
                        "type": "number"
                      },
                      "crawlError": {
                        "type": "string"
                      },
                      "sessionId": {
                        "type": "string"
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "updatedAt": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "id",
                      "connectorId",
                      "sourceType",
                      "tags",
                      "status",
                      "metadata",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": true
                  }
                },
                "linkedObjects": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "kind": {
                        "type": "string"
                      },
                      "slug": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "summary": {
                        "type": "string"
                      },
                      "aliases": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "status": {
                        "type": "string"
                      },
                      "confidence": {
                        "type": "number"
                      },
                      "sourceId": {
                        "type": "string"
                      },
                      "subject": {
                        "type": "string"
                      },
                      "subjectIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "targetHints": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "additionalProperties": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          }
                        }
                      },
                      "linkedObjectIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "updatedAt": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "id",
                      "kind",
                      "slug",
                      "title",
                      "aliases",
                      "status",
                      "confidence",
                      "metadata",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": true
                  }
                },
                "facts": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "kind": {
                        "type": "string"
                      },
                      "slug": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "summary": {
                        "type": "string"
                      },
                      "aliases": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "status": {
                        "type": "string"
                      },
                      "confidence": {
                        "type": "number"
                      },
                      "sourceId": {
                        "type": "string"
                      },
                      "subject": {
                        "type": "string"
                      },
                      "subjectIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "targetHints": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "additionalProperties": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          }
                        }
                      },
                      "linkedObjectIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "updatedAt": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "id",
                      "kind",
                      "slug",
                      "title",
                      "aliases",
                      "status",
                      "confidence",
                      "metadata",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": true
                  }
                },
                "gaps": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "kind": {
                        "type": "string"
                      },
                      "slug": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "summary": {
                        "type": "string"
                      },
                      "aliases": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "status": {
                        "type": "string"
                      },
                      "confidence": {
                        "type": "number"
                      },
                      "sourceId": {
                        "type": "string"
                      },
                      "subject": {
                        "type": "string"
                      },
                      "subjectIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "targetHints": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "additionalProperties": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          }
                        }
                      },
                      "linkedObjectIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "updatedAt": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "id",
                      "kind",
                      "slug",
                      "title",
                      "aliases",
                      "status",
                      "confidence",
                      "metadata",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": true
                  }
                },
                "synthesized": {
                  "type": "boolean"
                }
              },
              "required": [
                "text",
                "mode",
                "confidence",
                "sources",
                "linkedObjects"
              ],
              "additionalProperties": true
            },
            "results": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string"
                  },
                  "id": {
                    "type": "string"
                  },
                  "score": {
                    "type": "number"
                  },
                  "reason": {
                    "type": "string"
                  },
                  "source": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "connectorId": {
                        "type": "string"
                      },
                      "sourceType": {
                        "type": "string",
                        "enum": [
                          "url",
                          "bookmark",
                          "bookmark-list",
                          "history",
                          "document",
                          "repo",
                          "dataset",
                          "image",
                          "manual",
                          "other"
                        ]
                      },
                      "title": {
                        "type": "string"
                      },
                      "sourceUri": {
                        "type": "string"
                      },
                      "canonicalUri": {
                        "type": "string"
                      },
                      "summary": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "tags": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "folderPath": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string"
                      },
                      "artifactId": {
                        "type": "string"
                      },
                      "contentHash": {
                        "type": "string"
                      },
                      "lastCrawledAt": {
                        "type": "number"
                      },
                      "crawlError": {
                        "type": "string"
                      },
                      "sessionId": {
                        "type": "string"
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "updatedAt": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "id",
                      "connectorId",
                      "sourceType",
                      "tags",
                      "status",
                      "metadata",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": true
                  },
                  "node": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "kind": {
                        "type": "string"
                      },
                      "slug": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "summary": {
                        "type": "string"
                      },
                      "aliases": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "status": {
                        "type": "string"
                      },
                      "confidence": {
                        "type": "number"
                      },
                      "sourceId": {
                        "type": "string"
                      },
                      "subject": {
                        "type": "string"
                      },
                      "subjectIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "targetHints": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "additionalProperties": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          }
                        }
                      },
                      "linkedObjectIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "updatedAt": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "id",
                      "kind",
                      "slug",
                      "title",
                      "aliases",
                      "status",
                      "confidence",
                      "metadata",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": true
                  }
                },
                "required": [
                  "kind",
                  "id",
                  "score",
                  "reason"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "ok",
            "spaceId",
            "query",
            "answer",
            "results"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "knowledge.candidate.decide",
        "title": "Decide Consolidation Candidate",
        "description": "Accept, reject, or supersede a knowledge consolidation candidate.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/knowledge/candidates/{id}/decide"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "decision": {
              "type": "string",
              "enum": [
                "accept",
                "reject",
                "supersede"
              ]
            },
            "decidedBy": {
              "type": "string"
            },
            "reason": {
              "type": "string"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "decision"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "candidate": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "candidateType": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "subjectKind": {
                  "type": "string"
                },
                "subjectId": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "score": {
                  "type": "number"
                },
                "evidence": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "suggestedMemoryClass": {
                  "type": "string"
                },
                "suggestedScope": {
                  "type": "string"
                },
                "decidedAt": {
                  "type": "number"
                },
                "decidedBy": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "candidateType",
                "status",
                "subjectKind",
                "subjectId",
                "title",
                "score",
                "evidence",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "candidate"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "knowledge.candidate.get",
        "title": "Get Consolidation Candidate",
        "description": "Return a single consolidation candidate.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/knowledge/candidates/{id}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "candidate": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "candidateType": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "subjectKind": {
                  "type": "string"
                },
                "subjectId": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "score": {
                  "type": "number"
                },
                "evidence": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "suggestedMemoryClass": {
                  "type": "string"
                },
                "suggestedScope": {
                  "type": "string"
                },
                "decidedAt": {
                  "type": "number"
                },
                "decidedBy": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "candidateType",
                "status",
                "subjectKind",
                "subjectId",
                "title",
                "score",
                "evidence",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "candidate"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "knowledge.candidates.list",
        "title": "List Consolidation Candidates",
        "description": "Return scored consolidation candidates for durable memory promotion, review, or source refresh.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/knowledge/candidates"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "number"
            },
            "status": {
              "type": "string"
            },
            "subjectKind": {
              "type": "string"
            },
            "subjectId": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "candidates": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "candidateType": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  },
                  "subjectKind": {
                    "type": "string"
                  },
                  "subjectId": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "summary": {
                    "type": "string"
                  },
                  "score": {
                    "type": "number"
                  },
                  "evidence": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "suggestedMemoryClass": {
                    "type": "string"
                  },
                  "suggestedScope": {
                    "type": "string"
                  },
                  "decidedAt": {
                    "type": "number"
                  },
                  "decidedBy": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "candidateType",
                  "status",
                  "subjectKind",
                  "subjectId",
                  "title",
                  "score",
                  "evidence",
                  "metadata",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "candidates"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "knowledge.connector.doctor",
        "title": "Doctor Knowledge Connector",
        "description": "Return readiness and setup diagnostics for a knowledge connector.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/knowledge/connectors/{id}/doctor"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "report": {
              "type": "object",
              "properties": {
                "connectorId": {
                  "type": "string"
                },
                "ready": {
                  "type": "boolean"
                },
                "summary": {
                  "type": "string"
                },
                "checks": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "pass",
                          "warn",
                          "fail"
                        ]
                      },
                      "detail": {
                        "type": "string"
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "id",
                      "label",
                      "status",
                      "detail"
                    ],
                    "additionalProperties": true
                  }
                },
                "hints": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "connectorId",
                "ready",
                "summary",
                "checks",
                "hints",
                "metadata"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "report"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "knowledge.connector.get",
        "title": "Get Knowledge Connector",
        "description": "Return a single knowledge connector manifest.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/knowledge/connectors/{id}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "connector": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "displayName": {
                  "type": "string"
                },
                "version": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "sourceType": {
                  "type": "string",
                  "enum": [
                    "url",
                    "bookmark",
                    "bookmark-list",
                    "history",
                    "document",
                    "repo",
                    "dataset",
                    "image",
                    "manual",
                    "other"
                  ]
                },
                "inputSchema": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "examples": {
                  "type": "array",
                  "items": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {}
                    ]
                  }
                },
                "capabilities": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "setup": {
                  "type": "object",
                  "properties": {
                    "version": {
                      "type": "string"
                    },
                    "summary": {
                      "type": "string"
                    },
                    "transportHints": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "steps": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "text",
                              "path",
                              "uri",
                              "secret",
                              "token",
                              "choice"
                            ]
                          },
                          "optional": {
                            "type": "boolean"
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "inline",
                              "env",
                              "goodvibes",
                              "bitwarden",
                              "vaultwarden",
                              "bws",
                              "manual"
                            ]
                          },
                          "description": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "key",
                          "label",
                          "kind"
                        ],
                        "additionalProperties": true
                      }
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "version",
                    "summary"
                  ],
                  "additionalProperties": true
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "description",
                "sourceType"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "connector"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "knowledge.connectors.list",
        "title": "List Knowledge Connectors",
        "description": "Return discoverable knowledge ingest connectors with input metadata and examples.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/knowledge/connectors"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "connectors": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "displayName": {
                    "type": "string"
                  },
                  "version": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "sourceType": {
                    "type": "string",
                    "enum": [
                      "url",
                      "bookmark",
                      "bookmark-list",
                      "history",
                      "document",
                      "repo",
                      "dataset",
                      "image",
                      "manual",
                      "other"
                    ]
                  },
                  "inputSchema": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "examples": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {}
                      ]
                    }
                  },
                  "capabilities": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "setup": {
                    "type": "object",
                    "properties": {
                      "version": {
                        "type": "string"
                      },
                      "summary": {
                        "type": "string"
                      },
                      "transportHints": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "steps": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "fields": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "key": {
                              "type": "string"
                            },
                            "label": {
                              "type": "string"
                            },
                            "kind": {
                              "type": "string",
                              "enum": [
                                "text",
                                "path",
                                "uri",
                                "secret",
                                "token",
                                "choice"
                              ]
                            },
                            "optional": {
                              "type": "boolean"
                            },
                            "source": {
                              "type": "string",
                              "enum": [
                                "inline",
                                "env",
                                "goodvibes",
                                "bitwarden",
                                "vaultwarden",
                                "bws",
                                "manual"
                              ]
                            },
                            "description": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "key",
                            "label",
                            "kind"
                          ],
                          "additionalProperties": true
                        }
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "version",
                      "summary"
                    ],
                    "additionalProperties": true
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "description",
                  "sourceType"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "connectors"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "knowledge.extraction.get",
        "title": "Get Knowledge Extraction",
        "description": "Return a single knowledge extraction record.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/knowledge/extractions/{id}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "extraction": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "sourceId": {
                  "type": "string"
                },
                "artifactId": {
                  "type": "string"
                },
                "extractorId": {
                  "type": "string"
                },
                "format": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "excerpt": {
                  "type": "string"
                },
                "sections": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "links": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "estimatedTokens": {
                  "type": "number"
                },
                "structure": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "sourceId",
                "extractorId",
                "format",
                "sections",
                "links",
                "estimatedTokens",
                "structure",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "extraction"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "knowledge.extractions.list",
        "title": "List Knowledge Extractions",
        "description": "Return structured extraction records for ingested sources.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/knowledge/extractions"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "number"
            },
            "sourceId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "includeAllSpaces": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "extractions": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "sourceId": {
                    "type": "string"
                  },
                  "artifactId": {
                    "type": "string"
                  },
                  "extractorId": {
                    "type": "string"
                  },
                  "format": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "summary": {
                    "type": "string"
                  },
                  "excerpt": {
                    "type": "string"
                  },
                  "sections": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "links": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "estimatedTokens": {
                    "type": "number"
                  },
                  "structure": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "sourceId",
                  "extractorId",
                  "format",
                  "sections",
                  "links",
                  "estimatedTokens",
                  "structure",
                  "metadata",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "extractions"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "knowledge.graphql.execute",
        "title": "Execute Knowledge GraphQL",
        "description": "Execute a GraphQL query or mutation against the dedicated knowledge domain endpoint.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/knowledge/graphql"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "query": {
              "type": "string"
            },
            "operationName": {
              "type": "string"
            },
            "variables": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "query"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "data": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "errors": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {}
                ]
              }
            },
            "extensions": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "knowledge.graphql.schema",
        "title": "Knowledge GraphQL Schema",
        "description": "Return the SDL for the dedicated knowledge GraphQL endpoint.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/knowledge/graphql/schema"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "language": {
              "type": "string"
            },
            "domain": {
              "type": "string"
            },
            "schema": {
              "type": "string"
            }
          },
          "required": [
            "language",
            "domain",
            "schema"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "knowledge.ingest.artifact",
        "title": "Ingest Artifact Into Knowledge",
        "description": "Snapshot an existing artifact, daemon-local path, remote URI, multipart file upload, or raw binary upload into the structured knowledge store and run structured extraction.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/knowledge/ingest/artifact"
        },
        "events": [
          "runtime.knowledge"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "artifactId": {
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "uri": {
              "type": "string"
            },
            "sourceType": {
              "type": "string",
              "enum": [
                "url",
                "bookmark",
                "bookmark-list",
                "history",
                "document",
                "repo",
                "dataset",
                "image",
                "manual",
                "other"
              ]
            },
            "title": {
              "type": "string"
            },
            "sessionId": {
              "type": "string"
            },
            "tags": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "folderPath": {
              "type": "string"
            },
            "allowPrivateHosts": {
              "type": "boolean"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "source": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "connectorId": {
                  "type": "string"
                },
                "sourceType": {
                  "type": "string",
                  "enum": [
                    "url",
                    "bookmark",
                    "bookmark-list",
                    "history",
                    "document",
                    "repo",
                    "dataset",
                    "image",
                    "manual",
                    "other"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "sourceUri": {
                  "type": "string"
                },
                "canonicalUri": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "folderPath": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "artifactId": {
                  "type": "string"
                },
                "contentHash": {
                  "type": "string"
                },
                "lastCrawledAt": {
                  "type": "number"
                },
                "crawlError": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "connectorId",
                "sourceType",
                "tags",
                "status",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "artifactId": {
              "type": "string"
            },
            "issues": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "severity": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  },
                  "sourceId": {
                    "type": "string"
                  },
                  "nodeId": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "severity",
                  "code",
                  "message",
                  "status",
                  "metadata",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "source",
            "issues"
          ],
          "additionalProperties": true
        },
        "invokable": true,
        "metadata": {
          "uploadModes": [
            "json-artifact-reference",
            "json-path-or-uri",
            "multipart-file",
            "raw-body"
          ],
          "largeUploadConfigKey": "storage.artifacts.maxBytes"
        }
      },
      {
        "id": "knowledge.ingest.bookmarks",
        "title": "Import Bookmark File",
        "description": "Parse a bookmark export file and ingest its URLs into the structured knowledge store.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/knowledge/ingest/bookmarks"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "sessionId": {
              "type": "string"
            },
            "allowPrivateHosts": {
              "type": "boolean"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "path"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "imported": {
              "type": "number"
            },
            "failed": {
              "type": "number"
            },
            "sources": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "connectorId": {
                    "type": "string"
                  },
                  "sourceType": {
                    "type": "string",
                    "enum": [
                      "url",
                      "bookmark",
                      "bookmark-list",
                      "history",
                      "document",
                      "repo",
                      "dataset",
                      "image",
                      "manual",
                      "other"
                    ]
                  },
                  "title": {
                    "type": "string"
                  },
                  "sourceUri": {
                    "type": "string"
                  },
                  "canonicalUri": {
                    "type": "string"
                  },
                  "summary": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "folderPath": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  },
                  "artifactId": {
                    "type": "string"
                  },
                  "contentHash": {
                    "type": "string"
                  },
                  "lastCrawledAt": {
                    "type": "number"
                  },
                  "crawlError": {
                    "type": "string"
                  },
                  "sessionId": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "connectorId",
                  "sourceType",
                  "tags",
                  "status",
                  "metadata",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            },
            "errors": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "imported",
            "failed",
            "sources",
            "errors"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "knowledge.ingest.browserHistory",
        "title": "Sync Browser History Into Knowledge",
        "description": "Read local browser history and bookmarks and index them as metadata-first structured knowledge.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/knowledge/ingest/browser-history"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "number"
            },
            "sinceMs": {
              "type": "number"
            },
            "browsers": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "sourceKinds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "homeOverride": {
              "type": "string"
            },
            "sessionId": {
              "type": "string"
            },
            "connectorId": {
              "type": "string"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "imported": {
              "type": "number"
            },
            "failed": {
              "type": "number"
            },
            "sources": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "connectorId": {
                    "type": "string"
                  },
                  "sourceType": {
                    "type": "string",
                    "enum": [
                      "url",
                      "bookmark",
                      "bookmark-list",
                      "history",
                      "document",
                      "repo",
                      "dataset",
                      "image",
                      "manual",
                      "other"
                    ]
                  },
                  "title": {
                    "type": "string"
                  },
                  "sourceUri": {
                    "type": "string"
                  },
                  "canonicalUri": {
                    "type": "string"
                  },
                  "summary": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "folderPath": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  },
                  "artifactId": {
                    "type": "string"
                  },
                  "contentHash": {
                    "type": "string"
                  },
                  "lastCrawledAt": {
                    "type": "number"
                  },
                  "crawlError": {
                    "type": "string"
                  },
                  "sessionId": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "connectorId",
                  "sourceType",
                  "tags",
                  "status",
                  "metadata",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            },
            "errors": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "profiles": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "family": {
                    "type": "string"
                  },
                  "browser": {
                    "type": "string"
                  },
                  "profileName": {
                    "type": "string"
                  },
                  "profilePath": {
                    "type": "string"
                  },
                  "historyPath": {
                    "type": "string"
                  },
                  "bookmarksPath": {
                    "type": "string"
                  }
                },
                "required": [
                  "family",
                  "browser",
                  "profileName",
                  "profilePath"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "imported",
            "failed",
            "sources",
            "errors",
            "profiles"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "knowledge.ingest.connector",
        "title": "Ingest Connector Input",
        "description": "Resolve a knowledge connector against inline input, inline content, or file-backed content.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/knowledge/ingest/connector"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "connectorId": {
              "type": "string"
            },
            "input": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                },
                {
                  "type": "object",
                  "additionalProperties": {}
                },
                {
                  "type": "array",
                  "items": {}
                }
              ]
            },
            "content": {
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "sessionId": {
              "type": "string"
            },
            "allowPrivateHosts": {
              "type": "boolean"
            }
          },
          "required": [
            "connectorId"
          ],
          "anyOf": [
            {
              "required": [
                "input"
              ]
            },
            {
              "required": [
                "content"
              ]
            },
            {
              "required": [
                "path"
              ]
            }
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "imported": {
              "type": "number"
            },
            "failed": {
              "type": "number"
            },
            "sources": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "connectorId": {
                    "type": "string"
                  },
                  "sourceType": {
                    "type": "string",
                    "enum": [
                      "url",
                      "bookmark",
                      "bookmark-list",
                      "history",
                      "document",
                      "repo",
                      "dataset",
                      "image",
                      "manual",
                      "other"
                    ]
                  },
                  "title": {
                    "type": "string"
                  },
                  "sourceUri": {
                    "type": "string"
                  },
                  "canonicalUri": {
                    "type": "string"
                  },
                  "summary": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "folderPath": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  },
                  "artifactId": {
                    "type": "string"
                  },
                  "contentHash": {
                    "type": "string"
                  },
                  "lastCrawledAt": {
                    "type": "number"
                  },
                  "crawlError": {
                    "type": "string"
                  },
                  "sessionId": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "connectorId",
                  "sourceType",
                  "tags",
                  "status",
                  "metadata",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            },
            "errors": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "imported",
            "failed",
            "sources",
            "errors"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "knowledge.ingest.url",
        "title": "Ingest URL Into Knowledge",
        "description": "Fetch, snapshot, and compile a URL into the structured knowledge store.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/knowledge/ingest/url"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "sourceType": {
              "type": "string",
              "enum": [
                "url",
                "bookmark",
                "bookmark-list",
                "history",
                "document",
                "repo",
                "dataset",
                "image",
                "manual",
                "other"
              ]
            },
            "sessionId": {
              "type": "string"
            },
            "tags": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "folderPath": {
              "type": "string"
            },
            "allowPrivateHosts": {
              "type": "boolean"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "url"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "source": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "connectorId": {
                  "type": "string"
                },
                "sourceType": {
                  "type": "string",
                  "enum": [
                    "url",
                    "bookmark",
                    "bookmark-list",
                    "history",
                    "document",
                    "repo",
                    "dataset",
                    "image",
                    "manual",
                    "other"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "sourceUri": {
                  "type": "string"
                },
                "canonicalUri": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "folderPath": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "artifactId": {
                  "type": "string"
                },
                "contentHash": {
                  "type": "string"
                },
                "lastCrawledAt": {
                  "type": "number"
                },
                "crawlError": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "connectorId",
                "sourceType",
                "tags",
                "status",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "artifactId": {
              "type": "string"
            },
            "issues": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "severity": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  },
                  "sourceId": {
                    "type": "string"
                  },
                  "nodeId": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "severity",
                  "code",
                  "message",
                  "status",
                  "metadata",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "source",
            "issues"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "knowledge.ingest.urls",
        "title": "Import URL List",
        "description": "Parse a URL list file and ingest its entries into the structured knowledge store.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/knowledge/ingest/urls"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "sessionId": {
              "type": "string"
            },
            "allowPrivateHosts": {
              "type": "boolean"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "path"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "imported": {
              "type": "number"
            },
            "failed": {
              "type": "number"
            },
            "sources": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "connectorId": {
                    "type": "string"
                  },
                  "sourceType": {
                    "type": "string",
                    "enum": [
                      "url",
                      "bookmark",
                      "bookmark-list",
                      "history",
                      "document",
                      "repo",
                      "dataset",
                      "image",
                      "manual",
                      "other"
                    ]
                  },
                  "title": {
                    "type": "string"
                  },
                  "sourceUri": {
                    "type": "string"
                  },
                  "canonicalUri": {
                    "type": "string"
                  },
                  "summary": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "folderPath": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  },
                  "artifactId": {
                    "type": "string"
                  },
                  "contentHash": {
                    "type": "string"
                  },
                  "lastCrawledAt": {
                    "type": "number"
                  },
                  "crawlError": {
                    "type": "string"
                  },
                  "sessionId": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "connectorId",
                  "sourceType",
                  "tags",
                  "status",
                  "metadata",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            },
            "errors": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "imported",
            "failed",
            "sources",
            "errors"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "knowledge.issue.review",
        "title": "Review Knowledge Issue",
        "description": "Record an LLM or user review decision for a knowledge issue and optionally apply semantic facts to the linked source or node.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/knowledge/issues/{id}/review"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "action": {
              "type": "string"
            },
            "reviewer": {
              "type": "string"
            },
            "value": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "id",
            "action"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "issue": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "severity": {
                  "type": "string"
                },
                "code": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "sourceId": {
                  "type": "string"
                },
                "nodeId": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "severity",
                "code",
                "message",
                "status",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "node": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "slug": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "aliases": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "status": {
                  "type": "string"
                },
                "confidence": {
                  "type": "number"
                },
                "sourceId": {
                  "type": "string"
                },
                "subject": {
                  "type": "string"
                },
                "subjectIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "targetHints": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "linkedObjectIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "kind",
                "slug",
                "title",
                "aliases",
                "status",
                "confidence",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "source": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "connectorId": {
                  "type": "string"
                },
                "sourceType": {
                  "type": "string",
                  "enum": [
                    "url",
                    "bookmark",
                    "bookmark-list",
                    "history",
                    "document",
                    "repo",
                    "dataset",
                    "image",
                    "manual",
                    "other"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "sourceUri": {
                  "type": "string"
                },
                "canonicalUri": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "folderPath": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "artifactId": {
                  "type": "string"
                },
                "contentHash": {
                  "type": "string"
                },
                "lastCrawledAt": {
                  "type": "number"
                },
                "crawlError": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "connectorId",
                "sourceType",
                "tags",
                "status",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "suppression": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "appliedFacts": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "ok",
            "issue"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "knowledge.issues.list",
        "title": "List Knowledge Issues",
        "description": "Return current knowledge lint and health issues.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/knowledge/issues"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "number"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "includeAllSpaces": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "issues": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "severity": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  },
                  "sourceId": {
                    "type": "string"
                  },
                  "nodeId": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "severity",
                  "code",
                  "message",
                  "status",
                  "metadata",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "issues"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "knowledge.item.get",
        "title": "Get Knowledge Item",
        "description": "Return a single structured knowledge source, node, or issue with linked relations.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/knowledge/items/{id}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "includeAllSpaces": {
              "type": "boolean"
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "source": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "connectorId": {
                  "type": "string"
                },
                "sourceType": {
                  "type": "string",
                  "enum": [
                    "url",
                    "bookmark",
                    "bookmark-list",
                    "history",
                    "document",
                    "repo",
                    "dataset",
                    "image",
                    "manual",
                    "other"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "sourceUri": {
                  "type": "string"
                },
                "canonicalUri": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "folderPath": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "artifactId": {
                  "type": "string"
                },
                "contentHash": {
                  "type": "string"
                },
                "lastCrawledAt": {
                  "type": "number"
                },
                "crawlError": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "connectorId",
                "sourceType",
                "tags",
                "status",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "node": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "slug": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "aliases": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "status": {
                  "type": "string"
                },
                "confidence": {
                  "type": "number"
                },
                "sourceId": {
                  "type": "string"
                },
                "subject": {
                  "type": "string"
                },
                "subjectIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "targetHints": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "linkedObjectIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "kind",
                "slug",
                "title",
                "aliases",
                "status",
                "confidence",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "issue": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "severity": {
                  "type": "string"
                },
                "code": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "sourceId": {
                  "type": "string"
                },
                "nodeId": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "severity",
                "code",
                "message",
                "status",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "relatedEdges": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "fromKind": {
                    "type": "string"
                  },
                  "fromId": {
                    "type": "string"
                  },
                  "toKind": {
                    "type": "string"
                  },
                  "toId": {
                    "type": "string"
                  },
                  "relation": {
                    "type": "string"
                  },
                  "weight": {
                    "type": "number"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "fromKind",
                  "fromId",
                  "toKind",
                  "toId",
                  "relation",
                  "weight",
                  "metadata",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            },
            "linkedSources": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "connectorId": {
                    "type": "string"
                  },
                  "sourceType": {
                    "type": "string",
                    "enum": [
                      "url",
                      "bookmark",
                      "bookmark-list",
                      "history",
                      "document",
                      "repo",
                      "dataset",
                      "image",
                      "manual",
                      "other"
                    ]
                  },
                  "title": {
                    "type": "string"
                  },
                  "sourceUri": {
                    "type": "string"
                  },
                  "canonicalUri": {
                    "type": "string"
                  },
                  "summary": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "folderPath": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  },
                  "artifactId": {
                    "type": "string"
                  },
                  "contentHash": {
                    "type": "string"
                  },
                  "lastCrawledAt": {
                    "type": "number"
                  },
                  "crawlError": {
                    "type": "string"
                  },
                  "sessionId": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "connectorId",
                  "sourceType",
                  "tags",
                  "status",
                  "metadata",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            },
            "linkedNodes": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string"
                  },
                  "slug": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "summary": {
                    "type": "string"
                  },
                  "aliases": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "status": {
                    "type": "string"
                  },
                  "confidence": {
                    "type": "number"
                  },
                  "sourceId": {
                    "type": "string"
                  },
                  "subject": {
                    "type": "string"
                  },
                  "subjectIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "targetHints": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    }
                  },
                  "linkedObjectIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "kind",
                  "slug",
                  "title",
                  "aliases",
                  "status",
                  "confidence",
                  "metadata",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            }
          },
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "knowledge.job-runs.list",
        "title": "List Knowledge Job Runs",
        "description": "Return recent knowledge job runs.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/knowledge/job-runs"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "number"
            },
            "jobId": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "runs": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "jobId": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "queued",
                      "running",
                      "completed",
                      "failed"
                    ]
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "inline",
                      "background"
                    ]
                  },
                  "requestedAt": {
                    "type": "number"
                  },
                  "startedAt": {
                    "type": "number"
                  },
                  "completedAt": {
                    "type": "number"
                  },
                  "error": {
                    "type": "string"
                  },
                  "result": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "issueCount": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "issueCount"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "sourceCount": {
                            "type": "number"
                          },
                          "issueCount": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "sourceCount",
                          "issueCount"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "refreshed": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "refreshed"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "imported": {
                            "type": "number"
                          },
                          "failed": {
                            "type": "number"
                          },
                          "profileCount": {
                            "type": "number"
                          },
                          "errorCount": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "imported",
                          "failed",
                          "profileCount",
                          "errorCount"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "projections": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "targetId": {
                                  "type": "string"
                                },
                                "artifactId": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "targetId",
                                "artifactId"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "projections"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "scanned": {
                            "type": "number"
                          },
                          "enriched": {
                            "type": "number"
                          },
                          "skipped": {
                            "type": "number"
                          },
                          "failed": {
                            "type": "number"
                          },
                          "errors": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "object",
                                  "additionalProperties": {}
                                },
                                {}
                              ]
                            }
                          },
                          "selfImprovement": {
                            "type": "object",
                            "additionalProperties": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "object",
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "array",
                                  "items": {}
                                }
                              ]
                            }
                          }
                        },
                        "required": [
                          "scanned",
                          "enriched",
                          "skipped",
                          "failed",
                          "errors"
                        ],
                        "additionalProperties": true
                      },
                      {
                        "type": "object",
                        "properties": {
                          "scannedGaps": {
                            "type": "number"
                          },
                          "candidateGaps": {
                            "type": "number"
                          },
                          "processedGaps": {
                            "type": "number"
                          },
                          "createdGaps": {
                            "type": "number"
                          },
                          "repairableGaps": {
                            "type": "number"
                          },
                          "suppressedGaps": {
                            "type": "number"
                          },
                          "skippedGaps": {
                            "type": "number"
                          },
                          "searched": {
                            "type": "number"
                          },
                          "ingestedSources": {
                            "type": "number"
                          },
                          "linkedRepairs": {
                            "type": "number"
                          },
                          "blockedGaps": {
                            "type": "number"
                          },
                          "closedGaps": {
                            "type": "number"
                          },
                          "queuedTasks": {
                            "type": "number"
                          },
                          "requestedLimit": {
                            "type": "number"
                          },
                          "effectiveLimit": {
                            "type": "number"
                          },
                          "coalesced": {
                            "type": "boolean"
                          },
                          "truncated": {
                            "type": "boolean"
                          },
                          "budgetExhausted": {
                            "type": "boolean"
                          },
                          "taskIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "ingestedSourceIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "errors": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "object",
                                  "additionalProperties": {}
                                },
                                {}
                              ]
                            }
                          }
                        },
                        "required": [
                          "scannedGaps",
                          "createdGaps",
                          "repairableGaps",
                          "suppressedGaps",
                          "skippedGaps",
                          "searched",
                          "ingestedSources",
                          "linkedRepairs",
                          "errors"
                        ],
                        "additionalProperties": true
                      },
                      {
                        "type": "object",
                        "properties": {
                          "reportId": {
                            "type": "string"
                          },
                          "metrics": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "number"
                            }
                          }
                        },
                        "required": [
                          "reportId",
                          "metrics"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "jobId",
                  "status",
                  "mode",
                  "requestedAt",
                  "result",
                  "metadata",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "runs"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "knowledge.job.get",
        "title": "Get Knowledge Job",
        "description": "Return a single knowledge job definition.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/knowledge/jobs/{jobId}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "jobId": {
              "type": "string"
            }
          },
          "required": [
            "jobId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "job": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "lint",
                    "reindex",
                    "refresh-stale",
                    "refresh-bookmarks",
                    "sync-browser-history",
                    "rebuild-projections",
                    "semantic-enrichment",
                    "semantic-self-improvement",
                    "light-consolidation",
                    "deep-consolidation"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "defaultMode": {
                  "type": "string",
                  "enum": [
                    "inline",
                    "background"
                  ]
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "kind",
                "title",
                "description",
                "defaultMode",
                "metadata"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "job"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "knowledge.job.run",
        "title": "Run Knowledge Job",
        "description": "Queue or run a structured knowledge maintenance job.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/knowledge/jobs/{jobId}/run"
        },
        "events": [
          "runtime.knowledge"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "mode": {
              "type": "string",
              "enum": [
                "inline",
                "background"
              ]
            },
            "sourceIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "limit": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "run": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "jobId": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "running",
                    "completed",
                    "failed"
                  ]
                },
                "mode": {
                  "type": "string",
                  "enum": [
                    "inline",
                    "background"
                  ]
                },
                "requestedAt": {
                  "type": "number"
                },
                "startedAt": {
                  "type": "number"
                },
                "completedAt": {
                  "type": "number"
                },
                "error": {
                  "type": "string"
                },
                "result": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "issueCount": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "issueCount"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "sourceCount": {
                          "type": "number"
                        },
                        "issueCount": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "sourceCount",
                        "issueCount"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "refreshed": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "refreshed"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "imported": {
                          "type": "number"
                        },
                        "failed": {
                          "type": "number"
                        },
                        "profileCount": {
                          "type": "number"
                        },
                        "errorCount": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "imported",
                        "failed",
                        "profileCount",
                        "errorCount"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "projections": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "targetId": {
                                "type": "string"
                              },
                              "artifactId": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "targetId",
                              "artifactId"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "projections"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "scanned": {
                          "type": "number"
                        },
                        "enriched": {
                          "type": "number"
                        },
                        "skipped": {
                          "type": "number"
                        },
                        "failed": {
                          "type": "number"
                        },
                        "errors": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {}
                            ]
                          }
                        },
                        "selfImprovement": {
                          "type": "object",
                          "additionalProperties": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "scanned",
                        "enriched",
                        "skipped",
                        "failed",
                        "errors"
                      ],
                      "additionalProperties": true
                    },
                    {
                      "type": "object",
                      "properties": {
                        "scannedGaps": {
                          "type": "number"
                        },
                        "candidateGaps": {
                          "type": "number"
                        },
                        "processedGaps": {
                          "type": "number"
                        },
                        "createdGaps": {
                          "type": "number"
                        },
                        "repairableGaps": {
                          "type": "number"
                        },
                        "suppressedGaps": {
                          "type": "number"
                        },
                        "skippedGaps": {
                          "type": "number"
                        },
                        "searched": {
                          "type": "number"
                        },
                        "ingestedSources": {
                          "type": "number"
                        },
                        "linkedRepairs": {
                          "type": "number"
                        },
                        "blockedGaps": {
                          "type": "number"
                        },
                        "closedGaps": {
                          "type": "number"
                        },
                        "queuedTasks": {
                          "type": "number"
                        },
                        "requestedLimit": {
                          "type": "number"
                        },
                        "effectiveLimit": {
                          "type": "number"
                        },
                        "coalesced": {
                          "type": "boolean"
                        },
                        "truncated": {
                          "type": "boolean"
                        },
                        "budgetExhausted": {
                          "type": "boolean"
                        },
                        "taskIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "ingestedSourceIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "errors": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {}
                            ]
                          }
                        }
                      },
                      "required": [
                        "scannedGaps",
                        "createdGaps",
                        "repairableGaps",
                        "suppressedGaps",
                        "skippedGaps",
                        "searched",
                        "ingestedSources",
                        "linkedRepairs",
                        "errors"
                      ],
                      "additionalProperties": true
                    },
                    {
                      "type": "object",
                      "properties": {
                        "reportId": {
                          "type": "string"
                        },
                        "metrics": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "number"
                          }
                        }
                      },
                      "required": [
                        "reportId",
                        "metrics"
                      ],
                      "additionalProperties": false
                    }
                  ]
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "jobId",
                "status",
                "mode",
                "requestedAt",
                "result",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "run"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "knowledge.jobs.list",
        "title": "List Knowledge Jobs",
        "description": "Return built-in structured knowledge maintenance jobs.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/knowledge/jobs"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "jobs": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "lint",
                      "reindex",
                      "refresh-stale",
                      "refresh-bookmarks",
                      "sync-browser-history",
                      "rebuild-projections",
                      "semantic-enrichment",
                      "semantic-self-improvement",
                      "light-consolidation",
                      "deep-consolidation"
                    ]
                  },
                  "title": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "defaultMode": {
                    "type": "string",
                    "enum": [
                      "inline",
                      "background"
                    ]
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "kind",
                  "title",
                  "description",
                  "defaultMode",
                  "metadata"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "jobs"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "knowledge.lint",
        "title": "Lint Structured Knowledge",
        "description": "Run deterministic knowledge lint checks and return the current issues.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/knowledge/lint"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "issues": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "severity": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  },
                  "sourceId": {
                    "type": "string"
                  },
                  "nodeId": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "severity",
                  "code",
                  "message",
                  "status",
                  "metadata",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "issues"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "knowledge.map",
        "title": "Map Knowledge Graph",
        "description": "Return a deterministic visual map of structured knowledge nodes, sources, edges, and optional issues.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/knowledge/map"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "number"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "includeAllSpaces": {
              "type": "boolean"
            },
            "includeSources": {
              "type": "boolean"
            },
            "includeIssues": {
              "type": "boolean"
            },
            "includeGenerated": {
              "type": "boolean"
            },
            "query": {
              "type": "string"
            },
            "recordKinds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "ids": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "linkedToIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "nodeKinds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "sourceTypes": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "sourceStatuses": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "nodeStatuses": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "issueCodes": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "issueStatuses": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "issueSeverities": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "edgeRelations": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "tags": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "minConfidence": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "spaceId": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "generatedAt": {
              "type": "number"
            },
            "width": {
              "type": "number"
            },
            "height": {
              "type": "number"
            },
            "nodeCount": {
              "type": "number"
            },
            "edgeCount": {
              "type": "number"
            },
            "totalNodeCount": {
              "type": "number"
            },
            "totalEdgeCount": {
              "type": "number"
            },
            "facets": {
              "type": "object",
              "properties": {
                "recordKinds": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "string"
                      },
                      "count": {
                        "type": "number"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "value",
                      "count"
                    ],
                    "additionalProperties": true
                  }
                },
                "nodeKinds": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "string"
                      },
                      "count": {
                        "type": "number"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "value",
                      "count"
                    ],
                    "additionalProperties": true
                  }
                },
                "sourceTypes": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "string"
                      },
                      "count": {
                        "type": "number"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "value",
                      "count"
                    ],
                    "additionalProperties": true
                  }
                },
                "sourceStatuses": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "string"
                      },
                      "count": {
                        "type": "number"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "value",
                      "count"
                    ],
                    "additionalProperties": true
                  }
                },
                "nodeStatuses": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "string"
                      },
                      "count": {
                        "type": "number"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "value",
                      "count"
                    ],
                    "additionalProperties": true
                  }
                },
                "issueCodes": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "string"
                      },
                      "count": {
                        "type": "number"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "value",
                      "count"
                    ],
                    "additionalProperties": true
                  }
                },
                "issueStatuses": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "string"
                      },
                      "count": {
                        "type": "number"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "value",
                      "count"
                    ],
                    "additionalProperties": true
                  }
                },
                "issueSeverities": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "string"
                      },
                      "count": {
                        "type": "number"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "value",
                      "count"
                    ],
                    "additionalProperties": true
                  }
                },
                "edgeRelations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "string"
                      },
                      "count": {
                        "type": "number"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "value",
                      "count"
                    ],
                    "additionalProperties": true
                  }
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "string"
                      },
                      "count": {
                        "type": "number"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "value",
                      "count"
                    ],
                    "additionalProperties": true
                  }
                },
                "homeAssistant": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "string"
                        },
                        "count": {
                          "type": "number"
                        },
                        "label": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "value",
                        "count"
                      ],
                      "additionalProperties": true
                    }
                  }
                }
              },
              "additionalProperties": true
            },
            "nodes": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "recordKind": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "summary": {
                    "type": "string"
                  },
                  "x": {
                    "type": "number"
                  },
                  "y": {
                    "type": "number"
                  },
                  "radius": {
                    "type": "number"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "recordKind",
                  "kind",
                  "title",
                  "x",
                  "y",
                  "radius",
                  "metadata"
                ],
                "additionalProperties": true
              }
            },
            "edges": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "fromId": {
                    "type": "string"
                  },
                  "toId": {
                    "type": "string"
                  },
                  "source": {
                    "type": "string"
                  },
                  "target": {
                    "type": "string"
                  },
                  "fromTitle": {
                    "type": "string"
                  },
                  "toTitle": {
                    "type": "string"
                  },
                  "sourceTitle": {
                    "type": "string"
                  },
                  "targetTitle": {
                    "type": "string"
                  },
                  "relation": {
                    "type": "string"
                  },
                  "weight": {
                    "type": "number"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "fromId",
                  "toId",
                  "relation",
                  "weight",
                  "metadata"
                ],
                "additionalProperties": true
              }
            },
            "svg": {
              "type": "string"
            }
          },
          "required": [
            "ok",
            "title",
            "generatedAt",
            "width",
            "height",
            "nodeCount",
            "edgeCount",
            "nodes",
            "edges",
            "svg"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "knowledge.nodes.list",
        "title": "List Knowledge Nodes",
        "description": "Return compiled knowledge nodes. Without ?limit/?cursor returns { nodes: [...] } (backward compatible). With ?limit=N (1–1000, default 100) and optional ?cursor=<opaque> returns a PaginatedResponse envelope { items, hasMore, nextCursor? }. Fetch cap is 5 000 items per request (knowledge store does not support cursor/offset range queries natively). Invalid cursors return HTTP 400.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/knowledge/nodes"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "number"
            },
            "cursor": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "includeAllSpaces": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "nodes": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string"
                  },
                  "slug": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "summary": {
                    "type": "string"
                  },
                  "aliases": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "status": {
                    "type": "string"
                  },
                  "confidence": {
                    "type": "number"
                  },
                  "sourceId": {
                    "type": "string"
                  },
                  "subject": {
                    "type": "string"
                  },
                  "subjectIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "targetHints": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    }
                  },
                  "linkedObjectIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "kind",
                  "slug",
                  "title",
                  "aliases",
                  "status",
                  "confidence",
                  "metadata",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "nodes"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "knowledge.packet",
        "title": "Build Knowledge Packet",
        "description": "Build a compact structured knowledge packet for a task and write scope.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/knowledge/packet"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "task": {
              "type": "string"
            },
            "writeScope": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "budgetLimit": {
              "type": "number"
            },
            "detail": {
              "type": "string",
              "enum": [
                "compact",
                "standard",
                "detailed"
              ]
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "includeAllSpaces": {
              "type": "boolean"
            }
          },
          "required": [
            "task"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "task": {
              "type": "string"
            },
            "writeScope": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "generatedAt": {
              "type": "number"
            },
            "detail": {
              "type": "string",
              "enum": [
                "compact",
                "standard",
                "detailed"
              ]
            },
            "strategy": {
              "type": "string"
            },
            "budgetLimit": {
              "type": "number"
            },
            "estimatedTokens": {
              "type": "number"
            },
            "truncated": {
              "type": "boolean"
            },
            "totalCandidates": {
              "type": "number"
            },
            "droppedCount": {
              "type": "number"
            },
            "droppedForBudget": {
              "type": "number"
            },
            "budgetExhausted": {
              "type": "boolean"
            },
            "items": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string"
                  },
                  "id": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "summary": {
                    "type": "string"
                  },
                  "uri": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string"
                  },
                  "score": {
                    "type": "number"
                  },
                  "estimatedTokens": {
                    "type": "number"
                  },
                  "related": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "evidence": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "kind",
                  "id",
                  "title",
                  "reason",
                  "score",
                  "estimatedTokens",
                  "related",
                  "evidence",
                  "metadata"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "task",
            "writeScope",
            "generatedAt",
            "detail",
            "strategy",
            "budgetLimit",
            "estimatedTokens",
            "truncated",
            "totalCandidates",
            "droppedCount",
            "droppedForBudget",
            "budgetExhausted",
            "items"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "knowledge.projection.materialize",
        "title": "Materialize Knowledge Projection",
        "description": "Render and persist a markdown/wiki projection as a derived artifact.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/knowledge/projections/materialize"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "overview",
                "bundle",
                "dashboard",
                "source",
                "node",
                "issue",
                "rollup"
              ]
            },
            "id": {
              "type": "string"
            },
            "limit": {
              "type": "number"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "includeAllSpaces": {
              "type": "boolean"
            }
          },
          "required": [
            "kind"
          ],
          "additionalProperties": true,
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "overview",
                    "bundle",
                    "dashboard"
                  ]
                }
              },
              "required": [
                "kind"
              ],
              "additionalProperties": true
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "source",
                    "node",
                    "issue",
                    "rollup"
                  ]
                },
                "id": {
                  "type": "string"
                }
              },
              "required": [
                "kind",
                "id"
              ],
              "additionalProperties": true
            }
          ]
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "bundle": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "target": {
                  "type": "object",
                  "properties": {
                    "targetId": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "itemId": {
                      "type": "string"
                    },
                    "defaultPath": {
                      "type": "string"
                    },
                    "defaultFilename": {
                      "type": "string"
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "targetId",
                    "kind",
                    "title",
                    "description",
                    "defaultPath",
                    "defaultFilename",
                    "metadata"
                  ],
                  "additionalProperties": true
                },
                "generatedAt": {
                  "type": "number"
                },
                "pageCount": {
                  "type": "number"
                },
                "pages": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "path": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "format": {
                        "type": "string"
                      },
                      "content": {
                        "type": "string"
                      },
                      "itemIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "path",
                      "title",
                      "format",
                      "content",
                      "itemIds",
                      "metadata"
                    ],
                    "additionalProperties": false
                  }
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "target",
                "generatedAt",
                "pageCount",
                "pages",
                "metadata"
              ],
              "additionalProperties": false
            },
            "artifact": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "mimeType": {
                  "type": "string"
                },
                "filename": {
                  "type": "string"
                },
                "sizeBytes": {
                  "type": "number"
                },
                "sha256": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "expiresAt": {
                  "type": "number"
                },
                "sourceUri": {
                  "type": "string"
                },
                "acquisitionMode": {
                  "type": "string"
                },
                "fetchMode": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "kind",
                "mimeType",
                "sizeBytes",
                "sha256",
                "createdAt",
                "metadata"
              ],
              "additionalProperties": true
            },
            "source": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "connectorId": {
                  "type": "string"
                },
                "sourceType": {
                  "type": "string",
                  "enum": [
                    "url",
                    "bookmark",
                    "bookmark-list",
                    "history",
                    "document",
                    "repo",
                    "dataset",
                    "image",
                    "manual",
                    "other"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "sourceUri": {
                  "type": "string"
                },
                "canonicalUri": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "folderPath": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "artifactId": {
                  "type": "string"
                },
                "contentHash": {
                  "type": "string"
                },
                "lastCrawledAt": {
                  "type": "number"
                },
                "crawlError": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "connectorId",
                "sourceType",
                "tags",
                "status",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "linked": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "fromKind": {
                  "type": "string"
                },
                "fromId": {
                  "type": "string"
                },
                "toKind": {
                  "type": "string"
                },
                "toId": {
                  "type": "string"
                },
                "relation": {
                  "type": "string"
                },
                "weight": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "fromKind",
                "fromId",
                "toKind",
                "toId",
                "relation",
                "weight",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "artifactCreated": {
              "type": "boolean"
            }
          },
          "required": [
            "bundle",
            "artifact"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "knowledge.projection.render",
        "title": "Render Knowledge Projection",
        "description": "Render a markdown/wiki projection from the canonical structured knowledge store.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/knowledge/projections/render"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "overview",
                "bundle",
                "dashboard",
                "source",
                "node",
                "issue",
                "rollup"
              ]
            },
            "id": {
              "type": "string"
            },
            "limit": {
              "type": "number"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "includeAllSpaces": {
              "type": "boolean"
            }
          },
          "required": [
            "kind"
          ],
          "additionalProperties": true,
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "overview",
                    "bundle",
                    "dashboard"
                  ]
                }
              },
              "required": [
                "kind"
              ],
              "additionalProperties": true
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "source",
                    "node",
                    "issue",
                    "rollup"
                  ]
                },
                "id": {
                  "type": "string"
                }
              },
              "required": [
                "kind",
                "id"
              ],
              "additionalProperties": true
            }
          ]
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "target": {
              "type": "object",
              "properties": {
                "targetId": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "itemId": {
                  "type": "string"
                },
                "defaultPath": {
                  "type": "string"
                },
                "defaultFilename": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "targetId",
                "kind",
                "title",
                "description",
                "defaultPath",
                "defaultFilename",
                "metadata"
              ],
              "additionalProperties": true
            },
            "generatedAt": {
              "type": "number"
            },
            "pageCount": {
              "type": "number"
            },
            "pages": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "path": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "format": {
                    "type": "string"
                  },
                  "content": {
                    "type": "string"
                  },
                  "itemIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "path",
                  "title",
                  "format",
                  "content",
                  "itemIds",
                  "metadata"
                ],
                "additionalProperties": false
              }
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "id",
            "target",
            "generatedAt",
            "pageCount",
            "pages",
            "metadata"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "knowledge.projections.list",
        "title": "List Knowledge Projections",
        "description": "Return renderable markdown/wiki projection targets for the knowledge domain.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/knowledge/projections"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "targets": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "targetId": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "itemId": {
                    "type": "string"
                  },
                  "defaultPath": {
                    "type": "string"
                  },
                  "defaultFilename": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "targetId",
                  "kind",
                  "title",
                  "description",
                  "defaultPath",
                  "defaultFilename",
                  "metadata"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "targets"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "knowledge.refinement.run",
        "title": "Run Knowledge Refinement",
        "description": "Run source-backed semantic self-improvement for a space, source list, or specific gaps.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/knowledge/refinement/run"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "knowledgeSpaceId": {
              "type": "string"
            },
            "spaceId": {
              "type": "string"
            },
            "gapIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "sourceIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "limit": {
              "type": "number"
            },
            "maxRunMs": {
              "type": "number"
            },
            "force": {
              "type": "boolean"
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "scannedGaps": {
              "type": "number"
            },
            "candidateGaps": {
              "type": "number"
            },
            "processedGaps": {
              "type": "number"
            },
            "createdGaps": {
              "type": "number"
            },
            "repairableGaps": {
              "type": "number"
            },
            "suppressedGaps": {
              "type": "number"
            },
            "skippedGaps": {
              "type": "number"
            },
            "searched": {
              "type": "number"
            },
            "ingestedSources": {
              "type": "number"
            },
            "linkedRepairs": {
              "type": "number"
            },
            "blockedGaps": {
              "type": "number"
            },
            "closedGaps": {
              "type": "number"
            },
            "queuedTasks": {
              "type": "number"
            },
            "requestedLimit": {
              "type": "number"
            },
            "effectiveLimit": {
              "type": "number"
            },
            "coalesced": {
              "type": "boolean"
            },
            "truncated": {
              "type": "boolean"
            },
            "budgetExhausted": {
              "type": "boolean"
            },
            "taskIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "ingestedSourceIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "errors": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {}
                ]
              }
            }
          },
          "required": [
            "scannedGaps",
            "createdGaps",
            "repairableGaps",
            "suppressedGaps",
            "skippedGaps",
            "searched",
            "ingestedSources",
            "linkedRepairs",
            "errors"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "knowledge.refinement.task.cancel",
        "title": "Cancel Knowledge Refinement Task",
        "description": "Mark a queued or active semantic refinement task as cancelled.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/knowledge/refinement/tasks/{id}/cancel"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "task": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "spaceId": {
                  "type": "string"
                },
                "subjectKind": {
                  "type": "string"
                },
                "subjectId": {
                  "type": "string"
                },
                "subjectTitle": {
                  "type": "string"
                },
                "subjectType": {
                  "type": "string"
                },
                "gapId": {
                  "type": "string"
                },
                "issueId": {
                  "type": "string"
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "detected",
                    "queued",
                    "searching",
                    "evaluating",
                    "extracting",
                    "applying",
                    "verified",
                    "closed",
                    "blocked",
                    "suppressed",
                    "needs_review",
                    "cancelled",
                    "failed"
                  ]
                },
                "priority": {
                  "type": "string",
                  "enum": [
                    "low",
                    "normal",
                    "high",
                    "urgent"
                  ]
                },
                "trigger": {
                  "type": "string",
                  "enum": [
                    "ingest",
                    "homegraph-sync",
                    "reindex",
                    "scheduled",
                    "answer",
                    "manual"
                  ]
                },
                "budget": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "number"
                  }
                },
                "attemptCount": {
                  "type": "number"
                },
                "blockedReason": {
                  "type": "string"
                },
                "nextRepairAttemptAt": {
                  "type": "number"
                },
                "acceptedSourceIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "ingestedSourceIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "rejectedSourceUrls": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "promotedFactCount": {
                  "type": "number"
                },
                "sourceAssessments": {
                  "type": "array",
                  "items": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {}
                    ]
                  }
                },
                "trace": {
                  "type": "array",
                  "items": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {}
                    ]
                  }
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "spaceId",
                "state",
                "priority",
                "trigger",
                "budget",
                "attemptCount",
                "trace",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "task"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "knowledge.refinement.task.get",
        "title": "Get Knowledge Refinement Task",
        "description": "Return one semantic refinement task and its trace.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/knowledge/refinement/tasks/{id}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "task": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "spaceId": {
                  "type": "string"
                },
                "subjectKind": {
                  "type": "string"
                },
                "subjectId": {
                  "type": "string"
                },
                "subjectTitle": {
                  "type": "string"
                },
                "subjectType": {
                  "type": "string"
                },
                "gapId": {
                  "type": "string"
                },
                "issueId": {
                  "type": "string"
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "detected",
                    "queued",
                    "searching",
                    "evaluating",
                    "extracting",
                    "applying",
                    "verified",
                    "closed",
                    "blocked",
                    "suppressed",
                    "needs_review",
                    "cancelled",
                    "failed"
                  ]
                },
                "priority": {
                  "type": "string",
                  "enum": [
                    "low",
                    "normal",
                    "high",
                    "urgent"
                  ]
                },
                "trigger": {
                  "type": "string",
                  "enum": [
                    "ingest",
                    "homegraph-sync",
                    "reindex",
                    "scheduled",
                    "answer",
                    "manual"
                  ]
                },
                "budget": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "number"
                  }
                },
                "attemptCount": {
                  "type": "number"
                },
                "blockedReason": {
                  "type": "string"
                },
                "nextRepairAttemptAt": {
                  "type": "number"
                },
                "acceptedSourceIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "ingestedSourceIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "rejectedSourceUrls": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "promotedFactCount": {
                  "type": "number"
                },
                "sourceAssessments": {
                  "type": "array",
                  "items": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {}
                    ]
                  }
                },
                "trace": {
                  "type": "array",
                  "items": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {}
                    ]
                  }
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "spaceId",
                "state",
                "priority",
                "trigger",
                "budget",
                "attemptCount",
                "trace",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "task"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "knowledge.refinement.tasks.list",
        "title": "List Knowledge Refinement Tasks",
        "description": "Return durable semantic refinement tasks with state, traces, accepted/rejected source assessments, and blocked reasons.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/knowledge/refinement/tasks"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "number"
            },
            "spaceId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "state": {
              "type": "string"
            },
            "subjectKind": {
              "type": "string"
            },
            "subjectId": {
              "type": "string"
            },
            "gapId": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "tasks": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "spaceId": {
                    "type": "string"
                  },
                  "subjectKind": {
                    "type": "string"
                  },
                  "subjectId": {
                    "type": "string"
                  },
                  "subjectTitle": {
                    "type": "string"
                  },
                  "subjectType": {
                    "type": "string"
                  },
                  "gapId": {
                    "type": "string"
                  },
                  "issueId": {
                    "type": "string"
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "detected",
                      "queued",
                      "searching",
                      "evaluating",
                      "extracting",
                      "applying",
                      "verified",
                      "closed",
                      "blocked",
                      "suppressed",
                      "needs_review",
                      "cancelled",
                      "failed"
                    ]
                  },
                  "priority": {
                    "type": "string",
                    "enum": [
                      "low",
                      "normal",
                      "high",
                      "urgent"
                    ]
                  },
                  "trigger": {
                    "type": "string",
                    "enum": [
                      "ingest",
                      "homegraph-sync",
                      "reindex",
                      "scheduled",
                      "answer",
                      "manual"
                    ]
                  },
                  "budget": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "number"
                    }
                  },
                  "attemptCount": {
                    "type": "number"
                  },
                  "blockedReason": {
                    "type": "string"
                  },
                  "nextRepairAttemptAt": {
                    "type": "number"
                  },
                  "acceptedSourceIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "ingestedSourceIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "rejectedSourceUrls": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "promotedFactCount": {
                    "type": "number"
                  },
                  "sourceAssessments": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {}
                      ]
                    }
                  },
                  "trace": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {}
                      ]
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "spaceId",
                  "state",
                  "priority",
                  "trigger",
                  "budget",
                  "attemptCount",
                  "trace",
                  "metadata",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "tasks"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "knowledge.reindex",
        "title": "Reindex Structured Knowledge",
        "description": "Rebuild derived knowledge relations and sync reviewed memory into the structured knowledge store.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/knowledge/reindex"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "status": {
              "type": "object",
              "properties": {
                "ready": {
                  "type": "boolean"
                },
                "storagePath": {
                  "type": "string"
                },
                "sourceCount": {
                  "type": "number"
                },
                "nodeCount": {
                  "type": "number"
                },
                "edgeCount": {
                  "type": "number"
                },
                "issueCount": {
                  "type": "number"
                },
                "extractionCount": {
                  "type": "number"
                },
                "jobRunCount": {
                  "type": "number"
                },
                "refinementTaskCount": {
                  "type": "number"
                },
                "usageCount": {
                  "type": "number"
                },
                "candidateCount": {
                  "type": "number"
                },
                "reportCount": {
                  "type": "number"
                },
                "scheduleCount": {
                  "type": "number"
                }
              },
              "required": [
                "ready",
                "storagePath",
                "sourceCount",
                "nodeCount",
                "edgeCount",
                "issueCount",
                "extractionCount",
                "jobRunCount",
                "usageCount",
                "candidateCount",
                "reportCount",
                "scheduleCount"
              ],
              "additionalProperties": true
            },
            "issues": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "severity": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  },
                  "sourceId": {
                    "type": "string"
                  },
                  "nodeId": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "severity",
                  "code",
                  "message",
                  "status",
                  "metadata",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "status",
            "issues"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "knowledge.report.get",
        "title": "Get Consolidation Report",
        "description": "Return a single knowledge consolidation report.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/knowledge/reports/{id}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "report": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "highlights": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "metrics": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "number"
                  }
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "kind",
                "title",
                "summary",
                "highlights",
                "metrics",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "report"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "knowledge.reports.list",
        "title": "List Consolidation Reports",
        "description": "Return deterministic knowledge consolidation reports.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/knowledge/reports"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "number"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "includeAllSpaces": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "reports": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "summary": {
                    "type": "string"
                  },
                  "highlights": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "metrics": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "number"
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "kind",
                  "title",
                  "summary",
                  "highlights",
                  "metrics",
                  "metadata",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "reports"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "knowledge.schedule.delete",
        "title": "Delete Knowledge Schedule",
        "description": "Delete a managed knowledge schedule.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "DELETE",
          "path": "/api/knowledge/schedules/{id}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "deleted": {
              "type": "boolean"
            }
          },
          "required": [
            "deleted"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "knowledge.schedule.enable",
        "title": "Set Knowledge Schedule Enabled",
        "description": "Enable or disable a managed knowledge schedule.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/knowledge/schedules/{id}/enabled"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            }
          },
          "required": [
            "enabled"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "schedule": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "jobId": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "enabled": {
                  "type": "boolean"
                },
                "schedule": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "at"
                          ]
                        },
                        "at": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "kind",
                        "at"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "every"
                          ]
                        },
                        "intervalMs": {
                          "type": "number"
                        },
                        "anchorAt": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "kind",
                        "intervalMs"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "cron"
                          ]
                        },
                        "expression": {
                          "type": "string"
                        },
                        "timezone": {
                          "type": "string"
                        },
                        "staggerMs": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "kind",
                        "expression"
                      ],
                      "additionalProperties": false
                    }
                  ]
                },
                "lastRunAt": {
                  "type": "number"
                },
                "nextRunAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "jobId",
                "label",
                "enabled",
                "schedule",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "schedule"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "knowledge.schedule.get",
        "title": "Get Knowledge Schedule",
        "description": "Return a single managed knowledge schedule.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/knowledge/schedules/{id}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "schedule": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "jobId": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "enabled": {
                  "type": "boolean"
                },
                "schedule": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "at"
                          ]
                        },
                        "at": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "kind",
                        "at"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "every"
                          ]
                        },
                        "intervalMs": {
                          "type": "number"
                        },
                        "anchorAt": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "kind",
                        "intervalMs"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "cron"
                          ]
                        },
                        "expression": {
                          "type": "string"
                        },
                        "timezone": {
                          "type": "string"
                        },
                        "staggerMs": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "kind",
                        "expression"
                      ],
                      "additionalProperties": false
                    }
                  ]
                },
                "lastRunAt": {
                  "type": "number"
                },
                "nextRunAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "jobId",
                "label",
                "enabled",
                "schedule",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "schedule"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "knowledge.schedule.save",
        "title": "Save Knowledge Schedule",
        "description": "Create or update a managed schedule for a knowledge maintenance job.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/knowledge/schedules"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "jobId": {
              "type": "string"
            },
            "label": {
              "type": "string"
            },
            "enabled": {
              "type": "boolean"
            },
            "schedule": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "at"
                      ]
                    },
                    "at": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "kind",
                    "at"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "every"
                      ]
                    },
                    "intervalMs": {
                      "type": "number"
                    },
                    "anchorAt": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "kind",
                    "intervalMs"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "every"
                      ]
                    },
                    "interval": {
                      "type": "string"
                    },
                    "anchorAt": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "kind",
                    "interval"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "cron"
                      ]
                    },
                    "expression": {
                      "type": "string"
                    },
                    "timezone": {
                      "type": "string"
                    },
                    "staggerMs": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "kind",
                    "expression"
                  ],
                  "additionalProperties": false
                }
              ]
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "jobId",
            "schedule"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "schedule": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "jobId": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "enabled": {
                  "type": "boolean"
                },
                "schedule": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "at"
                          ]
                        },
                        "at": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "kind",
                        "at"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "every"
                          ]
                        },
                        "intervalMs": {
                          "type": "number"
                        },
                        "anchorAt": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "kind",
                        "intervalMs"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "cron"
                          ]
                        },
                        "expression": {
                          "type": "string"
                        },
                        "timezone": {
                          "type": "string"
                        },
                        "staggerMs": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "kind",
                        "expression"
                      ],
                      "additionalProperties": false
                    }
                  ]
                },
                "lastRunAt": {
                  "type": "number"
                },
                "nextRunAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "jobId",
                "label",
                "enabled",
                "schedule",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "schedule"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "knowledge.schedules.list",
        "title": "List Knowledge Schedules",
        "description": "Return managed schedules for background knowledge maintenance jobs.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/knowledge/schedules"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "schedules": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "jobId": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "schedule": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "at"
                            ]
                          },
                          "at": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "kind",
                          "at"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "every"
                            ]
                          },
                          "intervalMs": {
                            "type": "number"
                          },
                          "anchorAt": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "kind",
                          "intervalMs"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "cron"
                            ]
                          },
                          "expression": {
                            "type": "string"
                          },
                          "timezone": {
                            "type": "string"
                          },
                          "staggerMs": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "kind",
                          "expression"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  "lastRunAt": {
                    "type": "number"
                  },
                  "nextRunAt": {
                    "type": "number"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "jobId",
                  "label",
                  "enabled",
                  "schedule",
                  "metadata",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "schedules"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "knowledge.search",
        "title": "Search Structured Knowledge",
        "description": "Search structured knowledge sources and nodes with compact ranked results.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/knowledge/search"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "query": {
              "type": "string"
            },
            "limit": {
              "type": "number"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "includeAllSpaces": {
              "type": "boolean"
            },
            "includeSources": {
              "type": "boolean"
            },
            "includeNodes": {
              "type": "boolean"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "query"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "results": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string"
                  },
                  "id": {
                    "type": "string"
                  },
                  "score": {
                    "type": "number"
                  },
                  "reason": {
                    "type": "string"
                  },
                  "source": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "connectorId": {
                        "type": "string"
                      },
                      "sourceType": {
                        "type": "string",
                        "enum": [
                          "url",
                          "bookmark",
                          "bookmark-list",
                          "history",
                          "document",
                          "repo",
                          "dataset",
                          "image",
                          "manual",
                          "other"
                        ]
                      },
                      "title": {
                        "type": "string"
                      },
                      "sourceUri": {
                        "type": "string"
                      },
                      "canonicalUri": {
                        "type": "string"
                      },
                      "summary": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "tags": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "folderPath": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string"
                      },
                      "artifactId": {
                        "type": "string"
                      },
                      "contentHash": {
                        "type": "string"
                      },
                      "lastCrawledAt": {
                        "type": "number"
                      },
                      "crawlError": {
                        "type": "string"
                      },
                      "sessionId": {
                        "type": "string"
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "updatedAt": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "id",
                      "connectorId",
                      "sourceType",
                      "tags",
                      "status",
                      "metadata",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": true
                  },
                  "node": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "kind": {
                        "type": "string"
                      },
                      "slug": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "summary": {
                        "type": "string"
                      },
                      "aliases": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "status": {
                        "type": "string"
                      },
                      "confidence": {
                        "type": "number"
                      },
                      "sourceId": {
                        "type": "string"
                      },
                      "subject": {
                        "type": "string"
                      },
                      "subjectIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "targetHints": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "additionalProperties": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          }
                        }
                      },
                      "linkedObjectIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "updatedAt": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "id",
                      "kind",
                      "slug",
                      "title",
                      "aliases",
                      "status",
                      "confidence",
                      "metadata",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": true
                  }
                },
                "required": [
                  "kind",
                  "id",
                  "score",
                  "reason"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "results"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "knowledge.source.extraction.get",
        "title": "Get Source Extraction",
        "description": "Return the structured extraction record for a single knowledge source.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/knowledge/sources/{id}/extraction"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "extraction": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "sourceId": {
                  "type": "string"
                },
                "artifactId": {
                  "type": "string"
                },
                "extractorId": {
                  "type": "string"
                },
                "format": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "excerpt": {
                  "type": "string"
                },
                "sections": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "links": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "estimatedTokens": {
                  "type": "number"
                },
                "structure": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "sourceId",
                "extractorId",
                "format",
                "sections",
                "links",
                "estimatedTokens",
                "structure",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "extraction"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "knowledge.sources.list",
        "title": "List Knowledge Sources",
        "description": "Return ingested structured knowledge sources. Without ?limit/?cursor returns { sources: [...] } (backward compatible). With ?limit=N (1–1000, default 100) and optional ?cursor=<opaque> returns a PaginatedResponse envelope { items, hasMore, nextCursor? }. Fetch cap is 5 000 items per request (knowledge store does not support cursor/offset range queries natively). Invalid cursors return HTTP 400.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/knowledge/sources"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "number"
            },
            "cursor": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "includeAllSpaces": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sources": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "connectorId": {
                    "type": "string"
                  },
                  "sourceType": {
                    "type": "string",
                    "enum": [
                      "url",
                      "bookmark",
                      "bookmark-list",
                      "history",
                      "document",
                      "repo",
                      "dataset",
                      "image",
                      "manual",
                      "other"
                    ]
                  },
                  "title": {
                    "type": "string"
                  },
                  "sourceUri": {
                    "type": "string"
                  },
                  "canonicalUri": {
                    "type": "string"
                  },
                  "summary": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "folderPath": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  },
                  "artifactId": {
                    "type": "string"
                  },
                  "contentHash": {
                    "type": "string"
                  },
                  "lastCrawledAt": {
                    "type": "number"
                  },
                  "crawlError": {
                    "type": "string"
                  },
                  "sessionId": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "connectorId",
                  "sourceType",
                  "tags",
                  "status",
                  "metadata",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "sources"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "knowledge.status",
        "title": "Knowledge Status",
        "description": "Return structured knowledge runtime status and record counts.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/knowledge/status"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "knowledgeSpaceId": {
              "type": "string"
            },
            "includeAllSpaces": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ready": {
              "type": "boolean"
            },
            "storagePath": {
              "type": "string"
            },
            "sourceCount": {
              "type": "number"
            },
            "nodeCount": {
              "type": "number"
            },
            "edgeCount": {
              "type": "number"
            },
            "issueCount": {
              "type": "number"
            },
            "extractionCount": {
              "type": "number"
            },
            "jobRunCount": {
              "type": "number"
            },
            "refinementTaskCount": {
              "type": "number"
            },
            "usageCount": {
              "type": "number"
            },
            "candidateCount": {
              "type": "number"
            },
            "reportCount": {
              "type": "number"
            },
            "scheduleCount": {
              "type": "number"
            }
          },
          "required": [
            "ready",
            "storagePath",
            "sourceCount",
            "nodeCount",
            "edgeCount",
            "issueCount",
            "extractionCount",
            "jobRunCount",
            "usageCount",
            "candidateCount",
            "reportCount",
            "scheduleCount"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "knowledge.usage.list",
        "title": "List Knowledge Usage",
        "description": "Return the recent knowledge usage ledger for packet hits, search hits, and item inspection.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/knowledge/usage"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "number"
            },
            "targetKind": {
              "type": "string"
            },
            "targetId": {
              "type": "string"
            },
            "usageKind": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "usage": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "targetKind": {
                    "type": "string"
                  },
                  "targetId": {
                    "type": "string"
                  },
                  "usageKind": {
                    "type": "string"
                  },
                  "task": {
                    "type": "string"
                  },
                  "sessionId": {
                    "type": "string"
                  },
                  "score": {
                    "type": "number"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "targetKind",
                  "targetId",
                  "usageKind",
                  "metadata",
                  "createdAt"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "usage"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "projectPlanning.decisions.list",
        "title": "List Project Decisions",
        "description": "Return durable decision records from the current project planning knowledge space.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/projects/planning/decisions"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "projectId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "projectId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "decisions": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "context": {
                    "type": "string"
                  },
                  "decision": {
                    "type": "string"
                  },
                  "alternatives": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "reasoning": {
                    "type": "string"
                  },
                  "consequences": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "status": {
                    "type": "string"
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "title",
                  "decision"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "ok",
            "projectId",
            "knowledgeSpaceId",
            "decisions"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "projectPlanning.decisions.record",
        "title": "Record Project Decision",
        "description": "Persist a meaningful project decision record for future TUI and agent context.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/projects/planning/decisions"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "projectId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "decision": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "context": {
                  "type": "string"
                },
                "decision": {
                  "type": "string"
                },
                "alternatives": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "reasoning": {
                  "type": "string"
                },
                "consequences": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "status": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                }
              },
              "required": [
                "title",
                "decision"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "decision"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "projectId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "decision": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "context": {
                  "type": "string"
                },
                "decision": {
                  "type": "string"
                },
                "alternatives": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "reasoning": {
                  "type": "string"
                },
                "consequences": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "status": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "title",
                "decision"
              ],
              "additionalProperties": true
            },
            "source": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "connectorId": {
                  "type": "string"
                },
                "sourceType": {
                  "type": "string",
                  "enum": [
                    "url",
                    "bookmark",
                    "bookmark-list",
                    "history",
                    "document",
                    "repo",
                    "dataset",
                    "image",
                    "manual",
                    "other"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "sourceUri": {
                  "type": "string"
                },
                "canonicalUri": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "folderPath": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "artifactId": {
                  "type": "string"
                },
                "contentHash": {
                  "type": "string"
                },
                "lastCrawledAt": {
                  "type": "number"
                },
                "crawlError": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "connectorId",
                "sourceType",
                "tags",
                "status",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "ok",
            "projectId",
            "knowledgeSpaceId",
            "decision",
            "source"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "projectPlanning.evaluate",
        "title": "Evaluate Project Planning Readiness",
        "description": "Validate planning state and return gaps/next-question hints without mutating state or driving conversation.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/projects/planning/evaluate"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "projectId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "planningId": {
              "type": "string"
            },
            "state": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "projectId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "readiness": {
              "type": "string"
            },
            "gaps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string"
                  },
                  "severity": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "question": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "prompt": {
                        "type": "string"
                      },
                      "whyItMatters": {
                        "type": "string"
                      },
                      "recommendedAnswer": {
                        "type": "string"
                      },
                      "consequence": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string"
                      },
                      "answer": {
                        "type": "string"
                      },
                      "answeredAt": {
                        "type": "number"
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "id",
                      "prompt"
                    ],
                    "additionalProperties": true
                  },
                  "relatedTaskIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "kind",
                  "severity",
                  "message"
                ],
                "additionalProperties": true
              }
            },
            "nextQuestion": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "prompt": {
                  "type": "string"
                },
                "whyItMatters": {
                  "type": "string"
                },
                "recommendedAnswer": {
                  "type": "string"
                },
                "consequence": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "answer": {
                  "type": "string"
                },
                "answeredAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "prompt"
              ],
              "additionalProperties": true
            },
            "state": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "projectId": {
                  "type": "string"
                },
                "knowledgeSpaceId": {
                  "type": "string"
                },
                "goal": {
                  "type": "string"
                },
                "scope": {
                  "type": "string"
                },
                "knownContext": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "openQuestions": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "prompt": {
                        "type": "string"
                      },
                      "whyItMatters": {
                        "type": "string"
                      },
                      "recommendedAnswer": {
                        "type": "string"
                      },
                      "consequence": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string"
                      },
                      "answer": {
                        "type": "string"
                      },
                      "answeredAt": {
                        "type": "number"
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "id",
                      "prompt"
                    ],
                    "additionalProperties": true
                  }
                },
                "answeredQuestions": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "prompt": {
                        "type": "string"
                      },
                      "whyItMatters": {
                        "type": "string"
                      },
                      "recommendedAnswer": {
                        "type": "string"
                      },
                      "consequence": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string"
                      },
                      "answer": {
                        "type": "string"
                      },
                      "answeredAt": {
                        "type": "number"
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "id",
                      "prompt"
                    ],
                    "additionalProperties": true
                  }
                },
                "decisions": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "context": {
                        "type": "string"
                      },
                      "decision": {
                        "type": "string"
                      },
                      "alternatives": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "reasoning": {
                        "type": "string"
                      },
                      "consequences": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "status": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "updatedAt": {
                        "type": "number"
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "id",
                      "title",
                      "decision"
                    ],
                    "additionalProperties": true
                  }
                },
                "assumptions": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "constraints": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "risks": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "tasks": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "why": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string"
                      },
                      "dependencies": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "likelyFiles": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "verification": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "canRunConcurrently": {
                        "type": "boolean"
                      },
                      "needsReview": {
                        "type": "boolean"
                      },
                      "blockedOnUserInput": {
                        "type": "boolean"
                      },
                      "recommendedAgent": {
                        "type": "string"
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "id",
                      "title"
                    ],
                    "additionalProperties": true
                  }
                },
                "dependencies": {
                  "type": "array",
                  "items": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {}
                    ]
                  }
                },
                "verificationGates": {
                  "type": "array",
                  "items": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {}
                    ]
                  }
                },
                "agentAssignments": {
                  "type": "array",
                  "items": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {}
                    ]
                  }
                },
                "readiness": {
                  "type": "string"
                },
                "executionApproved": {
                  "type": "boolean"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "projectId",
                "knowledgeSpaceId",
                "goal",
                "knownContext",
                "openQuestions",
                "answeredQuestions",
                "decisions",
                "assumptions",
                "constraints",
                "risks",
                "tasks",
                "dependencies",
                "verificationGates",
                "agentAssignments",
                "readiness",
                "executionApproved",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "ok",
            "projectId",
            "knowledgeSpaceId",
            "readiness",
            "gaps",
            "state"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "projectPlanning.language.get",
        "title": "Get Project Language",
        "description": "Return canonical project vocabulary and resolved ambiguity records from the project knowledge space.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/projects/planning/language"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "projectId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "projectId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "language": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string"
                    },
                    "knowledgeSpaceId": {
                      "type": "string"
                    },
                    "terms": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {}
                        ]
                      }
                    },
                    "ambiguities": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {}
                        ]
                      }
                    },
                    "examples": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "updatedAt": {
                      "type": "number"
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "projectId",
                    "knowledgeSpaceId",
                    "terms",
                    "ambiguities",
                    "updatedAt"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "null"
                }
              ]
            },
            "source": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "connectorId": {
                  "type": "string"
                },
                "sourceType": {
                  "type": "string",
                  "enum": [
                    "url",
                    "bookmark",
                    "bookmark-list",
                    "history",
                    "document",
                    "repo",
                    "dataset",
                    "image",
                    "manual",
                    "other"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "sourceUri": {
                  "type": "string"
                },
                "canonicalUri": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "folderPath": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "artifactId": {
                  "type": "string"
                },
                "contentHash": {
                  "type": "string"
                },
                "lastCrawledAt": {
                  "type": "number"
                },
                "crawlError": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "connectorId",
                "sourceType",
                "tags",
                "status",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "ok",
            "projectId",
            "knowledgeSpaceId"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "projectPlanning.language.upsert",
        "title": "Upsert Project Language",
        "description": "Persist project vocabulary and ambiguity-resolution records without changing any live daemon session behavior.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/projects/planning/language"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "projectId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "language": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "language"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "projectId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "language": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string"
                    },
                    "knowledgeSpaceId": {
                      "type": "string"
                    },
                    "terms": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {}
                        ]
                      }
                    },
                    "ambiguities": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {}
                        ]
                      }
                    },
                    "examples": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "updatedAt": {
                      "type": "number"
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "projectId",
                    "knowledgeSpaceId",
                    "terms",
                    "ambiguities",
                    "updatedAt"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "null"
                }
              ]
            },
            "source": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "connectorId": {
                  "type": "string"
                },
                "sourceType": {
                  "type": "string",
                  "enum": [
                    "url",
                    "bookmark",
                    "bookmark-list",
                    "history",
                    "document",
                    "repo",
                    "dataset",
                    "image",
                    "manual",
                    "other"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "sourceUri": {
                  "type": "string"
                },
                "canonicalUri": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "folderPath": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "artifactId": {
                  "type": "string"
                },
                "contentHash": {
                  "type": "string"
                },
                "lastCrawledAt": {
                  "type": "number"
                },
                "crawlError": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "connectorId",
                "sourceType",
                "tags",
                "status",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "ok",
            "projectId",
            "knowledgeSpaceId"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "projectPlanning.state.get",
        "title": "Get Project Planning State",
        "description": "Return the current project-scoped planning state artifact. The TUI owns the active conversation loop.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/projects/planning/state"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "projectId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "planningId": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "projectId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "state": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "projectId": {
                      "type": "string"
                    },
                    "knowledgeSpaceId": {
                      "type": "string"
                    },
                    "goal": {
                      "type": "string"
                    },
                    "scope": {
                      "type": "string"
                    },
                    "knownContext": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "openQuestions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "prompt": {
                            "type": "string"
                          },
                          "whyItMatters": {
                            "type": "string"
                          },
                          "recommendedAnswer": {
                            "type": "string"
                          },
                          "consequence": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          },
                          "answer": {
                            "type": "string"
                          },
                          "answeredAt": {
                            "type": "number"
                          },
                          "metadata": {
                            "type": "object",
                            "additionalProperties": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "object",
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "array",
                                  "items": {}
                                }
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "prompt"
                        ],
                        "additionalProperties": true
                      }
                    },
                    "answeredQuestions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "prompt": {
                            "type": "string"
                          },
                          "whyItMatters": {
                            "type": "string"
                          },
                          "recommendedAnswer": {
                            "type": "string"
                          },
                          "consequence": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          },
                          "answer": {
                            "type": "string"
                          },
                          "answeredAt": {
                            "type": "number"
                          },
                          "metadata": {
                            "type": "object",
                            "additionalProperties": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "object",
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "array",
                                  "items": {}
                                }
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "prompt"
                        ],
                        "additionalProperties": true
                      }
                    },
                    "decisions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "context": {
                            "type": "string"
                          },
                          "decision": {
                            "type": "string"
                          },
                          "alternatives": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "reasoning": {
                            "type": "string"
                          },
                          "consequences": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "status": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "number"
                          },
                          "updatedAt": {
                            "type": "number"
                          },
                          "metadata": {
                            "type": "object",
                            "additionalProperties": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "object",
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "array",
                                  "items": {}
                                }
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "decision"
                        ],
                        "additionalProperties": true
                      }
                    },
                    "assumptions": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "constraints": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "risks": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "tasks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "why": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          },
                          "dependencies": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "likelyFiles": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "verification": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "canRunConcurrently": {
                            "type": "boolean"
                          },
                          "needsReview": {
                            "type": "boolean"
                          },
                          "blockedOnUserInput": {
                            "type": "boolean"
                          },
                          "recommendedAgent": {
                            "type": "string"
                          },
                          "metadata": {
                            "type": "object",
                            "additionalProperties": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "object",
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "array",
                                  "items": {}
                                }
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "title"
                        ],
                        "additionalProperties": true
                      }
                    },
                    "dependencies": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {}
                        ]
                      }
                    },
                    "verificationGates": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {}
                        ]
                      }
                    },
                    "agentAssignments": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {}
                        ]
                      }
                    },
                    "readiness": {
                      "type": "string"
                    },
                    "executionApproved": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "updatedAt": {
                      "type": "number"
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "projectId",
                    "knowledgeSpaceId",
                    "goal",
                    "knownContext",
                    "openQuestions",
                    "answeredQuestions",
                    "decisions",
                    "assumptions",
                    "constraints",
                    "risks",
                    "tasks",
                    "dependencies",
                    "verificationGates",
                    "agentAssignments",
                    "readiness",
                    "executionApproved",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "null"
                }
              ]
            },
            "source": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "connectorId": {
                  "type": "string"
                },
                "sourceType": {
                  "type": "string",
                  "enum": [
                    "url",
                    "bookmark",
                    "bookmark-list",
                    "history",
                    "document",
                    "repo",
                    "dataset",
                    "image",
                    "manual",
                    "other"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "sourceUri": {
                  "type": "string"
                },
                "canonicalUri": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "folderPath": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "artifactId": {
                  "type": "string"
                },
                "contentHash": {
                  "type": "string"
                },
                "lastCrawledAt": {
                  "type": "number"
                },
                "crawlError": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "connectorId",
                "sourceType",
                "tags",
                "status",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "ok",
            "projectId",
            "knowledgeSpaceId"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "projectPlanning.state.upsert",
        "title": "Upsert Project Planning State",
        "description": "Persist project-scoped planning state from the TUI interview loop and evaluate readiness.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/projects/planning/state"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "projectId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "state": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "state"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "projectId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "state": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "projectId": {
                      "type": "string"
                    },
                    "knowledgeSpaceId": {
                      "type": "string"
                    },
                    "goal": {
                      "type": "string"
                    },
                    "scope": {
                      "type": "string"
                    },
                    "knownContext": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "openQuestions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "prompt": {
                            "type": "string"
                          },
                          "whyItMatters": {
                            "type": "string"
                          },
                          "recommendedAnswer": {
                            "type": "string"
                          },
                          "consequence": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          },
                          "answer": {
                            "type": "string"
                          },
                          "answeredAt": {
                            "type": "number"
                          },
                          "metadata": {
                            "type": "object",
                            "additionalProperties": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "object",
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "array",
                                  "items": {}
                                }
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "prompt"
                        ],
                        "additionalProperties": true
                      }
                    },
                    "answeredQuestions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "prompt": {
                            "type": "string"
                          },
                          "whyItMatters": {
                            "type": "string"
                          },
                          "recommendedAnswer": {
                            "type": "string"
                          },
                          "consequence": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          },
                          "answer": {
                            "type": "string"
                          },
                          "answeredAt": {
                            "type": "number"
                          },
                          "metadata": {
                            "type": "object",
                            "additionalProperties": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "object",
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "array",
                                  "items": {}
                                }
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "prompt"
                        ],
                        "additionalProperties": true
                      }
                    },
                    "decisions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "context": {
                            "type": "string"
                          },
                          "decision": {
                            "type": "string"
                          },
                          "alternatives": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "reasoning": {
                            "type": "string"
                          },
                          "consequences": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "status": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "number"
                          },
                          "updatedAt": {
                            "type": "number"
                          },
                          "metadata": {
                            "type": "object",
                            "additionalProperties": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "object",
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "array",
                                  "items": {}
                                }
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "decision"
                        ],
                        "additionalProperties": true
                      }
                    },
                    "assumptions": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "constraints": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "risks": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "tasks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "why": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          },
                          "dependencies": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "likelyFiles": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "verification": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "canRunConcurrently": {
                            "type": "boolean"
                          },
                          "needsReview": {
                            "type": "boolean"
                          },
                          "blockedOnUserInput": {
                            "type": "boolean"
                          },
                          "recommendedAgent": {
                            "type": "string"
                          },
                          "metadata": {
                            "type": "object",
                            "additionalProperties": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "object",
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "array",
                                  "items": {}
                                }
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "title"
                        ],
                        "additionalProperties": true
                      }
                    },
                    "dependencies": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {}
                        ]
                      }
                    },
                    "verificationGates": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {}
                        ]
                      }
                    },
                    "agentAssignments": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {}
                        ]
                      }
                    },
                    "readiness": {
                      "type": "string"
                    },
                    "executionApproved": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "updatedAt": {
                      "type": "number"
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "projectId",
                    "knowledgeSpaceId",
                    "goal",
                    "knownContext",
                    "openQuestions",
                    "answeredQuestions",
                    "decisions",
                    "assumptions",
                    "constraints",
                    "risks",
                    "tasks",
                    "dependencies",
                    "verificationGates",
                    "agentAssignments",
                    "readiness",
                    "executionApproved",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "null"
                }
              ]
            },
            "source": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "connectorId": {
                  "type": "string"
                },
                "sourceType": {
                  "type": "string",
                  "enum": [
                    "url",
                    "bookmark",
                    "bookmark-list",
                    "history",
                    "document",
                    "repo",
                    "dataset",
                    "image",
                    "manual",
                    "other"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "sourceUri": {
                  "type": "string"
                },
                "canonicalUri": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "folderPath": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "artifactId": {
                  "type": "string"
                },
                "contentHash": {
                  "type": "string"
                },
                "lastCrawledAt": {
                  "type": "number"
                },
                "crawlError": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "connectorId",
                "sourceType",
                "tags",
                "status",
                "metadata",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "ok",
            "projectId",
            "knowledgeSpaceId"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "projectPlanning.status",
        "title": "Project Planning Status",
        "description": "Return passive, project-scoped planning artifact counts and SDK capabilities without starting a planning loop.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/projects/planning/status"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "projectId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "projectId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "passiveOnly": {
              "type": "boolean"
            },
            "counts": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "capabilities": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "ok",
            "projectId",
            "knowledgeSpaceId",
            "passiveOnly",
            "counts",
            "capabilities"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "projectPlanning.workPlan.clearCompleted",
        "title": "Clear Completed Project Work Plan Tasks",
        "description": "Remove completed project work-plan tasks. Defaults to clearing status done only.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/projects/planning/work-plan/clear-completed"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "projectId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "workPlanId": {
              "type": "string"
            },
            "statuses": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "projectId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "workPlanId": {
              "type": "string"
            },
            "task": {
              "type": "object",
              "properties": {
                "taskId": {
                  "type": "string"
                },
                "projectId": {
                  "type": "string"
                },
                "knowledgeSpaceId": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "notes": {
                  "type": "string"
                },
                "owner": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "priority": {
                  "type": "number"
                },
                "order": {
                  "type": "number"
                },
                "source": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "parentTaskId": {
                  "type": "string"
                },
                "chainId": {
                  "type": "string"
                },
                "phaseId": {
                  "type": "string"
                },
                "agentId": {
                  "type": "string"
                },
                "turnId": {
                  "type": "string"
                },
                "decisionId": {
                  "type": "string"
                },
                "sourceMessageId": {
                  "type": "string"
                },
                "linkedArtifactIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "linkedSourceIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "linkedNodeIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "originSurface": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "completedAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "taskId",
                "projectId",
                "knowledgeSpaceId",
                "title",
                "status",
                "order",
                "tags",
                "linkedArtifactIds",
                "linkedSourceIds",
                "linkedNodeIds",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "previousTask": {
              "type": "object",
              "properties": {
                "taskId": {
                  "type": "string"
                },
                "projectId": {
                  "type": "string"
                },
                "knowledgeSpaceId": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "notes": {
                  "type": "string"
                },
                "owner": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "priority": {
                  "type": "number"
                },
                "order": {
                  "type": "number"
                },
                "source": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "parentTaskId": {
                  "type": "string"
                },
                "chainId": {
                  "type": "string"
                },
                "phaseId": {
                  "type": "string"
                },
                "agentId": {
                  "type": "string"
                },
                "turnId": {
                  "type": "string"
                },
                "decisionId": {
                  "type": "string"
                },
                "sourceMessageId": {
                  "type": "string"
                },
                "linkedArtifactIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "linkedSourceIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "linkedNodeIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "originSurface": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "completedAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "taskId",
                "projectId",
                "knowledgeSpaceId",
                "title",
                "status",
                "order",
                "tags",
                "linkedArtifactIds",
                "linkedSourceIds",
                "linkedNodeIds",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "deletedTask": {
              "type": "object",
              "properties": {
                "taskId": {
                  "type": "string"
                },
                "projectId": {
                  "type": "string"
                },
                "knowledgeSpaceId": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "notes": {
                  "type": "string"
                },
                "owner": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "priority": {
                  "type": "number"
                },
                "order": {
                  "type": "number"
                },
                "source": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "parentTaskId": {
                  "type": "string"
                },
                "chainId": {
                  "type": "string"
                },
                "phaseId": {
                  "type": "string"
                },
                "agentId": {
                  "type": "string"
                },
                "turnId": {
                  "type": "string"
                },
                "decisionId": {
                  "type": "string"
                },
                "sourceMessageId": {
                  "type": "string"
                },
                "linkedArtifactIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "linkedSourceIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "linkedNodeIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "originSurface": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "completedAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "taskId",
                "projectId",
                "knowledgeSpaceId",
                "title",
                "status",
                "order",
                "tags",
                "linkedArtifactIds",
                "linkedSourceIds",
                "linkedNodeIds",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "clearedTaskIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "snapshot": {
              "type": "object",
              "properties": {
                "ok": {
                  "type": "boolean"
                },
                "projectId": {
                  "type": "string"
                },
                "knowledgeSpaceId": {
                  "type": "string"
                },
                "workPlanId": {
                  "type": "string"
                },
                "tasks": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "taskId": {
                        "type": "string"
                      },
                      "projectId": {
                        "type": "string"
                      },
                      "knowledgeSpaceId": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "notes": {
                        "type": "string"
                      },
                      "owner": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string"
                      },
                      "priority": {
                        "type": "number"
                      },
                      "order": {
                        "type": "number"
                      },
                      "source": {
                        "type": "string"
                      },
                      "tags": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "parentTaskId": {
                        "type": "string"
                      },
                      "chainId": {
                        "type": "string"
                      },
                      "phaseId": {
                        "type": "string"
                      },
                      "agentId": {
                        "type": "string"
                      },
                      "turnId": {
                        "type": "string"
                      },
                      "decisionId": {
                        "type": "string"
                      },
                      "sourceMessageId": {
                        "type": "string"
                      },
                      "linkedArtifactIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "linkedSourceIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "linkedNodeIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "originSurface": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "updatedAt": {
                        "type": "number"
                      },
                      "completedAt": {
                        "type": "number"
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "taskId",
                      "projectId",
                      "knowledgeSpaceId",
                      "title",
                      "status",
                      "order",
                      "tags",
                      "linkedArtifactIds",
                      "linkedSourceIds",
                      "linkedNodeIds",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": true
                  }
                },
                "counts": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "number"
                    },
                    "pending": {
                      "type": "number"
                    },
                    "in_progress": {
                      "type": "number"
                    },
                    "blocked": {
                      "type": "number"
                    },
                    "done": {
                      "type": "number"
                    },
                    "failed": {
                      "type": "number"
                    },
                    "cancelled": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "total",
                    "pending",
                    "in_progress",
                    "blocked",
                    "done",
                    "failed",
                    "cancelled"
                  ],
                  "additionalProperties": false
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "ok",
                "projectId",
                "knowledgeSpaceId",
                "workPlanId",
                "tasks",
                "counts",
                "updatedAt"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "ok",
            "projectId",
            "knowledgeSpaceId",
            "workPlanId",
            "snapshot"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "projectPlanning.workPlan.snapshot",
        "title": "Project Work Plan Snapshot",
        "description": "Return the durable project-scoped work-plan snapshot, including tasks and status counts.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/projects/planning/work-plan"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "projectId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "workPlanId": {
              "type": "string"
            },
            "status": {
              "type": "string"
            },
            "parentTaskId": {
              "type": "string"
            },
            "chainId": {
              "type": "string"
            },
            "owner": {
              "type": "string"
            },
            "limit": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "projectId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "workPlanId": {
              "type": "string"
            },
            "tasks": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "taskId": {
                    "type": "string"
                  },
                  "projectId": {
                    "type": "string"
                  },
                  "knowledgeSpaceId": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "notes": {
                    "type": "string"
                  },
                  "owner": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  },
                  "priority": {
                    "type": "number"
                  },
                  "order": {
                    "type": "number"
                  },
                  "source": {
                    "type": "string"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "parentTaskId": {
                    "type": "string"
                  },
                  "chainId": {
                    "type": "string"
                  },
                  "phaseId": {
                    "type": "string"
                  },
                  "agentId": {
                    "type": "string"
                  },
                  "turnId": {
                    "type": "string"
                  },
                  "decisionId": {
                    "type": "string"
                  },
                  "sourceMessageId": {
                    "type": "string"
                  },
                  "linkedArtifactIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "linkedSourceIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "linkedNodeIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "originSurface": {
                    "type": "string"
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  },
                  "completedAt": {
                    "type": "number"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "taskId",
                  "projectId",
                  "knowledgeSpaceId",
                  "title",
                  "status",
                  "order",
                  "tags",
                  "linkedArtifactIds",
                  "linkedSourceIds",
                  "linkedNodeIds",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            },
            "counts": {
              "type": "object",
              "properties": {
                "total": {
                  "type": "number"
                },
                "pending": {
                  "type": "number"
                },
                "in_progress": {
                  "type": "number"
                },
                "blocked": {
                  "type": "number"
                },
                "done": {
                  "type": "number"
                },
                "failed": {
                  "type": "number"
                },
                "cancelled": {
                  "type": "number"
                }
              },
              "required": [
                "total",
                "pending",
                "in_progress",
                "blocked",
                "done",
                "failed",
                "cancelled"
              ],
              "additionalProperties": false
            },
            "updatedAt": {
              "type": "number"
            }
          },
          "required": [
            "ok",
            "projectId",
            "knowledgeSpaceId",
            "workPlanId",
            "tasks",
            "counts",
            "updatedAt"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "projectPlanning.workPlan.task.create",
        "title": "Create Project Work Plan Task",
        "description": "Create a durable project-scoped work-plan task for TUI, WebUI, APK, daemon planning, or WRFC correlation.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/projects/planning/work-plan/tasks"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "projectId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "workPlanId": {
              "type": "string"
            },
            "task": {
              "type": "object",
              "properties": {
                "taskId": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "notes": {
                  "type": "string"
                },
                "owner": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "priority": {
                  "type": "number"
                },
                "order": {
                  "type": "number"
                },
                "source": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "parentTaskId": {
                  "type": "string"
                },
                "chainId": {
                  "type": "string"
                },
                "phaseId": {
                  "type": "string"
                },
                "agentId": {
                  "type": "string"
                },
                "turnId": {
                  "type": "string"
                },
                "decisionId": {
                  "type": "string"
                },
                "sourceMessageId": {
                  "type": "string"
                },
                "linkedArtifactIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "linkedSourceIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "linkedNodeIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "originSurface": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                }
              },
              "required": [
                "title"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "task"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "projectId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "workPlanId": {
              "type": "string"
            },
            "task": {
              "type": "object",
              "properties": {
                "taskId": {
                  "type": "string"
                },
                "projectId": {
                  "type": "string"
                },
                "knowledgeSpaceId": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "notes": {
                  "type": "string"
                },
                "owner": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "priority": {
                  "type": "number"
                },
                "order": {
                  "type": "number"
                },
                "source": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "parentTaskId": {
                  "type": "string"
                },
                "chainId": {
                  "type": "string"
                },
                "phaseId": {
                  "type": "string"
                },
                "agentId": {
                  "type": "string"
                },
                "turnId": {
                  "type": "string"
                },
                "decisionId": {
                  "type": "string"
                },
                "sourceMessageId": {
                  "type": "string"
                },
                "linkedArtifactIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "linkedSourceIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "linkedNodeIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "originSurface": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "completedAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "taskId",
                "projectId",
                "knowledgeSpaceId",
                "title",
                "status",
                "order",
                "tags",
                "linkedArtifactIds",
                "linkedSourceIds",
                "linkedNodeIds",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "previousTask": {
              "type": "object",
              "properties": {
                "taskId": {
                  "type": "string"
                },
                "projectId": {
                  "type": "string"
                },
                "knowledgeSpaceId": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "notes": {
                  "type": "string"
                },
                "owner": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "priority": {
                  "type": "number"
                },
                "order": {
                  "type": "number"
                },
                "source": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "parentTaskId": {
                  "type": "string"
                },
                "chainId": {
                  "type": "string"
                },
                "phaseId": {
                  "type": "string"
                },
                "agentId": {
                  "type": "string"
                },
                "turnId": {
                  "type": "string"
                },
                "decisionId": {
                  "type": "string"
                },
                "sourceMessageId": {
                  "type": "string"
                },
                "linkedArtifactIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "linkedSourceIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "linkedNodeIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "originSurface": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "completedAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "taskId",
                "projectId",
                "knowledgeSpaceId",
                "title",
                "status",
                "order",
                "tags",
                "linkedArtifactIds",
                "linkedSourceIds",
                "linkedNodeIds",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "deletedTask": {
              "type": "object",
              "properties": {
                "taskId": {
                  "type": "string"
                },
                "projectId": {
                  "type": "string"
                },
                "knowledgeSpaceId": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "notes": {
                  "type": "string"
                },
                "owner": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "priority": {
                  "type": "number"
                },
                "order": {
                  "type": "number"
                },
                "source": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "parentTaskId": {
                  "type": "string"
                },
                "chainId": {
                  "type": "string"
                },
                "phaseId": {
                  "type": "string"
                },
                "agentId": {
                  "type": "string"
                },
                "turnId": {
                  "type": "string"
                },
                "decisionId": {
                  "type": "string"
                },
                "sourceMessageId": {
                  "type": "string"
                },
                "linkedArtifactIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "linkedSourceIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "linkedNodeIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "originSurface": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "completedAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "taskId",
                "projectId",
                "knowledgeSpaceId",
                "title",
                "status",
                "order",
                "tags",
                "linkedArtifactIds",
                "linkedSourceIds",
                "linkedNodeIds",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "clearedTaskIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "snapshot": {
              "type": "object",
              "properties": {
                "ok": {
                  "type": "boolean"
                },
                "projectId": {
                  "type": "string"
                },
                "knowledgeSpaceId": {
                  "type": "string"
                },
                "workPlanId": {
                  "type": "string"
                },
                "tasks": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "taskId": {
                        "type": "string"
                      },
                      "projectId": {
                        "type": "string"
                      },
                      "knowledgeSpaceId": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "notes": {
                        "type": "string"
                      },
                      "owner": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string"
                      },
                      "priority": {
                        "type": "number"
                      },
                      "order": {
                        "type": "number"
                      },
                      "source": {
                        "type": "string"
                      },
                      "tags": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "parentTaskId": {
                        "type": "string"
                      },
                      "chainId": {
                        "type": "string"
                      },
                      "phaseId": {
                        "type": "string"
                      },
                      "agentId": {
                        "type": "string"
                      },
                      "turnId": {
                        "type": "string"
                      },
                      "decisionId": {
                        "type": "string"
                      },
                      "sourceMessageId": {
                        "type": "string"
                      },
                      "linkedArtifactIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "linkedSourceIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "linkedNodeIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "originSurface": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "updatedAt": {
                        "type": "number"
                      },
                      "completedAt": {
                        "type": "number"
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "taskId",
                      "projectId",
                      "knowledgeSpaceId",
                      "title",
                      "status",
                      "order",
                      "tags",
                      "linkedArtifactIds",
                      "linkedSourceIds",
                      "linkedNodeIds",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": true
                  }
                },
                "counts": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "number"
                    },
                    "pending": {
                      "type": "number"
                    },
                    "in_progress": {
                      "type": "number"
                    },
                    "blocked": {
                      "type": "number"
                    },
                    "done": {
                      "type": "number"
                    },
                    "failed": {
                      "type": "number"
                    },
                    "cancelled": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "total",
                    "pending",
                    "in_progress",
                    "blocked",
                    "done",
                    "failed",
                    "cancelled"
                  ],
                  "additionalProperties": false
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "ok",
                "projectId",
                "knowledgeSpaceId",
                "workPlanId",
                "tasks",
                "counts",
                "updatedAt"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "ok",
            "projectId",
            "knowledgeSpaceId",
            "workPlanId",
            "snapshot"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "projectPlanning.workPlan.task.delete",
        "title": "Delete Project Work Plan Task",
        "description": "Delete a durable project-scoped work-plan task.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "DELETE",
          "path": "/api/projects/planning/work-plan/tasks/{taskId}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "projectId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "workPlanId": {
              "type": "string"
            },
            "taskId": {
              "type": "string"
            }
          },
          "required": [
            "taskId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "projectId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "workPlanId": {
              "type": "string"
            },
            "task": {
              "type": "object",
              "properties": {
                "taskId": {
                  "type": "string"
                },
                "projectId": {
                  "type": "string"
                },
                "knowledgeSpaceId": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "notes": {
                  "type": "string"
                },
                "owner": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "priority": {
                  "type": "number"
                },
                "order": {
                  "type": "number"
                },
                "source": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "parentTaskId": {
                  "type": "string"
                },
                "chainId": {
                  "type": "string"
                },
                "phaseId": {
                  "type": "string"
                },
                "agentId": {
                  "type": "string"
                },
                "turnId": {
                  "type": "string"
                },
                "decisionId": {
                  "type": "string"
                },
                "sourceMessageId": {
                  "type": "string"
                },
                "linkedArtifactIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "linkedSourceIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "linkedNodeIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "originSurface": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "completedAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "taskId",
                "projectId",
                "knowledgeSpaceId",
                "title",
                "status",
                "order",
                "tags",
                "linkedArtifactIds",
                "linkedSourceIds",
                "linkedNodeIds",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "previousTask": {
              "type": "object",
              "properties": {
                "taskId": {
                  "type": "string"
                },
                "projectId": {
                  "type": "string"
                },
                "knowledgeSpaceId": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "notes": {
                  "type": "string"
                },
                "owner": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "priority": {
                  "type": "number"
                },
                "order": {
                  "type": "number"
                },
                "source": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "parentTaskId": {
                  "type": "string"
                },
                "chainId": {
                  "type": "string"
                },
                "phaseId": {
                  "type": "string"
                },
                "agentId": {
                  "type": "string"
                },
                "turnId": {
                  "type": "string"
                },
                "decisionId": {
                  "type": "string"
                },
                "sourceMessageId": {
                  "type": "string"
                },
                "linkedArtifactIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "linkedSourceIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "linkedNodeIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "originSurface": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "completedAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "taskId",
                "projectId",
                "knowledgeSpaceId",
                "title",
                "status",
                "order",
                "tags",
                "linkedArtifactIds",
                "linkedSourceIds",
                "linkedNodeIds",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "deletedTask": {
              "type": "object",
              "properties": {
                "taskId": {
                  "type": "string"
                },
                "projectId": {
                  "type": "string"
                },
                "knowledgeSpaceId": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "notes": {
                  "type": "string"
                },
                "owner": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "priority": {
                  "type": "number"
                },
                "order": {
                  "type": "number"
                },
                "source": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "parentTaskId": {
                  "type": "string"
                },
                "chainId": {
                  "type": "string"
                },
                "phaseId": {
                  "type": "string"
                },
                "agentId": {
                  "type": "string"
                },
                "turnId": {
                  "type": "string"
                },
                "decisionId": {
                  "type": "string"
                },
                "sourceMessageId": {
                  "type": "string"
                },
                "linkedArtifactIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "linkedSourceIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "linkedNodeIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "originSurface": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "completedAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "taskId",
                "projectId",
                "knowledgeSpaceId",
                "title",
                "status",
                "order",
                "tags",
                "linkedArtifactIds",
                "linkedSourceIds",
                "linkedNodeIds",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "clearedTaskIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "snapshot": {
              "type": "object",
              "properties": {
                "ok": {
                  "type": "boolean"
                },
                "projectId": {
                  "type": "string"
                },
                "knowledgeSpaceId": {
                  "type": "string"
                },
                "workPlanId": {
                  "type": "string"
                },
                "tasks": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "taskId": {
                        "type": "string"
                      },
                      "projectId": {
                        "type": "string"
                      },
                      "knowledgeSpaceId": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "notes": {
                        "type": "string"
                      },
                      "owner": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string"
                      },
                      "priority": {
                        "type": "number"
                      },
                      "order": {
                        "type": "number"
                      },
                      "source": {
                        "type": "string"
                      },
                      "tags": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "parentTaskId": {
                        "type": "string"
                      },
                      "chainId": {
                        "type": "string"
                      },
                      "phaseId": {
                        "type": "string"
                      },
                      "agentId": {
                        "type": "string"
                      },
                      "turnId": {
                        "type": "string"
                      },
                      "decisionId": {
                        "type": "string"
                      },
                      "sourceMessageId": {
                        "type": "string"
                      },
                      "linkedArtifactIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "linkedSourceIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "linkedNodeIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "originSurface": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "updatedAt": {
                        "type": "number"
                      },
                      "completedAt": {
                        "type": "number"
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "taskId",
                      "projectId",
                      "knowledgeSpaceId",
                      "title",
                      "status",
                      "order",
                      "tags",
                      "linkedArtifactIds",
                      "linkedSourceIds",
                      "linkedNodeIds",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": true
                  }
                },
                "counts": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "number"
                    },
                    "pending": {
                      "type": "number"
                    },
                    "in_progress": {
                      "type": "number"
                    },
                    "blocked": {
                      "type": "number"
                    },
                    "done": {
                      "type": "number"
                    },
                    "failed": {
                      "type": "number"
                    },
                    "cancelled": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "total",
                    "pending",
                    "in_progress",
                    "blocked",
                    "done",
                    "failed",
                    "cancelled"
                  ],
                  "additionalProperties": false
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "ok",
                "projectId",
                "knowledgeSpaceId",
                "workPlanId",
                "tasks",
                "counts",
                "updatedAt"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "ok",
            "projectId",
            "knowledgeSpaceId",
            "workPlanId",
            "snapshot"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "projectPlanning.workPlan.task.get",
        "title": "Get Project Work Plan Task",
        "description": "Fetch one durable project-scoped work-plan task by id.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/projects/planning/work-plan/tasks/{taskId}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "projectId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "workPlanId": {
              "type": "string"
            },
            "taskId": {
              "type": "string"
            }
          },
          "required": [
            "taskId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "projectId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "workPlanId": {
              "type": "string"
            },
            "task": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "taskId": {
                      "type": "string"
                    },
                    "projectId": {
                      "type": "string"
                    },
                    "knowledgeSpaceId": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "notes": {
                      "type": "string"
                    },
                    "owner": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "priority": {
                      "type": "number"
                    },
                    "order": {
                      "type": "number"
                    },
                    "source": {
                      "type": "string"
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "parentTaskId": {
                      "type": "string"
                    },
                    "chainId": {
                      "type": "string"
                    },
                    "phaseId": {
                      "type": "string"
                    },
                    "agentId": {
                      "type": "string"
                    },
                    "turnId": {
                      "type": "string"
                    },
                    "decisionId": {
                      "type": "string"
                    },
                    "sourceMessageId": {
                      "type": "string"
                    },
                    "linkedArtifactIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "linkedSourceIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "linkedNodeIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "originSurface": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "updatedAt": {
                      "type": "number"
                    },
                    "completedAt": {
                      "type": "number"
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "taskId",
                    "projectId",
                    "knowledgeSpaceId",
                    "title",
                    "status",
                    "order",
                    "tags",
                    "linkedArtifactIds",
                    "linkedSourceIds",
                    "linkedNodeIds",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "null"
                }
              ]
            },
            "snapshot": {
              "type": "object",
              "properties": {
                "ok": {
                  "type": "boolean"
                },
                "projectId": {
                  "type": "string"
                },
                "knowledgeSpaceId": {
                  "type": "string"
                },
                "workPlanId": {
                  "type": "string"
                },
                "tasks": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "taskId": {
                        "type": "string"
                      },
                      "projectId": {
                        "type": "string"
                      },
                      "knowledgeSpaceId": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "notes": {
                        "type": "string"
                      },
                      "owner": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string"
                      },
                      "priority": {
                        "type": "number"
                      },
                      "order": {
                        "type": "number"
                      },
                      "source": {
                        "type": "string"
                      },
                      "tags": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "parentTaskId": {
                        "type": "string"
                      },
                      "chainId": {
                        "type": "string"
                      },
                      "phaseId": {
                        "type": "string"
                      },
                      "agentId": {
                        "type": "string"
                      },
                      "turnId": {
                        "type": "string"
                      },
                      "decisionId": {
                        "type": "string"
                      },
                      "sourceMessageId": {
                        "type": "string"
                      },
                      "linkedArtifactIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "linkedSourceIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "linkedNodeIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "originSurface": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "updatedAt": {
                        "type": "number"
                      },
                      "completedAt": {
                        "type": "number"
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "taskId",
                      "projectId",
                      "knowledgeSpaceId",
                      "title",
                      "status",
                      "order",
                      "tags",
                      "linkedArtifactIds",
                      "linkedSourceIds",
                      "linkedNodeIds",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": true
                  }
                },
                "counts": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "number"
                    },
                    "pending": {
                      "type": "number"
                    },
                    "in_progress": {
                      "type": "number"
                    },
                    "blocked": {
                      "type": "number"
                    },
                    "done": {
                      "type": "number"
                    },
                    "failed": {
                      "type": "number"
                    },
                    "cancelled": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "total",
                    "pending",
                    "in_progress",
                    "blocked",
                    "done",
                    "failed",
                    "cancelled"
                  ],
                  "additionalProperties": false
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "ok",
                "projectId",
                "knowledgeSpaceId",
                "workPlanId",
                "tasks",
                "counts",
                "updatedAt"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "ok",
            "projectId",
            "knowledgeSpaceId",
            "workPlanId",
            "task",
            "snapshot"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "projectPlanning.workPlan.task.status",
        "title": "Set Project Work Plan Task Status",
        "description": "Validate and apply a project work-plan task status transition.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/projects/planning/work-plan/tasks/{taskId}/status"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "projectId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "workPlanId": {
              "type": "string"
            },
            "taskId": {
              "type": "string"
            },
            "status": {
              "type": "string"
            },
            "reason": {
              "type": "string"
            },
            "source": {
              "type": "string"
            }
          },
          "required": [
            "taskId",
            "status"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "projectId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "workPlanId": {
              "type": "string"
            },
            "task": {
              "type": "object",
              "properties": {
                "taskId": {
                  "type": "string"
                },
                "projectId": {
                  "type": "string"
                },
                "knowledgeSpaceId": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "notes": {
                  "type": "string"
                },
                "owner": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "priority": {
                  "type": "number"
                },
                "order": {
                  "type": "number"
                },
                "source": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "parentTaskId": {
                  "type": "string"
                },
                "chainId": {
                  "type": "string"
                },
                "phaseId": {
                  "type": "string"
                },
                "agentId": {
                  "type": "string"
                },
                "turnId": {
                  "type": "string"
                },
                "decisionId": {
                  "type": "string"
                },
                "sourceMessageId": {
                  "type": "string"
                },
                "linkedArtifactIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "linkedSourceIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "linkedNodeIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "originSurface": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "completedAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "taskId",
                "projectId",
                "knowledgeSpaceId",
                "title",
                "status",
                "order",
                "tags",
                "linkedArtifactIds",
                "linkedSourceIds",
                "linkedNodeIds",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "previousTask": {
              "type": "object",
              "properties": {
                "taskId": {
                  "type": "string"
                },
                "projectId": {
                  "type": "string"
                },
                "knowledgeSpaceId": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "notes": {
                  "type": "string"
                },
                "owner": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "priority": {
                  "type": "number"
                },
                "order": {
                  "type": "number"
                },
                "source": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "parentTaskId": {
                  "type": "string"
                },
                "chainId": {
                  "type": "string"
                },
                "phaseId": {
                  "type": "string"
                },
                "agentId": {
                  "type": "string"
                },
                "turnId": {
                  "type": "string"
                },
                "decisionId": {
                  "type": "string"
                },
                "sourceMessageId": {
                  "type": "string"
                },
                "linkedArtifactIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "linkedSourceIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "linkedNodeIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "originSurface": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "completedAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "taskId",
                "projectId",
                "knowledgeSpaceId",
                "title",
                "status",
                "order",
                "tags",
                "linkedArtifactIds",
                "linkedSourceIds",
                "linkedNodeIds",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "deletedTask": {
              "type": "object",
              "properties": {
                "taskId": {
                  "type": "string"
                },
                "projectId": {
                  "type": "string"
                },
                "knowledgeSpaceId": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "notes": {
                  "type": "string"
                },
                "owner": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "priority": {
                  "type": "number"
                },
                "order": {
                  "type": "number"
                },
                "source": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "parentTaskId": {
                  "type": "string"
                },
                "chainId": {
                  "type": "string"
                },
                "phaseId": {
                  "type": "string"
                },
                "agentId": {
                  "type": "string"
                },
                "turnId": {
                  "type": "string"
                },
                "decisionId": {
                  "type": "string"
                },
                "sourceMessageId": {
                  "type": "string"
                },
                "linkedArtifactIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "linkedSourceIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "linkedNodeIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "originSurface": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "completedAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "taskId",
                "projectId",
                "knowledgeSpaceId",
                "title",
                "status",
                "order",
                "tags",
                "linkedArtifactIds",
                "linkedSourceIds",
                "linkedNodeIds",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "clearedTaskIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "snapshot": {
              "type": "object",
              "properties": {
                "ok": {
                  "type": "boolean"
                },
                "projectId": {
                  "type": "string"
                },
                "knowledgeSpaceId": {
                  "type": "string"
                },
                "workPlanId": {
                  "type": "string"
                },
                "tasks": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "taskId": {
                        "type": "string"
                      },
                      "projectId": {
                        "type": "string"
                      },
                      "knowledgeSpaceId": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "notes": {
                        "type": "string"
                      },
                      "owner": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string"
                      },
                      "priority": {
                        "type": "number"
                      },
                      "order": {
                        "type": "number"
                      },
                      "source": {
                        "type": "string"
                      },
                      "tags": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "parentTaskId": {
                        "type": "string"
                      },
                      "chainId": {
                        "type": "string"
                      },
                      "phaseId": {
                        "type": "string"
                      },
                      "agentId": {
                        "type": "string"
                      },
                      "turnId": {
                        "type": "string"
                      },
                      "decisionId": {
                        "type": "string"
                      },
                      "sourceMessageId": {
                        "type": "string"
                      },
                      "linkedArtifactIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "linkedSourceIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "linkedNodeIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "originSurface": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "updatedAt": {
                        "type": "number"
                      },
                      "completedAt": {
                        "type": "number"
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "taskId",
                      "projectId",
                      "knowledgeSpaceId",
                      "title",
                      "status",
                      "order",
                      "tags",
                      "linkedArtifactIds",
                      "linkedSourceIds",
                      "linkedNodeIds",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": true
                  }
                },
                "counts": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "number"
                    },
                    "pending": {
                      "type": "number"
                    },
                    "in_progress": {
                      "type": "number"
                    },
                    "blocked": {
                      "type": "number"
                    },
                    "done": {
                      "type": "number"
                    },
                    "failed": {
                      "type": "number"
                    },
                    "cancelled": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "total",
                    "pending",
                    "in_progress",
                    "blocked",
                    "done",
                    "failed",
                    "cancelled"
                  ],
                  "additionalProperties": false
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "ok",
                "projectId",
                "knowledgeSpaceId",
                "workPlanId",
                "tasks",
                "counts",
                "updatedAt"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "ok",
            "projectId",
            "knowledgeSpaceId",
            "workPlanId",
            "snapshot"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "projectPlanning.workPlan.task.update",
        "title": "Update Project Work Plan Task",
        "description": "Patch a durable project-scoped work-plan task.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "PATCH",
          "path": "/api/projects/planning/work-plan/tasks/{taskId}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "projectId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "workPlanId": {
              "type": "string"
            },
            "taskId": {
              "type": "string"
            },
            "patch": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "taskId",
            "patch"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "projectId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "workPlanId": {
              "type": "string"
            },
            "task": {
              "type": "object",
              "properties": {
                "taskId": {
                  "type": "string"
                },
                "projectId": {
                  "type": "string"
                },
                "knowledgeSpaceId": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "notes": {
                  "type": "string"
                },
                "owner": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "priority": {
                  "type": "number"
                },
                "order": {
                  "type": "number"
                },
                "source": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "parentTaskId": {
                  "type": "string"
                },
                "chainId": {
                  "type": "string"
                },
                "phaseId": {
                  "type": "string"
                },
                "agentId": {
                  "type": "string"
                },
                "turnId": {
                  "type": "string"
                },
                "decisionId": {
                  "type": "string"
                },
                "sourceMessageId": {
                  "type": "string"
                },
                "linkedArtifactIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "linkedSourceIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "linkedNodeIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "originSurface": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "completedAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "taskId",
                "projectId",
                "knowledgeSpaceId",
                "title",
                "status",
                "order",
                "tags",
                "linkedArtifactIds",
                "linkedSourceIds",
                "linkedNodeIds",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "previousTask": {
              "type": "object",
              "properties": {
                "taskId": {
                  "type": "string"
                },
                "projectId": {
                  "type": "string"
                },
                "knowledgeSpaceId": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "notes": {
                  "type": "string"
                },
                "owner": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "priority": {
                  "type": "number"
                },
                "order": {
                  "type": "number"
                },
                "source": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "parentTaskId": {
                  "type": "string"
                },
                "chainId": {
                  "type": "string"
                },
                "phaseId": {
                  "type": "string"
                },
                "agentId": {
                  "type": "string"
                },
                "turnId": {
                  "type": "string"
                },
                "decisionId": {
                  "type": "string"
                },
                "sourceMessageId": {
                  "type": "string"
                },
                "linkedArtifactIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "linkedSourceIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "linkedNodeIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "originSurface": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "completedAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "taskId",
                "projectId",
                "knowledgeSpaceId",
                "title",
                "status",
                "order",
                "tags",
                "linkedArtifactIds",
                "linkedSourceIds",
                "linkedNodeIds",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "deletedTask": {
              "type": "object",
              "properties": {
                "taskId": {
                  "type": "string"
                },
                "projectId": {
                  "type": "string"
                },
                "knowledgeSpaceId": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "notes": {
                  "type": "string"
                },
                "owner": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "priority": {
                  "type": "number"
                },
                "order": {
                  "type": "number"
                },
                "source": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "parentTaskId": {
                  "type": "string"
                },
                "chainId": {
                  "type": "string"
                },
                "phaseId": {
                  "type": "string"
                },
                "agentId": {
                  "type": "string"
                },
                "turnId": {
                  "type": "string"
                },
                "decisionId": {
                  "type": "string"
                },
                "sourceMessageId": {
                  "type": "string"
                },
                "linkedArtifactIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "linkedSourceIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "linkedNodeIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "originSurface": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "completedAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "taskId",
                "projectId",
                "knowledgeSpaceId",
                "title",
                "status",
                "order",
                "tags",
                "linkedArtifactIds",
                "linkedSourceIds",
                "linkedNodeIds",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            },
            "clearedTaskIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "snapshot": {
              "type": "object",
              "properties": {
                "ok": {
                  "type": "boolean"
                },
                "projectId": {
                  "type": "string"
                },
                "knowledgeSpaceId": {
                  "type": "string"
                },
                "workPlanId": {
                  "type": "string"
                },
                "tasks": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "taskId": {
                        "type": "string"
                      },
                      "projectId": {
                        "type": "string"
                      },
                      "knowledgeSpaceId": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "notes": {
                        "type": "string"
                      },
                      "owner": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string"
                      },
                      "priority": {
                        "type": "number"
                      },
                      "order": {
                        "type": "number"
                      },
                      "source": {
                        "type": "string"
                      },
                      "tags": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "parentTaskId": {
                        "type": "string"
                      },
                      "chainId": {
                        "type": "string"
                      },
                      "phaseId": {
                        "type": "string"
                      },
                      "agentId": {
                        "type": "string"
                      },
                      "turnId": {
                        "type": "string"
                      },
                      "decisionId": {
                        "type": "string"
                      },
                      "sourceMessageId": {
                        "type": "string"
                      },
                      "linkedArtifactIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "linkedSourceIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "linkedNodeIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "originSurface": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "updatedAt": {
                        "type": "number"
                      },
                      "completedAt": {
                        "type": "number"
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "taskId",
                      "projectId",
                      "knowledgeSpaceId",
                      "title",
                      "status",
                      "order",
                      "tags",
                      "linkedArtifactIds",
                      "linkedSourceIds",
                      "linkedNodeIds",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": true
                  }
                },
                "counts": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "number"
                    },
                    "pending": {
                      "type": "number"
                    },
                    "in_progress": {
                      "type": "number"
                    },
                    "blocked": {
                      "type": "number"
                    },
                    "done": {
                      "type": "number"
                    },
                    "failed": {
                      "type": "number"
                    },
                    "cancelled": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "total",
                    "pending",
                    "in_progress",
                    "blocked",
                    "done",
                    "failed",
                    "cancelled"
                  ],
                  "additionalProperties": false
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "ok",
                "projectId",
                "knowledgeSpaceId",
                "workPlanId",
                "tasks",
                "counts",
                "updatedAt"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "ok",
            "projectId",
            "knowledgeSpaceId",
            "workPlanId",
            "snapshot"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "projectPlanning.workPlan.tasks.list",
        "title": "List Project Work Plan Tasks",
        "description": "List durable project-scoped work-plan tasks with optional status, owner, parent, or WRFC-chain filters.",
        "category": "knowledge",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:knowledge"
        ],
        "http": {
          "method": "GET",
          "path": "/api/projects/planning/work-plan/tasks"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "projectId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "workPlanId": {
              "type": "string"
            },
            "status": {
              "type": "string"
            },
            "parentTaskId": {
              "type": "string"
            },
            "chainId": {
              "type": "string"
            },
            "owner": {
              "type": "string"
            },
            "limit": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "projectId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "workPlanId": {
              "type": "string"
            },
            "tasks": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "taskId": {
                    "type": "string"
                  },
                  "projectId": {
                    "type": "string"
                  },
                  "knowledgeSpaceId": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "notes": {
                    "type": "string"
                  },
                  "owner": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  },
                  "priority": {
                    "type": "number"
                  },
                  "order": {
                    "type": "number"
                  },
                  "source": {
                    "type": "string"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "parentTaskId": {
                    "type": "string"
                  },
                  "chainId": {
                    "type": "string"
                  },
                  "phaseId": {
                    "type": "string"
                  },
                  "agentId": {
                    "type": "string"
                  },
                  "turnId": {
                    "type": "string"
                  },
                  "decisionId": {
                    "type": "string"
                  },
                  "sourceMessageId": {
                    "type": "string"
                  },
                  "linkedArtifactIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "linkedSourceIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "linkedNodeIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "originSurface": {
                    "type": "string"
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  },
                  "completedAt": {
                    "type": "number"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "taskId",
                  "projectId",
                  "knowledgeSpaceId",
                  "title",
                  "status",
                  "order",
                  "tags",
                  "linkedArtifactIds",
                  "linkedSourceIds",
                  "linkedNodeIds",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            },
            "counts": {
              "type": "object",
              "properties": {
                "total": {
                  "type": "number"
                },
                "pending": {
                  "type": "number"
                },
                "in_progress": {
                  "type": "number"
                },
                "blocked": {
                  "type": "number"
                },
                "done": {
                  "type": "number"
                },
                "failed": {
                  "type": "number"
                },
                "cancelled": {
                  "type": "number"
                }
              },
              "required": [
                "total",
                "pending",
                "in_progress",
                "blocked",
                "done",
                "failed",
                "cancelled"
              ],
              "additionalProperties": false
            },
            "updatedAt": {
              "type": "number"
            }
          },
          "required": [
            "ok",
            "projectId",
            "knowledgeSpaceId",
            "workPlanId",
            "tasks",
            "counts",
            "updatedAt"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "projectPlanning.workPlan.tasks.reorder",
        "title": "Reorder Project Work Plan Tasks",
        "description": "Replace task ordering for the current project work plan.",
        "category": "knowledge",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/projects/planning/work-plan/tasks/reorder"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "projectId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "workPlanId": {
              "type": "string"
            },
            "orderedTaskIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "orderedTaskIds"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "projectId": {
              "type": "string"
            },
            "knowledgeSpaceId": {
              "type": "string"
            },
            "workPlanId": {
              "type": "string"
            },
            "tasks": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "taskId": {
                    "type": "string"
                  },
                  "projectId": {
                    "type": "string"
                  },
                  "knowledgeSpaceId": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "notes": {
                    "type": "string"
                  },
                  "owner": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  },
                  "priority": {
                    "type": "number"
                  },
                  "order": {
                    "type": "number"
                  },
                  "source": {
                    "type": "string"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "parentTaskId": {
                    "type": "string"
                  },
                  "chainId": {
                    "type": "string"
                  },
                  "phaseId": {
                    "type": "string"
                  },
                  "agentId": {
                    "type": "string"
                  },
                  "turnId": {
                    "type": "string"
                  },
                  "decisionId": {
                    "type": "string"
                  },
                  "sourceMessageId": {
                    "type": "string"
                  },
                  "linkedArtifactIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "linkedSourceIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "linkedNodeIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "originSurface": {
                    "type": "string"
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  },
                  "completedAt": {
                    "type": "number"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "taskId",
                  "projectId",
                  "knowledgeSpaceId",
                  "title",
                  "status",
                  "order",
                  "tags",
                  "linkedArtifactIds",
                  "linkedSourceIds",
                  "linkedNodeIds",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            },
            "counts": {
              "type": "object",
              "properties": {
                "total": {
                  "type": "number"
                },
                "pending": {
                  "type": "number"
                },
                "in_progress": {
                  "type": "number"
                },
                "blocked": {
                  "type": "number"
                },
                "done": {
                  "type": "number"
                },
                "failed": {
                  "type": "number"
                },
                "cancelled": {
                  "type": "number"
                }
              },
              "required": [
                "total",
                "pending",
                "in_progress",
                "blocked",
                "done",
                "failed",
                "cancelled"
              ],
              "additionalProperties": false
            },
            "updatedAt": {
              "type": "number"
            }
          },
          "required": [
            "ok",
            "projectId",
            "knowledgeSpaceId",
            "workPlanId",
            "tasks",
            "counts",
            "updatedAt"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "mcp.config.get",
        "title": "MCP Effective Config",
        "description": "Return effective MCP config from global, external, and project sources. Environment values are redacted to envKeys.",
        "category": "mcp",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:mcp"
        ],
        "http": {
          "method": "GET",
          "path": "/api/mcp/config"
        },
        "events": [
          "runtime.mcp"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "locations": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "scope": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string"
                  },
                  "path": {
                    "type": "string"
                  },
                  "writable": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "scope",
                  "kind",
                  "path",
                  "writable"
                ],
                "additionalProperties": false
              }
            },
            "servers": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "command": {
                    "type": "string"
                  },
                  "args": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "envKeys": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "role": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "trustMode": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "allowedPaths": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "allowedHosts": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "source": {
                    "type": "object",
                    "properties": {
                      "scope": {
                        "type": "string"
                      },
                      "kind": {
                        "type": "string"
                      },
                      "path": {
                        "type": "string"
                      },
                      "writable": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "scope",
                      "kind",
                      "path",
                      "writable"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "name",
                  "command",
                  "args",
                  "envKeys",
                  "role",
                  "trustMode",
                  "allowedPaths",
                  "allowedHosts",
                  "source"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "locations",
            "servers"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "mcp.config.reload",
        "title": "Reload MCP Config",
        "description": "Reload effective MCP config and reconnect added, removed, or changed servers without daemon restart.",
        "category": "mcp",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:mcp"
        ],
        "http": {
          "method": "POST",
          "path": "/api/mcp/reload"
        },
        "events": [
          "runtime.mcp"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "reload": {
              "type": "object",
              "properties": {
                "added": {
                  "type": "number"
                },
                "changed": {
                  "type": "number"
                },
                "removed": {
                  "type": "number"
                },
                "unchanged": {
                  "type": "number"
                },
                "servers": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "action": {
                        "type": "string",
                        "enum": [
                          "added",
                          "changed",
                          "removed",
                          "unchanged"
                        ]
                      },
                      "connected": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "name",
                      "action",
                      "connected"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "added",
                "changed",
                "removed",
                "unchanged",
                "servers"
              ],
              "additionalProperties": false
            },
            "config": {
              "type": "object",
              "properties": {
                "locations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "scope": {
                        "type": "string"
                      },
                      "kind": {
                        "type": "string"
                      },
                      "path": {
                        "type": "string"
                      },
                      "writable": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "scope",
                      "kind",
                      "path",
                      "writable"
                    ],
                    "additionalProperties": false
                  }
                },
                "servers": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "command": {
                        "type": "string"
                      },
                      "args": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "envKeys": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "role": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "trustMode": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "allowedPaths": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "allowedHosts": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "source": {
                        "type": "object",
                        "properties": {
                          "scope": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string"
                          },
                          "path": {
                            "type": "string"
                          },
                          "writable": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "scope",
                          "kind",
                          "path",
                          "writable"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "name",
                      "command",
                      "args",
                      "envKeys",
                      "role",
                      "trustMode",
                      "allowedPaths",
                      "allowedHosts",
                      "source"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "locations",
                "servers"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "reload",
            "config"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "mcp.servers.list",
        "title": "MCP Servers List",
        "description": "Return configured MCP servers, runtime security posture, and sandbox bindings.",
        "category": "mcp",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:mcp"
        ],
        "http": {
          "method": "GET",
          "path": "/api/mcp/servers"
        },
        "events": [
          "runtime.mcp"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "servers": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "connected": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "connected"
                ],
                "additionalProperties": false
              }
            },
            "security": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {},
                "additionalProperties": true
              }
            },
            "sandboxBindings": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {},
                "additionalProperties": true
              }
            }
          },
          "required": [
            "servers",
            "security",
            "sandboxBindings"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "mcp.servers.remove",
        "title": "Remove MCP Server",
        "description": "Remove a project/global MCP server config and disconnect it without daemon restart.",
        "category": "mcp",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:mcp"
        ],
        "http": {
          "method": "DELETE",
          "path": "/api/mcp/config/servers/{serverName}"
        },
        "events": [
          "runtime.mcp"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "serverName": {
              "type": "string"
            },
            "scope": {
              "type": "string",
              "enum": [
                "project",
                "global"
              ]
            }
          },
          "required": [
            "serverName"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "scope": {
              "type": "string",
              "enum": [
                "project",
                "global"
              ]
            },
            "path": {
              "type": "string"
            },
            "removed": {
              "type": "boolean"
            },
            "reload": {
              "type": "object",
              "properties": {
                "added": {
                  "type": "number"
                },
                "changed": {
                  "type": "number"
                },
                "removed": {
                  "type": "number"
                },
                "unchanged": {
                  "type": "number"
                },
                "servers": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "action": {
                        "type": "string",
                        "enum": [
                          "added",
                          "changed",
                          "removed",
                          "unchanged"
                        ]
                      },
                      "connected": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "name",
                      "action",
                      "connected"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "added",
                "changed",
                "removed",
                "unchanged",
                "servers"
              ],
              "additionalProperties": false
            },
            "config": {
              "type": "object",
              "properties": {
                "locations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "scope": {
                        "type": "string"
                      },
                      "kind": {
                        "type": "string"
                      },
                      "path": {
                        "type": "string"
                      },
                      "writable": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "scope",
                      "kind",
                      "path",
                      "writable"
                    ],
                    "additionalProperties": false
                  }
                },
                "servers": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "command": {
                        "type": "string"
                      },
                      "args": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "envKeys": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "role": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "trustMode": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "allowedPaths": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "allowedHosts": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "source": {
                        "type": "object",
                        "properties": {
                          "scope": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string"
                          },
                          "path": {
                            "type": "string"
                          },
                          "writable": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "scope",
                          "kind",
                          "path",
                          "writable"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "name",
                      "command",
                      "args",
                      "envKeys",
                      "role",
                      "trustMode",
                      "allowedPaths",
                      "allowedHosts",
                      "source"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "locations",
                "servers"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "scope",
            "path",
            "reload",
            "config"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "mcp.servers.reveal",
        "title": "MCP Servers Reveal",
        "description": "Return effective MCP config with environment VALUES included, not just envKeys. Admin only, the redacted mcp.config.get view is what every other caller should use.",
        "category": "mcp",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:mcp"
        ],
        "http": {
          "method": "GET",
          "path": "/api/mcp/servers/reveal"
        },
        "events": [
          "runtime.mcp"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "locations": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "scope": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string"
                  },
                  "path": {
                    "type": "string"
                  },
                  "writable": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "scope",
                  "kind",
                  "path",
                  "writable"
                ],
                "additionalProperties": false
              }
            },
            "servers": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "command": {
                    "type": "string"
                  },
                  "args": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "envKeys": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "env": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": true
                  },
                  "role": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "trustMode": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "allowedPaths": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "allowedHosts": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "source": {
                    "type": "object",
                    "properties": {
                      "scope": {
                        "type": "string"
                      },
                      "kind": {
                        "type": "string"
                      },
                      "path": {
                        "type": "string"
                      },
                      "writable": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "scope",
                      "kind",
                      "path",
                      "writable"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "name",
                  "command",
                  "args",
                  "envKeys",
                  "env",
                  "role",
                  "trustMode",
                  "allowedPaths",
                  "allowedHosts",
                  "source"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "locations",
            "servers"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "mcp.servers.upsert",
        "title": "Upsert MCP Server",
        "description": "Persist a project/global MCP server config and reconnect the changed runtime server without daemon restart.",
        "category": "mcp",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:mcp"
        ],
        "http": {
          "method": "POST",
          "path": "/api/mcp/config/servers"
        },
        "events": [
          "runtime.mcp"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "scope": {
              "type": "string",
              "enum": [
                "project",
                "global"
              ]
            },
            "server": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "command": {
                  "type": "string"
                },
                "args": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "env": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true
                },
                "envKeys": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "role": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "trustMode": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "allowedPaths": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "allowedHosts": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "name",
                "command"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "server"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "scope": {
              "type": "string",
              "enum": [
                "project",
                "global"
              ]
            },
            "path": {
              "type": "string"
            },
            "removed": {
              "type": "boolean"
            },
            "reload": {
              "type": "object",
              "properties": {
                "added": {
                  "type": "number"
                },
                "changed": {
                  "type": "number"
                },
                "removed": {
                  "type": "number"
                },
                "unchanged": {
                  "type": "number"
                },
                "servers": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "action": {
                        "type": "string",
                        "enum": [
                          "added",
                          "changed",
                          "removed",
                          "unchanged"
                        ]
                      },
                      "connected": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "name",
                      "action",
                      "connected"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "added",
                "changed",
                "removed",
                "unchanged",
                "servers"
              ],
              "additionalProperties": false
            },
            "config": {
              "type": "object",
              "properties": {
                "locations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "scope": {
                        "type": "string"
                      },
                      "kind": {
                        "type": "string"
                      },
                      "path": {
                        "type": "string"
                      },
                      "writable": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "scope",
                      "kind",
                      "path",
                      "writable"
                    ],
                    "additionalProperties": false
                  }
                },
                "servers": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "command": {
                        "type": "string"
                      },
                      "args": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "envKeys": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "role": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "trustMode": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "allowedPaths": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "allowedHosts": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "source": {
                        "type": "object",
                        "properties": {
                          "scope": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string"
                          },
                          "path": {
                            "type": "string"
                          },
                          "writable": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "scope",
                          "kind",
                          "path",
                          "writable"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "name",
                      "command",
                      "args",
                      "envKeys",
                      "role",
                      "trustMode",
                      "allowedPaths",
                      "allowedHosts",
                      "source"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "locations",
                "servers"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "scope",
            "path",
            "reload",
            "config"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "mcp.tools.list",
        "title": "MCP Tools List",
        "description": "Return currently connected MCP tools.",
        "category": "mcp",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:mcp"
        ],
        "http": {
          "method": "GET",
          "path": "/api/mcp/tools"
        },
        "events": [
          "runtime.mcp"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "tools": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "qualifiedName": {
                    "type": "string"
                  },
                  "serverName": {
                    "type": "string"
                  },
                  "toolName": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  }
                },
                "required": [
                  "qualifiedName",
                  "serverName",
                  "toolName",
                  "description"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "tools"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "media.analyze",
        "title": "Analyze Media Artifact",
        "description": "Analyze an artifact through a registered media provider.",
        "category": "media",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:media"
        ],
        "http": {
          "method": "POST",
          "path": "/api/media/analyze"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "providerId": {
              "type": "string"
            },
            "artifact": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "artifactId": {
                  "type": "string"
                },
                "mimeType": {
                  "type": "string"
                },
                "dataBase64": {
                  "type": "string"
                },
                "uri": {
                  "type": "string"
                },
                "filename": {
                  "type": "string"
                },
                "sizeBytes": {
                  "type": "number"
                },
                "sha256": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "mimeType",
                "metadata"
              ],
              "additionalProperties": false
            },
            "artifactId": {
              "type": "string"
            },
            "prompt": {
              "type": "string"
            },
            "modelId": {
              "type": "string"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "additionalProperties": true,
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "artifact": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "artifactId": {
                      "type": "string"
                    },
                    "mimeType": {
                      "type": "string"
                    },
                    "dataBase64": {
                      "type": "string"
                    },
                    "uri": {
                      "type": "string"
                    },
                    "filename": {
                      "type": "string"
                    },
                    "sizeBytes": {
                      "type": "number"
                    },
                    "sha256": {
                      "type": "string"
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "mimeType",
                    "metadata"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "artifact"
              ],
              "additionalProperties": true
            },
            {
              "type": "object",
              "properties": {
                "artifactId": {
                  "type": "string"
                }
              },
              "required": [
                "artifactId"
              ],
              "additionalProperties": true
            }
          ]
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "providerId": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "labels": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "text": {
              "type": "string"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "providerId",
            "metadata"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "media.generate",
        "title": "Generate Media Artifact",
        "description": "Generate a media artifact through a registered media provider.",
        "category": "media",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:media"
        ],
        "http": {
          "method": "POST",
          "path": "/api/media/generate"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "providerId": {
              "type": "string"
            },
            "prompt": {
              "type": "string"
            },
            "outputMimeType": {
              "type": "string"
            },
            "modelId": {
              "type": "string"
            },
            "options": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "prompt"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "providerId": {
              "type": "string"
            },
            "artifacts": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "artifactId": {
                    "type": "string"
                  },
                  "mimeType": {
                    "type": "string"
                  },
                  "dataBase64": {
                    "type": "string"
                  },
                  "uri": {
                    "type": "string"
                  },
                  "filename": {
                    "type": "string"
                  },
                  "sizeBytes": {
                    "type": "number"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "acquisitionMode": {
                    "type": "string",
                    "enum": [
                      "inline-data",
                      "local-path",
                      "remote-fetch",
                      "unknown"
                    ]
                  },
                  "fetchMode": {
                    "type": "string",
                    "enum": [
                      "not-applicable",
                      "public-only",
                      "allow-private-hosts",
                      "unknown"
                    ]
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "mimeType",
                  "metadata"
                ],
                "additionalProperties": false
              }
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "providerId",
            "artifacts",
            "metadata"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "media.providers.list",
        "title": "List Media Providers",
        "description": "Return registered media provider capabilities.",
        "category": "media",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:media"
        ],
        "http": {
          "method": "GET",
          "path": "/api/media/providers"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "providers": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "capabilities": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "id",
                  "label",
                  "capabilities"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "providers"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "media.transform",
        "title": "Transform Media Artifact",
        "description": "Transform an artifact through a registered media provider.",
        "category": "media",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:media"
        ],
        "http": {
          "method": "POST",
          "path": "/api/media/transform"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "providerId": {
              "type": "string"
            },
            "artifact": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "artifactId": {
                  "type": "string"
                },
                "mimeType": {
                  "type": "string"
                },
                "dataBase64": {
                  "type": "string"
                },
                "uri": {
                  "type": "string"
                },
                "filename": {
                  "type": "string"
                },
                "sizeBytes": {
                  "type": "number"
                },
                "sha256": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "mimeType",
                "metadata"
              ],
              "additionalProperties": false
            },
            "operation": {
              "type": "string"
            },
            "outputMimeType": {
              "type": "string"
            },
            "options": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "artifact",
            "operation"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "providerId": {
              "type": "string"
            },
            "artifact": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "artifactId": {
                  "type": "string"
                },
                "mimeType": {
                  "type": "string"
                },
                "dataBase64": {
                  "type": "string"
                },
                "uri": {
                  "type": "string"
                },
                "filename": {
                  "type": "string"
                },
                "sizeBytes": {
                  "type": "number"
                },
                "sha256": {
                  "type": "string"
                },
                "acquisitionMode": {
                  "type": "string",
                  "enum": [
                    "inline-data",
                    "local-path",
                    "remote-fetch",
                    "unknown"
                  ]
                },
                "fetchMode": {
                  "type": "string",
                  "enum": [
                    "not-applicable",
                    "public-only",
                    "allow-private-hosts",
                    "unknown"
                  ]
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "mimeType",
                "metadata"
              ],
              "additionalProperties": false
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "providerId",
            "artifact",
            "metadata"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "multimodal.analyze",
        "title": "Run Multimodal Analysis",
        "description": "Analyze an image, audio file, video artifact, or document through the unified multimodal service.",
        "category": "media",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:media"
        ],
        "http": {
          "method": "POST",
          "path": "/api/multimodal/analyze"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "artifactId": {
              "type": "string"
            },
            "artifact": {
              "type": "object",
              "properties": {
                "artifactId": {
                  "type": "string"
                },
                "mimeType": {
                  "type": "string"
                },
                "dataBase64": {
                  "type": "string"
                },
                "uri": {
                  "type": "string"
                },
                "allowPrivateHosts": {
                  "type": "boolean"
                },
                "filename": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "additionalProperties": false
            },
            "prompt": {
              "type": "string"
            },
            "imageProviderId": {
              "type": "string"
            },
            "audioProviderId": {
              "type": "string"
            },
            "modelId": {
              "type": "string"
            },
            "language": {
              "type": "string"
            },
            "detail": {
              "type": "string",
              "enum": [
                "compact",
                "standard",
                "detailed"
              ]
            },
            "allowPrivateHosts": {
              "type": "boolean"
            },
            "includePacket": {
              "type": "boolean"
            },
            "writeback": {
              "type": "object",
              "properties": {
                "sessionId": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "folderPath": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "additionalProperties": false
            },
            "sessionId": {
              "type": "string"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "analysis": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "artifact": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string"
                    },
                    "mimeType": {
                      "type": "string"
                    },
                    "filename": {
                      "type": "string"
                    },
                    "sizeBytes": {
                      "type": "number"
                    },
                    "sha256": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "expiresAt": {
                      "type": "number"
                    },
                    "sourceUri": {
                      "type": "string"
                    },
                    "acquisitionMode": {
                      "type": "string"
                    },
                    "fetchMode": {
                      "type": "string"
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "mimeType",
                    "sizeBytes",
                    "sha256",
                    "createdAt",
                    "metadata"
                  ],
                  "additionalProperties": true
                },
                "providerIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "summary": {
                  "type": "string"
                },
                "text": {
                  "type": "string"
                },
                "labels": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "entities": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "segments": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "text": {
                        "type": "string"
                      },
                      "startMs": {
                        "type": "number"
                      },
                      "endMs": {
                        "type": "number"
                      },
                      "confidence": {
                        "type": "number"
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "kind",
                      "metadata"
                    ],
                    "additionalProperties": false
                  }
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "kind",
                "artifact",
                "providerIds",
                "labels",
                "entities",
                "segments",
                "metadata"
              ],
              "additionalProperties": false
            },
            "packet": {
              "type": "object",
              "properties": {
                "detail": {
                  "type": "string"
                },
                "budgetLimit": {
                  "type": "number"
                },
                "estimatedTokens": {
                  "type": "number"
                },
                "rendered": {
                  "type": "string"
                },
                "highlights": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "detail",
                "budgetLimit",
                "estimatedTokens",
                "rendered",
                "highlights"
              ],
              "additionalProperties": false
            },
            "writeback": {
              "type": "object",
              "properties": {
                "analysisArtifact": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string"
                    },
                    "mimeType": {
                      "type": "string"
                    },
                    "filename": {
                      "type": "string"
                    },
                    "sizeBytes": {
                      "type": "number"
                    },
                    "sha256": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "expiresAt": {
                      "type": "number"
                    },
                    "sourceUri": {
                      "type": "string"
                    },
                    "acquisitionMode": {
                      "type": "string"
                    },
                    "fetchMode": {
                      "type": "string"
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "mimeType",
                    "sizeBytes",
                    "sha256",
                    "createdAt",
                    "metadata"
                  ],
                  "additionalProperties": true
                },
                "knowledgeSourceId": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "analysisArtifact",
                "metadata"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "analysis"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "multimodal.packet",
        "title": "Build Multimodal Packet",
        "description": "Build a token-efficient packet from an existing multimodal analysis result.",
        "category": "media",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:media"
        ],
        "http": {
          "method": "POST",
          "path": "/api/multimodal/packet"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "analysis": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "artifact": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string"
                    },
                    "mimeType": {
                      "type": "string"
                    },
                    "filename": {
                      "type": "string"
                    },
                    "sizeBytes": {
                      "type": "number"
                    },
                    "sha256": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "expiresAt": {
                      "type": "number"
                    },
                    "sourceUri": {
                      "type": "string"
                    },
                    "acquisitionMode": {
                      "type": "string"
                    },
                    "fetchMode": {
                      "type": "string"
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "mimeType",
                    "sizeBytes",
                    "sha256",
                    "createdAt",
                    "metadata"
                  ],
                  "additionalProperties": true
                },
                "providerIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "summary": {
                  "type": "string"
                },
                "text": {
                  "type": "string"
                },
                "labels": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "entities": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "segments": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "text": {
                        "type": "string"
                      },
                      "startMs": {
                        "type": "number"
                      },
                      "endMs": {
                        "type": "number"
                      },
                      "confidence": {
                        "type": "number"
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "kind",
                      "metadata"
                    ],
                    "additionalProperties": false
                  }
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "kind",
                "artifact",
                "providerIds",
                "labels",
                "entities",
                "segments",
                "metadata"
              ],
              "additionalProperties": false
            },
            "detail": {
              "type": "string",
              "enum": [
                "compact",
                "standard",
                "detailed"
              ]
            },
            "budgetLimit": {
              "type": "number"
            }
          },
          "required": [
            "analysis"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "packet": {
              "type": "object",
              "properties": {
                "detail": {
                  "type": "string"
                },
                "budgetLimit": {
                  "type": "number"
                },
                "estimatedTokens": {
                  "type": "number"
                },
                "rendered": {
                  "type": "string"
                },
                "highlights": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "detail",
                "budgetLimit",
                "estimatedTokens",
                "rendered",
                "highlights"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "packet"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "multimodal.providers.list",
        "title": "List Multimodal Providers",
        "description": "Return the normalized multimodal provider catalog spanning media understanding, speech-to-text, and extractors.",
        "category": "media",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:media"
        ],
        "http": {
          "method": "GET",
          "path": "/api/multimodal/providers"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "providers": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "transport": {
                    "type": "string"
                  },
                  "capabilities": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "configured": {
                    "type": "boolean"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "label",
                  "transport",
                  "capabilities",
                  "configured",
                  "metadata"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "providers"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "multimodal.status",
        "title": "Multimodal Status",
        "description": "Return the unified multimodal runtime status across image, audio, video, and document analysis.",
        "category": "media",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:media"
        ],
        "http": {
          "method": "GET",
          "path": "/api/multimodal"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "providerCount": {
              "type": "number"
            },
            "providers": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "transport": {
                    "type": "string"
                  },
                  "capabilities": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "configured": {
                    "type": "boolean"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "label",
                  "transport",
                  "capabilities",
                  "configured",
                  "metadata"
                ],
                "additionalProperties": false
              }
            },
            "note": {
              "type": "string"
            }
          },
          "required": [
            "enabled",
            "providerCount",
            "providers",
            "note"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "multimodal.writeback",
        "title": "Write Back Multimodal Analysis",
        "description": "Persist a multimodal analysis result as an artifact and ingest it into the structured knowledge store.",
        "category": "media",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:media",
          "write:knowledge"
        ],
        "http": {
          "method": "POST",
          "path": "/api/multimodal/writeback"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "analysis": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "artifact": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string"
                    },
                    "mimeType": {
                      "type": "string"
                    },
                    "filename": {
                      "type": "string"
                    },
                    "sizeBytes": {
                      "type": "number"
                    },
                    "sha256": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "expiresAt": {
                      "type": "number"
                    },
                    "sourceUri": {
                      "type": "string"
                    },
                    "acquisitionMode": {
                      "type": "string"
                    },
                    "fetchMode": {
                      "type": "string"
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "mimeType",
                    "sizeBytes",
                    "sha256",
                    "createdAt",
                    "metadata"
                  ],
                  "additionalProperties": true
                },
                "providerIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "summary": {
                  "type": "string"
                },
                "text": {
                  "type": "string"
                },
                "labels": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "entities": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "segments": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "text": {
                        "type": "string"
                      },
                      "startMs": {
                        "type": "number"
                      },
                      "endMs": {
                        "type": "number"
                      },
                      "confidence": {
                        "type": "number"
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "kind",
                      "metadata"
                    ],
                    "additionalProperties": false
                  }
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "kind",
                "artifact",
                "providerIds",
                "labels",
                "entities",
                "segments",
                "metadata"
              ],
              "additionalProperties": false
            },
            "sessionId": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "tags": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "folderPath": {
              "type": "string"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "analysis"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "writeback": {
              "type": "object",
              "properties": {
                "analysisArtifact": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string"
                    },
                    "mimeType": {
                      "type": "string"
                    },
                    "filename": {
                      "type": "string"
                    },
                    "sizeBytes": {
                      "type": "number"
                    },
                    "sha256": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "expiresAt": {
                      "type": "number"
                    },
                    "sourceUri": {
                      "type": "string"
                    },
                    "acquisitionMode": {
                      "type": "string"
                    },
                    "fetchMode": {
                      "type": "string"
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "mimeType",
                    "sizeBytes",
                    "sha256",
                    "createdAt",
                    "metadata"
                  ],
                  "additionalProperties": true
                },
                "knowledgeSourceId": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "analysisArtifact",
                "metadata"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "writeback"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "memory.consolidation.receipts",
        "title": "Memory Consolidation Receipts",
        "description": "Return the retained memory-consolidation run receipts (what each idle/scheduled pass scanned, merged, archived, decayed) and the pending judgment PROPOSALS they carry (contradictions, cross-scope duplicates), the records a proposal references are already marked into the review queue, and a human resolves them through the confirmation-gated review route. A runtime without the consolidation scheduler answers an honest 501.",
        "category": "memory",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:memory"
        ],
        "http": {
          "method": "GET",
          "path": "/api/memory/consolidation/receipts"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "receipts": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "runId": {
                    "type": "string"
                  },
                  "ranAt": {
                    "type": "string"
                  },
                  "trigger": {
                    "type": "string"
                  },
                  "idle": {
                    "type": "boolean"
                  },
                  "scanned": {
                    "type": "number"
                  },
                  "merged": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": true
                    }
                  },
                  "archived": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": true
                    }
                  },
                  "decayed": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": true
                    }
                  },
                  "proposed": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "contradiction",
                            "cross-scope-duplicate",
                            "stale-delete"
                          ]
                        },
                        "ids": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "route": {
                          "type": "string"
                        },
                        "reason": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "kind",
                        "ids",
                        "route",
                        "reason"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "usageSignalAvailable": {
                    "type": "boolean"
                  },
                  "note": {
                    "type": "string"
                  }
                },
                "required": [
                  "runId",
                  "ranAt",
                  "trigger",
                  "idle",
                  "scanned",
                  "merged",
                  "archived",
                  "decayed",
                  "proposed",
                  "usageSignalAvailable",
                  "note"
                ],
                "additionalProperties": false
              }
            },
            "pendingProposals": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "contradiction",
                      "cross-scope-duplicate",
                      "stale-delete"
                    ]
                  },
                  "ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "route": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "ids",
                  "route",
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "receipts",
            "pendingProposals"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "memory.doctor",
        "title": "Memory Doctor",
        "description": "Return sqlite-vec and memory embedding-provider diagnostics.",
        "category": "memory",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:memory"
        ],
        "http": {
          "method": "GET",
          "path": "/api/memory/doctor"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "vector": {
              "type": "object",
              "properties": {
                "backend": {
                  "type": "string",
                  "enum": [
                    "sqlite-vec"
                  ]
                },
                "enabled": {
                  "type": "boolean"
                },
                "available": {
                  "type": "boolean"
                },
                "path": {
                  "type": "string"
                },
                "dimensions": {
                  "type": "number"
                },
                "indexedRecords": {
                  "type": "number"
                },
                "embeddingProviderId": {
                  "type": "string"
                },
                "embeddingProviderLabel": {
                  "type": "string"
                },
                "error": {
                  "type": "string"
                },
                "platformLimitReason": {
                  "type": "string"
                }
              },
              "required": [
                "backend",
                "enabled",
                "available",
                "path",
                "dimensions",
                "indexedRecords",
                "embeddingProviderId",
                "embeddingProviderLabel"
              ],
              "additionalProperties": true
            },
            "embeddings": {
              "type": "object",
              "properties": {
                "activeProviderId": {
                  "type": "string"
                },
                "providers": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      },
                      "state": {
                        "type": "string",
                        "enum": [
                          "healthy",
                          "degraded",
                          "disabled",
                          "unconfigured"
                        ]
                      },
                      "dimensions": {
                        "type": "number"
                      },
                      "configured": {
                        "type": "boolean"
                      },
                      "deterministic": {
                        "type": "boolean"
                      },
                      "detail": {
                        "type": "string"
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "id",
                      "label",
                      "state",
                      "dimensions",
                      "configured",
                      "metadata"
                    ],
                    "additionalProperties": true
                  }
                },
                "asyncProviders": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "syncProviders": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "warnings": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "activeProviderId",
                "providers",
                "asyncProviders",
                "syncProviders",
                "warnings"
              ],
              "additionalProperties": false
            },
            "checkedAt": {
              "type": "number"
            }
          },
          "required": [
            "vector",
            "embeddings",
            "checkedAt"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "memory.embeddings.default.set",
        "title": "Set Default Memory Embedding Provider",
        "description": "Set the active default memory embedding provider.",
        "category": "memory",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:memory"
        ],
        "http": {
          "method": "POST",
          "path": "/api/memory/embeddings/default"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "providerId": {
              "type": "string"
            }
          },
          "required": [
            "providerId"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "vector": {
              "type": "object",
              "properties": {
                "backend": {
                  "type": "string",
                  "enum": [
                    "sqlite-vec"
                  ]
                },
                "enabled": {
                  "type": "boolean"
                },
                "available": {
                  "type": "boolean"
                },
                "path": {
                  "type": "string"
                },
                "dimensions": {
                  "type": "number"
                },
                "indexedRecords": {
                  "type": "number"
                },
                "embeddingProviderId": {
                  "type": "string"
                },
                "embeddingProviderLabel": {
                  "type": "string"
                },
                "error": {
                  "type": "string"
                },
                "platformLimitReason": {
                  "type": "string"
                }
              },
              "required": [
                "backend",
                "enabled",
                "available",
                "path",
                "dimensions",
                "indexedRecords",
                "embeddingProviderId",
                "embeddingProviderLabel"
              ],
              "additionalProperties": true
            },
            "embeddings": {
              "type": "object",
              "properties": {
                "activeProviderId": {
                  "type": "string"
                },
                "providers": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      },
                      "state": {
                        "type": "string",
                        "enum": [
                          "healthy",
                          "degraded",
                          "disabled",
                          "unconfigured"
                        ]
                      },
                      "dimensions": {
                        "type": "number"
                      },
                      "configured": {
                        "type": "boolean"
                      },
                      "deterministic": {
                        "type": "boolean"
                      },
                      "detail": {
                        "type": "string"
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "id",
                      "label",
                      "state",
                      "dimensions",
                      "configured",
                      "metadata"
                    ],
                    "additionalProperties": true
                  }
                },
                "asyncProviders": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "syncProviders": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "warnings": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "activeProviderId",
                "providers",
                "asyncProviders",
                "syncProviders",
                "warnings"
              ],
              "additionalProperties": false
            },
            "checkedAt": {
              "type": "number"
            }
          },
          "required": [
            "vector",
            "embeddings",
            "checkedAt"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "memory.projections.get",
        "title": "Get Memory Projection",
        "description": "Return one standing record's projection by id: its metadata entry plus the exact markdown the file projection would write (front-matter + content, with the live temporal status labelled). Returns 404 when no standing (project/team) record has that id, a session-scope or unknown id is an honest miss, never an empty projection.",
        "category": "memory",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:memory"
        ],
        "http": {
          "method": "GET",
          "path": "/api/memory/projections/{id}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "projection": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "filename": {
                  "type": "string"
                },
                "scope": {
                  "type": "string",
                  "enum": [
                    "session",
                    "project",
                    "team"
                  ]
                },
                "cls": {
                  "type": "string",
                  "enum": [
                    "decision",
                    "constraint",
                    "incident",
                    "pattern",
                    "fact",
                    "risk",
                    "runbook",
                    "architecture",
                    "ownership"
                  ]
                },
                "summary": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "confidence": {
                  "type": "number"
                },
                "reviewState": {
                  "type": "string",
                  "enum": [
                    "fresh",
                    "reviewed",
                    "stale",
                    "contradicted"
                  ]
                },
                "validFrom": {
                  "type": "number"
                },
                "validUntil": {
                  "type": "number"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "active",
                    "pending",
                    "expired"
                  ]
                }
              },
              "required": [
                "id",
                "filename",
                "scope",
                "cls",
                "summary",
                "tags",
                "confidence",
                "reviewState",
                "status"
              ],
              "additionalProperties": false
            },
            "markdown": {
              "type": "string"
            }
          },
          "required": [
            "projection",
            "markdown"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "memory.projections.list",
        "title": "List Memory Projections",
        "description": "Return the live projection of standing (project/team-scope) memory records, one metadata entry per record (id, filename, scope, class, summary, tags, confidence, review state, temporal validity + status), oldest first. This is the read view over the same standing memory the file projection writes as markdown; session-scope records are excluded (they are not standing memory). Computed live from the store, never read from disk, so it always matches the current records. An expired record is present with status:\"expired\" rather than silently dropped.",
        "category": "memory",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:memory"
        ],
        "http": {
          "method": "GET",
          "path": "/api/memory/projections"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "projections": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "filename": {
                    "type": "string"
                  },
                  "scope": {
                    "type": "string",
                    "enum": [
                      "session",
                      "project",
                      "team"
                    ]
                  },
                  "cls": {
                    "type": "string",
                    "enum": [
                      "decision",
                      "constraint",
                      "incident",
                      "pattern",
                      "fact",
                      "risk",
                      "runbook",
                      "architecture",
                      "ownership"
                    ]
                  },
                  "summary": {
                    "type": "string"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "confidence": {
                    "type": "number"
                  },
                  "reviewState": {
                    "type": "string",
                    "enum": [
                      "fresh",
                      "reviewed",
                      "stale",
                      "contradicted"
                    ]
                  },
                  "validFrom": {
                    "type": "number"
                  },
                  "validUntil": {
                    "type": "number"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "active",
                      "pending",
                      "expired"
                    ]
                  }
                },
                "required": [
                  "id",
                  "filename",
                  "scope",
                  "cls",
                  "summary",
                  "tags",
                  "confidence",
                  "reviewState",
                  "status"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "projections"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "memory.records.add",
        "title": "Add Memory Record",
        "description": "Add a memory record to the daemon-owned canonical store. The daemon is the single writer for its store; a client surface routes its writes here instead of opening the store file, so two processes never write the same sql.js file. New records default to confidence 60 (the recall floor) and reviewState fresh unless the review block overrides them.",
        "category": "memory",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:memory"
        ],
        "http": {
          "method": "POST",
          "path": "/api/memory/records"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "cls": {
              "type": "string",
              "enum": [
                "decision",
                "constraint",
                "incident",
                "pattern",
                "fact",
                "risk",
                "runbook",
                "architecture",
                "ownership"
              ]
            },
            "summary": {
              "type": "string"
            },
            "scope": {
              "type": "string",
              "enum": [
                "session",
                "project",
                "team"
              ]
            },
            "detail": {
              "type": "string"
            },
            "tags": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "provenance": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "session",
                      "turn",
                      "task",
                      "event",
                      "file"
                    ]
                  },
                  "ref": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "ref"
                ],
                "additionalProperties": false
              }
            },
            "review": {
              "type": "object",
              "properties": {
                "state": {
                  "type": "string",
                  "enum": [
                    "fresh",
                    "reviewed",
                    "stale",
                    "contradicted"
                  ]
                },
                "confidence": {
                  "type": "number"
                },
                "reviewedBy": {
                  "type": "string"
                },
                "staleReason": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            }
          },
          "required": [
            "cls",
            "summary"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "record": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "scope": {
                  "type": "string",
                  "enum": [
                    "session",
                    "project",
                    "team"
                  ]
                },
                "cls": {
                  "type": "string",
                  "enum": [
                    "decision",
                    "constraint",
                    "incident",
                    "pattern",
                    "fact",
                    "risk",
                    "runbook",
                    "architecture",
                    "ownership"
                  ]
                },
                "summary": {
                  "type": "string"
                },
                "detail": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "provenance": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "session",
                          "turn",
                          "task",
                          "event",
                          "file"
                        ]
                      },
                      "ref": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind",
                      "ref"
                    ],
                    "additionalProperties": false
                  }
                },
                "reviewState": {
                  "type": "string",
                  "enum": [
                    "fresh",
                    "reviewed",
                    "stale",
                    "contradicted"
                  ]
                },
                "confidence": {
                  "type": "number"
                },
                "reviewedAt": {
                  "type": "number"
                },
                "reviewedBy": {
                  "type": "string"
                },
                "staleReason": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "scope",
                "cls",
                "summary",
                "tags",
                "provenance",
                "reviewState",
                "confidence",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "record"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "memory.records.delete",
        "title": "Delete Memory Record",
        "description": "Permanently delete a memory record and its links from the canonical store. Delete means delete: the record is removed from the store and the semantic index, not merely flagged. Returns { deleted: false } when no record with that id existed, an honest boolean, never a 200 that pretends a phantom row was removed.",
        "category": "memory",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:memory"
        ],
        "http": {
          "method": "DELETE",
          "path": "/api/memory/records/{id}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "deleted": {
              "type": "boolean"
            }
          },
          "required": [
            "id",
            "deleted"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "memory.records.export",
        "title": "Export Memory Bundle",
        "description": "Export a no-loss bundle (records + links) for the given filter from the canonical store. The bundle round-trips through import id-keyed, so it is the wire form of the cross-surface fold/reconcile seam. Read-only.",
        "category": "memory",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:memory"
        ],
        "http": {
          "method": "POST",
          "path": "/api/memory/records/export"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "scope": {
              "type": "string",
              "enum": [
                "session",
                "project",
                "team"
              ]
            },
            "cls": {
              "type": "string",
              "enum": [
                "decision",
                "constraint",
                "incident",
                "pattern",
                "fact",
                "risk",
                "runbook",
                "architecture",
                "ownership"
              ]
            },
            "tags": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "query": {
              "type": "string"
            },
            "semantic": {
              "type": "boolean"
            },
            "since": {
              "type": "number"
            },
            "reviewState": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "fresh",
                  "reviewed",
                  "stale",
                  "contradicted"
                ]
              }
            },
            "minConfidence": {
              "type": "number"
            },
            "provenanceKinds": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "session",
                  "turn",
                  "task",
                  "event",
                  "file"
                ]
              }
            },
            "staleOnly": {
              "type": "boolean"
            },
            "limit": {
              "type": "number"
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "bundle": {
              "type": "object",
              "properties": {
                "schemaVersion": {
                  "type": "string",
                  "enum": [
                    "v1"
                  ]
                },
                "exportedAt": {
                  "type": "number"
                },
                "scope": {
                  "type": "string",
                  "enum": [
                    "session",
                    "project",
                    "team",
                    "all"
                  ]
                },
                "recordCount": {
                  "type": "number"
                },
                "linkCount": {
                  "type": "number"
                },
                "records": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "scope": {
                        "type": "string",
                        "enum": [
                          "session",
                          "project",
                          "team"
                        ]
                      },
                      "cls": {
                        "type": "string",
                        "enum": [
                          "decision",
                          "constraint",
                          "incident",
                          "pattern",
                          "fact",
                          "risk",
                          "runbook",
                          "architecture",
                          "ownership"
                        ]
                      },
                      "summary": {
                        "type": "string"
                      },
                      "detail": {
                        "type": "string"
                      },
                      "tags": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "provenance": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "session",
                                "turn",
                                "task",
                                "event",
                                "file"
                              ]
                            },
                            "ref": {
                              "type": "string"
                            },
                            "label": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "ref"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "reviewState": {
                        "type": "string",
                        "enum": [
                          "fresh",
                          "reviewed",
                          "stale",
                          "contradicted"
                        ]
                      },
                      "confidence": {
                        "type": "number"
                      },
                      "reviewedAt": {
                        "type": "number"
                      },
                      "reviewedBy": {
                        "type": "string"
                      },
                      "staleReason": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "updatedAt": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "id",
                      "scope",
                      "cls",
                      "summary",
                      "tags",
                      "provenance",
                      "reviewState",
                      "confidence",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": true
                  }
                },
                "links": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "fromId": {
                        "type": "string"
                      },
                      "toId": {
                        "type": "string"
                      },
                      "relation": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "fromId",
                      "toId",
                      "relation",
                      "createdAt"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "schemaVersion",
                "exportedAt",
                "scope",
                "recordCount",
                "linkCount",
                "records",
                "links"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "bundle"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "memory.records.get",
        "title": "Get Memory Record",
        "description": "Return a single memory record by id from the canonical store, or 404 when no record with that id exists.",
        "category": "memory",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:memory"
        ],
        "http": {
          "method": "GET",
          "path": "/api/memory/records/{id}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "record": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "scope": {
                  "type": "string",
                  "enum": [
                    "session",
                    "project",
                    "team"
                  ]
                },
                "cls": {
                  "type": "string",
                  "enum": [
                    "decision",
                    "constraint",
                    "incident",
                    "pattern",
                    "fact",
                    "risk",
                    "runbook",
                    "architecture",
                    "ownership"
                  ]
                },
                "summary": {
                  "type": "string"
                },
                "detail": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "provenance": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "session",
                          "turn",
                          "task",
                          "event",
                          "file"
                        ]
                      },
                      "ref": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind",
                      "ref"
                    ],
                    "additionalProperties": false
                  }
                },
                "reviewState": {
                  "type": "string",
                  "enum": [
                    "fresh",
                    "reviewed",
                    "stale",
                    "contradicted"
                  ]
                },
                "confidence": {
                  "type": "number"
                },
                "reviewedAt": {
                  "type": "number"
                },
                "reviewedBy": {
                  "type": "string"
                },
                "staleReason": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "scope",
                "cls",
                "summary",
                "tags",
                "provenance",
                "reviewState",
                "confidence",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "record"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "memory.records.import",
        "title": "Import Memory Bundle",
        "description": "Import a bundle into the canonical store as an id-keyed union: an id already present is left untouched (counted skipped), a new id is added; a link is added only when both its endpoints exist. Never overwrites, never deletes, idempotent on re-run. The daemon is the single writer, so a client imports here instead of writing the store file.",
        "category": "memory",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:memory"
        ],
        "http": {
          "method": "POST",
          "path": "/api/memory/records/import"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "bundle": {
              "type": "object",
              "properties": {
                "schemaVersion": {
                  "type": "string",
                  "enum": [
                    "v1"
                  ]
                },
                "exportedAt": {
                  "type": "number"
                },
                "scope": {
                  "type": "string",
                  "enum": [
                    "session",
                    "project",
                    "team",
                    "all"
                  ]
                },
                "recordCount": {
                  "type": "number"
                },
                "linkCount": {
                  "type": "number"
                },
                "records": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "scope": {
                        "type": "string",
                        "enum": [
                          "session",
                          "project",
                          "team"
                        ]
                      },
                      "cls": {
                        "type": "string",
                        "enum": [
                          "decision",
                          "constraint",
                          "incident",
                          "pattern",
                          "fact",
                          "risk",
                          "runbook",
                          "architecture",
                          "ownership"
                        ]
                      },
                      "summary": {
                        "type": "string"
                      },
                      "detail": {
                        "type": "string"
                      },
                      "tags": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "provenance": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "session",
                                "turn",
                                "task",
                                "event",
                                "file"
                              ]
                            },
                            "ref": {
                              "type": "string"
                            },
                            "label": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "ref"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "reviewState": {
                        "type": "string",
                        "enum": [
                          "fresh",
                          "reviewed",
                          "stale",
                          "contradicted"
                        ]
                      },
                      "confidence": {
                        "type": "number"
                      },
                      "reviewedAt": {
                        "type": "number"
                      },
                      "reviewedBy": {
                        "type": "string"
                      },
                      "staleReason": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "updatedAt": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "id",
                      "scope",
                      "cls",
                      "summary",
                      "tags",
                      "provenance",
                      "reviewState",
                      "confidence",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": true
                  }
                },
                "links": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "fromId": {
                        "type": "string"
                      },
                      "toId": {
                        "type": "string"
                      },
                      "relation": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "fromId",
                      "toId",
                      "relation",
                      "createdAt"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "schemaVersion",
                "exportedAt",
                "scope",
                "recordCount",
                "linkCount",
                "records",
                "links"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "bundle"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "result": {
              "type": "object",
              "properties": {
                "importedRecords": {
                  "type": "number"
                },
                "skippedRecords": {
                  "type": "number"
                },
                "importedLinks": {
                  "type": "number"
                }
              },
              "required": [
                "importedRecords",
                "skippedRecords",
                "importedLinks"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "result"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "memory.records.links.add",
        "title": "Link Memory Records",
        "description": "Create a directed relation (e.g. \"supersedes\", \"caused\") from the path record to a target record. Returns 404 when either endpoint does not exist, never a 200 that pretends a link was made between records that do not both exist.",
        "category": "memory",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:memory"
        ],
        "http": {
          "method": "POST",
          "path": "/api/memory/records/{id}/links"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "toId": {
              "type": "string"
            },
            "relation": {
              "type": "string"
            }
          },
          "required": [
            "id",
            "toId",
            "relation"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "link": {
              "type": "object",
              "properties": {
                "fromId": {
                  "type": "string"
                },
                "toId": {
                  "type": "string"
                },
                "relation": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                }
              },
              "required": [
                "fromId",
                "toId",
                "relation",
                "createdAt"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "link"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "memory.records.links.list",
        "title": "List Memory Record Links",
        "description": "Return every link where the record is the source or the target. Returns 404 when no record with that id exists, an honest not-found, distinct from a record that exists but has no links (an empty array).",
        "category": "memory",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:memory"
        ],
        "http": {
          "method": "GET",
          "path": "/api/memory/records/{id}/links"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "links": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "fromId": {
                    "type": "string"
                  },
                  "toId": {
                    "type": "string"
                  },
                  "relation": {
                    "type": "string"
                  },
                  "createdAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "fromId",
                  "toId",
                  "relation",
                  "createdAt"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "links"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "memory.records.list",
        "title": "List Memory Records",
        "description": "Bulk read from the canonical store: a literal (non-semantic) search returning the matching records as a plain array. An empty filter returns every record (getAll). This is the read a client surface uses instead of opening the store file for its browse/list and knowledge-injection paths.",
        "category": "memory",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:memory"
        ],
        "http": {
          "method": "POST",
          "path": "/api/memory/records/list"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "scope": {
              "type": "string",
              "enum": [
                "session",
                "project",
                "team"
              ]
            },
            "cls": {
              "type": "string",
              "enum": [
                "decision",
                "constraint",
                "incident",
                "pattern",
                "fact",
                "risk",
                "runbook",
                "architecture",
                "ownership"
              ]
            },
            "tags": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "query": {
              "type": "string"
            },
            "semantic": {
              "type": "boolean"
            },
            "since": {
              "type": "number"
            },
            "reviewState": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "fresh",
                  "reviewed",
                  "stale",
                  "contradicted"
                ]
              }
            },
            "minConfidence": {
              "type": "number"
            },
            "provenanceKinds": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "session",
                  "turn",
                  "task",
                  "event",
                  "file"
                ]
              }
            },
            "staleOnly": {
              "type": "boolean"
            },
            "limit": {
              "type": "number"
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "records": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "scope": {
                    "type": "string",
                    "enum": [
                      "session",
                      "project",
                      "team"
                    ]
                  },
                  "cls": {
                    "type": "string",
                    "enum": [
                      "decision",
                      "constraint",
                      "incident",
                      "pattern",
                      "fact",
                      "risk",
                      "runbook",
                      "architecture",
                      "ownership"
                    ]
                  },
                  "summary": {
                    "type": "string"
                  },
                  "detail": {
                    "type": "string"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "provenance": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "session",
                            "turn",
                            "task",
                            "event",
                            "file"
                          ]
                        },
                        "ref": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "kind",
                        "ref"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "reviewState": {
                    "type": "string",
                    "enum": [
                      "fresh",
                      "reviewed",
                      "stale",
                      "contradicted"
                    ]
                  },
                  "confidence": {
                    "type": "number"
                  },
                  "reviewedAt": {
                    "type": "number"
                  },
                  "reviewedBy": {
                    "type": "string"
                  },
                  "staleReason": {
                    "type": "string"
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "scope",
                  "cls",
                  "summary",
                  "tags",
                  "provenance",
                  "reviewState",
                  "confidence",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "records"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "memory.records.search",
        "title": "Search Memory Records",
        "description": "Search the canonical store, literal or semantic. When semantic is requested but the semantic index cannot be consulted, the search falls back to a literal scan and states the reason in indexUnavailableReason rather than returning a silent empty result that reads as \"nothing was ever stored\". With recall=true the cross-surface recall-honesty contract is applied: flagged (stale/contradicted) records are excluded outright and records below the 60% confidence floor are dropped, each exclusion counted honestly.",
        "category": "memory",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:memory"
        ],
        "http": {
          "method": "POST",
          "path": "/api/memory/records/search"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "scope": {
              "type": "string",
              "enum": [
                "session",
                "project",
                "team"
              ]
            },
            "cls": {
              "type": "string",
              "enum": [
                "decision",
                "constraint",
                "incident",
                "pattern",
                "fact",
                "risk",
                "runbook",
                "architecture",
                "ownership"
              ]
            },
            "tags": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "query": {
              "type": "string"
            },
            "semantic": {
              "type": "boolean"
            },
            "since": {
              "type": "number"
            },
            "reviewState": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "fresh",
                  "reviewed",
                  "stale",
                  "contradicted"
                ]
              }
            },
            "minConfidence": {
              "type": "number"
            },
            "provenanceKinds": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "session",
                  "turn",
                  "task",
                  "event",
                  "file"
                ]
              }
            },
            "staleOnly": {
              "type": "boolean"
            },
            "limit": {
              "type": "number"
            },
            "recall": {
              "type": "boolean"
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "records": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "scope": {
                    "type": "string",
                    "enum": [
                      "session",
                      "project",
                      "team"
                    ]
                  },
                  "cls": {
                    "type": "string",
                    "enum": [
                      "decision",
                      "constraint",
                      "incident",
                      "pattern",
                      "fact",
                      "risk",
                      "runbook",
                      "architecture",
                      "ownership"
                    ]
                  },
                  "summary": {
                    "type": "string"
                  },
                  "detail": {
                    "type": "string"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "provenance": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "session",
                            "turn",
                            "task",
                            "event",
                            "file"
                          ]
                        },
                        "ref": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "kind",
                        "ref"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "reviewState": {
                    "type": "string",
                    "enum": [
                      "fresh",
                      "reviewed",
                      "stale",
                      "contradicted"
                    ]
                  },
                  "confidence": {
                    "type": "number"
                  },
                  "reviewedAt": {
                    "type": "number"
                  },
                  "reviewedBy": {
                    "type": "string"
                  },
                  "staleReason": {
                    "type": "string"
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "scope",
                  "cls",
                  "summary",
                  "tags",
                  "provenance",
                  "reviewState",
                  "confidence",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            },
            "mode": {
              "type": "string",
              "enum": [
                "literal",
                "semantic"
              ]
            },
            "requestedSemantic": {
              "type": "boolean"
            },
            "indexUnavailableReason": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "caveat": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "recallFiltered": {
              "type": "boolean"
            },
            "excludedFlaggedCount": {
              "type": "number"
            },
            "excludedBelowFloorCount": {
              "type": "number"
            },
            "totalBeforeRecallFilter": {
              "type": "number"
            },
            "recallFloor": {
              "type": "number"
            }
          },
          "required": [
            "records",
            "mode",
            "requestedSemantic",
            "indexUnavailableReason",
            "caveat",
            "recallFiltered",
            "excludedFlaggedCount",
            "excludedBelowFloorCount",
            "totalBeforeRecallFilter",
            "recallFloor"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "memory.records.search-semantic",
        "title": "Semantic Search Memory Records",
        "description": "Rank records by semantic similarity against the query, returning scored results (distance, similarity, score). When the query has no vector match the store falls back to a lexical ranking rather than a silent empty. distance is null for a fallback (non-vector) result. Read-only against the daemon's canonical index.",
        "category": "memory",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:memory"
        ],
        "http": {
          "method": "POST",
          "path": "/api/memory/records/search-semantic"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "scope": {
              "type": "string",
              "enum": [
                "session",
                "project",
                "team"
              ]
            },
            "cls": {
              "type": "string",
              "enum": [
                "decision",
                "constraint",
                "incident",
                "pattern",
                "fact",
                "risk",
                "runbook",
                "architecture",
                "ownership"
              ]
            },
            "tags": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "query": {
              "type": "string"
            },
            "semantic": {
              "type": "boolean"
            },
            "since": {
              "type": "number"
            },
            "reviewState": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "fresh",
                  "reviewed",
                  "stale",
                  "contradicted"
                ]
              }
            },
            "minConfidence": {
              "type": "number"
            },
            "provenanceKinds": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "session",
                  "turn",
                  "task",
                  "event",
                  "file"
                ]
              }
            },
            "staleOnly": {
              "type": "boolean"
            },
            "limit": {
              "type": "number"
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "results": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "record": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "scope": {
                        "type": "string",
                        "enum": [
                          "session",
                          "project",
                          "team"
                        ]
                      },
                      "cls": {
                        "type": "string",
                        "enum": [
                          "decision",
                          "constraint",
                          "incident",
                          "pattern",
                          "fact",
                          "risk",
                          "runbook",
                          "architecture",
                          "ownership"
                        ]
                      },
                      "summary": {
                        "type": "string"
                      },
                      "detail": {
                        "type": "string"
                      },
                      "tags": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "provenance": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "session",
                                "turn",
                                "task",
                                "event",
                                "file"
                              ]
                            },
                            "ref": {
                              "type": "string"
                            },
                            "label": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "ref"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "reviewState": {
                        "type": "string",
                        "enum": [
                          "fresh",
                          "reviewed",
                          "stale",
                          "contradicted"
                        ]
                      },
                      "confidence": {
                        "type": "number"
                      },
                      "reviewedAt": {
                        "type": "number"
                      },
                      "reviewedBy": {
                        "type": "string"
                      },
                      "staleReason": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "updatedAt": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "id",
                      "scope",
                      "cls",
                      "summary",
                      "tags",
                      "provenance",
                      "reviewState",
                      "confidence",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": true
                  },
                  "distance": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "similarity": {
                    "type": "number"
                  },
                  "score": {
                    "type": "number"
                  }
                },
                "required": [
                  "record",
                  "similarity",
                  "score"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "results"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "memory.records.update",
        "title": "Update Memory Record",
        "description": "Edit a record's content fields (scope, summary, detail, tags) and its temporal validity window (validFrom, validUntil) in the canonical store. This is distinct from the review update: it changes the record itself, e.g. moving scope project→team promotes a record to the shared surface. For validFrom/validUntil a number sets the bound, null clears it, and an omitted field leaves it unchanged, so a proposal that changes only the window can be applied. Returns 404 when no record with that id exists.",
        "category": "memory",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:memory"
        ],
        "http": {
          "method": "POST",
          "path": "/api/memory/records/{id}/update"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "scope": {
              "type": "string",
              "enum": [
                "session",
                "project",
                "team"
              ]
            },
            "summary": {
              "type": "string"
            },
            "detail": {
              "type": "string"
            },
            "tags": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "validFrom": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            },
            "validUntil": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "record": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "scope": {
                  "type": "string",
                  "enum": [
                    "session",
                    "project",
                    "team"
                  ]
                },
                "cls": {
                  "type": "string",
                  "enum": [
                    "decision",
                    "constraint",
                    "incident",
                    "pattern",
                    "fact",
                    "risk",
                    "runbook",
                    "architecture",
                    "ownership"
                  ]
                },
                "summary": {
                  "type": "string"
                },
                "detail": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "provenance": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "session",
                          "turn",
                          "task",
                          "event",
                          "file"
                        ]
                      },
                      "ref": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind",
                      "ref"
                    ],
                    "additionalProperties": false
                  }
                },
                "reviewState": {
                  "type": "string",
                  "enum": [
                    "fresh",
                    "reviewed",
                    "stale",
                    "contradicted"
                  ]
                },
                "confidence": {
                  "type": "number"
                },
                "reviewedAt": {
                  "type": "number"
                },
                "reviewedBy": {
                  "type": "string"
                },
                "staleReason": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "scope",
                "cls",
                "summary",
                "tags",
                "provenance",
                "reviewState",
                "confidence",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "record"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "memory.records.update-review",
        "title": "Update Memory Record Review",
        "description": "Update a record's review signal (reviewState, confidence, reviewer, staleReason) in the canonical store. Marking a record stale or contradicted flags it so the recall-honesty contract will never inject it into a prompt again regardless of confidence. Returns 404 when no record with that id exists.",
        "category": "memory",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:memory"
        ],
        "http": {
          "method": "POST",
          "path": "/api/memory/records/{id}/review"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "state": {
              "type": "string",
              "enum": [
                "fresh",
                "reviewed",
                "stale",
                "contradicted"
              ]
            },
            "confidence": {
              "type": "number"
            },
            "reviewedBy": {
              "type": "string"
            },
            "staleReason": {
              "type": "string"
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "record": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "scope": {
                  "type": "string",
                  "enum": [
                    "session",
                    "project",
                    "team"
                  ]
                },
                "cls": {
                  "type": "string",
                  "enum": [
                    "decision",
                    "constraint",
                    "incident",
                    "pattern",
                    "fact",
                    "risk",
                    "runbook",
                    "architecture",
                    "ownership"
                  ]
                },
                "summary": {
                  "type": "string"
                },
                "detail": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "provenance": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "session",
                          "turn",
                          "task",
                          "event",
                          "file"
                        ]
                      },
                      "ref": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind",
                      "ref"
                    ],
                    "additionalProperties": false
                  }
                },
                "reviewState": {
                  "type": "string",
                  "enum": [
                    "fresh",
                    "reviewed",
                    "stale",
                    "contradicted"
                  ]
                },
                "confidence": {
                  "type": "number"
                },
                "reviewedAt": {
                  "type": "number"
                },
                "reviewedBy": {
                  "type": "string"
                },
                "staleReason": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "scope",
                "cls",
                "summary",
                "tags",
                "provenance",
                "reviewState",
                "confidence",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "record"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "memory.review-queue",
        "title": "Memory Review Queue",
        "description": "Return memory records prioritised for review. Accepts optional limit (?limit=N) and scope filter (?scope=session|project|team). A scope query parameter that is present but not one of the three valid values returns 400.",
        "category": "memory",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:memory"
        ],
        "http": {
          "method": "GET",
          "path": "/api/memory/review-queue"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "number"
            },
            "scope": {
              "type": "string",
              "enum": [
                "session",
                "project",
                "team"
              ]
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "records": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {},
                "additionalProperties": true
              }
            }
          },
          "required": [
            "records"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "memory.vector.rebuild",
        "title": "Rebuild Memory Vector Index",
        "description": "Rebuild the sqlite-vec vector index.",
        "category": "memory",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:memory"
        ],
        "http": {
          "method": "POST",
          "path": "/api/memory/vector/rebuild"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "vector": {
              "type": "object",
              "properties": {
                "backend": {
                  "type": "string",
                  "enum": [
                    "sqlite-vec"
                  ]
                },
                "enabled": {
                  "type": "boolean"
                },
                "available": {
                  "type": "boolean"
                },
                "path": {
                  "type": "string"
                },
                "dimensions": {
                  "type": "number"
                },
                "indexedRecords": {
                  "type": "number"
                },
                "embeddingProviderId": {
                  "type": "string"
                },
                "embeddingProviderLabel": {
                  "type": "string"
                },
                "error": {
                  "type": "string"
                },
                "platformLimitReason": {
                  "type": "string"
                }
              },
              "required": [
                "backend",
                "enabled",
                "available",
                "path",
                "dimensions",
                "indexedRecords",
                "embeddingProviderId",
                "embeddingProviderLabel"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "vector"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "memory.vector.stats",
        "title": "Memory Vector Stats",
        "description": "Return the current sqlite-vec vector-store posture.",
        "category": "memory",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:memory"
        ],
        "http": {
          "method": "GET",
          "path": "/api/memory/vector"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "vector": {
              "type": "object",
              "properties": {
                "backend": {
                  "type": "string",
                  "enum": [
                    "sqlite-vec"
                  ]
                },
                "enabled": {
                  "type": "boolean"
                },
                "available": {
                  "type": "boolean"
                },
                "path": {
                  "type": "string"
                },
                "dimensions": {
                  "type": "number"
                },
                "indexedRecords": {
                  "type": "number"
                },
                "embeddingProviderId": {
                  "type": "string"
                },
                "embeddingProviderLabel": {
                  "type": "string"
                },
                "error": {
                  "type": "string"
                },
                "platformLimitReason": {
                  "type": "string"
                }
              },
              "required": [
                "backend",
                "enabled",
                "available",
                "path",
                "dimensions",
                "indexedRecords",
                "embeddingProviderId",
                "embeddingProviderLabel"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "vector"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "occasions.acknowledge",
        "title": "Acknowledge An Occasion",
        "description": "Record that the owner has one occurrence in hand, so nothing is pushed at them about it again. This is not a yes and not a no: the open item STAYS OPEN and stays enumerable, so occasions.pending still lists it, under acknowledged[] rather than in the nudge, and asking what is coming up still answers with it. Only the push stops. The record expires with its occurrence, so next year asks fresh. source names how it was recorded: conversation when the owner said so in a reply, explicit when a surface offered the action, gift-flow when the owner is already answering gift questions about it.",
        "category": "occasions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:occasions"
        ],
        "http": {
          "method": "POST",
          "path": "/api/occasions/acknowledge"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "occasionId": {
              "type": "string"
            },
            "source": {
              "type": "string",
              "enum": [
                "conversation",
                "explicit",
                "gift-flow"
              ]
            },
            "occurrence": {
              "type": "string"
            }
          },
          "required": [
            "occasionId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "reason": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "reply": {
              "type": "string"
            }
          },
          "required": [
            "ok",
            "reason",
            "reply"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "occasions.answer",
        "title": "Answer An Occasion Nudge",
        "description": "Record yes, no or later for one occurrence. A no goes silent for the rest of this cycle and expires with the date, so next year asks fresh carrying no memory of the refusal. A later is NOT a decline, it comes back roughly halfway to the date. A yes on a gift-giving occasion opens the short interview and returns its first question. All three RESOLVE the open item and remove it; to say only \"I have this in hand\" without ending the question, use occasions.acknowledge instead.",
        "category": "occasions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:occasions"
        ],
        "http": {
          "method": "POST",
          "path": "/api/occasions/answer"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "occasionId": {
              "type": "string"
            },
            "answer": {
              "type": "string",
              "enum": [
                "yes",
                "no",
                "later",
                "acknowledged"
              ]
            },
            "occurrence": {
              "type": "string"
            }
          },
          "required": [
            "occasionId",
            "answer"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "reason": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "interview": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "interviewId": {
                      "type": "string"
                    },
                    "occasionId": {
                      "type": "string"
                    },
                    "occurrence": {
                      "type": "string"
                    },
                    "steps": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "prompt": {
                            "type": "string"
                          },
                          "opensFrom": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "prompt",
                          "opensFrom"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "nextStep": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "prompt": {
                              "type": "string"
                            },
                            "opensFrom": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "prompt",
                            "opensFrom"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "complete": {
                      "type": "boolean"
                    },
                    "landedOn": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "interviewId",
                    "occasionId",
                    "occurrence",
                    "steps",
                    "nextStep",
                    "complete",
                    "landedOn"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "ok",
            "reason",
            "interview"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "occasions.confirm",
        "title": "Record A Confirmed Important Date",
        "description": "Write the confirmed occasion as one line in the owner profile, under Important dates, carrying its provenance. This is the ONE confirmation: nothing re-confirms at nudge time, because for an annual date a silent write means the mistake surfaces up to eleven months later. Refused without a kind rather than defaulting one. Goes through the owner-profile write gate, so authority, surface and a verbatim quote of what the owner said are all required.",
        "category": "occasions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:occasions"
        ],
        "http": {
          "method": "POST",
          "path": "/api/occasions/confirm"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "date": {
              "type": "string"
            },
            "kind": {
              "type": "string",
              "enum": [
                "gift-giving",
                "remember-only",
                "neither"
              ]
            },
            "person": {
              "type": "string"
            },
            "recurrence": {
              "type": "string",
              "enum": [
                "annual",
                "once"
              ]
            },
            "leadDays": {
              "type": "number"
            },
            "surface": {
              "type": "string"
            },
            "said": {
              "type": "string"
            },
            "authority": {
              "type": "string"
            }
          },
          "required": [
            "title",
            "date",
            "kind",
            "surface",
            "said",
            "authority"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "reason": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occasionId": {
              "type": "string"
            },
            "disclosure": {
              "type": "string"
            },
            "droppedRecords": {
              "type": "number"
            }
          },
          "required": [
            "ok",
            "reason",
            "occasionId",
            "disclosure",
            "droppedRecords"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "occasions.conflict.resolve",
        "title": "Close A Date Conflict",
        "description": "Stop re-raising a conflict the owner has dealt with. The conflict itself is never resolved automatically, two different dates for one thing means only the owner knows which was right, and silently taking the newer value is the behaviour this exists to prevent.",
        "category": "occasions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:occasions"
        ],
        "http": {
          "method": "POST",
          "path": "/api/occasions/conflict/resolve"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "occasionId": {
              "type": "string"
            }
          },
          "required": [
            "occasionId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "occasionId": {
              "type": "string"
            },
            "resolved": {
              "type": "boolean"
            }
          },
          "required": [
            "occasionId",
            "resolved"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "occasions.gifts",
        "title": "List Gift History",
        "description": "Return what the owner landed on for one occasion in previous years, newest first. Kept beyond the answers deliberately: the answers expire with their date so next year asks fresh, the history does not.",
        "category": "occasions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:occasions"
        ],
        "http": {
          "method": "POST",
          "path": "/api/occasions/gifts"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "occasionId": {
              "type": "string"
            }
          },
          "required": [
            "occasionId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "occasionId": {
              "type": "string"
            },
            "gifts": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "occasionId": {
                    "type": "string"
                  },
                  "occurrence": {
                    "type": "string"
                  },
                  "recordedAt": {
                    "type": "number"
                  },
                  "landedOn": {
                    "type": "string"
                  },
                  "notes": {
                    "type": "string"
                  }
                },
                "required": [
                  "occasionId",
                  "occurrence",
                  "recordedAt",
                  "landedOn"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "occasionId",
            "gifts"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "occasions.interview.answer",
        "title": "Answer A Gift Interview Question",
        "description": "Record one answer and return the next question, if there is one. The interview guides the owner to their own idea and never recommends a gift, that judgement is the owner's, which is also why the outcome recorded is what the owner landed on rather than what was suggested.",
        "category": "occasions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:occasions"
        ],
        "http": {
          "method": "POST",
          "path": "/api/occasions/interview/answer"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "interviewId": {
              "type": "string"
            },
            "stepId": {
              "type": "string"
            },
            "text": {
              "type": "string"
            }
          },
          "required": [
            "interviewId",
            "stepId",
            "text"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "present": {
              "type": "boolean"
            },
            "interview": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "interviewId": {
                      "type": "string"
                    },
                    "occasionId": {
                      "type": "string"
                    },
                    "occurrence": {
                      "type": "string"
                    },
                    "steps": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "prompt": {
                            "type": "string"
                          },
                          "opensFrom": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "prompt",
                          "opensFrom"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "nextStep": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "prompt": {
                              "type": "string"
                            },
                            "opensFrom": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "prompt",
                            "opensFrom"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "complete": {
                      "type": "boolean"
                    },
                    "landedOn": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "interviewId",
                    "occasionId",
                    "occurrence",
                    "steps",
                    "nextStep",
                    "complete",
                    "landedOn"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "present",
            "interview"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "occasions.interview.get",
        "title": "Get Gift Interview",
        "description": "Return one gift interview and the question that has not been answered yet. A thread the owner walked away from resumes here rather than restarting: the next step is the one the owner did not get to. Over a channel the steps are asked one at a time; in the agent they can be one exchange.",
        "category": "occasions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:occasions"
        ],
        "http": {
          "method": "POST",
          "path": "/api/occasions/interview"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "interviewId": {
              "type": "string"
            }
          },
          "required": [
            "interviewId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "present": {
              "type": "boolean"
            },
            "interview": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "interviewId": {
                      "type": "string"
                    },
                    "occasionId": {
                      "type": "string"
                    },
                    "occurrence": {
                      "type": "string"
                    },
                    "steps": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "prompt": {
                            "type": "string"
                          },
                          "opensFrom": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "prompt",
                          "opensFrom"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "nextStep": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "prompt": {
                              "type": "string"
                            },
                            "opensFrom": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "prompt",
                            "opensFrom"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "complete": {
                      "type": "boolean"
                    },
                    "landedOn": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "interviewId",
                    "occasionId",
                    "occurrence",
                    "steps",
                    "nextStep",
                    "complete",
                    "landedOn"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "present",
            "interview"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "occasions.interview.record",
        "title": "Record What The Owner Landed On",
        "description": "Close the interview with what the owner settled on and write it to the gift history. Recording the outcome rather than merely that the owner said yes is the point: \"said yes in 2026\" cannot stop year three steering where year one did.",
        "category": "occasions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:occasions"
        ],
        "http": {
          "method": "POST",
          "path": "/api/occasions/interview/record"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "interviewId": {
              "type": "string"
            },
            "landedOn": {
              "type": "string"
            }
          },
          "required": [
            "interviewId",
            "landedOn"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "present": {
              "type": "boolean"
            },
            "interview": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "interviewId": {
                      "type": "string"
                    },
                    "occasionId": {
                      "type": "string"
                    },
                    "occurrence": {
                      "type": "string"
                    },
                    "steps": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "prompt": {
                            "type": "string"
                          },
                          "opensFrom": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "prompt",
                          "opensFrom"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "nextStep": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "prompt": {
                              "type": "string"
                            },
                            "opensFrom": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "prompt",
                            "opensFrom"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "complete": {
                      "type": "boolean"
                    },
                    "landedOn": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "interviewId",
                    "occasionId",
                    "occurrence",
                    "steps",
                    "nextStep",
                    "complete",
                    "landedOn"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "present",
            "interview"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "occasions.list",
        "title": "List Important Dates",
        "description": "Return every occasion declared in the owner profile, with its next occurrence, how many days away it is, the lead it uses, whether it is inside its lead window, and what was answered for that occurrence. Also returns lines under the heading that could not be typed, each with the reason, and any occasion that has two different dates recorded. This carries the dates: it is the owner asking their own system what it holds, which is the explicit ask that unlocks a closed-tier read. A nudge never does.",
        "category": "occasions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:occasions"
        ],
        "http": {
          "method": "GET",
          "path": "/api/occasions"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "today": {
              "type": "string"
            },
            "timezone": {
              "type": "string"
            },
            "occasions": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "occasion": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "date": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "recurring",
                              "dated"
                            ]
                          },
                          "year": {
                            "type": "number"
                          },
                          "month": {
                            "type": "number"
                          },
                          "day": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "kind",
                          "month",
                          "day"
                        ],
                        "additionalProperties": false
                      },
                      "recurrence": {
                        "type": "string",
                        "enum": [
                          "annual",
                          "once"
                        ]
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "gift-giving",
                          "remember-only",
                          "neither"
                        ]
                      },
                      "person": {
                        "type": "string"
                      },
                      "selfDeclared": {
                        "type": "boolean"
                      },
                      "subject": {
                        "type": "string",
                        "enum": [
                          "owner",
                          "other",
                          "unattributed"
                        ]
                      },
                      "leadDays": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "mirrored": {
                        "type": "boolean"
                      },
                      "extras": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "lineIndex": {
                        "type": "number"
                      },
                      "text": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "title",
                      "date",
                      "recurrence",
                      "kind",
                      "person",
                      "selfDeclared",
                      "subject",
                      "leadDays",
                      "mirrored",
                      "extras",
                      "lineIndex",
                      "text"
                    ],
                    "additionalProperties": false
                  },
                  "nextOccurrence": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "daysUntil": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "leadDays": {
                    "type": "number"
                  },
                  "inLeadWindow": {
                    "type": "boolean"
                  },
                  "answer": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "yes",
                          "no",
                          "later",
                          "acknowledged"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "mirrored": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "occasion",
                  "nextOccurrence",
                  "daysUntil",
                  "leadDays",
                  "inLeadWindow",
                  "answer",
                  "mirrored"
                ],
                "additionalProperties": false
              }
            },
            "unparsed": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "lineIndex": {
                    "type": "number"
                  },
                  "text": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string"
                  }
                },
                "required": [
                  "lineIndex",
                  "text",
                  "reason"
                ],
                "additionalProperties": false
              }
            },
            "conflicts": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "occasionId": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "dates": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "lineIndexes": {
                    "type": "array",
                    "items": {
                      "type": "number"
                    }
                  }
                },
                "required": [
                  "occasionId",
                  "title",
                  "dates",
                  "lineIndexes"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "today",
            "timezone",
            "occasions",
            "unparsed",
            "conflicts"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "occasions.pending",
        "title": "Pull Outstanding Occasions",
        "description": "Return everything unresolved, without delivering anything: the batched nudge, any date conflict still open, and any interview left mid-thread. This is how a surface that is not a push destination receives a nudge, it pulls at the start of a turn rather than being pushed at, and a stored date is the prior scheduling that permits raising something unprompted. A nudge a push has already landed on the agent is left out while the agent is a configured push destination, so the push and the pull cannot raise the same thing twice; an item no push has ever landed there is still returned, so a missing sender or a failed send loses nothing. The nudge names the occasion and the person and NEVER the date: proximity is a word, not a count of days.",
        "category": "occasions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:occasions"
        ],
        "http": {
          "method": "GET",
          "path": "/api/occasions/pending"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "today": {
              "type": "string"
            },
            "nudge": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "raisedAt": {
                      "type": "number"
                    },
                    "subjects": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "occasionId": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "person": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "gift-giving",
                              "remember-only",
                              "neither"
                            ]
                          },
                          "proximity": {
                            "type": "string",
                            "enum": [
                              "approaching",
                              "soon",
                              "imminent"
                            ]
                          },
                          "subject": {
                            "type": "string",
                            "enum": [
                              "owner",
                              "other",
                              "unattributed"
                            ]
                          },
                          "acknowledged": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "occasionId",
                          "title",
                          "person",
                          "kind",
                          "proximity",
                          "subject",
                          "acknowledged"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "message": {
                      "type": "string"
                    },
                    "answerable": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "raisedAt",
                    "subjects",
                    "message",
                    "answerable"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "conflicts": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "occasionId": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "occasionId",
                  "message"
                ],
                "additionalProperties": false
              }
            },
            "acknowledged": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "occasionId": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "person": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "gift-giving",
                      "remember-only",
                      "neither"
                    ]
                  },
                  "proximity": {
                    "type": "string",
                    "enum": [
                      "approaching",
                      "soon",
                      "imminent"
                    ]
                  },
                  "subject": {
                    "type": "string",
                    "enum": [
                      "owner",
                      "other",
                      "unattributed"
                    ]
                  },
                  "acknowledged": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "occasionId",
                  "title",
                  "person",
                  "kind",
                  "proximity",
                  "subject",
                  "acknowledged"
                ],
                "additionalProperties": false
              }
            },
            "interviews": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "interviewId": {
                    "type": "string"
                  },
                  "occasionId": {
                    "type": "string"
                  },
                  "occurrence": {
                    "type": "string"
                  },
                  "steps": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "prompt": {
                          "type": "string"
                        },
                        "opensFrom": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "prompt",
                        "opensFrom"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "nextStep": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "prompt": {
                            "type": "string"
                          },
                          "opensFrom": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "prompt",
                          "opensFrom"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "complete": {
                    "type": "boolean"
                  },
                  "landedOn": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "interviewId",
                  "occasionId",
                  "occurrence",
                  "steps",
                  "nextStep",
                  "complete",
                  "landedOn"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "today",
            "nudge",
            "acknowledged",
            "conflicts",
            "interviews"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "occasions.plans.confirm",
        "title": "Record A Confirmed Plan",
        "description": "Write the confirmed plan as one line in the owner profile, under Plans, carrying its provenance. Same one-confirmation rule and the same owner-profile write gate as an occasion.",
        "category": "occasions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:occasions"
        ],
        "http": {
          "method": "POST",
          "path": "/api/occasions/plans/confirm"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "from": {
              "type": "string"
            },
            "to": {
              "type": "string"
            },
            "away": {
              "type": "boolean"
            },
            "destination": {
              "type": "string"
            },
            "surface": {
              "type": "string"
            },
            "said": {
              "type": "string"
            },
            "authority": {
              "type": "string"
            }
          },
          "required": [
            "title",
            "from",
            "to",
            "surface",
            "said",
            "authority"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "reason": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occasionId": {
              "type": "string"
            },
            "disclosure": {
              "type": "string"
            },
            "droppedRecords": {
              "type": "number"
            }
          },
          "required": [
            "ok",
            "reason",
            "occasionId",
            "disclosure",
            "droppedRecords"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "occasions.plans.list",
        "title": "List Plans",
        "description": "Return every plan declared in the owner profile, a dated range with attributes, plus whichever one has the owner away today. Plans are ambient: they never prompt. They exist so the system knows not to suggest things into that window, and so a nudge that would land while the owner is abroad moves to the day before they leave.",
        "category": "occasions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:occasions"
        ],
        "http": {
          "method": "GET",
          "path": "/api/occasions/plans"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "today": {
              "type": "string"
            },
            "plans": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "from": {
                    "type": "string"
                  },
                  "to": {
                    "type": "string"
                  },
                  "away": {
                    "type": "boolean"
                  },
                  "destination": {
                    "type": "string"
                  },
                  "extras": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "lineIndex": {
                    "type": "number"
                  },
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "title",
                  "from",
                  "to",
                  "away",
                  "destination",
                  "extras",
                  "lineIndex",
                  "text"
                ],
                "additionalProperties": false
              }
            },
            "unparsed": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "lineIndex": {
                    "type": "number"
                  },
                  "text": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string"
                  }
                },
                "required": [
                  "lineIndex",
                  "text",
                  "reason"
                ],
                "additionalProperties": false
              }
            },
            "awayNow": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "from": {
                      "type": "string"
                    },
                    "to": {
                      "type": "string"
                    },
                    "away": {
                      "type": "boolean"
                    },
                    "destination": {
                      "type": "string"
                    },
                    "extras": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "lineIndex": {
                      "type": "number"
                    },
                    "text": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "from",
                    "to",
                    "away",
                    "destination",
                    "extras",
                    "lineIndex",
                    "text"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "today",
            "plans",
            "unparsed",
            "awayNow"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "occasions.plans.propose",
        "title": "Propose A Plan",
        "description": "Work out what would be written for a plan heard in conversation, and return the one-line confirmation. Writes nothing. Away is opt-in rather than assumed: \"the kitchen is being redone, 3rd to the 10th\" is a real dated range that is not the owner leaving the house.",
        "category": "occasions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:occasions"
        ],
        "http": {
          "method": "POST",
          "path": "/api/occasions/plans/propose"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "from": {
              "type": "string"
            },
            "to": {
              "type": "string"
            },
            "away": {
              "type": "boolean"
            },
            "destination": {
              "type": "string"
            }
          },
          "required": [
            "title",
            "from",
            "to"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "reason": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "line": {
              "type": "string"
            },
            "confirmation": {
              "type": "string"
            },
            "needsKind": {
              "type": "boolean"
            },
            "conflictsWith": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "ok",
            "reason",
            "line",
            "confirmation",
            "needsKind",
            "conflictsWith"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "occasions.propose",
        "title": "Propose An Important Date",
        "description": "Work out what would be written for a date heard in conversation, and return the one-line confirmation to put to the owner. WRITES NOTHING. When no kind was given, needsKind is true and the confirmation asks for it in the same breath, the kind is the owner's choice and is never inferred, because no rule that reads a label tells a birthday from a death anniversary. Any date already recorded for the same name that disagrees comes back in conflictsWith.",
        "category": "occasions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:occasions"
        ],
        "http": {
          "method": "POST",
          "path": "/api/occasions/propose"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "date": {
              "type": "string"
            },
            "kind": {
              "type": "string",
              "enum": [
                "gift-giving",
                "remember-only",
                "neither"
              ]
            },
            "person": {
              "type": "string"
            },
            "recurrence": {
              "type": "string",
              "enum": [
                "annual",
                "once"
              ]
            },
            "leadDays": {
              "type": "number"
            }
          },
          "required": [
            "title",
            "date"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "reason": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "line": {
              "type": "string"
            },
            "confirmation": {
              "type": "string"
            },
            "needsKind": {
              "type": "boolean"
            },
            "conflictsWith": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "ok",
            "reason",
            "line",
            "confirmation",
            "needsKind",
            "conflictsWith"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "occasions.remove",
        "title": "Remove An Important Date",
        "description": "Remove one occasion and every record the machine kept against it, answers, gift history, open items, interviews and calendar mirrors. Takes exactly one confirmation: not unquestioned, and not an argument. People divorce and people die. A confirmed:false call returns the sentence to put to the owner and removes nothing.",
        "category": "occasions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:occasions"
        ],
        "http": {
          "method": "POST",
          "path": "/api/occasions/remove"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "occasionId": {
              "type": "string"
            },
            "confirmed": {
              "type": "boolean"
            },
            "authority": {
              "type": "string"
            }
          },
          "required": [
            "occasionId",
            "confirmed",
            "authority"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "reason": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occasionId": {
              "type": "string"
            },
            "disclosure": {
              "type": "string"
            },
            "droppedRecords": {
              "type": "number"
            }
          },
          "required": [
            "ok",
            "reason",
            "occasionId",
            "disclosure",
            "droppedRecords"
          ],
          "additionalProperties": false
        },
        "dangerous": true,
        "invokable": true
      },
      {
        "id": "occasions.state",
        "title": "Occasions State Disclosure",
        "description": "What the machine-owned store is holding, counts of answers, gift records, open items, interviews and calendar mirrors, plus what the last housekeeping pass removed and why, and whether the file was found unreadable. Counts and reasons only: no answer, no gift and no date is returned, which is what makes this safe in a support bundle.",
        "category": "occasions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:occasions"
        ],
        "http": {
          "method": "GET",
          "path": "/api/occasions/state"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "acknowledgements": {
              "type": "number"
            },
            "giftRecords": {
              "type": "number"
            },
            "openItems": {
              "type": "number"
            },
            "interviews": {
              "type": "number"
            },
            "mirrors": {
              "type": "number"
            },
            "lastSweep": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "sweptAt": {
                      "type": "number"
                    },
                    "expiredAcknowledgements": {
                      "type": "number"
                    },
                    "orphanedRecords": {
                      "type": "number"
                    },
                    "expiredOpenItems": {
                      "type": "number"
                    },
                    "agedGiftRecords": {
                      "type": "number"
                    },
                    "droppedInterviews": {
                      "type": "number"
                    },
                    "staleMirrors": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "sweptAt",
                    "expiredAcknowledgements",
                    "orphanedRecords",
                    "expiredOpenItems",
                    "agedGiftRecords",
                    "droppedInterviews",
                    "staleMirrors"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "reconciledOpenItems": {
              "type": "number"
            },
            "corruption": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "path",
            "acknowledgements",
            "giftRecords",
            "openItems",
            "interviews",
            "mirrors",
            "lastSweep",
            "reconciledOpenItems",
            "corruption"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "occasions.sweep",
        "title": "Run The Approach Sweep Now",
        "description": "Run one pass immediately: reap expired and orphaned state, find the occasions entering their lead window, batch them into a single message, mirror to the calendar if that is on, and deliver. Delivery goes to every destination in occasions.nudgeChannel, a comma-separated list, so Telegram and the agent both get it, and each is attempted independently, with deliveries[] naming per destination what landed and what did not. Housekeeping runs first and unconditionally, so a machine with nudging turned off still reaps. Returns hold:\"quiet-hours\" or hold:\"disabled\" when it deliberately said nothing, nothing is dropped, it waits.",
        "category": "occasions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:occasions"
        ],
        "http": {
          "method": "POST",
          "path": "/api/occasions/sweep"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ranAt": {
              "type": "number"
            },
            "today": {
              "type": "string"
            },
            "hold": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "nudge": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "raisedAt": {
                      "type": "number"
                    },
                    "subjects": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "occasionId": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "person": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "gift-giving",
                              "remember-only",
                              "neither"
                            ]
                          },
                          "proximity": {
                            "type": "string",
                            "enum": [
                              "approaching",
                              "soon",
                              "imminent"
                            ]
                          },
                          "subject": {
                            "type": "string",
                            "enum": [
                              "owner",
                              "other",
                              "unattributed"
                            ]
                          },
                          "acknowledged": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "occasionId",
                          "title",
                          "person",
                          "kind",
                          "proximity",
                          "subject",
                          "acknowledged"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "message": {
                      "type": "string"
                    },
                    "answerable": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "raisedAt",
                    "subjects",
                    "message",
                    "answerable"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "conflictMessages": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "resumedInterviews": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "delivered": {
              "type": "boolean"
            },
            "deliveryChannel": {
              "type": "string"
            },
            "deliveryId": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "deliveries": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "channel": {
                    "type": "string"
                  },
                  "delivered": {
                    "type": "boolean"
                  },
                  "deliveryId": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "failure": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "channel",
                  "delivered",
                  "deliveryId",
                  "failure"
                ],
                "additionalProperties": false
              }
            },
            "mirrored": {
              "type": "number"
            },
            "housekeeping": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "sweptAt": {
                      "type": "number"
                    },
                    "expiredAcknowledgements": {
                      "type": "number"
                    },
                    "orphanedRecords": {
                      "type": "number"
                    },
                    "expiredOpenItems": {
                      "type": "number"
                    },
                    "agedGiftRecords": {
                      "type": "number"
                    },
                    "droppedInterviews": {
                      "type": "number"
                    },
                    "staleMirrors": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "sweptAt",
                    "expiredAcknowledgements",
                    "orphanedRecords",
                    "expiredOpenItems",
                    "agedGiftRecords",
                    "droppedInterviews",
                    "staleMirrors"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "ranAt",
            "today",
            "hold",
            "nudge",
            "conflictMessages",
            "resumedInterviews",
            "delivered",
            "deliveryChannel",
            "deliveryId",
            "deliveries",
            "mirrored",
            "housekeeping"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "pairing.handoff.complete",
        "title": "Complete Pairing Hand-off",
        "description": "Apply the surface's per-offer decisions in ONE pass: an accepted notifications offer registers the browser push subscription (endpoint + keys, optional deviceId), an accepted passkey offer registers the WebAuthn credential, an accepted relay offer is acknowledged. Each offer returns an honest per-offer result (completed / declined / unavailable / failed); an omitted or false offer is reported as declined, never silently half-applied.",
        "category": "pairing",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:control-plane"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "accept": {
              "type": "object",
              "properties": {
                "notifications": {
                  "type": "object",
                  "properties": {
                    "endpoint": {
                      "type": "string"
                    },
                    "keys": {
                      "type": "object",
                      "properties": {
                        "p256dh": {
                          "type": "string"
                        },
                        "auth": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "p256dh",
                        "auth"
                      ],
                      "additionalProperties": false
                    },
                    "deviceId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "endpoint",
                    "keys"
                  ],
                  "additionalProperties": false
                },
                "relay": {
                  "type": "boolean"
                },
                "passkey": {
                  "type": "object",
                  "properties": {
                    "rpId": {
                      "type": "string"
                    },
                    "origin": {
                      "type": "string"
                    },
                    "credentialId": {
                      "type": "string"
                    },
                    "publicKeyCose": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "rpId",
                    "origin",
                    "credentialId",
                    "publicKeyCose"
                  ],
                  "additionalProperties": false
                }
              },
              "additionalProperties": false
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "results": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  },
                  "detail": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "status"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "results"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "pairing.handoff.create",
        "title": "Create Pairing Hand-off",
        "description": "Mint a per-device token AND assemble the set-up OFFER SET this daemon can satisfy (notifications, carrying the VAPID public key; relay; passkey step-up), so a freshly-paired surface can complete them in one pass. Returns the offer set, the `#pair=<token>` deep-link fragment (the exact URL-fragment shape the web app consumes, token in `pair=`, offers in `offers=`), a full deep link when a web origin is configured, and that origin's honest TLS/capability POSTURE: the one plain-http-on-LAN notice line (stated here, never a nag) plus per-capability availability labels so surfaces render \"needs https, available via tailscale\" instead of dead buttons. The token secret is returned exactly once. Each offer is independently declinable at completion.",
        "category": "pairing",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:control-plane"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "offers": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "name"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "token": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "token": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "name",
                "token",
                "createdAt"
              ],
              "additionalProperties": false
            },
            "offers": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string"
                  },
                  "available": {
                    "type": "boolean"
                  },
                  "vapidPublicKey": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "available"
                ],
                "additionalProperties": false
              }
            },
            "fragment": {
              "type": "string"
            },
            "deepLink": {
              "type": "string"
            },
            "posture": {
              "type": "object",
              "properties": {
                "origin": {
                  "type": "string"
                },
                "scheme": {
                  "type": "string"
                },
                "privateNetwork": {
                  "type": "boolean"
                },
                "secureContext": {
                  "type": "boolean"
                },
                "notice": {
                  "type": "string"
                },
                "capabilities": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "capability": {
                        "type": "string"
                      },
                      "available": {
                        "type": "boolean"
                      },
                      "reason": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "capability",
                      "available"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "origin",
                "scheme",
                "privateNetwork",
                "secureContext",
                "capabilities"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "token",
            "offers",
            "fragment"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "pairing.posture.get",
        "title": "Get Origin TLS/Capability Posture",
        "description": "The honest TLS/capability posture of a web origin, pass your surface's current origin (or omit it to read the configured web origin). Plain http on a private-network origin (LAN IP, .local, localhost) is a supported posture reported with its ONE notice line; browser-gated capabilities (service worker/PWA install, push, microphone) are each labeled available or \"needs https, available via tailscale\" so surfaces render labels instead of dead buttons. Localhost keeps all three. The daemon never mints certificates.",
        "category": "pairing",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "read:control-plane"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "origin": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "posture": {
              "type": "object",
              "properties": {
                "origin": {
                  "type": "string"
                },
                "scheme": {
                  "type": "string"
                },
                "privateNetwork": {
                  "type": "boolean"
                },
                "secureContext": {
                  "type": "boolean"
                },
                "notice": {
                  "type": "string"
                },
                "capabilities": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "capability": {
                        "type": "string"
                      },
                      "available": {
                        "type": "boolean"
                      },
                      "reason": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "capability",
                      "available"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "origin",
                "scheme",
                "privateNetwork",
                "secureContext",
                "capabilities"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "posture"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "pairing.tokens.create",
        "title": "Mint Paired Device Token",
        "description": "Mint a new named per-device operator token and return its plaintext secret EXACTLY ONCE (for a QR / pairing hand-off). Only a hash is persisted; the secret is never listed or returned again. The name is user-visible and editable.",
        "category": "pairing",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:control-plane"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            }
          },
          "required": [
            "name"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "token": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "token": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "name",
                "token",
                "createdAt"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "token"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "pairing.tokens.delete",
        "title": "Revoke Paired Device Token",
        "description": "Revoke (permanently delete) one paired device token. Revocation is immediate: the token fails the very next request with a 401, and every OTHER paired device keeps working. An unknown id is a 404 PAIRING_TOKEN_NOT_FOUND, never a 200-noop.",
        "category": "pairing",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:control-plane"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "revoked": {
              "type": "boolean"
            }
          },
          "required": [
            "id",
            "revoked"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "pairing.tokens.list",
        "title": "List Paired Device Tokens",
        "description": "List the per-pairing operator tokens (paired devices/browsers) as redacted views: id, user-visible name, created timestamp, and last-seen timestamp. The token secret is never stored in listable form and is never returned.",
        "category": "pairing",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "read:control-plane"
        ],
        "outputSchema": {
          "type": "object",
          "properties": {
            "tokens": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "lastSeenAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "name",
                  "createdAt"
                ],
                "additionalProperties": false
              }
            },
            "legacySharedRevoked": {
              "type": "boolean"
            }
          },
          "required": [
            "tokens",
            "legacySharedRevoked"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "pairing.tokens.migrate",
        "title": "Migrate Off The Shared Token",
        "description": "A client currently authenticated with the legacy single shared token mints its OWN named per-device token and receives the plaintext secret once, the honest migration path. This does NOT revoke the shared token; that is a separate explicit step (pairing.tokens.revokeShared).",
        "category": "pairing",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:control-plane"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            }
          },
          "required": [
            "name"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "token": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "token": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "name",
                "token",
                "createdAt"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "token"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "pairing.tokens.rename",
        "title": "Rename Paired Device Token",
        "description": "Change the user-visible name of a paired device token. An unknown id is a 404 PAIRING_TOKEN_NOT_FOUND.",
        "category": "pairing",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:control-plane"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "name": {
              "type": "string"
            }
          },
          "required": [
            "id",
            "name"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "renamed": {
              "type": "boolean"
            }
          },
          "required": [
            "id",
            "renamed"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "pairing.tokens.revokeShared",
        "title": "Revoke The Legacy Shared Token",
        "description": "Turn off the legacy single shared operator token. After this, only per-device pairing tokens (and user sessions) authenticate; the shared token stops working immediately. Idempotent.",
        "category": "pairing",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:control-plane"
        ],
        "outputSchema": {
          "type": "object",
          "properties": {
            "legacySharedRevoked": {
              "type": "boolean"
            }
          },
          "required": [
            "legacySharedRevoked"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "panels.list",
        "title": "List Panels",
        "description": "Return integration panel descriptors.",
        "category": "panels",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:panels"
        ],
        "http": {
          "method": "GET",
          "path": "/api/panels"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "panels": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "category": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "open": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "id",
                  "name",
                  "category",
                  "description",
                  "open"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "panels"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "panels.open",
        "title": "Open Panel",
        "description": "Request that a panel be opened in the current TUI session.",
        "category": "panels",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:panels"
        ],
        "http": {
          "method": "POST",
          "path": "/api/panels/open"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "pane": {
              "type": "string"
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "opened": {
              "type": "boolean"
            },
            "id": {
              "type": "string"
            },
            "pane": {
              "type": "string",
              "enum": [
                "top",
                "bottom"
              ]
            }
          },
          "required": [
            "opened",
            "id",
            "pane"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "payments.budget.status",
        "title": "Payment Budget Status",
        "description": "Today's spending pools: the daily item budget, the separate overage budget that covers only unavoidable charges (tax, mandatory fees, and the delivery option actually used), and the tolerance allowance. Each reports its limit, what today has spent, what purchases in flight are holding, and what is left. Includes the calendar day and the timezone it was computed in, the day resets at midnight in daemon.timezone, UTC when unset, and whether this node is the one currently allowed to spend. Totals are recomputed from each spend record's UTC instant rather than counted, so changing the timezone cannot hand back a spent budget.",
        "category": "payments",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:payments"
        ],
        "http": {
          "method": "GET",
          "path": "/api/payments/budget"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "dayKey": {
              "type": "string"
            },
            "timezone": {
              "type": "string"
            },
            "currency": {
              "type": "string"
            },
            "item": {
              "type": "object",
              "properties": {
                "limit": {
                  "type": "number"
                },
                "spent": {
                  "type": "number"
                },
                "reserved": {
                  "type": "number"
                },
                "remaining": {
                  "type": "number"
                }
              },
              "required": [
                "limit",
                "spent",
                "reserved",
                "remaining"
              ],
              "additionalProperties": false
            },
            "overage": {
              "type": "object",
              "properties": {
                "limit": {
                  "type": "number"
                },
                "spent": {
                  "type": "number"
                },
                "reserved": {
                  "type": "number"
                },
                "remaining": {
                  "type": "number"
                }
              },
              "required": [
                "limit",
                "spent",
                "reserved",
                "remaining"
              ],
              "additionalProperties": false
            },
            "tolerance": {
              "type": "object",
              "properties": {
                "limit": {
                  "type": "number"
                },
                "spent": {
                  "type": "number"
                },
                "reserved": {
                  "type": "number"
                },
                "remaining": {
                  "type": "number"
                }
              },
              "required": [
                "limit",
                "spent",
                "reserved",
                "remaining"
              ],
              "additionalProperties": false
            },
            "reservationCount": {
              "type": "number"
            },
            "isPaymentsLeader": {
              "type": "boolean"
            }
          },
          "required": [
            "enabled",
            "dayKey",
            "timezone",
            "currency",
            "item",
            "overage",
            "tolerance",
            "reservationCount",
            "isPaymentsLeader"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "payments.cards.create",
        "title": "Add a Payment Card",
        "description": "Store a card. The number, expiry, CVV and cardholder name go to the daemon secret store, encrypted at rest, under keys derived from the config path; only the label, brand, last four digits, kind and declared issuer cap are kept as config. The response carries the metadata record and never echoes what was submitted, because an echo would be a read path and no read path exists. A virtual card with a hard issuer cap is the recommended configuration: it bounds what any leak could cost to one killable number, which a real card number does not.",
        "category": "payments",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:payments"
        ],
        "http": {
          "method": "POST",
          "path": "/api/payments/cards"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string"
            },
            "kind": {
              "type": "string",
              "enum": [
                "virtual",
                "real"
              ]
            },
            "number": {
              "type": "string"
            },
            "expiryMonth": {
              "type": "number"
            },
            "expiryYear": {
              "type": "number"
            },
            "cvv": {
              "type": "string"
            },
            "cardholderName": {
              "type": "string"
            },
            "issuerCapMinorUnits": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "label",
            "kind",
            "number",
            "expiryMonth",
            "expiryYear",
            "cvv",
            "cardholderName"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "card": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "brand": {
                  "type": "string"
                },
                "last4": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "virtual",
                    "real"
                  ]
                },
                "expiryMonth": {
                  "type": "number"
                },
                "expiryYear": {
                  "type": "number"
                },
                "issuerCapMinorUnits": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "addedAt": {
                  "type": "string"
                },
                "materialComplete": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "label",
                "brand",
                "last4",
                "kind",
                "expiryMonth",
                "expiryYear",
                "issuerCapMinorUnits",
                "addedAt",
                "materialComplete"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "card"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "payments.cards.delete",
        "title": "Remove a Payment Card",
        "description": "Delete a card: its config metadata and every secret derived from its config path, reporting how many secret entries were cleared so a partial deletion is visible rather than silent. Deleting the default card leaves payments.defaultCardId empty, which refuses purchases until another card is chosen, the safe direction.",
        "category": "payments",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:payments"
        ],
        "http": {
          "method": "DELETE",
          "path": "/api/payments/cards/{id}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "deleted": {
              "type": "boolean"
            },
            "secretsCleared": {
              "type": "number"
            }
          },
          "required": [
            "id",
            "deleted",
            "secretsCleared"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "payments.cards.list",
        "title": "List Payment Cards",
        "description": "Configured cards, as METADATA ONLY: id, label, brand, last four digits, whether it is a virtual or a real card, expiry month and year, and the issuer spend cap the owner declared for a virtual card (declared, unverifiable by us, and never treated as an enforcement layer of ours). materialComplete reports whether every required secret field is present without revealing any of them. The card number, expiry, CVV and cardholder name live in the daemon secret store and there is no method that returns them.",
        "category": "payments",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:payments"
        ],
        "http": {
          "method": "GET",
          "path": "/api/payments/cards"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "cards": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "brand": {
                    "type": "string"
                  },
                  "last4": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "virtual",
                      "real"
                    ]
                  },
                  "expiryMonth": {
                    "type": "number"
                  },
                  "expiryYear": {
                    "type": "number"
                  },
                  "issuerCapMinorUnits": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "addedAt": {
                    "type": "string"
                  },
                  "materialComplete": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "id",
                  "label",
                  "brand",
                  "last4",
                  "kind",
                  "expiryMonth",
                  "expiryYear",
                  "issuerCapMinorUnits",
                  "addedAt",
                  "materialComplete"
                ],
                "additionalProperties": false
              }
            },
            "defaultCardId": {
              "type": "string"
            }
          },
          "required": [
            "cards",
            "defaultCardId"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "payments.checkout.begin",
        "title": "Buy What Is In This Checkout",
        "description": "Run a purchase against an open browser page, end to end: the caller reports the checkout's line items, tax, fees and delivery options AS STRINGS plus the refs of the card, address, delivery and place-order controls, and the daemon does the rest. It parses every amount into integer minor units with its own parser (refusing anything ambiguous rather than guessing), checks the cart against what was actually asked for, refuses a recurring charge, runs the taint gate, applies the daily item budget, the per-purchase ceiling and the overage pool, walks the shipping ladder down one rung at a time when the pool cannot cover the preferred tier, sends ONE notice to the configured command-authority channels and runs the window, above budget an approval where silence denies, within budget a veto where silence proceeds, then fills the stored shipping and billing addresses, types the stored card, submits once, records the purchase, debits the budget and reports the completed purchase. Nothing here knows any merchant's markup: the caller identifies the controls on whatever page it is looking at. Every number the owner is shown is re-rendered from the integers this daemon parsed, never from merchant text, and no response field can carry card material.",
        "category": "payments",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:payments"
        ],
        "http": {
          "method": "POST",
          "path": "/api/payments/checkout/begin"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "pageId": {
              "type": "string"
            },
            "merchantDomain": {
              "type": "string"
            },
            "checkoutUrl": {
              "type": "string"
            },
            "item": {
              "type": "string"
            },
            "cardId": {
              "type": "string"
            },
            "requestedLines": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string"
                  },
                  "quantity": {
                    "type": "number"
                  }
                },
                "required": [
                  "label",
                  "quantity"
                ],
                "additionalProperties": false
              },
              "minItems": 1
            },
            "lines": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string"
                  },
                  "quantity": {
                    "type": "string"
                  },
                  "unitPrice": {
                    "type": "string"
                  }
                },
                "required": [
                  "label",
                  "quantity",
                  "unitPrice"
                ],
                "additionalProperties": false
              },
              "minItems": 1
            },
            "tax": {
              "type": "string"
            },
            "fees": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string"
                  },
                  "amount": {
                    "type": "string"
                  }
                },
                "required": [
                  "label",
                  "amount"
                ],
                "additionalProperties": false
              }
            },
            "shippingOptions": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string"
                  },
                  "cost": {
                    "type": "string"
                  }
                },
                "required": [
                  "label",
                  "cost"
                ],
                "additionalProperties": false
              },
              "minItems": 1
            },
            "statedTotal": {
              "type": "string"
            },
            "currency": {
              "type": "string"
            },
            "orderSummaryText": {
              "type": "string"
            },
            "cardFields": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "field": {
                    "type": "string",
                    "enum": [
                      "number",
                      "expiry",
                      "expiryMonth",
                      "expiryYear",
                      "cvv",
                      "cardholderName"
                    ]
                  },
                  "ref": {
                    "type": "string"
                  }
                },
                "required": [
                  "field",
                  "ref"
                ],
                "additionalProperties": false
              },
              "minItems": 1
            },
            "addressFields": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "shipping",
                      "billing"
                    ]
                  },
                  "field": {
                    "type": "string",
                    "enum": [
                      "name",
                      "line1",
                      "line2",
                      "city",
                      "region",
                      "postalCode",
                      "country"
                    ]
                  },
                  "ref": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "field",
                  "ref"
                ],
                "additionalProperties": false
              }
            },
            "shippingTargets": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "placeOrderTarget": {
              "type": "string"
            },
            "preferredTier": {
              "type": "string",
              "enum": [
                "normal",
                "fast",
                "fastest"
              ]
            },
            "expirySeparator": {
              "type": "string"
            },
            "twoDigitYear": {
              "type": "boolean"
            },
            "requestedMax": {
              "type": "string"
            }
          },
          "required": [
            "sessionId",
            "pageId",
            "merchantDomain",
            "checkoutUrl",
            "item",
            "cardId",
            "requestedLines",
            "lines",
            "shippingOptions",
            "cardFields",
            "placeOrderTarget"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "outcome": {
              "type": "string"
            },
            "purchaseId": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "reason": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "merchantOrderId": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "totalMinorUnits": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            },
            "currency": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "shippingTierUsed": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "steppedDown": {
              "type": "boolean"
            },
            "challengeStep": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "outcome",
            "purchaseId",
            "reason",
            "merchantOrderId",
            "totalMinorUnits",
            "currency",
            "shippingTierUsed",
            "steppedDown",
            "challengeStep"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "payments.checkout.fillCard",
        "title": "Fill the Card into a Checkout",
        "description": "Have the daemon type the stored card into the payment fields of an open browser page. Takes the browser session, the page, and a list of {field, ref} targets naming where each part of the card goes, the caller identifies the fields on whatever checkout it is looking at, so the daemon needs no knowledge of any merchant. The response is the list of field NAMES that were filled plus a boolean; it never carries the value, its length, or a masked form, and a failure names the field that did not accept input rather than what was typed into it. Refused unless a purchase decision is already in flight on that exact page and the page is still on the registrable domain the purchase was decided against, so the card is typed as part of an approved checkout or not at all. Also refused when the browser has no card-material redaction installed, because a snapshot taken afterwards would otherwise hand back what was just typed.",
        "category": "payments",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:payments"
        ],
        "http": {
          "method": "POST",
          "path": "/api/payments/checkout/fill-card"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "pageId": {
              "type": "string"
            },
            "targets": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "field": {
                    "type": "string",
                    "enum": [
                      "number",
                      "expiry",
                      "expiryMonth",
                      "expiryYear",
                      "cvv",
                      "cardholderName"
                    ]
                  },
                  "ref": {
                    "type": "string"
                  }
                },
                "required": [
                  "field",
                  "ref"
                ],
                "additionalProperties": false
              },
              "minItems": 1
            },
            "expirySeparator": {
              "type": "string"
            },
            "twoDigitYear": {
              "type": "boolean"
            }
          },
          "required": [
            "sessionId",
            "pageId",
            "targets"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "filled": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "failedField": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "reason": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "ok",
            "filled",
            "failedField",
            "reason"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "payments.purchases.list",
        "title": "List Purchases",
        "description": "The purchase audit ledger: what was bought, from which merchant registrable domain, how much (item, tax, fees and delivery separately), which budget pool each part drew on, which delivery tier was requested and which was actually used, whether the shipping ladder stepped it down, which window ran and how it ended, which command-authority channel answered, and the outcome. Reconcilable against a card statement. Never contains a card number, expiry or CVV. A refund is recorded here for reconciliation and credits no pool, a refund on day five refilling day five would be permission to buy again that nobody granted.",
        "category": "payments",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:payments"
        ],
        "http": {
          "method": "GET",
          "path": "/api/payments/purchases"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "number"
            },
            "dayKey": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "purchases": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "purchaseId": {
                    "type": "string"
                  },
                  "atUtc": {
                    "type": "string"
                  },
                  "dayKey": {
                    "type": "string"
                  },
                  "timezone": {
                    "type": "string"
                  },
                  "merchantDomain": {
                    "type": "string"
                  },
                  "item": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string"
                  },
                  "itemMinorUnits": {
                    "type": "number"
                  },
                  "taxMinorUnits": {
                    "type": "number"
                  },
                  "feesMinorUnits": {
                    "type": "number"
                  },
                  "shippingMinorUnits": {
                    "type": "number"
                  },
                  "totalMinorUnits": {
                    "type": "number"
                  },
                  "shippingTierRequested": {
                    "type": "string"
                  },
                  "shippingTierUsed": {
                    "type": "string"
                  },
                  "steppedDown": {
                    "type": "boolean"
                  },
                  "itemPoolDraw": {
                    "type": "number"
                  },
                  "overagePoolDraw": {
                    "type": "number"
                  },
                  "tolerancePoolDraw": {
                    "type": "number"
                  },
                  "cardLast4": {
                    "type": "string"
                  },
                  "windowKind": {
                    "type": "string"
                  },
                  "windowOutcome": {
                    "type": "string"
                  },
                  "answeredBy": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "outcome": {
                    "type": "string"
                  },
                  "refusalReason": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "merchantOrderId": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "refundedAt": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "merchantRecognised": {
                    "type": "boolean"
                  },
                  "merchantQualifier": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "merchantDiscovered": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "purchaseId",
                  "atUtc",
                  "dayKey",
                  "timezone",
                  "merchantDomain",
                  "item",
                  "currency",
                  "itemMinorUnits",
                  "taxMinorUnits",
                  "feesMinorUnits",
                  "shippingMinorUnits",
                  "totalMinorUnits",
                  "shippingTierRequested",
                  "shippingTierUsed",
                  "steppedDown",
                  "itemPoolDraw",
                  "overagePoolDraw",
                  "tolerancePoolDraw",
                  "cardLast4",
                  "windowKind",
                  "windowOutcome",
                  "answeredBy",
                  "outcome",
                  "refusalReason",
                  "merchantOrderId",
                  "refundedAt",
                  "merchantRecognised",
                  "merchantQualifier",
                  "merchantDiscovered"
                ],
                "additionalProperties": false
              }
            },
            "total": {
              "type": "number"
            }
          },
          "required": [
            "purchases",
            "total"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "permissions.rules.delete",
        "title": "Delete a Durable Permission Rule",
        "description": "Delete one durable user-origin permission rule by id. The matching asks prompt again afterwards, deleting a grant is how a remembered decision is revoked. deleted:false when no rule with that id exists (an honest miss, not an error).",
        "category": "permissions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:sessions"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "ruleId": {
              "type": "string"
            }
          },
          "required": [
            "ruleId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "deleted": {
              "type": "boolean"
            }
          },
          "required": [
            "deleted"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "permissions.rules.list",
        "title": "List Durable Permission Rules",
        "description": "List the durable user-origin permission rules written by remembered approval decisions (exact command / command class / path scope / whole tool), newest first, the persistent grants and denials the permission manager consults before ever prompting. Project-scoped.",
        "category": "permissions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "read:sessions"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "rules": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "effect": {
                    "type": "string",
                    "enum": [
                      "allow",
                      "deny"
                    ]
                  },
                  "tier": {
                    "type": "string",
                    "enum": [
                      "exact",
                      "command-class",
                      "path",
                      "tool"
                    ]
                  },
                  "tool": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "createdAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "effect",
                  "tier",
                  "tool",
                  "createdAt"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "rules"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "principals.create",
        "title": "Create Principal",
        "description": "Create a named principal from a name, kind, and optional channel identities. Fails with a conflict when any identity is already mapped to a different principal.",
        "category": "principals",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:principals"
        ],
        "http": {
          "method": "POST",
          "path": "/api/principals"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "kind": {
              "type": "string",
              "enum": [
                "user",
                "bot",
                "service",
                "token"
              ]
            },
            "identities": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "channel": {
                    "type": "string"
                  },
                  "value": {
                    "type": "string"
                  }
                },
                "required": [
                  "channel",
                  "value"
                ],
                "additionalProperties": false
              }
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "name",
            "kind"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "principal": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "user",
                    "bot",
                    "service",
                    "token"
                  ]
                },
                "identities": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "channel": {
                        "type": "string"
                      },
                      "value": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "channel",
                      "value"
                    ],
                    "additionalProperties": false
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "name",
                "kind",
                "identities",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "principal"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "principals.delete",
        "title": "Delete Principal",
        "description": "Permanently delete a principal. Returns { deleted: false } when no principal with that id existed, an honest boolean, never a 200 that pretends a phantom principal was removed.",
        "category": "principals",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:principals"
        ],
        "http": {
          "method": "DELETE",
          "path": "/api/principals/{principalId}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "principalId": {
              "type": "string"
            }
          },
          "required": [
            "principalId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "principalId": {
              "type": "string"
            },
            "deleted": {
              "type": "boolean"
            }
          },
          "required": [
            "principalId",
            "deleted"
          ],
          "additionalProperties": false
        },
        "dangerous": true,
        "invokable": true
      },
      {
        "id": "principals.get",
        "title": "Get Principal",
        "description": "Return one principal by id. Returns 404 when no principal with that id exists.",
        "category": "principals",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:principals"
        ],
        "http": {
          "method": "GET",
          "path": "/api/principals/{principalId}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "principalId": {
              "type": "string"
            }
          },
          "required": [
            "principalId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "principal": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "user",
                    "bot",
                    "service",
                    "token"
                  ]
                },
                "identities": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "channel": {
                        "type": "string"
                      },
                      "value": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "channel",
                      "value"
                    ],
                    "additionalProperties": false
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "name",
                "kind",
                "identities",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "principal"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "principals.list",
        "title": "List Principals",
        "description": "Return every named principal in the registry with its channel identities.",
        "category": "principals",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:principals"
        ],
        "http": {
          "method": "GET",
          "path": "/api/principals"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "principals": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "user",
                      "bot",
                      "service",
                      "token"
                    ]
                  },
                  "identities": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "channel": {
                          "type": "string"
                        },
                        "value": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "channel",
                        "value"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "name",
                  "kind",
                  "identities",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "principals"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "principals.resolve",
        "title": "Resolve Sender Identity",
        "description": "Resolve a channel-specific sender identity ({channel, value}) to the named principal it belongs to. An unmapped identity resolves to the shared unknown principal with known:false, the registry never guesses.",
        "category": "principals",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:principals"
        ],
        "http": {
          "method": "POST",
          "path": "/api/principals/resolve"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "channel": {
              "type": "string"
            },
            "value": {
              "type": "string"
            }
          },
          "required": [
            "channel",
            "value"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "principal": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "user",
                    "bot",
                    "service",
                    "token"
                  ]
                },
                "identities": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "channel": {
                        "type": "string"
                      },
                      "value": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "channel",
                      "value"
                    ],
                    "additionalProperties": false
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "name",
                "kind",
                "identities",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": false
            },
            "known": {
              "type": "boolean"
            }
          },
          "required": [
            "principal",
            "known"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "principals.update",
        "title": "Update Principal",
        "description": "Update a principal's name, kind, identities, and/or metadata. Absent fields are left unchanged; supplying identities replaces the set. Fails with a conflict when an identity is already mapped to a different principal.",
        "category": "principals",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:principals"
        ],
        "http": {
          "method": "POST",
          "path": "/api/principals/{principalId}/update"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "principalId": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "kind": {
              "type": "string",
              "enum": [
                "user",
                "bot",
                "service",
                "token"
              ]
            },
            "identities": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "channel": {
                    "type": "string"
                  },
                  "value": {
                    "type": "string"
                  }
                },
                "required": [
                  "channel",
                  "value"
                ],
                "additionalProperties": false
              }
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "principalId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "principal": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "user",
                    "bot",
                    "service",
                    "token"
                  ]
                },
                "identities": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "channel": {
                        "type": "string"
                      },
                      "value": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "channel",
                      "value"
                    ],
                    "additionalProperties": false
                  }
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "name",
                "kind",
                "identities",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "principal"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "profile.append",
        "title": "Append Profile Note",
        "description": "Add one prose bullet to a section, carrying its provenance suffix. Same three-layer gate as profile.set. A section that does not exist is created at the end of the document; a section the owner renamed is matched case-insensitively rather than duplicated.",
        "category": "profile",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:profile"
        ],
        "http": {
          "method": "POST",
          "path": "/api/profile/append"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "section": {
              "type": "string"
            },
            "text": {
              "type": "string"
            },
            "surface": {
              "type": "string"
            },
            "said": {
              "type": "string"
            },
            "authority": {
              "type": "string"
            }
          },
          "required": [
            "section",
            "text",
            "surface",
            "said",
            "authority"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "reason": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "changes": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string"
                  },
                  "fieldId": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "section": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "superseded": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "kind",
                  "section",
                  "label",
                  "superseded"
                ],
                "additionalProperties": false
              }
            },
            "disclosure": {
              "type": "string"
            }
          },
          "required": [
            "ok",
            "changes",
            "disclosure"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "profile.forget",
        "title": "Forget Profile Line",
        "description": "Delete a mechanical field and every retained history comment for it, or one prose line addressed by its section plus its exact text. Never by line position: the owner edits this file himself, so an index taken from an earlier read may name a different line by the time the delete arrives. Text that no longer matches removes nothing and says so, rather than deleting the nearest thing. No tombstone, no deleted flag, no retention window, delete means delete. Forgetting something that was not there reports that honestly instead of returning success. Authority-gated exactly like a write: an injection that cannot add a fact must not be able to remove one.",
        "category": "profile",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:profile"
        ],
        "http": {
          "method": "POST",
          "path": "/api/profile/forget"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "fieldId": {
              "type": "string"
            },
            "section": {
              "type": "string"
            },
            "text": {
              "type": "string"
            },
            "authority": {
              "type": "string"
            }
          },
          "required": [
            "authority"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "reason": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "changes": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string"
                  },
                  "fieldId": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "section": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "superseded": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "kind",
                  "section",
                  "label",
                  "superseded"
                ],
                "additionalProperties": false
              }
            },
            "disclosure": {
              "type": "string"
            }
          },
          "required": [
            "ok",
            "changes",
            "disclosure"
          ],
          "additionalProperties": false
        },
        "dangerous": true,
        "invokable": true
      },
      {
        "id": "profile.get",
        "title": "Get Profile Field",
        "description": "Return one mechanical field by id (e.g. commerce.shippingAddress). Answers present:false for a field the owner has not recorded rather than inventing a value, and returns an invalid value verbatim with its reason instead of hiding it. A closed-tier field carries the one-line disclosure the reply should show.",
        "category": "profile",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:profile"
        ],
        "http": {
          "method": "GET",
          "path": "/api/profile/fields/{fieldId}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "fieldId": {
              "type": "string"
            }
          },
          "required": [
            "fieldId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "fieldId": {
              "type": "string"
            },
            "present": {
              "type": "boolean"
            },
            "field": {
              "type": "object",
              "properties": {
                "fieldId": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                },
                "valid": {
                  "type": "boolean"
                },
                "section": {
                  "type": "string"
                },
                "invalidReason": {
                  "type": "string"
                },
                "provenance": {
                  "type": "object",
                  "properties": {
                    "surface": {
                      "type": "string"
                    },
                    "date": {
                      "type": "string"
                    },
                    "said": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "surface",
                    "date",
                    "said"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "fieldId",
                "label",
                "value",
                "valid",
                "section"
              ],
              "additionalProperties": false
            },
            "disclosure": {
              "type": "string"
            }
          },
          "required": [
            "fieldId",
            "present",
            "disclosure"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "profile.person",
        "title": "Get Person From Profile",
        "description": "Return the People lines matching one name. Takes a NAME by design and has no enumerate-all counterpart: a People line may reach outbound content only when the owner named that person in this turn's instruction, and the only lookup that exists taking a name is what makes that structural rather than a matter of model judgement.",
        "category": "profile",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:profile"
        ],
        "http": {
          "method": "POST",
          "path": "/api/profile/person"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            }
          },
          "required": [
            "name"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "lines": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "lineIndex": {
                    "type": "number"
                  },
                  "section": {
                    "type": "string"
                  },
                  "text": {
                    "type": "string"
                  },
                  "provenance": {
                    "type": "object",
                    "properties": {
                      "surface": {
                        "type": "string"
                      },
                      "date": {
                        "type": "string"
                      },
                      "said": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "surface",
                      "date",
                      "said"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "lineIndex",
                  "section",
                  "text"
                ],
                "additionalProperties": false
              }
            },
            "disclosure": {
              "type": "string"
            }
          },
          "required": [
            "name",
            "lines",
            "disclosure"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "profile.provenance",
        "title": "Get Profile Provenance",
        "description": "Answer \"where did you get that?\" for one field: the surface, the date and the owner's verbatim words, plus every superseded predecessor still retained as a history comment. A field the owner typed by hand reports handEdited:true and no provenance, rather than being dressed up as a recorded source.",
        "category": "profile",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:profile"
        ],
        "http": {
          "method": "GET",
          "path": "/api/profile/fields/{fieldId}/provenance"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "fieldId": {
              "type": "string"
            }
          },
          "required": [
            "fieldId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "fieldId": {
              "type": "string"
            },
            "present": {
              "type": "boolean"
            },
            "handEdited": {
              "type": "boolean"
            },
            "provenance": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "surface": {
                      "type": "string"
                    },
                    "date": {
                      "type": "string"
                    },
                    "said": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "surface",
                    "date",
                    "said"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "superseded": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "lineIndex": {
                    "type": "number"
                  },
                  "fieldId": {
                    "type": "string"
                  },
                  "section": {
                    "type": "string"
                  },
                  "text": {
                    "type": "string"
                  },
                  "value": {
                    "type": "string"
                  },
                  "supersededOn": {
                    "type": "string"
                  },
                  "previousLine": {
                    "type": "string"
                  },
                  "provenance": {
                    "type": "object",
                    "properties": {
                      "surface": {
                        "type": "string"
                      },
                      "date": {
                        "type": "string"
                      },
                      "said": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "surface",
                      "date",
                      "said"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "lineIndex",
                  "fieldId",
                  "section",
                  "text",
                  "value",
                  "supersededOn",
                  "previousLine"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "fieldId",
            "present",
            "handEdited",
            "provenance",
            "superseded"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "profile.read",
        "title": "Read Owner Profile",
        "description": "Return the whole owner profile, by section, with each section's tier and every mechanical field's validity. This is the answer to \"what do you know about me?\" and is the ONE read that returns closed-tier content in bulk. It carries its own scope, read:profile-document, so a token issued to a composition path can hold read:profile for the named lookups (get/person/provenance/status) without also being able to ask for everything. The two are unrelated names rather than a hierarchy: scope matching is exact, `*`, or a `prefix:*` wildcard, so a caller wanting both lists both.",
        "category": "profile",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:profile-document"
        ],
        "http": {
          "method": "GET",
          "path": "/api/profile"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "state": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string"
                },
                "path": {
                  "type": "string"
                },
                "exists": {
                  "type": "boolean"
                },
                "lineCount": {
                  "type": "number"
                },
                "fieldCount": {
                  "type": "number"
                },
                "proseLineCount": {
                  "type": "number"
                },
                "sections": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "invalidFields": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "fieldId": {
                        "type": "string"
                      },
                      "reason": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "fieldId",
                      "reason"
                    ],
                    "additionalProperties": false
                  }
                },
                "reason": {
                  "type": "string"
                }
              },
              "required": [
                "kind",
                "path"
              ],
              "additionalProperties": false
            },
            "sections": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "heading": {
                    "type": "string"
                  },
                  "tier": {
                    "type": "string"
                  },
                  "fields": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "fieldId": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "value": {
                          "type": "string"
                        },
                        "valid": {
                          "type": "boolean"
                        },
                        "invalidReason": {
                          "type": "string"
                        },
                        "provenance": {
                          "type": "object",
                          "properties": {
                            "surface": {
                              "type": "string"
                            },
                            "date": {
                              "type": "string"
                            },
                            "said": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "surface",
                            "date",
                            "said"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "fieldId",
                        "label",
                        "value",
                        "valid"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "prose": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "lineIndex": {
                          "type": "number"
                        },
                        "section": {
                          "type": "string"
                        },
                        "text": {
                          "type": "string"
                        },
                        "provenance": {
                          "type": "object",
                          "properties": {
                            "surface": {
                              "type": "string"
                            },
                            "date": {
                              "type": "string"
                            },
                            "said": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "surface",
                            "date",
                            "said"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "lineIndex",
                        "section",
                        "text"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "heading",
                  "tier",
                  "fields",
                  "prose"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "state",
            "sections"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "profile.set",
        "title": "Set Profile Field",
        "description": "Record or correct one mechanical field, moving any previous value into a retained history comment. Refused unless the caller carries owner-direct authority AND the proposed value does not overlap untrusted content read this turn AND a verbatim quote of what the owner said is supplied. A caller declaring the call was not an explicit user request is refused before any of that.",
        "category": "profile",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:profile"
        ],
        "http": {
          "method": "POST",
          "path": "/api/profile/set"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "fieldId": {
              "type": "string"
            },
            "value": {
              "type": "string"
            },
            "surface": {
              "type": "string"
            },
            "said": {
              "type": "string"
            },
            "authority": {
              "type": "string"
            }
          },
          "required": [
            "fieldId",
            "value",
            "surface",
            "said",
            "authority"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "reason": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "changes": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string"
                  },
                  "fieldId": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "section": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "superseded": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "kind",
                  "section",
                  "label",
                  "superseded"
                ],
                "additionalProperties": false
              }
            },
            "disclosure": {
              "type": "string"
            }
          },
          "required": [
            "ok",
            "changes",
            "disclosure"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "profile.status",
        "title": "Owner Profile Status",
        "description": "Diagnostics for the profile: whether it loaded, the file path, the section names, line/field/prose counts, and every mechanical value that did not validate WITH ITS REASON. It never returns a value, that is what makes it safe in a support bundle, and it is asserted by test. An unreadable file reports unavailable with the reason rather than an empty profile.",
        "category": "profile",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:profile"
        ],
        "http": {
          "method": "GET",
          "path": "/api/profile/status"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "exists": {
              "type": "boolean"
            },
            "lineCount": {
              "type": "number"
            },
            "fieldCount": {
              "type": "number"
            },
            "proseLineCount": {
              "type": "number"
            },
            "sections": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "invalidFields": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "fieldId": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string"
                  }
                },
                "required": [
                  "fieldId",
                  "reason"
                ],
                "additionalProperties": false
              }
            },
            "reason": {
              "type": "string"
            }
          },
          "required": [
            "kind",
            "path"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "profile.undo",
        "title": "Undo Profile Correction",
        "description": "Promote a field's most recent superseded value back to the active line, so a wrong correction is recoverable. Authority-gated like every other mutation.",
        "category": "profile",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:profile"
        ],
        "http": {
          "method": "POST",
          "path": "/api/profile/undo"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "fieldId": {
              "type": "string"
            },
            "authority": {
              "type": "string"
            }
          },
          "required": [
            "fieldId",
            "authority"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "reason": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "changes": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string"
                  },
                  "fieldId": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "section": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "superseded": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "kind",
                  "section",
                  "label",
                  "superseded"
                ],
                "additionalProperties": false
              }
            },
            "disclosure": {
              "type": "string"
            }
          },
          "required": [
            "ok",
            "changes",
            "disclosure"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "models.current.get",
        "title": "Current Model",
        "description": "The model this daemon would use for a turn right now, with whether its provider is actually configured and by which authentication route. `model` is null when nothing is selected, which is a real state, not an error, and a caller rendering a picker needs to tell it from a selection whose provider has lost its credentials. `effort` is the persisted reasoning level, null when none has been set explicitly.",
        "category": "providers",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:providers"
        ],
        "http": {
          "method": "GET",
          "path": "/api/models/current"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "model": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "registryKey": {
                      "type": "string"
                    },
                    "provider": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "registryKey",
                    "provider",
                    "id"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "configured": {
              "type": "boolean"
            },
            "configuredVia": {
              "type": "string",
              "enum": [
                "env",
                "secrets",
                "subscription",
                "anonymous"
              ]
            },
            "routes": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "route": {
                    "type": "string",
                    "enum": [
                      "api-key",
                      "secret-ref",
                      "service-oauth",
                      "subscription-oauth",
                      "anonymous",
                      "none"
                    ]
                  },
                  "label": {
                    "type": "string"
                  },
                  "configured": {
                    "type": "boolean"
                  },
                  "usable": {
                    "type": "boolean"
                  },
                  "freshness": {
                    "type": "string",
                    "enum": [
                      "healthy",
                      "expiring",
                      "expired",
                      "pending",
                      "unconfigured"
                    ]
                  },
                  "detail": {
                    "type": "string"
                  },
                  "envVars": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "secretKeys": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "serviceNames": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "providerId": {
                    "type": "string"
                  },
                  "repairHints": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "route",
                  "label",
                  "configured"
                ],
                "additionalProperties": false
              }
            },
            "effort": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "model",
            "configured"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "models.current.set",
        "title": "Switch the Current Model",
        "description": "Switch the daemon's current model live, by the registry key `models.list` returns. The switch applies to the next turn on every surface this daemon serves and is persisted, so it survives a restart; `persisted` says whether the write to settings succeeded. An unknown key is refused with MODEL_NOT_FOUND and a provider with no usable credentials with PROVIDER_NOT_CONFIGURED, naming the environment variables it looked for, a caller must not have to guess which of the two happened. An optional `effort` persists a reasoning level with the selection: it is validated against the known severity ladder here, and each turn maps it onto the active model's real options, snapping down and never promoting.",
        "category": "providers",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:providers"
        ],
        "http": {
          "method": "PATCH",
          "path": "/api/models/current"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "registryKey": {
              "type": "string"
            },
            "effort": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "registryKey"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "model": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "registryKey": {
                      "type": "string"
                    },
                    "provider": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "registryKey",
                    "provider",
                    "id"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "configured": {
              "type": "boolean"
            },
            "configuredVia": {
              "type": "string",
              "enum": [
                "env",
                "secrets",
                "subscription",
                "anonymous"
              ]
            },
            "routes": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "route": {
                    "type": "string",
                    "enum": [
                      "api-key",
                      "secret-ref",
                      "service-oauth",
                      "subscription-oauth",
                      "anonymous",
                      "none"
                    ]
                  },
                  "label": {
                    "type": "string"
                  },
                  "configured": {
                    "type": "boolean"
                  },
                  "usable": {
                    "type": "boolean"
                  },
                  "freshness": {
                    "type": "string",
                    "enum": [
                      "healthy",
                      "expiring",
                      "expired",
                      "pending",
                      "unconfigured"
                    ]
                  },
                  "detail": {
                    "type": "string"
                  },
                  "envVars": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "secretKeys": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "serviceNames": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "providerId": {
                    "type": "string"
                  },
                  "repairHints": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "route",
                  "label",
                  "configured"
                ],
                "additionalProperties": false
              }
            },
            "effort": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "persisted": {
              "type": "boolean"
            }
          },
          "required": [
            "model",
            "configured",
            "persisted"
          ],
          "additionalProperties": false
        },
        "dangerous": true,
        "invokable": true
      },
      {
        "id": "models.list",
        "title": "Model Catalog",
        "description": "Every provider this daemon knows about with the models it offers, whether it is configured, and how it was configured. A GET also triggers the TTL-respecting live-discovery re-check that the terminal's model picker triggers on open, so a locally served model that appeared since the last read shows up on the next one. `currentModel` is the daemon's current selection, or null when nothing is selected. `secretsResolutionSkipped` is true when secret-backed credentials were not resolved for this read, so a caller can tell \"not configured\" from \"not checked\". Each model that reasons carries `reasoningOptions`: the levels it actually offers and which source resolved them; a model with no entry does not reason at all.",
        "category": "providers",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:providers"
        ],
        "http": {
          "method": "GET",
          "path": "/api/models"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "providers": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "configured": {
                    "type": "boolean"
                  },
                  "configuredVia": {
                    "type": "string",
                    "enum": [
                      "env",
                      "secrets",
                      "subscription",
                      "anonymous"
                    ]
                  },
                  "envVars": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "routes": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "route": {
                          "type": "string",
                          "enum": [
                            "api-key",
                            "secret-ref",
                            "service-oauth",
                            "subscription-oauth",
                            "anonymous",
                            "none"
                          ]
                        },
                        "label": {
                          "type": "string"
                        },
                        "configured": {
                          "type": "boolean"
                        },
                        "usable": {
                          "type": "boolean"
                        },
                        "freshness": {
                          "type": "string",
                          "enum": [
                            "healthy",
                            "expiring",
                            "expired",
                            "pending",
                            "unconfigured"
                          ]
                        },
                        "detail": {
                          "type": "string"
                        },
                        "envVars": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "secretKeys": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "serviceNames": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "providerId": {
                          "type": "string"
                        },
                        "repairHints": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "route",
                        "label",
                        "configured"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "models": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "registryKey": {
                          "type": "string"
                        },
                        "provider": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "contextWindow": {
                          "type": "number"
                        },
                        "reasoningOptions": {
                          "type": "object",
                          "properties": {
                            "levels": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "source": {
                              "type": "string",
                              "enum": [
                                "catalog",
                                "declared",
                                "family",
                                "fallback"
                              ]
                            }
                          },
                          "required": [
                            "levels",
                            "source"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "id",
                        "registryKey",
                        "provider"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "id",
                  "label",
                  "configured",
                  "envVars",
                  "models"
                ],
                "additionalProperties": false
              }
            },
            "currentModel": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "registryKey": {
                      "type": "string"
                    },
                    "provider": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "registryKey",
                    "provider",
                    "id"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "secretsResolutionSkipped": {
              "type": "boolean"
            }
          },
          "required": [
            "providers",
            "currentModel",
            "secretsResolutionSkipped"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "providers.get",
        "title": "Provider Snapshot",
        "description": "Return runtime metadata for a single provider.",
        "category": "providers",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:providers"
        ],
        "http": {
          "method": "GET",
          "path": "/api/providers/{providerId}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "providerId": {
              "type": "string"
            }
          },
          "required": [
            "providerId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "providerId": {
              "type": "string"
            },
            "active": {
              "type": "boolean"
            },
            "modelCount": {
              "type": "number"
            },
            "runtime": {
              "type": "object",
              "properties": {
                "auth": {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "enum": [
                        "api-key",
                        "oauth",
                        "anonymous",
                        "none"
                      ]
                    },
                    "configured": {
                      "type": "boolean"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "envVars": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "routes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "route": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "configured": {
                            "type": "boolean"
                          },
                          "usable": {
                            "type": "boolean"
                          },
                          "freshness": {
                            "type": "string"
                          },
                          "detail": {
                            "type": "string"
                          },
                          "envVars": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "secretKeys": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "serviceNames": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "providerId": {
                            "type": "string"
                          },
                          "repairHints": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "route",
                          "label",
                          "configured"
                        ],
                        "additionalProperties": true
                      }
                    }
                  },
                  "required": [
                    "mode",
                    "configured"
                  ],
                  "additionalProperties": true
                },
                "models": {
                  "type": "object",
                  "properties": {
                    "defaultModel": {
                      "type": "string"
                    },
                    "models": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "embeddingModel": {
                      "type": "string"
                    },
                    "embeddingDimensions": {
                      "type": "number"
                    },
                    "aliases": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "suppressedModelRegistryKeys": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "models"
                  ],
                  "additionalProperties": true
                },
                "usage": {
                  "type": "object",
                  "properties": {
                    "streaming": {
                      "type": "boolean"
                    },
                    "toolCalling": {
                      "type": "boolean"
                    },
                    "parallelTools": {
                      "type": "boolean"
                    },
                    "promptCaching": {
                      "type": "boolean"
                    },
                    "cost": {
                      "type": "object",
                      "properties": {
                        "source": {
                          "type": "string",
                          "enum": [
                            "catalog",
                            "provider",
                            "none"
                          ]
                        },
                        "currency": {
                          "type": "string"
                        },
                        "inputPerMillionTokens": {
                          "type": "number"
                        },
                        "outputPerMillionTokens": {
                          "type": "number"
                        },
                        "detail": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "source"
                      ],
                      "additionalProperties": true
                    },
                    "notes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "streaming",
                    "toolCalling",
                    "parallelTools"
                  ],
                  "additionalProperties": true
                },
                "policy": {
                  "type": "object",
                  "properties": {
                    "local": {
                      "type": "boolean"
                    },
                    "dataRetention": {
                      "type": "string"
                    },
                    "streamProtocol": {
                      "type": "string"
                    },
                    "reasoningMode": {
                      "type": "string"
                    },
                    "supportedReasoningEfforts": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "cacheStrategy": {
                      "type": "string"
                    },
                    "notes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "additionalProperties": true
                },
                "notes": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "additionalProperties": true
            },
            "models": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "registryKey": {
                    "type": "string"
                  },
                  "displayName": {
                    "type": "string"
                  },
                  "selectable": {
                    "type": "boolean"
                  },
                  "contextWindow": {
                    "type": "number"
                  },
                  "tier": {
                    "type": "string"
                  },
                  "pricing": {
                    "type": "object",
                    "properties": {
                      "inputPerMillionTokens": {
                        "type": "number"
                      },
                      "outputPerMillionTokens": {
                        "type": "number"
                      },
                      "currency": {
                        "type": "string",
                        "enum": [
                          "USD"
                        ]
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "user",
                          "provider",
                          "catalog"
                        ]
                      },
                      "asOf": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "inputPerMillionTokens",
                      "outputPerMillionTokens",
                      "currency",
                      "source"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "id",
                  "registryKey",
                  "displayName",
                  "selectable",
                  "contextWindow"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "providerId",
            "active",
            "modelCount",
            "runtime",
            "models"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "providers.list",
        "title": "Providers List",
        "description": "Return runtime provider metadata, policy hooks, and priced model summaries.",
        "category": "providers",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:providers"
        ],
        "http": {
          "method": "GET",
          "path": "/api/providers"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "providers": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "providerId": {
                    "type": "string"
                  },
                  "active": {
                    "type": "boolean"
                  },
                  "modelCount": {
                    "type": "number"
                  },
                  "runtime": {
                    "type": "object",
                    "properties": {
                      "auth": {
                        "type": "object",
                        "properties": {
                          "mode": {
                            "type": "string",
                            "enum": [
                              "api-key",
                              "oauth",
                              "anonymous",
                              "none"
                            ]
                          },
                          "configured": {
                            "type": "boolean"
                          },
                          "detail": {
                            "type": "string"
                          },
                          "envVars": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "routes": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "route": {
                                  "type": "string"
                                },
                                "label": {
                                  "type": "string"
                                },
                                "configured": {
                                  "type": "boolean"
                                },
                                "usable": {
                                  "type": "boolean"
                                },
                                "freshness": {
                                  "type": "string"
                                },
                                "detail": {
                                  "type": "string"
                                },
                                "envVars": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "secretKeys": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "serviceNames": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "providerId": {
                                  "type": "string"
                                },
                                "repairHints": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              },
                              "required": [
                                "route",
                                "label",
                                "configured"
                              ],
                              "additionalProperties": true
                            }
                          }
                        },
                        "required": [
                          "mode",
                          "configured"
                        ],
                        "additionalProperties": true
                      },
                      "models": {
                        "type": "object",
                        "properties": {
                          "defaultModel": {
                            "type": "string"
                          },
                          "models": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "embeddingModel": {
                            "type": "string"
                          },
                          "embeddingDimensions": {
                            "type": "number"
                          },
                          "aliases": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "suppressedModelRegistryKeys": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "models"
                        ],
                        "additionalProperties": true
                      },
                      "usage": {
                        "type": "object",
                        "properties": {
                          "streaming": {
                            "type": "boolean"
                          },
                          "toolCalling": {
                            "type": "boolean"
                          },
                          "parallelTools": {
                            "type": "boolean"
                          },
                          "promptCaching": {
                            "type": "boolean"
                          },
                          "cost": {
                            "type": "object",
                            "properties": {
                              "source": {
                                "type": "string",
                                "enum": [
                                  "catalog",
                                  "provider",
                                  "none"
                                ]
                              },
                              "currency": {
                                "type": "string"
                              },
                              "inputPerMillionTokens": {
                                "type": "number"
                              },
                              "outputPerMillionTokens": {
                                "type": "number"
                              },
                              "detail": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "source"
                            ],
                            "additionalProperties": true
                          },
                          "notes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "streaming",
                          "toolCalling",
                          "parallelTools"
                        ],
                        "additionalProperties": true
                      },
                      "policy": {
                        "type": "object",
                        "properties": {
                          "local": {
                            "type": "boolean"
                          },
                          "dataRetention": {
                            "type": "string"
                          },
                          "streamProtocol": {
                            "type": "string"
                          },
                          "reasoningMode": {
                            "type": "string"
                          },
                          "supportedReasoningEfforts": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "cacheStrategy": {
                            "type": "string"
                          },
                          "notes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "additionalProperties": true
                      },
                      "notes": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "additionalProperties": true
                  },
                  "models": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "registryKey": {
                          "type": "string"
                        },
                        "displayName": {
                          "type": "string"
                        },
                        "selectable": {
                          "type": "boolean"
                        },
                        "contextWindow": {
                          "type": "number"
                        },
                        "tier": {
                          "type": "string"
                        },
                        "pricing": {
                          "type": "object",
                          "properties": {
                            "inputPerMillionTokens": {
                              "type": "number"
                            },
                            "outputPerMillionTokens": {
                              "type": "number"
                            },
                            "currency": {
                              "type": "string",
                              "enum": [
                                "USD"
                              ]
                            },
                            "source": {
                              "type": "string",
                              "enum": [
                                "user",
                                "provider",
                                "catalog"
                              ]
                            },
                            "asOf": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "inputPerMillionTokens",
                            "outputPerMillionTokens",
                            "currency",
                            "source"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "id",
                        "registryKey",
                        "displayName",
                        "selectable",
                        "contextWindow"
                      ],
                      "additionalProperties": true
                    }
                  }
                },
                "required": [
                  "providerId",
                  "active",
                  "modelCount",
                  "runtime",
                  "models"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "providers"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "providers.usage.get",
        "title": "Provider Usage",
        "description": "Return usage and pricing posture for a single provider.",
        "category": "providers",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:providers"
        ],
        "http": {
          "method": "GET",
          "path": "/api/providers/{providerId}/usage"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "providerId": {
              "type": "string"
            }
          },
          "required": [
            "providerId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "providerId": {
              "type": "string"
            },
            "active": {
              "type": "boolean"
            },
            "currentModelRegistryKey": {
              "type": "string"
            },
            "pricingSource": {
              "type": "string",
              "enum": [
                "user",
                "catalog",
                "provider",
                "mixed",
                "none"
              ]
            },
            "pricingAsOf": {
              "type": "string"
            },
            "models": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "registryKey": {
                    "type": "string"
                  },
                  "displayName": {
                    "type": "string"
                  },
                  "selectable": {
                    "type": "boolean"
                  },
                  "contextWindow": {
                    "type": "number"
                  },
                  "tier": {
                    "type": "string"
                  },
                  "pricing": {
                    "type": "object",
                    "properties": {
                      "inputPerMillionTokens": {
                        "type": "number"
                      },
                      "outputPerMillionTokens": {
                        "type": "number"
                      },
                      "currency": {
                        "type": "string",
                        "enum": [
                          "USD"
                        ]
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "user",
                          "provider",
                          "catalog"
                        ]
                      },
                      "asOf": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "inputPerMillionTokens",
                      "outputPerMillionTokens",
                      "currency",
                      "source"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "id",
                  "registryKey",
                  "displayName",
                  "selectable",
                  "contextWindow"
                ],
                "additionalProperties": true
              }
            },
            "usage": {
              "type": "object",
              "properties": {
                "streaming": {
                  "type": "boolean"
                },
                "toolCalling": {
                  "type": "boolean"
                },
                "parallelTools": {
                  "type": "boolean"
                },
                "promptCaching": {
                  "type": "boolean"
                },
                "cost": {
                  "type": "object",
                  "properties": {
                    "source": {
                      "type": "string",
                      "enum": [
                        "catalog",
                        "provider",
                        "none"
                      ]
                    },
                    "currency": {
                      "type": "string"
                    },
                    "inputPerMillionTokens": {
                      "type": "number"
                    },
                    "outputPerMillionTokens": {
                      "type": "number"
                    },
                    "detail": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "source"
                  ],
                  "additionalProperties": true
                },
                "notes": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "streaming",
                "toolCalling",
                "parallelTools"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "providerId",
            "active",
            "pricingSource",
            "models",
            "usage"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "push.subscriptions.create",
        "title": "Register Web Push Subscription",
        "description": "Store a browser Push subscription (endpoint capability URL + p256dh/auth keys) for the authenticated operator so the daemon can deliver notifications to that device. When a stable deviceId is supplied the record reconciles on that device identity, a browser whose push endpoint rotated re-registers the same deviceId with a new endpoint and heals the one record in place rather than piling up a stale duplicate; without a deviceId it reconciles on the raw endpoint (legacy). The stored endpoint and keys are never returned over the wire; the response is the redacted subscription view.",
        "category": "push",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:push"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "endpoint": {
              "type": "string"
            },
            "keys": {
              "type": "object",
              "properties": {
                "p256dh": {
                  "type": "string"
                },
                "auth": {
                  "type": "string"
                }
              },
              "required": [
                "p256dh",
                "auth"
              ],
              "additionalProperties": false
            },
            "deviceId": {
              "type": "string"
            }
          },
          "required": [
            "endpoint",
            "keys"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "subscription": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "principalId": {
                  "type": "string"
                },
                "deviceId": {
                  "type": "string"
                },
                "endpointOrigin": {
                  "type": "string"
                },
                "endpointHash": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "lastDeliveryAt": {
                  "type": "number"
                },
                "lastOutcome": {
                  "type": "string"
                },
                "consecutiveFailures": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "principalId",
                "endpointOrigin",
                "endpointHash",
                "createdAt"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "subscription"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "push.subscriptions.delete",
        "title": "Delete Web Push Subscription",
        "description": "Permanently remove one of the authenticated operator's push subscriptions: the stored record (endpoint + keys) is dropped and cannot be listed afterward. An unknown id, or one owned by another principal, is a 404 SUBSCRIPTION_NOT_FOUND, never a 200-noop.",
        "category": "push",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:push"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "subscriptionId": {
              "type": "string"
            }
          },
          "required": [
            "subscriptionId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "subscriptionId": {
              "type": "string"
            },
            "deleted": {
              "type": "boolean"
            }
          },
          "required": [
            "subscriptionId",
            "deleted"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "push.subscriptions.list",
        "title": "List Web Push Subscriptions",
        "description": "List the authenticated operator's registered push devices as redacted subscription views (id, endpoint origin + hash, timestamps, last delivery outcome). The capability URL and key material are never included.",
        "category": "push",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "read:push"
        ],
        "outputSchema": {
          "type": "object",
          "properties": {
            "subscriptions": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "principalId": {
                    "type": "string"
                  },
                  "deviceId": {
                    "type": "string"
                  },
                  "endpointOrigin": {
                    "type": "string"
                  },
                  "endpointHash": {
                    "type": "string"
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "lastDeliveryAt": {
                    "type": "number"
                  },
                  "lastOutcome": {
                    "type": "string"
                  },
                  "consecutiveFailures": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "principalId",
                  "endpointOrigin",
                  "endpointHash",
                  "createdAt"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "subscriptions"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "push.subscriptions.reconcile",
        "title": "Reconcile Web Push Subscription",
        "description": "Reconcile-on-open: the client presents its device identity (deviceId) and its CURRENT endpoint + p256dh/auth keys, and the daemon heals the record for that device in place, updating a stale endpoint the daemon had been holding, then reports what drifted (created / endpoint-updated / keys-updated / unchanged) so the client learns whether the daemon was out of date. A live reconcile also clears the bounded-retry failure counter. The stored endpoint and keys are never returned; the response is the redacted subscription view plus the drift discriminant.",
        "category": "push",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:push"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "deviceId": {
              "type": "string"
            },
            "endpoint": {
              "type": "string"
            },
            "keys": {
              "type": "object",
              "properties": {
                "p256dh": {
                  "type": "string"
                },
                "auth": {
                  "type": "string"
                }
              },
              "required": [
                "p256dh",
                "auth"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "deviceId",
            "endpoint",
            "keys"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "subscription": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "principalId": {
                  "type": "string"
                },
                "deviceId": {
                  "type": "string"
                },
                "endpointOrigin": {
                  "type": "string"
                },
                "endpointHash": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "lastDeliveryAt": {
                  "type": "number"
                },
                "lastOutcome": {
                  "type": "string"
                },
                "consecutiveFailures": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "principalId",
                "endpointOrigin",
                "endpointHash",
                "createdAt"
              ],
              "additionalProperties": false
            },
            "drift": {
              "type": "string"
            }
          },
          "required": [
            "subscription",
            "drift"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "push.subscriptions.verify",
        "title": "Send Test Web Push",
        "description": "Send a live test notification to one of the authenticated operator's subscriptions and return an honest delivery receipt (delivered / pruned / failed). A subscription whose endpoint reports 404/410 gone is pruned as part of the attempt and the receipt says so. An unknown id, or one owned by another principal, is a 404 SUBSCRIPTION_NOT_FOUND.",
        "category": "push",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:push"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "subscriptionId": {
              "type": "string"
            }
          },
          "required": [
            "subscriptionId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "receipt": {
              "type": "object",
              "properties": {
                "subscriptionId": {
                  "type": "string"
                },
                "endpointOrigin": {
                  "type": "string"
                },
                "outcome": {
                  "type": "string"
                },
                "httpStatus": {
                  "type": "number"
                },
                "detail": {
                  "type": "string"
                }
              },
              "required": [
                "subscriptionId",
                "endpointOrigin",
                "outcome"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "receipt"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "push.vapid.get",
        "title": "Get Web Push Public Key",
        "description": "Return the daemon's public VAPID key (base64url application-server key) that a browser client passes to pushManager.subscribe(). The matching private key never leaves the daemon and is never returned by any verb.",
        "category": "push",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "read:push"
        ],
        "outputSchema": {
          "type": "object",
          "properties": {
            "publicKey": {
              "type": "string"
            }
          },
          "required": [
            "publicKey"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "quota.fanout.get",
        "title": "Assess Fan-out Against Quota Window",
        "description": "Assess whether spawning N agents against a provider likely exhausts its quota window right now, grounded in observed rate-limit signals (429 retry-after, and limit/remaining when headers carry them). verdict is likely-exhausts (with the evidence it rests on, an active cooldown or an observed remaining below the fan-out), unlikely (with the evidence), or unknown when no signal has been observed, never a fabricated certainty.",
        "category": "quota",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "read:telemetry"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "provider": {
              "type": "string"
            },
            "agentCount": {
              "type": "number"
            },
            "callsPerAgent": {
              "type": "number"
            }
          },
          "required": [
            "provider",
            "agentCount"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "provider": {
              "type": "string"
            },
            "verdict": {
              "type": "string",
              "enum": [
                "likely-exhausts",
                "unlikely",
                "unknown"
              ]
            },
            "reason": {
              "type": "string"
            },
            "evidence": {
              "type": "object",
              "properties": {
                "recentRateLimitCount": {
                  "type": "number"
                },
                "activeCooldownMs": {
                  "type": "number"
                },
                "observedRemaining": {
                  "type": "number"
                },
                "observedLimit": {
                  "type": "number"
                },
                "requestedAgents": {
                  "type": "number"
                }
              },
              "required": [
                "recentRateLimitCount",
                "requestedAgents"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "provider",
            "verdict",
            "reason",
            "evidence"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "quota.snapshot.get",
        "title": "Get Observed Quota Snapshot",
        "description": "Return the most recent observed quota window for a provider, remaining, limit, reset, and any active cooldown, parsed from rate-limit headers carried on ordinary (successful) responses, so a consumer can render remaining quota BEFORE hitting a limit. hasSignal is false (with the observed-* fields absent) when no rate-limit signal has been seen for the provider in the lookback window: an honest \"no observation\", never a fabricated full quota.",
        "category": "quota",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "read:telemetry"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "provider": {
              "type": "string"
            }
          },
          "required": [
            "provider"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "provider": {
              "type": "string"
            },
            "hasSignal": {
              "type": "boolean"
            },
            "observedAt": {
              "type": "number"
            },
            "remaining": {
              "type": "number"
            },
            "limit": {
              "type": "number"
            },
            "resetAt": {
              "type": "number"
            },
            "activeCooldownMs": {
              "type": "number"
            },
            "recentRateLimitCount": {
              "type": "number"
            }
          },
          "required": [
            "provider",
            "hasSignal",
            "recentRateLimitCount"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "stepup.challenge.mint",
        "title": "Mint Step-up Challenge",
        "description": "Issue a short-lived, single-use WebAuthn challenge bound to the calling session/rendezvous. A surface passes it to navigator.credentials.get and returns the assertion on its next mutating relay call. The freshness window (ttlMs) is clamped to 5s–300s (default 120s).",
        "category": "relay",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:relay"
        ],
        "http": {
          "method": "POST",
          "path": "/api/stepup/challenge"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "rendezvousId": {
              "type": "string"
            },
            "sessionId": {
              "type": "string"
            },
            "ttlMs": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "challengeId": {
              "type": "string"
            },
            "challenge": {
              "type": "string"
            },
            "expiresAt": {
              "type": "number"
            }
          },
          "required": [
            "challengeId",
            "challenge",
            "expiresAt"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "stepup.credentials.register",
        "title": "Register Step-up Credential",
        "description": "Store a WebAuthn (passkey) credential for relay step-up, its credentialId, COSE public key, and starting signature counter, and set the deployment policy (relying-party id, allowed origins, user-verification requirement). Admin/local-only: registering a step-up credential is itself a sensitive act. Self-hosted deployments register the credential directly ('none' attestation).",
        "category": "relay",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:relay"
        ],
        "http": {
          "method": "POST",
          "path": "/api/stepup/credentials"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "rpId": {
              "type": "string"
            },
            "origin": {
              "type": "string"
            },
            "credentialId": {
              "type": "string"
            },
            "publicKeyCose": {
              "type": "string"
            },
            "signCount": {
              "type": "number"
            },
            "userVerification": {
              "type": "string",
              "enum": [
                "required",
                "preferred",
                "discouraged"
              ]
            },
            "label": {
              "type": "string"
            }
          },
          "required": [
            "rpId",
            "origin",
            "credentialId",
            "publicKeyCose"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "credential": {
              "type": "object",
              "properties": {
                "credentialId": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "signCount": {
                  "type": "number"
                }
              },
              "required": [
                "credentialId",
                "createdAt",
                "signCount"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "credential"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "remote.node_host.contract",
        "title": "Node Host Contract",
        "description": "Return the distributed node/device host API contract.",
        "category": "remote",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:remote"
        ],
        "http": {
          "method": "GET",
          "path": "/api/remote/node-host/contract"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "contract": {
              "type": "object",
              "properties": {
                "schemaVersion": {
                  "type": "number"
                },
                "transport": {
                  "type": "string"
                },
                "basePath": {
                  "type": "string"
                },
                "peerKinds": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "node",
                      "device"
                    ]
                  }
                },
                "workTypes": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "invoke",
                      "status.request",
                      "location.request",
                      "session.message",
                      "automation.run",
                      "device.capability"
                    ]
                  }
                },
                "scopes": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "recommendedHeartbeatMs": {
                  "type": "number"
                },
                "recommendedWorkPullMs": {
                  "type": "number"
                },
                "endpoints": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "method": {
                        "type": "string",
                        "enum": [
                          "GET",
                          "POST"
                        ]
                      },
                      "path": {
                        "type": "string"
                      },
                      "auth": {
                        "type": "string",
                        "enum": [
                          "none",
                          "bearer-peer-token",
                          "bearer-operator-token"
                        ]
                      },
                      "description": {
                        "type": "string"
                      },
                      "requiredScope": {
                        "type": "string"
                      },
                      "inputSchema": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      },
                      "outputSchema": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "id",
                      "method",
                      "path",
                      "auth",
                      "description"
                    ],
                    "additionalProperties": true
                  }
                },
                "workCompletionStatuses": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "queued",
                      "claimed",
                      "completed",
                      "failed",
                      "cancelled",
                      "expired"
                    ]
                  }
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "schemaVersion",
                "transport",
                "basePath",
                "peerKinds",
                "workTypes",
                "scopes",
                "recommendedHeartbeatMs",
                "recommendedWorkPullMs",
                "endpoints",
                "workCompletionStatuses",
                "metadata"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "contract"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "remote.pair.requests.approve",
        "title": "Approve Remote Pair Request",
        "description": "Approve a pending remote pair request.",
        "category": "remote",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:remote"
        ],
        "http": {
          "method": "POST",
          "path": "/api/remote/pair/requests/{requestId}/approve"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "requestId": {
              "type": "string"
            },
            "note": {
              "type": "string"
            },
            "label": {
              "type": "string"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "requestId"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "request": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "peerKind": {
                  "type": "string",
                  "enum": [
                    "node",
                    "device"
                  ]
                },
                "requestedId": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "platform": {
                  "type": "string"
                },
                "deviceFamily": {
                  "type": "string"
                },
                "version": {
                  "type": "string"
                },
                "clientMode": {
                  "type": "string"
                },
                "capabilities": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "commands": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "requestedBy": {
                  "type": "string",
                  "enum": [
                    "remote",
                    "operator"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "approved",
                    "verified",
                    "rejected",
                    "expired"
                  ]
                },
                "challengePreview": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "approvedAt": {
                  "type": "number"
                },
                "verifiedAt": {
                  "type": "number"
                },
                "rejectedAt": {
                  "type": "number"
                },
                "expiresAt": {
                  "type": "number"
                },
                "peerId": {
                  "type": "string"
                },
                "remoteAddress": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "peerKind",
                "requestedId",
                "label",
                "capabilities",
                "commands",
                "requestedBy",
                "status",
                "challengePreview",
                "createdAt",
                "updatedAt",
                "expiresAt",
                "metadata"
              ],
              "additionalProperties": true
            },
            "peer": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "node",
                    "device"
                  ]
                },
                "label": {
                  "type": "string"
                },
                "requestedId": {
                  "type": "string"
                },
                "platform": {
                  "type": "string"
                },
                "deviceFamily": {
                  "type": "string"
                },
                "version": {
                  "type": "string"
                },
                "clientMode": {
                  "type": "string"
                },
                "capabilities": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "commands": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "permissions": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "boolean"
                  }
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "paired",
                    "connected",
                    "idle",
                    "disconnected",
                    "revoked"
                  ]
                },
                "pairedAt": {
                  "type": "number"
                },
                "verifiedAt": {
                  "type": "number"
                },
                "lastSeenAt": {
                  "type": "number"
                },
                "lastConnectedAt": {
                  "type": "number"
                },
                "lastDisconnectedAt": {
                  "type": "number"
                },
                "lastRemoteAddress": {
                  "type": "string"
                },
                "activeTokenId": {
                  "type": "string"
                },
                "tokens": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      },
                      "scopes": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "issuedAt": {
                        "type": "number"
                      },
                      "lastUsedAt": {
                        "type": "number"
                      },
                      "rotatedAt": {
                        "type": "number"
                      },
                      "revokedAt": {
                        "type": "number"
                      },
                      "fingerprint": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "label",
                      "scopes",
                      "issuedAt",
                      "fingerprint"
                    ],
                    "additionalProperties": true
                  }
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "kind",
                "label",
                "requestedId",
                "capabilities",
                "commands",
                "status",
                "pairedAt",
                "tokens",
                "metadata"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "request",
            "peer"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "remote.pair.requests.list",
        "title": "List Remote Pair Requests",
        "description": "Return pending remote pair requests.",
        "category": "remote",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:remote"
        ],
        "http": {
          "method": "GET",
          "path": "/api/remote/pair/requests"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "requests": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "peerKind": {
                    "type": "string",
                    "enum": [
                      "node",
                      "device"
                    ]
                  },
                  "requestedId": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "platform": {
                    "type": "string"
                  },
                  "deviceFamily": {
                    "type": "string"
                  },
                  "version": {
                    "type": "string"
                  },
                  "clientMode": {
                    "type": "string"
                  },
                  "capabilities": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "commands": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "requestedBy": {
                    "type": "string",
                    "enum": [
                      "remote",
                      "operator"
                    ]
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "pending",
                      "approved",
                      "verified",
                      "rejected",
                      "expired"
                    ]
                  },
                  "challengePreview": {
                    "type": "string"
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  },
                  "approvedAt": {
                    "type": "number"
                  },
                  "verifiedAt": {
                    "type": "number"
                  },
                  "rejectedAt": {
                    "type": "number"
                  },
                  "expiresAt": {
                    "type": "number"
                  },
                  "peerId": {
                    "type": "string"
                  },
                  "remoteAddress": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "peerKind",
                  "requestedId",
                  "label",
                  "capabilities",
                  "commands",
                  "requestedBy",
                  "status",
                  "challengePreview",
                  "createdAt",
                  "updatedAt",
                  "expiresAt",
                  "metadata"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "requests"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "remote.pair.requests.reject",
        "title": "Reject Remote Pair Request",
        "description": "Reject a pending remote pair request.",
        "category": "remote",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:remote"
        ],
        "http": {
          "method": "POST",
          "path": "/api/remote/pair/requests/{requestId}/reject"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "requestId": {
              "type": "string"
            },
            "note": {
              "type": "string"
            },
            "label": {
              "type": "string"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "requestId"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "request": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "peerKind": {
                  "type": "string",
                  "enum": [
                    "node",
                    "device"
                  ]
                },
                "requestedId": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "platform": {
                  "type": "string"
                },
                "deviceFamily": {
                  "type": "string"
                },
                "version": {
                  "type": "string"
                },
                "clientMode": {
                  "type": "string"
                },
                "capabilities": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "commands": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "requestedBy": {
                  "type": "string",
                  "enum": [
                    "remote",
                    "operator"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "approved",
                    "verified",
                    "rejected",
                    "expired"
                  ]
                },
                "challengePreview": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "approvedAt": {
                  "type": "number"
                },
                "verifiedAt": {
                  "type": "number"
                },
                "rejectedAt": {
                  "type": "number"
                },
                "expiresAt": {
                  "type": "number"
                },
                "peerId": {
                  "type": "string"
                },
                "remoteAddress": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "peerKind",
                "requestedId",
                "label",
                "capabilities",
                "commands",
                "requestedBy",
                "status",
                "challengePreview",
                "createdAt",
                "updatedAt",
                "expiresAt",
                "metadata"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "request"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "remote.peers.disconnect",
        "title": "Disconnect Remote Peer",
        "description": "Disconnect a remote peer.",
        "category": "remote",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:remote"
        ],
        "http": {
          "method": "POST",
          "path": "/api/remote/peers/{peerId}/disconnect"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "peerId": {
              "type": "string"
            },
            "note": {
              "type": "string"
            },
            "requeueClaimedWork": {
              "type": "boolean"
            }
          },
          "required": [
            "peerId"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "peer": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "node",
                    "device"
                  ]
                },
                "label": {
                  "type": "string"
                },
                "requestedId": {
                  "type": "string"
                },
                "platform": {
                  "type": "string"
                },
                "deviceFamily": {
                  "type": "string"
                },
                "version": {
                  "type": "string"
                },
                "clientMode": {
                  "type": "string"
                },
                "capabilities": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "commands": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "permissions": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "boolean"
                  }
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "paired",
                    "connected",
                    "idle",
                    "disconnected",
                    "revoked"
                  ]
                },
                "pairedAt": {
                  "type": "number"
                },
                "verifiedAt": {
                  "type": "number"
                },
                "lastSeenAt": {
                  "type": "number"
                },
                "lastConnectedAt": {
                  "type": "number"
                },
                "lastDisconnectedAt": {
                  "type": "number"
                },
                "lastRemoteAddress": {
                  "type": "string"
                },
                "activeTokenId": {
                  "type": "string"
                },
                "tokens": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      },
                      "scopes": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "issuedAt": {
                        "type": "number"
                      },
                      "lastUsedAt": {
                        "type": "number"
                      },
                      "rotatedAt": {
                        "type": "number"
                      },
                      "revokedAt": {
                        "type": "number"
                      },
                      "fingerprint": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "label",
                      "scopes",
                      "issuedAt",
                      "fingerprint"
                    ],
                    "additionalProperties": true
                  }
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "kind",
                "label",
                "requestedId",
                "capabilities",
                "commands",
                "status",
                "pairedAt",
                "tokens",
                "metadata"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "peer"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "remote.peers.invoke",
        "title": "Invoke Remote Peer",
        "description": "Invoke a method on a connected remote peer.",
        "category": "remote",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:remote"
        ],
        "http": {
          "method": "POST",
          "path": "/api/remote/peers/{peerId}/invoke"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "peerId": {
              "type": "string"
            },
            "command": {
              "type": "string"
            },
            "payload": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                },
                {
                  "type": "object",
                  "additionalProperties": {}
                },
                {
                  "type": "array",
                  "items": {}
                }
              ]
            },
            "priority": {
              "type": "string",
              "enum": [
                "default",
                "normal",
                "high"
              ]
            },
            "waitMs": {
              "type": "number"
            },
            "timeoutMs": {
              "type": "number"
            },
            "sessionId": {
              "type": "string"
            },
            "routeId": {
              "type": "string"
            },
            "automationRunId": {
              "type": "string"
            },
            "automationJobId": {
              "type": "string"
            },
            "approvalId": {
              "type": "string"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "peerId",
            "command"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "work": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "peerId": {
                  "type": "string"
                },
                "peerKind": {
                  "type": "string",
                  "enum": [
                    "node",
                    "device"
                  ]
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "invoke",
                    "status.request",
                    "location.request",
                    "session.message",
                    "automation.run",
                    "device.capability"
                  ]
                },
                "command": {
                  "type": "string"
                },
                "priority": {
                  "type": "string",
                  "enum": [
                    "default",
                    "normal",
                    "high"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "claimed",
                    "completed",
                    "failed",
                    "cancelled",
                    "expired"
                  ]
                },
                "payload": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    },
                    {
                      "type": "object",
                      "additionalProperties": {}
                    },
                    {
                      "type": "array",
                      "items": {}
                    }
                  ]
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "queuedBy": {
                  "type": "string"
                },
                "claimedAt": {
                  "type": "number"
                },
                "claimTokenId": {
                  "type": "string"
                },
                "leaseExpiresAt": {
                  "type": "number"
                },
                "completedAt": {
                  "type": "number"
                },
                "timeoutMs": {
                  "type": "number"
                },
                "sessionId": {
                  "type": "string"
                },
                "routeId": {
                  "type": "string"
                },
                "automationRunId": {
                  "type": "string"
                },
                "automationJobId": {
                  "type": "string"
                },
                "approvalId": {
                  "type": "string"
                },
                "result": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    },
                    {
                      "type": "object",
                      "additionalProperties": {}
                    },
                    {
                      "type": "array",
                      "items": {}
                    }
                  ]
                },
                "error": {
                  "type": "string"
                },
                "telemetry": {
                  "type": "object",
                  "properties": {
                    "usage": {
                      "type": "object",
                      "properties": {
                        "inputTokens": {
                          "type": "number"
                        },
                        "outputTokens": {
                          "type": "number"
                        },
                        "cacheReadTokens": {
                          "type": "number"
                        },
                        "cacheWriteTokens": {
                          "type": "number"
                        },
                        "reasoningTokens": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "inputTokens",
                        "outputTokens",
                        "cacheReadTokens",
                        "cacheWriteTokens"
                      ],
                      "additionalProperties": false
                    },
                    "llmCallCount": {
                      "type": "number"
                    },
                    "toolCallCount": {
                      "type": "number"
                    },
                    "turnCount": {
                      "type": "number"
                    },
                    "modelId": {
                      "type": "string"
                    },
                    "providerId": {
                      "type": "string"
                    },
                    "reasoningSummaryPresent": {
                      "type": "boolean"
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "local-agent",
                        "shared-session",
                        "remote-node",
                        "remote-device"
                      ]
                    }
                  },
                  "required": [
                    "usage"
                  ],
                  "additionalProperties": true
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "peerId",
                "peerKind",
                "type",
                "command",
                "priority",
                "status",
                "createdAt",
                "updatedAt",
                "queuedBy",
                "metadata"
              ],
              "additionalProperties": true
            },
            "completed": {
              "type": "boolean"
            }
          },
          "required": [
            "work",
            "completed"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "remote.peers.list",
        "title": "List Remote Peers",
        "description": "Return known remote peers.",
        "category": "remote",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:remote"
        ],
        "http": {
          "method": "GET",
          "path": "/api/remote/peers"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "peers": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "node",
                      "device"
                    ]
                  },
                  "label": {
                    "type": "string"
                  },
                  "requestedId": {
                    "type": "string"
                  },
                  "platform": {
                    "type": "string"
                  },
                  "deviceFamily": {
                    "type": "string"
                  },
                  "version": {
                    "type": "string"
                  },
                  "clientMode": {
                    "type": "string"
                  },
                  "capabilities": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "commands": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "permissions": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "boolean"
                    }
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "paired",
                      "connected",
                      "idle",
                      "disconnected",
                      "revoked"
                    ]
                  },
                  "pairedAt": {
                    "type": "number"
                  },
                  "verifiedAt": {
                    "type": "number"
                  },
                  "lastSeenAt": {
                    "type": "number"
                  },
                  "lastConnectedAt": {
                    "type": "number"
                  },
                  "lastDisconnectedAt": {
                    "type": "number"
                  },
                  "lastRemoteAddress": {
                    "type": "string"
                  },
                  "activeTokenId": {
                    "type": "string"
                  },
                  "tokens": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "issuedAt": {
                          "type": "number"
                        },
                        "lastUsedAt": {
                          "type": "number"
                        },
                        "rotatedAt": {
                          "type": "number"
                        },
                        "revokedAt": {
                          "type": "number"
                        },
                        "fingerprint": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "label",
                        "scopes",
                        "issuedAt",
                        "fingerprint"
                      ],
                      "additionalProperties": true
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "kind",
                  "label",
                  "requestedId",
                  "capabilities",
                  "commands",
                  "status",
                  "pairedAt",
                  "tokens",
                  "metadata"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "peers"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "remote.peers.token.revoke",
        "title": "Revoke Remote Peer Token",
        "description": "Revoke the active token for a remote peer.",
        "category": "remote",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:remote"
        ],
        "http": {
          "method": "POST",
          "path": "/api/remote/peers/{peerId}/token/revoke"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "peerId": {
              "type": "string"
            },
            "tokenId": {
              "type": "string"
            },
            "note": {
              "type": "string"
            }
          },
          "required": [
            "peerId"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "peer": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "node",
                    "device"
                  ]
                },
                "label": {
                  "type": "string"
                },
                "requestedId": {
                  "type": "string"
                },
                "platform": {
                  "type": "string"
                },
                "deviceFamily": {
                  "type": "string"
                },
                "version": {
                  "type": "string"
                },
                "clientMode": {
                  "type": "string"
                },
                "capabilities": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "commands": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "permissions": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "boolean"
                  }
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "paired",
                    "connected",
                    "idle",
                    "disconnected",
                    "revoked"
                  ]
                },
                "pairedAt": {
                  "type": "number"
                },
                "verifiedAt": {
                  "type": "number"
                },
                "lastSeenAt": {
                  "type": "number"
                },
                "lastConnectedAt": {
                  "type": "number"
                },
                "lastDisconnectedAt": {
                  "type": "number"
                },
                "lastRemoteAddress": {
                  "type": "string"
                },
                "activeTokenId": {
                  "type": "string"
                },
                "tokens": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      },
                      "scopes": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "issuedAt": {
                        "type": "number"
                      },
                      "lastUsedAt": {
                        "type": "number"
                      },
                      "rotatedAt": {
                        "type": "number"
                      },
                      "revokedAt": {
                        "type": "number"
                      },
                      "fingerprint": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "label",
                      "scopes",
                      "issuedAt",
                      "fingerprint"
                    ],
                    "additionalProperties": true
                  }
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "kind",
                "label",
                "requestedId",
                "capabilities",
                "commands",
                "status",
                "pairedAt",
                "tokens",
                "metadata"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "peer"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "remote.peers.token.rotate",
        "title": "Rotate Remote Peer Token",
        "description": "Rotate the active token for a remote peer.",
        "category": "remote",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:remote"
        ],
        "http": {
          "method": "POST",
          "path": "/api/remote/peers/{peerId}/token/rotate"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "peerId": {
              "type": "string"
            },
            "label": {
              "type": "string"
            },
            "scopes": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "peerId"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "peer": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "node",
                    "device"
                  ]
                },
                "label": {
                  "type": "string"
                },
                "requestedId": {
                  "type": "string"
                },
                "platform": {
                  "type": "string"
                },
                "deviceFamily": {
                  "type": "string"
                },
                "version": {
                  "type": "string"
                },
                "clientMode": {
                  "type": "string"
                },
                "capabilities": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "commands": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "permissions": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "boolean"
                  }
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "paired",
                    "connected",
                    "idle",
                    "disconnected",
                    "revoked"
                  ]
                },
                "pairedAt": {
                  "type": "number"
                },
                "verifiedAt": {
                  "type": "number"
                },
                "lastSeenAt": {
                  "type": "number"
                },
                "lastConnectedAt": {
                  "type": "number"
                },
                "lastDisconnectedAt": {
                  "type": "number"
                },
                "lastRemoteAddress": {
                  "type": "string"
                },
                "activeTokenId": {
                  "type": "string"
                },
                "tokens": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      },
                      "scopes": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "issuedAt": {
                        "type": "number"
                      },
                      "lastUsedAt": {
                        "type": "number"
                      },
                      "rotatedAt": {
                        "type": "number"
                      },
                      "revokedAt": {
                        "type": "number"
                      },
                      "fingerprint": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "label",
                      "scopes",
                      "issuedAt",
                      "fingerprint"
                    ],
                    "additionalProperties": true
                  }
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "kind",
                "label",
                "requestedId",
                "capabilities",
                "commands",
                "status",
                "pairedAt",
                "tokens",
                "metadata"
              ],
              "additionalProperties": true
            },
            "token": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "scopes": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "issuedAt": {
                  "type": "number"
                },
                "lastUsedAt": {
                  "type": "number"
                },
                "rotatedAt": {
                  "type": "number"
                },
                "revokedAt": {
                  "type": "number"
                },
                "fingerprint": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "label",
                "scopes",
                "issuedAt",
                "fingerprint",
                "value"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "peer",
            "token"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "remote.snapshot",
        "title": "Remote Runtime Snapshot",
        "description": "Return distributed node/device runtime state.",
        "category": "remote",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:remote"
        ],
        "http": {
          "method": "GET",
          "path": "/api/remote"
        },
        "events": [
          "runtime.control-plane"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "daemon": {
              "type": "object",
              "properties": {
                "transportState": {
                  "type": "string"
                },
                "isRunning": {
                  "type": "boolean"
                },
                "reconnectAttempts": {
                  "type": "number"
                },
                "runningJobCount": {
                  "type": "number"
                },
                "lastError": {
                  "type": "string"
                }
              },
              "required": [
                "transportState",
                "isRunning",
                "reconnectAttempts",
                "runningJobCount"
              ],
              "additionalProperties": true
            },
            "acp": {
              "type": "object",
              "properties": {
                "transportState": {
                  "type": "string"
                },
                "activeConnectionIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "totalSpawned": {
                  "type": "number"
                },
                "totalFailed": {
                  "type": "number"
                },
                "lastError": {
                  "type": "string"
                }
              },
              "required": [
                "transportState",
                "activeConnectionIds",
                "totalSpawned",
                "totalFailed"
              ],
              "additionalProperties": true
            },
            "registry": {
              "type": "object",
              "properties": {
                "pools": {
                  "type": "number"
                },
                "contracts": {
                  "type": "number"
                },
                "artifacts": {
                  "type": "number"
                },
                "poolEntries": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      },
                      "trustClass": {
                        "type": "string"
                      },
                      "preferredTemplate": {
                        "type": "string"
                      },
                      "maxRunners": {
                        "type": "number"
                      },
                      "runnerIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "id",
                      "label",
                      "trustClass",
                      "preferredTemplate",
                      "maxRunners",
                      "runnerIds"
                    ],
                    "additionalProperties": true
                  }
                },
                "contractEntries": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "runnerId": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      },
                      "template": {
                        "type": "string"
                      },
                      "poolId": {
                        "type": "string"
                      },
                      "taskId": {
                        "type": "string"
                      },
                      "sourceTransport": {
                        "type": "string"
                      },
                      "trustClass": {
                        "type": "string"
                      },
                      "executionProtocol": {
                        "type": "string"
                      },
                      "reviewMode": {
                        "type": "string"
                      },
                      "communicationLane": {
                        "type": "string"
                      },
                      "transportState": {
                        "type": "string"
                      },
                      "lastError": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "runnerId",
                      "label",
                      "template",
                      "sourceTransport",
                      "trustClass",
                      "executionProtocol",
                      "reviewMode",
                      "communicationLane",
                      "transportState"
                    ],
                    "additionalProperties": true
                  }
                },
                "artifactEntries": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "runnerId": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "status": {
                        "type": "string"
                      },
                      "summary": {
                        "type": "string"
                      },
                      "error": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "runnerId",
                      "createdAt",
                      "status",
                      "summary"
                    ],
                    "additionalProperties": true
                  }
                }
              },
              "required": [
                "pools",
                "contracts",
                "artifacts",
                "poolEntries",
                "contractEntries",
                "artifactEntries"
              ],
              "additionalProperties": false
            },
            "supervisor": {
              "type": "object",
              "properties": {
                "sessions": {
                  "type": "number"
                },
                "degraded": {
                  "type": "number"
                },
                "capturedAt": {
                  "type": "number"
                },
                "entries": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "runnerId": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      },
                      "transportState": {
                        "type": "string"
                      },
                      "heartbeat": {
                        "type": "string"
                      },
                      "taskId": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "runnerId",
                      "label",
                      "transportState",
                      "heartbeat"
                    ],
                    "additionalProperties": true
                  }
                }
              },
              "required": [
                "sessions",
                "degraded",
                "capturedAt",
                "entries"
              ],
              "additionalProperties": false
            },
            "distributed": {
              "type": "object",
              "properties": {
                "pairRequests": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "peerKind": {
                        "type": "string",
                        "enum": [
                          "node",
                          "device"
                        ]
                      },
                      "requestedId": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      },
                      "platform": {
                        "type": "string"
                      },
                      "deviceFamily": {
                        "type": "string"
                      },
                      "version": {
                        "type": "string"
                      },
                      "clientMode": {
                        "type": "string"
                      },
                      "capabilities": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "commands": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "requestedBy": {
                        "type": "string",
                        "enum": [
                          "remote",
                          "operator"
                        ]
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "pending",
                          "approved",
                          "verified",
                          "rejected",
                          "expired"
                        ]
                      },
                      "challengePreview": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "updatedAt": {
                        "type": "number"
                      },
                      "approvedAt": {
                        "type": "number"
                      },
                      "verifiedAt": {
                        "type": "number"
                      },
                      "rejectedAt": {
                        "type": "number"
                      },
                      "expiresAt": {
                        "type": "number"
                      },
                      "peerId": {
                        "type": "string"
                      },
                      "remoteAddress": {
                        "type": "string"
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "id",
                      "peerKind",
                      "requestedId",
                      "label",
                      "capabilities",
                      "commands",
                      "requestedBy",
                      "status",
                      "challengePreview",
                      "createdAt",
                      "updatedAt",
                      "expiresAt",
                      "metadata"
                    ],
                    "additionalProperties": true
                  }
                },
                "peers": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "node",
                          "device"
                        ]
                      },
                      "label": {
                        "type": "string"
                      },
                      "requestedId": {
                        "type": "string"
                      },
                      "platform": {
                        "type": "string"
                      },
                      "deviceFamily": {
                        "type": "string"
                      },
                      "version": {
                        "type": "string"
                      },
                      "clientMode": {
                        "type": "string"
                      },
                      "capabilities": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "commands": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "permissions": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "boolean"
                        }
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "paired",
                          "connected",
                          "idle",
                          "disconnected",
                          "revoked"
                        ]
                      },
                      "pairedAt": {
                        "type": "number"
                      },
                      "verifiedAt": {
                        "type": "number"
                      },
                      "lastSeenAt": {
                        "type": "number"
                      },
                      "lastConnectedAt": {
                        "type": "number"
                      },
                      "lastDisconnectedAt": {
                        "type": "number"
                      },
                      "lastRemoteAddress": {
                        "type": "string"
                      },
                      "activeTokenId": {
                        "type": "string"
                      },
                      "tokens": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "label": {
                              "type": "string"
                            },
                            "scopes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "issuedAt": {
                              "type": "number"
                            },
                            "lastUsedAt": {
                              "type": "number"
                            },
                            "rotatedAt": {
                              "type": "number"
                            },
                            "revokedAt": {
                              "type": "number"
                            },
                            "fingerprint": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "label",
                            "scopes",
                            "issuedAt",
                            "fingerprint"
                          ],
                          "additionalProperties": true
                        }
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "id",
                      "kind",
                      "label",
                      "requestedId",
                      "capabilities",
                      "commands",
                      "status",
                      "pairedAt",
                      "tokens",
                      "metadata"
                    ],
                    "additionalProperties": true
                  }
                },
                "work": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "peerId": {
                        "type": "string"
                      },
                      "peerKind": {
                        "type": "string",
                        "enum": [
                          "node",
                          "device"
                        ]
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "invoke",
                          "status.request",
                          "location.request",
                          "session.message",
                          "automation.run",
                          "device.capability"
                        ]
                      },
                      "command": {
                        "type": "string"
                      },
                      "priority": {
                        "type": "string",
                        "enum": [
                          "default",
                          "normal",
                          "high"
                        ]
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "queued",
                          "claimed",
                          "completed",
                          "failed",
                          "cancelled",
                          "expired"
                        ]
                      },
                      "payload": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "updatedAt": {
                        "type": "number"
                      },
                      "queuedBy": {
                        "type": "string"
                      },
                      "claimedAt": {
                        "type": "number"
                      },
                      "claimTokenId": {
                        "type": "string"
                      },
                      "leaseExpiresAt": {
                        "type": "number"
                      },
                      "completedAt": {
                        "type": "number"
                      },
                      "timeoutMs": {
                        "type": "number"
                      },
                      "sessionId": {
                        "type": "string"
                      },
                      "routeId": {
                        "type": "string"
                      },
                      "automationRunId": {
                        "type": "string"
                      },
                      "automationJobId": {
                        "type": "string"
                      },
                      "approvalId": {
                        "type": "string"
                      },
                      "result": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      },
                      "error": {
                        "type": "string"
                      },
                      "telemetry": {
                        "type": "object",
                        "properties": {
                          "usage": {
                            "type": "object",
                            "properties": {
                              "inputTokens": {
                                "type": "number"
                              },
                              "outputTokens": {
                                "type": "number"
                              },
                              "cacheReadTokens": {
                                "type": "number"
                              },
                              "cacheWriteTokens": {
                                "type": "number"
                              },
                              "reasoningTokens": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "inputTokens",
                              "outputTokens",
                              "cacheReadTokens",
                              "cacheWriteTokens"
                            ],
                            "additionalProperties": false
                          },
                          "llmCallCount": {
                            "type": "number"
                          },
                          "toolCallCount": {
                            "type": "number"
                          },
                          "turnCount": {
                            "type": "number"
                          },
                          "modelId": {
                            "type": "string"
                          },
                          "providerId": {
                            "type": "string"
                          },
                          "reasoningSummaryPresent": {
                            "type": "boolean"
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "local-agent",
                              "shared-session",
                              "remote-node",
                              "remote-device"
                            ]
                          }
                        },
                        "required": [
                          "usage"
                        ],
                        "additionalProperties": true
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "id",
                      "peerId",
                      "peerKind",
                      "type",
                      "command",
                      "priority",
                      "status",
                      "createdAt",
                      "updatedAt",
                      "queuedBy",
                      "metadata"
                    ],
                    "additionalProperties": true
                  }
                },
                "audit": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "action": {
                        "type": "string",
                        "enum": [
                          "pair-requested",
                          "pair-approved",
                          "pair-rejected",
                          "pair-verified",
                          "pair-expired",
                          "token-rotated",
                          "token-revoked",
                          "peer-connected",
                          "peer-disconnected",
                          "work-queued",
                          "work-claimed",
                          "work-completed",
                          "work-failed",
                          "work-cancelled",
                          "work-expired"
                        ]
                      },
                      "actor": {
                        "type": "string"
                      },
                      "peerId": {
                        "type": "string"
                      },
                      "requestId": {
                        "type": "string"
                      },
                      "workId": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "note": {
                        "type": "string"
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "id",
                      "action",
                      "actor",
                      "createdAt",
                      "metadata"
                    ],
                    "additionalProperties": true
                  }
                }
              },
              "required": [
                "pairRequests",
                "peers",
                "work",
                "audit"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "daemon",
            "acp",
            "registry",
            "supervisor",
            "distributed"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "remote.work.cancel",
        "title": "Cancel Remote Work",
        "description": "Cancel a remote work item.",
        "category": "remote",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:remote"
        ],
        "http": {
          "method": "POST",
          "path": "/api/remote/work/{workId}/cancel"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "workId": {
              "type": "string"
            },
            "reason": {
              "type": "string"
            }
          },
          "required": [
            "workId"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "work": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "peerId": {
                  "type": "string"
                },
                "peerKind": {
                  "type": "string",
                  "enum": [
                    "node",
                    "device"
                  ]
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "invoke",
                    "status.request",
                    "location.request",
                    "session.message",
                    "automation.run",
                    "device.capability"
                  ]
                },
                "command": {
                  "type": "string"
                },
                "priority": {
                  "type": "string",
                  "enum": [
                    "default",
                    "normal",
                    "high"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "claimed",
                    "completed",
                    "failed",
                    "cancelled",
                    "expired"
                  ]
                },
                "payload": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    },
                    {
                      "type": "object",
                      "additionalProperties": {}
                    },
                    {
                      "type": "array",
                      "items": {}
                    }
                  ]
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "queuedBy": {
                  "type": "string"
                },
                "claimedAt": {
                  "type": "number"
                },
                "claimTokenId": {
                  "type": "string"
                },
                "leaseExpiresAt": {
                  "type": "number"
                },
                "completedAt": {
                  "type": "number"
                },
                "timeoutMs": {
                  "type": "number"
                },
                "sessionId": {
                  "type": "string"
                },
                "routeId": {
                  "type": "string"
                },
                "automationRunId": {
                  "type": "string"
                },
                "automationJobId": {
                  "type": "string"
                },
                "approvalId": {
                  "type": "string"
                },
                "result": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    },
                    {
                      "type": "object",
                      "additionalProperties": {}
                    },
                    {
                      "type": "array",
                      "items": {}
                    }
                  ]
                },
                "error": {
                  "type": "string"
                },
                "telemetry": {
                  "type": "object",
                  "properties": {
                    "usage": {
                      "type": "object",
                      "properties": {
                        "inputTokens": {
                          "type": "number"
                        },
                        "outputTokens": {
                          "type": "number"
                        },
                        "cacheReadTokens": {
                          "type": "number"
                        },
                        "cacheWriteTokens": {
                          "type": "number"
                        },
                        "reasoningTokens": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "inputTokens",
                        "outputTokens",
                        "cacheReadTokens",
                        "cacheWriteTokens"
                      ],
                      "additionalProperties": false
                    },
                    "llmCallCount": {
                      "type": "number"
                    },
                    "toolCallCount": {
                      "type": "number"
                    },
                    "turnCount": {
                      "type": "number"
                    },
                    "modelId": {
                      "type": "string"
                    },
                    "providerId": {
                      "type": "string"
                    },
                    "reasoningSummaryPresent": {
                      "type": "boolean"
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "local-agent",
                        "shared-session",
                        "remote-node",
                        "remote-device"
                      ]
                    }
                  },
                  "required": [
                    "usage"
                  ],
                  "additionalProperties": true
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "peerId",
                "peerKind",
                "type",
                "command",
                "priority",
                "status",
                "createdAt",
                "updatedAt",
                "queuedBy",
                "metadata"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "work"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "remote.work.list",
        "title": "List Remote Work",
        "description": "Return queued and leased remote work items.",
        "category": "remote",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:remote"
        ],
        "http": {
          "method": "GET",
          "path": "/api/remote/work"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "work": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "peerId": {
                    "type": "string"
                  },
                  "peerKind": {
                    "type": "string",
                    "enum": [
                      "node",
                      "device"
                    ]
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "invoke",
                      "status.request",
                      "location.request",
                      "session.message",
                      "automation.run",
                      "device.capability"
                    ]
                  },
                  "command": {
                    "type": "string"
                  },
                  "priority": {
                    "type": "string",
                    "enum": [
                      "default",
                      "normal",
                      "high"
                    ]
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "queued",
                      "claimed",
                      "completed",
                      "failed",
                      "cancelled",
                      "expired"
                    ]
                  },
                  "payload": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  },
                  "queuedBy": {
                    "type": "string"
                  },
                  "claimedAt": {
                    "type": "number"
                  },
                  "claimTokenId": {
                    "type": "string"
                  },
                  "leaseExpiresAt": {
                    "type": "number"
                  },
                  "completedAt": {
                    "type": "number"
                  },
                  "timeoutMs": {
                    "type": "number"
                  },
                  "sessionId": {
                    "type": "string"
                  },
                  "routeId": {
                    "type": "string"
                  },
                  "automationRunId": {
                    "type": "string"
                  },
                  "automationJobId": {
                    "type": "string"
                  },
                  "approvalId": {
                    "type": "string"
                  },
                  "result": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  },
                  "error": {
                    "type": "string"
                  },
                  "telemetry": {
                    "type": "object",
                    "properties": {
                      "usage": {
                        "type": "object",
                        "properties": {
                          "inputTokens": {
                            "type": "number"
                          },
                          "outputTokens": {
                            "type": "number"
                          },
                          "cacheReadTokens": {
                            "type": "number"
                          },
                          "cacheWriteTokens": {
                            "type": "number"
                          },
                          "reasoningTokens": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "inputTokens",
                          "outputTokens",
                          "cacheReadTokens",
                          "cacheWriteTokens"
                        ],
                        "additionalProperties": false
                      },
                      "llmCallCount": {
                        "type": "number"
                      },
                      "toolCallCount": {
                        "type": "number"
                      },
                      "turnCount": {
                        "type": "number"
                      },
                      "modelId": {
                        "type": "string"
                      },
                      "providerId": {
                        "type": "string"
                      },
                      "reasoningSummaryPresent": {
                        "type": "boolean"
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "local-agent",
                          "shared-session",
                          "remote-node",
                          "remote-device"
                        ]
                      }
                    },
                    "required": [
                      "usage"
                    ],
                    "additionalProperties": true
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "peerId",
                  "peerKind",
                  "type",
                  "command",
                  "priority",
                  "status",
                  "createdAt",
                  "updatedAt",
                  "queuedBy",
                  "metadata"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "work"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "tailscale.get",
        "title": "Detect Tailscale Environment",
        "description": "READ-ONLY detection of a usable tailscale environment: binary present, logged-in status, MagicDNS name, and the https URL `tailscale serve` would yield. Never invokes a state-changing tailscale command. Where tailscale is absent the result says so once, surfaces offer the auto-wire affordance only when this reports a usable environment; nothing nags. Includes the most recent serve receipt, if any.",
        "category": "remote-access",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "read:control-plane"
        ],
        "outputSchema": {
          "type": "object",
          "properties": {
            "available": {
              "type": "boolean"
            },
            "loggedIn": {
              "type": "boolean"
            },
            "magicDnsName": {
              "type": "string"
            },
            "httpsUrl": {
              "type": "string"
            },
            "detail": {
              "type": "string"
            },
            "lastServe": {
              "type": "object",
              "properties": {
                "at": {
                  "type": "number"
                },
                "command": {
                  "type": "string"
                },
                "ok": {
                  "type": "boolean"
                },
                "url": {
                  "type": "string"
                },
                "detail": {
                  "type": "string"
                }
              },
              "required": [
                "at",
                "command",
                "ok",
                "detail"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "available",
            "loggedIn",
            "detail"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "tailscale.serve.run",
        "title": "Set Up Tailscale Serve For The Daemon",
        "description": "The one-action https affordance: run `tailscale serve --bg <web port>` so tailscale fronts the daemon's web surface at its https MagicDNS URL. This is the ONLY state-changing tailscale command the daemon ever runs, and only from this explicit user-initiated verb. The attempt is recorded with an honest receipt either way; on success web.publicBaseUrl is updated to the https URL from the same resolution. The daemon never mints certificates, TLS is terminated by tailscale.",
        "category": "remote-access",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:control-plane"
        ],
        "outputSchema": {
          "type": "object",
          "properties": {
            "receipt": {
              "type": "object",
              "properties": {
                "at": {
                  "type": "number"
                },
                "command": {
                  "type": "string"
                },
                "ok": {
                  "type": "boolean"
                },
                "url": {
                  "type": "string"
                },
                "detail": {
                  "type": "string"
                }
              },
              "required": [
                "at",
                "command",
                "ok",
                "detail"
              ],
              "additionalProperties": false
            },
            "publicBaseUrlUpdated": {
              "type": "boolean"
            }
          },
          "required": [
            "receipt",
            "publicBaseUrlUpdated"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "review.snapshot",
        "title": "Review Snapshot",
        "description": "Return the integration review snapshot used by external helpers.",
        "category": "review",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:automation"
        ],
        "http": {
          "method": "GET",
          "path": "/api/review"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "apiFamilies": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "routes": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "sessions": {
              "type": "number"
            },
            "tasks": {
              "type": "number"
            },
            "pendingApprovals": {
              "type": "number"
            },
            "remoteContracts": {
              "type": "number"
            },
            "panels": {
              "type": "number"
            }
          },
          "required": [
            "apiFamilies",
            "routes",
            "sessions",
            "tasks",
            "pendingApprovals",
            "remoteContracts",
            "panels"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "rewind.apply",
        "title": "Apply a Unified Rewind",
        "description": "Apply a unified rewind to a session turn anchor, restoring files and/or conversation. DESTRUCTIVE: requires confirmation, either the confirmToken minted by rewind.plan (single-use, ~2 min) or confirm:true. Called without either, it returns a non-error refusal (refused:true) naming rewind.plan, never a silent no-op; a bad token is a 400. Every apply records an undo point (the workspace restore takes a pre-restore safety checkpoint; the conversation store captures its pre-rewind snapshot) so the rewind is itself reversible, and returns a receipt whose `undo` block carries how to reverse it. Emits a REWIND_APPLIED receipt event.",
        "category": "rewind",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:checkpoints"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "turnId": {
              "type": "string"
            },
            "scope": {
              "type": "string",
              "enum": [
                "files",
                "conversation",
                "both"
              ]
            },
            "confirm": {
              "type": "boolean"
            },
            "confirmToken": {
              "type": "string"
            }
          },
          "required": [
            "sessionId",
            "scope"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "receipt": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "sessionId": {
                      "type": "string"
                    },
                    "turnId": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "files",
                        "conversation",
                        "both"
                      ]
                    },
                    "appliedAt": {
                      "type": "number"
                    },
                    "files": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "restored": {
                              "type": "boolean"
                            },
                            "checkpointId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "safetyCheckpointId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "restoredFileCount": {
                              "type": "number"
                            },
                            "removedFileCount": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "restored",
                            "checkpointId",
                            "safetyCheckpointId",
                            "restoredFileCount",
                            "removedFileCount"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "conversation": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "rewound": {
                              "type": "boolean"
                            },
                            "droppedMessages": {
                              "type": "number"
                            },
                            "undoSnapshotId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "rewound",
                            "droppedMessages",
                            "undoSnapshotId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "undo": {
                      "type": "object",
                      "properties": {
                        "files": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "restoreCheckpointId": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "restoreCheckpointId"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "conversation": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "undoSnapshotId": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "undoSnapshotId"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "files",
                        "conversation"
                      ],
                      "additionalProperties": false
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "sessionId",
                    "turnId",
                    "scope",
                    "appliedAt",
                    "files",
                    "conversation",
                    "undo",
                    "warnings"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "refused": {
              "type": "boolean"
            },
            "refusal": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "reason": {
                      "type": "string"
                    },
                    "confirmField": {
                      "type": "string"
                    },
                    "planMethod": {
                      "type": "string"
                    },
                    "options": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "reason",
                    "confirmField",
                    "planMethod",
                    "options"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "receipt",
            "refused",
            "refusal"
          ],
          "additionalProperties": false
        },
        "dangerous": true,
        "invokable": true
      },
      {
        "id": "rewind.conversation.host.register",
        "title": "Offer This Surface's Live Conversation for Rewind",
        "description": "Register the conversation this surface is running for a session, so a conversation-scope rewind of it can actually be served. Only the process holding the messages can count or drop them: without this, rewind.plan for a session hosted anywhere but the daemon reports the conversation half unavailable, and files rewind is unaffected either way. Re-registering with the hostId returned here RENEWS the offer; registering without one claims the session and replaces whoever held it, answering that surface's outstanding requests as unavailable. The registration is a lease, not a reservation, it lapses unless the surface keeps taking its requests, and nothing about it survives a daemon restart, because a claim about a live process is worthless once the process on either end may be gone.",
        "category": "rewind",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:sessions"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "hostId": {
              "type": "string"
            },
            "label": {
              "type": "string"
            },
            "leaseMs": {
              "type": "number"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "host": {
              "type": "object",
              "properties": {
                "hostId": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "registeredAt": {
                  "type": "number"
                },
                "leaseExpiresAt": {
                  "type": "number"
                }
              },
              "required": [
                "hostId",
                "sessionId",
                "label",
                "registeredAt",
                "leaseExpiresAt"
              ],
              "additionalProperties": false
            },
            "renewed": {
              "type": "boolean"
            },
            "maxWaitMs": {
              "type": "number"
            },
            "answerTimeoutMs": {
              "type": "number"
            }
          },
          "required": [
            "host",
            "renewed",
            "maxWaitMs",
            "answerTimeoutMs"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "rewind.conversation.host.release",
        "title": "Withdraw a Conversation Rewind Offer",
        "description": "Withdraw this surface's offer to serve a session's conversation, when the session ends, or the surface is going away. Outstanding requests put to it are answered unavailable rather than left to time out. Only the registered host may release its own session; anyone else is refused.",
        "category": "rewind",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:sessions"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "hostId": {
              "type": "string"
            }
          },
          "required": [
            "sessionId",
            "hostId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "released": {
              "type": "boolean"
            },
            "host": {
              "type": "object",
              "properties": {
                "hostId": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "registeredAt": {
                  "type": "number"
                },
                "leaseExpiresAt": {
                  "type": "number"
                }
              },
              "required": [
                "hostId",
                "sessionId",
                "label",
                "registeredAt",
                "leaseExpiresAt"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "released",
            "host"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "rewind.conversation.hosts.list",
        "title": "List Conversation Rewind Hosts",
        "description": "Which sessions have a surface offering their live conversation right now, how each surface names itself, and when its lease runs out. This is what makes \"conversation rewind is unavailable for that session\" checkable rather than something a person has to take on trust.",
        "category": "rewind",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "read:sessions"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "hosts": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "hostId": {
                    "type": "string"
                  },
                  "sessionId": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "registeredAt": {
                    "type": "number"
                  },
                  "leaseExpiresAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "hostId",
                  "sessionId",
                  "label",
                  "registeredAt",
                  "leaseExpiresAt"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "hosts"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "rewind.conversation.requests.answer",
        "title": "Answer a Conversation Rewind Request",
        "description": "Report what this surface found or did. Which fields are expected follows from the REQUEST, which already says whether it was a preview or a rewind, an answer that restated that could only disagree with it, silently. For a preview: messagesToDrop and messagesRemaining. For a rewind: droppedMessages and the undoSnapshotId that restores them. For either, a non-empty unavailableReason instead, which is the honest answer when the conversation is gone or this surface cannot serve it, and saying so beats staying silent, because silence becomes a timeout and a timed-out rewind cannot tell whether the messages were dropped. Only the surface a request was put to may answer it.",
        "category": "rewind",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:sessions"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "hostId": {
              "type": "string"
            },
            "requestId": {
              "type": "string"
            },
            "messagesToDrop": {
              "type": "number"
            },
            "messagesRemaining": {
              "type": "number"
            },
            "droppedMessages": {
              "type": "number"
            },
            "undoSnapshotId": {
              "type": "string"
            },
            "unavailableReason": {
              "type": "string"
            }
          },
          "required": [
            "hostId",
            "requestId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "accepted": {
              "type": "boolean"
            },
            "request": {
              "type": "object",
              "properties": {
                "requestId": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                },
                "turnId": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "preview",
                    "rewind"
                  ]
                },
                "expiresAt": {
                  "type": "number"
                }
              },
              "required": [
                "requestId",
                "sessionId",
                "turnId",
                "kind",
                "expiresAt"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "accepted",
            "request"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "rewind.conversation.requests.take",
        "title": "Take Conversation Rewind Requests",
        "description": "Collect the conversation questions waiting for this host, how many messages a rewind to an anchor would drop, or a request to actually drop them, and renew its lease, because a surface that is polling is a surface that is alive. With nothing waiting, pass waitMs to hold the call open until something arrives; an empty result is a normal answer, not an error. Answer each request with rewind.conversation.requests.answer before its expiresAt, or the caller waiting on it is told, honestly, that this surface did not answer in time.",
        "category": "rewind",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "read:sessions"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "hostId": {
              "type": "string"
            },
            "waitMs": {
              "type": "number"
            },
            "limit": {
              "type": "number"
            }
          },
          "required": [
            "hostId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "requests": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "requestId": {
                    "type": "string"
                  },
                  "sessionId": {
                    "type": "string"
                  },
                  "turnId": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "preview",
                      "rewind"
                    ]
                  },
                  "expiresAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "requestId",
                  "sessionId",
                  "turnId",
                  "kind",
                  "expiresAt"
                ],
                "additionalProperties": false
              }
            },
            "host": {
              "type": "object",
              "properties": {
                "hostId": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "registeredAt": {
                  "type": "number"
                },
                "leaseExpiresAt": {
                  "type": "number"
                }
              },
              "required": [
                "hostId",
                "sessionId",
                "label",
                "registeredAt",
                "leaseExpiresAt"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "requests",
            "host"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "rewind.plan",
        "title": "Preview a Unified Rewind",
        "description": "Dry-run preview of a unified rewind to a session turn anchor: exactly what restoring files (the nearest workspace checkpoint), conversation (truncating session state to the anchor), or both would change, and a short-lived single-use confirm token authorizing the matching rewind.apply. Read-only, nothing is changed. A part with no store wired on this runtime is reported unavailable in a warning, never faked.",
        "category": "rewind",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "read:checkpoints"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "turnId": {
              "type": "string"
            },
            "scope": {
              "type": "string",
              "enum": [
                "files",
                "conversation",
                "both"
              ]
            }
          },
          "required": [
            "sessionId",
            "scope"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "turnId": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "scope": {
              "type": "string",
              "enum": [
                "files",
                "conversation",
                "both"
              ]
            },
            "token": {
              "type": "string"
            },
            "expiresAt": {
              "type": "number"
            },
            "files": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "available": {
                      "type": "boolean"
                    },
                    "checkpointId": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "checkpointLabel": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "affectedFileCount": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "available",
                    "checkpointId",
                    "checkpointLabel",
                    "affectedFileCount"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "conversation": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "available": {
                      "type": "boolean"
                    },
                    "messagesToDrop": {
                      "type": "number"
                    },
                    "messagesRemaining": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "available",
                    "messagesToDrop",
                    "messagesRemaining"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "warnings": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "sessionId",
            "turnId",
            "scope",
            "token",
            "expiresAt",
            "files",
            "conversation",
            "warnings"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "routes.bindings.create",
        "title": "Create Route Binding",
        "description": "Create or upsert a route binding.",
        "category": "routes",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:routes"
        ],
        "http": {
          "method": "POST",
          "path": "/api/routes/bindings"
        },
        "events": [
          "runtime.routes"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "kind": {
              "type": "string"
            },
            "surfaceKind": {
              "type": "string"
            },
            "surfaceId": {
              "type": "string"
            },
            "externalId": {
              "type": "string"
            },
            "sessionPolicy": {
              "type": "string"
            },
            "threadPolicy": {
              "type": "string"
            },
            "deliveryGuarantee": {
              "type": "string"
            },
            "threadId": {
              "type": "string"
            },
            "channelId": {
              "type": "string"
            },
            "sessionId": {
              "type": "string"
            },
            "jobId": {
              "type": "string"
            },
            "runId": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "kind",
            "surfaceKind",
            "surfaceId",
            "externalId"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "kind": {
              "type": "string",
              "enum": [
                "session",
                "thread",
                "channel",
                "message"
              ]
            },
            "surfaceKind": {
              "type": "string",
              "enum": [
                "tui",
                "web",
                "slack",
                "discord",
                "ntfy",
                "webhook",
                "homeassistant",
                "telegram",
                "google-chat",
                "signal",
                "whatsapp",
                "telephony",
                "imessage",
                "msteams",
                "bluebubbles",
                "mattermost",
                "matrix",
                "service"
              ]
            },
            "surfaceId": {
              "type": "string"
            },
            "externalId": {
              "type": "string"
            },
            "sessionPolicy": {
              "type": "string",
              "enum": [
                "create-or-bind",
                "continue-existing",
                "require-existing"
              ]
            },
            "threadPolicy": {
              "type": "string",
              "enum": [
                "preserve",
                "replace",
                "detached"
              ]
            },
            "deliveryGuarantee": {
              "type": "string",
              "enum": [
                "best-effort",
                "at-least-once"
              ]
            },
            "threadId": {
              "type": "string"
            },
            "channelId": {
              "type": "string"
            },
            "sessionId": {
              "type": "string"
            },
            "jobId": {
              "type": "string"
            },
            "runId": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "lastSeenAt": {
              "type": "number"
            },
            "createdAt": {
              "type": "number"
            },
            "updatedAt": {
              "type": "number"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "id",
            "kind",
            "surfaceKind",
            "surfaceId",
            "externalId",
            "lastSeenAt",
            "createdAt",
            "updatedAt",
            "metadata"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "routes.bindings.delete",
        "title": "Delete Route Binding",
        "description": "Delete an existing route binding.",
        "category": "routes",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:routes"
        ],
        "http": {
          "method": "DELETE",
          "path": "/api/routes/bindings/{bindingId}"
        },
        "events": [
          "runtime.routes"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "bindingId": {
              "type": "string"
            }
          },
          "required": [
            "bindingId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "removed": {
              "type": "boolean"
            },
            "id": {
              "type": "string"
            }
          },
          "required": [
            "removed"
          ],
          "additionalProperties": true
        },
        "dangerous": true,
        "invokable": true
      },
      {
        "id": "routes.bindings.list",
        "title": "List Route Bindings",
        "description": "Return configured route bindings.",
        "category": "routes",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:routes"
        ],
        "http": {
          "method": "GET",
          "path": "/api/routes/bindings"
        },
        "events": [
          "runtime.routes"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "bindings": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "session",
                      "thread",
                      "channel",
                      "message"
                    ]
                  },
                  "surfaceKind": {
                    "type": "string",
                    "enum": [
                      "tui",
                      "web",
                      "slack",
                      "discord",
                      "ntfy",
                      "webhook",
                      "homeassistant",
                      "telegram",
                      "google-chat",
                      "signal",
                      "whatsapp",
                      "telephony",
                      "imessage",
                      "msteams",
                      "bluebubbles",
                      "mattermost",
                      "matrix",
                      "service"
                    ]
                  },
                  "surfaceId": {
                    "type": "string"
                  },
                  "externalId": {
                    "type": "string"
                  },
                  "sessionPolicy": {
                    "type": "string",
                    "enum": [
                      "create-or-bind",
                      "continue-existing",
                      "require-existing"
                    ]
                  },
                  "threadPolicy": {
                    "type": "string",
                    "enum": [
                      "preserve",
                      "replace",
                      "detached"
                    ]
                  },
                  "deliveryGuarantee": {
                    "type": "string",
                    "enum": [
                      "best-effort",
                      "at-least-once"
                    ]
                  },
                  "threadId": {
                    "type": "string"
                  },
                  "channelId": {
                    "type": "string"
                  },
                  "sessionId": {
                    "type": "string"
                  },
                  "jobId": {
                    "type": "string"
                  },
                  "runId": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "lastSeenAt": {
                    "type": "number"
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "kind",
                  "surfaceKind",
                  "surfaceId",
                  "externalId",
                  "lastSeenAt",
                  "createdAt",
                  "updatedAt",
                  "metadata"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "bindings"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "routes.bindings.update",
        "title": "Update Route Binding",
        "description": "Update an existing route binding. (Renamed from routes.bindings.patch in the 1.0.0 core-verb rename, canonical verb is update, not patch.)",
        "category": "routes",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:routes"
        ],
        "http": {
          "method": "PATCH",
          "path": "/api/routes/bindings/{bindingId}"
        },
        "events": [
          "runtime.routes"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "bindingId": {
              "type": "string"
            },
            "sessionPolicy": {
              "type": "string"
            },
            "threadPolicy": {
              "type": "string"
            },
            "deliveryGuarantee": {
              "type": "string"
            },
            "threadId": {
              "type": "string"
            },
            "channelId": {
              "type": "string"
            },
            "sessionId": {
              "type": "string"
            },
            "jobId": {
              "type": "string"
            },
            "runId": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "kind": {
              "type": "string",
              "enum": [
                "session",
                "thread",
                "channel",
                "message"
              ]
            },
            "surfaceKind": {
              "type": "string",
              "enum": [
                "tui",
                "web",
                "slack",
                "discord",
                "ntfy",
                "webhook",
                "homeassistant",
                "telegram",
                "google-chat",
                "signal",
                "whatsapp",
                "telephony",
                "imessage",
                "msteams",
                "bluebubbles",
                "mattermost",
                "matrix",
                "service"
              ]
            },
            "surfaceId": {
              "type": "string"
            },
            "externalId": {
              "type": "string"
            },
            "sessionPolicy": {
              "type": "string",
              "enum": [
                "create-or-bind",
                "continue-existing",
                "require-existing"
              ]
            },
            "threadPolicy": {
              "type": "string",
              "enum": [
                "preserve",
                "replace",
                "detached"
              ]
            },
            "deliveryGuarantee": {
              "type": "string",
              "enum": [
                "best-effort",
                "at-least-once"
              ]
            },
            "threadId": {
              "type": "string"
            },
            "channelId": {
              "type": "string"
            },
            "sessionId": {
              "type": "string"
            },
            "jobId": {
              "type": "string"
            },
            "runId": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "lastSeenAt": {
              "type": "number"
            },
            "createdAt": {
              "type": "number"
            },
            "updatedAt": {
              "type": "number"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "id",
            "kind",
            "surfaceKind",
            "surfaceId",
            "externalId",
            "lastSeenAt",
            "createdAt",
            "updatedAt",
            "metadata"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "routes.snapshot",
        "title": "Route Snapshot",
        "description": "Return the route and binding integration snapshot.",
        "category": "routes",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:routes"
        ],
        "http": {
          "method": "GET",
          "path": "/api/routes"
        },
        "events": [
          "runtime.routes"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "totalBindings": {
              "type": "number"
            },
            "activeBindings": {
              "type": "number"
            },
            "recentBindings": {
              "type": "number"
            },
            "bindings": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "session",
                      "thread",
                      "channel",
                      "message"
                    ]
                  },
                  "surfaceKind": {
                    "type": "string",
                    "enum": [
                      "tui",
                      "web",
                      "slack",
                      "discord",
                      "ntfy",
                      "webhook",
                      "homeassistant",
                      "telegram",
                      "google-chat",
                      "signal",
                      "whatsapp",
                      "telephony",
                      "imessage",
                      "msteams",
                      "bluebubbles",
                      "mattermost",
                      "matrix",
                      "service"
                    ]
                  },
                  "surfaceId": {
                    "type": "string"
                  },
                  "externalId": {
                    "type": "string"
                  },
                  "sessionPolicy": {
                    "type": "string",
                    "enum": [
                      "create-or-bind",
                      "continue-existing",
                      "require-existing"
                    ]
                  },
                  "threadPolicy": {
                    "type": "string",
                    "enum": [
                      "preserve",
                      "replace",
                      "detached"
                    ]
                  },
                  "deliveryGuarantee": {
                    "type": "string",
                    "enum": [
                      "best-effort",
                      "at-least-once"
                    ]
                  },
                  "threadId": {
                    "type": "string"
                  },
                  "channelId": {
                    "type": "string"
                  },
                  "sessionId": {
                    "type": "string"
                  },
                  "jobId": {
                    "type": "string"
                  },
                  "runId": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "lastSeenAt": {
                    "type": "number"
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "kind",
                  "surfaceKind",
                  "surfaceId",
                  "externalId",
                  "lastSeenAt",
                  "createdAt",
                  "updatedAt",
                  "metadata"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "totalBindings",
            "activeBindings",
            "recentBindings",
            "bindings"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "surfaces.list",
        "title": "List Surfaces",
        "description": "Return registered channel and control surfaces.",
        "category": "routes",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:routes"
        ],
        "http": {
          "method": "GET",
          "path": "/api/surfaces"
        },
        "events": [
          "runtime.surfaces"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "surfaces": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "state": {
                    "type": "string"
                  },
                  "configuredAt": {
                    "type": "number"
                  },
                  "lastSeenAt": {
                    "type": "number"
                  },
                  "defaultRouteId": {
                    "type": "string"
                  },
                  "accountId": {
                    "type": "string"
                  },
                  "capabilities": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "kind",
                  "label",
                  "enabled",
                  "state",
                  "configuredAt",
                  "capabilities",
                  "metadata"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "surfaces"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "devices.artifacts.list",
        "title": "List Retained Device Captures",
        "description": "The camera and screen captures still inside their retention window, newest first, with when each was captured, when it will be deleted, and the reason the request stated. Expired captures are never listed, retention is enforced by the store, not by this verb filtering them out of a longer list.",
        "category": "runtime",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:remote"
        ],
        "http": {
          "method": "GET",
          "path": "/api/devices/artifacts"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "nodeId": {
              "type": "string"
            },
            "limit": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "artifacts": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "artifactId": {
                    "type": "string"
                  },
                  "nodeId": {
                    "type": "string"
                  },
                  "capabilityId": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string"
                  },
                  "mediaType": {
                    "type": "string"
                  },
                  "byteLength": {
                    "type": "number"
                  },
                  "capturedAt": {
                    "type": "number"
                  },
                  "expiresAt": {
                    "type": "number"
                  },
                  "reason": {
                    "type": "string"
                  },
                  "daemonPath": {
                    "type": "string"
                  }
                },
                "required": [
                  "artifactId",
                  "nodeId",
                  "capabilityId",
                  "kind",
                  "mediaType",
                  "byteLength",
                  "capturedAt",
                  "expiresAt",
                  "reason",
                  "daemonPath"
                ],
                "additionalProperties": false
              }
            },
            "retained": {
              "type": "number"
            },
            "retentionHours": {
              "type": "number"
            }
          },
          "required": [
            "artifacts",
            "retained",
            "retentionHours"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "devices.artifacts.read",
        "title": "Read a Retained Device Capture",
        "description": "Return one retained capture's bytes, base64-encoded, for a caller that is not running on the daemon host and so cannot open the file itself. The store re-hashes the bytes against the digest recorded when the capture was retained and refuses to serve a mismatch, so a torn or half-written file is never handed back as if it were the picture that was taken. A capture that is gone, expired, swept, missing, or corrupted, is an honest 404 naming which of those it was.",
        "category": "runtime",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:remote"
        ],
        "http": {
          "method": "GET",
          "path": "/api/devices/artifacts/{artifactId}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "artifactId": {
              "type": "string"
            }
          },
          "required": [
            "artifactId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "artifact": {
              "type": "object",
              "properties": {
                "artifactId": {
                  "type": "string"
                },
                "nodeId": {
                  "type": "string"
                },
                "capabilityId": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "mediaType": {
                  "type": "string"
                },
                "byteLength": {
                  "type": "number"
                },
                "capturedAt": {
                  "type": "number"
                },
                "expiresAt": {
                  "type": "number"
                },
                "reason": {
                  "type": "string"
                },
                "daemonPath": {
                  "type": "string"
                }
              },
              "required": [
                "artifactId",
                "nodeId",
                "capabilityId",
                "kind",
                "mediaType",
                "byteLength",
                "capturedAt",
                "expiresAt",
                "reason",
                "daemonPath"
              ],
              "additionalProperties": false
            },
            "dataBase64": {
              "type": "string"
            }
          },
          "required": [
            "artifact",
            "dataBase64"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "devices.capability.request",
        "title": "Request a Capability From a Paired Device",
        "description": "Ask one paired device node for one capability, a photo, a screen capture, a location fix, its clipboard, a notification, a link to open, a buzz, and return what came back. The reason is required and is shown VERBATIM on the confirmation prompt, so the person deciding sees what the caller said it was for. Every gate lives in the daemon-owned device runtime and this verb re-decides none of them: a durable grant is re-read from disk (never cached), a request with no grant asks the person on whatever surface they are looking at, a capability turned off by configuration is refused with the configuration key that turned it off, and a capture is retained under the configured retention window and disclosed. A refusal is returned as ok:false with the reason and a machine-readable refusal code, it is an answer, not an error. A capability that produces a capture returns an artifact REFERENCE; fetch the bytes with devices.artifacts.read.",
        "category": "runtime",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:remote"
        ],
        "http": {
          "method": "POST",
          "path": "/api/devices/capability/request"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "nodeId": {
              "type": "string"
            },
            "capabilityId": {
              "type": "string"
            },
            "reason": {
              "type": "string"
            },
            "input": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {},
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "sessionId": {
              "type": "string"
            },
            "timeoutMs": {
              "type": "number"
            }
          },
          "required": [
            "nodeId",
            "capabilityId",
            "reason"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "nodeId": {
              "type": "string"
            },
            "capabilityId": {
              "type": "string"
            },
            "capabilityTitle": {
              "type": "string"
            },
            "authority": {
              "type": "string"
            },
            "grantId": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "data": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                },
                {
                  "type": "object",
                  "additionalProperties": {}
                },
                {
                  "type": "array",
                  "items": {}
                }
              ]
            },
            "artifact": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "artifactId": {
                      "type": "string"
                    },
                    "nodeId": {
                      "type": "string"
                    },
                    "capabilityId": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string"
                    },
                    "mediaType": {
                      "type": "string"
                    },
                    "byteLength": {
                      "type": "number"
                    },
                    "capturedAt": {
                      "type": "number"
                    },
                    "expiresAt": {
                      "type": "number"
                    },
                    "reason": {
                      "type": "string"
                    },
                    "daemonPath": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "artifactId",
                    "nodeId",
                    "capabilityId",
                    "kind",
                    "mediaType",
                    "byteLength",
                    "capturedAt",
                    "expiresAt",
                    "reason",
                    "daemonPath"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "refusal": {
              "type": "string"
            },
            "detail": {
              "type": "string"
            }
          },
          "required": [
            "ok",
            "nodeId",
            "capabilityId",
            "capabilityTitle",
            "authority",
            "grantId",
            "artifact",
            "refusal",
            "detail"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "devices.grants.list",
        "title": "List Device Capability Grants",
        "description": "The durable \"always allow\" grants a person gave, per capability and per device, with when each was granted, when it expires, and how often it has been used, plus the recent ledger of grants given, used, revoked, and expired.",
        "category": "runtime",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:remote"
        ],
        "http": {
          "method": "GET",
          "path": "/api/devices/grants"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "nodeId": {
              "type": "string"
            },
            "limit": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "grants": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "grantId": {
                    "type": "string"
                  },
                  "nodeId": {
                    "type": "string"
                  },
                  "nodeKind": {
                    "type": "string"
                  },
                  "capabilityId": {
                    "type": "string"
                  },
                  "capabilityTitle": {
                    "type": "string"
                  },
                  "scope": {
                    "type": "string"
                  },
                  "grantedAt": {
                    "type": "number"
                  },
                  "expiresAt": {
                    "type": "number"
                  },
                  "lastUsedAt": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "useCount": {
                    "type": "number"
                  },
                  "grantedBy": {
                    "type": "string"
                  }
                },
                "required": [
                  "grantId",
                  "nodeId",
                  "nodeKind",
                  "capabilityId",
                  "capabilityTitle",
                  "scope",
                  "grantedAt",
                  "expiresAt",
                  "lastUsedAt",
                  "useCount",
                  "grantedBy"
                ],
                "additionalProperties": false
              }
            },
            "audit": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "action": {
                    "type": "string"
                  },
                  "grantId": {
                    "type": "string"
                  },
                  "nodeId": {
                    "type": "string"
                  },
                  "capabilityId": {
                    "type": "string"
                  },
                  "at": {
                    "type": "number"
                  },
                  "actor": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "action",
                  "grantId",
                  "nodeId",
                  "capabilityId",
                  "at",
                  "actor",
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "grants",
            "audit"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "devices.grants.revoke",
        "title": "Revoke a Device Capability Grant",
        "description": "Delete durable grants by grant id, by device, by capability, or any combination. Revoked grants are removed rather than flagged, so the next request for that capability asks the person again. Returns exactly what was removed.",
        "category": "runtime",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:config"
        ],
        "http": {
          "method": "POST",
          "path": "/api/devices/grants/revoke"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "grantId": {
              "type": "string"
            },
            "nodeId": {
              "type": "string"
            },
            "capabilityId": {
              "type": "string"
            },
            "note": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "revoked": {
              "type": "number"
            },
            "removals": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "grantId": {
                    "type": "string"
                  },
                  "nodeId": {
                    "type": "string"
                  },
                  "capabilityId": {
                    "type": "string"
                  },
                  "scope": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string"
                  },
                  "removedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "grantId",
                  "nodeId",
                  "capabilityId",
                  "scope",
                  "reason",
                  "removedAt"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "revoked",
            "removals"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "devices.housekeeping.run",
        "title": "Run Device Housekeeping",
        "description": "Sweep the device grants ledger and the retained captures now: expired and orphaned grants removed, captures past their retention window deleted, torn or missing capture files reaped. Returns the itemised disclosure of everything removed and why.",
        "category": "runtime",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:config"
        ],
        "http": {
          "method": "POST",
          "path": "/api/devices/housekeeping"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "summary": {
              "type": "string"
            },
            "sweptAt": {
              "type": "number"
            },
            "grantsRemoved": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "grantId": {
                    "type": "string"
                  },
                  "nodeId": {
                    "type": "string"
                  },
                  "capabilityId": {
                    "type": "string"
                  },
                  "scope": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string"
                  },
                  "removedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "grantId",
                  "nodeId",
                  "capabilityId",
                  "scope",
                  "reason",
                  "removedAt"
                ],
                "additionalProperties": false
              }
            },
            "grantsRetained": {
              "type": "number"
            },
            "capturesRemoved": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "artifactId": {
                    "type": "string"
                  },
                  "nodeId": {
                    "type": "string"
                  },
                  "capabilityId": {
                    "type": "string"
                  },
                  "fileName": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string"
                  },
                  "removedAt": {
                    "type": "number"
                  },
                  "byteLength": {
                    "type": "number"
                  }
                },
                "required": [
                  "artifactId",
                  "nodeId",
                  "capabilityId",
                  "fileName",
                  "reason",
                  "removedAt",
                  "byteLength"
                ],
                "additionalProperties": false
              }
            },
            "capturesRetained": {
              "type": "number"
            },
            "bytesReclaimed": {
              "type": "number"
            }
          },
          "required": [
            "summary",
            "sweptAt",
            "grantsRemoved",
            "grantsRetained",
            "capturesRemoved",
            "capturesRetained",
            "bytesReclaimed"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "devices.nodes.list",
        "title": "List Paired Device Nodes",
        "description": "Every phone paired as a device node, with the capabilities it announced, the ones it did not offer, and the ones it announced but cannot currently serve because its connection is not a secure context. Node-kind neutral: a web app node and a native app node are described identically.",
        "category": "runtime",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:remote"
        ],
        "http": {
          "method": "GET",
          "path": "/api/devices/nodes"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "nodes": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "nodeId": {
                    "type": "string"
                  },
                  "nodeKind": {
                    "type": "string"
                  },
                  "nodeKindLabel": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "platform": {
                    "type": "string"
                  },
                  "appVersion": {
                    "type": "string"
                  },
                  "contractVersion": {
                    "type": "number"
                  },
                  "contractCompatible": {
                    "type": "boolean"
                  },
                  "supported": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "undeclared": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "gatedBySecureContext": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "unknownDeclared": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "nodeId",
                  "nodeKind",
                  "nodeKindLabel",
                  "label",
                  "platform",
                  "appVersion",
                  "contractVersion",
                  "contractCompatible",
                  "supported",
                  "undeclared",
                  "gatedBySecureContext",
                  "unknownDeclared"
                ],
                "additionalProperties": false
              }
            },
            "capabilities": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "family": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "purpose": {
                    "type": "string"
                  },
                  "effect": {
                    "type": "string"
                  },
                  "sensitivity": {
                    "type": "string"
                  },
                  "producesArtifact": {
                    "type": "boolean"
                  },
                  "allowAlwaysOffered": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "id",
                  "family",
                  "title",
                  "purpose",
                  "effect",
                  "sensitivity",
                  "producesArtifact",
                  "allowAlwaysOffered"
                ],
                "additionalProperties": false
              }
            },
            "mode": {
              "type": "string"
            },
            "allowAlwaysOffer": {
              "type": "string"
            },
            "captureRetentionHours": {
              "type": "number"
            }
          },
          "required": [
            "nodes",
            "capabilities",
            "mode",
            "allowAlwaysOffer",
            "captureRetentionHours"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "runtime.metrics.get",
        "title": "Runtime Metrics",
        "description": "Return the process-wide runtime metrics snapshot: HTTP/LLM/auth/transport counters, gauges, request-duration and token histograms, and per-model tool-format telemetry (edit-tool failure classes and declared exec-expectation misses).",
        "category": "runtime",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:telemetry"
        ],
        "http": {
          "method": "GET",
          "path": "/api/runtime/metrics"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "counters": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            },
            "gauges": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            },
            "histograms": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            },
            "toolFormat": {
              "type": "object",
              "properties": {
                "byModel": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true
                },
                "byClass": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true
                }
              },
              "required": [
                "byModel",
                "byClass"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "counters",
            "gauges",
            "histograms",
            "toolFormat"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "scheduler.capacity",
        "title": "Scheduler Capacity",
        "description": "Return the current automation-scheduler capacity snapshot: total slots, in-use slots, queue depth, and age of the oldest queued run.",
        "category": "scheduler",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:automation"
        ],
        "http": {
          "method": "GET",
          "path": "/api/runtime/scheduler"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "slotsTotal": {
              "type": "number"
            },
            "slotsInUse": {
              "type": "number"
            },
            "queueDepth": {
              "type": "number"
            },
            "oldestQueuedAgeMs": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "slotsTotal",
            "slotsInUse",
            "queueDepth",
            "oldestQueuedAgeMs"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "services.install",
        "title": "Install Service",
        "description": "Install the GoodVibes platform service.",
        "category": "services",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:services"
        ],
        "http": {
          "method": "POST",
          "path": "/api/service/install"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "platform": {
              "type": "string"
            },
            "serviceName": {
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "installed": {
              "type": "boolean"
            },
            "autostart": {
              "type": "boolean"
            },
            "running": {
              "type": "boolean"
            },
            "pid": {
              "type": "number"
            },
            "logPath": {
              "type": "string"
            },
            "commandPreview": {
              "type": "string"
            },
            "contents": {
              "type": "string"
            },
            "suggestedCommands": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "lastAction": {
              "type": "string"
            },
            "actionError": {
              "type": "string"
            },
            "network": {
              "type": "object",
              "properties": {
                "controlPlane": {
                  "type": "object",
                  "properties": {
                    "surface": {
                      "type": "string",
                      "enum": [
                        "controlPlane",
                        "httpListener"
                      ]
                    },
                    "host": {
                      "type": "string"
                    },
                    "port": {
                      "type": "number"
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "off",
                        "proxy",
                        "direct"
                      ]
                    },
                    "scheme": {
                      "type": "string",
                      "enum": [
                        "http",
                        "https"
                      ]
                    },
                    "trustProxy": {
                      "type": "boolean"
                    },
                    "certFile": {
                      "type": "string"
                    },
                    "keyFile": {
                      "type": "string"
                    },
                    "usingDefaultPaths": {
                      "type": "boolean"
                    },
                    "ready": {
                      "type": "boolean"
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "keyPermissions": {
                      "type": "object",
                      "properties": {
                        "available": {
                          "type": "boolean"
                        },
                        "safe": {
                          "type": "boolean"
                        },
                        "mode": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "available"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "surface",
                    "host",
                    "port",
                    "mode",
                    "scheme",
                    "trustProxy",
                    "usingDefaultPaths",
                    "ready",
                    "errors"
                  ],
                  "additionalProperties": false
                },
                "httpListener": {
                  "type": "object",
                  "properties": {
                    "surface": {
                      "type": "string",
                      "enum": [
                        "controlPlane",
                        "httpListener"
                      ]
                    },
                    "host": {
                      "type": "string"
                    },
                    "port": {
                      "type": "number"
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "off",
                        "proxy",
                        "direct"
                      ]
                    },
                    "scheme": {
                      "type": "string",
                      "enum": [
                        "http",
                        "https"
                      ]
                    },
                    "trustProxy": {
                      "type": "boolean"
                    },
                    "certFile": {
                      "type": "string"
                    },
                    "keyFile": {
                      "type": "string"
                    },
                    "usingDefaultPaths": {
                      "type": "boolean"
                    },
                    "ready": {
                      "type": "boolean"
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "keyPermissions": {
                      "type": "object",
                      "properties": {
                        "available": {
                          "type": "boolean"
                        },
                        "safe": {
                          "type": "boolean"
                        },
                        "mode": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "available"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "surface",
                    "host",
                    "port",
                    "mode",
                    "scheme",
                    "trustProxy",
                    "usingDefaultPaths",
                    "ready",
                    "errors"
                  ],
                  "additionalProperties": false
                },
                "outbound": {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "enum": [
                        "bundled",
                        "bundled+custom",
                        "custom"
                      ]
                    },
                    "allowInsecureLocalhost": {
                      "type": "boolean"
                    },
                    "customCaFile": {
                      "type": "string"
                    },
                    "customCaDir": {
                      "type": "string"
                    },
                    "customCaEntryCount": {
                      "type": "number"
                    },
                    "effectiveCaStrategy": {
                      "type": "string",
                      "enum": [
                        "bun-default",
                        "bundled+custom",
                        "custom"
                      ]
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "mode",
                    "allowInsecureLocalhost",
                    "customCaEntryCount",
                    "effectiveCaStrategy",
                    "errors"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "controlPlane",
                "httpListener",
                "outbound"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "platform",
            "serviceName",
            "path",
            "installed",
            "autostart",
            "running",
            "commandPreview",
            "suggestedCommands"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "services.restart",
        "title": "Restart Service",
        "description": "Restart the GoodVibes platform service.",
        "category": "services",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:services"
        ],
        "http": {
          "method": "POST",
          "path": "/api/service/restart"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "platform": {
              "type": "string"
            },
            "serviceName": {
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "installed": {
              "type": "boolean"
            },
            "autostart": {
              "type": "boolean"
            },
            "running": {
              "type": "boolean"
            },
            "pid": {
              "type": "number"
            },
            "logPath": {
              "type": "string"
            },
            "commandPreview": {
              "type": "string"
            },
            "contents": {
              "type": "string"
            },
            "suggestedCommands": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "lastAction": {
              "type": "string"
            },
            "actionError": {
              "type": "string"
            },
            "network": {
              "type": "object",
              "properties": {
                "controlPlane": {
                  "type": "object",
                  "properties": {
                    "surface": {
                      "type": "string",
                      "enum": [
                        "controlPlane",
                        "httpListener"
                      ]
                    },
                    "host": {
                      "type": "string"
                    },
                    "port": {
                      "type": "number"
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "off",
                        "proxy",
                        "direct"
                      ]
                    },
                    "scheme": {
                      "type": "string",
                      "enum": [
                        "http",
                        "https"
                      ]
                    },
                    "trustProxy": {
                      "type": "boolean"
                    },
                    "certFile": {
                      "type": "string"
                    },
                    "keyFile": {
                      "type": "string"
                    },
                    "usingDefaultPaths": {
                      "type": "boolean"
                    },
                    "ready": {
                      "type": "boolean"
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "keyPermissions": {
                      "type": "object",
                      "properties": {
                        "available": {
                          "type": "boolean"
                        },
                        "safe": {
                          "type": "boolean"
                        },
                        "mode": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "available"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "surface",
                    "host",
                    "port",
                    "mode",
                    "scheme",
                    "trustProxy",
                    "usingDefaultPaths",
                    "ready",
                    "errors"
                  ],
                  "additionalProperties": false
                },
                "httpListener": {
                  "type": "object",
                  "properties": {
                    "surface": {
                      "type": "string",
                      "enum": [
                        "controlPlane",
                        "httpListener"
                      ]
                    },
                    "host": {
                      "type": "string"
                    },
                    "port": {
                      "type": "number"
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "off",
                        "proxy",
                        "direct"
                      ]
                    },
                    "scheme": {
                      "type": "string",
                      "enum": [
                        "http",
                        "https"
                      ]
                    },
                    "trustProxy": {
                      "type": "boolean"
                    },
                    "certFile": {
                      "type": "string"
                    },
                    "keyFile": {
                      "type": "string"
                    },
                    "usingDefaultPaths": {
                      "type": "boolean"
                    },
                    "ready": {
                      "type": "boolean"
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "keyPermissions": {
                      "type": "object",
                      "properties": {
                        "available": {
                          "type": "boolean"
                        },
                        "safe": {
                          "type": "boolean"
                        },
                        "mode": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "available"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "surface",
                    "host",
                    "port",
                    "mode",
                    "scheme",
                    "trustProxy",
                    "usingDefaultPaths",
                    "ready",
                    "errors"
                  ],
                  "additionalProperties": false
                },
                "outbound": {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "enum": [
                        "bundled",
                        "bundled+custom",
                        "custom"
                      ]
                    },
                    "allowInsecureLocalhost": {
                      "type": "boolean"
                    },
                    "customCaFile": {
                      "type": "string"
                    },
                    "customCaDir": {
                      "type": "string"
                    },
                    "customCaEntryCount": {
                      "type": "number"
                    },
                    "effectiveCaStrategy": {
                      "type": "string",
                      "enum": [
                        "bun-default",
                        "bundled+custom",
                        "custom"
                      ]
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "mode",
                    "allowInsecureLocalhost",
                    "customCaEntryCount",
                    "effectiveCaStrategy",
                    "errors"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "controlPlane",
                "httpListener",
                "outbound"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "platform",
            "serviceName",
            "path",
            "installed",
            "autostart",
            "running",
            "commandPreview",
            "suggestedCommands"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "services.start",
        "title": "Start Service",
        "description": "Start the GoodVibes platform service.",
        "category": "services",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:services"
        ],
        "http": {
          "method": "POST",
          "path": "/api/service/start"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "platform": {
              "type": "string"
            },
            "serviceName": {
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "installed": {
              "type": "boolean"
            },
            "autostart": {
              "type": "boolean"
            },
            "running": {
              "type": "boolean"
            },
            "pid": {
              "type": "number"
            },
            "logPath": {
              "type": "string"
            },
            "commandPreview": {
              "type": "string"
            },
            "contents": {
              "type": "string"
            },
            "suggestedCommands": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "lastAction": {
              "type": "string"
            },
            "actionError": {
              "type": "string"
            },
            "network": {
              "type": "object",
              "properties": {
                "controlPlane": {
                  "type": "object",
                  "properties": {
                    "surface": {
                      "type": "string",
                      "enum": [
                        "controlPlane",
                        "httpListener"
                      ]
                    },
                    "host": {
                      "type": "string"
                    },
                    "port": {
                      "type": "number"
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "off",
                        "proxy",
                        "direct"
                      ]
                    },
                    "scheme": {
                      "type": "string",
                      "enum": [
                        "http",
                        "https"
                      ]
                    },
                    "trustProxy": {
                      "type": "boolean"
                    },
                    "certFile": {
                      "type": "string"
                    },
                    "keyFile": {
                      "type": "string"
                    },
                    "usingDefaultPaths": {
                      "type": "boolean"
                    },
                    "ready": {
                      "type": "boolean"
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "keyPermissions": {
                      "type": "object",
                      "properties": {
                        "available": {
                          "type": "boolean"
                        },
                        "safe": {
                          "type": "boolean"
                        },
                        "mode": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "available"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "surface",
                    "host",
                    "port",
                    "mode",
                    "scheme",
                    "trustProxy",
                    "usingDefaultPaths",
                    "ready",
                    "errors"
                  ],
                  "additionalProperties": false
                },
                "httpListener": {
                  "type": "object",
                  "properties": {
                    "surface": {
                      "type": "string",
                      "enum": [
                        "controlPlane",
                        "httpListener"
                      ]
                    },
                    "host": {
                      "type": "string"
                    },
                    "port": {
                      "type": "number"
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "off",
                        "proxy",
                        "direct"
                      ]
                    },
                    "scheme": {
                      "type": "string",
                      "enum": [
                        "http",
                        "https"
                      ]
                    },
                    "trustProxy": {
                      "type": "boolean"
                    },
                    "certFile": {
                      "type": "string"
                    },
                    "keyFile": {
                      "type": "string"
                    },
                    "usingDefaultPaths": {
                      "type": "boolean"
                    },
                    "ready": {
                      "type": "boolean"
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "keyPermissions": {
                      "type": "object",
                      "properties": {
                        "available": {
                          "type": "boolean"
                        },
                        "safe": {
                          "type": "boolean"
                        },
                        "mode": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "available"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "surface",
                    "host",
                    "port",
                    "mode",
                    "scheme",
                    "trustProxy",
                    "usingDefaultPaths",
                    "ready",
                    "errors"
                  ],
                  "additionalProperties": false
                },
                "outbound": {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "enum": [
                        "bundled",
                        "bundled+custom",
                        "custom"
                      ]
                    },
                    "allowInsecureLocalhost": {
                      "type": "boolean"
                    },
                    "customCaFile": {
                      "type": "string"
                    },
                    "customCaDir": {
                      "type": "string"
                    },
                    "customCaEntryCount": {
                      "type": "number"
                    },
                    "effectiveCaStrategy": {
                      "type": "string",
                      "enum": [
                        "bun-default",
                        "bundled+custom",
                        "custom"
                      ]
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "mode",
                    "allowInsecureLocalhost",
                    "customCaEntryCount",
                    "effectiveCaStrategy",
                    "errors"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "controlPlane",
                "httpListener",
                "outbound"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "platform",
            "serviceName",
            "path",
            "installed",
            "autostart",
            "running",
            "commandPreview",
            "suggestedCommands"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "services.status",
        "title": "Service Status",
        "description": "Return platform service installation and runtime posture.",
        "category": "services",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:services"
        ],
        "http": {
          "method": "GET",
          "path": "/api/service/status"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "platform": {
              "type": "string"
            },
            "serviceName": {
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "installed": {
              "type": "boolean"
            },
            "autostart": {
              "type": "boolean"
            },
            "running": {
              "type": "boolean"
            },
            "pid": {
              "type": "number"
            },
            "logPath": {
              "type": "string"
            },
            "commandPreview": {
              "type": "string"
            },
            "contents": {
              "type": "string"
            },
            "suggestedCommands": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "lastAction": {
              "type": "string"
            },
            "actionError": {
              "type": "string"
            },
            "network": {
              "type": "object",
              "properties": {
                "controlPlane": {
                  "type": "object",
                  "properties": {
                    "surface": {
                      "type": "string",
                      "enum": [
                        "controlPlane",
                        "httpListener"
                      ]
                    },
                    "host": {
                      "type": "string"
                    },
                    "port": {
                      "type": "number"
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "off",
                        "proxy",
                        "direct"
                      ]
                    },
                    "scheme": {
                      "type": "string",
                      "enum": [
                        "http",
                        "https"
                      ]
                    },
                    "trustProxy": {
                      "type": "boolean"
                    },
                    "certFile": {
                      "type": "string"
                    },
                    "keyFile": {
                      "type": "string"
                    },
                    "usingDefaultPaths": {
                      "type": "boolean"
                    },
                    "ready": {
                      "type": "boolean"
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "keyPermissions": {
                      "type": "object",
                      "properties": {
                        "available": {
                          "type": "boolean"
                        },
                        "safe": {
                          "type": "boolean"
                        },
                        "mode": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "available"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "surface",
                    "host",
                    "port",
                    "mode",
                    "scheme",
                    "trustProxy",
                    "usingDefaultPaths",
                    "ready",
                    "errors"
                  ],
                  "additionalProperties": false
                },
                "httpListener": {
                  "type": "object",
                  "properties": {
                    "surface": {
                      "type": "string",
                      "enum": [
                        "controlPlane",
                        "httpListener"
                      ]
                    },
                    "host": {
                      "type": "string"
                    },
                    "port": {
                      "type": "number"
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "off",
                        "proxy",
                        "direct"
                      ]
                    },
                    "scheme": {
                      "type": "string",
                      "enum": [
                        "http",
                        "https"
                      ]
                    },
                    "trustProxy": {
                      "type": "boolean"
                    },
                    "certFile": {
                      "type": "string"
                    },
                    "keyFile": {
                      "type": "string"
                    },
                    "usingDefaultPaths": {
                      "type": "boolean"
                    },
                    "ready": {
                      "type": "boolean"
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "keyPermissions": {
                      "type": "object",
                      "properties": {
                        "available": {
                          "type": "boolean"
                        },
                        "safe": {
                          "type": "boolean"
                        },
                        "mode": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "available"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "surface",
                    "host",
                    "port",
                    "mode",
                    "scheme",
                    "trustProxy",
                    "usingDefaultPaths",
                    "ready",
                    "errors"
                  ],
                  "additionalProperties": false
                },
                "outbound": {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "enum": [
                        "bundled",
                        "bundled+custom",
                        "custom"
                      ]
                    },
                    "allowInsecureLocalhost": {
                      "type": "boolean"
                    },
                    "customCaFile": {
                      "type": "string"
                    },
                    "customCaDir": {
                      "type": "string"
                    },
                    "customCaEntryCount": {
                      "type": "number"
                    },
                    "effectiveCaStrategy": {
                      "type": "string",
                      "enum": [
                        "bun-default",
                        "bundled+custom",
                        "custom"
                      ]
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "mode",
                    "allowInsecureLocalhost",
                    "customCaEntryCount",
                    "effectiveCaStrategy",
                    "errors"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "controlPlane",
                "httpListener",
                "outbound"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "platform",
            "serviceName",
            "path",
            "installed",
            "autostart",
            "running",
            "commandPreview",
            "suggestedCommands"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "services.stop",
        "title": "Stop Service",
        "description": "Stop the GoodVibes platform service.",
        "category": "services",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:services"
        ],
        "http": {
          "method": "POST",
          "path": "/api/service/stop"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "platform": {
              "type": "string"
            },
            "serviceName": {
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "installed": {
              "type": "boolean"
            },
            "autostart": {
              "type": "boolean"
            },
            "running": {
              "type": "boolean"
            },
            "pid": {
              "type": "number"
            },
            "logPath": {
              "type": "string"
            },
            "commandPreview": {
              "type": "string"
            },
            "contents": {
              "type": "string"
            },
            "suggestedCommands": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "lastAction": {
              "type": "string"
            },
            "actionError": {
              "type": "string"
            },
            "network": {
              "type": "object",
              "properties": {
                "controlPlane": {
                  "type": "object",
                  "properties": {
                    "surface": {
                      "type": "string",
                      "enum": [
                        "controlPlane",
                        "httpListener"
                      ]
                    },
                    "host": {
                      "type": "string"
                    },
                    "port": {
                      "type": "number"
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "off",
                        "proxy",
                        "direct"
                      ]
                    },
                    "scheme": {
                      "type": "string",
                      "enum": [
                        "http",
                        "https"
                      ]
                    },
                    "trustProxy": {
                      "type": "boolean"
                    },
                    "certFile": {
                      "type": "string"
                    },
                    "keyFile": {
                      "type": "string"
                    },
                    "usingDefaultPaths": {
                      "type": "boolean"
                    },
                    "ready": {
                      "type": "boolean"
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "keyPermissions": {
                      "type": "object",
                      "properties": {
                        "available": {
                          "type": "boolean"
                        },
                        "safe": {
                          "type": "boolean"
                        },
                        "mode": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "available"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "surface",
                    "host",
                    "port",
                    "mode",
                    "scheme",
                    "trustProxy",
                    "usingDefaultPaths",
                    "ready",
                    "errors"
                  ],
                  "additionalProperties": false
                },
                "httpListener": {
                  "type": "object",
                  "properties": {
                    "surface": {
                      "type": "string",
                      "enum": [
                        "controlPlane",
                        "httpListener"
                      ]
                    },
                    "host": {
                      "type": "string"
                    },
                    "port": {
                      "type": "number"
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "off",
                        "proxy",
                        "direct"
                      ]
                    },
                    "scheme": {
                      "type": "string",
                      "enum": [
                        "http",
                        "https"
                      ]
                    },
                    "trustProxy": {
                      "type": "boolean"
                    },
                    "certFile": {
                      "type": "string"
                    },
                    "keyFile": {
                      "type": "string"
                    },
                    "usingDefaultPaths": {
                      "type": "boolean"
                    },
                    "ready": {
                      "type": "boolean"
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "keyPermissions": {
                      "type": "object",
                      "properties": {
                        "available": {
                          "type": "boolean"
                        },
                        "safe": {
                          "type": "boolean"
                        },
                        "mode": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "available"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "surface",
                    "host",
                    "port",
                    "mode",
                    "scheme",
                    "trustProxy",
                    "usingDefaultPaths",
                    "ready",
                    "errors"
                  ],
                  "additionalProperties": false
                },
                "outbound": {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "enum": [
                        "bundled",
                        "bundled+custom",
                        "custom"
                      ]
                    },
                    "allowInsecureLocalhost": {
                      "type": "boolean"
                    },
                    "customCaFile": {
                      "type": "string"
                    },
                    "customCaDir": {
                      "type": "string"
                    },
                    "customCaEntryCount": {
                      "type": "number"
                    },
                    "effectiveCaStrategy": {
                      "type": "string",
                      "enum": [
                        "bun-default",
                        "bundled+custom",
                        "custom"
                      ]
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "mode",
                    "allowInsecureLocalhost",
                    "customCaEntryCount",
                    "effectiveCaStrategy",
                    "errors"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "controlPlane",
                "httpListener",
                "outbound"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "platform",
            "serviceName",
            "path",
            "installed",
            "autostart",
            "running",
            "commandPreview",
            "suggestedCommands"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "services.uninstall",
        "title": "Uninstall Service",
        "description": "Uninstall the GoodVibes platform service.",
        "category": "services",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:services"
        ],
        "http": {
          "method": "POST",
          "path": "/api/service/uninstall"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "platform": {
              "type": "string"
            },
            "serviceName": {
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "installed": {
              "type": "boolean"
            },
            "autostart": {
              "type": "boolean"
            },
            "running": {
              "type": "boolean"
            },
            "pid": {
              "type": "number"
            },
            "logPath": {
              "type": "string"
            },
            "commandPreview": {
              "type": "string"
            },
            "contents": {
              "type": "string"
            },
            "suggestedCommands": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "lastAction": {
              "type": "string"
            },
            "actionError": {
              "type": "string"
            },
            "network": {
              "type": "object",
              "properties": {
                "controlPlane": {
                  "type": "object",
                  "properties": {
                    "surface": {
                      "type": "string",
                      "enum": [
                        "controlPlane",
                        "httpListener"
                      ]
                    },
                    "host": {
                      "type": "string"
                    },
                    "port": {
                      "type": "number"
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "off",
                        "proxy",
                        "direct"
                      ]
                    },
                    "scheme": {
                      "type": "string",
                      "enum": [
                        "http",
                        "https"
                      ]
                    },
                    "trustProxy": {
                      "type": "boolean"
                    },
                    "certFile": {
                      "type": "string"
                    },
                    "keyFile": {
                      "type": "string"
                    },
                    "usingDefaultPaths": {
                      "type": "boolean"
                    },
                    "ready": {
                      "type": "boolean"
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "keyPermissions": {
                      "type": "object",
                      "properties": {
                        "available": {
                          "type": "boolean"
                        },
                        "safe": {
                          "type": "boolean"
                        },
                        "mode": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "available"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "surface",
                    "host",
                    "port",
                    "mode",
                    "scheme",
                    "trustProxy",
                    "usingDefaultPaths",
                    "ready",
                    "errors"
                  ],
                  "additionalProperties": false
                },
                "httpListener": {
                  "type": "object",
                  "properties": {
                    "surface": {
                      "type": "string",
                      "enum": [
                        "controlPlane",
                        "httpListener"
                      ]
                    },
                    "host": {
                      "type": "string"
                    },
                    "port": {
                      "type": "number"
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "off",
                        "proxy",
                        "direct"
                      ]
                    },
                    "scheme": {
                      "type": "string",
                      "enum": [
                        "http",
                        "https"
                      ]
                    },
                    "trustProxy": {
                      "type": "boolean"
                    },
                    "certFile": {
                      "type": "string"
                    },
                    "keyFile": {
                      "type": "string"
                    },
                    "usingDefaultPaths": {
                      "type": "boolean"
                    },
                    "ready": {
                      "type": "boolean"
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "keyPermissions": {
                      "type": "object",
                      "properties": {
                        "available": {
                          "type": "boolean"
                        },
                        "safe": {
                          "type": "boolean"
                        },
                        "mode": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "available"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "surface",
                    "host",
                    "port",
                    "mode",
                    "scheme",
                    "trustProxy",
                    "usingDefaultPaths",
                    "ready",
                    "errors"
                  ],
                  "additionalProperties": false
                },
                "outbound": {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "enum": [
                        "bundled",
                        "bundled+custom",
                        "custom"
                      ]
                    },
                    "allowInsecureLocalhost": {
                      "type": "boolean"
                    },
                    "customCaFile": {
                      "type": "string"
                    },
                    "customCaDir": {
                      "type": "string"
                    },
                    "customCaEntryCount": {
                      "type": "number"
                    },
                    "effectiveCaStrategy": {
                      "type": "string",
                      "enum": [
                        "bun-default",
                        "bundled+custom",
                        "custom"
                      ]
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "mode",
                    "allowInsecureLocalhost",
                    "customCaEntryCount",
                    "effectiveCaStrategy",
                    "errors"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "controlPlane",
                "httpListener",
                "outbound"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "platform",
            "serviceName",
            "path",
            "installed",
            "autostart",
            "running",
            "commandPreview",
            "suggestedCommands"
          ],
          "additionalProperties": true
        },
        "dangerous": true,
        "invokable": true
      },
      {
        "id": "sessions.changes.get",
        "title": "Get Session Workspace Changes",
        "description": "Return the aggregate workspace file changes a session made, joined over its sessionId-stamped checkpoints: the net diff (files, unified diff, --stat) from the state before the session's earliest checkpoint to its latest. A session with no stamped checkpoints returns checkpointCount:0 with an empty diff (from/to:\"EMPTY\"), an honest \"nothing recorded\", not an error.",
        "category": "sessions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "read:sessions"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "checkpointCount": {
              "type": "number"
            },
            "checkpointIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "from": {
              "type": "string"
            },
            "to": {
              "type": "string"
            },
            "files": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "unifiedDiff": {
              "type": "string"
            },
            "stat": {
              "type": "string"
            }
          },
          "required": [
            "sessionId",
            "checkpointCount",
            "checkpointIds",
            "from",
            "to",
            "files",
            "unifiedDiff",
            "stat"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "sessions.close",
        "title": "Close Shared Session",
        "description": "Mark a shared session as closed.",
        "category": "sessions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:sessions"
        ],
        "http": {
          "method": "POST",
          "path": "/api/sessions/{sessionId}/close"
        },
        "events": [
          "control.session_update"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "session": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "project": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "active",
                    "closed"
                  ]
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "lastMessageAt": {
                  "type": "number"
                },
                "closedAt": {
                  "type": "number"
                },
                "lastActivityAt": {
                  "type": "number"
                },
                "messageCount": {
                  "type": "number"
                },
                "retainedMessageCount": {
                  "type": "number"
                },
                "pendingInputCount": {
                  "type": "number"
                },
                "routeIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "surfaceKinds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "participants": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "surfaceKind": {
                        "type": "string"
                      },
                      "surfaceId": {
                        "type": "string"
                      },
                      "externalId": {
                        "type": "string"
                      },
                      "userId": {
                        "type": "string"
                      },
                      "displayName": {
                        "type": "string"
                      },
                      "routeId": {
                        "type": "string"
                      },
                      "lastSeenAt": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "surfaceKind",
                      "surfaceId",
                      "lastSeenAt"
                    ],
                    "additionalProperties": false
                  }
                },
                "activeAgentId": {
                  "type": "string"
                },
                "lastAgentId": {
                  "type": "string"
                },
                "lastError": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "kind",
                "title",
                "status",
                "createdAt",
                "updatedAt",
                "lastActivityAt",
                "messageCount",
                "pendingInputCount",
                "routeIds",
                "surfaceKinds",
                "participants",
                "metadata"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "session"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "sessions.contextUsage.get",
        "title": "Get Session Context Usage",
        "description": "Return the live context-window usage for a session: estimatedContextTokens (the token ESTIMATOR's figure, not a measured provider count), the model contextWindow, and the derived contextUsagePct and contextRemainingTokens. `estimated` is always true, marking the token figure as an estimate rather than a fact. Only the daemon's live local runtime session is resolvable; any other session id is a 404 SESSION_NOT_LOCAL.",
        "category": "sessions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:sessions"
        ],
        "http": {
          "method": "GET",
          "path": "/api/sessions/{sessionId}/context-usage"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "estimatedContextTokens": {
              "type": "number"
            },
            "contextWindow": {
              "type": "number"
            },
            "contextUsagePct": {
              "type": "number"
            },
            "contextRemainingTokens": {
              "type": "number"
            },
            "estimated": {
              "type": "boolean"
            }
          },
          "required": [
            "sessionId",
            "estimatedContextTokens",
            "contextWindow",
            "contextUsagePct",
            "contextRemainingTokens",
            "estimated"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "sessions.create",
        "title": "Create Shared Session",
        "description": "Create a shared session for a surface, route, or web client.",
        "category": "sessions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:sessions"
        ],
        "http": {
          "method": "POST",
          "path": "/api/sessions"
        },
        "events": [
          "control.session_update"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "surfaceKind": {
              "type": "string"
            },
            "surfaceId": {
              "type": "string"
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "session": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "project": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "active",
                    "closed"
                  ]
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "lastMessageAt": {
                  "type": "number"
                },
                "closedAt": {
                  "type": "number"
                },
                "lastActivityAt": {
                  "type": "number"
                },
                "messageCount": {
                  "type": "number"
                },
                "retainedMessageCount": {
                  "type": "number"
                },
                "pendingInputCount": {
                  "type": "number"
                },
                "routeIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "surfaceKinds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "participants": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "surfaceKind": {
                        "type": "string"
                      },
                      "surfaceId": {
                        "type": "string"
                      },
                      "externalId": {
                        "type": "string"
                      },
                      "userId": {
                        "type": "string"
                      },
                      "displayName": {
                        "type": "string"
                      },
                      "routeId": {
                        "type": "string"
                      },
                      "lastSeenAt": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "surfaceKind",
                      "surfaceId",
                      "lastSeenAt"
                    ],
                    "additionalProperties": false
                  }
                },
                "activeAgentId": {
                  "type": "string"
                },
                "lastAgentId": {
                  "type": "string"
                },
                "lastError": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "kind",
                "title",
                "status",
                "createdAt",
                "updatedAt",
                "lastActivityAt",
                "messageCount",
                "pendingInputCount",
                "routeIds",
                "surfaceKinds",
                "participants",
                "metadata"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "session"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "sessions.delete",
        "title": "Delete Shared Session",
        "description": "Permanently remove a shared session record and its queued inputs/messages from the home-scoped store. A distinct, explicit hard-delete verb, NEVER triggered by close; closed sessions stay listable (includeClosed) and deletionRetentionMs semantics for non-deleted records are untouched. Requires the session to already be closed: deleting a still-active session is rejected with 409 SESSION_ACTIVE (close it, then delete). An unknown or already-deleted id is a 404 SESSION_NOT_FOUND, never a 200-noop. Emits control.session_update (session-deleted) so subscribers drop the row live.",
        "category": "sessions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:sessions"
        ],
        "http": {
          "method": "DELETE",
          "path": "/api/sessions/{sessionId}"
        },
        "events": [
          "control.session_update"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "deleted": {
              "type": "boolean"
            }
          },
          "required": [
            "sessionId",
            "deleted"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "sessions.detach",
        "title": "Detach Shared Session Participant",
        "description": "Remove a surface's participant and its route binding from a session so that surface stops receiving updates, WITHOUT closing or killing the session (detach != close != kill). Every participant carrying the given surfaceId is removed and any route binding they alone held is unbound; the session and all other participants keep running. Idempotent: detaching an already-detached surface, or detaching from a closed session, is a no-op success. An unknown session is a 404.",
        "category": "sessions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:sessions"
        ],
        "http": {
          "method": "POST",
          "path": "/api/sessions/{sessionId}/detach"
        },
        "events": [
          "control.session_update"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "surfaceId": {
              "type": "string"
            }
          },
          "required": [
            "sessionId",
            "surfaceId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "session": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "project": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "active",
                    "closed"
                  ]
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "lastMessageAt": {
                  "type": "number"
                },
                "closedAt": {
                  "type": "number"
                },
                "lastActivityAt": {
                  "type": "number"
                },
                "messageCount": {
                  "type": "number"
                },
                "retainedMessageCount": {
                  "type": "number"
                },
                "pendingInputCount": {
                  "type": "number"
                },
                "routeIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "surfaceKinds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "participants": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "surfaceKind": {
                        "type": "string"
                      },
                      "surfaceId": {
                        "type": "string"
                      },
                      "externalId": {
                        "type": "string"
                      },
                      "userId": {
                        "type": "string"
                      },
                      "displayName": {
                        "type": "string"
                      },
                      "routeId": {
                        "type": "string"
                      },
                      "lastSeenAt": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "surfaceKind",
                      "surfaceId",
                      "lastSeenAt"
                    ],
                    "additionalProperties": false
                  }
                },
                "activeAgentId": {
                  "type": "string"
                },
                "lastAgentId": {
                  "type": "string"
                },
                "lastError": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "kind",
                "title",
                "status",
                "createdAt",
                "updatedAt",
                "lastActivityAt",
                "messageCount",
                "pendingInputCount",
                "routeIds",
                "surfaceKinds",
                "participants",
                "metadata"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "session"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "sessions.followUp",
        "title": "Queue Shared Session Follow-Up",
        "description": "Queue a deferred follow-up for a shared session so it runs after the current agent completes, or spawn immediately when the session is idle.",
        "category": "sessions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:sessions"
        ],
        "http": {
          "method": "POST",
          "path": "/api/sessions/{sessionId}/follow-up"
        },
        "events": [
          "control.session_update"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "body": {
              "type": "string"
            },
            "surfaceKind": {
              "type": "string"
            },
            "surfaceId": {
              "type": "string"
            },
            "routing": {
              "type": "object",
              "properties": {
                "providerId": {
                  "type": "string"
                },
                "modelId": {
                  "type": "string"
                },
                "providerSelection": {
                  "type": "string",
                  "enum": [
                    "inherit-current",
                    "concrete",
                    "synthetic"
                  ]
                },
                "providerFailurePolicy": {
                  "type": "string",
                  "enum": [
                    "ordered-fallbacks",
                    "fail"
                  ]
                },
                "fallbackModels": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "helperModel": {
                  "type": "object",
                  "properties": {
                    "providerId": {
                      "type": "string"
                    },
                    "modelId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "providerId",
                    "modelId"
                  ],
                  "additionalProperties": false
                },
                "executionIntent": {
                  "type": "object",
                  "properties": {
                    "riskClass": {
                      "type": "string",
                      "enum": [
                        "safe",
                        "elevated",
                        "dangerous"
                      ]
                    },
                    "requiresApproval": {
                      "type": "boolean"
                    },
                    "networkPolicy": {
                      "type": "string",
                      "enum": [
                        "inherit",
                        "allow",
                        "deny",
                        "scoped"
                      ]
                    },
                    "filesystemPolicy": {
                      "type": "string",
                      "enum": [
                        "inherit",
                        "workspace-write",
                        "read-only",
                        "isolated"
                      ]
                    }
                  },
                  "additionalProperties": false
                },
                "tools": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "reasoningEffort": {
                  "type": "string",
                  "enum": [
                    "none",
                    "instant",
                    "minimal",
                    "low",
                    "medium",
                    "high",
                    "xhigh",
                    "max"
                  ]
                }
              },
              "additionalProperties": false
            }
          },
          "required": [
            "body"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "session": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string"
                    },
                    "project": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "closed"
                      ]
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "updatedAt": {
                      "type": "number"
                    },
                    "lastMessageAt": {
                      "type": "number"
                    },
                    "closedAt": {
                      "type": "number"
                    },
                    "lastActivityAt": {
                      "type": "number"
                    },
                    "messageCount": {
                      "type": "number"
                    },
                    "retainedMessageCount": {
                      "type": "number"
                    },
                    "pendingInputCount": {
                      "type": "number"
                    },
                    "routeIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "surfaceKinds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "participants": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "surfaceKind": {
                            "type": "string"
                          },
                          "surfaceId": {
                            "type": "string"
                          },
                          "externalId": {
                            "type": "string"
                          },
                          "userId": {
                            "type": "string"
                          },
                          "displayName": {
                            "type": "string"
                          },
                          "routeId": {
                            "type": "string"
                          },
                          "lastSeenAt": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "surfaceKind",
                          "surfaceId",
                          "lastSeenAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "activeAgentId": {
                      "type": "string"
                    },
                    "lastAgentId": {
                      "type": "string"
                    },
                    "lastError": {
                      "type": "string"
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "title",
                    "status",
                    "createdAt",
                    "updatedAt",
                    "lastActivityAt",
                    "messageCount",
                    "pendingInputCount",
                    "routeIds",
                    "surfaceKinds",
                    "participants",
                    "metadata"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "message": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "user",
                    "assistant",
                    "system"
                  ]
                },
                "body": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "surfaceKind": {
                  "type": "string"
                },
                "surfaceId": {
                  "type": "string"
                },
                "routeId": {
                  "type": "string"
                },
                "agentId": {
                  "type": "string"
                },
                "userId": {
                  "type": "string"
                },
                "displayName": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "sessionId",
                "role",
                "body",
                "createdAt",
                "metadata"
              ],
              "additionalProperties": false
            },
            "input": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                },
                "intent": {
                  "type": "string",
                  "enum": [
                    "submit",
                    "steer",
                    "follow-up"
                  ]
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "delivered",
                    "spawned",
                    "completed",
                    "cancelled",
                    "failed",
                    "rejected"
                  ]
                },
                "correlationId": {
                  "type": "string"
                },
                "causationId": {
                  "type": "string"
                },
                "body": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "routeId": {
                  "type": "string"
                },
                "surfaceKind": {
                  "type": "string"
                },
                "surfaceId": {
                  "type": "string"
                },
                "externalId": {
                  "type": "string"
                },
                "threadId": {
                  "type": "string"
                },
                "userId": {
                  "type": "string"
                },
                "displayName": {
                  "type": "string"
                },
                "activeAgentId": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "routing": {
                  "type": "object",
                  "properties": {
                    "providerId": {
                      "type": "string"
                    },
                    "modelId": {
                      "type": "string"
                    },
                    "providerSelection": {
                      "type": "string",
                      "enum": [
                        "inherit-current",
                        "concrete",
                        "synthetic"
                      ]
                    },
                    "providerFailurePolicy": {
                      "type": "string",
                      "enum": [
                        "ordered-fallbacks",
                        "fail"
                      ]
                    },
                    "fallbackModels": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "helperModel": {
                      "type": "object",
                      "properties": {
                        "providerId": {
                          "type": "string"
                        },
                        "modelId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "providerId",
                        "modelId"
                      ],
                      "additionalProperties": false
                    },
                    "executionIntent": {
                      "type": "object",
                      "properties": {
                        "riskClass": {
                          "type": "string",
                          "enum": [
                            "safe",
                            "elevated",
                            "dangerous"
                          ]
                        },
                        "requiresApproval": {
                          "type": "boolean"
                        },
                        "networkPolicy": {
                          "type": "string",
                          "enum": [
                            "inherit",
                            "allow",
                            "deny",
                            "scoped"
                          ]
                        },
                        "filesystemPolicy": {
                          "type": "string",
                          "enum": [
                            "inherit",
                            "workspace-write",
                            "read-only",
                            "isolated"
                          ]
                        }
                      },
                      "additionalProperties": false
                    },
                    "tools": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "reasoningEffort": {
                      "type": "string",
                      "enum": [
                        "none",
                        "instant",
                        "minimal",
                        "low",
                        "medium",
                        "high",
                        "xhigh",
                        "max"
                      ]
                    }
                  },
                  "additionalProperties": false
                },
                "error": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "sessionId",
                "intent",
                "state",
                "correlationId",
                "body",
                "createdAt",
                "updatedAt",
                "metadata"
              ],
              "additionalProperties": false
            },
            "mode": {
              "type": "string",
              "enum": [
                "spawn",
                "continued-live",
                "queued-follow-up",
                "queued-for-surface",
                "rejected"
              ]
            },
            "agentId": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "session",
            "message",
            "input",
            "mode",
            "agentId"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "sessions.get",
        "title": "Get Shared Session",
        "description": "Return metadata for a shared session.",
        "category": "sessions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:sessions"
        ],
        "http": {
          "method": "GET",
          "path": "/api/sessions/{sessionId}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "session": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "project": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "active",
                    "closed"
                  ]
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "lastMessageAt": {
                  "type": "number"
                },
                "closedAt": {
                  "type": "number"
                },
                "lastActivityAt": {
                  "type": "number"
                },
                "messageCount": {
                  "type": "number"
                },
                "retainedMessageCount": {
                  "type": "number"
                },
                "pendingInputCount": {
                  "type": "number"
                },
                "routeIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "surfaceKinds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "participants": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "surfaceKind": {
                        "type": "string"
                      },
                      "surfaceId": {
                        "type": "string"
                      },
                      "externalId": {
                        "type": "string"
                      },
                      "userId": {
                        "type": "string"
                      },
                      "displayName": {
                        "type": "string"
                      },
                      "routeId": {
                        "type": "string"
                      },
                      "lastSeenAt": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "surfaceKind",
                      "surfaceId",
                      "lastSeenAt"
                    ],
                    "additionalProperties": false
                  }
                },
                "activeAgentId": {
                  "type": "string"
                },
                "lastAgentId": {
                  "type": "string"
                },
                "lastError": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "kind",
                "title",
                "status",
                "createdAt",
                "updatedAt",
                "lastActivityAt",
                "messageCount",
                "pendingInputCount",
                "routeIds",
                "surfaceKinds",
                "participants",
                "metadata"
              ],
              "additionalProperties": false
            },
            "messages": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "sessionId": {
                    "type": "string"
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "user",
                      "assistant",
                      "system"
                    ]
                  },
                  "body": {
                    "type": "string"
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "surfaceKind": {
                    "type": "string"
                  },
                  "surfaceId": {
                    "type": "string"
                  },
                  "routeId": {
                    "type": "string"
                  },
                  "agentId": {
                    "type": "string"
                  },
                  "userId": {
                    "type": "string"
                  },
                  "displayName": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "sessionId",
                  "role",
                  "body",
                  "createdAt",
                  "metadata"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "session",
            "messages"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "sessions.hosted.attach",
        "title": "Attach to a Daemon-Hosted Session",
        "description": "Join a hosted session and receive its transcript so far, so a client that was never connected, or one reconnecting after the daemon restarted, renders what it missed instead of an empty screen. A session restored from disk has its loop rebuilt on this call, with a system line in the transcript stating that its in-flight turn did not survive the restart. Live output continues on the `turn` and `tools` event domains, filtered on this session id. Attaching is what keeps a `kill`-policy session alive: the policy is applied when the LAST client detaches. An attachment carries a LEASE, `hostedSessions.attachmentTtlMs`, ten minutes by default, or `leaseMs` for this attachment alone, because a client that crashed or closed its tab never calls detach, and a claim nothing expires would hold a kill-policy session open forever. Calling attach again with the same `clientId` renews it, and a client whose control-plane connection is still open renews automatically, so an attached client watching a long turn in silence is never reaped. When the last attachment lapses the session is treated as detached and its policy decides. ws-only invoke verb; no REST binding.",
        "category": "sessions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:sessions"
        ],
        "events": [
          "control.hosted_session_update"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "clientId": {
              "type": "string"
            },
            "leaseMs": {
              "type": "number"
            }
          },
          "required": [
            "sessionId",
            "clientId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "session": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "workspaceRoot": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "idle",
                    "running",
                    "terminated"
                  ]
                },
                "detachPolicy": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "kill",
                        "survive"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "effectiveDetachPolicy": {
                  "type": "string",
                  "enum": [
                    "kill",
                    "survive"
                  ]
                },
                "attachedClients": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "providerId": {
                  "type": "string"
                },
                "modelId": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "turnCount": {
                  "type": "number"
                },
                "messageCount": {
                  "type": "number"
                },
                "lastTurnAt": {
                  "type": "number"
                },
                "terminatedAt": {
                  "type": "number"
                },
                "terminatedReason": {
                  "type": "string"
                },
                "restoredFromDisk": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "workspaceRoot",
                "title",
                "status",
                "detachPolicy",
                "effectiveDetachPolicy",
                "attachedClients",
                "createdAt",
                "updatedAt",
                "turnCount",
                "messageCount",
                "restoredFromDisk"
              ],
              "additionalProperties": false
            },
            "history": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "role": {
                    "type": "string",
                    "enum": [
                      "user",
                      "assistant",
                      "system",
                      "tool"
                    ]
                  },
                  "content": {
                    "type": "string"
                  },
                  "at": {
                    "type": "number"
                  }
                },
                "required": [
                  "role",
                  "content"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "session",
            "history"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "sessions.hosted.create",
        "title": "Create a Daemon-Hosted Session",
        "description": "Compose a full conversation loop INSIDE the daemon for a workspace: the same orchestrator, tool registry and permission gate a terminal runs, hosted here so the conversation does not depend on the client that started it staying open. `workspaceRoot` must be absolute, a relative path would resolve against the daemon's own directory, which is never what the caller meant. `modelId` is resolved against this daemon's live model registry when given, so an unknown or ambiguous id is refused here rather than at the first turn; omitted, the session follows the daemon's current selection. `detachPolicy` overrides the `hostedSessions.detachPolicy` setting for this session alone. `initialPrompt` is submitted as the first user message and the call does NOT wait for that turn, watch the `turn` and `tools` event domains filtered on the returned session id. Refused with the live count and the setting named when `hostedSessions.maxSessions` is already reached. ws-only invoke verb; no REST binding.",
        "category": "sessions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:sessions"
        ],
        "events": [
          "control.hosted_session_update",
          "control.session_update"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "workspaceRoot": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "modelId": {
              "type": "string"
            },
            "initialPrompt": {
              "type": "string"
            },
            "detachPolicy": {
              "type": "string",
              "enum": [
                "kill",
                "survive"
              ]
            },
            "clientId": {
              "type": "string"
            }
          },
          "required": [
            "workspaceRoot"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "session": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "workspaceRoot": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "idle",
                    "running",
                    "terminated"
                  ]
                },
                "detachPolicy": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "kill",
                        "survive"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "effectiveDetachPolicy": {
                  "type": "string",
                  "enum": [
                    "kill",
                    "survive"
                  ]
                },
                "attachedClients": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "providerId": {
                  "type": "string"
                },
                "modelId": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "turnCount": {
                  "type": "number"
                },
                "messageCount": {
                  "type": "number"
                },
                "lastTurnAt": {
                  "type": "number"
                },
                "terminatedAt": {
                  "type": "number"
                },
                "terminatedReason": {
                  "type": "string"
                },
                "restoredFromDisk": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "workspaceRoot",
                "title",
                "status",
                "detachPolicy",
                "effectiveDetachPolicy",
                "attachedClients",
                "createdAt",
                "updatedAt",
                "turnCount",
                "messageCount",
                "restoredFromDisk"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "session"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "sessions.hosted.detach",
        "title": "Detach from a Daemon-Hosted Session",
        "description": "Leave a hosted session. When other clients are still attached, nothing else happens. When this was the LAST client, the effective detach policy decides: `kill` (the default, and what closing a client has always done) terminates the session with the reason `detached`; `survive` leaves it idle and reattachable. The policy is the session's own override when it was created with one and the `hostedSessions.detachPolicy` setting otherwise, and the returned record says which applied and what the session now is, never a guess by the caller. ws-only invoke verb; no REST binding.",
        "category": "sessions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:sessions"
        ],
        "events": [
          "control.hosted_session_update"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "clientId": {
              "type": "string"
            }
          },
          "required": [
            "sessionId",
            "clientId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "session": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "workspaceRoot": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "idle",
                    "running",
                    "terminated"
                  ]
                },
                "detachPolicy": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "kill",
                        "survive"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "effectiveDetachPolicy": {
                  "type": "string",
                  "enum": [
                    "kill",
                    "survive"
                  ]
                },
                "attachedClients": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "providerId": {
                  "type": "string"
                },
                "modelId": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "turnCount": {
                  "type": "number"
                },
                "messageCount": {
                  "type": "number"
                },
                "lastTurnAt": {
                  "type": "number"
                },
                "terminatedAt": {
                  "type": "number"
                },
                "terminatedReason": {
                  "type": "string"
                },
                "restoredFromDisk": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "workspaceRoot",
                "title",
                "status",
                "detachPolicy",
                "effectiveDetachPolicy",
                "attachedClients",
                "createdAt",
                "updatedAt",
                "turnCount",
                "messageCount",
                "restoredFromDisk"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "session"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "sessions.hosted.kill",
        "title": "End a Daemon-Hosted Session",
        "description": "End a hosted session regardless of who is attached or what its detach policy says: the in-flight turn is interrupted, its loop is taken apart, its workspace floor is released when it was the last session using it, and the record is kept, terminated, with the reason `killed`, until `hostedSessions.terminatedRetentionMs` retires it. Killing an already-terminated session returns that record unchanged rather than reporting an error for work that is already done. ws-only invoke verb; no REST binding.",
        "category": "sessions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:sessions"
        ],
        "events": [
          "control.hosted_session_update",
          "control.session_update"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "session": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "workspaceRoot": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "idle",
                    "running",
                    "terminated"
                  ]
                },
                "detachPolicy": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "kill",
                        "survive"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "effectiveDetachPolicy": {
                  "type": "string",
                  "enum": [
                    "kill",
                    "survive"
                  ]
                },
                "attachedClients": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "providerId": {
                  "type": "string"
                },
                "modelId": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "turnCount": {
                  "type": "number"
                },
                "messageCount": {
                  "type": "number"
                },
                "lastTurnAt": {
                  "type": "number"
                },
                "terminatedAt": {
                  "type": "number"
                },
                "terminatedReason": {
                  "type": "string"
                },
                "restoredFromDisk": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "workspaceRoot",
                "title",
                "status",
                "detachPolicy",
                "effectiveDetachPolicy",
                "attachedClients",
                "createdAt",
                "updatedAt",
                "turnCount",
                "messageCount",
                "restoredFromDisk"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "session"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "sessions.hosted.list",
        "title": "List Daemon-Hosted Sessions",
        "description": "Every session this daemon hosts, most recently updated first. Terminated sessions are excluded unless `includeTerminated` is set, they are kept, with the reason they ended, until the retention window retires them, so a session that stopped can be asked about instead of having simply vanished. Each record carries the policy that would apply on the next detach, so a client can show what leaving will do before it leaves. ws-only invoke verb; no REST binding.",
        "category": "sessions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "read:sessions"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "includeTerminated": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessions": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "workspaceRoot": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "idle",
                      "running",
                      "terminated"
                    ]
                  },
                  "detachPolicy": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "kill",
                          "survive"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "effectiveDetachPolicy": {
                    "type": "string",
                    "enum": [
                      "kill",
                      "survive"
                    ]
                  },
                  "attachedClients": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "providerId": {
                    "type": "string"
                  },
                  "modelId": {
                    "type": "string"
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  },
                  "turnCount": {
                    "type": "number"
                  },
                  "messageCount": {
                    "type": "number"
                  },
                  "lastTurnAt": {
                    "type": "number"
                  },
                  "terminatedAt": {
                    "type": "number"
                  },
                  "terminatedReason": {
                    "type": "string"
                  },
                  "restoredFromDisk": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "id",
                  "workspaceRoot",
                  "title",
                  "status",
                  "detachPolicy",
                  "effectiveDetachPolicy",
                  "attachedClients",
                  "createdAt",
                  "updatedAt",
                  "turnCount",
                  "messageCount",
                  "restoredFromDisk"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "sessions"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "sessions.inputs.cancel",
        "title": "Cancel Shared Session Input",
        "description": "Cancel a queued shared-session input before it is delivered or spawned.",
        "category": "sessions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:sessions"
        ],
        "http": {
          "method": "POST",
          "path": "/api/sessions/{sessionId}/inputs/{inputId}/cancel"
        },
        "events": [
          "control.session_update"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "inputId": {
              "type": "string"
            }
          },
          "required": [
            "sessionId",
            "inputId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "input": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                },
                "intent": {
                  "type": "string",
                  "enum": [
                    "submit",
                    "steer",
                    "follow-up"
                  ]
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "delivered",
                    "spawned",
                    "completed",
                    "cancelled",
                    "failed",
                    "rejected"
                  ]
                },
                "correlationId": {
                  "type": "string"
                },
                "causationId": {
                  "type": "string"
                },
                "body": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "routeId": {
                  "type": "string"
                },
                "surfaceKind": {
                  "type": "string"
                },
                "surfaceId": {
                  "type": "string"
                },
                "externalId": {
                  "type": "string"
                },
                "threadId": {
                  "type": "string"
                },
                "userId": {
                  "type": "string"
                },
                "displayName": {
                  "type": "string"
                },
                "activeAgentId": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "routing": {
                  "type": "object",
                  "properties": {
                    "providerId": {
                      "type": "string"
                    },
                    "modelId": {
                      "type": "string"
                    },
                    "providerSelection": {
                      "type": "string",
                      "enum": [
                        "inherit-current",
                        "concrete",
                        "synthetic"
                      ]
                    },
                    "providerFailurePolicy": {
                      "type": "string",
                      "enum": [
                        "ordered-fallbacks",
                        "fail"
                      ]
                    },
                    "fallbackModels": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "helperModel": {
                      "type": "object",
                      "properties": {
                        "providerId": {
                          "type": "string"
                        },
                        "modelId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "providerId",
                        "modelId"
                      ],
                      "additionalProperties": false
                    },
                    "executionIntent": {
                      "type": "object",
                      "properties": {
                        "riskClass": {
                          "type": "string",
                          "enum": [
                            "safe",
                            "elevated",
                            "dangerous"
                          ]
                        },
                        "requiresApproval": {
                          "type": "boolean"
                        },
                        "networkPolicy": {
                          "type": "string",
                          "enum": [
                            "inherit",
                            "allow",
                            "deny",
                            "scoped"
                          ]
                        },
                        "filesystemPolicy": {
                          "type": "string",
                          "enum": [
                            "inherit",
                            "workspace-write",
                            "read-only",
                            "isolated"
                          ]
                        }
                      },
                      "additionalProperties": false
                    },
                    "tools": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "reasoningEffort": {
                      "type": "string",
                      "enum": [
                        "none",
                        "instant",
                        "minimal",
                        "low",
                        "medium",
                        "high",
                        "xhigh",
                        "max"
                      ]
                    }
                  },
                  "additionalProperties": false
                },
                "error": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "sessionId",
                "intent",
                "state",
                "correlationId",
                "body",
                "createdAt",
                "updatedAt",
                "metadata"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "input"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "sessions.inputs.deliver",
        "title": "Mark Shared Session Input Delivered",
        "description": "A live registered surface reports that it collected a queued input (moves it to `delivered`) or finished acting on it (`consumed:true` moves it to `completed`). This is how a surface-managed session, where steer/follow-up inputs queue for the surface rather than spawn a daemon executor, closes the input lifecycle honestly. Only queued/delivered inputs advance; others are returned unchanged. `agentId` names the agent the surface is running for this input: it binds the reply so a message that arrived over a channel gets its answer routed back to that conversation, the same binding the daemon makes for the executors it spawns itself. `answer` (sent with `consumed:true`, optionally with `status`) is the output that agent finished with, the daemon writes it into the session and delivers it to the channel.",
        "category": "sessions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:sessions"
        ],
        "http": {
          "method": "POST",
          "path": "/api/sessions/{sessionId}/inputs/{inputId}/deliver"
        },
        "events": [
          "control.session_update"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "inputId": {
              "type": "string"
            },
            "consumed": {
              "type": "boolean"
            },
            "agentId": {
              "type": "string"
            },
            "answer": {
              "type": "string"
            },
            "status": {
              "type": "string"
            }
          },
          "required": [
            "sessionId",
            "inputId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "input": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                },
                "intent": {
                  "type": "string",
                  "enum": [
                    "submit",
                    "steer",
                    "follow-up"
                  ]
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "delivered",
                    "spawned",
                    "completed",
                    "cancelled",
                    "failed",
                    "rejected"
                  ]
                },
                "correlationId": {
                  "type": "string"
                },
                "causationId": {
                  "type": "string"
                },
                "body": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "routeId": {
                  "type": "string"
                },
                "surfaceKind": {
                  "type": "string"
                },
                "surfaceId": {
                  "type": "string"
                },
                "externalId": {
                  "type": "string"
                },
                "threadId": {
                  "type": "string"
                },
                "userId": {
                  "type": "string"
                },
                "displayName": {
                  "type": "string"
                },
                "activeAgentId": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "routing": {
                  "type": "object",
                  "properties": {
                    "providerId": {
                      "type": "string"
                    },
                    "modelId": {
                      "type": "string"
                    },
                    "providerSelection": {
                      "type": "string",
                      "enum": [
                        "inherit-current",
                        "concrete",
                        "synthetic"
                      ]
                    },
                    "providerFailurePolicy": {
                      "type": "string",
                      "enum": [
                        "ordered-fallbacks",
                        "fail"
                      ]
                    },
                    "fallbackModels": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "helperModel": {
                      "type": "object",
                      "properties": {
                        "providerId": {
                          "type": "string"
                        },
                        "modelId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "providerId",
                        "modelId"
                      ],
                      "additionalProperties": false
                    },
                    "executionIntent": {
                      "type": "object",
                      "properties": {
                        "riskClass": {
                          "type": "string",
                          "enum": [
                            "safe",
                            "elevated",
                            "dangerous"
                          ]
                        },
                        "requiresApproval": {
                          "type": "boolean"
                        },
                        "networkPolicy": {
                          "type": "string",
                          "enum": [
                            "inherit",
                            "allow",
                            "deny",
                            "scoped"
                          ]
                        },
                        "filesystemPolicy": {
                          "type": "string",
                          "enum": [
                            "inherit",
                            "workspace-write",
                            "read-only",
                            "isolated"
                          ]
                        }
                      },
                      "additionalProperties": false
                    },
                    "tools": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "reasoningEffort": {
                      "type": "string",
                      "enum": [
                        "none",
                        "instant",
                        "minimal",
                        "low",
                        "medium",
                        "high",
                        "xhigh",
                        "max"
                      ]
                    }
                  },
                  "additionalProperties": false
                },
                "error": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "sessionId",
                "intent",
                "state",
                "correlationId",
                "body",
                "createdAt",
                "updatedAt",
                "metadata"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "input"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "sessions.inputs.list",
        "title": "List Shared Session Inputs",
        "description": "Return explicit session inputs, including queued follow-ups and delivered steering requests. A live surface collects work by filtering `state` (e.g. queued) and paging past a `since` createdAt cursor (exclusive), draining only inputs it has not yet collected.",
        "category": "sessions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:sessions"
        ],
        "http": {
          "method": "GET",
          "path": "/api/sessions/{sessionId}/inputs"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "limit": {
              "type": "number"
            },
            "state": {
              "type": "string"
            },
            "since": {
              "type": "number"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "session": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "project": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "active",
                    "closed"
                  ]
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "lastMessageAt": {
                  "type": "number"
                },
                "closedAt": {
                  "type": "number"
                },
                "lastActivityAt": {
                  "type": "number"
                },
                "messageCount": {
                  "type": "number"
                },
                "retainedMessageCount": {
                  "type": "number"
                },
                "pendingInputCount": {
                  "type": "number"
                },
                "routeIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "surfaceKinds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "participants": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "surfaceKind": {
                        "type": "string"
                      },
                      "surfaceId": {
                        "type": "string"
                      },
                      "externalId": {
                        "type": "string"
                      },
                      "userId": {
                        "type": "string"
                      },
                      "displayName": {
                        "type": "string"
                      },
                      "routeId": {
                        "type": "string"
                      },
                      "lastSeenAt": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "surfaceKind",
                      "surfaceId",
                      "lastSeenAt"
                    ],
                    "additionalProperties": false
                  }
                },
                "activeAgentId": {
                  "type": "string"
                },
                "lastAgentId": {
                  "type": "string"
                },
                "lastError": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "kind",
                "title",
                "status",
                "createdAt",
                "updatedAt",
                "lastActivityAt",
                "messageCount",
                "pendingInputCount",
                "routeIds",
                "surfaceKinds",
                "participants",
                "metadata"
              ],
              "additionalProperties": false
            },
            "inputs": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "sessionId": {
                    "type": "string"
                  },
                  "intent": {
                    "type": "string",
                    "enum": [
                      "submit",
                      "steer",
                      "follow-up"
                    ]
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "queued",
                      "delivered",
                      "spawned",
                      "completed",
                      "cancelled",
                      "failed",
                      "rejected"
                    ]
                  },
                  "correlationId": {
                    "type": "string"
                  },
                  "causationId": {
                    "type": "string"
                  },
                  "body": {
                    "type": "string"
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  },
                  "routeId": {
                    "type": "string"
                  },
                  "surfaceKind": {
                    "type": "string"
                  },
                  "surfaceId": {
                    "type": "string"
                  },
                  "externalId": {
                    "type": "string"
                  },
                  "threadId": {
                    "type": "string"
                  },
                  "userId": {
                    "type": "string"
                  },
                  "displayName": {
                    "type": "string"
                  },
                  "activeAgentId": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "routing": {
                    "type": "object",
                    "properties": {
                      "providerId": {
                        "type": "string"
                      },
                      "modelId": {
                        "type": "string"
                      },
                      "providerSelection": {
                        "type": "string",
                        "enum": [
                          "inherit-current",
                          "concrete",
                          "synthetic"
                        ]
                      },
                      "providerFailurePolicy": {
                        "type": "string",
                        "enum": [
                          "ordered-fallbacks",
                          "fail"
                        ]
                      },
                      "fallbackModels": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "helperModel": {
                        "type": "object",
                        "properties": {
                          "providerId": {
                            "type": "string"
                          },
                          "modelId": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "providerId",
                          "modelId"
                        ],
                        "additionalProperties": false
                      },
                      "executionIntent": {
                        "type": "object",
                        "properties": {
                          "riskClass": {
                            "type": "string",
                            "enum": [
                              "safe",
                              "elevated",
                              "dangerous"
                            ]
                          },
                          "requiresApproval": {
                            "type": "boolean"
                          },
                          "networkPolicy": {
                            "type": "string",
                            "enum": [
                              "inherit",
                              "allow",
                              "deny",
                              "scoped"
                            ]
                          },
                          "filesystemPolicy": {
                            "type": "string",
                            "enum": [
                              "inherit",
                              "workspace-write",
                              "read-only",
                              "isolated"
                            ]
                          }
                        },
                        "additionalProperties": false
                      },
                      "tools": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "reasoningEffort": {
                        "type": "string",
                        "enum": [
                          "none",
                          "instant",
                          "minimal",
                          "low",
                          "medium",
                          "high",
                          "xhigh",
                          "max"
                        ]
                      }
                    },
                    "additionalProperties": false
                  },
                  "error": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "sessionId",
                  "intent",
                  "state",
                  "correlationId",
                  "body",
                  "createdAt",
                  "updatedAt",
                  "metadata"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "session",
            "inputs"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "sessions.integration.snapshot",
        "title": "Session Integration Snapshot",
        "description": "Return the session integration snapshot.",
        "category": "sessions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:sessions"
        ],
        "http": {
          "method": "GET",
          "path": "/api/session"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "status": {
              "type": "string"
            },
            "recoveryState": {
              "type": "string"
            },
            "projectRoot": {
              "type": "string"
            },
            "isResumed": {
              "type": "boolean"
            },
            "resumedFromId": {
              "type": "string"
            },
            "compactionState": {
              "type": "string"
            },
            "lastCompactedAt": {
              "type": "number"
            },
            "lineage": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "id",
            "title",
            "status",
            "recoveryState",
            "projectRoot",
            "isResumed",
            "compactionState",
            "lineage"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "sessions.list",
        "title": "List Shared Sessions",
        "description": "Return shared-session integration state.",
        "category": "sessions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:sessions"
        ],
        "http": {
          "method": "GET",
          "path": "/api/sessions"
        },
        "events": [
          "runtime.session"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "totals": {
              "type": "object",
              "properties": {
                "sessions": {
                  "type": "number"
                },
                "active": {
                  "type": "number"
                },
                "closed": {
                  "type": "number"
                }
              },
              "required": [
                "sessions",
                "active",
                "closed"
              ],
              "additionalProperties": false
            },
            "sessions": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string"
                  },
                  "project": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "active",
                      "closed"
                    ]
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  },
                  "lastMessageAt": {
                    "type": "number"
                  },
                  "closedAt": {
                    "type": "number"
                  },
                  "lastActivityAt": {
                    "type": "number"
                  },
                  "messageCount": {
                    "type": "number"
                  },
                  "retainedMessageCount": {
                    "type": "number"
                  },
                  "pendingInputCount": {
                    "type": "number"
                  },
                  "routeIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "surfaceKinds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "participants": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "surfaceKind": {
                          "type": "string"
                        },
                        "surfaceId": {
                          "type": "string"
                        },
                        "externalId": {
                          "type": "string"
                        },
                        "userId": {
                          "type": "string"
                        },
                        "displayName": {
                          "type": "string"
                        },
                        "routeId": {
                          "type": "string"
                        },
                        "lastSeenAt": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "surfaceKind",
                        "surfaceId",
                        "lastSeenAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "activeAgentId": {
                    "type": "string"
                  },
                  "lastAgentId": {
                    "type": "string"
                  },
                  "lastError": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "kind",
                  "title",
                  "status",
                  "createdAt",
                  "updatedAt",
                  "lastActivityAt",
                  "messageCount",
                  "pendingInputCount",
                  "routeIds",
                  "surfaceKinds",
                  "participants",
                  "metadata"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "totals",
            "sessions"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "sessions.messages.create",
        "title": "Post Shared Session Message",
        "description": "Append a user message to a shared session. Omitted `kind` defaults to `message` conversation routing; send `kind: \"task\"` to request agent/WRFC task continuation.",
        "category": "sessions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:sessions"
        ],
        "http": {
          "method": "POST",
          "path": "/api/sessions/{sessionId}/messages"
        },
        "events": [
          "control.session_update"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "body": {
              "type": "string"
            },
            "surfaceKind": {
              "type": "string"
            },
            "surfaceId": {
              "type": "string"
            },
            "kind": {
              "type": "string"
            },
            "routing": {
              "type": "object",
              "properties": {
                "providerId": {
                  "type": "string"
                },
                "modelId": {
                  "type": "string"
                },
                "providerSelection": {
                  "type": "string",
                  "enum": [
                    "inherit-current",
                    "concrete",
                    "synthetic"
                  ]
                },
                "providerFailurePolicy": {
                  "type": "string",
                  "enum": [
                    "ordered-fallbacks",
                    "fail"
                  ]
                },
                "fallbackModels": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "helperModel": {
                  "type": "object",
                  "properties": {
                    "providerId": {
                      "type": "string"
                    },
                    "modelId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "providerId",
                    "modelId"
                  ],
                  "additionalProperties": false
                },
                "executionIntent": {
                  "type": "object",
                  "properties": {
                    "riskClass": {
                      "type": "string",
                      "enum": [
                        "safe",
                        "elevated",
                        "dangerous"
                      ]
                    },
                    "requiresApproval": {
                      "type": "boolean"
                    },
                    "networkPolicy": {
                      "type": "string",
                      "enum": [
                        "inherit",
                        "allow",
                        "deny",
                        "scoped"
                      ]
                    },
                    "filesystemPolicy": {
                      "type": "string",
                      "enum": [
                        "inherit",
                        "workspace-write",
                        "read-only",
                        "isolated"
                      ]
                    }
                  },
                  "additionalProperties": false
                },
                "tools": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "reasoningEffort": {
                  "type": "string",
                  "enum": [
                    "none",
                    "instant",
                    "minimal",
                    "low",
                    "medium",
                    "high",
                    "xhigh",
                    "max"
                  ]
                }
              },
              "additionalProperties": false
            }
          },
          "required": [
            "body"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "messageId": {
                  "type": "string"
                },
                "routedTo": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                }
              },
              "required": [
                "messageId",
                "routedTo",
                "sessionId"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "session": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "kind": {
                          "type": "string"
                        },
                        "project": {
                          "type": "string"
                        },
                        "title": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "closed"
                          ]
                        },
                        "createdAt": {
                          "type": "number"
                        },
                        "updatedAt": {
                          "type": "number"
                        },
                        "lastMessageAt": {
                          "type": "number"
                        },
                        "closedAt": {
                          "type": "number"
                        },
                        "lastActivityAt": {
                          "type": "number"
                        },
                        "messageCount": {
                          "type": "number"
                        },
                        "retainedMessageCount": {
                          "type": "number"
                        },
                        "pendingInputCount": {
                          "type": "number"
                        },
                        "routeIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "surfaceKinds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "participants": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "surfaceKind": {
                                "type": "string"
                              },
                              "surfaceId": {
                                "type": "string"
                              },
                              "externalId": {
                                "type": "string"
                              },
                              "userId": {
                                "type": "string"
                              },
                              "displayName": {
                                "type": "string"
                              },
                              "routeId": {
                                "type": "string"
                              },
                              "lastSeenAt": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "surfaceKind",
                              "surfaceId",
                              "lastSeenAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "activeAgentId": {
                          "type": "string"
                        },
                        "lastAgentId": {
                          "type": "string"
                        },
                        "lastError": {
                          "type": "string"
                        },
                        "metadata": {
                          "type": "object",
                          "additionalProperties": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "id",
                        "kind",
                        "title",
                        "status",
                        "createdAt",
                        "updatedAt",
                        "lastActivityAt",
                        "messageCount",
                        "pendingInputCount",
                        "routeIds",
                        "surfaceKinds",
                        "participants",
                        "metadata"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "message": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "sessionId": {
                      "type": "string"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "user",
                        "assistant",
                        "system"
                      ]
                    },
                    "body": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "surfaceKind": {
                      "type": "string"
                    },
                    "surfaceId": {
                      "type": "string"
                    },
                    "routeId": {
                      "type": "string"
                    },
                    "agentId": {
                      "type": "string"
                    },
                    "userId": {
                      "type": "string"
                    },
                    "displayName": {
                      "type": "string"
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "sessionId",
                    "role",
                    "body",
                    "createdAt",
                    "metadata"
                  ],
                  "additionalProperties": false
                },
                "input": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "sessionId": {
                      "type": "string"
                    },
                    "intent": {
                      "type": "string",
                      "enum": [
                        "submit",
                        "steer",
                        "follow-up"
                      ]
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "queued",
                        "delivered",
                        "spawned",
                        "completed",
                        "cancelled",
                        "failed",
                        "rejected"
                      ]
                    },
                    "correlationId": {
                      "type": "string"
                    },
                    "causationId": {
                      "type": "string"
                    },
                    "body": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "updatedAt": {
                      "type": "number"
                    },
                    "routeId": {
                      "type": "string"
                    },
                    "surfaceKind": {
                      "type": "string"
                    },
                    "surfaceId": {
                      "type": "string"
                    },
                    "externalId": {
                      "type": "string"
                    },
                    "threadId": {
                      "type": "string"
                    },
                    "userId": {
                      "type": "string"
                    },
                    "displayName": {
                      "type": "string"
                    },
                    "activeAgentId": {
                      "type": "string"
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    },
                    "routing": {
                      "type": "object",
                      "properties": {
                        "providerId": {
                          "type": "string"
                        },
                        "modelId": {
                          "type": "string"
                        },
                        "providerSelection": {
                          "type": "string",
                          "enum": [
                            "inherit-current",
                            "concrete",
                            "synthetic"
                          ]
                        },
                        "providerFailurePolicy": {
                          "type": "string",
                          "enum": [
                            "ordered-fallbacks",
                            "fail"
                          ]
                        },
                        "fallbackModels": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "helperModel": {
                          "type": "object",
                          "properties": {
                            "providerId": {
                              "type": "string"
                            },
                            "modelId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "providerId",
                            "modelId"
                          ],
                          "additionalProperties": false
                        },
                        "executionIntent": {
                          "type": "object",
                          "properties": {
                            "riskClass": {
                              "type": "string",
                              "enum": [
                                "safe",
                                "elevated",
                                "dangerous"
                              ]
                            },
                            "requiresApproval": {
                              "type": "boolean"
                            },
                            "networkPolicy": {
                              "type": "string",
                              "enum": [
                                "inherit",
                                "allow",
                                "deny",
                                "scoped"
                              ]
                            },
                            "filesystemPolicy": {
                              "type": "string",
                              "enum": [
                                "inherit",
                                "workspace-write",
                                "read-only",
                                "isolated"
                              ]
                            }
                          },
                          "additionalProperties": false
                        },
                        "tools": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "reasoningEffort": {
                          "type": "string",
                          "enum": [
                            "none",
                            "instant",
                            "minimal",
                            "low",
                            "medium",
                            "high",
                            "xhigh",
                            "max"
                          ]
                        }
                      },
                      "additionalProperties": false
                    },
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "sessionId",
                    "intent",
                    "state",
                    "correlationId",
                    "body",
                    "createdAt",
                    "updatedAt",
                    "metadata"
                  ],
                  "additionalProperties": false
                },
                "mode": {
                  "type": "string",
                  "enum": [
                    "spawn",
                    "continued-live",
                    "queued-follow-up",
                    "queued-for-surface",
                    "rejected"
                  ]
                },
                "agentId": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "session",
                "message",
                "input",
                "mode",
                "agentId"
              ],
              "additionalProperties": false
            }
          ]
        },
        "invokable": true
      },
      {
        "id": "sessions.messages.list",
        "title": "List Shared Session Messages",
        "description": "Return message history for a shared session.",
        "category": "sessions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:sessions"
        ],
        "http": {
          "method": "GET",
          "path": "/api/sessions/{sessionId}/messages"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "limit": {
              "type": "number"
            },
            "before": {
              "type": "string"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "session": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "project": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "active",
                    "closed"
                  ]
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "lastMessageAt": {
                  "type": "number"
                },
                "closedAt": {
                  "type": "number"
                },
                "lastActivityAt": {
                  "type": "number"
                },
                "messageCount": {
                  "type": "number"
                },
                "retainedMessageCount": {
                  "type": "number"
                },
                "pendingInputCount": {
                  "type": "number"
                },
                "routeIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "surfaceKinds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "participants": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "surfaceKind": {
                        "type": "string"
                      },
                      "surfaceId": {
                        "type": "string"
                      },
                      "externalId": {
                        "type": "string"
                      },
                      "userId": {
                        "type": "string"
                      },
                      "displayName": {
                        "type": "string"
                      },
                      "routeId": {
                        "type": "string"
                      },
                      "lastSeenAt": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "surfaceKind",
                      "surfaceId",
                      "lastSeenAt"
                    ],
                    "additionalProperties": false
                  }
                },
                "activeAgentId": {
                  "type": "string"
                },
                "lastAgentId": {
                  "type": "string"
                },
                "lastError": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "kind",
                "title",
                "status",
                "createdAt",
                "updatedAt",
                "lastActivityAt",
                "messageCount",
                "pendingInputCount",
                "routeIds",
                "surfaceKinds",
                "participants",
                "metadata"
              ],
              "additionalProperties": false
            },
            "messages": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "sessionId": {
                    "type": "string"
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "user",
                      "assistant",
                      "system"
                    ]
                  },
                  "body": {
                    "type": "string"
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "surfaceKind": {
                    "type": "string"
                  },
                  "surfaceId": {
                    "type": "string"
                  },
                  "routeId": {
                    "type": "string"
                  },
                  "agentId": {
                    "type": "string"
                  },
                  "userId": {
                    "type": "string"
                  },
                  "displayName": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "sessionId",
                  "role",
                  "body",
                  "createdAt",
                  "metadata"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "session",
            "messages"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "sessions.permissionMode.get",
        "title": "Get Session Permission Mode",
        "description": "Return the permission mode currently in effect for a session (plan/normal/accept-edits/auto, or custom for a bespoke rule set). Only the daemon's live local runtime session is resolvable; any other session id is a 404 SESSION_NOT_LOCAL.",
        "category": "sessions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:sessions"
        ],
        "http": {
          "method": "GET",
          "path": "/api/sessions/{sessionId}/permission-mode"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "mode": {
              "type": "string",
              "enum": [
                "plan",
                "normal",
                "accept-edits",
                "auto",
                "custom"
              ]
            }
          },
          "required": [
            "sessionId",
            "mode"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "sessions.permissionMode.set",
        "title": "Set Session Permission Mode",
        "description": "Set a session's permission mode to plan, normal, accept-edits, or auto. Emits runtime.permissions (PERMISSION_MODE_CHANGED) so every surface stays in sync. Only the daemon's live local runtime session is settable; any other session id is a 404 SESSION_NOT_LOCAL.",
        "category": "sessions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:sessions"
        ],
        "http": {
          "method": "POST",
          "path": "/api/sessions/{sessionId}/permission-mode"
        },
        "events": [
          "runtime.permissions"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "mode": {
              "type": "string",
              "enum": [
                "plan",
                "normal",
                "accept-edits",
                "auto"
              ]
            }
          },
          "required": [
            "sessionId",
            "mode"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "mode": {
              "type": "string",
              "enum": [
                "plan",
                "normal",
                "accept-edits",
                "auto",
                "custom"
              ]
            },
            "previousMode": {
              "type": "string",
              "enum": [
                "plan",
                "normal",
                "accept-edits",
                "auto",
                "custom"
              ]
            }
          },
          "required": [
            "sessionId",
            "mode",
            "previousMode"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "sessions.queuedMessages.delete",
        "title": "Delete a Queued Mid-Turn Message",
        "description": "Remove a message still waiting in the mid-turn queue so it is never delivered. A message already delivered to the model cannot be removed, deleting it is a 404 MESSAGE_NOT_QUEUED. Only the daemon's live local runtime session is controllable; any other session id is a 404 SESSION_NOT_LOCAL.",
        "category": "sessions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:sessions"
        ],
        "http": {
          "method": "DELETE",
          "path": "/api/sessions/{sessionId}/queued-messages/{messageId}"
        },
        "events": [
          "runtime.session"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "messageId": {
              "type": "string"
            }
          },
          "required": [
            "sessionId",
            "messageId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "id": {
              "type": "string"
            },
            "deleted": {
              "type": "boolean"
            }
          },
          "required": [
            "sessionId",
            "id",
            "deleted"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "sessions.queuedMessages.edit",
        "title": "Edit a Queued Mid-Turn Message",
        "description": "Replace the text of a message still waiting in the mid-turn queue. A message already delivered to the model is immutable, editing it is a 404 MESSAGE_NOT_QUEUED. Editing replaces any multimodal content with the new plain text. Only the daemon's live local runtime session is controllable; any other session id is a 404 SESSION_NOT_LOCAL.",
        "category": "sessions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:sessions"
        ],
        "http": {
          "method": "POST",
          "path": "/api/sessions/{sessionId}/queued-messages/{messageId}"
        },
        "events": [
          "runtime.session"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "messageId": {
              "type": "string"
            },
            "text": {
              "type": "string"
            }
          },
          "required": [
            "sessionId",
            "messageId",
            "text"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "id": {
              "type": "string"
            },
            "text": {
              "type": "string"
            }
          },
          "required": [
            "sessionId",
            "id",
            "text"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "sessions.queuedMessages.list",
        "title": "List Queued Mid-Turn Messages",
        "description": "List the messages queued behind the current turn (submitted while the model was thinking), in delivery order. Queued messages remain editable and deletable until they are delivered; a delivered message no longer appears here. Only the daemon's live local runtime session is resolvable; any other session id is a 404 SESSION_NOT_LOCAL.",
        "category": "sessions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:sessions"
        ],
        "http": {
          "method": "GET",
          "path": "/api/sessions/{sessionId}/queued-messages"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "messages": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "queuedAt": {
                    "type": "number"
                  },
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "queuedAt",
                  "text"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "sessionId",
            "messages"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "sessions.register",
        "title": "Register Shared Session",
        "description": "Idempotently register (or heartbeat) a session keyed on a caller-supplied id, carrying its kind, project, and participant identity. Re-calling with the same id advances the participant lastSeenAt (heartbeat). Registering against a CLOSED session does NOT silently reopen it, the heartbeat is recorded and the still-closed record is returned with reopened=false and conflict={status:closed}; pass reopen=true to reopen. A titled session is never renamed by the heartbeat. An unknown kind is rejected (400), not coerced. Prefer this over sessions.create for external runtimes that own their session id.",
        "category": "sessions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:sessions"
        ],
        "http": {
          "method": "POST",
          "path": "/api/sessions/register"
        },
        "events": [
          "control.session_update"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "kind": {
              "type": "string",
              "enum": [
                "tui",
                "agent",
                "webui",
                "companion-task",
                "companion-chat",
                "automation",
                "channel",
                "acp",
                "hosted"
              ]
            },
            "project": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "participant": {
              "type": "object",
              "properties": {
                "surfaceKind": {
                  "type": "string"
                },
                "surfaceId": {
                  "type": "string"
                },
                "externalId": {
                  "type": "string"
                },
                "userId": {
                  "type": "string"
                },
                "displayName": {
                  "type": "string"
                },
                "routeId": {
                  "type": "string"
                },
                "lastSeenAt": {
                  "type": "number"
                }
              },
              "required": [
                "surfaceKind",
                "surfaceId",
                "lastSeenAt"
              ],
              "additionalProperties": false
            },
            "reopen": {
              "type": "boolean"
            }
          },
          "required": [
            "sessionId",
            "participant"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "session": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "project": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "active",
                    "closed"
                  ]
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "lastMessageAt": {
                  "type": "number"
                },
                "closedAt": {
                  "type": "number"
                },
                "lastActivityAt": {
                  "type": "number"
                },
                "messageCount": {
                  "type": "number"
                },
                "retainedMessageCount": {
                  "type": "number"
                },
                "pendingInputCount": {
                  "type": "number"
                },
                "routeIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "surfaceKinds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "participants": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "surfaceKind": {
                        "type": "string"
                      },
                      "surfaceId": {
                        "type": "string"
                      },
                      "externalId": {
                        "type": "string"
                      },
                      "userId": {
                        "type": "string"
                      },
                      "displayName": {
                        "type": "string"
                      },
                      "routeId": {
                        "type": "string"
                      },
                      "lastSeenAt": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "surfaceKind",
                      "surfaceId",
                      "lastSeenAt"
                    ],
                    "additionalProperties": false
                  }
                },
                "activeAgentId": {
                  "type": "string"
                },
                "lastAgentId": {
                  "type": "string"
                },
                "lastError": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "kind",
                "title",
                "status",
                "createdAt",
                "updatedAt",
                "lastActivityAt",
                "messageCount",
                "pendingInputCount",
                "routeIds",
                "surfaceKinds",
                "participants",
                "metadata"
              ],
              "additionalProperties": false
            },
            "reopened": {
              "type": "boolean"
            },
            "conflict": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "enum": [
                    "closed"
                  ]
                }
              },
              "required": [
                "status"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "session",
            "reopened"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "sessions.reopen",
        "title": "Reopen Shared Session",
        "description": "Reopen a previously closed shared session.",
        "category": "sessions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:sessions"
        ],
        "http": {
          "method": "POST",
          "path": "/api/sessions/{sessionId}/reopen"
        },
        "events": [
          "control.session_update"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "session": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "project": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "active",
                    "closed"
                  ]
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "lastMessageAt": {
                  "type": "number"
                },
                "closedAt": {
                  "type": "number"
                },
                "lastActivityAt": {
                  "type": "number"
                },
                "messageCount": {
                  "type": "number"
                },
                "retainedMessageCount": {
                  "type": "number"
                },
                "pendingInputCount": {
                  "type": "number"
                },
                "routeIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "surfaceKinds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "participants": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "surfaceKind": {
                        "type": "string"
                      },
                      "surfaceId": {
                        "type": "string"
                      },
                      "externalId": {
                        "type": "string"
                      },
                      "userId": {
                        "type": "string"
                      },
                      "displayName": {
                        "type": "string"
                      },
                      "routeId": {
                        "type": "string"
                      },
                      "lastSeenAt": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "surfaceKind",
                      "surfaceId",
                      "lastSeenAt"
                    ],
                    "additionalProperties": false
                  }
                },
                "activeAgentId": {
                  "type": "string"
                },
                "lastAgentId": {
                  "type": "string"
                },
                "lastError": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "kind",
                "title",
                "status",
                "createdAt",
                "updatedAt",
                "lastActivityAt",
                "messageCount",
                "pendingInputCount",
                "routeIds",
                "surfaceKinds",
                "participants",
                "metadata"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "session"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "sessions.search",
        "title": "Search Shared Sessions",
        "description": "Paginated, filtered query over shared sessions: free-text query (matches id/title), project, kind, surfaceKind, and status. Closed sessions are EXCLUDED by default, pass includeClosed:true to include them, and a returned closed session always carries an honest status:\"closed\" (never hidden, never relabeled). Cursor pagination returns disjoint pages that union to the full matching set.",
        "category": "sessions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "read:sessions"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "query": {
              "type": "string"
            },
            "project": {
              "type": "string"
            },
            "kind": {
              "type": "string"
            },
            "surfaceKind": {
              "type": "string"
            },
            "status": {
              "type": "string",
              "enum": [
                "active",
                "closed"
              ]
            },
            "includeClosed": {
              "type": "boolean"
            },
            "limit": {
              "type": "number"
            },
            "cursor": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessions": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string"
                  },
                  "project": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "active",
                      "closed"
                    ]
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "updatedAt": {
                    "type": "number"
                  },
                  "lastMessageAt": {
                    "type": "number"
                  },
                  "closedAt": {
                    "type": "number"
                  },
                  "lastActivityAt": {
                    "type": "number"
                  },
                  "messageCount": {
                    "type": "number"
                  },
                  "retainedMessageCount": {
                    "type": "number"
                  },
                  "pendingInputCount": {
                    "type": "number"
                  },
                  "routeIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "surfaceKinds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "participants": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "surfaceKind": {
                          "type": "string"
                        },
                        "surfaceId": {
                          "type": "string"
                        },
                        "externalId": {
                          "type": "string"
                        },
                        "userId": {
                          "type": "string"
                        },
                        "displayName": {
                          "type": "string"
                        },
                        "routeId": {
                          "type": "string"
                        },
                        "lastSeenAt": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "surfaceKind",
                        "surfaceId",
                        "lastSeenAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "activeAgentId": {
                    "type": "string"
                  },
                  "lastAgentId": {
                    "type": "string"
                  },
                  "lastError": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "kind",
                  "title",
                  "status",
                  "createdAt",
                  "updatedAt",
                  "lastActivityAt",
                  "messageCount",
                  "pendingInputCount",
                  "routeIds",
                  "surfaceKinds",
                  "participants",
                  "metadata"
                ],
                "additionalProperties": false
              }
            },
            "nextCursor": {
              "type": "string"
            },
            "hasMore": {
              "type": "boolean"
            }
          },
          "required": [
            "sessions",
            "hasMore"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "sessions.steer",
        "title": "Steer Shared Session",
        "description": "Deliver a live steering message to the active agent for a shared session, optionally falling back to spawn when explicitly allowed.",
        "category": "sessions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:sessions"
        ],
        "http": {
          "method": "POST",
          "path": "/api/sessions/{sessionId}/steer"
        },
        "events": [
          "control.session_update"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "body": {
              "type": "string"
            },
            "surfaceKind": {
              "type": "string"
            },
            "surfaceId": {
              "type": "string"
            },
            "routing": {
              "type": "object",
              "properties": {
                "providerId": {
                  "type": "string"
                },
                "modelId": {
                  "type": "string"
                },
                "providerSelection": {
                  "type": "string",
                  "enum": [
                    "inherit-current",
                    "concrete",
                    "synthetic"
                  ]
                },
                "providerFailurePolicy": {
                  "type": "string",
                  "enum": [
                    "ordered-fallbacks",
                    "fail"
                  ]
                },
                "fallbackModels": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "helperModel": {
                  "type": "object",
                  "properties": {
                    "providerId": {
                      "type": "string"
                    },
                    "modelId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "providerId",
                    "modelId"
                  ],
                  "additionalProperties": false
                },
                "executionIntent": {
                  "type": "object",
                  "properties": {
                    "riskClass": {
                      "type": "string",
                      "enum": [
                        "safe",
                        "elevated",
                        "dangerous"
                      ]
                    },
                    "requiresApproval": {
                      "type": "boolean"
                    },
                    "networkPolicy": {
                      "type": "string",
                      "enum": [
                        "inherit",
                        "allow",
                        "deny",
                        "scoped"
                      ]
                    },
                    "filesystemPolicy": {
                      "type": "string",
                      "enum": [
                        "inherit",
                        "workspace-write",
                        "read-only",
                        "isolated"
                      ]
                    }
                  },
                  "additionalProperties": false
                },
                "tools": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "reasoningEffort": {
                  "type": "string",
                  "enum": [
                    "none",
                    "instant",
                    "minimal",
                    "low",
                    "medium",
                    "high",
                    "xhigh",
                    "max"
                  ]
                }
              },
              "additionalProperties": false
            },
            "allowSpawnFallback": {
              "type": "boolean"
            }
          },
          "required": [
            "body"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "session": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string"
                    },
                    "project": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "closed"
                      ]
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "updatedAt": {
                      "type": "number"
                    },
                    "lastMessageAt": {
                      "type": "number"
                    },
                    "closedAt": {
                      "type": "number"
                    },
                    "lastActivityAt": {
                      "type": "number"
                    },
                    "messageCount": {
                      "type": "number"
                    },
                    "retainedMessageCount": {
                      "type": "number"
                    },
                    "pendingInputCount": {
                      "type": "number"
                    },
                    "routeIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "surfaceKinds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "participants": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "surfaceKind": {
                            "type": "string"
                          },
                          "surfaceId": {
                            "type": "string"
                          },
                          "externalId": {
                            "type": "string"
                          },
                          "userId": {
                            "type": "string"
                          },
                          "displayName": {
                            "type": "string"
                          },
                          "routeId": {
                            "type": "string"
                          },
                          "lastSeenAt": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "surfaceKind",
                          "surfaceId",
                          "lastSeenAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "activeAgentId": {
                      "type": "string"
                    },
                    "lastAgentId": {
                      "type": "string"
                    },
                    "lastError": {
                      "type": "string"
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "title",
                    "status",
                    "createdAt",
                    "updatedAt",
                    "lastActivityAt",
                    "messageCount",
                    "pendingInputCount",
                    "routeIds",
                    "surfaceKinds",
                    "participants",
                    "metadata"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "message": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "user",
                    "assistant",
                    "system"
                  ]
                },
                "body": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "surfaceKind": {
                  "type": "string"
                },
                "surfaceId": {
                  "type": "string"
                },
                "routeId": {
                  "type": "string"
                },
                "agentId": {
                  "type": "string"
                },
                "userId": {
                  "type": "string"
                },
                "displayName": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "sessionId",
                "role",
                "body",
                "createdAt",
                "metadata"
              ],
              "additionalProperties": false
            },
            "input": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                },
                "intent": {
                  "type": "string",
                  "enum": [
                    "submit",
                    "steer",
                    "follow-up"
                  ]
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "delivered",
                    "spawned",
                    "completed",
                    "cancelled",
                    "failed",
                    "rejected"
                  ]
                },
                "correlationId": {
                  "type": "string"
                },
                "causationId": {
                  "type": "string"
                },
                "body": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "routeId": {
                  "type": "string"
                },
                "surfaceKind": {
                  "type": "string"
                },
                "surfaceId": {
                  "type": "string"
                },
                "externalId": {
                  "type": "string"
                },
                "threadId": {
                  "type": "string"
                },
                "userId": {
                  "type": "string"
                },
                "displayName": {
                  "type": "string"
                },
                "activeAgentId": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "routing": {
                  "type": "object",
                  "properties": {
                    "providerId": {
                      "type": "string"
                    },
                    "modelId": {
                      "type": "string"
                    },
                    "providerSelection": {
                      "type": "string",
                      "enum": [
                        "inherit-current",
                        "concrete",
                        "synthetic"
                      ]
                    },
                    "providerFailurePolicy": {
                      "type": "string",
                      "enum": [
                        "ordered-fallbacks",
                        "fail"
                      ]
                    },
                    "fallbackModels": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "helperModel": {
                      "type": "object",
                      "properties": {
                        "providerId": {
                          "type": "string"
                        },
                        "modelId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "providerId",
                        "modelId"
                      ],
                      "additionalProperties": false
                    },
                    "executionIntent": {
                      "type": "object",
                      "properties": {
                        "riskClass": {
                          "type": "string",
                          "enum": [
                            "safe",
                            "elevated",
                            "dangerous"
                          ]
                        },
                        "requiresApproval": {
                          "type": "boolean"
                        },
                        "networkPolicy": {
                          "type": "string",
                          "enum": [
                            "inherit",
                            "allow",
                            "deny",
                            "scoped"
                          ]
                        },
                        "filesystemPolicy": {
                          "type": "string",
                          "enum": [
                            "inherit",
                            "workspace-write",
                            "read-only",
                            "isolated"
                          ]
                        }
                      },
                      "additionalProperties": false
                    },
                    "tools": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "reasoningEffort": {
                      "type": "string",
                      "enum": [
                        "none",
                        "instant",
                        "minimal",
                        "low",
                        "medium",
                        "high",
                        "xhigh",
                        "max"
                      ]
                    }
                  },
                  "additionalProperties": false
                },
                "error": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "sessionId",
                "intent",
                "state",
                "correlationId",
                "body",
                "createdAt",
                "updatedAt",
                "metadata"
              ],
              "additionalProperties": false
            },
            "mode": {
              "type": "string",
              "enum": [
                "spawn",
                "continued-live",
                "queued-follow-up",
                "queued-for-surface",
                "rejected"
              ]
            },
            "agentId": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "session",
            "message",
            "input",
            "mode",
            "agentId"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "sessions.toolCalls.cancel",
        "title": "Cancel One In-Flight Tool Call",
        "description": "Cancel a single running tool call by its callId, leaving the turn and any other running calls untouched. The cancelled call settles as a structured \"cancelled by user\" tool result the model adapts to in the same turn, distinct from a whole-turn interrupt. Only the daemon's live local runtime session is controllable; any other session id is a 404 SESSION_NOT_LOCAL, and an unknown or already-settled callId is a 404 TOOL_CALL_NOT_RUNNING.",
        "category": "sessions",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:sessions"
        ],
        "http": {
          "method": "POST",
          "path": "/api/sessions/{sessionId}/tool-calls/{callId}/cancel"
        },
        "events": [
          "runtime.tools"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "callId": {
              "type": "string"
            }
          },
          "required": [
            "sessionId",
            "callId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "callId": {
              "type": "string"
            },
            "cancelled": {
              "type": "boolean"
            }
          },
          "required": [
            "sessionId",
            "callId",
            "cancelled"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "security.settings",
        "title": "Security Settings Report",
        "description": "Return security-relevant settings, defaults, current state, and enablement tradeoffs.",
        "category": "settings",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:settings"
        ],
        "http": {
          "method": "GET",
          "path": "/api/security-settings"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "settings": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "setting",
                      "configuration"
                    ]
                  },
                  "featureId": {
                    "type": "string"
                  },
                  "defaultState": {
                    "type": "string"
                  },
                  "currentState": {
                    "type": "string"
                  },
                  "securityRelevant": {
                    "type": "boolean"
                  },
                  "summary": {
                    "type": "string"
                  },
                  "insecureWhen": {
                    "type": "string"
                  },
                  "enablementEffect": {
                    "type": "string"
                  },
                  "enablementRequirements": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "operationalNotes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "key",
                  "type",
                  "featureId",
                  "defaultState",
                  "currentState",
                  "securityRelevant",
                  "summary",
                  "insecureWhen",
                  "enablementEffect",
                  "enablementRequirements",
                  "operationalNotes"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "settings"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "settings.snapshot",
        "title": "Settings Snapshot",
        "description": "Return the settings integration snapshot.",
        "category": "settings",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:settings"
        ],
        "http": {
          "method": "GET",
          "path": "/api/settings"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "available": {
                  "type": "boolean"
                },
                "reason": {
                  "type": "string"
                }
              },
              "required": [
                "available",
                "reason"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "available": {
                  "type": "boolean"
                },
                "liveKeyCount": {
                  "type": "number"
                },
                "profileCount": {
                  "type": "number"
                },
                "managedLockCount": {
                  "type": "number"
                },
                "resolvedCounts": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "number"
                  }
                },
                "conflicts": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "key": {
                        "type": "string"
                      },
                      "localValue": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      },
                      "incomingValue": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "synced"
                        ]
                      },
                      "path": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "key",
                      "localValue",
                      "incomingValue",
                      "source",
                      "path",
                      "updatedAt"
                    ],
                    "additionalProperties": false
                  }
                },
                "recentFailures": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "surface": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      },
                      "timestamp": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "surface",
                      "message",
                      "timestamp"
                    ],
                    "additionalProperties": false
                  }
                },
                "stagedManagedBundle": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "profileName": {
                      "type": "string"
                    },
                    "path": {
                      "type": "string"
                    },
                    "importedAt": {
                      "type": "number"
                    },
                    "changeCount": {
                      "type": "number"
                    },
                    "risk": {
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "changes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string"
                          },
                          "previousValue": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          },
                          "nextValue": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          },
                          "changed": {
                            "type": "boolean"
                          },
                          "locked": {
                            "type": "boolean"
                          },
                          "source": {
                            "type": "string"
                          },
                          "reason": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "key",
                          "previousValue",
                          "nextValue",
                          "changed",
                          "locked",
                          "source",
                          "reason"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "profileName",
                    "path",
                    "importedAt",
                    "changeCount",
                    "risk",
                    "changes"
                  ],
                  "additionalProperties": false
                },
                "rollbackHistory": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "token": {
                        "type": "string"
                      },
                      "profileName": {
                        "type": "string"
                      },
                      "path": {
                        "type": "string"
                      },
                      "appliedAt": {
                        "type": "number"
                      },
                      "restoredKeys": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "previousValues": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "token",
                      "profileName",
                      "path",
                      "appliedAt",
                      "restoredKeys",
                      "previousValues"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "available",
                "liveKeyCount",
                "profileCount",
                "managedLockCount",
                "resolvedCounts",
                "conflicts",
                "recentFailures",
                "rollbackHistory"
              ],
              "additionalProperties": false
            }
          ]
        },
        "invokable": true
      },
      {
        "id": "skills.create",
        "title": "Create Skill",
        "description": "Create a new skill from a name, one-line description, and Markdown body (plus optional frontmatter metadata). Fails with a conflict when a skill of that name already exists, use skills.update to change an existing one.",
        "category": "skills",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:skills"
        ],
        "http": {
          "method": "POST",
          "path": "/api/skills"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "body": {
              "type": "string"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "name",
            "description",
            "body"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "skill": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "updatedAt": {
                  "type": "number"
                },
                "body": {
                  "type": "string"
                }
              },
              "required": [
                "name",
                "description",
                "metadata",
                "body"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "skill"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "skills.delete",
        "title": "Delete Skill",
        "description": "Permanently delete a skill. Delete means delete: the document is removed, not tombstoned. Returns { deleted: false } when no skill with that name existed, an honest boolean, never a 200 that pretends a phantom skill was removed.",
        "category": "skills",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:skills"
        ],
        "http": {
          "method": "DELETE",
          "path": "/api/skills/{name}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            }
          },
          "required": [
            "name"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "deleted": {
              "type": "boolean"
            }
          },
          "required": [
            "name",
            "deleted"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "skills.get",
        "title": "Get Skill",
        "description": "Return one skill in full, including its Markdown body. Returns 404 when no skill with that name exists.",
        "category": "skills",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:skills"
        ],
        "http": {
          "method": "GET",
          "path": "/api/skills/{name}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            }
          },
          "required": [
            "name"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "skill": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "updatedAt": {
                  "type": "number"
                },
                "body": {
                  "type": "string"
                }
              },
              "required": [
                "name",
                "description",
                "metadata",
                "body"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "skill"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "skills.list",
        "title": "List Skills",
        "description": "Return the index line (name, description, metadata) of every skill in the canonical store. Progressive disclosure: bodies are never returned here, call skills.get for the one skill you decide to open.",
        "category": "skills",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:skills"
        ],
        "http": {
          "method": "GET",
          "path": "/api/skills"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "skills": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "name",
                  "description",
                  "metadata"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "skills"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "skills.update",
        "title": "Update Skill",
        "description": "Update an existing skill's description, body, and/or frontmatter metadata. Absent fields are left unchanged. Returns 404 when no skill with that name exists.",
        "category": "skills",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:skills"
        ],
        "http": {
          "method": "POST",
          "path": "/api/skills/{name}/update"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "body": {
              "type": "string"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "name"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "skill": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "updatedAt": {
                  "type": "number"
                },
                "body": {
                  "type": "string"
                }
              },
              "required": [
                "name",
                "description",
                "metadata",
                "body"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "skill"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "tasks.cancel",
        "title": "Cancel Runtime Task",
        "description": "Cancel an in-flight runtime task.",
        "category": "tasks",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:tasks"
        ],
        "http": {
          "method": "POST",
          "path": "/api/tasks/{taskId}/cancel"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "taskId": {
              "type": "string"
            }
          },
          "required": [
            "taskId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "retried": {
              "type": "boolean"
            },
            "task": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "exec",
                    "agent",
                    "acp",
                    "scheduler",
                    "daemon",
                    "mcp",
                    "plugin",
                    "integration"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "running",
                    "blocked",
                    "completed",
                    "failed",
                    "cancelled"
                  ]
                },
                "owner": {
                  "type": "string"
                },
                "cancellable": {
                  "type": "boolean"
                },
                "parentTaskId": {
                  "type": "string"
                },
                "childTaskIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "queuedAt": {
                  "type": "number"
                },
                "startedAt": {
                  "type": "number"
                },
                "endedAt": {
                  "type": "number"
                },
                "retryPolicy": {
                  "type": "object",
                  "properties": {
                    "maxAttempts": {
                      "type": "number"
                    },
                    "currentAttempt": {
                      "type": "number"
                    },
                    "delayMs": {
                      "type": "number"
                    },
                    "backoff": {
                      "type": "string",
                      "enum": [
                        "fixed",
                        "exponential"
                      ]
                    },
                    "retryOn": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "network",
                          "timeout",
                          "transient",
                          "tool_error"
                        ]
                      }
                    }
                  },
                  "required": [
                    "maxAttempts",
                    "currentAttempt",
                    "delayMs",
                    "backoff",
                    "retryOn"
                  ],
                  "additionalProperties": false
                },
                "retryDelayMs": {
                  "type": "number"
                },
                "retryAt": {
                  "type": "number"
                },
                "exitCode": {
                  "type": "number"
                },
                "error": {
                  "type": "string"
                },
                "result": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    },
                    {
                      "type": "object",
                      "additionalProperties": {}
                    },
                    {
                      "type": "array",
                      "items": {}
                    }
                  ]
                },
                "correlationId": {
                  "type": "string"
                },
                "turnId": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "kind",
                "title",
                "status",
                "owner",
                "cancellable",
                "childTaskIds",
                "queuedAt"
              ],
              "additionalProperties": false
            },
            "agentId": {
              "type": "string"
            }
          },
          "required": [
            "task"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "tasks.create",
        "title": "Create Task",
        "description": "Submit a task to the daemon or a shared session.",
        "category": "tasks",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:tasks"
        ],
        "http": {
          "method": "POST",
          "path": "/task"
        },
        "events": [
          "runtime.tasks"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "task": {
              "type": "string"
            },
            "model": {
              "type": "string"
            },
            "tools": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "provider": {
              "type": "string"
            },
            "routing": {
              "type": "object",
              "properties": {
                "providerId": {
                  "type": "string"
                },
                "modelId": {
                  "type": "string"
                },
                "providerSelection": {
                  "type": "string",
                  "enum": [
                    "inherit-current",
                    "concrete",
                    "synthetic"
                  ]
                },
                "providerFailurePolicy": {
                  "type": "string",
                  "enum": [
                    "ordered-fallbacks",
                    "fail"
                  ]
                },
                "fallbackModels": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "helperModel": {
                  "type": "object",
                  "properties": {
                    "providerId": {
                      "type": "string"
                    },
                    "modelId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "providerId",
                    "modelId"
                  ],
                  "additionalProperties": false
                },
                "executionIntent": {
                  "type": "object",
                  "properties": {
                    "riskClass": {
                      "type": "string",
                      "enum": [
                        "safe",
                        "elevated",
                        "dangerous"
                      ]
                    },
                    "requiresApproval": {
                      "type": "boolean"
                    },
                    "networkPolicy": {
                      "type": "string",
                      "enum": [
                        "inherit",
                        "allow",
                        "deny",
                        "scoped"
                      ]
                    },
                    "filesystemPolicy": {
                      "type": "string",
                      "enum": [
                        "inherit",
                        "workspace-write",
                        "read-only",
                        "isolated"
                      ]
                    }
                  },
                  "additionalProperties": false
                },
                "tools": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "reasoningEffort": {
                  "type": "string",
                  "enum": [
                    "none",
                    "instant",
                    "minimal",
                    "low",
                    "medium",
                    "high",
                    "xhigh",
                    "max"
                  ]
                }
              },
              "additionalProperties": false
            },
            "sessionId": {
              "type": "string"
            },
            "routeId": {
              "type": "string"
            },
            "surfaceKind": {
              "type": "string"
            },
            "surfaceId": {
              "type": "string"
            },
            "externalId": {
              "type": "string"
            },
            "threadId": {
              "type": "string"
            },
            "userId": {
              "type": "string"
            },
            "displayName": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "task"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "acknowledged": {
              "type": "boolean"
            },
            "mode": {
              "type": "string"
            },
            "sessionId": {
              "type": "string"
            },
            "agentId": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "status": {
              "type": "string"
            },
            "task": {
              "type": "string"
            },
            "model": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "tools": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "acknowledged"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "tasks.get",
        "title": "Get Runtime Task",
        "description": "Return a single runtime task record.",
        "category": "tasks",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:tasks"
        ],
        "http": {
          "method": "GET",
          "path": "/api/tasks/{taskId}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "taskId": {
              "type": "string"
            }
          },
          "required": [
            "taskId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "task": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "exec",
                    "agent",
                    "acp",
                    "scheduler",
                    "daemon",
                    "mcp",
                    "plugin",
                    "integration"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "running",
                    "blocked",
                    "completed",
                    "failed",
                    "cancelled"
                  ]
                },
                "owner": {
                  "type": "string"
                },
                "cancellable": {
                  "type": "boolean"
                },
                "parentTaskId": {
                  "type": "string"
                },
                "childTaskIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "queuedAt": {
                  "type": "number"
                },
                "startedAt": {
                  "type": "number"
                },
                "endedAt": {
                  "type": "number"
                },
                "retryPolicy": {
                  "type": "object",
                  "properties": {
                    "maxAttempts": {
                      "type": "number"
                    },
                    "currentAttempt": {
                      "type": "number"
                    },
                    "delayMs": {
                      "type": "number"
                    },
                    "backoff": {
                      "type": "string",
                      "enum": [
                        "fixed",
                        "exponential"
                      ]
                    },
                    "retryOn": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "network",
                          "timeout",
                          "transient",
                          "tool_error"
                        ]
                      }
                    }
                  },
                  "required": [
                    "maxAttempts",
                    "currentAttempt",
                    "delayMs",
                    "backoff",
                    "retryOn"
                  ],
                  "additionalProperties": false
                },
                "retryDelayMs": {
                  "type": "number"
                },
                "retryAt": {
                  "type": "number"
                },
                "exitCode": {
                  "type": "number"
                },
                "error": {
                  "type": "string"
                },
                "result": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    },
                    {
                      "type": "object",
                      "additionalProperties": {}
                    },
                    {
                      "type": "array",
                      "items": {}
                    }
                  ]
                },
                "correlationId": {
                  "type": "string"
                },
                "turnId": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "kind",
                "title",
                "status",
                "owner",
                "cancellable",
                "childTaskIds",
                "queuedAt"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "task"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "tasks.list",
        "title": "List Runtime Tasks",
        "description": "Return the integration snapshot for runtime tasks.",
        "category": "tasks",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:tasks"
        ],
        "http": {
          "method": "GET",
          "path": "/api/tasks"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "queued": {
              "type": "number"
            },
            "running": {
              "type": "number"
            },
            "blocked": {
              "type": "number"
            },
            "totals": {
              "type": "object",
              "properties": {
                "created": {
                  "type": "number"
                },
                "completed": {
                  "type": "number"
                },
                "failed": {
                  "type": "number"
                },
                "cancelled": {
                  "type": "number"
                }
              },
              "required": [
                "created",
                "completed",
                "failed",
                "cancelled"
              ],
              "additionalProperties": false
            },
            "tasks": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "exec",
                      "agent",
                      "acp",
                      "scheduler",
                      "daemon",
                      "mcp",
                      "plugin",
                      "integration"
                    ]
                  },
                  "title": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "queued",
                      "running",
                      "blocked",
                      "completed",
                      "failed",
                      "cancelled"
                    ]
                  },
                  "owner": {
                    "type": "string"
                  },
                  "parentTaskId": {
                    "type": "string"
                  },
                  "queuedAt": {
                    "type": "number"
                  },
                  "startedAt": {
                    "type": "number"
                  },
                  "endedAt": {
                    "type": "number"
                  },
                  "error": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "kind",
                  "title",
                  "status",
                  "owner",
                  "queuedAt"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "queued",
            "running",
            "blocked",
            "totals",
            "tasks"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "tasks.retry",
        "title": "Retry Runtime Task",
        "description": "Retry a runtime task through the task action endpoint.",
        "category": "tasks",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:tasks"
        ],
        "http": {
          "method": "POST",
          "path": "/api/tasks/{taskId}/retry"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "taskId": {
              "type": "string"
            }
          },
          "required": [
            "taskId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "retried": {
              "type": "boolean"
            },
            "task": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "exec",
                    "agent",
                    "acp",
                    "scheduler",
                    "daemon",
                    "mcp",
                    "plugin",
                    "integration"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "running",
                    "blocked",
                    "completed",
                    "failed",
                    "cancelled"
                  ]
                },
                "owner": {
                  "type": "string"
                },
                "cancellable": {
                  "type": "boolean"
                },
                "parentTaskId": {
                  "type": "string"
                },
                "childTaskIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "queuedAt": {
                  "type": "number"
                },
                "startedAt": {
                  "type": "number"
                },
                "endedAt": {
                  "type": "number"
                },
                "retryPolicy": {
                  "type": "object",
                  "properties": {
                    "maxAttempts": {
                      "type": "number"
                    },
                    "currentAttempt": {
                      "type": "number"
                    },
                    "delayMs": {
                      "type": "number"
                    },
                    "backoff": {
                      "type": "string",
                      "enum": [
                        "fixed",
                        "exponential"
                      ]
                    },
                    "retryOn": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "network",
                          "timeout",
                          "transient",
                          "tool_error"
                        ]
                      }
                    }
                  },
                  "required": [
                    "maxAttempts",
                    "currentAttempt",
                    "delayMs",
                    "backoff",
                    "retryOn"
                  ],
                  "additionalProperties": false
                },
                "retryDelayMs": {
                  "type": "number"
                },
                "retryAt": {
                  "type": "number"
                },
                "exitCode": {
                  "type": "number"
                },
                "error": {
                  "type": "string"
                },
                "result": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    },
                    {
                      "type": "object",
                      "additionalProperties": {}
                    },
                    {
                      "type": "array",
                      "items": {}
                    }
                  ]
                },
                "correlationId": {
                  "type": "string"
                },
                "turnId": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "kind",
                "title",
                "status",
                "owner",
                "cancellable",
                "childTaskIds",
                "queuedAt"
              ],
              "additionalProperties": false
            },
            "agentId": {
              "type": "string"
            }
          },
          "required": [
            "task"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "tasks.status",
        "title": "Get Task Status",
        "description": "Return lightweight runtime task status by agent id.",
        "category": "tasks",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:tasks"
        ],
        "http": {
          "method": "GET",
          "path": "/task/{agentId}"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "agentId": {
              "type": "string"
            }
          },
          "required": [
            "agentId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "agentId": {
              "type": "string"
            },
            "task": {
              "type": "string"
            },
            "status": {
              "type": "string"
            },
            "model": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "tools": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "durationMs": {
              "type": "number"
            },
            "toolCallCount": {
              "type": "number"
            },
            "progress": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "error": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "agentId",
            "task",
            "status",
            "model",
            "tools",
            "durationMs",
            "toolCallCount",
            "progress",
            "error"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "telemetry.errors.list",
        "title": "List Telemetry Errors",
        "description": "Return telemetry records that include normalized error metadata.",
        "category": "telemetry",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:telemetry"
        ],
        "http": {
          "method": "GET",
          "path": "/api/v1/telemetry/errors"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "number"
            },
            "since": {
              "type": "number"
            },
            "until": {
              "type": "number"
            },
            "domains": {
              "type": "string"
            },
            "types": {
              "type": "string"
            },
            "severity": {
              "type": "string",
              "enum": [
                "debug",
                "info",
                "warn",
                "error"
              ]
            },
            "traceId": {
              "type": "string"
            },
            "sessionId": {
              "type": "string"
            },
            "turnId": {
              "type": "string"
            },
            "agentId": {
              "type": "string"
            },
            "taskId": {
              "type": "string"
            },
            "cursor": {
              "type": "string"
            },
            "view": {
              "type": "string",
              "enum": [
                "safe",
                "raw"
              ]
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "version": {
              "type": "number"
            },
            "view": {
              "type": "string",
              "enum": [
                "safe",
                "raw"
              ]
            },
            "rawAccessible": {
              "type": "boolean"
            },
            "items": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "domain": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string"
                  },
                  "timestamp": {
                    "type": "number"
                  },
                  "severity": {
                    "type": "string",
                    "enum": [
                      "debug",
                      "info",
                      "warn",
                      "error"
                    ]
                  },
                  "traceId": {
                    "type": "string"
                  },
                  "sessionId": {
                    "type": "string"
                  },
                  "turnId": {
                    "type": "string"
                  },
                  "agentId": {
                    "type": "string"
                  },
                  "taskId": {
                    "type": "string"
                  },
                  "source": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "payload": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  },
                  "attributes": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "error": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      },
                      "summary": {
                        "type": "string"
                      },
                      "hint": {
                        "type": "string"
                      },
                      "code": {
                        "type": "string"
                      },
                      "category": {
                        "type": "string",
                        "enum": [
                          "authentication",
                          "authorization",
                          "billing",
                          "rate_limit",
                          "timeout",
                          "network",
                          "bad_request",
                          "not_found",
                          "permission",
                          "tool",
                          "config",
                          "protocol",
                          "service",
                          "internal",
                          "unknown"
                        ]
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "provider",
                          "tool",
                          "transport",
                          "config",
                          "permission",
                          "runtime",
                          "render",
                          "acp",
                          "unknown"
                        ]
                      },
                      "recoverable": {
                        "type": "boolean"
                      },
                      "statusCode": {
                        "type": "number"
                      },
                      "provider": {
                        "type": "string"
                      },
                      "operation": {
                        "type": "string"
                      },
                      "phase": {
                        "type": "string"
                      },
                      "requestId": {
                        "type": "string"
                      },
                      "providerCode": {
                        "type": "string"
                      },
                      "providerType": {
                        "type": "string"
                      },
                      "retryAfterMs": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "name",
                      "message",
                      "summary",
                      "category",
                      "source",
                      "recoverable"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "id",
                  "domain",
                  "type",
                  "timestamp",
                  "severity",
                  "traceId",
                  "sessionId",
                  "source",
                  "message",
                  "payload",
                  "attributes"
                ],
                "additionalProperties": false
              }
            },
            "pageInfo": {
              "type": "object",
              "properties": {
                "limit": {
                  "type": "number"
                },
                "returned": {
                  "type": "number"
                },
                "hasMore": {
                  "type": "boolean"
                },
                "cursor": {
                  "type": "string"
                },
                "nextCursor": {
                  "type": "string"
                }
              },
              "required": [
                "limit",
                "returned",
                "hasMore"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "version",
            "view",
            "rawAccessible",
            "items",
            "pageInfo"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "telemetry.events.list",
        "title": "List Telemetry Events",
        "description": "Return a paginated telemetry event feed with cursor-based resume semantics.",
        "category": "telemetry",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:telemetry"
        ],
        "http": {
          "method": "GET",
          "path": "/api/v1/telemetry/events"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "number"
            },
            "since": {
              "type": "number"
            },
            "until": {
              "type": "number"
            },
            "domains": {
              "type": "string"
            },
            "types": {
              "type": "string"
            },
            "severity": {
              "type": "string",
              "enum": [
                "debug",
                "info",
                "warn",
                "error"
              ]
            },
            "traceId": {
              "type": "string"
            },
            "sessionId": {
              "type": "string"
            },
            "turnId": {
              "type": "string"
            },
            "agentId": {
              "type": "string"
            },
            "taskId": {
              "type": "string"
            },
            "cursor": {
              "type": "string"
            },
            "view": {
              "type": "string",
              "enum": [
                "safe",
                "raw"
              ]
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "version": {
              "type": "number"
            },
            "view": {
              "type": "string",
              "enum": [
                "safe",
                "raw"
              ]
            },
            "rawAccessible": {
              "type": "boolean"
            },
            "items": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "domain": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string"
                  },
                  "timestamp": {
                    "type": "number"
                  },
                  "severity": {
                    "type": "string",
                    "enum": [
                      "debug",
                      "info",
                      "warn",
                      "error"
                    ]
                  },
                  "traceId": {
                    "type": "string"
                  },
                  "sessionId": {
                    "type": "string"
                  },
                  "turnId": {
                    "type": "string"
                  },
                  "agentId": {
                    "type": "string"
                  },
                  "taskId": {
                    "type": "string"
                  },
                  "source": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "payload": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  },
                  "attributes": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "error": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      },
                      "summary": {
                        "type": "string"
                      },
                      "hint": {
                        "type": "string"
                      },
                      "code": {
                        "type": "string"
                      },
                      "category": {
                        "type": "string",
                        "enum": [
                          "authentication",
                          "authorization",
                          "billing",
                          "rate_limit",
                          "timeout",
                          "network",
                          "bad_request",
                          "not_found",
                          "permission",
                          "tool",
                          "config",
                          "protocol",
                          "service",
                          "internal",
                          "unknown"
                        ]
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "provider",
                          "tool",
                          "transport",
                          "config",
                          "permission",
                          "runtime",
                          "render",
                          "acp",
                          "unknown"
                        ]
                      },
                      "recoverable": {
                        "type": "boolean"
                      },
                      "statusCode": {
                        "type": "number"
                      },
                      "provider": {
                        "type": "string"
                      },
                      "operation": {
                        "type": "string"
                      },
                      "phase": {
                        "type": "string"
                      },
                      "requestId": {
                        "type": "string"
                      },
                      "providerCode": {
                        "type": "string"
                      },
                      "providerType": {
                        "type": "string"
                      },
                      "retryAfterMs": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "name",
                      "message",
                      "summary",
                      "category",
                      "source",
                      "recoverable"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "id",
                  "domain",
                  "type",
                  "timestamp",
                  "severity",
                  "traceId",
                  "sessionId",
                  "source",
                  "message",
                  "payload",
                  "attributes"
                ],
                "additionalProperties": false
              }
            },
            "pageInfo": {
              "type": "object",
              "properties": {
                "limit": {
                  "type": "number"
                },
                "returned": {
                  "type": "number"
                },
                "hasMore": {
                  "type": "boolean"
                },
                "cursor": {
                  "type": "string"
                },
                "nextCursor": {
                  "type": "string"
                }
              },
              "required": [
                "limit",
                "returned",
                "hasMore"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "version",
            "view",
            "rawAccessible",
            "items",
            "pageInfo"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "telemetry.metrics.get",
        "title": "Telemetry Metrics",
        "description": "Return telemetry aggregates and runtime metrics without recent record payloads.",
        "category": "telemetry",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:telemetry"
        ],
        "http": {
          "method": "GET",
          "path": "/api/v1/telemetry/metrics"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "number"
            },
            "since": {
              "type": "number"
            },
            "until": {
              "type": "number"
            },
            "domains": {
              "type": "string"
            },
            "types": {
              "type": "string"
            },
            "severity": {
              "type": "string",
              "enum": [
                "debug",
                "info",
                "warn",
                "error"
              ]
            },
            "traceId": {
              "type": "string"
            },
            "sessionId": {
              "type": "string"
            },
            "turnId": {
              "type": "string"
            },
            "agentId": {
              "type": "string"
            },
            "taskId": {
              "type": "string"
            },
            "cursor": {
              "type": "string"
            },
            "view": {
              "type": "string",
              "enum": [
                "safe",
                "raw"
              ]
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "version": {
              "type": "number"
            },
            "view": {
              "type": "string",
              "enum": [
                "safe",
                "raw"
              ]
            },
            "rawAccessible": {
              "type": "boolean"
            },
            "generatedAt": {
              "type": "number"
            },
            "runtime": {
              "type": "object",
              "properties": {
                "sessionId": {
                  "type": "string"
                },
                "sessionStatus": {
                  "type": "string"
                },
                "traceContext": {
                  "type": "object",
                  "properties": {
                    "traceId": {
                      "type": "string"
                    },
                    "rootSpanId": {
                      "type": "string"
                    },
                    "exportActive": {
                      "type": "boolean"
                    },
                    "endpoint": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "traceId",
                    "rootSpanId",
                    "exportActive"
                  ],
                  "additionalProperties": false
                },
                "sessionCorrelationId": {
                  "type": "string"
                },
                "currentTurnCorrelationId": {
                  "type": "string"
                },
                "dbAvailable": {
                  "type": "boolean"
                },
                "dbPath": {
                  "type": "string"
                },
                "tasks": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "number"
                    },
                    "queued": {
                      "type": "number"
                    },
                    "running": {
                      "type": "number"
                    },
                    "blocked": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "total",
                    "queued",
                    "running",
                    "blocked"
                  ],
                  "additionalProperties": false
                },
                "agents": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "number"
                    },
                    "active": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "total",
                    "active"
                  ],
                  "additionalProperties": false
                },
                "approvals": {
                  "type": "object",
                  "properties": {
                    "pending": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "pending"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "sessionId",
                "sessionStatus",
                "sessionCorrelationId",
                "dbAvailable",
                "tasks",
                "agents",
                "approvals"
              ],
              "additionalProperties": false
            },
            "sessionMetrics": {
              "type": "object",
              "properties": {
                "turns": {
                  "type": "number"
                },
                "toolCalls": {
                  "type": "number"
                },
                "toolErrors": {
                  "type": "number"
                },
                "agentsSpawned": {
                  "type": "number"
                },
                "inputTokens": {
                  "type": "number"
                },
                "outputTokens": {
                  "type": "number"
                },
                "cacheReadTokens": {
                  "type": "number"
                },
                "permissionPrompts": {
                  "type": "number"
                },
                "permissionDenials": {
                  "type": "number"
                },
                "errors": {
                  "type": "number"
                },
                "warnings": {
                  "type": "number"
                }
              },
              "required": [
                "turns",
                "toolCalls",
                "toolErrors",
                "agentsSpawned",
                "inputTokens",
                "outputTokens",
                "cacheReadTokens",
                "permissionPrompts",
                "permissionDenials",
                "errors",
                "warnings"
              ],
              "additionalProperties": false
            },
            "aggregates": {
              "type": "object",
              "properties": {
                "totalEvents": {
                  "type": "number"
                },
                "totalErrors": {
                  "type": "number"
                },
                "totalWarnings": {
                  "type": "number"
                },
                "totalSpans": {
                  "type": "number"
                },
                "byDomain": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "number"
                  }
                },
                "byEventType": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "number"
                  }
                },
                "errorsByCategory": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "number"
                  }
                }
              },
              "required": [
                "totalEvents",
                "totalErrors",
                "totalWarnings",
                "totalSpans",
                "byDomain",
                "byEventType",
                "errorsByCategory"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "version",
            "view",
            "rawAccessible",
            "generatedAt",
            "runtime",
            "sessionMetrics",
            "aggregates"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "telemetry.otlp.logs",
        "title": "OTLP Log Export",
        "description": "Return telemetry events encoded as OTLP-compatible log documents.",
        "category": "telemetry",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:telemetry"
        ],
        "http": {
          "method": "GET",
          "path": "/api/v1/telemetry/otlp/v1/logs"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "number"
            },
            "since": {
              "type": "number"
            },
            "until": {
              "type": "number"
            },
            "domains": {
              "type": "string"
            },
            "types": {
              "type": "string"
            },
            "severity": {
              "type": "string",
              "enum": [
                "debug",
                "info",
                "warn",
                "error"
              ]
            },
            "traceId": {
              "type": "string"
            },
            "sessionId": {
              "type": "string"
            },
            "turnId": {
              "type": "string"
            },
            "agentId": {
              "type": "string"
            },
            "taskId": {
              "type": "string"
            },
            "cursor": {
              "type": "string"
            },
            "view": {
              "type": "string",
              "enum": [
                "safe",
                "raw"
              ]
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "resourceLogs": {
              "type": "array",
              "items": {
                "type": "object",
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    },
                    {},
                    {
                      "type": "array",
                      "items": {}
                    }
                  ]
                }
              }
            }
          },
          "required": [
            "resourceLogs"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "telemetry.otlp.metrics",
        "title": "OTLP Metric Export",
        "description": "Return telemetry metrics encoded as OTLP-compatible metric documents.",
        "category": "telemetry",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:telemetry"
        ],
        "http": {
          "method": "GET",
          "path": "/api/v1/telemetry/otlp/v1/metrics"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "number"
            },
            "since": {
              "type": "number"
            },
            "until": {
              "type": "number"
            },
            "domains": {
              "type": "string"
            },
            "types": {
              "type": "string"
            },
            "severity": {
              "type": "string",
              "enum": [
                "debug",
                "info",
                "warn",
                "error"
              ]
            },
            "traceId": {
              "type": "string"
            },
            "sessionId": {
              "type": "string"
            },
            "turnId": {
              "type": "string"
            },
            "agentId": {
              "type": "string"
            },
            "taskId": {
              "type": "string"
            },
            "cursor": {
              "type": "string"
            },
            "view": {
              "type": "string",
              "enum": [
                "safe",
                "raw"
              ]
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "resourceMetrics": {
              "type": "array",
              "items": {
                "type": "object",
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    },
                    {},
                    {
                      "type": "array",
                      "items": {}
                    }
                  ]
                }
              }
            }
          },
          "required": [
            "resourceMetrics"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "telemetry.otlp.traces",
        "title": "OTLP Trace Export",
        "description": "Return telemetry traces encoded as OTLP-compatible JSON.",
        "category": "telemetry",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:telemetry"
        ],
        "http": {
          "method": "GET",
          "path": "/api/v1/telemetry/otlp/v1/traces"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "number"
            },
            "since": {
              "type": "number"
            },
            "until": {
              "type": "number"
            },
            "domains": {
              "type": "string"
            },
            "types": {
              "type": "string"
            },
            "severity": {
              "type": "string",
              "enum": [
                "debug",
                "info",
                "warn",
                "error"
              ]
            },
            "traceId": {
              "type": "string"
            },
            "sessionId": {
              "type": "string"
            },
            "turnId": {
              "type": "string"
            },
            "agentId": {
              "type": "string"
            },
            "taskId": {
              "type": "string"
            },
            "cursor": {
              "type": "string"
            },
            "view": {
              "type": "string",
              "enum": [
                "safe",
                "raw"
              ]
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "resourceSpans": {
              "type": "array",
              "items": {
                "type": "object",
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    },
                    {},
                    {
                      "type": "array",
                      "items": {}
                    }
                  ]
                }
              }
            }
          },
          "required": [
            "resourceSpans"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "telemetry.snapshot",
        "title": "Telemetry Snapshot",
        "description": "Return the current telemetry snapshot with aggregates, runtime state, and recent records.",
        "category": "telemetry",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:telemetry"
        ],
        "http": {
          "method": "GET",
          "path": "/api/v1/telemetry"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "number"
            },
            "since": {
              "type": "number"
            },
            "until": {
              "type": "number"
            },
            "domains": {
              "type": "string"
            },
            "types": {
              "type": "string"
            },
            "severity": {
              "type": "string",
              "enum": [
                "debug",
                "info",
                "warn",
                "error"
              ]
            },
            "traceId": {
              "type": "string"
            },
            "sessionId": {
              "type": "string"
            },
            "turnId": {
              "type": "string"
            },
            "agentId": {
              "type": "string"
            },
            "taskId": {
              "type": "string"
            },
            "cursor": {
              "type": "string"
            },
            "view": {
              "type": "string",
              "enum": [
                "safe",
                "raw"
              ]
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "version": {
              "type": "number"
            },
            "view": {
              "type": "string",
              "enum": [
                "safe",
                "raw"
              ]
            },
            "rawAccessible": {
              "type": "boolean"
            },
            "generatedAt": {
              "type": "number"
            },
            "service": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "version": {
                  "type": "string"
                }
              },
              "required": [
                "name",
                "version"
              ],
              "additionalProperties": false
            },
            "capabilities": {
              "type": "object",
              "properties": {
                "signals": {
                  "type": "object",
                  "properties": {
                    "events": {
                      "type": "boolean"
                    },
                    "errors": {
                      "type": "boolean"
                    },
                    "metrics": {
                      "type": "boolean"
                    },
                    "traces": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "events",
                    "errors",
                    "metrics",
                    "traces"
                  ],
                  "additionalProperties": false
                },
                "encodings": {
                  "type": "object",
                  "properties": {
                    "json": {
                      "type": "boolean"
                    },
                    "sse": {
                      "type": "boolean"
                    },
                    "otlpJson": {
                      "type": "object",
                      "properties": {
                        "traces": {
                          "type": "boolean"
                        },
                        "metrics": {
                          "type": "boolean"
                        },
                        "logs": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "traces",
                        "metrics",
                        "logs"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "json",
                    "sse",
                    "otlpJson"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "signals",
                "encodings"
              ],
              "additionalProperties": false
            },
            "runtime": {
              "type": "object",
              "properties": {
                "sessionId": {
                  "type": "string"
                },
                "sessionStatus": {
                  "type": "string"
                },
                "traceContext": {
                  "type": "object",
                  "properties": {
                    "traceId": {
                      "type": "string"
                    },
                    "rootSpanId": {
                      "type": "string"
                    },
                    "exportActive": {
                      "type": "boolean"
                    },
                    "endpoint": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "traceId",
                    "rootSpanId",
                    "exportActive"
                  ],
                  "additionalProperties": false
                },
                "sessionCorrelationId": {
                  "type": "string"
                },
                "currentTurnCorrelationId": {
                  "type": "string"
                },
                "dbAvailable": {
                  "type": "boolean"
                },
                "dbPath": {
                  "type": "string"
                },
                "tasks": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "number"
                    },
                    "queued": {
                      "type": "number"
                    },
                    "running": {
                      "type": "number"
                    },
                    "blocked": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "total",
                    "queued",
                    "running",
                    "blocked"
                  ],
                  "additionalProperties": false
                },
                "agents": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "number"
                    },
                    "active": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "total",
                    "active"
                  ],
                  "additionalProperties": false
                },
                "approvals": {
                  "type": "object",
                  "properties": {
                    "pending": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "pending"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "sessionId",
                "sessionStatus",
                "sessionCorrelationId",
                "dbAvailable",
                "tasks",
                "agents",
                "approvals"
              ],
              "additionalProperties": false
            },
            "sessionMetrics": {
              "type": "object",
              "properties": {
                "turns": {
                  "type": "number"
                },
                "toolCalls": {
                  "type": "number"
                },
                "toolErrors": {
                  "type": "number"
                },
                "agentsSpawned": {
                  "type": "number"
                },
                "inputTokens": {
                  "type": "number"
                },
                "outputTokens": {
                  "type": "number"
                },
                "cacheReadTokens": {
                  "type": "number"
                },
                "permissionPrompts": {
                  "type": "number"
                },
                "permissionDenials": {
                  "type": "number"
                },
                "errors": {
                  "type": "number"
                },
                "warnings": {
                  "type": "number"
                }
              },
              "required": [
                "turns",
                "toolCalls",
                "toolErrors",
                "agentsSpawned",
                "inputTokens",
                "outputTokens",
                "cacheReadTokens",
                "permissionPrompts",
                "permissionDenials",
                "errors",
                "warnings"
              ],
              "additionalProperties": false
            },
            "aggregates": {
              "type": "object",
              "properties": {
                "totalEvents": {
                  "type": "number"
                },
                "totalErrors": {
                  "type": "number"
                },
                "totalWarnings": {
                  "type": "number"
                },
                "totalSpans": {
                  "type": "number"
                },
                "byDomain": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "number"
                  }
                },
                "byEventType": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "number"
                  }
                },
                "errorsByCategory": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "number"
                  }
                }
              },
              "required": [
                "totalEvents",
                "totalErrors",
                "totalWarnings",
                "totalSpans",
                "byDomain",
                "byEventType",
                "errorsByCategory"
              ],
              "additionalProperties": false
            },
            "recent": {
              "type": "object",
              "properties": {
                "events": {
                  "type": "object",
                  "properties": {
                    "version": {
                      "type": "number"
                    },
                    "view": {
                      "type": "string",
                      "enum": [
                        "safe",
                        "raw"
                      ]
                    },
                    "rawAccessible": {
                      "type": "boolean"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "domain": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "timestamp": {
                            "type": "number"
                          },
                          "severity": {
                            "type": "string",
                            "enum": [
                              "debug",
                              "info",
                              "warn",
                              "error"
                            ]
                          },
                          "traceId": {
                            "type": "string"
                          },
                          "sessionId": {
                            "type": "string"
                          },
                          "turnId": {
                            "type": "string"
                          },
                          "agentId": {
                            "type": "string"
                          },
                          "taskId": {
                            "type": "string"
                          },
                          "source": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          },
                          "payload": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          },
                          "attributes": {
                            "type": "object",
                            "additionalProperties": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "object",
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "array",
                                  "items": {}
                                }
                              ]
                            }
                          },
                          "error": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              },
                              "summary": {
                                "type": "string"
                              },
                              "hint": {
                                "type": "string"
                              },
                              "code": {
                                "type": "string"
                              },
                              "category": {
                                "type": "string",
                                "enum": [
                                  "authentication",
                                  "authorization",
                                  "billing",
                                  "rate_limit",
                                  "timeout",
                                  "network",
                                  "bad_request",
                                  "not_found",
                                  "permission",
                                  "tool",
                                  "config",
                                  "protocol",
                                  "service",
                                  "internal",
                                  "unknown"
                                ]
                              },
                              "source": {
                                "type": "string",
                                "enum": [
                                  "provider",
                                  "tool",
                                  "transport",
                                  "config",
                                  "permission",
                                  "runtime",
                                  "render",
                                  "acp",
                                  "unknown"
                                ]
                              },
                              "recoverable": {
                                "type": "boolean"
                              },
                              "statusCode": {
                                "type": "number"
                              },
                              "provider": {
                                "type": "string"
                              },
                              "operation": {
                                "type": "string"
                              },
                              "phase": {
                                "type": "string"
                              },
                              "requestId": {
                                "type": "string"
                              },
                              "providerCode": {
                                "type": "string"
                              },
                              "providerType": {
                                "type": "string"
                              },
                              "retryAfterMs": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "name",
                              "message",
                              "summary",
                              "category",
                              "source",
                              "recoverable"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "id",
                          "domain",
                          "type",
                          "timestamp",
                          "severity",
                          "traceId",
                          "sessionId",
                          "source",
                          "message",
                          "payload",
                          "attributes"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pageInfo": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "type": "number"
                        },
                        "returned": {
                          "type": "number"
                        },
                        "hasMore": {
                          "type": "boolean"
                        },
                        "cursor": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "limit",
                        "returned",
                        "hasMore"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "version",
                    "view",
                    "rawAccessible",
                    "items",
                    "pageInfo"
                  ],
                  "additionalProperties": false
                },
                "errors": {
                  "type": "object",
                  "properties": {
                    "version": {
                      "type": "number"
                    },
                    "view": {
                      "type": "string",
                      "enum": [
                        "safe",
                        "raw"
                      ]
                    },
                    "rawAccessible": {
                      "type": "boolean"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "domain": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "timestamp": {
                            "type": "number"
                          },
                          "severity": {
                            "type": "string",
                            "enum": [
                              "debug",
                              "info",
                              "warn",
                              "error"
                            ]
                          },
                          "traceId": {
                            "type": "string"
                          },
                          "sessionId": {
                            "type": "string"
                          },
                          "turnId": {
                            "type": "string"
                          },
                          "agentId": {
                            "type": "string"
                          },
                          "taskId": {
                            "type": "string"
                          },
                          "source": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          },
                          "payload": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          },
                          "attributes": {
                            "type": "object",
                            "additionalProperties": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "object",
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "array",
                                  "items": {}
                                }
                              ]
                            }
                          },
                          "error": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              },
                              "summary": {
                                "type": "string"
                              },
                              "hint": {
                                "type": "string"
                              },
                              "code": {
                                "type": "string"
                              },
                              "category": {
                                "type": "string",
                                "enum": [
                                  "authentication",
                                  "authorization",
                                  "billing",
                                  "rate_limit",
                                  "timeout",
                                  "network",
                                  "bad_request",
                                  "not_found",
                                  "permission",
                                  "tool",
                                  "config",
                                  "protocol",
                                  "service",
                                  "internal",
                                  "unknown"
                                ]
                              },
                              "source": {
                                "type": "string",
                                "enum": [
                                  "provider",
                                  "tool",
                                  "transport",
                                  "config",
                                  "permission",
                                  "runtime",
                                  "render",
                                  "acp",
                                  "unknown"
                                ]
                              },
                              "recoverable": {
                                "type": "boolean"
                              },
                              "statusCode": {
                                "type": "number"
                              },
                              "provider": {
                                "type": "string"
                              },
                              "operation": {
                                "type": "string"
                              },
                              "phase": {
                                "type": "string"
                              },
                              "requestId": {
                                "type": "string"
                              },
                              "providerCode": {
                                "type": "string"
                              },
                              "providerType": {
                                "type": "string"
                              },
                              "retryAfterMs": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "name",
                              "message",
                              "summary",
                              "category",
                              "source",
                              "recoverable"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "id",
                          "domain",
                          "type",
                          "timestamp",
                          "severity",
                          "traceId",
                          "sessionId",
                          "source",
                          "message",
                          "payload",
                          "attributes"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pageInfo": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "type": "number"
                        },
                        "returned": {
                          "type": "number"
                        },
                        "hasMore": {
                          "type": "boolean"
                        },
                        "cursor": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "limit",
                        "returned",
                        "hasMore"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "version",
                    "view",
                    "rawAccessible",
                    "items",
                    "pageInfo"
                  ],
                  "additionalProperties": false
                },
                "spans": {
                  "type": "object",
                  "properties": {
                    "version": {
                      "type": "number"
                    },
                    "view": {
                      "type": "string",
                      "enum": [
                        "safe",
                        "raw"
                      ]
                    },
                    "rawAccessible": {
                      "type": "boolean"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "number"
                          },
                          "spanContext": {
                            "type": "object",
                            "properties": {
                              "traceId": {
                                "type": "string"
                              },
                              "spanId": {
                                "type": "string"
                              },
                              "isValid": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "traceId",
                              "spanId",
                              "isValid"
                            ],
                            "additionalProperties": false
                          },
                          "parentSpanId": {
                            "type": "string"
                          },
                          "startTimeMs": {
                            "type": "number"
                          },
                          "endTimeMs": {
                            "type": "number"
                          },
                          "durationMs": {
                            "type": "number"
                          },
                          "attributes": {
                            "type": "object",
                            "additionalProperties": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "object",
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "array",
                                  "items": {}
                                }
                              ]
                            }
                          },
                          "events": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "timestamp": {
                                  "type": "number"
                                },
                                "attributes": {
                                  "type": "object",
                                  "additionalProperties": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "boolean"
                                      },
                                      {
                                        "type": "null"
                                      },
                                      {
                                        "type": "object",
                                        "additionalProperties": {}
                                      },
                                      {
                                        "type": "array",
                                        "items": {}
                                      }
                                    ]
                                  }
                                }
                              },
                              "required": [
                                "name",
                                "timestamp"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "status": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "number"
                              },
                              "message": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "code"
                            ],
                            "additionalProperties": false
                          },
                          "instrumentationScope": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "name",
                          "kind",
                          "spanContext",
                          "startTimeMs",
                          "endTimeMs",
                          "durationMs",
                          "attributes",
                          "events",
                          "status",
                          "instrumentationScope"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pageInfo": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "type": "number"
                        },
                        "returned": {
                          "type": "number"
                        },
                        "hasMore": {
                          "type": "boolean"
                        },
                        "cursor": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "limit",
                        "returned",
                        "hasMore"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "version",
                    "view",
                    "rawAccessible",
                    "items",
                    "pageInfo"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "events",
                "errors",
                "spans"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "version",
            "view",
            "rawAccessible",
            "generatedAt",
            "service",
            "capabilities",
            "runtime",
            "sessionMetrics",
            "aggregates",
            "recent"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "telemetry.stream",
        "title": "Telemetry Event Stream",
        "description": "Open the telemetry SSE stream and emit a ready event with resume metadata.",
        "category": "telemetry",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http"
        ],
        "scopes": [
          "read:telemetry"
        ],
        "http": {
          "method": "GET",
          "path": "/api/v1/telemetry/stream"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "number"
            },
            "since": {
              "type": "number"
            },
            "until": {
              "type": "number"
            },
            "domains": {
              "type": "string"
            },
            "types": {
              "type": "string"
            },
            "severity": {
              "type": "string",
              "enum": [
                "debug",
                "info",
                "warn",
                "error"
              ]
            },
            "traceId": {
              "type": "string"
            },
            "sessionId": {
              "type": "string"
            },
            "turnId": {
              "type": "string"
            },
            "agentId": {
              "type": "string"
            },
            "taskId": {
              "type": "string"
            },
            "cursor": {
              "type": "string"
            },
            "view": {
              "type": "string",
              "enum": [
                "safe",
                "raw"
              ]
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "version": {
              "type": "number"
            },
            "capabilities": {
              "type": "object",
              "properties": {
                "signals": {
                  "type": "object",
                  "properties": {
                    "events": {
                      "type": "boolean"
                    },
                    "errors": {
                      "type": "boolean"
                    },
                    "metrics": {
                      "type": "boolean"
                    },
                    "traces": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "events",
                    "errors",
                    "metrics",
                    "traces"
                  ],
                  "additionalProperties": false
                },
                "encodings": {
                  "type": "object",
                  "properties": {
                    "json": {
                      "type": "boolean"
                    },
                    "sse": {
                      "type": "boolean"
                    },
                    "otlpJson": {
                      "type": "object",
                      "properties": {
                        "traces": {
                          "type": "boolean"
                        },
                        "metrics": {
                          "type": "boolean"
                        },
                        "logs": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "traces",
                        "metrics",
                        "logs"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "json",
                    "sse",
                    "otlpJson"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "signals",
                "encodings"
              ],
              "additionalProperties": false
            },
            "view": {
              "type": "string",
              "enum": [
                "safe",
                "raw"
              ]
            },
            "rawAccessible": {
              "type": "boolean"
            },
            "resumedFrom": {
              "type": "string"
            }
          },
          "required": [
            "version",
            "capabilities",
            "view",
            "rawAccessible"
          ],
          "additionalProperties": false
        },
        "invokable": false,
        "metadata": {
          "responseKind": "sse",
          "stream": true,
          "wireEvent": "telemetry"
        }
      },
      {
        "id": "telemetry.traces.list",
        "title": "List Telemetry Traces",
        "description": "Return synthesized readable spans derived from runtime telemetry.",
        "category": "telemetry",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:telemetry"
        ],
        "http": {
          "method": "GET",
          "path": "/api/v1/telemetry/traces"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "number"
            },
            "since": {
              "type": "number"
            },
            "until": {
              "type": "number"
            },
            "domains": {
              "type": "string"
            },
            "types": {
              "type": "string"
            },
            "severity": {
              "type": "string",
              "enum": [
                "debug",
                "info",
                "warn",
                "error"
              ]
            },
            "traceId": {
              "type": "string"
            },
            "sessionId": {
              "type": "string"
            },
            "turnId": {
              "type": "string"
            },
            "agentId": {
              "type": "string"
            },
            "taskId": {
              "type": "string"
            },
            "cursor": {
              "type": "string"
            },
            "view": {
              "type": "string",
              "enum": [
                "safe",
                "raw"
              ]
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "version": {
              "type": "number"
            },
            "view": {
              "type": "string",
              "enum": [
                "safe",
                "raw"
              ]
            },
            "rawAccessible": {
              "type": "boolean"
            },
            "items": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "number"
                  },
                  "spanContext": {
                    "type": "object",
                    "properties": {
                      "traceId": {
                        "type": "string"
                      },
                      "spanId": {
                        "type": "string"
                      },
                      "isValid": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "traceId",
                      "spanId",
                      "isValid"
                    ],
                    "additionalProperties": false
                  },
                  "parentSpanId": {
                    "type": "string"
                  },
                  "startTimeMs": {
                    "type": "number"
                  },
                  "endTimeMs": {
                    "type": "number"
                  },
                  "durationMs": {
                    "type": "number"
                  },
                  "attributes": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "events": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "timestamp": {
                          "type": "number"
                        },
                        "attributes": {
                          "type": "object",
                          "additionalProperties": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "name",
                        "timestamp"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "status": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "number"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "code"
                    ],
                    "additionalProperties": false
                  },
                  "instrumentationScope": {
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "kind",
                  "spanContext",
                  "startTimeMs",
                  "endTimeMs",
                  "durationMs",
                  "attributes",
                  "events",
                  "status",
                  "instrumentationScope"
                ],
                "additionalProperties": false
              }
            },
            "pageInfo": {
              "type": "object",
              "properties": {
                "limit": {
                  "type": "number"
                },
                "returned": {
                  "type": "number"
                },
                "hasMore": {
                  "type": "boolean"
                },
                "cursor": {
                  "type": "string"
                },
                "nextCursor": {
                  "type": "string"
                }
              },
              "required": [
                "limit",
                "returned",
                "hasMore"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "version",
            "view",
            "rawAccessible",
            "items",
            "pageInfo"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "voice.providers.list",
        "title": "List Voice Providers",
        "description": "Return registered voice providers.",
        "category": "voice",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:voice"
        ],
        "http": {
          "method": "GET",
          "path": "/api/voice/providers"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "providers": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "capabilities": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "id",
                  "label",
                  "capabilities"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "providers"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "voice.realtime.session",
        "title": "Open Voice Realtime Session",
        "description": "Open a realtime voice session through a registered voice provider.",
        "category": "voice",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:voice"
        ],
        "http": {
          "method": "POST",
          "path": "/api/voice/realtime/session"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "providerId": {
              "type": "string"
            },
            "modelId": {
              "type": "string"
            },
            "voiceId": {
              "type": "string"
            },
            "inputFormat": {
              "type": "string"
            },
            "outputFormat": {
              "type": "string"
            },
            "instructions": {
              "type": "string"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "providerId": {
              "type": "string"
            },
            "sessionId": {
              "type": "string"
            },
            "transport": {
              "type": "string"
            },
            "url": {
              "type": "string"
            },
            "expiresAt": {
              "type": "number"
            },
            "headers": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "providerId",
            "sessionId",
            "transport",
            "metadata"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "voice.status",
        "title": "Voice Status",
        "description": "Return configured voice provider posture and capabilities.",
        "category": "voice",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:voice"
        ],
        "http": {
          "method": "GET",
          "path": "/api/voice"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "providerCount": {
              "type": "number"
            },
            "providers": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "state": {
                    "type": "string"
                  },
                  "capabilities": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "configured": {
                    "type": "boolean"
                  },
                  "detail": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "label",
                  "state",
                  "capabilities",
                  "configured",
                  "metadata"
                ],
                "additionalProperties": false
              }
            },
            "note": {
              "type": "string"
            }
          },
          "required": [
            "enabled",
            "providerCount",
            "providers",
            "note"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "voice.stt",
        "title": "Run Speech To Text",
        "description": "Transcribe an audio artifact through a registered voice provider.",
        "category": "voice",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:voice"
        ],
        "http": {
          "method": "POST",
          "path": "/api/voice/stt"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "providerId": {
              "type": "string"
            },
            "audio": {
              "type": "object",
              "properties": {
                "mimeType": {
                  "type": "string"
                },
                "format": {
                  "type": "string"
                },
                "dataBase64": {
                  "type": "string"
                },
                "uri": {
                  "type": "string"
                },
                "sampleRateHz": {
                  "type": "number"
                },
                "durationMs": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "mimeType",
                "format",
                "metadata"
              ],
              "additionalProperties": false
            },
            "language": {
              "type": "string"
            },
            "modelId": {
              "type": "string"
            },
            "prompt": {
              "type": "string"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "audio"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "providerId": {
              "type": "string"
            },
            "text": {
              "type": "string"
            },
            "language": {
              "type": "string"
            },
            "segments": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  },
                  "startMs": {
                    "type": "number"
                  },
                  "endMs": {
                    "type": "number"
                  },
                  "confidence": {
                    "type": "number"
                  }
                },
                "required": [
                  "text"
                ],
                "additionalProperties": false
              }
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "providerId",
            "text",
            "metadata"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "voice.tts",
        "title": "Run Text To Speech",
        "description": "Synthesize audio through a registered voice provider.",
        "category": "voice",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:voice"
        ],
        "http": {
          "method": "POST",
          "path": "/api/voice/tts"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "providerId": {
              "type": "string"
            },
            "text": {
              "type": "string"
            },
            "voiceId": {
              "type": "string"
            },
            "modelId": {
              "type": "string"
            },
            "format": {
              "type": "string"
            },
            "speed": {
              "type": "number"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "text"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "providerId": {
              "type": "string"
            },
            "audio": {
              "type": "object",
              "properties": {
                "mimeType": {
                  "type": "string"
                },
                "format": {
                  "type": "string"
                },
                "dataBase64": {
                  "type": "string"
                },
                "uri": {
                  "type": "string"
                },
                "sampleRateHz": {
                  "type": "number"
                },
                "durationMs": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "mimeType",
                "format",
                "metadata"
              ],
              "additionalProperties": false
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "providerId",
            "audio",
            "metadata"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "voice.tts.stream",
        "title": "Stream Text To Speech",
        "description": "Synthesize audio as streamed bytes through a registered streaming voice provider.",
        "category": "voice",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http"
        ],
        "scopes": [
          "write:voice"
        ],
        "http": {
          "method": "POST",
          "path": "/api/voice/tts/stream"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "providerId": {
              "type": "string"
            },
            "text": {
              "type": "string"
            },
            "voiceId": {
              "type": "string"
            },
            "modelId": {
              "type": "string"
            },
            "format": {
              "type": "string"
            },
            "speed": {
              "type": "number"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "text"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "contentType": {
              "type": "string"
            },
            "providerId": {
              "type": "string"
            },
            "format": {
              "type": "string"
            }
          },
          "required": [
            "contentType",
            "providerId",
            "format"
          ],
          "additionalProperties": false
        },
        "invokable": false,
        "metadata": {
          "responseKind": "binary-stream"
        }
      },
      {
        "id": "voice.voices.list",
        "title": "List Voices",
        "description": "Return registered voices for a voice provider.",
        "category": "voice",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:voice"
        ],
        "http": {
          "method": "GET",
          "path": "/api/voice/voices"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "providerId": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "voices": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "locale": {
                    "type": "string"
                  },
                  "gender": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "label",
                  "metadata"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "voices"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "watchers.create",
        "title": "Create Watcher",
        "description": "Register a new watcher.",
        "category": "watchers",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:watchers"
        ],
        "http": {
          "method": "POST",
          "path": "/api/watchers"
        },
        "events": [
          "runtime.watchers"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "label": {
              "type": "string"
            },
            "kind": {
              "type": "string"
            },
            "sourceId": {
              "type": "string"
            },
            "sourceKind": {
              "type": "string"
            },
            "intervalMs": {
              "type": "number"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "url": {
              "type": "string"
            },
            "method": {
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "endpoint": {
              "type": "string"
            },
            "address": {
              "type": "string"
            },
            "headers": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            },
            "run": {
              "type": "string"
            }
          },
          "required": [
            "label"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "kind": {
              "type": "string"
            },
            "label": {
              "type": "string"
            },
            "state": {
              "type": "string"
            },
            "source": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "enabled": {
                  "type": "boolean"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "kind",
                "label",
                "enabled",
                "createdAt",
                "updatedAt",
                "metadata"
              ],
              "additionalProperties": true
            },
            "intervalMs": {
              "type": "number"
            },
            "lastHeartbeatAt": {
              "type": "number"
            },
            "sourceLagMs": {
              "type": "number"
            },
            "sourceStatus": {
              "type": "string"
            },
            "degradedReason": {
              "type": "string"
            },
            "lastCheckpoint": {
              "type": "string"
            },
            "lastError": {
              "type": "string"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "id",
            "kind",
            "label",
            "state",
            "source",
            "metadata"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "watchers.delete",
        "title": "Delete Watcher",
        "description": "Delete an existing watcher.",
        "category": "watchers",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:watchers"
        ],
        "http": {
          "method": "DELETE",
          "path": "/api/watchers/{watcherId}"
        },
        "events": [
          "runtime.watchers"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "watcherId": {
              "type": "string"
            }
          },
          "required": [
            "watcherId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "removed": {
              "type": "boolean"
            },
            "id": {
              "type": "string"
            }
          },
          "required": [
            "removed"
          ],
          "additionalProperties": true
        },
        "dangerous": true,
        "invokable": true
      },
      {
        "id": "watchers.list",
        "title": "List Watchers",
        "description": "Return configured watchers and their runtime posture.",
        "category": "watchers",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:watchers"
        ],
        "http": {
          "method": "GET",
          "path": "/api/watchers"
        },
        "events": [
          "runtime.watchers"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "watchers": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "state": {
                    "type": "string"
                  },
                  "source": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "kind": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      },
                      "enabled": {
                        "type": "boolean"
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "updatedAt": {
                        "type": "number"
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "id",
                      "kind",
                      "label",
                      "enabled",
                      "createdAt",
                      "updatedAt",
                      "metadata"
                    ],
                    "additionalProperties": true
                  },
                  "intervalMs": {
                    "type": "number"
                  },
                  "lastHeartbeatAt": {
                    "type": "number"
                  },
                  "sourceLagMs": {
                    "type": "number"
                  },
                  "sourceStatus": {
                    "type": "string"
                  },
                  "degradedReason": {
                    "type": "string"
                  },
                  "lastCheckpoint": {
                    "type": "string"
                  },
                  "lastError": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "kind",
                  "label",
                  "state",
                  "source",
                  "metadata"
                ],
                "additionalProperties": true
              }
            }
          },
          "required": [
            "watchers"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "watchers.run",
        "title": "Run Watcher",
        "description": "Trigger a watcher immediately.",
        "category": "watchers",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:watchers"
        ],
        "http": {
          "method": "POST",
          "path": "/api/watchers/{watcherId}/run"
        },
        "events": [
          "runtime.watchers"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "watcherId": {
              "type": "string"
            }
          },
          "required": [
            "watcherId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "kind": {
              "type": "string"
            },
            "label": {
              "type": "string"
            },
            "state": {
              "type": "string"
            },
            "source": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "enabled": {
                  "type": "boolean"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "kind",
                "label",
                "enabled",
                "createdAt",
                "updatedAt",
                "metadata"
              ],
              "additionalProperties": true
            },
            "intervalMs": {
              "type": "number"
            },
            "lastHeartbeatAt": {
              "type": "number"
            },
            "sourceLagMs": {
              "type": "number"
            },
            "sourceStatus": {
              "type": "string"
            },
            "degradedReason": {
              "type": "string"
            },
            "lastCheckpoint": {
              "type": "string"
            },
            "lastError": {
              "type": "string"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "id",
            "kind",
            "label",
            "state",
            "source",
            "metadata"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "watchers.start",
        "title": "Start Watcher",
        "description": "Start a watcher instance.",
        "category": "watchers",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:watchers"
        ],
        "http": {
          "method": "POST",
          "path": "/api/watchers/{watcherId}/start"
        },
        "events": [
          "runtime.watchers"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "watcherId": {
              "type": "string"
            }
          },
          "required": [
            "watcherId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "kind": {
              "type": "string"
            },
            "label": {
              "type": "string"
            },
            "state": {
              "type": "string"
            },
            "source": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "enabled": {
                  "type": "boolean"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "kind",
                "label",
                "enabled",
                "createdAt",
                "updatedAt",
                "metadata"
              ],
              "additionalProperties": true
            },
            "intervalMs": {
              "type": "number"
            },
            "lastHeartbeatAt": {
              "type": "number"
            },
            "sourceLagMs": {
              "type": "number"
            },
            "sourceStatus": {
              "type": "string"
            },
            "degradedReason": {
              "type": "string"
            },
            "lastCheckpoint": {
              "type": "string"
            },
            "lastError": {
              "type": "string"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "id",
            "kind",
            "label",
            "state",
            "source",
            "metadata"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "watchers.stop",
        "title": "Stop Watcher",
        "description": "Stop a watcher instance.",
        "category": "watchers",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:watchers"
        ],
        "http": {
          "method": "POST",
          "path": "/api/watchers/{watcherId}/stop"
        },
        "events": [
          "runtime.watchers"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "watcherId": {
              "type": "string"
            }
          },
          "required": [
            "watcherId"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "kind": {
              "type": "string"
            },
            "label": {
              "type": "string"
            },
            "state": {
              "type": "string"
            },
            "source": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "enabled": {
                  "type": "boolean"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "kind",
                "label",
                "enabled",
                "createdAt",
                "updatedAt",
                "metadata"
              ],
              "additionalProperties": true
            },
            "intervalMs": {
              "type": "number"
            },
            "lastHeartbeatAt": {
              "type": "number"
            },
            "sourceLagMs": {
              "type": "number"
            },
            "sourceStatus": {
              "type": "string"
            },
            "degradedReason": {
              "type": "string"
            },
            "lastCheckpoint": {
              "type": "string"
            },
            "lastError": {
              "type": "string"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "id",
            "kind",
            "label",
            "state",
            "source",
            "metadata"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "watchers.update",
        "title": "Update Watcher",
        "description": "Update an existing watcher. (Renamed from watchers.patch in the 1.0.0 core-verb rename, canonical verb is update, not patch.)",
        "category": "watchers",
        "source": "builtin",
        "access": "admin",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:watchers"
        ],
        "http": {
          "method": "PATCH",
          "path": "/api/watchers/{watcherId}"
        },
        "events": [
          "runtime.watchers"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "watcherId": {
              "type": "string"
            },
            "label": {
              "type": "string"
            },
            "kind": {
              "type": "string"
            },
            "sourceId": {
              "type": "string"
            },
            "sourceKind": {
              "type": "string"
            },
            "enabled": {
              "type": "boolean"
            },
            "intervalMs": {
              "type": "number"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "url": {
              "type": "string"
            },
            "method": {
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "endpoint": {
              "type": "string"
            },
            "address": {
              "type": "string"
            },
            "headers": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            },
            "run": {
              "type": "string"
            }
          },
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "kind": {
              "type": "string"
            },
            "label": {
              "type": "string"
            },
            "state": {
              "type": "string"
            },
            "source": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "enabled": {
                  "type": "boolean"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "kind",
                "label",
                "enabled",
                "createdAt",
                "updatedAt",
                "metadata"
              ],
              "additionalProperties": true
            },
            "intervalMs": {
              "type": "number"
            },
            "lastHeartbeatAt": {
              "type": "number"
            },
            "sourceLagMs": {
              "type": "number"
            },
            "sourceStatus": {
              "type": "string"
            },
            "degradedReason": {
              "type": "string"
            },
            "lastCheckpoint": {
              "type": "string"
            },
            "lastError": {
              "type": "string"
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "id",
            "kind",
            "label",
            "state",
            "source",
            "metadata"
          ],
          "additionalProperties": true
        },
        "invokable": true
      },
      {
        "id": "web_search.providers.list",
        "title": "List Web Search Providers",
        "description": "Return registered web search provider capabilities.",
        "category": "web-search",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:web-search"
        ],
        "http": {
          "method": "GET",
          "path": "/api/web-search/providers"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "providers": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "capabilities": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "requiresAuth": {
                    "type": "boolean"
                  },
                  "configured": {
                    "type": "boolean"
                  },
                  "note": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "label",
                  "capabilities",
                  "requiresAuth",
                  "configured"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "providers"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "web_search.query",
        "title": "Run Web Search",
        "description": "Execute a provider-backed web search and return normalized ranked results.",
        "category": "web-search",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:web-search"
        ],
        "http": {
          "method": "POST",
          "path": "/api/web-search/query"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "query": {
              "type": "string"
            },
            "providerId": {
              "type": "string"
            },
            "maxResults": {
              "type": "number"
            },
            "verbosity": {
              "type": "string"
            },
            "region": {
              "type": "string"
            },
            "safeSearch": {
              "type": "string"
            },
            "timeRange": {
              "type": "string"
            },
            "includeInstantAnswer": {
              "type": "boolean"
            },
            "includeEvidence": {
              "type": "boolean"
            },
            "evidenceTopN": {
              "type": "number"
            },
            "evidenceExtract": {
              "type": "string"
            }
          },
          "required": [
            "query"
          ],
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "providerId": {
              "type": "string"
            },
            "providerLabel": {
              "type": "string"
            },
            "query": {
              "type": "string"
            },
            "verbosity": {
              "type": "string"
            },
            "results": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "rank": {
                    "type": "number"
                  },
                  "url": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "snippet": {
                    "type": "string"
                  },
                  "displayUrl": {
                    "type": "string"
                  },
                  "domain": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string"
                  },
                  "providerId": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  },
                  "evidence": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "type": "string"
                        },
                        "extract": {
                          "type": "string"
                        },
                        "content": {
                          "type": "string"
                        },
                        "tokensUsed": {
                          "type": "number"
                        },
                        "status": {
                          "type": "number"
                        },
                        "contentType": {
                          "type": "string"
                        },
                        "truncated": {
                          "type": "boolean"
                        },
                        "metadata": {
                          "type": "object",
                          "additionalProperties": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "url",
                        "extract",
                        "content",
                        "tokensUsed",
                        "metadata"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "rank",
                  "url",
                  "type",
                  "providerId",
                  "metadata"
                ],
                "additionalProperties": false
              }
            },
            "instantAnswer": {
              "type": "object",
              "properties": {
                "heading": {
                  "type": "string"
                },
                "answer": {
                  "type": "string"
                },
                "abstract": {
                  "type": "string"
                },
                "source": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "image": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                },
                "related": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "text": {
                        "type": "string"
                      },
                      "url": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "text",
                      "url"
                    ],
                    "additionalProperties": false
                  }
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                }
              },
              "required": [
                "type",
                "related",
                "metadata"
              ],
              "additionalProperties": false
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "providerId",
            "providerLabel",
            "query",
            "verbosity",
            "results",
            "metadata"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "workspaces.registrations.add",
        "title": "Register a Workspace",
        "description": "Register a workspace root so the whole subtree beneath it is covered. Refuses an absurdly broad root (the home directory, the filesystem root, or the daemon state directory) with a 400, coverage flows down the entire subtree, so a root that broad would sweep far more than a project. Idempotent: re-registering the same normalized root returns alreadyRegistered:true. Registering a root clears any remembered decline recorded at exactly that root.",
        "category": "workspaces",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:workspaces"
        ],
        "http": {
          "method": "POST",
          "path": "/api/workspaces/registrations"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "root": {
              "type": "string"
            },
            "label": {
              "type": "string"
            },
            "origin": {
              "type": "string"
            },
            "checkpointEligible": {
              "type": "boolean"
            }
          },
          "required": [
            "root"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "workspace": {
              "type": "object",
              "properties": {
                "root": {
                  "type": "string"
                },
                "registeredAt": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "origin": {
                  "type": "string"
                },
                "checkpointEligible": {
                  "type": "boolean"
                }
              },
              "required": [
                "root",
                "registeredAt"
              ],
              "additionalProperties": false
            },
            "alreadyRegistered": {
              "type": "boolean"
            }
          },
          "required": [
            "workspace",
            "alreadyRegistered"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "workspaces.registrations.list",
        "title": "List Registered Workspaces",
        "description": "Return every registered workspace root (coverage flows down each root's subtree) and every remembered subtree-scoped decline. Read-only.",
        "category": "workspaces",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:workspaces"
        ],
        "http": {
          "method": "GET",
          "path": "/api/workspaces/registrations"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "workspaces": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "root": {
                    "type": "string"
                  },
                  "registeredAt": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "origin": {
                    "type": "string"
                  },
                  "checkpointEligible": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "root",
                  "registeredAt"
                ],
                "additionalProperties": false
              }
            },
            "declines": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "root": {
                    "type": "string"
                  },
                  "declinedAt": {
                    "type": "string"
                  }
                },
                "required": [
                  "root",
                  "declinedAt"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "workspaces",
            "declines"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "workspaces.registrations.remove",
        "title": "Unregister a Workspace",
        "description": "Remove a registered workspace root. Returns { removed: false } when no root with that normalized path was registered, an honest boolean, never a 200 that pretends a phantom root was removed.",
        "category": "workspaces",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "write:workspaces"
        ],
        "http": {
          "method": "DELETE",
          "path": "/api/workspaces/registrations"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "root": {
              "type": "string"
            }
          },
          "required": [
            "root"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "root": {
              "type": "string"
            },
            "removed": {
              "type": "boolean"
            }
          },
          "required": [
            "root",
            "removed"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "workspaces.resolve",
        "title": "Resolve Workspace Coverage",
        "description": "Resolve a path against the registry: covered (by which nearest registered root), declined (at which root), or unknown. Coverage flows DOWN a registered root's subtree and is inherited through the git worktree→main-repo link, a linked worktree outside any registered root still resolves to the main repo's registration. When mainWorktreeRoot is omitted the daemon probes the link itself. Read-only.",
        "category": "workspaces",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:workspaces"
        ],
        "http": {
          "method": "POST",
          "path": "/api/workspaces/resolve"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "mainWorktreeRoot": {
              "type": "string"
            }
          },
          "required": [
            "path"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "status": {
              "type": "string",
              "enum": [
                "covered",
                "declined",
                "unknown"
              ]
            },
            "coveredBy": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "declinedRoot": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "viaWorktreeLink": {
              "type": "boolean"
            },
            "reason": {
              "type": "string"
            }
          },
          "required": [
            "path",
            "status",
            "coveredBy",
            "declinedRoot",
            "viaWorktreeLink",
            "reason"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "worktrees.discard",
        "title": "Discard a Worktree",
        "description": "Remove a worktree per the eviction-preserving rules: any uncommitted state is first committed onto the worktree's branch (a preservation failure REFUSES the removal rather than losing work), the directory is removed, and the branch is KEPT. Returns an honest receipt (ok, branch kept, preservation commit, detail) either way.",
        "category": "worktrees",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:worktrees"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            }
          },
          "required": [
            "path"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "ok": {
              "type": "boolean"
            },
            "branch": {
              "type": "string"
            },
            "preservedCommit": {
              "type": "string"
            },
            "discardedAt": {
              "type": "number"
            },
            "detail": {
              "type": "string"
            }
          },
          "required": [
            "path",
            "ok",
            "discardedAt",
            "detail"
          ],
          "additionalProperties": false
        },
        "dangerous": true,
        "invokable": true
      },
      {
        "id": "worktrees.setup.run",
        "title": "Re-run Worktree Setup",
        "description": "Re-run cold-start setup (configured commands + untracked-file carry-over) on a live worktree by path, recording the honest outcome onto the worktree record. Returns the setup result: state skipped (nothing configured), succeeded, or failed with the failing step and error. A failed setup is a visible worktree state, never silent.",
        "category": "worktrees",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "ws"
        ],
        "scopes": [
          "write:worktrees"
        ],
        "inputSchema": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            }
          },
          "required": [
            "path"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "setup": {
              "type": "object",
              "properties": {
                "state": {
                  "type": "string",
                  "enum": [
                    "skipped",
                    "succeeded",
                    "failed"
                  ]
                },
                "startedAt": {
                  "type": "number"
                },
                "completedAt": {
                  "type": "number"
                },
                "steps": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "command",
                          "carry-over"
                        ]
                      },
                      "label": {
                        "type": "string"
                      },
                      "ok": {
                        "type": "boolean"
                      },
                      "exitCode": {
                        "type": "number"
                      },
                      "output": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind",
                      "label",
                      "ok",
                      "output"
                    ],
                    "additionalProperties": false
                  }
                },
                "error": {
                  "type": "string"
                }
              },
              "required": [
                "state",
                "startedAt",
                "completedAt",
                "steps"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "path",
            "setup"
          ],
          "additionalProperties": false
        },
        "invokable": true
      },
      {
        "id": "worktrees.snapshot",
        "title": "Worktrees Snapshot",
        "description": "Return the worktree integration snapshot.",
        "category": "worktrees",
        "source": "builtin",
        "access": "authenticated",
        "transport": [
          "http",
          "ws"
        ],
        "scopes": [
          "read:worktrees"
        ],
        "http": {
          "method": "GET",
          "path": "/api/worktrees"
        },
        "inputSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "summary": {
              "type": "object",
              "properties": {
                "total": {
                  "type": "number"
                },
                "active": {
                  "type": "number"
                },
                "paused": {
                  "type": "number"
                },
                "kept": {
                  "type": "number"
                },
                "discard": {
                  "type": "number"
                },
                "pendingCleanup": {
                  "type": "number"
                },
                "sessionAttached": {
                  "type": "number"
                },
                "taskAttached": {
                  "type": "number"
                },
                "agentOwned": {
                  "type": "number"
                },
                "orchestratorOwned": {
                  "type": "number"
                },
                "manualOwned": {
                  "type": "number"
                }
              },
              "required": [
                "total",
                "active",
                "paused",
                "kept",
                "discard",
                "pendingCleanup",
                "sessionAttached",
                "taskAttached",
                "agentOwned",
                "orchestratorOwned",
                "manualOwned"
              ],
              "additionalProperties": false
            },
            "records": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "path": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "agent",
                      "orchestrator",
                      "manual"
                    ]
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "active",
                      "paused",
                      "kept",
                      "discard",
                      "pending-cleanup"
                    ]
                  },
                  "ownerId": {
                    "type": "string"
                  },
                  "sessionId": {
                    "type": "string"
                  },
                  "taskId": {
                    "type": "string"
                  },
                  "setup": {
                    "type": "object",
                    "properties": {
                      "state": {
                        "type": "string",
                        "enum": [
                          "skipped",
                          "succeeded",
                          "failed"
                        ]
                      },
                      "startedAt": {
                        "type": "number"
                      },
                      "completedAt": {
                        "type": "number"
                      },
                      "steps": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "command",
                                "carry-over"
                              ]
                            },
                            "label": {
                              "type": "string"
                            },
                            "ok": {
                              "type": "boolean"
                            },
                            "exitCode": {
                              "type": "number"
                            },
                            "output": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "label",
                            "ok",
                            "output"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "error": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "state",
                      "startedAt",
                      "completedAt",
                      "steps"
                    ],
                    "additionalProperties": false
                  },
                  "updatedAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "path",
                  "kind",
                  "state",
                  "updatedAt"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "summary",
            "records"
          ],
          "additionalProperties": false
        },
        "invokable": true
      }
    ],
    "events": [
      {
        "id": "runtime.agents",
        "title": "agents Domain Events",
        "description": "Agent lifecycle, planning, and completion events.",
        "category": "runtime-domain",
        "source": "builtin",
        "transport": [
          "sse",
          "ws"
        ],
        "scopes": [
          "read:events"
        ],
        "domains": [
          "agents"
        ],
        "wireEvents": [
          "agents"
        ],
        "outputSchema": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {},
              {
                "type": "array",
                "items": {}
              }
            ]
          }
        }
      },
      {
        "id": "runtime.automation",
        "title": "automation Domain Events",
        "description": "Automation job, schedule, and run events.",
        "category": "runtime-domain",
        "source": "builtin",
        "transport": [
          "sse",
          "ws"
        ],
        "scopes": [
          "read:events"
        ],
        "domains": [
          "automation"
        ],
        "wireEvents": [
          "automation"
        ],
        "outputSchema": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {},
              {
                "type": "array",
                "items": {}
              }
            ]
          }
        }
      },
      {
        "id": "runtime.communication",
        "title": "communication Domain Events",
        "description": "Agent communication and policy events.",
        "category": "runtime-domain",
        "source": "builtin",
        "transport": [
          "sse",
          "ws"
        ],
        "scopes": [
          "read:events"
        ],
        "domains": [
          "communication"
        ],
        "wireEvents": [
          "communication"
        ],
        "outputSchema": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {},
              {
                "type": "array",
                "items": {}
              }
            ]
          }
        }
      },
      {
        "id": "runtime.compaction",
        "title": "compaction Domain Events",
        "description": "Context compaction and summary events.",
        "category": "runtime-domain",
        "source": "builtin",
        "transport": [
          "sse",
          "ws"
        ],
        "scopes": [
          "read:events"
        ],
        "domains": [
          "compaction"
        ],
        "wireEvents": [
          "compaction"
        ],
        "outputSchema": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {},
              {
                "type": "array",
                "items": {}
              }
            ]
          }
        }
      },
      {
        "id": "runtime.config",
        "title": "config Domain Events",
        "description": "Key-level settings-change notices (CONFIG_KEY_CHANGED), carrying the dotted key, its ownership scope (daemon/client/user) and the new value, EXCEPT for a secret-bearing key, which travels by name only with secret:true and no value field at all. The poll-free counterpart to config.get for a client whose settings live in the daemon: an in-process ConfigManager.subscribe cannot see a write that happened on another machine, so a client without this stream keeps running on whatever it read at startup.",
        "category": "runtime-domain",
        "source": "builtin",
        "transport": [
          "sse",
          "ws"
        ],
        "scopes": [
          "read:events"
        ],
        "domains": [
          "config"
        ],
        "wireEvents": [
          "config"
        ],
        "outputSchema": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {},
              {
                "type": "array",
                "items": {}
              }
            ]
          }
        }
      },
      {
        "id": "runtime.control-plane",
        "title": "control-plane Domain Events",
        "description": "Control-plane client, auth, and subscription events.",
        "category": "runtime-domain",
        "source": "builtin",
        "transport": [
          "sse",
          "ws"
        ],
        "scopes": [
          "read:events"
        ],
        "domains": [
          "control-plane"
        ],
        "wireEvents": [
          "control-plane"
        ],
        "outputSchema": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {},
              {
                "type": "array",
                "items": {}
              }
            ]
          }
        }
      },
      {
        "id": "runtime.deliveries",
        "title": "deliveries Domain Events",
        "description": "Delivery queue and outcome events.",
        "category": "runtime-domain",
        "source": "builtin",
        "transport": [
          "sse",
          "ws"
        ],
        "scopes": [
          "read:events"
        ],
        "domains": [
          "deliveries"
        ],
        "wireEvents": [
          "deliveries"
        ],
        "outputSchema": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {},
              {
                "type": "array",
                "items": {}
              }
            ]
          }
        }
      },
      {
        "id": "runtime.fleet",
        "title": "fleet Domain Events",
        "description": "Live process-registry node lifecycle events (started, state-changed, finished, blocked-on-user, unblocked), the poll-free counterpart to fleet.snapshot.",
        "category": "runtime-domain",
        "source": "builtin",
        "transport": [
          "sse",
          "ws"
        ],
        "scopes": [
          "read:events"
        ],
        "domains": [
          "fleet"
        ],
        "wireEvents": [
          "fleet"
        ],
        "outputSchema": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {},
              {
                "type": "array",
                "items": {}
              }
            ]
          }
        }
      },
      {
        "id": "runtime.forensics",
        "title": "forensics Domain Events",
        "description": "Forensics and incident trail events.",
        "category": "runtime-domain",
        "source": "builtin",
        "transport": [
          "sse",
          "ws"
        ],
        "scopes": [
          "read:events"
        ],
        "domains": [
          "forensics"
        ],
        "wireEvents": [
          "forensics"
        ],
        "outputSchema": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {},
              {
                "type": "array",
                "items": {}
              }
            ]
          }
        }
      },
      {
        "id": "runtime.knowledge",
        "title": "knowledge Domain Events",
        "description": "Knowledge ingest, extraction, projection, packet, and job events.",
        "category": "runtime-domain",
        "source": "builtin",
        "transport": [
          "sse",
          "ws"
        ],
        "scopes": [
          "read:events"
        ],
        "domains": [
          "knowledge"
        ],
        "wireEvents": [
          "knowledge"
        ],
        "outputSchema": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {},
              {
                "type": "array",
                "items": {}
              }
            ]
          }
        }
      },
      {
        "id": "runtime.mcp",
        "title": "mcp Domain Events",
        "description": "MCP server, tool, and connection events.",
        "category": "runtime-domain",
        "source": "builtin",
        "transport": [
          "sse",
          "ws"
        ],
        "scopes": [
          "read:events"
        ],
        "domains": [
          "mcp"
        ],
        "wireEvents": [
          "mcp"
        ],
        "outputSchema": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {},
              {
                "type": "array",
                "items": {}
              }
            ]
          }
        }
      },
      {
        "id": "runtime.ops",
        "title": "ops Domain Events",
        "description": "Operational diagnostics and control events.",
        "category": "runtime-domain",
        "source": "builtin",
        "transport": [
          "sse",
          "ws"
        ],
        "scopes": [
          "read:events"
        ],
        "domains": [
          "ops"
        ],
        "wireEvents": [
          "ops"
        ],
        "outputSchema": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {},
              {
                "type": "array",
                "items": {}
              }
            ]
          }
        }
      },
      {
        "id": "runtime.orchestration",
        "title": "orchestration Domain Events",
        "description": "Higher-level orchestration and planner coordination events.",
        "category": "runtime-domain",
        "source": "builtin",
        "transport": [
          "sse",
          "ws"
        ],
        "scopes": [
          "read:events"
        ],
        "domains": [
          "orchestration"
        ],
        "wireEvents": [
          "orchestration"
        ],
        "outputSchema": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {},
              {
                "type": "array",
                "items": {}
              }
            ]
          }
        }
      },
      {
        "id": "runtime.permissions",
        "title": "permissions Domain Events",
        "description": "Approval and permission prompt events.",
        "category": "runtime-domain",
        "source": "builtin",
        "transport": [
          "sse",
          "ws"
        ],
        "scopes": [
          "read:events"
        ],
        "domains": [
          "permissions"
        ],
        "wireEvents": [
          "permissions"
        ],
        "outputSchema": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {},
              {
                "type": "array",
                "items": {}
              }
            ]
          }
        }
      },
      {
        "id": "runtime.planner",
        "title": "planner Domain Events",
        "description": "Planner updates and plan mutation events.",
        "category": "runtime-domain",
        "source": "builtin",
        "transport": [
          "sse",
          "ws"
        ],
        "scopes": [
          "read:events"
        ],
        "domains": [
          "planner"
        ],
        "wireEvents": [
          "planner"
        ],
        "outputSchema": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {},
              {
                "type": "array",
                "items": {}
              }
            ]
          }
        }
      },
      {
        "id": "runtime.plugins",
        "title": "plugins Domain Events",
        "description": "Plugin registration and lifecycle events.",
        "category": "runtime-domain",
        "source": "builtin",
        "transport": [
          "sse",
          "ws"
        ],
        "scopes": [
          "read:events"
        ],
        "domains": [
          "plugins"
        ],
        "wireEvents": [
          "plugins"
        ],
        "outputSchema": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {},
              {
                "type": "array",
                "items": {}
              }
            ]
          }
        }
      },
      {
        "id": "runtime.providers",
        "title": "providers Domain Events",
        "description": "Provider health, selection, and routing events.",
        "category": "runtime-domain",
        "source": "builtin",
        "transport": [
          "sse",
          "ws"
        ],
        "scopes": [
          "read:events"
        ],
        "domains": [
          "providers"
        ],
        "wireEvents": [
          "providers"
        ],
        "outputSchema": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {},
              {
                "type": "array",
                "items": {}
              }
            ]
          }
        }
      },
      {
        "id": "runtime.routes",
        "title": "routes Domain Events",
        "description": "Route binding and surface-link events.",
        "category": "runtime-domain",
        "source": "builtin",
        "transport": [
          "sse",
          "ws"
        ],
        "scopes": [
          "read:events"
        ],
        "domains": [
          "routes"
        ],
        "wireEvents": [
          "routes"
        ],
        "outputSchema": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {},
              {
                "type": "array",
                "items": {}
              }
            ]
          }
        }
      },
      {
        "id": "runtime.security",
        "title": "security Domain Events",
        "description": "Security posture and policy events.",
        "category": "runtime-domain",
        "source": "builtin",
        "transport": [
          "sse",
          "ws"
        ],
        "scopes": [
          "read:events"
        ],
        "domains": [
          "security"
        ],
        "wireEvents": [
          "security"
        ],
        "outputSchema": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {},
              {
                "type": "array",
                "items": {}
              }
            ]
          }
        }
      },
      {
        "id": "runtime.session",
        "title": "session Domain Events",
        "description": "Shared-session lifecycle, participant, and message events.",
        "category": "runtime-domain",
        "source": "builtin",
        "transport": [
          "sse",
          "ws"
        ],
        "scopes": [
          "read:events"
        ],
        "domains": [
          "session"
        ],
        "wireEvents": [
          "session"
        ],
        "outputSchema": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {},
              {
                "type": "array",
                "items": {}
              }
            ]
          }
        }
      },
      {
        "id": "runtime.surfaces",
        "title": "surfaces Domain Events",
        "description": "Surface registration and health events.",
        "category": "runtime-domain",
        "source": "builtin",
        "transport": [
          "sse",
          "ws"
        ],
        "scopes": [
          "read:events"
        ],
        "domains": [
          "surfaces"
        ],
        "wireEvents": [
          "surfaces"
        ],
        "outputSchema": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {},
              {
                "type": "array",
                "items": {}
              }
            ]
          }
        }
      },
      {
        "id": "runtime.tasks",
        "title": "tasks Domain Events",
        "description": "Runtime task lifecycle and status events.",
        "category": "runtime-domain",
        "source": "builtin",
        "transport": [
          "sse",
          "ws"
        ],
        "scopes": [
          "read:events"
        ],
        "domains": [
          "tasks"
        ],
        "wireEvents": [
          "tasks"
        ],
        "outputSchema": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {},
              {
                "type": "array",
                "items": {}
              }
            ]
          }
        }
      },
      {
        "id": "runtime.tools",
        "title": "tools Domain Events",
        "description": "Tool start, result, and failure events.",
        "category": "runtime-domain",
        "source": "builtin",
        "transport": [
          "sse",
          "ws"
        ],
        "scopes": [
          "read:events"
        ],
        "domains": [
          "tools"
        ],
        "wireEvents": [
          "tools"
        ],
        "outputSchema": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {},
              {
                "type": "array",
                "items": {}
              }
            ]
          }
        }
      },
      {
        "id": "runtime.transport",
        "title": "transport Domain Events",
        "description": "Transport connect, disconnect, and lifecycle events.",
        "category": "runtime-domain",
        "source": "builtin",
        "transport": [
          "sse",
          "ws"
        ],
        "scopes": [
          "read:events"
        ],
        "domains": [
          "transport"
        ],
        "wireEvents": [
          "transport"
        ],
        "outputSchema": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {},
              {
                "type": "array",
                "items": {}
              }
            ]
          }
        }
      },
      {
        "id": "runtime.turn",
        "title": "turn Domain Events",
        "description": "Turn submission and completion events.",
        "category": "runtime-domain",
        "source": "builtin",
        "transport": [
          "sse",
          "ws"
        ],
        "scopes": [
          "read:events"
        ],
        "domains": [
          "turn"
        ],
        "wireEvents": [
          "turn"
        ],
        "outputSchema": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {},
              {
                "type": "array",
                "items": {}
              }
            ]
          }
        }
      },
      {
        "id": "runtime.ui",
        "title": "ui Domain Events",
        "description": "UI-focused state and operational events.",
        "category": "runtime-domain",
        "source": "builtin",
        "transport": [
          "sse",
          "ws"
        ],
        "scopes": [
          "read:events"
        ],
        "domains": [
          "ui"
        ],
        "wireEvents": [
          "ui"
        ],
        "outputSchema": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {},
              {
                "type": "array",
                "items": {}
              }
            ]
          }
        }
      },
      {
        "id": "runtime.watchers",
        "title": "watchers Domain Events",
        "description": "Watcher state and heartbeat events.",
        "category": "runtime-domain",
        "source": "builtin",
        "transport": [
          "sse",
          "ws"
        ],
        "scopes": [
          "read:events"
        ],
        "domains": [
          "watchers"
        ],
        "wireEvents": [
          "watchers"
        ],
        "outputSchema": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {},
              {
                "type": "array",
                "items": {}
              }
            ]
          }
        }
      },
      {
        "id": "runtime.workflows",
        "title": "workflows Domain Events",
        "description": "Workflow orchestration events.",
        "category": "runtime-domain",
        "source": "builtin",
        "transport": [
          "sse",
          "ws"
        ],
        "scopes": [
          "read:events"
        ],
        "domains": [
          "workflows"
        ],
        "wireEvents": [
          "workflows"
        ],
        "outputSchema": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {},
              {
                "type": "array",
                "items": {}
              }
            ]
          }
        }
      },
      {
        "id": "runtime.workspace",
        "title": "workspace Domain Events",
        "description": "Workspace swap lifecycle events (start, complete, refuse).",
        "category": "runtime-domain",
        "source": "builtin",
        "transport": [
          "sse",
          "ws"
        ],
        "scopes": [
          "read:events"
        ],
        "domains": [
          "workspace"
        ],
        "wireEvents": [
          "workspace"
        ],
        "outputSchema": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {},
              {
                "type": "array",
                "items": {}
              }
            ]
          }
        }
      },
      {
        "id": "control.approval_update",
        "title": "Approval Record Update",
        "description": "Every approval record transition, pushed the moment the broker records it: an ask RAISED (status pending, this is the prompt arriving), claimed by a surface, approved, denied, cancelled, expired, or updated in place (a started fix session stamped onto an accepted offer). The payload is the whole `approval` record plus the `createdAt` of the notice, so a subscriber renders the prompt from the event and never needs a follow-up read to draw it. This is the channel that makes approvals.raise usable from a surface that is not in the daemon process: raise returns the pending record and the DECISION arrives here, so a client gets keystroke-fast prompt delivery instead of polling approvals.list on a timer. Domain-tagged `permissions` (gateway-scope-enforcement.ts EVENT_DOMAIN), so a client that opened the stream with ?domains=… must include `permissions` to receive it; a client that opted into no domain narrowing receives it as before. The record is the daemon's, not the subscriber's: several surfaces see the same transition and the daemon remains the single source of the applied result, a surface renders what the record says rather than what it locally decided.",
        "category": "transport",
        "source": "builtin",
        "transport": [
          "sse",
          "ws"
        ],
        "scopes": [
          "read:events"
        ],
        "domains": [
          "permissions"
        ],
        "wireEvents": [
          "approval-update"
        ],
        "outputSchema": {
          "type": "object",
          "properties": {
            "approval": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "callId": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                },
                "routeId": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "claimed",
                    "approved",
                    "denied",
                    "cancelled",
                    "expired"
                  ]
                },
                "request": {
                  "type": "object",
                  "properties": {
                    "callId": {
                      "type": "string"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "args": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    },
                    "category": {
                      "type": "string",
                      "enum": [
                        "read",
                        "write",
                        "execute",
                        "delegate"
                      ]
                    },
                    "analysis": {
                      "type": "object",
                      "properties": {
                        "classification": {
                          "type": "string"
                        },
                        "riskLevel": {
                          "type": "string",
                          "enum": [
                            "low",
                            "medium",
                            "high",
                            "critical"
                          ]
                        },
                        "summary": {
                          "type": "string"
                        },
                        "reasons": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "target": {
                          "type": "string"
                        },
                        "targetKind": {
                          "type": "string",
                          "enum": [
                            "command",
                            "path",
                            "url",
                            "task",
                            "generic"
                          ]
                        },
                        "surface": {
                          "type": "string",
                          "enum": [
                            "filesystem",
                            "shell",
                            "network",
                            "orchestration",
                            "platform",
                            "generic"
                          ]
                        },
                        "blastRadius": {
                          "type": "string",
                          "enum": [
                            "local",
                            "project",
                            "external",
                            "delegated",
                            "platform"
                          ]
                        },
                        "sideEffects": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "host": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "classification",
                        "riskLevel",
                        "summary",
                        "reasons"
                      ],
                      "additionalProperties": false
                    },
                    "workingDirectory": {
                      "type": "string"
                    },
                    "attribution": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "background-agent"
                              ]
                            },
                            "agentId": {
                              "type": "string"
                            },
                            "template": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "agentId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "mcp-server"
                              ]
                            },
                            "serverName": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "serverName"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "sandbox-escalation"
                              ]
                            },
                            "sandbox": {
                              "type": "string"
                            },
                            "escalations": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "kind",
                            "sandbox",
                            "escalations"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "rememberOptions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tier": {
                            "type": "string",
                            "enum": [
                              "session",
                              "exact",
                              "command-class",
                              "path",
                              "tool"
                            ]
                          },
                          "label": {
                            "type": "string"
                          },
                          "detail": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "tier",
                          "label",
                          "detail"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "callId",
                    "tool",
                    "args",
                    "category",
                    "analysis"
                  ],
                  "additionalProperties": false
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "claimedBy": {
                  "type": "string"
                },
                "claimedAt": {
                  "type": "number"
                },
                "resolvedAt": {
                  "type": "number"
                },
                "resolvedBy": {
                  "type": "string"
                },
                "decision": {
                  "type": "object",
                  "properties": {
                    "approved": {
                      "type": "boolean"
                    },
                    "remember": {
                      "type": "boolean"
                    },
                    "rememberTier": {
                      "type": "string",
                      "enum": [
                        "session",
                        "exact",
                        "command-class",
                        "path",
                        "tool"
                      ]
                    },
                    "reason": {
                      "type": "string"
                    },
                    "modifiedArgs": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "approved"
                  ],
                  "additionalProperties": false
                },
                "fixSessionId": {
                  "type": "string"
                },
                "fixSessionError": {
                  "type": "string"
                },
                "expiresAt": {
                  "type": "number"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  }
                },
                "audit": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "action": {
                        "type": "string",
                        "enum": [
                          "created",
                          "claimed",
                          "approved",
                          "denied",
                          "cancelled",
                          "expired",
                          "updated"
                        ]
                      },
                      "actor": {
                        "type": "string"
                      },
                      "actorSurface": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "note": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "action",
                      "actor",
                      "createdAt"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "id",
                "callId",
                "status",
                "request",
                "createdAt",
                "updatedAt",
                "metadata",
                "audit"
              ],
              "additionalProperties": false
            },
            "createdAt": {
              "type": "number"
            }
          },
          "required": [
            "approval",
            "createdAt"
          ],
          "additionalProperties": false
        }
      },
      {
        "id": "control.heartbeat",
        "title": "Heartbeat",
        "description": "Keepalive event emitted by the SSE control-plane transport.",
        "category": "transport",
        "source": "builtin",
        "transport": [
          "sse",
          "ws"
        ],
        "scopes": [
          "read:events"
        ],
        "wireEvents": [
          "heartbeat"
        ],
        "outputSchema": {
          "type": "object",
          "properties": {
            "clientId": {
              "type": "string"
            },
            "ts": {
              "type": "number"
            }
          },
          "required": [
            "clientId",
            "ts"
          ],
          "additionalProperties": false
        }
      },
      {
        "id": "control.hosted_session_update",
        "title": "Hosted Session Lifecycle Update",
        "description": "Every lifecycle transition of a session whose loop runs INSIDE the daemon: created, attached, detached, turn started, turn ended, terminated, and restored after a restart. The payload carries the whole hosted-session record plus the transition name, the client it is about (attach/detach) and a short detail, so a subscriber renders the change from the event and needs no follow-up read. This channel is LIFECYCLE ONLY. The turn itself, streamed tokens, tool calls, tool results, turn transitions, is already on the `turn` and `tools` runtime domains, stamped with the hosted session id, because a hosted session runs the ordinary orchestrator; a client watches those exactly as it does for a local session and filters on the id it was handed. A second copy of that stream is not published here. Domain-tagged `session`, so a client narrowing with ?domains=… must include `session` to receive it. The record is the daemon's: `effectiveDetachPolicy` says what leaving would do right now, and `terminatedReason` says why a session ended, a hosted session never simply disappears.",
        "category": "transport",
        "source": "builtin",
        "transport": [
          "sse",
          "ws"
        ],
        "scopes": [
          "read:sessions"
        ],
        "domains": [
          "session"
        ],
        "wireEvents": [
          "hosted-session-update"
        ],
        "outputSchema": {
          "type": "object",
          "properties": {
            "event": {
              "type": "string",
              "enum": [
                "hosted-session-created",
                "hosted-session-attached",
                "hosted-session-detached",
                "hosted-session-turn-started",
                "hosted-session-turn-ended",
                "hosted-session-terminated",
                "hosted-session-restored"
              ]
            },
            "session": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "workspaceRoot": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "idle",
                    "running",
                    "terminated"
                  ]
                },
                "detachPolicy": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "kill",
                        "survive"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "effectiveDetachPolicy": {
                  "type": "string",
                  "enum": [
                    "kill",
                    "survive"
                  ]
                },
                "attachedClients": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "providerId": {
                  "type": "string"
                },
                "modelId": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "updatedAt": {
                  "type": "number"
                },
                "turnCount": {
                  "type": "number"
                },
                "messageCount": {
                  "type": "number"
                },
                "lastTurnAt": {
                  "type": "number"
                },
                "terminatedAt": {
                  "type": "number"
                },
                "terminatedReason": {
                  "type": "string"
                },
                "restoredFromDisk": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "workspaceRoot",
                "title",
                "status",
                "detachPolicy",
                "effectiveDetachPolicy",
                "attachedClients",
                "createdAt",
                "updatedAt",
                "turnCount",
                "messageCount",
                "restoredFromDisk"
              ],
              "additionalProperties": false
            },
            "createdAt": {
              "type": "number"
            },
            "clientId": {
              "type": "string"
            },
            "detail": {
              "type": "string"
            }
          },
          "required": [
            "event",
            "session",
            "createdAt"
          ],
          "additionalProperties": false
        }
      },
      {
        "id": "control.ready",
        "title": "Ready Handshake",
        "description": "Initial SSE/WebSocket handshake event emitted after a control-plane subscription is opened.",
        "category": "transport",
        "source": "builtin",
        "transport": [
          "sse",
          "ws"
        ],
        "scopes": [
          "read:events"
        ],
        "wireEvents": [
          "ready"
        ],
        "outputSchema": {
          "type": "object",
          "properties": {
            "clientId": {
              "type": "string"
            },
            "domains": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "transport": {
              "type": "string"
            }
          },
          "required": [
            "clientId",
            "domains",
            "transport"
          ],
          "additionalProperties": false
        }
      },
      {
        "id": "control.session_update",
        "title": "Session Lifecycle Update",
        "description": "Shared-session lifecycle broadcast. Every session created / closed / deleted / reopened / agent-bound / agent-completed / message-appended / message-forwarded / route-attached and every input & follow-up lifecycle transition is published on the single `session-update` wire event; the specific lifecycle name is the discriminated `payload.event` field. Cross-surface invalidation mapping (webui/TUI): created ⇐ session-created; updated ⇐ session-message-appended / session-agent-completed / session-route-attached / session-reopened; steered ⇐ session-input-delivered / session-message-forwarded; closed ⇐ session-closed; deleted ⇐ session-deleted (a hard removal, the record is gone, not merely closed). Domain-tagged `session` (gateway-scope-enforcement.ts EVENT_DOMAIN), the same tag control.hosted_session_update carries: both are session lifecycle, so a client that narrows with ?domains=… must include `session` to receive EITHER of them, and one that opted into no narrowing receives both. It is dropped entirely when the control-plane-gateway flag is turned off (no phantom buffering).",
        "category": "transport",
        "source": "builtin",
        "transport": [
          "sse",
          "ws"
        ],
        "scopes": [
          "read:sessions"
        ],
        "domains": [
          "session"
        ],
        "wireEvents": [
          "session-update"
        ],
        "outputSchema": {
          "type": "object",
          "properties": {
            "event": {
              "type": "string",
              "enum": [
                "session-created",
                "session-closed",
                "session-deleted",
                "session-reopened",
                "session-agent-bound",
                "session-agent-completed",
                "session-message-appended",
                "session-message-forwarded",
                "session-route-attached",
                "session-detached",
                "session-input-queued",
                "session-input-queued-for-surface",
                "session-input-delivered",
                "session-input-spawned",
                "session-input-completed",
                "session-input-failed",
                "session-input-rejected",
                "session-input-cancelled",
                "session-follow-up-queued",
                "session-follow-up-spawned"
              ]
            },
            "payload": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {},
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            },
            "createdAt": {
              "type": "number"
            }
          },
          "required": [
            "event",
            "payload",
            "createdAt"
          ],
          "additionalProperties": false
        }
      },
      {
        "id": "control.surface_message",
        "title": "Surface Message",
        "description": "Out-of-band control-plane surface messages for operators and connected clients.",
        "category": "transport",
        "source": "builtin",
        "transport": [
          "sse",
          "ws"
        ],
        "scopes": [
          "read:events"
        ],
        "wireEvents": [
          "surface-message"
        ],
        "outputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "surface": {
              "type": "string"
            },
            "createdAt": {
              "type": "number"
            },
            "title": {
              "type": "string"
            },
            "body": {
              "type": "string"
            },
            "level": {
              "type": "string",
              "enum": [
                "info",
                "success",
                "warn",
                "error"
              ]
            },
            "routeId": {
              "type": "string"
            },
            "surfaceId": {
              "type": "string"
            },
            "clientId": {
              "type": "string"
            },
            "attachments": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "artifactId": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string"
                  },
                  "mimeType": {
                    "type": "string"
                  },
                  "filename": {
                    "type": "string"
                  },
                  "sizeBytes": {
                    "type": "number"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "createdAt": {
                    "type": "number"
                  },
                  "expiresAt": {
                    "type": "number"
                  },
                  "sourceUri": {
                    "type": "string"
                  },
                  "acquisitionMode": {
                    "type": "string"
                  },
                  "fetchMode": {
                    "type": "string"
                  },
                  "contentPath": {
                    "type": "string"
                  },
                  "contentUrl": {
                    "type": "string"
                  },
                  "dataBase64": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "artifactId",
                  "kind",
                  "mimeType",
                  "sizeBytes",
                  "sha256",
                  "createdAt",
                  "contentPath",
                  "metadata"
                ],
                "additionalProperties": true
              }
            },
            "metadata": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          },
          "required": [
            "id",
            "surface",
            "createdAt",
            "title",
            "body"
          ],
          "additionalProperties": false
        }
      }
    ],
    "schemaCoverage": {
      "methods": 507,
      "typedInputs": 507,
      "genericInputs": 0,
      "typedOutputs": 507,
      "genericOutputs": 0
    },
    "eventCoverage": {
      "events": 35,
      "withDomains": 32,
      "withWireEvents": 35
    },
    "validationCoverage": {
      "methods": 507,
      "validated": 500,
      "skippedGeneric": 0,
      "skippedUntyped": 7
    }
  },
  "peer": {
    "contractPath": "/api/remote/node-host/contract",
    "relationship": "paired device and node-host peers use a separate peer contract surface"
  }
}
