@papi-ai/server 0.7.45 → 0.7.47
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.
- package/dist/backfill-cycle-metrics.js +68 -40
- package/dist/index.js +577 -99
- package/dist/prompts.js +10 -0
- package/package.json +3 -2
package/dist/prompts.js
CHANGED
|
@@ -659,6 +659,14 @@ function buildHandoffsOnlyUserMessage(inputs) {
|
|
|
659
659
|
}
|
|
660
660
|
return parts.join("\n");
|
|
661
661
|
}
|
|
662
|
+
function extractDependencyChain(displayText) {
|
|
663
|
+
const match = displayText.match(
|
|
664
|
+
/^##\s+Dependency Chain[^\n]*\n([\s\S]*?)(?=\n#{2,3}\s|\n-{3,}\s*(?:\n|$)|\n\s*BUILD HANDOFF\b|\n<!--\s*PAPI_STRUCTURED_OUTPUT|$(?![\s\S]))/m
|
|
665
|
+
);
|
|
666
|
+
if (!match) return void 0;
|
|
667
|
+
const body = match[1].trim();
|
|
668
|
+
return body.length > 0 ? body : void 0;
|
|
669
|
+
}
|
|
662
670
|
function parseStructuredOutput(raw) {
|
|
663
671
|
const marker = "<!-- PAPI_STRUCTURED_OUTPUT -->";
|
|
664
672
|
const markerIdx = raw.indexOf(marker);
|
|
@@ -674,6 +682,7 @@ function parseStructuredOutput(raw) {
|
|
|
674
682
|
try {
|
|
675
683
|
const parsed = JSON.parse(jsonMatch[1].trim());
|
|
676
684
|
const data = coerceStructuredOutput(parsed);
|
|
685
|
+
data.dependencyChain = extractDependencyChain(displayText);
|
|
677
686
|
return { displayText, data };
|
|
678
687
|
} catch {
|
|
679
688
|
return { displayText, data: null };
|
|
@@ -1502,6 +1511,7 @@ export {
|
|
|
1502
1511
|
buildReviewSystemPrompt,
|
|
1503
1512
|
buildReviewUserMessage,
|
|
1504
1513
|
buildVisionTasksPrompt,
|
|
1514
|
+
extractDependencyChain,
|
|
1505
1515
|
parseReviewStructuredOutput,
|
|
1506
1516
|
parseStrategyChangeOutput,
|
|
1507
1517
|
parseStructuredOutput
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@papi-ai/server",
|
|
3
|
-
"version": "0.7.
|
|
4
|
-
"description": "PAPI MCP server
|
|
3
|
+
"version": "0.7.47",
|
|
4
|
+
"description": "PAPI MCP server \u2014 AI-powered sprint planning, build execution, and strategy review for software projects",
|
|
5
5
|
"license": "Elastic-2.0",
|
|
6
6
|
"mcpName": "io.github.getpapi/papi",
|
|
7
7
|
"type": "module",
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
54
54
|
"@papi-ai/adapter-md": "^0.2.0",
|
|
55
55
|
"@papi-ai/adapter-pg": "^0.2.0",
|
|
56
|
+
"@papi-ai/shared": "^0.1.0",
|
|
56
57
|
"@papi-ai/skills": "^0.1.0",
|
|
57
58
|
"js-yaml": "^4.1.0"
|
|
58
59
|
},
|