oc-pilot 0.115.1 → 0.117.0

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/mcp.js CHANGED
@@ -1613,6 +1613,34 @@ const TOOLS = [
1613
1613
  },
1614
1614
  },
1615
1615
  },
1616
+ {
1617
+ name: "flight_compare",
1618
+ description: "Compare two flight sessions: event and checkpoint counts, durations, command sequences, exit-code differences and final tree equality.",
1619
+ annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
1620
+ inputSchema: {
1621
+ type: "object",
1622
+ additionalProperties: false,
1623
+ required: ["id", "with"],
1624
+ properties: {
1625
+ id: { type: "string", description: "First flight session id" },
1626
+ with: { type: "string", description: "Second flight session id" },
1627
+ ...RESULT_PROPERTIES,
1628
+ },
1629
+ },
1630
+ },
1631
+ {
1632
+ name: "flight_html",
1633
+ description: "Render a self-contained, redacted HTML timeline for a flight session with checkpoints and command output.",
1634
+ annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
1635
+ inputSchema: {
1636
+ type: "object",
1637
+ additionalProperties: false,
1638
+ properties: {
1639
+ id: { type: "string", description: "Flight session id; defaults to the active flight" },
1640
+ ...RESULT_PROPERTIES,
1641
+ },
1642
+ },
1643
+ },
1616
1644
  {
1617
1645
  name: "flight_export",
1618
1646
  description: "Export a redacted flight bundle with journal, checkpoint patches and a sha256 digest. Needs --allow-write when output is set.",
@@ -4421,6 +4449,18 @@ async function callFlightDiff(input, cwd) {
4421
4449
  args.push("--to", to);
4422
4450
  return toToolResult(await runCli(args, cwd));
4423
4451
  }
4452
+ async function callFlightCompare(input, cwd) {
4453
+ const id = stringArg(input, "id", true);
4454
+ const other = stringArg(input, "with", true);
4455
+ return toToolResult(await runCli(["flight", "compare", id, other, "--json"], cwd));
4456
+ }
4457
+ async function callFlightHtml(input, cwd) {
4458
+ const args = ["flight", "html", "--json"];
4459
+ const id = stringArg(input, "id");
4460
+ if (id)
4461
+ args.push("--id", id);
4462
+ return toToolResult(await runCli(args, cwd));
4463
+ }
4424
4464
  async function callFlightExport(input, cwd) {
4425
4465
  const args = ["flight", "export", "--json"];
4426
4466
  const id = stringArg(input, "id");
@@ -4974,6 +5014,10 @@ async function dispatchTool(name, input, cwd, readOnly) {
4974
5014
  return callFlightBisect(input, cwd);
4975
5015
  case "flight_diff":
4976
5016
  return callFlightDiff(input, cwd);
5017
+ case "flight_compare":
5018
+ return callFlightCompare(input, cwd);
5019
+ case "flight_html":
5020
+ return callFlightHtml(input, cwd);
4977
5021
  case "flight_export":
4978
5022
  return callFlightExport(input, cwd);
4979
5023
  case "beacon":
@@ -5111,10 +5155,23 @@ function summarizeResult(value) {
5111
5155
  const to = value.to;
5112
5156
  return `oc-pilot: flight diff ${typeof from.label === "string" ? from.label : "?"}..${typeof to.label === "string" ? to.label : "?"}`;
5113
5157
  }
5158
+ if (typeof value.id === "string" && typeof value.html === "string") {
5159
+ return `oc-pilot: flight html ${value.id} (${String(value.html.length)} chars)`;
5160
+ }
5114
5161
  if (typeof value.format === "string" && value.format.startsWith("oc-pilot-flight-export/") && typeof value.digest === "string") {
5115
5162
  const checkpoints = Array.isArray(value.checkpoints) ? value.checkpoints.length : 0;
5116
5163
  return `oc-pilot: flight export ${String(checkpoints)} checkpoint(s), ${value.digest.slice(0, 15)}`;
5117
5164
  }
5165
+ if (value.a && typeof value.a === "object" && value.b && typeof value.b === "object" && Array.isArray(value.common)) {
5166
+ const left = value.a;
5167
+ const right = value.b;
5168
+ const leftId = typeof left.id === "string" ? left.id : "unknown";
5169
+ const rightId = typeof right.id === "string" ? right.id : "unknown";
5170
+ const onlyA = Array.isArray(value.onlyA) ? value.onlyA.length : 0;
5171
+ const onlyB = Array.isArray(value.onlyB) ? value.onlyB.length : 0;
5172
+ const tree = value.sameFinalTree === true ? "same tree" : value.sameFinalTree === false ? "different tree" : "no tree";
5173
+ return `oc-pilot: flight compare ${leftId} vs ${rightId}, only A ${String(onlyA)}, only B ${String(onlyB)}, ${tree}`;
5174
+ }
5118
5175
  if (typeof value.active === "boolean") {
5119
5176
  if (value.session && typeof value.session === "object") {
5120
5177
  const session = value.session;