@bridge_gpt/mcp-server 0.2.41 → 0.2.43
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 +330 -191
- package/build/agent-capabilities/cli.js +2 -1
- package/build/agent-launchers/claude-executor-adapter.js +17 -4
- package/build/agents.generated.js +2 -2
- package/build/claude-review-workflow.js +510 -45
- package/build/claude-user-config-doctor.js +42 -11
- package/build/cli-release.js +2 -1
- package/build/commands.generated.js +6 -5
- package/build/conduct-epic/bridge-client.js +354 -113
- package/build/conduct-epic/checkpoint-store.js +17 -0
- package/build/conduct-epic/cli.js +947 -99
- package/build/conduct-epic/cut-protocol.js +327 -0
- package/build/conduct-epic/spawn.js +14 -2
- package/build/conductor/bridge-api-client.js +148 -1
- package/build/conductor/cli.js +109 -1
- package/build/conductor/doctor.js +101 -16
- package/build/conductor/epic-reconcile.js +72 -19
- package/build/conductor/epic-runtime.js +15 -3
- package/build/conductor/errors.js +47 -0
- package/build/conductor/git-hooks.js +205 -11
- package/build/conductor/install-doctor.js +230 -1
- package/build/conductor/local-merge.js +130 -28
- package/build/conductor/recovery-cli.js +313 -0
- package/build/conductor/recovery-operations.js +219 -0
- package/build/conductor/tools.js +32 -3
- package/build/conductor/worker-ledger-cli.js +27 -1
- package/build/conductor-bin.js +20 -16
- package/build/credentials-cli.js +3 -2
- package/build/docs.generated.js +2 -1
- package/build/doctor.js +120 -44
- package/build/drive-epic.js +375 -0
- package/build/executor/cli.js +48 -1
- package/build/executor/env.js +21 -0
- package/build/executor/http-client.js +71 -3
- package/build/executor/index-scope.js +39 -0
- package/build/executor/job-errors.js +9 -0
- package/build/executor/job-log-registry.js +69 -0
- package/build/executor/job-runner.js +198 -29
- package/build/executor/live-worker-registry.js +83 -0
- package/build/executor/observation.js +259 -6
- package/build/executor/platform.js +147 -3
- package/build/executor/process.js +58 -14
- package/build/executor/runner.js +454 -48
- package/build/executor/test-clock.js +3 -2
- package/build/executor/worker-finalization.js +233 -56
- package/build/executor/worktree.js +8 -1
- package/build/index-scope-contract.js +96 -0
- package/build/index.js +2277 -270
- package/build/init.js +83 -22
- package/build/install-bridge-conductor.js +323 -14
- package/build/install-bridge.js +225 -47
- package/build/install-doctor.js +23 -9
- package/build/install-reexec.js +2 -1
- package/build/launcher-config-inspection.js +83 -22
- package/build/mcp-host-config.js +331 -67
- package/build/mcp-host-targets.js +45 -21
- package/build/mcp-identity.js +92 -0
- package/build/mcp-install-state.js +94 -1
- package/build/mcp-invoke.js +2 -1
- package/build/mcp-provisioning.js +45 -12
- package/build/mcp-registration-doctor.js +35 -13
- package/build/mcp-server-invocation.js +4 -2
- package/build/merge-pull-request.js +208 -9
- package/build/pipelines.generated.js +305 -15
- package/build/plane/cli.js +73 -7
- package/build/plane/defaults.js +18 -5
- package/build/plane/manifest.js +90 -0
- package/build/plane/preflight.js +100 -10
- package/build/plane/shutdown.js +71 -3
- package/build/plane/test-fakes.js +9 -1
- package/build/readme.generated.js +1 -1
- package/build/regression-check.js +3 -2
- package/build/review-tickets.js +8 -7
- package/build/run-unit-tests-launcher.js +149 -6
- package/build/schedule-run.js +3 -2
- package/build/setup-epic.js +531 -82
- package/build/sfcc/tool-wrapper.js +15 -0
- package/build/start-tickets-prereqs.js +11 -6
- package/build/start-tickets.js +91 -85
- package/build/update-check.js +3 -2
- package/build/upgrade-advice.js +2 -1
- package/build/upgrade-cli.js +50 -18
- package/build/version.generated.js +2 -1
- package/build/worktree-core.js +31 -17
- package/docs/CONDUCTOR.md +22 -0
- package/docs/install/mcp-tool-integrations.md +19 -3
- package/package.json +2 -2
- package/pipelines/greenfield-setup.json +286 -0
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
*/
|
|
40
40
|
import { isBridgeApiShimEntry, readJsonIfPresent } from "./mcp-registration-doctor.js";
|
|
41
41
|
import { normalizeWorktreePathForRegistration, pathApiForProvisioningPlatform, } from "./mcp-provisioning.js";
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
import { MCP_SERVER_NAME, resolveRegistrationKey, } from "./mcp-identity.js";
|
|
43
|
+
import { DUPLICATE_REGISTRATION_GUIDANCE } from "./launcher-config-inspection.js";
|
|
44
44
|
/** The Claude user configuration file name, at the home directory root. */
|
|
45
45
|
const CLAUDE_USER_CONFIG_FILENAME = ".claude.json";
|
|
46
46
|
/**
|
|
@@ -217,9 +217,22 @@ export async function inspectClaudeUserConfigForMcpShadowing(input, deps) {
|
|
|
217
217
|
}
|
|
218
218
|
if (!servers)
|
|
219
219
|
continue;
|
|
220
|
-
|
|
220
|
+
// BAPI-807: every recognized key is inspected at every supported scope. A
|
|
221
|
+
// legacy `bridge-api` registration shadows exactly as much as a canonical
|
|
222
|
+
// one, so checking only the canonical name would silently stop reporting the
|
|
223
|
+
// collisions this inspector exists to surface.
|
|
224
|
+
const resolution = resolveRegistrationKey(servers);
|
|
225
|
+
if (resolution.state === "conflict") {
|
|
226
|
+
// Two Bridge registrations at one scope. Reported as its own diagnostic
|
|
227
|
+
// rather than treating either as authoritative — which of them Claude
|
|
228
|
+
// loads is not something this inspector can know.
|
|
229
|
+
diagnostics.push({ kind: "duplicate-registration", configPath, scope: lookup.scope });
|
|
221
230
|
continue;
|
|
222
|
-
|
|
231
|
+
}
|
|
232
|
+
if (resolution.state === "absent")
|
|
233
|
+
continue;
|
|
234
|
+
const registrationKey = resolution.key;
|
|
235
|
+
const entry = servers[registrationKey];
|
|
223
236
|
const classification = classifyEntry(entry, lookup.allowedPaths);
|
|
224
237
|
if (classification.verdict === "safe")
|
|
225
238
|
continue;
|
|
@@ -238,6 +251,7 @@ export async function inspectClaudeUserConfigForMcpShadowing(input, deps) {
|
|
|
238
251
|
const finding = {
|
|
239
252
|
scopes: [lookup.scope],
|
|
240
253
|
configPath,
|
|
254
|
+
registrationKey,
|
|
241
255
|
shape: classification.shape,
|
|
242
256
|
envKeyNames: envKeyNamesOf(entry),
|
|
243
257
|
};
|
|
@@ -290,7 +304,9 @@ export function formatClaudeMcpShadowFinding(finding) {
|
|
|
290
304
|
const envNote = finding.envKeyNames.length > 0
|
|
291
305
|
? ` (env keys: ${finding.envKeyNames.join(", ")})`
|
|
292
306
|
: "";
|
|
293
|
-
|
|
307
|
+
// The KEY is rendered dynamically from the finding (BAPI-807); the entry body,
|
|
308
|
+
// its arguments, and its env VALUES remain unrendered — only key names appear.
|
|
309
|
+
return (`${finding.configPath} registers a '${finding.registrationKey}' MCP server at ${scopes}: ` +
|
|
294
310
|
`${SHAPE_LABELS[finding.shape]}${envNote}`);
|
|
295
311
|
}
|
|
296
312
|
/** Render one degraded diagnostic as a fixed, path-only sentence. */
|
|
@@ -301,18 +317,33 @@ export function formatClaudeUserConfigDiagnostic(diagnostic) {
|
|
|
301
317
|
case "malformed":
|
|
302
318
|
return `${diagnostic.configPath} contains malformed JSON; Claude MCP shadowing could not be checked`;
|
|
303
319
|
case "inconclusive-user-shim":
|
|
304
|
-
return (`${diagnostic.configPath} registers a user-scope
|
|
320
|
+
return (`${diagnostic.configPath} registers a user-scope Bridge shim for an ` +
|
|
305
321
|
"unverifiable project root (the main repository path could not be resolved)");
|
|
322
|
+
case "duplicate-registration":
|
|
323
|
+
return (`${diagnostic.configPath} at ${SCOPE_LABELS[diagnostic.scope]}: ` +
|
|
324
|
+
DUPLICATE_REGISTRATION_GUIDANCE);
|
|
306
325
|
}
|
|
307
326
|
}
|
|
308
327
|
/**
|
|
309
|
-
*
|
|
328
|
+
* Build the remediation command for ONE registration key (BAPI-807).
|
|
310
329
|
*
|
|
311
330
|
* A same-named registration is almost always a local-scope leftover, and this is
|
|
312
|
-
* the one command that removes it.
|
|
313
|
-
*
|
|
331
|
+
* the one command that removes it. It is generated from the key that was
|
|
332
|
+
* actually found rather than fixed, because a command naming the wrong key
|
|
333
|
+
* silently succeeds-as-no-op and teaches the operator to distrust the advisory.
|
|
334
|
+
*/
|
|
335
|
+
export function claudeMcpShadowingRemediationCommand(registrationKey) {
|
|
336
|
+
return `claude mcp remove ${registrationKey} -s local`;
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* The remediation command for the CANONICAL key.
|
|
340
|
+
*
|
|
341
|
+
* Retained as a named constant — the doctor prerequisite and the operator
|
|
342
|
+
* runbook reference one shared string — but every advisory rendered from an
|
|
343
|
+
* actual finding uses {@link claudeMcpShadowingRemediationCommand} with that
|
|
344
|
+
* finding's own key instead.
|
|
314
345
|
*/
|
|
315
|
-
export const CLAUDE_MCP_SHADOWING_REMEDIATION_COMMAND =
|
|
346
|
+
export const CLAUDE_MCP_SHADOWING_REMEDIATION_COMMAND = claudeMcpShadowingRemediationCommand(MCP_SERVER_NAME);
|
|
316
347
|
/**
|
|
317
348
|
* The SINGLE policy every consumer (executor preflight, per-worktree enforcement,
|
|
318
349
|
* doctor) applies to an inspection result, so none of them re-derives
|
|
@@ -338,6 +369,6 @@ export function evaluateClaudeMcpShadowingPolicy(inspection) {
|
|
|
338
369
|
// trailing sentence changes from a refusal to an advisory.
|
|
339
370
|
const findingMessages = inspection.findings.map((finding) => `${formatClaudeMcpShadowFinding(finding)}. Advisory only: strict worker MCP loading ` +
|
|
340
371
|
"means this registration is not loaded by a worker, and the per-spawn MCP surface " +
|
|
341
|
-
`assertion verifies that. To clear it: ${
|
|
372
|
+
`assertion verifies that. To clear it: ${claudeMcpShadowingRemediationCommand(finding.registrationKey)}`);
|
|
342
373
|
return { ok: true, warnings: [...findingMessages, ...warnings] };
|
|
343
374
|
}
|
package/build/cli-release.js
CHANGED
|
@@ -15,8 +15,9 @@
|
|
|
15
15
|
* logs, because both callers treat "no usable version" as "keep using the local
|
|
16
16
|
* copy" rather than as an error worth reporting to the user.
|
|
17
17
|
*/
|
|
18
|
+
import { MCP_PACKAGE_NAME } from "./mcp-identity.js";
|
|
18
19
|
/** The npm registry endpoint carrying the latest published release metadata. */
|
|
19
|
-
export const NPM_LATEST_ENDPOINT =
|
|
20
|
+
export const NPM_LATEST_ENDPOINT = `https://registry.npmjs.org/${MCP_PACKAGE_NAME}/latest`;
|
|
20
21
|
/**
|
|
21
22
|
* Hard bound on the registry lookup. Owned here rather than duplicated at each
|
|
22
23
|
* call site: `install` is a first-time user's very first contact with Bridge, so
|