- Мульти-провайдер: PAPAYU_LLM_PROVIDERS — сбор планов от нескольких ИИ (Claude, OpenAI), агрегация - Тренды дизайна и иконок: вкладка в модалке, поиск по безопасным доменам (Tavily include_domains) - Snyk Code: PAPAYU_SNYK_SYNC, REST API issues → snyk_findings в agent-sync - Documatic: architecture_summary из .papa-yu/architecture.md в agent-sync - Личная автоматизация: capability personal-automation (терминал git/npm/cargo, открытие URL) - agent_sync расширен: snyk_findings, architecture_summary; analyze_project_cmd и run_batch пишут sync - Документация: SNYK_AND_DOCUMATIC_SYNC.md, SECURITY_AND_PERSONAL_AUTOMATION.md, обновлён CLAUDE_AND_AGENT_SYNC Co-authored-by: Cursor <cursoragent@cursor.com>
237 lines
7.2 KiB
JSON
237 lines
7.2 KiB
JSON
{
|
|
"x_schema_version": 3,
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "papa-yu llm plan response schema v3",
|
|
"oneOf": [
|
|
{
|
|
"type": "array",
|
|
"items": { "$ref": "#/$defs/action" },
|
|
"maxItems": 200
|
|
},
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"actions": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/$defs/action" },
|
|
"maxItems": 200
|
|
},
|
|
"proposed_changes": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"actions": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/$defs/action" },
|
|
"maxItems": 200
|
|
}
|
|
}
|
|
},
|
|
"summary": {
|
|
"type": "string",
|
|
"maxLength": 8000
|
|
},
|
|
"memory_patch": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"user.preferred_style": { "type": "string", "maxLength": 64 },
|
|
"user.ask_budget": { "type": "string", "maxLength": 64 },
|
|
"user.risk_tolerance": { "type": "string", "maxLength": 64 },
|
|
"user.default_language": { "type": "string", "maxLength": 32 },
|
|
"user.output_format": { "type": "string", "maxLength": 32 },
|
|
"project.default_test_command": { "type": "string", "maxLength": 256 },
|
|
"project.default_lint_command": { "type": "string", "maxLength": 256 },
|
|
"project.default_format_command": { "type": "string", "maxLength": 256 },
|
|
"project.package_manager": { "type": "string", "maxLength": 64 },
|
|
"project.build_command": { "type": "string", "maxLength": 256 },
|
|
"project.src_roots": {
|
|
"type": "array",
|
|
"items": { "type": "string", "maxLength": 256 },
|
|
"maxItems": 32
|
|
},
|
|
"project.test_roots": {
|
|
"type": "array",
|
|
"items": { "type": "string", "maxLength": 256 },
|
|
"maxItems": 32
|
|
},
|
|
"project.ci_notes": { "type": "string", "maxLength": 2000 }
|
|
}
|
|
},
|
|
"context_requests": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/$defs/context_request" },
|
|
"maxItems": 64
|
|
}
|
|
},
|
|
"anyOf": [
|
|
{ "required": ["actions"] },
|
|
{ "required": ["proposed_changes"] }
|
|
]
|
|
}
|
|
],
|
|
"$defs": {
|
|
"action": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["kind", "path"],
|
|
"properties": {
|
|
"kind": {
|
|
"type": "string",
|
|
"enum": [
|
|
"CREATE_FILE",
|
|
"CREATE_DIR",
|
|
"UPDATE_FILE",
|
|
"DELETE_FILE",
|
|
"DELETE_DIR",
|
|
"PATCH_FILE",
|
|
"EDIT_FILE"
|
|
]
|
|
},
|
|
"path": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 240
|
|
},
|
|
"content": {
|
|
"type": "string",
|
|
"maxLength": 1200000
|
|
},
|
|
"patch": {
|
|
"type": "string",
|
|
"maxLength": 1200000
|
|
},
|
|
"base_sha256": {
|
|
"type": "string",
|
|
"pattern": "^[0-9a-f]{64}$"
|
|
},
|
|
"edits": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"maxItems": 50,
|
|
"items": { "$ref": "#/$defs/edit_op" }
|
|
}
|
|
},
|
|
"allOf": [
|
|
{
|
|
"if": { "properties": { "kind": { "const": "CREATE_DIR" } } },
|
|
"then": {
|
|
"not": {
|
|
"anyOf": [
|
|
{ "required": ["content"] },
|
|
{ "required": ["patch"] },
|
|
{ "required": ["base_sha256"] },
|
|
{ "required": ["edits"] }
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": { "properties": { "kind": { "const": "CREATE_FILE" } } },
|
|
"then": { "required": ["content"] }
|
|
},
|
|
{
|
|
"if": { "properties": { "kind": { "const": "UPDATE_FILE" } } },
|
|
"then": { "required": ["content"] }
|
|
},
|
|
{
|
|
"if": { "properties": { "kind": { "const": "DELETE_FILE" } } },
|
|
"then": {
|
|
"not": {
|
|
"anyOf": [
|
|
{ "required": ["content"] },
|
|
{ "required": ["patch"] },
|
|
{ "required": ["base_sha256"] },
|
|
{ "required": ["edits"] }
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": { "properties": { "kind": { "const": "DELETE_DIR" } } },
|
|
"then": {
|
|
"not": {
|
|
"anyOf": [
|
|
{ "required": ["content"] },
|
|
{ "required": ["patch"] },
|
|
{ "required": ["base_sha256"] },
|
|
{ "required": ["edits"] }
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": { "properties": { "kind": { "const": "PATCH_FILE" } } },
|
|
"then": {
|
|
"required": ["patch", "base_sha256"],
|
|
"not": {
|
|
"anyOf": [
|
|
{ "required": ["content"] },
|
|
{ "required": ["edits"] }
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": { "properties": { "kind": { "const": "EDIT_FILE" } } },
|
|
"then": {
|
|
"required": ["base_sha256", "edits"],
|
|
"not": {
|
|
"anyOf": [
|
|
{ "required": ["content"] },
|
|
{ "required": ["patch"] }
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"edit_op": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["op", "anchor", "before", "after"],
|
|
"properties": {
|
|
"op": { "type": "string", "enum": ["replace"] },
|
|
"anchor": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
"before": { "type": "string", "minLength": 1, "maxLength": 50000 },
|
|
"after": { "type": "string", "minLength": 0, "maxLength": 50000 },
|
|
"occurrence": { "type": "integer", "minimum": 1, "maximum": 1000 },
|
|
"context_lines": { "type": "integer", "minimum": 0, "maximum": 3 }
|
|
}
|
|
},
|
|
"context_request": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["type"],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["read_file", "search", "logs", "env"]
|
|
},
|
|
"path": { "type": "string", "maxLength": 240 },
|
|
"start_line": { "type": "integer", "minimum": 1, "maximum": 2000000 },
|
|
"end_line": { "type": "integer", "minimum": 1, "maximum": 2000000 },
|
|
"query": { "type": "string", "maxLength": 2000 },
|
|
"glob": { "type": "string", "maxLength": 512 },
|
|
"source": { "type": "string", "maxLength": 64 },
|
|
"last_n": { "type": "integer", "minimum": 1, "maximum": 500000 }
|
|
},
|
|
"allOf": [
|
|
{
|
|
"if": { "properties": { "type": { "const": "read_file" } } },
|
|
"then": { "required": ["path"] }
|
|
},
|
|
{
|
|
"if": { "properties": { "type": { "const": "search" } } },
|
|
"then": { "required": ["query"] }
|
|
},
|
|
{
|
|
"if": { "properties": { "type": { "const": "logs" } } },
|
|
"then": { "required": ["source"] }
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|