papayu/docs/papa_yu_response_schema.json
Yuriy e76236dc55 Initial commit: papa-yu v2.4.4
- Schema version (x_schema_version, schema_hash) в prompt/trace
- Кеш read/search/logs/env (ContextCache) в plan-цикле
- Контекст-диета: MAX_FILES=8, MAX_FILE_CHARS=20k, MAX_TOTAL_CHARS=120k
- Plan→Apply двухфазность, NO_CHANGES, path sanitization
- Protected paths, content validation, EOL normalization
- Trace (PAPAYU_TRACE), redaction (PAPAYU_TRACE_RAW)
- Preview diff, undo/redo, transactional apply

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-01-31 11:33:19 +03:00

93 lines
3.3 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"name": "papa_yu_response",
"description": "JSON Schema для response_format LLM (OpenAI Responses API, строгий JSON-вывод). Принимает: массив actions ИЛИ объект с полями.",
"schema": {
"oneOf": [
{
"type": "array",
"description": "Прямой массив действий (обратная совместимость)",
"items": { "$ref": "#/$defs/action" },
"minItems": 0
},
{
"type": "object",
"description": "Объект Fix-plan: actions, summary, context_requests, memory_patch",
"additionalProperties": true,
"properties": {
"mode": {
"type": "string",
"enum": ["fix-plan", "apply"],
"description": "Опционально: fix-plan = план без изменений, apply = план с действиями"
},
"actions": {
"type": "array",
"items": { "$ref": "#/$defs/action" }
},
"proposed_changes": {
"type": "object",
"additionalProperties": true,
"properties": {
"actions": {
"type": "array",
"items": { "$ref": "#/$defs/action" }
}
}
},
"summary": { "type": "string" },
"questions": { "type": "array", "items": { "type": "string" } },
"context_requests": {
"type": "array",
"items": { "$ref": "#/$defs/context_request" }
},
"plan": {
"type": "array",
"items": {
"type": "object",
"properties": { "step": { "type": "string" }, "details": { "type": "string" } }
}
},
"memory_patch": {
"type": "object",
"additionalProperties": true,
"description": "Только ключи из whitelist: user.*, project.*"
},
"risks": { "type": "array", "items": { "type": "string" } }
}
}
],
"$defs": {
"action": {
"type": "object",
"additionalProperties": true,
"required": ["kind", "path"],
"properties": {
"kind": {
"type": "string",
"enum": ["CREATE_FILE", "CREATE_DIR", "UPDATE_FILE", "DELETE_FILE", "DELETE_DIR"]
},
"path": { "type": "string" },
"content": {
"type": "string",
"description": "Обязательно для CREATE_FILE и UPDATE_FILE"
}
}
},
"context_request": {
"type": "object",
"additionalProperties": true,
"required": ["type"],
"properties": {
"type": { "type": "string", "enum": ["read_file", "search", "logs", "env"] },
"path": { "type": "string" },
"start_line": { "type": "integer", "minimum": 1 },
"end_line": { "type": "integer", "minimum": 1 },
"query": { "type": "string" },
"glob": { "type": "string" },
"source": { "type": "string" },
"last_n": { "type": "integer", "minimum": 1, "maximum": 5000 }
}
}
}
}
}