Configuration File
File Naming
Fixed as config.json .
File Content
A typical extension configuration file is shown as follows:
{
"name": "MyExtension",
"author": "Your Name",
"type": "generalService",
"scriptLang": "python",
"description": "My Demo Extension",
"version": "1.0",
"entry": "app.py",
"url": ""
}Field Description
name
Extension name, serves as the unique identifier for the extension. It is recommended to use English and ensure this name is unique within the extension system.
- Type: string
- Example:
"MyExtension"
type
Extension type, specifies the functional category of the extension. Includes:
"generalService": General Service extension.
"easyService": Easy Service extension
"webMiniProgram": Web Mini Program extension
Type: string
Example:
"generalService"
scriptLang
The programming language used by the extension. Currently only supports:
- "python"
description
A brief description of the extension, helping users understand the functionality and purpose of the extension.
- Type: string
- Example:
"My Demo Extension"
version
Extension version number, it is recommended to use common semantic versioning (SemVer) format: major.minor.patch .
- Type: string
- Example:
"1.0"
author
The name of the extension author or team.
- Type: string
- Example:
"agilebot"
contact
Contact information for the extension author, used as a communication channel when users encounter issues while using the extension.
- Type: string
- Example:
"support@example.com"
copyright
Copyright information for the extension, declaring the copyright ownership of the extension.
- Type: string
- Example:
"Copyright © 2024 Agilebot Inc."
license
License information for the extension, describing the terms and conditions for using the extension.
- Type: string
- Example:
"MIT"
entry
Entry file for General Service extensions, this is usually a Python script file.
- Type: string
- Example:
"app.py"
url
Entry file for Web pages, suitable for Web Mini Programs or General Services , this is usually an HTML web page file or web route address.
- Type: string
- Example:
"index.html"
Intelligent Prompts
We use JSON Schema to standardize the extension configuration file format. Through JSON Schema, you can clearly specify the structure, field types, required fields, and other information of extension configurations, ensuring that extension configuration files comply with specifications. This makes the extension development and installation process simpler and more reliable.
You can install JSON Schema through package management tools:
npm install @agilebot/extension-schemasyarn add @agilebot/extension-schemaspnpm add @agilebot/extension-schemasAfter installation, you can reference the extension configuration file in your project:
{
"$schema": "./node_modules/@agilebot/extension-schemas/v1.0/extension-schema.json"
}You can also use unpkg CDN for reference, as shown below:
{
"$schema": "https://unpkg.com/@agilebot/extension-schemas/v1.0/extension-schema.json"
}