@bridge_gpt/mcp-server 0.2.75 → 0.2.76
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 +5 -5
- package/build/agents.generated.js +4 -4
- package/build/codex-auto-recovery.js +25 -7
- package/build/commands.generated.js +6 -6
- package/build/conductor/bridge-api-client.js +141 -6
- package/build/conductor/declare-blocked.js +4 -0
- package/build/conductor/driver-pass.js +8 -0
- package/build/conductor/epic-implementer-cli.js +4 -3
- package/build/conductor/epic-server-journal.js +13 -0
- package/build/conductor/epic-server-recipe.js +15 -5
- package/build/conductor/epic-server-runtime.js +163 -45
- package/build/conductor/epic-server.js +13 -6
- package/build/conductor/install-doctor.js +30 -2
- package/build/conductor/local-merge.js +54 -12
- package/build/conductor/pr-ci-producer.js +12 -3
- package/build/conductor/readiness-sections.js +46 -13
- package/build/conductor/readiness.js +3 -40
- package/build/conductor/recovery-cli.js +12 -12
- package/build/conductor/repository-workflow-remedy.js +147 -7
- package/build/conductor/ui-readiness.js +224 -0
- package/build/conductor/wait-run-attention.js +9 -4
- package/build/conductor/wait-run-cli.js +9 -2
- package/build/docs.generated.js +2 -2
- package/build/drive-epic.js +402 -27
- package/build/epic-implementer-bin.js +62 -42
- package/build/epic-launch-context.js +8 -1
- package/build/epic-shared/cut-protocol.js +55 -3
- package/build/executor/failure-reason-codes.js +2 -0
- package/build/executor/integration-job.js +56 -2
- package/build/executor/job-runner.js +4 -1
- package/build/executor/merge-job.js +45 -1
- package/build/executor/permissions.js +187 -2
- package/build/executor/provider-checks.js +28 -5
- package/build/executor/reconcile-overlap-job.js +70 -17
- package/build/executor/required-work-ledger.js +7 -2
- package/build/executor/resume-pre-spawn.js +32 -8
- package/build/executor/runner.js +26 -4
- package/build/executor/worktree.js +12 -1
- package/build/index.js +376 -434
- package/build/init.js +16 -0
- package/build/install-bridge-conductor-answers.js +4 -0
- package/build/install-bridge-conductor-apply.js +10 -0
- package/build/install-bridge-conductor-assessment.js +71 -0
- package/build/install-bridge-conductor-contracts.js +9 -1
- package/build/install-bridge-conductor-setup.js +103 -3
- package/build/install-bridge-conductor.js +437 -93
- package/build/mcp-host-config.js +54 -37
- package/build/phase-context-git-probe.js +16 -0
- package/build/pipelines.generated.js +9 -9
- package/build/plan-execution-ledger.js +27 -0
- package/build/plane/plane-freshness.js +43 -26
- package/build/printed-remedy-commands.js +8 -0
- package/build/readme.generated.js +1 -1
- package/build/secret-redaction.js +3 -0
- package/build/setup-epic.js +41 -8
- package/build/test-support/create-preview-world.js +232 -0
- package/build/ticket-delivery.js +65 -0
- package/build/v2-readiness-requirements.js +8 -3
- package/build/version.generated.js +3 -3
- package/build/worktree-core.js +51 -7
- package/docs/EPIC-IMPLEMENTER.md +79 -0
- package/docs/epic-implementer/getting-started.md +1 -1
- package/package.json +1 -1
- package/pipelines/implement-ticket.json +2 -2
|
@@ -222,6 +222,31 @@ export const ESCALATION_CATEGORIES = [
|
|
|
222
222
|
"prerequisite_not_built",
|
|
223
223
|
"other",
|
|
224
224
|
];
|
|
225
|
+
/**
|
|
226
|
+
* BAPI-1712: the observed failure behind an outside escalation category. Optional
|
|
227
|
+
* metadata on an escalated record. The server, not this client, decides whether it
|
|
228
|
+
* is well formed and whether it fits the category: only a well-formed observation
|
|
229
|
+
* whose `observed_head_sha` matches the current head lets the server report the
|
|
230
|
+
* blocker `external` / `report_and_end`. Bridge cannot prove a host-local failure
|
|
231
|
+
* happened, so such an end carries provenance `worker_attested`.
|
|
232
|
+
*
|
|
233
|
+
* The client never validates, coerces, or strips it. A missing or malformed value
|
|
234
|
+
* never rejects a record; the server stores it as absent. Mirrors the server's
|
|
235
|
+
* blocker-observation shape; both sides must agree.
|
|
236
|
+
*/
|
|
237
|
+
export const BLOCKER_OBSERVATION_OPERATION_KINDS = [
|
|
238
|
+
"bridge_tool",
|
|
239
|
+
"provider_api",
|
|
240
|
+
"local_command",
|
|
241
|
+
"network",
|
|
242
|
+
];
|
|
243
|
+
export const BLOCKER_OBSERVATION_FAILURE_KINDS = [
|
|
244
|
+
"denied",
|
|
245
|
+
"not_found",
|
|
246
|
+
"unavailable",
|
|
247
|
+
"timeout",
|
|
248
|
+
"conflict",
|
|
249
|
+
];
|
|
225
250
|
/**
|
|
226
251
|
* Which phase must settle each class of step.
|
|
227
252
|
*
|
|
@@ -599,6 +624,8 @@ function validateRecordShape(record, metadata, phase) {
|
|
|
599
624
|
// BAPI-1608: `escalationCategory` is deliberately not checked here. It is
|
|
600
625
|
// optional advisory metadata, so an unknown string or a non-string value never
|
|
601
626
|
// rejects an otherwise valid record.
|
|
627
|
+
// BAPI-1712: `blockerObservation` / `blocker_observation` are likewise never
|
|
628
|
+
// checked. The server normalizes them; a malformed value is stored as absent.
|
|
602
629
|
// BAPI-1552: mirrors the server, which refuses this cause on a non-escalated
|
|
603
630
|
// record before any generic disposition check can hide the closed code.
|
|
604
631
|
const handoffValue = record.handoff;
|
|
@@ -24,6 +24,12 @@ import { monotonicNow, elapsedMs } from "../conductor/precheck-timings.js";
|
|
|
24
24
|
*
|
|
25
25
|
* Nothing here mutates the checkout, the plane, the database, power settings, or
|
|
26
26
|
* any run. `git fetch` updates remote-tracking refs, which is the one write.
|
|
27
|
+
*
|
|
28
|
+
* Two collection modes. Ordinary collection compares the selected plane's pinned
|
|
29
|
+
* snapshot (from its manifest) and checks the database head. The cold-start,
|
|
30
|
+
* snapshot-only mode (`snapshotFromCheckoutHead`, BAPI-1725) runs before any plane
|
|
31
|
+
* exists: it compares the current checkout's `HEAD` with `origin/main` and reads no
|
|
32
|
+
* manifest and no database.
|
|
27
33
|
*/
|
|
28
34
|
import { checkAlembicHead, } from "./alembic-head.js";
|
|
29
35
|
import { planeCheckFinding, planeCheckPassed, planeCheckSkipped, } from "./types.js";
|
|
@@ -138,22 +144,29 @@ async function resolveCommit(deps, repoRoot, revision, timeoutMs) {
|
|
|
138
144
|
return out !== null && HEX_OBJECT_ID.test(out) ? out : null;
|
|
139
145
|
}
|
|
140
146
|
async function checkSnapshot(repoRoot, deps, options, timeoutMs, manifestRead) {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
147
|
+
// Cold-start mode compares the checkout's own HEAD, so the manifest ownership,
|
|
148
|
+
// identity, and pinned-snapshot requirements below do not apply to it.
|
|
149
|
+
const fromCheckoutHead = options.snapshotFromCheckoutHead === true;
|
|
150
|
+
let snapshotSha = "HEAD";
|
|
151
|
+
if (!fromCheckoutHead) {
|
|
152
|
+
if (!options.ownsManifest) {
|
|
153
|
+
return unverifiedSnapshot("no plane manifest in this checkout belongs to the selected plane");
|
|
154
|
+
}
|
|
155
|
+
if (manifestRead === null || manifestRead.kind !== "valid") {
|
|
156
|
+
return unverifiedSnapshot("the plane manifest could not be read");
|
|
157
|
+
}
|
|
158
|
+
const manifest = manifestRead.manifest;
|
|
159
|
+
if (manifest.repoRoot !== repoRoot) {
|
|
160
|
+
return unverifiedSnapshot("the plane manifest belongs to a different checkout");
|
|
161
|
+
}
|
|
162
|
+
if (options.expectedPlaneId !== undefined && manifest.planeId !== options.expectedPlaneId) {
|
|
163
|
+
return unverifiedSnapshot("the plane manifest is not the selected plane's");
|
|
164
|
+
}
|
|
165
|
+
const pinned = manifest.snapshotSha;
|
|
166
|
+
if (pinned === undefined || !HEX_OBJECT_ID.test(pinned)) {
|
|
167
|
+
return unverifiedSnapshot("the plane manifest records no pinned snapshot");
|
|
168
|
+
}
|
|
169
|
+
snapshotSha = pinned;
|
|
157
170
|
}
|
|
158
171
|
// Refresh the remote-tracking ref first. A failed fetch stops this check: a
|
|
159
172
|
// stale cached `origin/main` would read as "fresh" and prove nothing.
|
|
@@ -162,7 +175,9 @@ async function checkSnapshot(repoRoot, deps, options, timeoutMs, manifestRead) {
|
|
|
162
175
|
}
|
|
163
176
|
const snapshotCommit = await resolveCommit(deps, repoRoot, snapshotSha, timeoutMs);
|
|
164
177
|
if (snapshotCommit === null) {
|
|
165
|
-
return unverifiedSnapshot(
|
|
178
|
+
return unverifiedSnapshot(fromCheckoutHead
|
|
179
|
+
? "the checkout's HEAD could not be resolved"
|
|
180
|
+
: "the snapshot commit is not present in this checkout");
|
|
166
181
|
}
|
|
167
182
|
const originCommit = await resolveCommit(deps, repoRoot, "origin/main", timeoutMs);
|
|
168
183
|
if (originCommit === null) {
|
|
@@ -192,17 +207,19 @@ async function checkSnapshot(repoRoot, deps, options, timeoutMs, manifestRead) {
|
|
|
192
207
|
// Both sides moved. That is not proof of staleness, and not proof of freshness.
|
|
193
208
|
return unverifiedSnapshot("the snapshot and origin/main have diverged");
|
|
194
209
|
}
|
|
195
|
-
/**
|
|
196
|
-
* Collect the snapshot and database freshness reports, independently: an
|
|
197
|
-
* unverified snapshot never suppresses a confirmed database refusal, or the
|
|
198
|
-
* reverse.
|
|
199
|
-
*
|
|
200
|
-
* `checkout` is the code root whose `alembic.ini` the database check reads. When
|
|
201
|
-
* the selected plane's manifest pins a snapshot, that snapshot is used instead —
|
|
202
|
-
* the code the plane will actually RUN — exactly as plane preflight does.
|
|
203
|
-
*/
|
|
204
210
|
export async function checkPlaneFreshness(repoRoot, deps, checkout, options) {
|
|
205
211
|
const timeoutMs = options.timeoutMs ?? PLANE_FRESHNESS_TIMEOUT_MS;
|
|
212
|
+
if (options.snapshotFromCheckoutHead === true) {
|
|
213
|
+
const started = monotonicNow();
|
|
214
|
+
let report;
|
|
215
|
+
try {
|
|
216
|
+
report = await checkSnapshot(repoRoot, deps, options, timeoutMs, null);
|
|
217
|
+
}
|
|
218
|
+
catch {
|
|
219
|
+
report = unverifiedSnapshot("the check did not complete");
|
|
220
|
+
}
|
|
221
|
+
return { snapshot: { ...report, duration_ms: elapsedMs(started) } };
|
|
222
|
+
}
|
|
206
223
|
let manifestRead = null;
|
|
207
224
|
if (options.ownsManifest) {
|
|
208
225
|
try {
|
|
@@ -31,6 +31,14 @@ export const CONSUMER_GUIDE_PATH = "docs/install/epic-implementer-install.md";
|
|
|
31
31
|
* not enough, because an older install may not have the file yet.
|
|
32
32
|
*/
|
|
33
33
|
export const CONSUMER_GUIDE_POINTER = `${CONSUMER_GUIDE_PATH} (write or refresh it with ${PRINTED_INSTALL_COMMAND})`;
|
|
34
|
+
/**
|
|
35
|
+
* Remediation printed when no supported host config carries a Bridge entry
|
|
36
|
+
* (moved here by BAPI-1719 so the pure setup projection can reuse it without
|
|
37
|
+
* importing the orchestration module). `install-bridge-conductor.ts` re-exports
|
|
38
|
+
* it under the same name.
|
|
39
|
+
*/
|
|
40
|
+
export const CONDUCTOR_PROFILE_EMPTY_MERGE_REMEDIATION = `run \`${PRINTED_INSTALL_COMMAND}\` to create and register the host MCP entry, ` +
|
|
41
|
+
"then re-run `install epic-implementer`.";
|
|
34
42
|
/**
|
|
35
43
|
* Conductor setup. The plain command is the whole remedy (BAPI-1603): setup plans
|
|
36
44
|
* the repository gate from what it finds, learns and proves the test command, and
|