{
  "name": "appschat-minikit",
  "version": "0.1.0",
  "source": "createAgentGenerationPack().context.apis",
  "formatVersion": 1,
  "apis": {
    "ac.getStorage": {
      "name": "ac.getStorage",
      "description": "Read a value from host-scoped mini app storage.",
      "permission": null,
      "params": {
        "type": "object",
        "required": [
          "key"
        ],
        "properties": {
          "key": {
            "type": "string"
          }
        }
      },
      "returns": {
        "description": "Stored JSON-compatible value or null."
      },
      "errors": [],
      "examples": []
    },
    "ac.setStorage": {
      "name": "ac.setStorage",
      "description": "Write a JSON-compatible value to host-scoped mini app storage.",
      "permission": null,
      "params": {
        "type": "object",
        "required": [
          "key",
          "value"
        ],
        "properties": {
          "key": {
            "type": "string"
          },
          "value": {
            "description": "JSON-compatible value."
          }
        }
      },
      "returns": {
        "type": "boolean"
      },
      "errors": [],
      "examples": []
    },
    "ac.removeStorage": {
      "name": "ac.removeStorage",
      "description": "Remove a value from host-scoped mini app storage.",
      "permission": null,
      "params": {
        "type": "object",
        "required": [
          "key"
        ],
        "properties": {
          "key": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "boolean"
      },
      "errors": [],
      "examples": []
    },
    "ac.clearStorage": {
      "name": "ac.clearStorage",
      "description": "Clear host-scoped mini app storage.",
      "permission": null,
      "params": {
        "type": "object",
        "properties": {}
      },
      "returns": {
        "type": "boolean"
      },
      "errors": [],
      "examples": []
    },
    "ac.getSystemInfo": {
      "name": "ac.getSystemInfo",
      "description": "Read basic host platform and user agent information.",
      "permission": null,
      "params": {
        "type": "object",
        "properties": {}
      },
      "returns": {
        "type": "object",
        "properties": {
          "platform": {
            "type": "string"
          },
          "userAgent": {
            "type": "string"
          }
        }
      },
      "errors": [],
      "examples": []
    },
    "ac.showToast": {
      "name": "ac.showToast",
      "description": "Show a short host toast message.",
      "permission": "ui",
      "params": {
        "type": "object",
        "required": [
          "title"
        ],
        "properties": {
          "title": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        }
      },
      "errors": [],
      "examples": []
    },
    "ac.request": {
      "name": "ac.request",
      "description": "Send an HTTP request through the host network proxy.",
      "permission": "network",
      "params": {
        "type": "object",
        "required": [
          "url"
        ],
        "properties": {
          "url": {
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "data": {},
          "header": {
            "type": "object"
          },
          "timeout": {
            "type": "number"
          },
          "dataType": {
            "type": "string"
          },
          "responseType": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number"
          },
          "data": {},
          "header": {
            "type": "object"
          },
          "cookies": {
            "type": "array"
          }
        }
      },
      "errors": [],
      "examples": []
    },
    "ac.uploadFile": {
      "name": "ac.uploadFile",
      "description": "Upload a Blob or MiniKit virtual file through the host network proxy.",
      "permission": "network",
      "params": {
        "type": "object",
        "required": [
          "url",
          "name"
        ],
        "properties": {
          "url": {
            "type": "string"
          },
          "filePath": {
            "type": "string"
          },
          "file": {},
          "name": {
            "type": "string"
          },
          "formData": {
            "type": "object"
          },
          "header": {
            "type": "object"
          },
          "timeout": {
            "type": "number"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.downloadFile": {
      "name": "ac.downloadFile",
      "description": "Download a file through the host network proxy and store it as a temp:// file.",
      "permission": "network",
      "params": {
        "type": "object",
        "required": [
          "url"
        ],
        "properties": {
          "url": {
            "type": "string"
          },
          "header": {
            "type": "object"
          },
          "timeout": {
            "type": "number"
          }
        }
      },
      "returns": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number"
          },
          "tempFilePath": {
            "type": "string"
          },
          "header": {
            "type": "object"
          }
        }
      },
      "errors": [],
      "examples": []
    },
    "ac.hideToast": {
      "name": "ac.hideToast",
      "description": "Hide the current host toast.",
      "permission": "ui",
      "params": {
        "type": "object"
      },
      "returns": {
        "type": "boolean"
      },
      "errors": [],
      "examples": []
    },
    "ac.showLoading": {
      "name": "ac.showLoading",
      "description": "Show a host loading indicator.",
      "permission": "ui",
      "params": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "mask": {
            "type": "boolean"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.hideLoading": {
      "name": "ac.hideLoading",
      "description": "Hide the current host loading indicator.",
      "permission": "ui",
      "params": {
        "type": "object"
      },
      "returns": {
        "type": "boolean"
      },
      "errors": [],
      "examples": []
    },
    "ac.showModal": {
      "name": "ac.showModal",
      "description": "Show a host modal dialog.",
      "permission": "ui",
      "params": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "showCancel": {
            "type": "boolean"
          },
          "cancelText": {
            "type": "string"
          },
          "confirmText": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.showActionSheet": {
      "name": "ac.showActionSheet",
      "description": "Show a host action sheet.",
      "permission": "ui",
      "params": {
        "type": "object",
        "required": [
          "itemList"
        ],
        "properties": {
          "itemList": {
            "type": "array"
          },
          "itemColor": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.setNavigationBarTitle": {
      "name": "ac.setNavigationBarTitle",
      "description": "Set the host navigation bar title.",
      "permission": "ui",
      "params": {
        "type": "object",
        "required": [
          "title"
        ],
        "properties": {
          "title": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "boolean"
      },
      "errors": [],
      "examples": []
    },
    "ac.setNavigationBarColor": {
      "name": "ac.setNavigationBarColor",
      "description": "Set the host navigation bar colors.",
      "permission": "ui",
      "params": {
        "type": "object",
        "properties": {
          "frontColor": {
            "type": "string"
          },
          "backgroundColor": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "boolean"
      },
      "errors": [],
      "examples": []
    },
    "ac.getSetting": {
      "name": "ac.getSetting",
      "description": "Read runtime authorization settings for declared permissions.",
      "permission": null,
      "params": {
        "type": "object"
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.authorize": {
      "name": "ac.authorize",
      "description": "Ask the host policy to authorize a declared permission.",
      "permission": null,
      "params": {
        "type": "object",
        "properties": {
          "permission": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.openSetting": {
      "name": "ac.openSetting",
      "description": "Open or read host permission settings.",
      "permission": null,
      "params": {
        "type": "object",
        "properties": {
          "permissions": {
            "type": "array"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.saveFile": {
      "name": "ac.saveFile",
      "description": "Persist a temp:// file, Blob, or dataUrl as a saved:// file.",
      "permission": "file",
      "params": {
        "type": "object"
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.getFileInfo": {
      "name": "ac.getFileInfo",
      "description": "Read metadata and optional digest for a MiniKit virtual file.",
      "permission": "file",
      "params": {
        "type": "object",
        "required": [
          "filePath"
        ],
        "properties": {
          "filePath": {
            "type": "string"
          },
          "digestAlgorithm": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.getSavedFileList": {
      "name": "ac.getSavedFileList",
      "description": "List saved:// files in the MiniKit file registry.",
      "permission": "file",
      "params": {
        "type": "object"
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.removeSavedFile": {
      "name": "ac.removeSavedFile",
      "description": "Remove a saved:// file.",
      "permission": "file",
      "params": {
        "type": "object",
        "required": [
          "filePath"
        ],
        "properties": {
          "filePath": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "boolean"
      },
      "errors": [],
      "examples": []
    },
    "ac.readFile": {
      "name": "ac.readFile",
      "description": "Read a temp:// or saved:// file.",
      "permission": "file",
      "params": {
        "type": "object",
        "required": [
          "filePath"
        ],
        "properties": {
          "filePath": {
            "type": "string"
          },
          "encoding": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.writeFile": {
      "name": "ac.writeFile",
      "description": "Write data into a saved:// file.",
      "permission": "file",
      "params": {
        "type": "object"
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.openDocument": {
      "name": "ac.openDocument",
      "description": "Ask the host to open a MiniKit virtual file.",
      "permission": "file",
      "params": {
        "type": "object",
        "required": [
          "filePath"
        ],
        "properties": {
          "filePath": {
            "type": "string"
          },
          "fileType": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.getLocation": {
      "name": "ac.getLocation",
      "description": "Read the current device location.",
      "permission": "location",
      "params": {
        "type": "object"
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.chooseLocation": {
      "name": "ac.chooseLocation",
      "description": "Ask the host to choose a location.",
      "permission": "location",
      "params": {
        "type": "object"
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.startLocationUpdate": {
      "name": "ac.startLocationUpdate",
      "description": "Start host location updates.",
      "permission": "location",
      "params": {
        "type": "object"
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.stopLocationUpdate": {
      "name": "ac.stopLocationUpdate",
      "description": "Stop host location updates.",
      "permission": "location",
      "params": {
        "type": "object"
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.chooseMedia": {
      "name": "ac.chooseMedia",
      "description": "Ask the host to choose image/video media.",
      "permission": "media",
      "params": {
        "type": "object"
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.previewImage": {
      "name": "ac.previewImage",
      "description": "Ask the host to preview one or more images.",
      "permission": "media",
      "params": {
        "type": "object",
        "required": [
          "urls"
        ],
        "properties": {
          "urls": {
            "type": "array"
          },
          "current": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.previewMedia": {
      "name": "ac.previewMedia",
      "description": "Ask the host to preview image/video media.",
      "permission": "media",
      "params": {
        "type": "object",
        "required": [
          "sources"
        ],
        "properties": {
          "sources": {
            "type": "array"
          },
          "current": {
            "type": "number"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.saveImageToPhotosAlbum": {
      "name": "ac.saveImageToPhotosAlbum",
      "description": "Save an image file to the host photo album.",
      "permission": "media",
      "params": {
        "type": "object",
        "required": [
          "filePath"
        ],
        "properties": {
          "filePath": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.saveVideoToPhotosAlbum": {
      "name": "ac.saveVideoToPhotosAlbum",
      "description": "Save a video file to the host photo album.",
      "permission": "media",
      "params": {
        "type": "object",
        "required": [
          "filePath"
        ],
        "properties": {
          "filePath": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.setClipboardData": {
      "name": "ac.setClipboardData",
      "description": "Write text to the host clipboard.",
      "permission": "clipboard",
      "params": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.getClipboardData": {
      "name": "ac.getClipboardData",
      "description": "Read text from the host clipboard.",
      "permission": "clipboard",
      "params": {
        "type": "object"
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.setClipboardImage": {
      "name": "ac.setClipboardImage",
      "description": "Write an image dataUrl, Blob, or temp file to the host clipboard.",
      "permission": "clipboard",
      "params": {
        "type": "object",
        "properties": {
          "dataUrl": {
            "type": "string"
          },
          "filePath": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.getDeviceInfo": {
      "name": "ac.getDeviceInfo",
      "description": "Read basic host device information.",
      "permission": null,
      "params": {
        "type": "object"
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.getWindowInfo": {
      "name": "ac.getWindowInfo",
      "description": "Read host viewport/window information.",
      "permission": null,
      "params": {
        "type": "object"
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.getNetworkType": {
      "name": "ac.getNetworkType",
      "description": "Read current host network type.",
      "permission": null,
      "params": {
        "type": "object"
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.onNetworkStatusChange": {
      "name": "ac.onNetworkStatusChange",
      "description": "Subscribe to host network status changes.",
      "permission": null,
      "params": {
        "type": "object"
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.offNetworkStatusChange": {
      "name": "ac.offNetworkStatusChange",
      "description": "Unsubscribe from host network status changes.",
      "permission": null,
      "params": {
        "type": "object"
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.shareAppMessage": {
      "name": "ac.shareAppMessage",
      "description": "Ask the host to share the current mini app.",
      "permission": "share",
      "params": {
        "type": "object"
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.showShareMenu": {
      "name": "ac.showShareMenu",
      "description": "Show host share menu affordances.",
      "permission": "share",
      "params": {
        "type": "object"
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.hideShareMenu": {
      "name": "ac.hideShareMenu",
      "description": "Hide host share menu affordances.",
      "permission": "share",
      "params": {
        "type": "object"
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.scanCode": {
      "name": "ac.scanCode",
      "description": "Ask the host scanner to scan a QR/bar code.",
      "permission": "scan",
      "params": {
        "type": "object"
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.connectSocket": {
      "name": "ac.connectSocket",
      "description": "Open a host WebSocket connection.",
      "permission": "socket",
      "params": {
        "type": "object",
        "required": [
          "url"
        ],
        "properties": {
          "url": {
            "type": "string"
          },
          "header": {
            "type": "object"
          },
          "protocols": {
            "type": "array"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.requestStream": {
      "name": "ac.requestStream",
      "description": "Open a host streamed HTTP request.",
      "permission": "stream",
      "params": {
        "type": "object",
        "required": [
          "url"
        ],
        "properties": {
          "url": {
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "data": {},
          "header": {
            "type": "object"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.getUserProfile": {
      "name": "ac.getUserProfile",
      "description": "Read the signed-in AppsChat user's public profile from the host.",
      "permission": "profile",
      "params": {
        "type": "object",
        "properties": {}
      },
      "returns": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "nickname": {
            "type": "string"
          },
          "avatarUrl": {
            "type": "string"
          },
          "locale": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          }
        }
      },
      "errors": [],
      "examples": []
    },
    "ac.getAppContext": {
      "name": "ac.getAppContext",
      "description": "Read the AppsChat-scoped context for the current mini app installation.",
      "permission": "ac.getAppContext",
      "params": {
        "type": "object",
        "properties": {}
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.openChat": {
      "name": "ac.openChat",
      "description": "Open the AppsChat conversation for the current mini app installation.",
      "permission": "ac.openChat",
      "params": {
        "type": "object",
        "properties": {}
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.sendChat": {
      "name": "ac.sendChat",
      "description": "Queue a user message in the AppsChat conversation for the current mini app installation.",
      "permission": "ac.sendChat",
      "params": {
        "type": "object",
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string"
          },
          "context": {
            "type": "object"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.openMiniApp": {
      "name": "ac.openMiniApp",
      "description": "Ask the AppsChat host to open the current MiniApp or a target MiniApp from a component card.",
      "permission": "ac.openMiniApp",
      "params": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "component": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.emitComponentEvent": {
      "name": "ac.emitComponentEvent",
      "description": "Emit an auditable event from a component card to the host.",
      "permission": "ac.emitComponentEvent",
      "params": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "detail": {
            "type": "object"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.requestComponentResize": {
      "name": "ac.requestComponentResize",
      "description": "Request a bounded height update for the current component card.",
      "permission": "ac.requestComponentResize",
      "params": {
        "type": "object",
        "required": [
          "height"
        ],
        "properties": {
          "height": {
            "type": "number"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.readMemory": {
      "name": "ac.readMemory",
      "description": "Read memories scoped to the current AppsChat user, mini app, and installation.",
      "permission": "ac.readMemory",
      "params": {
        "type": "object",
        "properties": {}
      },
      "returns": {
        "type": "array"
      },
      "errors": [],
      "examples": []
    },
    "ac.writeMemory": {
      "name": "ac.writeMemory",
      "description": "Write a memory scoped to the current AppsChat user, mini app, and installation.",
      "permission": "ac.writeMemory",
      "params": {
        "type": "object",
        "required": [
          "content"
        ],
        "properties": {
          "title": {
            "type": "string"
          },
          "content": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.developer.getUserProfile": {
      "name": "ac.developer.getUserProfile",
      "description": "Read the current developer user's profile. Reserved for the official developer assistant MiniApp.",
      "permission": "developer",
      "params": {
        "type": "object",
        "properties": {}
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.developer.getManagementToken": {
      "name": "ac.developer.getManagementToken",
      "description": "Read the current developer management token record without returning the secret token.",
      "permission": "developer",
      "params": {
        "type": "object",
        "properties": {}
      },
      "returns": {
        "type": "object",
        "properties": {
          "record": {
            "type": "object"
          }
        }
      },
      "errors": [],
      "examples": []
    },
    "ac.developer.createManagementToken": {
      "name": "ac.developer.createManagementToken",
      "description": "Create a developer management token. The secret token is returned only in this creation response.",
      "permission": "developer",
      "params": {
        "type": "object",
        "properties": {
          "expiresAt": {
            "type": "string"
          },
          "expires_at": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string"
          },
          "record": {
            "type": "object"
          },
          "managementUrl": {
            "type": "string"
          }
        }
      },
      "errors": [],
      "examples": []
    },
    "ac.developer.createManagementLink": {
      "name": "ac.developer.createManagementLink",
      "description": "Create or refresh a developer management link for the current developer token record.",
      "permission": "developer",
      "params": {
        "type": "object",
        "properties": {}
      },
      "returns": {
        "type": "object",
        "properties": {
          "managementUrl": {
            "type": "string"
          }
        }
      },
      "errors": [],
      "examples": []
    },
    "ac.developer.createMiniApp": {
      "name": "ac.developer.createMiniApp",
      "description": "Create a MiniApp owned by the current developer.",
      "permission": "developer",
      "params": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "appId": {
            "type": "string"
          },
          "app_id": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "published"
            ]
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.developer.listMiniApps": {
      "name": "ac.developer.listMiniApps",
      "description": "List MiniApps owned by the current developer.",
      "permission": "developer",
      "params": {
        "type": "object",
        "properties": {}
      },
      "returns": {
        "type": "array"
      },
      "errors": [],
      "examples": []
    },
    "ac.developer.getMiniApp": {
      "name": "ac.developer.getMiniApp",
      "description": "Read one MiniApp owned by the current developer, including versions when the host supports it.",
      "permission": "developer",
      "params": {
        "type": "object",
        "required": [
          "miniappId"
        ],
        "properties": {
          "miniappId": {
            "type": "string"
          },
          "miniapp_id": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.developer.updateMiniApp": {
      "name": "ac.developer.updateMiniApp",
      "description": "Update base metadata for a MiniApp owned by the current developer.",
      "permission": "developer",
      "params": {
        "type": "object",
        "required": [
          "miniappId"
        ],
        "properties": {
          "miniappId": {
            "type": "string"
          },
          "miniapp_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "published"
            ]
          },
          "avatar": {
            "type": "string"
          },
          "avatarUrl": {
            "type": "string"
          },
          "avatar_url": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.developer.publishMiniAppVersion": {
      "name": "ac.developer.publishMiniAppVersion",
      "description": "Publish or import a MiniApp package version from an uploaded package file.",
      "permission": "developer",
      "params": {
        "type": "object",
        "required": [
          "storedFileId"
        ],
        "properties": {
          "storedFileId": {
            "type": "string"
          },
          "stored_file_id": {
            "type": "string"
          },
          "miniappId": {
            "type": "string"
          },
          "miniapp_id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "publish": {
            "type": "boolean"
          },
          "force": {
            "type": "boolean"
          }
        }
      },
      "returns": {
        "type": "object",
        "properties": {
          "miniapp": {
            "type": "object"
          },
          "version": {
            "type": "object"
          },
          "created": {
            "type": "boolean"
          },
          "published": {
            "type": "boolean"
          }
        }
      },
      "errors": [],
      "examples": []
    },
    "ac.developer.getMiniAppVersion": {
      "name": "ac.developer.getMiniAppVersion",
      "description": "Read one uploaded MiniApp package version owned by the current developer.",
      "permission": "developer",
      "params": {
        "type": "object",
        "required": [
          "miniappId",
          "versionId"
        ],
        "properties": {
          "miniappId": {
            "type": "string"
          },
          "miniapp_id": {
            "type": "string"
          },
          "versionId": {
            "type": "string"
          },
          "version_id": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.developer.deleteMiniAppVersion": {
      "name": "ac.developer.deleteMiniAppVersion",
      "description": "Delete an uploaded MiniApp package version owned by the current developer when the host allows deletion.",
      "permission": "developer",
      "params": {
        "type": "object",
        "required": [
          "miniappId",
          "versionId"
        ],
        "properties": {
          "miniappId": {
            "type": "string"
          },
          "miniapp_id": {
            "type": "string"
          },
          "versionId": {
            "type": "string"
          },
          "version_id": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.developer.listBuildRequests": {
      "name": "ac.developer.listBuildRequests",
      "description": "List MiniApp build requests owned by the current developer.",
      "permission": "developer",
      "params": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "array"
      },
      "errors": [],
      "examples": []
    },
    "ac.developer.createBuildRequest": {
      "name": "ac.developer.createBuildRequest",
      "description": "Create an AI MiniApp build request owned by the current developer.",
      "permission": "developer",
      "params": {
        "type": "object",
        "required": [
          "prompt"
        ],
        "properties": {
          "prompt": {
            "type": "string"
          },
          "sourceInstallationId": {
            "type": "string"
          },
          "source_installation_id": {
            "type": "string"
          },
          "template": {
            "type": "string"
          },
          "permissions": {
            "type": "array"
          },
          "targetAudience": {
            "type": "string"
          },
          "target_audience": {
            "type": "string"
          },
          "scenario": {
            "type": "string"
          },
          "manifestDraft": {
            "type": "object"
          },
          "manifest_draft": {
            "type": "object"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.developer.getToken": {
      "name": "ac.developer.getToken",
      "description": "Alias of ac.developer.getManagementToken for existing developer assistants.",
      "permission": "developer",
      "params": {
        "type": "object",
        "properties": {}
      },
      "returns": {
        "type": "object",
        "properties": {
          "record": {
            "type": "object"
          }
        }
      },
      "errors": [],
      "examples": []
    },
    "ac.developer.createToken": {
      "name": "ac.developer.createToken",
      "description": "Alias of ac.developer.createManagementToken for existing developer assistants.",
      "permission": "developer",
      "params": {
        "type": "object",
        "properties": {
          "expiresAt": {
            "type": "string"
          },
          "expires_at": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string"
          },
          "record": {
            "type": "object"
          },
          "managementUrl": {
            "type": "string"
          }
        }
      },
      "errors": [],
      "examples": []
    },
    "ac.developer.revokeToken": {
      "name": "ac.developer.revokeToken",
      "description": "Revoke the current developer management token.",
      "permission": "developer",
      "params": {
        "type": "object",
        "properties": {}
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.developer.installMiniApp": {
      "name": "ac.developer.installMiniApp",
      "description": "Install or upgrade a MiniApp version for testing.",
      "permission": "developer",
      "params": {
        "type": "object",
        "required": [
          "miniappId"
        ],
        "properties": {
          "miniappId": {
            "type": "string"
          },
          "miniapp_id": {
            "type": "string"
          },
          "versionId": {
            "type": "string"
          },
          "version_id": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.developer.openMiniApp": {
      "name": "ac.developer.openMiniApp",
      "description": "Open an installed MiniApp or install then open a target MiniApp for testing.",
      "permission": "developer",
      "params": {
        "type": "object",
        "properties": {
          "installationId": {
            "type": "string"
          },
          "installation_id": {
            "type": "string"
          },
          "miniappId": {
            "type": "string"
          },
          "miniapp_id": {
            "type": "string"
          },
          "versionId": {
            "type": "string"
          },
          "version_id": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.navigateTo": {
      "name": "ac.navigateTo",
      "description": "Navigate to a mini app page and push it onto the page stack.",
      "permission": null,
      "params": {
        "type": "object",
        "required": [
          "url"
        ],
        "properties": {
          "url": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.redirectTo": {
      "name": "ac.redirectTo",
      "description": "Replace the current mini app page with another page.",
      "permission": null,
      "params": {
        "type": "object",
        "required": [
          "url"
        ],
        "properties": {
          "url": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.navigateBack": {
      "name": "ac.navigateBack",
      "description": "Close pages in the mini app page stack.",
      "permission": null,
      "params": {
        "type": "object",
        "properties": {
          "delta": {
            "type": "number"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.getCurrentPages": {
      "name": "ac.getCurrentPages",
      "description": "Read the current mini app page stack.",
      "permission": null,
      "params": {
        "type": "object",
        "properties": {}
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.pageScrollTo": {
      "name": "ac.pageScrollTo",
      "description": "Scroll the current mini app page by scrollTop or selector.",
      "permission": null,
      "params": {
        "type": "object",
        "properties": {
          "scrollTop": {
            "type": "number"
          },
          "selector": {
            "type": "string"
          },
          "duration": {
            "type": "number"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.startPullDownRefresh": {
      "name": "ac.startPullDownRefresh",
      "description": "Programmatically trigger pull-down refresh for the current page.",
      "permission": null,
      "params": {
        "type": "object",
        "properties": {}
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.stopPullDownRefresh": {
      "name": "ac.stopPullDownRefresh",
      "description": "Stop the current page pull-down refresh indicator.",
      "permission": null,
      "params": {
        "type": "object",
        "properties": {}
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.openExternal": {
      "name": "ac.openExternal",
      "description": "Ask the host to open an external URL outside the mini app router.",
      "permission": "navigation",
      "params": {
        "type": "object",
        "required": [
          "url"
        ],
        "properties": {
          "url": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "boolean"
      },
      "errors": [],
      "examples": []
    },
    "ac.drawCanvas": {
      "name": "ac.drawCanvas",
      "description": "Draw a command list onto a mini canvas by canvasId.",
      "permission": null,
      "params": {
        "type": "object",
        "required": [
          "canvasId",
          "commands"
        ],
        "properties": {
          "canvasId": {
            "type": "string"
          },
          "commands": {
            "type": "array"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.clearCanvas": {
      "name": "ac.clearCanvas",
      "description": "Clear a mini canvas.",
      "permission": null,
      "params": {
        "type": "object",
        "required": [
          "canvasId"
        ],
        "properties": {
          "canvasId": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.measureCanvasText": {
      "name": "ac.measureCanvasText",
      "description": "Measure text with the canvas 2D context.",
      "permission": null,
      "params": {
        "type": "object",
        "required": [
          "canvasId",
          "text"
        ],
        "properties": {
          "canvasId": {
            "type": "string"
          },
          "text": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.canvasToTempFilePath": {
      "name": "ac.canvasToTempFilePath",
      "description": "Export a canvas to a temporary image URL or data URL.",
      "permission": null,
      "params": {
        "type": "object",
        "required": [
          "canvasId"
        ],
        "properties": {
          "canvasId": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.renderMermaid": {
      "name": "ac.renderMermaid",
      "description": "Render Mermaid diagram code to sanitized SVG for diagram-view.",
      "permission": null,
      "params": {
        "type": "object",
        "required": [
          "code"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "diagramId": {
            "type": "string"
          },
          "config": {
            "type": "object"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.captureNode": {
      "name": "ac.captureNode",
      "description": "Export a rendered mini component node, diagram, or canvas to a temporary image URL/data URL.",
      "permission": null,
      "params": {
        "type": "object",
        "properties": {
          "selector": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "diagramId": {
            "type": "string"
          },
          "canvasId": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "quality": {
            "type": "number"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.playMedia": {
      "name": "ac.playMedia",
      "description": "Play a video or audio element by id/mediaId.",
      "permission": "media",
      "params": {
        "type": "object",
        "required": [
          "mediaId"
        ],
        "properties": {
          "mediaId": {
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.pauseMedia": {
      "name": "ac.pauseMedia",
      "description": "Pause a video or audio element by id/mediaId.",
      "permission": "media",
      "params": {
        "type": "object",
        "required": [
          "mediaId"
        ],
        "properties": {
          "mediaId": {
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.seekMedia": {
      "name": "ac.seekMedia",
      "description": "Seek a video or audio element by id/mediaId.",
      "permission": "media",
      "params": {
        "type": "object",
        "required": [
          "mediaId",
          "position"
        ],
        "properties": {
          "mediaId": {
            "type": "string"
          },
          "position": {
            "type": "number"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.getMediaInfo": {
      "name": "ac.getMediaInfo",
      "description": "Read playback state for a video or audio element.",
      "permission": "media",
      "params": {
        "type": "object",
        "required": [
          "mediaId"
        ],
        "properties": {
          "mediaId": {
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.startCameraPreview": {
      "name": "ac.startCameraPreview",
      "description": "Start host camera preview for a camera component.",
      "permission": "camera",
      "params": {
        "type": "object",
        "properties": {
          "devicePosition": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.stopCameraPreview": {
      "name": "ac.stopCameraPreview",
      "description": "Stop host camera preview.",
      "permission": "camera",
      "params": {
        "type": "object",
        "properties": {}
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.captureCamera": {
      "name": "ac.captureCamera",
      "description": "Capture an image from the host camera provider.",
      "permission": "camera",
      "params": {
        "type": "object",
        "properties": {
          "devicePosition": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.getMapCenterLocation": {
      "name": "ac.getMapCenterLocation",
      "description": "Read the current center location from the host map provider.",
      "permission": "map",
      "params": {
        "type": "object",
        "properties": {
          "mapId": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.moveMapToLocation": {
      "name": "ac.moveMapToLocation",
      "description": "Move the map camera to a latitude/longitude.",
      "permission": "map",
      "params": {
        "type": "object",
        "properties": {
          "latitude": {
            "type": "number"
          },
          "longitude": {
            "type": "number"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.includeMapPoints": {
      "name": "ac.includeMapPoints",
      "description": "Adjust the map viewport to include points.",
      "permission": "map",
      "params": {
        "type": "object",
        "properties": {
          "points": {
            "type": "array"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    },
    "ac.openLocation": {
      "name": "ac.openLocation",
      "description": "Open a location in the host map provider.",
      "permission": "map",
      "params": {
        "type": "object",
        "properties": {
          "latitude": {
            "type": "number"
          },
          "longitude": {
            "type": "number"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "returns": {
        "type": "object"
      },
      "errors": [],
      "examples": []
    }
  }
}
