pdd-cli 0.0.118__py3-none-any.whl → 0.0.121__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pdd/__init__.py +1 -1
- pdd/agentic_bug_orchestrator.py +15 -6
- pdd/agentic_change_orchestrator.py +18 -7
- pdd/agentic_common.py +68 -40
- pdd/agentic_crash.py +2 -1
- pdd/agentic_e2e_fix_orchestrator.py +165 -9
- pdd/agentic_update.py +2 -1
- pdd/agentic_verify.py +3 -2
- pdd/auto_include.py +51 -0
- pdd/commands/analysis.py +32 -25
- pdd/commands/connect.py +69 -1
- pdd/commands/fix.py +31 -13
- pdd/commands/generate.py +5 -0
- pdd/commands/modify.py +47 -11
- pdd/commands/utility.py +12 -7
- pdd/core/cli.py +17 -4
- pdd/core/dump.py +68 -20
- pdd/fix_main.py +4 -2
- pdd/frontend/dist/assets/index-CUWd8al1.js +450 -0
- pdd/frontend/dist/index.html +1 -1
- pdd/llm_invoke.py +82 -12
- pdd/operation_log.py +342 -0
- pdd/postprocess.py +122 -100
- pdd/prompts/agentic_change_step12_create_pr_LLM.prompt +11 -2
- pdd/prompts/generate_test_LLM.prompt +0 -1
- pdd/prompts/generate_test_from_example_LLM.prompt +251 -0
- pdd/prompts/prompt_code_diff_LLM.prompt +29 -25
- pdd/server/routes/prompts.py +26 -1
- pdd/server/terminal_spawner.py +15 -7
- pdd/sync_orchestration.py +164 -147
- pdd/sync_order.py +304 -0
- pdd/update_main.py +48 -24
- {pdd_cli-0.0.118.dist-info → pdd_cli-0.0.121.dist-info}/METADATA +3 -3
- {pdd_cli-0.0.118.dist-info → pdd_cli-0.0.121.dist-info}/RECORD +37 -35
- pdd/frontend/dist/assets/index-DQ3wkeQ2.js +0 -449
- {pdd_cli-0.0.118.dist-info → pdd_cli-0.0.121.dist-info}/WHEEL +0 -0
- {pdd_cli-0.0.118.dist-info → pdd_cli-0.0.121.dist-info}/entry_points.txt +0 -0
- {pdd_cli-0.0.118.dist-info → pdd_cli-0.0.121.dist-info}/licenses/LICENSE +0 -0
- {pdd_cli-0.0.118.dist-info → pdd_cli-0.0.121.dist-info}/top_level.txt +0 -0
pdd/server/routes/prompts.py
CHANGED
|
@@ -774,15 +774,38 @@ async def analyze_diff(request: DiffAnalysisRequest):
|
|
|
774
774
|
"required": ["id", "promptRange", "status", "matchConfidence", "semanticLabel", "notes"]
|
|
775
775
|
}
|
|
776
776
|
|
|
777
|
+
# Schema for hiddenKnowledge items
|
|
778
|
+
hidden_knowledge_schema = {
|
|
779
|
+
"type": "object",
|
|
780
|
+
"properties": {
|
|
781
|
+
"type": {"type": "string", "enum": ["magic_value", "algorithm_choice", "edge_case", "error_handling", "api_contract", "optimization", "business_logic", "assumption"]},
|
|
782
|
+
"location": {
|
|
783
|
+
"type": "object",
|
|
784
|
+
"properties": {
|
|
785
|
+
"startLine": {"type": "integer"},
|
|
786
|
+
"endLine": {"type": "integer"}
|
|
787
|
+
},
|
|
788
|
+
"required": ["startLine", "endLine"]
|
|
789
|
+
},
|
|
790
|
+
"description": {"type": "string"},
|
|
791
|
+
"regenerationImpact": {"type": "string", "enum": ["would_differ", "would_fail", "might_work"]},
|
|
792
|
+
"suggestedPromptAddition": {"type": "string"}
|
|
793
|
+
},
|
|
794
|
+
"required": ["type", "location", "description", "regenerationImpact", "suggestedPromptAddition"]
|
|
795
|
+
}
|
|
796
|
+
|
|
777
797
|
output_schema = {
|
|
778
798
|
"type": "object",
|
|
779
799
|
"properties": {
|
|
780
800
|
"overallScore": {"type": "integer", "minimum": 0, "maximum": 100},
|
|
781
801
|
"promptToCodeScore": {"type": "integer", "minimum": 0, "maximum": 100},
|
|
782
802
|
"codeToPromptScore": {"type": "integer", "minimum": 0, "maximum": 100},
|
|
803
|
+
"canRegenerate": {"type": "boolean"},
|
|
804
|
+
"regenerationRisk": {"type": "string", "enum": ["low", "medium", "high", "critical"]},
|
|
783
805
|
"summary": {"type": "string"},
|
|
784
806
|
"sections": {"type": "array", "items": section_schema},
|
|
785
807
|
"codeSections": {"type": "array", "items": section_schema},
|
|
808
|
+
"hiddenKnowledge": {"type": "array", "items": hidden_knowledge_schema},
|
|
786
809
|
"lineMappings": {
|
|
787
810
|
"type": "array",
|
|
788
811
|
"items": {
|
|
@@ -805,7 +828,9 @@ async def analyze_diff(request: DiffAnalysisRequest):
|
|
|
805
828
|
"documentedFeatures": {"type": "integer"},
|
|
806
829
|
"undocumentedFeatures": {"type": "integer"},
|
|
807
830
|
"promptToCodeCoverage": {"type": "number"},
|
|
808
|
-
"codeToPromptCoverage": {"type": "number"}
|
|
831
|
+
"codeToPromptCoverage": {"type": "number"},
|
|
832
|
+
"hiddenKnowledgeCount": {"type": "integer"},
|
|
833
|
+
"criticalGaps": {"type": "integer"}
|
|
809
834
|
},
|
|
810
835
|
"required": ["totalRequirements", "matchedRequirements", "missingRequirements", "promptToCodeCoverage"]
|
|
811
836
|
},
|
pdd/server/terminal_spawner.py
CHANGED
|
@@ -77,16 +77,22 @@ class TerminalSpawner:
|
|
|
77
77
|
if job_id:
|
|
78
78
|
callback_section = f'''
|
|
79
79
|
# Report completion to server (must complete before exec bash)
|
|
80
|
+
EXIT_CODE=${{EXIT_CODE:-0}}
|
|
81
|
+
if [ "$EXIT_CODE" -eq 0 ]; then
|
|
82
|
+
SUCCESS_JSON="true"
|
|
83
|
+
else
|
|
84
|
+
SUCCESS_JSON="false"
|
|
85
|
+
fi
|
|
80
86
|
echo "[DEBUG] Sending callback to http://localhost:{server_port}/api/v1/commands/spawned-jobs/{job_id}/complete"
|
|
81
|
-
echo "[DEBUG] Payload: {{\\"success\\":
|
|
87
|
+
echo "[DEBUG] Payload: {{\\"success\\": $SUCCESS_JSON, \\"exit_code\\": $EXIT_CODE}}"
|
|
82
88
|
CURL_RESPONSE=$(curl -s -w "\\n[HTTP_STATUS:%{{http_code}}]" -X POST "http://localhost:{server_port}/api/v1/commands/spawned-jobs/{job_id}/complete" \\
|
|
83
89
|
-H "Content-Type: application/json" \\
|
|
84
|
-
-d
|
|
90
|
+
-d "{{\\"success\\": $SUCCESS_JSON, \\"exit_code\\": $EXIT_CODE}}" 2>&1)
|
|
85
91
|
echo "[DEBUG] Curl response: $CURL_RESPONSE"
|
|
86
92
|
|
|
87
93
|
# Show result to user
|
|
88
94
|
echo ""
|
|
89
|
-
if [ $EXIT_CODE -eq 0 ]; then
|
|
95
|
+
if [ "$EXIT_CODE" -eq 0 ]; then
|
|
90
96
|
echo -e "\\033[32m✓ Command completed successfully\\033[0m"
|
|
91
97
|
else
|
|
92
98
|
echo -e "\\033[31m✗ Command failed (exit code: $EXIT_CODE)\\033[0m"
|
|
@@ -131,13 +137,15 @@ exec bash
|
|
|
131
137
|
if job_id:
|
|
132
138
|
callback_cmd = f'''
|
|
133
139
|
EXIT_CODE=$?
|
|
140
|
+
EXIT_CODE=${{EXIT_CODE:-0}}
|
|
141
|
+
if [ "$EXIT_CODE" -eq 0 ]; then SUCCESS_JSON="true"; else SUCCESS_JSON="false"; fi
|
|
134
142
|
echo "[DEBUG] Sending callback to http://localhost:{server_port}/api/v1/commands/spawned-jobs/{job_id}/complete"
|
|
135
|
-
CURL_RESPONSE=$(curl -s -w "\\n[HTTP_STATUS:%{{http_code}}]" -X POST "http://localhost:{server_port}/api/v1/commands/spawned-jobs/{job_id}/complete"
|
|
136
|
-
-H "Content-Type: application/json"
|
|
137
|
-
-d
|
|
143
|
+
CURL_RESPONSE=$(curl -s -w "\\n[HTTP_STATUS:%{{http_code}}]" -X POST "http://localhost:{server_port}/api/v1/commands/spawned-jobs/{job_id}/complete" \\
|
|
144
|
+
-H "Content-Type: application/json" \\
|
|
145
|
+
-d "{{\\"success\\": $SUCCESS_JSON, \\"exit_code\\": $EXIT_CODE}}" 2>&1)
|
|
138
146
|
echo "[DEBUG] Curl response: $CURL_RESPONSE"
|
|
139
147
|
echo ""
|
|
140
|
-
if [ $EXIT_CODE -eq 0 ]; then echo -e "\\033[32m✓ Command completed successfully\\033[0m"; else echo -e "\\033[31m✗ Command failed (exit code: $EXIT_CODE)\\033[0m"; fi
|
|
148
|
+
if [ "$EXIT_CODE" -eq 0 ]; then echo -e "\\033[32m✓ Command completed successfully\\033[0m"; else echo -e "\\033[31m✗ Command failed (exit code: $EXIT_CODE)\\033[0m"; fi
|
|
141
149
|
'''
|
|
142
150
|
full_cmd = f"{command}; {callback_cmd}; exec bash"
|
|
143
151
|
else:
|