← Back to Gene Catalog

gene-local-adaptive-optimizer

Native agent.orchestration

Local adaptive optimizer: Fitness, S/A/B/C grades, and declarative recommendations from aggregated de-identified metrics (no network, no FS in-WASM). Host companion applies policy. Full product spec: local-adaptive-self-evolution-scheme.md. 本地自适应:根据宿主聚合的脱敏指标计算 Fitness、S/A/B/C 分级与声明式优化建议 JSON;执行与快照由伴生完成。完整方案见同目录 local-adaptive-self-evolution-scheme.md。

README

No documentation yet.

Gene authors can add a README when publishing.

Phenotype

Input

PropertyType Req Description
weights object 可选;省略则使用 MVP 默认 W1..W5
requestId string 宿主生成的请求 ID(与对话内容无关)
geneMetrics array 各业务基因一条聚合记录,字段均在 [0,1](rate 与归一化项)
aggregatedAt string ISO-8601 聚合时间

Output

PropertyType Req
perGene array
requestId string
disclaimer string
weightsUsed object
schemaVersion string
Raw JSON Schema

inputSchema

{
  "type": "object",
  "required": [
    "requestId",
    "aggregatedAt"
  ],
  "properties": {
    "weights": {
      "type": "object",
      "properties": {
        "W1": {
          "type": "number"
        },
        "W2": {
          "type": "number"
        },
        "W3": {
          "type": "number"
        },
        "W4": {
          "type": "number"
        },
        "W5": {
          "type": "number"
        }
      },
      "description": "可选;省略则使用 MVP 默认 W1..W5"
    },
    "requestId": {
      "type": "string",
      "description": "宿主生成的请求 ID(与对话内容无关)"
    },
    "geneMetrics": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "geneId",
          "R_pass",
          "R_modify",
          "R_error",
          "normLatency",
          "normTokenCost"
        ],
        "properties": {
          "R_pass": {
            "type": "number"
          },
          "geneId": {
            "type": "string"
          },
          "R_error": {
            "type": "number"
          },
          "R_modify": {
            "type": "number"
          },
          "normLatency": {
            "type": "number"
          },
          "normTokenCost": {
            "type": "number"
          }
        }
      },
      "description": "各业务基因一条聚合记录,字段均在 [0,1](rate 与归一化项)"
    },
    "aggregatedAt": {
      "type": "string",
      "description": "ISO-8601 聚合时间"
    }
  }
}

outputSchema

{
  "type": "object",
  "required": [
    "requestId",
    "schemaVersion",
    "weightsUsed",
    "perGene",
    "disclaimer"
  ],
  "properties": {
    "perGene": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "grade": {
            "type": "string"
          },
          "geneId": {
            "type": "string"
          },
          "fitness01": {
            "type": "number"
          },
          "rawFitness": {
            "type": "number"
          },
          "recommendations": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    },
    "requestId": {
      "type": "string"
    },
    "disclaimer": {
      "type": "string"
    },
    "weightsUsed": {
      "type": "object"
    },
    "schemaVersion": {
      "type": "string"
    }
  }
}