oc-pilot 0.115.0 → 0.115.1
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/CHANGELOG.md +6 -0
- package/README.md +5 -5
- package/README.ru.md +4 -4
- package/dist/cli.test.js +6 -0
- package/dist/cli.test.js.map +1 -1
- package/dist/commands/flight.js +47 -5
- package/dist/commands/flight.js.map +1 -1
- package/dist/core/flight.js +200 -0
- package/dist/core/flight.js.map +1 -1
- package/dist/core/flight.test.js +78 -2
- package/dist/core/flight.test.js.map +1 -1
- package/dist/mcp.js +136 -1
- package/dist/mcp.js.map +1 -1
- package/dist/mcp.test.js +8 -0
- package/dist/mcp.test.js.map +1 -1
- package/dist/version.js +1 -1
- package/docs/integrations.md +4 -4
- package/package.json +1 -1
- package/skills/agent-self-review/SKILL.md +1 -1
- package/skills/commit-discipline/SKILL.md +1 -1
- package/skills/secure-diff-gate/SKILL.md +1 -1
- package/skills/stack-review-packs/SKILL.md +1 -1
- package/skills/test-failure-triage/SKILL.md +1 -1
package/dist/mcp.js
CHANGED
|
@@ -1567,6 +1567,66 @@ const TOOLS = [
|
|
|
1567
1567
|
},
|
|
1568
1568
|
},
|
|
1569
1569
|
},
|
|
1570
|
+
{
|
|
1571
|
+
name: "flight_replay",
|
|
1572
|
+
description: "Materialize a flight checkpoint as a detached git worktree without touching the main worktree. Needs --allow-write.",
|
|
1573
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
|
|
1574
|
+
inputSchema: {
|
|
1575
|
+
type: "object",
|
|
1576
|
+
additionalProperties: false,
|
|
1577
|
+
properties: {
|
|
1578
|
+
id: { type: "string", description: "Flight session id; defaults to the active flight" },
|
|
1579
|
+
to: { type: "string", description: "Checkpoint label or commit; defaults to the latest checkpoint" },
|
|
1580
|
+
path: { type: "string", description: "Target worktree path; defaults to a temp directory" },
|
|
1581
|
+
...RESULT_PROPERTIES,
|
|
1582
|
+
},
|
|
1583
|
+
},
|
|
1584
|
+
},
|
|
1585
|
+
{
|
|
1586
|
+
name: "flight_bisect",
|
|
1587
|
+
description: "Run a command at each flight checkpoint in order and report the first failing step. Needs --allow-write.",
|
|
1588
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
|
|
1589
|
+
inputSchema: {
|
|
1590
|
+
type: "object",
|
|
1591
|
+
additionalProperties: false,
|
|
1592
|
+
required: ["command"],
|
|
1593
|
+
properties: {
|
|
1594
|
+
id: { type: "string", description: "Flight session id; defaults to the active flight" },
|
|
1595
|
+
command: { type: "array", description: "Command argv, e.g. [\"npm\",\"test\"]", items: { type: "string" } },
|
|
1596
|
+
timeout: { type: "integer", minimum: 100, maximum: 600000 },
|
|
1597
|
+
...RESULT_PROPERTIES,
|
|
1598
|
+
},
|
|
1599
|
+
},
|
|
1600
|
+
},
|
|
1601
|
+
{
|
|
1602
|
+
name: "flight_diff",
|
|
1603
|
+
description: "Compare the flight base commit or two checkpoints and return git diff stat and patch.",
|
|
1604
|
+
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
1605
|
+
inputSchema: {
|
|
1606
|
+
type: "object",
|
|
1607
|
+
additionalProperties: false,
|
|
1608
|
+
properties: {
|
|
1609
|
+
id: { type: "string", description: "Flight session id; defaults to the active flight" },
|
|
1610
|
+
from: { type: "string", description: "Checkpoint label or commit; defaults to the base commit" },
|
|
1611
|
+
to: { type: "string", description: "Checkpoint label or commit; defaults to the latest checkpoint" },
|
|
1612
|
+
...RESULT_PROPERTIES,
|
|
1613
|
+
},
|
|
1614
|
+
},
|
|
1615
|
+
},
|
|
1616
|
+
{
|
|
1617
|
+
name: "flight_export",
|
|
1618
|
+
description: "Export a redacted flight bundle with journal, checkpoint patches and a sha256 digest. Needs --allow-write when output is set.",
|
|
1619
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
|
|
1620
|
+
inputSchema: {
|
|
1621
|
+
type: "object",
|
|
1622
|
+
additionalProperties: false,
|
|
1623
|
+
properties: {
|
|
1624
|
+
id: { type: "string", description: "Flight session id; defaults to the active flight" },
|
|
1625
|
+
output: { type: "string", description: "Optional bundle file path" },
|
|
1626
|
+
...RESULT_PROPERTIES,
|
|
1627
|
+
},
|
|
1628
|
+
},
|
|
1629
|
+
},
|
|
1570
1630
|
{
|
|
1571
1631
|
name: "beacon",
|
|
1572
1632
|
description: "Create, verify and render a signed verification beacon for HEAD: commit, tree, tool version, agent, model, checks, commands and digest. Supports HMAC and ssh-keygen signatures; verify detects tampering and unattributed manifests. Actions: stamp, verify, render, clear. stamp/clear write and need --allow-write.",
|
|
@@ -4323,6 +4383,54 @@ async function callFlightVerify(input, cwd) {
|
|
|
4323
4383
|
async function callFlightEnd(_input, cwd) {
|
|
4324
4384
|
return toToolResult(await runCli(["flight", "end", "--json"], cwd));
|
|
4325
4385
|
}
|
|
4386
|
+
async function callFlightReplay(input, cwd) {
|
|
4387
|
+
const args = ["flight", "replay", "--json"];
|
|
4388
|
+
const id = stringArg(input, "id");
|
|
4389
|
+
if (id)
|
|
4390
|
+
args.push("--id", id);
|
|
4391
|
+
const to = stringArg(input, "to");
|
|
4392
|
+
if (to)
|
|
4393
|
+
args.push("--to", to);
|
|
4394
|
+
const path = stringArg(input, "path");
|
|
4395
|
+
if (path)
|
|
4396
|
+
args.push("--path", path);
|
|
4397
|
+
return toToolResult(await runCli(args, cwd));
|
|
4398
|
+
}
|
|
4399
|
+
async function callFlightBisect(input, cwd) {
|
|
4400
|
+
const command = stringArrayArg(input, "command", true);
|
|
4401
|
+
const args = ["flight", "bisect", "--json"];
|
|
4402
|
+
const id = stringArg(input, "id");
|
|
4403
|
+
if (id)
|
|
4404
|
+
args.push("--id", id);
|
|
4405
|
+
const timeout = integerArg(input, "timeout");
|
|
4406
|
+
if (timeout !== undefined)
|
|
4407
|
+
args.push("--timeout", String(timeout));
|
|
4408
|
+
args.push("--", ...command);
|
|
4409
|
+
return toToolResult(await runCli(args, cwd));
|
|
4410
|
+
}
|
|
4411
|
+
async function callFlightDiff(input, cwd) {
|
|
4412
|
+
const args = ["flight", "diff", "--json"];
|
|
4413
|
+
const id = stringArg(input, "id");
|
|
4414
|
+
if (id)
|
|
4415
|
+
args.push("--id", id);
|
|
4416
|
+
const from = stringArg(input, "from");
|
|
4417
|
+
if (from)
|
|
4418
|
+
args.push("--from", from);
|
|
4419
|
+
const to = stringArg(input, "to");
|
|
4420
|
+
if (to)
|
|
4421
|
+
args.push("--to", to);
|
|
4422
|
+
return toToolResult(await runCli(args, cwd));
|
|
4423
|
+
}
|
|
4424
|
+
async function callFlightExport(input, cwd) {
|
|
4425
|
+
const args = ["flight", "export", "--json"];
|
|
4426
|
+
const id = stringArg(input, "id");
|
|
4427
|
+
if (id)
|
|
4428
|
+
args.push("--id", id);
|
|
4429
|
+
const output = stringArg(input, "output");
|
|
4430
|
+
if (output)
|
|
4431
|
+
args.push("--output", output);
|
|
4432
|
+
return toToolResult(await runCli(args, cwd));
|
|
4433
|
+
}
|
|
4326
4434
|
async function callBeacon(input, cwd) {
|
|
4327
4435
|
const action = stringArg(input, "action", true);
|
|
4328
4436
|
const args = ["beacon", action, "--json"];
|
|
@@ -4714,7 +4822,8 @@ async function dispatchTool(name, input, cwd, readOnly) {
|
|
|
4714
4822
|
if (name === "scan_injection" && booleanArg(input, "fix")) {
|
|
4715
4823
|
throw new ToolInputError("scan_injection fix writes files and is disabled in read-only mode; start the MCP server with --allow-write");
|
|
4716
4824
|
}
|
|
4717
|
-
if (name.startsWith("flight_") &&
|
|
4825
|
+
if (name.startsWith("flight_") &&
|
|
4826
|
+
["flight_start", "flight_exec", "flight_checkpoint", "flight_end", "flight_replay", "flight_bisect", "flight_export"].includes(name)) {
|
|
4718
4827
|
throw new ToolInputError("flight write actions are disabled in read-only mode; start the MCP server with --allow-write");
|
|
4719
4828
|
}
|
|
4720
4829
|
}
|
|
@@ -4859,6 +4968,14 @@ async function dispatchTool(name, input, cwd, readOnly) {
|
|
|
4859
4968
|
return callFlightVerify(input, cwd);
|
|
4860
4969
|
case "flight_end":
|
|
4861
4970
|
return callFlightEnd(input, cwd);
|
|
4971
|
+
case "flight_replay":
|
|
4972
|
+
return callFlightReplay(input, cwd);
|
|
4973
|
+
case "flight_bisect":
|
|
4974
|
+
return callFlightBisect(input, cwd);
|
|
4975
|
+
case "flight_diff":
|
|
4976
|
+
return callFlightDiff(input, cwd);
|
|
4977
|
+
case "flight_export":
|
|
4978
|
+
return callFlightExport(input, cwd);
|
|
4862
4979
|
case "beacon":
|
|
4863
4980
|
return callBeacon(input, cwd);
|
|
4864
4981
|
case "quarantine":
|
|
@@ -4980,6 +5097,24 @@ function summarizeResult(value) {
|
|
|
4980
5097
|
if (typeof value.score === "number" && typeof value.hotspot === "boolean" && value.totals && typeof value.totals === "object") {
|
|
4981
5098
|
return `oc-pilot: chronos ${String(value.score)}, ${value.hotspot ? "hotspot" : "stable"}`;
|
|
4982
5099
|
}
|
|
5100
|
+
if (typeof value.id === "string" && typeof value.label === "string" && typeof value.commit === "string" && typeof value.path === "string") {
|
|
5101
|
+
return `oc-pilot: flight replay ${value.id} ${value.label}`;
|
|
5102
|
+
}
|
|
5103
|
+
if (typeof value.id === "string" && Array.isArray(value.command) && Array.isArray(value.steps)) {
|
|
5104
|
+
const first = value.firstBad && typeof value.firstBad === "object"
|
|
5105
|
+
? value.firstBad.label
|
|
5106
|
+
: undefined;
|
|
5107
|
+
return `oc-pilot: flight bisect ${String(value.steps.length)} step(s)${typeof first === "string" ? `, first bad ${first}` : ", all passed"}`;
|
|
5108
|
+
}
|
|
5109
|
+
if (typeof value.id === "string" && value.from && typeof value.from === "object" && value.to && typeof value.to === "object" && typeof value.stat === "string") {
|
|
5110
|
+
const from = value.from;
|
|
5111
|
+
const to = value.to;
|
|
5112
|
+
return `oc-pilot: flight diff ${typeof from.label === "string" ? from.label : "?"}..${typeof to.label === "string" ? to.label : "?"}`;
|
|
5113
|
+
}
|
|
5114
|
+
if (typeof value.format === "string" && value.format.startsWith("oc-pilot-flight-export/") && typeof value.digest === "string") {
|
|
5115
|
+
const checkpoints = Array.isArray(value.checkpoints) ? value.checkpoints.length : 0;
|
|
5116
|
+
return `oc-pilot: flight export ${String(checkpoints)} checkpoint(s), ${value.digest.slice(0, 15)}`;
|
|
5117
|
+
}
|
|
4983
5118
|
if (typeof value.active === "boolean") {
|
|
4984
5119
|
if (value.session && typeof value.session === "object") {
|
|
4985
5120
|
const session = value.session;
|