oc-pilot 0.129.0 → 0.131.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
@@ -1703,6 +1703,20 @@ const TOOLS = [
1703
1703
  },
1704
1704
  },
1705
1705
  },
1706
+ {
1707
+ name: "flight_summary",
1708
+ description: "Render a Markdown summary of a flight session: checkpoints, commands with exit codes and duration, chain status.",
1709
+ annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
1710
+ inputSchema: {
1711
+ type: "object",
1712
+ additionalProperties: false,
1713
+ properties: {
1714
+ id: { type: "string", description: "Flight session id; defaults to the active or most recent flight" },
1715
+ bundle: { type: "string", description: "Path to a flight export bundle; summarizes without the local journal" },
1716
+ ...RESULT_PROPERTIES,
1717
+ },
1718
+ },
1719
+ },
1706
1720
  {
1707
1721
  name: "flight_export",
1708
1722
  description: "Export a redacted flight bundle with journal, checkpoint patches and a sha256 digest. Needs --allow-write when output is set.",
@@ -4578,6 +4592,16 @@ async function callFlightRestore(input, cwd) {
4578
4592
  args.push("--dry-run");
4579
4593
  return toToolResult(await runCli(args, cwd));
4580
4594
  }
4595
+ async function callFlightSummary(input, cwd) {
4596
+ const args = ["flight", "summary", "--json"];
4597
+ const id = stringArg(input, "id");
4598
+ if (id)
4599
+ args.push("--id", id);
4600
+ const bundle = stringArg(input, "bundle");
4601
+ if (bundle)
4602
+ args.push("--bundle", bundle);
4603
+ return toToolResult(await runCli(args, cwd));
4604
+ }
4581
4605
  async function callFlightExport(input, cwd) {
4582
4606
  const args = ["flight", "export", "--json"];
4583
4607
  const id = stringArg(input, "id");
@@ -5148,6 +5172,8 @@ async function dispatchTool(name, input, cwd, readOnly) {
5148
5172
  return callFlightCompare(input, cwd);
5149
5173
  case "flight_html":
5150
5174
  return callFlightHtml(input, cwd);
5175
+ case "flight_summary":
5176
+ return callFlightSummary(input, cwd);
5151
5177
  case "flight_stats":
5152
5178
  return callFlightStats(input, cwd);
5153
5179
  case "flight_prune":
@@ -5305,6 +5331,9 @@ function summarizeResult(value) {
5305
5331
  if (typeof value.total === "number" && Array.isArray(value.topCommands)) {
5306
5332
  return `oc-pilot: flight stats ${String(value.total)} session(s), ${String(value.commands ?? 0)} command(s), ${String(value.failedCommands ?? 0)} failed`;
5307
5333
  }
5334
+ if (typeof value.id === "string" && typeof value.markdown === "string") {
5335
+ return `oc-pilot: flight summary ${String(value.id)} ready`;
5336
+ }
5308
5337
  if (typeof value.id === "string" && typeof value.html === "string") {
5309
5338
  return `oc-pilot: flight html ${value.id} (${String(value.html.length)} chars)`;
5310
5339
  }