@papi-ai/server 0.7.42 → 0.7.43
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 +34 -18
- package/dist/index.js +3637 -3635
- package/package.json +1 -1
|
@@ -73,7 +73,7 @@ __export(git_exports, {
|
|
|
73
73
|
taskBranchName: () => taskBranchName,
|
|
74
74
|
withBaseBranchSync: () => withBaseBranchSync
|
|
75
75
|
});
|
|
76
|
-
import { execFileSync } from "child_process";
|
|
76
|
+
import { execFileSync, spawnSync } from "child_process";
|
|
77
77
|
function isGitAvailable() {
|
|
78
78
|
try {
|
|
79
79
|
execFileSync("git", ["--version"], { stdio: "ignore" });
|
|
@@ -317,21 +317,24 @@ function gitPull(cwd) {
|
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
319
|
function gitPush(cwd, branch) {
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
};
|
|
320
|
+
const result = spawnSync("git", ["push", "-u", "origin", branch], {
|
|
321
|
+
cwd,
|
|
322
|
+
encoding: "utf-8",
|
|
323
|
+
timeout: GIT_NETWORK_TIMEOUT_MS
|
|
324
|
+
});
|
|
325
|
+
if (result.error) {
|
|
326
|
+
const msg = result.error.message;
|
|
327
|
+
const isTimeout = msg.includes("ETIMEDOUT") || result.signal === "SIGTERM" || msg.includes("killed");
|
|
328
|
+
return { success: false, pushed: false, message: isTimeout ? "Push timed out after 30s." : `Push failed: ${msg}` };
|
|
329
|
+
}
|
|
330
|
+
const output = `${result.stdout ?? ""}${result.stderr ?? ""}`.trim();
|
|
331
|
+
if (result.status !== 0) {
|
|
332
|
+
return { success: false, pushed: false, message: `Push failed: ${output || `git exited ${result.status}`}` };
|
|
334
333
|
}
|
|
334
|
+
if (/Everything up-to-date/i.test(output)) {
|
|
335
|
+
return { success: true, pushed: false, message: `'${branch}' already up to date on origin \u2014 nothing to push.` };
|
|
336
|
+
}
|
|
337
|
+
return { success: true, pushed: true, message: `Pushed '${branch}' to origin.` };
|
|
335
338
|
}
|
|
336
339
|
function isGhAvailable() {
|
|
337
340
|
try {
|
|
@@ -1573,6 +1576,19 @@ Check PAPI_PROJECT_ID in your .mcp.json config. Find your project ID in the PAPI
|
|
|
1573
1576
|
getStrategyReviews(limit, includeFullAnalysis) {
|
|
1574
1577
|
return this.invoke("getStrategyReviews", [limit, includeFullAnalysis]);
|
|
1575
1578
|
}
|
|
1579
|
+
// --- Strategy Review Agenda (SUP-2026-026 — hosted parity) ---
|
|
1580
|
+
// Present on the pg/md adapters since C302 but never forwarded here, so
|
|
1581
|
+
// `strategy_agenda` failed for every hosted user. The proxy-parity guard missed
|
|
1582
|
+
// it because it only checked forwarded⊆allowed, never pg⊆forwarded (now fixed).
|
|
1583
|
+
addAgendaTopic(input) {
|
|
1584
|
+
return this.invoke("addAgendaTopic", [input]);
|
|
1585
|
+
}
|
|
1586
|
+
getPendingAgendaTopics() {
|
|
1587
|
+
return this.invoke("getPendingAgendaTopics");
|
|
1588
|
+
}
|
|
1589
|
+
markAgendaTopicsAddressed(ids, cycleNumber) {
|
|
1590
|
+
return this.invoke("markAgendaTopicsAddressed", [ids, cycleNumber]);
|
|
1591
|
+
}
|
|
1576
1592
|
// --- Dogfood ---
|
|
1577
1593
|
writeDogfoodEntries(entries) {
|
|
1578
1594
|
return this.invoke("writeDogfoodEntries", [entries]);
|
|
@@ -1811,12 +1827,12 @@ import { pathToFileURL } from "url";
|
|
|
1811
1827
|
import path2 from "path";
|
|
1812
1828
|
import { execSync } from "child_process";
|
|
1813
1829
|
|
|
1814
|
-
//
|
|
1830
|
+
// ../../../../../packages/adapter-md/dist/index.js
|
|
1815
1831
|
import { readFile, writeFile, access } from "fs/promises";
|
|
1816
1832
|
import { randomUUID as randomUUID6 } from "crypto";
|
|
1817
1833
|
import { join } from "path";
|
|
1818
1834
|
|
|
1819
|
-
//
|
|
1835
|
+
// ../../../../../packages/shared/dist/index.js
|
|
1820
1836
|
var VALID_TRANSITIONS = {
|
|
1821
1837
|
"Backlog": ["In Cycle", "Ready", "In Progress", "Blocked", "Cancelled", "Deferred", "Done"],
|
|
1822
1838
|
"In Cycle": ["In Progress", "Backlog", "Blocked", "Cancelled"],
|
|
@@ -1835,7 +1851,7 @@ function isLiveDecision(d) {
|
|
|
1835
1851
|
return true;
|
|
1836
1852
|
}
|
|
1837
1853
|
|
|
1838
|
-
//
|
|
1854
|
+
// ../../../../../packages/adapter-md/dist/index.js
|
|
1839
1855
|
import { randomUUID } from "crypto";
|
|
1840
1856
|
import { randomUUID as randomUUID3 } from "crypto";
|
|
1841
1857
|
import yaml from "js-yaml";
|