Skip to content

WorkBuddy、CodeBuddy 桌面端增强助手:签到猫猫旅行成长计划查询、多账号独立备份、点切即用;免打扰模式让 AI 无人值守跑长任务;跨账号会话迁移、异常中断自动续接;暂存/快捷提示词;毛玻璃主题与更多实用功能。

4.2 KB
Raw Blame
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:workdaddy:automation-package:v1",
  "title": "WorkDaddy automation package v1",
  "$comment": "The executable task is also checked by validateTask; input defaults/enums are checked against their declared type. The preview runtime is authoritative for compatibility.",
  "type": "object",
  "required": [
    "kind",
    "formatVersion",
    "id",
    "version",
    "name",
    "requires",
    "task"
  ],
  "properties": {
    "kind": {
      "const": "workdaddy.automation-package"
    },
    "formatVersion": {
      "const": 1
    },
    "id": {
      "type": "string",
      "maxLength": 160,
      "pattern": "^[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*)+$"
    },
    "version": {
      "type": "string",
      "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$"
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "description": {
      "type": "string",
      "maxLength": 1000
    },
    "author": {
      "type": "string",
      "maxLength": 200
    },
    "license": {
      "type": "string",
      "maxLength": 100
    },
    "tags": {
      "type": "array",
      "maxItems": 20,
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200
      }
    },
    "requires": {
      "type": "object",
      "required": [
        "minWorkDaddyVersion",
        "taskSchemaVersion",
        "capabilities"
      ],
      "properties": {
        "minWorkDaddyVersion": {
          "type": "string",
          "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$"
        },
        "taskSchemaVersion": {
          "type": "integer",
          "minimum": 1
        },
        "capabilities": {
          "type": "array",
          "maxItems": 100,
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "profiles": {
          "type": "array",
          "maxItems": 100,
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "platforms": {
          "type": "array",
          "maxItems": 100,
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        }
      },
      "patternProperties": {
        "^x-[a-z0-9][a-z0-9.-]*$": {}
      },
      "additionalProperties": false
    },
    "inputs": {
      "type": "object",
      "maxProperties": 40,
      "propertyNames": {
        "allOf": [
          {
            "pattern": "^[A-Za-z_][\\w-]{0,79}$"
          },
          {
            "not": {
              "enum": [
                "__proto__",
                "constructor",
                "prototype"
              ]
            }
          }
        ]
      },
      "additionalProperties": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "enum": [
              "string",
              "number",
              "integer",
              "boolean"
            ]
          },
          "title": {
            "type": "string",
            "maxLength": 500
          },
          "description": {
            "type": "string",
            "maxLength": 500
          },
          "required": {
            "type": "boolean"
          },
          "default": {
            "type": [
              "string",
              "number",
              "boolean"
            ]
          },
          "enum": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "items": {
              "type": [
                "string",
                "number",
                "boolean"
              ]
            }
          }
        },
        "patternProperties": {
          "^x-[a-z0-9][a-z0-9.-]*$": {}
        },
        "additionalProperties": false
      }
    },
    "task": {
      "type": "object",
      "properties": {
        "schemaVersion": {
          "type": "integer",
          "minimum": 1
        }
      },
      "not": {
        "required": [
          "requires"
        ]
      }
    }
  },
  "patternProperties": {
    "^x-[a-z0-9][a-z0-9.-]*$": {}
  },
  "additionalProperties": false
}