oc-pilot 0.116.0 → 0.118.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
@@ -1628,6 +1628,31 @@ const TOOLS = [
1628
1628
  },
1629
1629
  },
1630
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
+ },
1644
+ {
1645
+ name: "flight_stats",
1646
+ description: "Aggregate stats across flight sessions: total, active and ended sessions, events, commands, checkpoints, failed commands, duration and top commands.",
1647
+ annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
1648
+ inputSchema: {
1649
+ type: "object",
1650
+ additionalProperties: false,
1651
+ properties: {
1652
+ ...RESULT_PROPERTIES,
1653
+ },
1654
+ },
1655
+ },
1631
1656
  {
1632
1657
  name: "flight_export",
1633
1658
  description: "Export a redacted flight bundle with journal, checkpoint patches and a sha256 digest. Needs --allow-write when output is set.",
@@ -4441,6 +4466,16 @@ async function callFlightCompare(input, cwd) {
4441
4466
  const other = stringArg(input, "with", true);
4442
4467
  return toToolResult(await runCli(["flight", "compare", id, other, "--json"], cwd));
4443
4468
  }
4469
+ async function callFlightHtml(input, cwd) {
4470
+ const args = ["flight", "html", "--json"];
4471
+ const id = stringArg(input, "id");
4472
+ if (id)
4473
+ args.push("--id", id);
4474
+ return toToolResult(await runCli(args, cwd));
4475
+ }
4476
+ async function callFlightStats(_input, cwd) {
4477
+ return toToolResult(await runCli(["flight", "stats", "--json"], cwd));
4478
+ }
4444
4479
  async function callFlightExport(input, cwd) {
4445
4480
  const args = ["flight", "export", "--json"];
4446
4481
  const id = stringArg(input, "id");
@@ -4996,6 +5031,10 @@ async function dispatchTool(name, input, cwd, readOnly) {
4996
5031
  return callFlightDiff(input, cwd);
4997
5032
  case "flight_compare":
4998
5033
  return callFlightCompare(input, cwd);
5034
+ case "flight_html":
5035
+ return callFlightHtml(input, cwd);
5036
+ case "flight_stats":
5037
+ return callFlightStats(input, cwd);
4999
5038
  case "flight_export":
5000
5039
  return callFlightExport(input, cwd);
5001
5040
  case "beacon":
@@ -5133,6 +5172,12 @@ function summarizeResult(value) {
5133
5172
  const to = value.to;
5134
5173
  return `oc-pilot: flight diff ${typeof from.label === "string" ? from.label : "?"}..${typeof to.label === "string" ? to.label : "?"}`;
5135
5174
  }
5175
+ if (typeof value.total === "number" && Array.isArray(value.topCommands)) {
5176
+ return `oc-pilot: flight stats ${String(value.total)} session(s), ${String(value.commands ?? 0)} command(s), ${String(value.failedCommands ?? 0)} failed`;
5177
+ }
5178
+ if (typeof value.id === "string" && typeof value.html === "string") {
5179
+ return `oc-pilot: flight html ${value.id} (${String(value.html.length)} chars)`;
5180
+ }
5136
5181
  if (typeof value.format === "string" && value.format.startsWith("oc-pilot-flight-export/") && typeof value.digest === "string") {
5137
5182
  const checkpoints = Array.isArray(value.checkpoints) ? value.checkpoints.length : 0;
5138
5183
  return `oc-pilot: flight export ${String(checkpoints)} checkpoint(s), ${value.digest.slice(0, 15)}`;