@bridge_gpt/mcp-server 0.2.52 → 0.2.53
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/README.md +42 -12
- package/build/commands.generated.js +6 -4
- package/build/conductor/bridge-api-client.js +61 -0
- package/build/conductor/cli.js +23 -0
- package/build/conductor/doctor.js +428 -5
- package/build/conductor/install-doctor.js +65 -656
- package/build/conductor/readiness-cli.js +152 -0
- package/build/conductor/readiness-sections.js +666 -0
- package/build/conductor/readiness.js +710 -0
- package/build/conductor/tools.js +56 -3
- package/build/conductor-bin.js +21 -17
- package/build/index.js +4651 -4580
- package/build/install-doctor.js +154 -2
- package/build/pipelines.generated.js +3 -3
- package/build/plane/alembic-head.js +40 -11
- package/build/plane/build-freshness.js +22 -11
- package/build/plane/preflight.js +363 -48
- package/build/plane/types.js +36 -0
- package/build/readiness-check.js +412 -0
- package/build/readme.generated.js +1 -1
- package/build/version.generated.js +3 -3
- package/package.json +2 -2
- package/pipelines/{full-automation.json → idea-to-pr.json} +1 -1
package/build/conductor/tools.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*/
|
|
15
15
|
import { z } from "zod";
|
|
16
16
|
import { ConductorValidationError, toConductorErrorEnvelope } from "./errors.js";
|
|
17
|
-
import { resolveConductorBridgeApiAccess, fetchEpicRunState, ConductorBridgeApiError } from "./bridge-api-client.js";
|
|
17
|
+
import { resolveConductorBridgeApiAccess, fetchEpicRunState, fetchExplainRun, ConductorBridgeApiError, } from "./bridge-api-client.js";
|
|
18
18
|
function jsonResult(value) {
|
|
19
19
|
return { content: [{ type: "text", text: JSON.stringify(value, null, 2) }] };
|
|
20
20
|
}
|
|
@@ -70,6 +70,57 @@ function registerGetEpicSnapshotTool(registerTool) {
|
|
|
70
70
|
}
|
|
71
71
|
}));
|
|
72
72
|
}
|
|
73
|
+
function registerExplainRunTool(registerTool) {
|
|
74
|
+
registerTool("explain_run", {
|
|
75
|
+
annotations: {
|
|
76
|
+
readOnlyHint: true,
|
|
77
|
+
destructiveHint: false,
|
|
78
|
+
idempotentHint: true,
|
|
79
|
+
openWorldHint: true,
|
|
80
|
+
},
|
|
81
|
+
// Compressed to fit MAX_DESC_CHARS (350) without a waiver. What survives
|
|
82
|
+
// is the field list: a caller cannot discover the answer shape from a
|
|
83
|
+
// tool that only says "explain a run", and the whole point of the tool is
|
|
84
|
+
// that the answer is in one place.
|
|
85
|
+
description: "Explain why a Conductor epic run, or one ticket in it, is stuck. One snapshot: " +
|
|
86
|
+
"current gate, latest observation and age, outstanding jobs with queue position, " +
|
|
87
|
+
"lease owner/expiry, blocker reasons, expected-vs-observed head SHA, committed and " +
|
|
88
|
+
"pending disposition, usage ceiling. Pass ticket_key to narrow. Read-only; 404 " +
|
|
89
|
+
"returns status 'unknown'.",
|
|
90
|
+
inputSchema: {
|
|
91
|
+
epic_run_id: z
|
|
92
|
+
.string()
|
|
93
|
+
.min(1)
|
|
94
|
+
.describe("Epic run UUID or epic key (e.g. EPIC-123)."),
|
|
95
|
+
ticket_key: z
|
|
96
|
+
.string()
|
|
97
|
+
.min(1)
|
|
98
|
+
.optional()
|
|
99
|
+
.describe("Narrow the answer to one ticket in the run."),
|
|
100
|
+
},
|
|
101
|
+
}, withConductorToolErrorHandling(async (args) => {
|
|
102
|
+
const epicRunId = args.epic_run_id;
|
|
103
|
+
const ticketKey = args.ticket_key;
|
|
104
|
+
const scope = ticketKey === undefined ? "run" : "ticket";
|
|
105
|
+
const accessResult = await resolveConductorBridgeApiAccess();
|
|
106
|
+
if (!accessResult.ok) {
|
|
107
|
+
throw new ConductorValidationError(accessResult.error);
|
|
108
|
+
}
|
|
109
|
+
try {
|
|
110
|
+
return jsonResult(await fetchExplainRun(accessResult.access, epicRunId, ticketKey));
|
|
111
|
+
}
|
|
112
|
+
catch (error) {
|
|
113
|
+
if (error instanceof ConductorBridgeApiError && error.status === 404) {
|
|
114
|
+
// Scope-specific, so a caller can tell "no such run" from "that run
|
|
115
|
+
// exists but has no such ticket" — the server distinguishes them and
|
|
116
|
+
// collapsing both to one envelope would throw that away. No server
|
|
117
|
+
// detail is echoed either way.
|
|
118
|
+
return jsonResult({ status: "unknown", scope });
|
|
119
|
+
}
|
|
120
|
+
throw error;
|
|
121
|
+
}
|
|
122
|
+
}));
|
|
123
|
+
}
|
|
73
124
|
/**
|
|
74
125
|
* Register the conductor MCP tool surface through the host's `registerTool`
|
|
75
126
|
* wrapper. Keeping registration in this single module keeps `index.ts` thin.
|
|
@@ -78,10 +129,12 @@ function registerGetEpicSnapshotTool(registerTool) {
|
|
|
78
129
|
* handler returns the same `{ content: [{ type: "text", text }] }` shape every
|
|
79
130
|
* Bridge tool uses, just expressed with a simpler local type.
|
|
80
131
|
*
|
|
81
|
-
* BAPI-909 reduced this registrar to `get_epic_snapshot
|
|
82
|
-
*
|
|
132
|
+
* BAPI-909 reduced this registrar to `get_epic_snapshot`; BAPI-1028 added
|
|
133
|
+
* `explain_run` beside it. The registrar shape is what made that a one-line
|
|
134
|
+
* change rather than an edit to `index.ts`.
|
|
83
135
|
*/
|
|
84
136
|
export function registerConductorTools(registerTool) {
|
|
85
137
|
const reg = registerTool;
|
|
86
138
|
registerGetEpicSnapshotTool(reg);
|
|
139
|
+
registerExplainRunTool(reg);
|
|
87
140
|
}
|