@papi-ai/server 0.7.58 → 0.7.59

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.
Files changed (2) hide show
  1. package/dist/index.js +24 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -21863,6 +21863,11 @@ var buildExecuteTool = {
21863
21863
  description: 'IDs of cycle_learnings this build directly resolves or acts on. Use when the BUILD HANDOFF references a prior learning entry (e.g. "addresses learning abc-123"). Links the learning to this task as action_taken=task_created.',
21864
21864
  items: { type: "string" }
21865
21865
  },
21866
+ fixed_issues: {
21867
+ type: "array",
21868
+ description: `cycle_learnings UUIDs of discovered issues this build FIXED. Stamps resolved_at (via the existing discovered_issue_resolve path) so the hub's "What PAPI caught" surface counts them as fixed on the caught\u2192fixed ledger \u2014 triage-and-fix at build time, no separate tool call. Distinct from resolves_learnings, which only LINKS a learning to this task without closing it. Best-effort and idempotent.`,
21869
+ items: { type: "string" }
21870
+ },
21866
21871
  production_verification: {
21867
21872
  type: "object",
21868
21873
  description: "Required when the branch diff touches a trigger surface (install snippets, MCP transport, auth/middleware, OAuth well-known, vercel.json, supabase functions, Dockerfile, Procfile, env declarations). Record exactly what you verified against the live deploy. http_status MUST be 2xx \u2014 non-2xx rejects the build. Server inspects the diff and enforces this, so passing it on non-trigger tasks is harmless but unnecessary.",
@@ -22063,6 +22068,10 @@ async function handleBuildExecute(adapter2, config2, args, clientName) {
22063
22068
  }
22064
22069
  const tracker = new ProgressTracker("start_build").bindStream(adapter2, { stage: "build", taskId });
22065
22070
  try {
22071
+ const scopeTask = await adapter2.getTask(taskId).catch(() => null);
22072
+ if (scopeTask) {
22073
+ tracker.setStreamScope({ taskId: scopeTask.displayId ?? scopeTask.id, cycle: scopeTask.cycle ?? null });
22074
+ }
22066
22075
  await tracker.recordStep("started");
22067
22076
  const result = await startBuild(adapter2, config2, taskId, { light }, clientName);
22068
22077
  tracker.setStreamScope({ taskId: result.task.displayId ?? result.task.id, cycle: result.task.cycle ?? null });
@@ -22175,6 +22184,7 @@ async function handleExecuteComplete(adapter2, config2, taskId, args, light = fa
22175
22184
  const deadEnds = args.dead_ends;
22176
22185
  const rawBriefImplications = args.brief_implications;
22177
22186
  const resolvesLearnings = Array.isArray(args.resolves_learnings) ? args.resolves_learnings : void 0;
22187
+ const fixedIssues = Array.isArray(args.fixed_issues) ? args.fixed_issues : void 0;
22178
22188
  const rawPreview = args.preview;
22179
22189
  const preview = rawPreview ? {
22180
22190
  urls: Array.isArray(rawPreview.urls) ? rawPreview.urls.filter((u) => typeof u === "string") : void 0,
@@ -22261,6 +22271,16 @@ async function handleExecuteComplete(adapter2, config2, taskId, args, light = fa
22261
22271
  metadata: { learningsLinkedCount: result.learningsLinkedCount }
22262
22272
  });
22263
22273
  }
22274
+ let fixedResolvedCount = 0;
22275
+ if (fixedIssues && fixedIssues.length > 0 && typeof adapter2.markCycleLearningResolved === "function") {
22276
+ for (const learningId of fixedIssues) {
22277
+ try {
22278
+ await adapter2.markCycleLearningResolved(learningId, clientName);
22279
+ fixedResolvedCount++;
22280
+ } catch {
22281
+ }
22282
+ }
22283
+ }
22264
22284
  await tracker.recordStep("moving-to-review", {
22265
22285
  metadata: { status: result.task.status }
22266
22286
  });
@@ -22286,7 +22306,10 @@ async function handleExecuteComplete(adapter2, config2, taskId, args, light = fa
22286
22306
  batchRollupNote = "";
22287
22307
  }
22288
22308
  }
22289
- return textResponse(formatCompleteResult(result) + docsNote + batchRollupNote);
22309
+ const fixedNote = fixedResolvedCount > 0 ? `
22310
+
22311
+ \u2705 Marked ${fixedResolvedCount} discovered issue(s) FIXED \u2014 resolved_at stamped, now counted as fixed on the hub's caught\u2192fixed ledger.` : "";
22312
+ return textResponse(formatCompleteResult(result) + fixedNote + docsNote + batchRollupNote);
22290
22313
  } catch (err) {
22291
22314
  const message = err instanceof Error ? err.message : String(err);
22292
22315
  if (isBuildPushError(err)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@papi-ai/server",
3
- "version": "0.7.58",
3
+ "version": "0.7.59",
4
4
  "description": "PAPI MCP server — 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",