aps-agent/shared/schemas/intent.schema.json

125 lines
4.2 KiB
JSON
Raw Normal View History

2026-07-21 11:05:57 +08:00
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "aps://shared/intent",
"title": "IntentResult",
"description": "意图识别结果:两级管线(规则快路/LLM)的统一输出(plan.md §9.6)。LLM 输出必须符合此 Schema,否则降级。",
"type": "object",
"required": ["intent", "confidence"],
"properties": {
"interfaceVersion": { "description": "跨层契约版本", "type": "string", "const": "1.0", "default": "1.0" },
2026-07-21 11:05:57 +08:00
"intent": {
"description": "意图名(封闭枚举,与 server.contracts.IntentName 同步)",
2026-07-21 11:05:57 +08:00
"type": "string",
"enum": [
"schedule.run",
"schedule.publish",
"order.upsert",
"order.cancel",
"order.complete",
"order.delete",
"order.clear",
"order.submit",
"order.approve",
"order.reject",
"order.pool",
"rush.evaluate",
"rush.apply",
"forecast.query",
"forecast.upsert",
"forecast.delete",
"forecast.convert",
"plan.buckets",
"plan.rccp",
"plan.feasibility",
"plan.inventory",
"plan.leveling",
"plan.supply",
"order.decompose",
"mrp.release",
"plan.trace",
"master.material.upsert",
"master.changeover.upsert",
"master.clear",
"master.query",
"changeover.query",
"campaign.preview",
"params.update",
"params.query",
"constraint.profile.query",
"constraint.profile.save",
"data.import",
"import.commit",
"folder.analyze",
"folder.schedule",
"flex.site.load",
"flex.schedule",
"flex.reschedule",
"flex.swap",
"flex.capacity",
"flex.simulate_due",
"flex.compare",
"flex.rush",
"flex.fault",
"flex.resource.patch",
"flex.conflict.resolve",
"conflict.list",
"flex.adjust.preview",
"flex.adjust.commit",
"schedule.adjust.preview",
"schedule.adjust.commit",
"sap.status",
"sap.sync.inbound",
"sap.sync.outbound",
"mes.status",
"mes.dispatch",
"mes.report",
2026-07-21 11:05:57 +08:00
"scenario.compare",
"scenario.sensitivity",
"sop.compile",
"sop.apply",
2026-07-21 11:05:57 +08:00
"knowledge.query",
"knowledge.import",
"skill.list",
"skill.health",
"skill.register",
"skill.enable",
"readiness.query",
"data.analyze",
"assistant.reply",
"flex.time.update",
"schedule.wizard",
"guidance.next",
2026-07-21 11:05:57 +08:00
"report.generate",
"checkpoint.create",
"checkpoint.rollback",
"viewport.mode",
"viewport.filter",
"viewport.focus",
"viewport.highlight",
"viewport.timescale",
"viewport.reset",
"query.kpi",
"data.reset",
"help",
"unknown"
]
},
"params": {
"description": "槽位参数(按意图而异)",
"type": "object",
"properties": {
"strategy": { "description": "排产策略模板", "type": "string", "enum": ["DELIVERY_FIRST", "CAPACITY_BALANCE", "COST_FIRST", "FIFO", "COMPREHENSIVE"] },
"engine": { "description": "引擎类型", "type": "string", "enum": ["RULE", "CP", "GA", "HYBRID", "EXTERNAL"] },
"mode": { "description": "视图模式", "type": "string", "enum": ["gantt", "load", "due", "flex", "pool", "kpi", "compare", "util", "plan"] },
2026-07-21 11:05:57 +08:00
"type": { "description": "过滤类型", "type": "string", "enum": ["vip", "customer"] },
"name": { "description": "过滤客户名", "type": "string" },
"lineCode": { "description": "聚焦产线编码(如 L001)", "type": "string" },
"what": { "description": "高亮目标", "type": "string", "enum": ["overdue", "conflict"] },
"scale": { "description": "时间粒度", "type": "string", "enum": ["day", "hour"] }
}
},
"confidence": { "description": "置信度 0-1:<0.5 拒识,0.5-0.85 需澄清,>0.85 直接执行", "type": "number", "minimum": 0, "maximum": 1 },
"source": { "description": "产生来源:规则快路 / LLM", "type": "string", "enum": ["RULE_FAST", "LLM"] }
}
}