@bridge_gpt/mcp-server 0.2.53 → 0.2.55
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 +116 -56
- package/build/agent-guidance.generated.js +3 -0
- package/build/agent-launchers/claude-executor-adapter.js +3 -0
- package/build/agent-launchers/claude.js +3 -3
- package/build/agent-launchers/prompt.js +8 -11
- package/build/agent-notes.js +178 -0
- package/build/agent-registry.js +5 -2
- package/build/agent-utils.js +58 -0
- package/build/agents.generated.js +1 -1
- package/build/base-ref.js +33 -9
- package/build/bounded-wait.js +174 -0
- package/build/codex-skill-adapter.js +55 -0
- package/build/commands.generated.js +6 -5
- package/build/conductor/bridge-api-client.js +235 -14
- package/build/conductor/bring-up-facts.js +187 -0
- package/build/conductor/claude-hook.js +7 -5
- package/build/conductor/cli.js +28 -0
- package/build/conductor/doctor.js +80 -9
- package/build/conductor/epic-implementer-cli.js +1298 -0
- package/build/conductor/epic-runtime.js +134 -98
- package/build/conductor/errors.js +2 -2
- package/build/conductor/git-ci-types.js +1 -1
- package/build/conductor/git-hooks.js +28 -14
- package/build/conductor/install-doctor.js +11 -5
- package/build/conductor/readiness-cli.js +10 -10
- package/build/conductor/readiness-sections.js +58 -9
- package/build/conductor/readiness.js +120 -4
- package/build/conductor/recovery-cli.js +289 -10
- package/build/conductor/recovery-operations.js +125 -2
- package/build/conductor/repair-contract.js +58 -0
- package/build/conductor/run-branch.js +137 -0
- package/build/conductor/store.js +2 -2
- package/build/conductor/supervisor-runtime.js +1 -1
- package/build/conductor/test-run-branch-vectors.js +165 -0
- package/build/conductor-bin.js +2 -139
- package/build/conductor-claude-hook-bin.js +2 -2
- package/build/conductor-claude-hook-removed-stub-bin.js +31 -0
- package/build/conductor-removed-stub-bin.js +30 -0
- package/build/docs.generated.js +1 -1
- package/build/doctor.js +145 -18
- package/build/drive-epic.js +752 -90
- package/build/epic-implementer-bin.js +145 -0
- package/build/epic-implementer-bundle-cli.js +264 -0
- package/build/epic-implementer-claude-hook-bin.js +3 -0
- package/build/epic-integration-pr.js +5 -3
- package/build/executor/claim-scope.js +104 -0
- package/build/executor/cli.js +14 -25
- package/build/executor/env-file-guard.js +82 -3
- package/build/executor/env.js +6 -0
- package/build/executor/interrupted-worktree.js +60 -0
- package/build/executor/job-errors.js +45 -0
- package/build/executor/job-runner.js +334 -9
- package/build/executor/job-types.js +25 -9
- package/build/executor/merge-tree-classifier.js +171 -0
- package/build/executor/reconcile-overlap-governance.js +129 -0
- package/build/executor/reconcile-overlap-job.js +989 -0
- package/build/executor/reconcile-overlap-types.js +14 -0
- package/build/executor/spawn-job-driver.js +1 -0
- package/build/executor/types.js +2 -0
- package/build/executor/worker-finalization.js +25 -2
- package/build/executor/worker-guard-hook.js +15 -7
- package/build/implement-epic/bridge-client.js +773 -0
- package/build/implement-epic/checkpoint-store.js +542 -0
- package/build/implement-epic/cli.js +3158 -0
- package/build/implement-epic/cut-protocol.js +392 -0
- package/build/implement-epic/lock.js +302 -0
- package/build/implement-epic/pr-state.js +286 -0
- package/build/implement-epic/spawn.js +113 -0
- package/build/index.js +657 -481
- package/build/init.js +72 -8
- package/build/install-bridge-conductor.js +5 -5
- package/build/install-bridge.js +403 -70
- package/build/local-artifact-storage.js +130 -0
- package/build/mcp-host-config.js +22 -60
- package/build/mcp-host-entry-adapter.js +18 -0
- package/build/mcp-host-targets.js +1 -21
- package/build/merge-pull-request.js +1 -1
- package/build/pipelines.generated.js +23 -16
- package/build/plan-epic-conductor-eligibility.js +1 -1
- package/build/plane/cli.js +321 -41
- package/build/plane/manifest.js +209 -1
- package/build/plane/member-roster.js +70 -0
- package/build/plane/preflight.js +128 -12
- package/build/plane/shutdown.js +18 -5
- package/build/plane/status.js +35 -1
- package/build/plane/supervisor.js +546 -164
- package/build/plane/types.js +25 -2
- package/build/polling-policy.js +72 -0
- package/build/readiness-check.js +3 -3
- package/build/readme.generated.js +1 -1
- package/build/review-generation.js +219 -0
- package/build/run-unit-tests-launcher.js +6 -1
- package/build/setup-epic.js +567 -38
- package/build/start-tickets-conductor.js +8 -7
- package/build/ticket-key-utils.js +4 -3
- package/build/ticket-review-artifact-gate.js +461 -0
- package/build/upgrade-cli.js +5 -26
- package/build/version.generated.js +3 -3
- package/build/worker-guard-hook-bin.js +1 -1
- package/docs/CONDUCTOR.md +8 -6
- package/docs/install/mcp-tool-integrations.md +23 -1
- package/package.json +5 -3
- package/pipelines/review-ticket.json +17 -4
package/build/init.js
CHANGED
|
@@ -13,15 +13,18 @@ import { writeFile, mkdir, readFile, stat } from "fs/promises";
|
|
|
13
13
|
import path from "path";
|
|
14
14
|
import os from "os";
|
|
15
15
|
import { COMMANDS } from "./commands.generated.js";
|
|
16
|
+
import { CODEX_SKILLS_DIR, codexSkillAssets } from "./codex-skill-adapter.js";
|
|
16
17
|
import { AGENTS } from "./agents.generated.js";
|
|
17
18
|
import { DOCS } from "./docs.generated.js";
|
|
18
19
|
import { VERSION, LAUNCHER_ARGS } from "./version.generated.js";
|
|
19
|
-
import { reconstructAgentMarkdown, translateAgentToCopilot } from "./agent-utils.js";
|
|
20
|
+
import { reconstructAgentMarkdown, translateAgentToCopilot, translateCommandToCopilot, } from "./agent-utils.js";
|
|
20
21
|
import { validateRepoName, resolveRepoNameForProjectRoot } from "./bridge-config.js";
|
|
21
22
|
import { ensureGitignored as ensureGitignoredShared } from "./git-ignore-utils.js";
|
|
22
23
|
import { resolveBapiCredentials } from "./credential-store.js";
|
|
23
|
-
import { describeLauncherReason, DUPLICATE_REGISTRATION_GUIDANCE, inspectLauncherConfigs, isPrerequisiteFailure,
|
|
24
|
+
import { describeLauncherReason, DUPLICATE_REGISTRATION_GUIDANCE, inspectLauncherConfigs, isPrerequisiteFailure, } from "./launcher-config-inspection.js";
|
|
24
25
|
import { MCP_SERVER_NAME, MCP_PACKAGE_NAME, resolveRegistrationKey, } from "./mcp-identity.js";
|
|
26
|
+
import { adaptBridgeEntryForHostTarget } from "./mcp-host-entry-adapter.js";
|
|
27
|
+
import { MCP_HOST_TARGETS, hostAdapterForTarget } from "./mcp-host-targets.js";
|
|
25
28
|
// ---------------------------------------------------------------------------
|
|
26
29
|
// CLI: --init scaffolds slash commands and MCP configs into the current project
|
|
27
30
|
// ---------------------------------------------------------------------------
|
|
@@ -219,6 +222,9 @@ export async function resolveInitScaffoldAssets(options) {
|
|
|
219
222
|
displayScaffoldPath(cwd, instructionsDir, true),
|
|
220
223
|
displayScaffoldPath(cwd, path.join(cwd, ".claude", "commands"), true),
|
|
221
224
|
...(ide.cursor ? [displayScaffoldPath(cwd, path.join(cwd, ".cursor", "commands"), true)] : []),
|
|
225
|
+
displayScaffoldPath(cwd, path.join(cwd, CODEX_SKILLS_DIR), true),
|
|
226
|
+
...(ide.vscode ? [displayScaffoldPath(cwd, path.join(cwd, ".github", "prompts"), true)] : []),
|
|
227
|
+
...(ide.vscode ? [displayScaffoldPath(cwd, path.join(cwd, ".github", "skills"), true)] : []),
|
|
222
228
|
displayScaffoldPath(cwd, path.join(cwd, ".claude", "agents"), true),
|
|
223
229
|
...(ide.vscode ? [displayScaffoldPath(cwd, path.join(cwd, ".github", "agents"), true)] : []),
|
|
224
230
|
// Sourced from the bundled DOCS map, so a new scaffolded doc is covered
|
|
@@ -531,12 +537,12 @@ export async function runInit(cwd, options = {}) {
|
|
|
531
537
|
// narration and its tests are unchanged; the per-path metadata (which root
|
|
532
538
|
// key each config uses) now comes from the shared inspection module.
|
|
533
539
|
const configTargets = [
|
|
534
|
-
{ path: ".mcp.json", shouldCreate: true },
|
|
535
|
-
{ path: ".vscode/mcp.json", shouldCreate: ideDetection.vscode },
|
|
536
|
-
{ path: ".cursor/mcp.json", shouldCreate: ideDetection.cursor },
|
|
540
|
+
{ path: ".mcp.json", shouldCreate: true, target: MCP_HOST_TARGETS["claude-code"] },
|
|
541
|
+
{ path: ".vscode/mcp.json", shouldCreate: ideDetection.vscode, target: MCP_HOST_TARGETS["copilot-vscode"] },
|
|
542
|
+
{ path: ".cursor/mcp.json", shouldCreate: ideDetection.cursor, target: MCP_HOST_TARGETS.cursor },
|
|
537
543
|
].map((t) => ({
|
|
538
544
|
...t,
|
|
539
|
-
topLevelKey:
|
|
545
|
+
topLevelKey: hostAdapterForTarget(t.target).topLevelKey,
|
|
540
546
|
}));
|
|
541
547
|
// ---- Phase 3a: read-only preflight, BEFORE the first write ----
|
|
542
548
|
// A run must either reconcile every config or change nothing. Discovering a
|
|
@@ -620,7 +626,7 @@ export async function runInit(cwd, options = {}) {
|
|
|
620
626
|
await io.mkdir(path.dirname(fullPath), { recursive: true });
|
|
621
627
|
const content = {
|
|
622
628
|
[target.topLevelKey]: {
|
|
623
|
-
[MCP_SERVER_NAME]: buildBridgeApiEntry(cwd, newEntryMetadata),
|
|
629
|
+
[MCP_SERVER_NAME]: adaptBridgeEntryForHostTarget(buildBridgeApiEntry(cwd, newEntryMetadata), target.target),
|
|
624
630
|
},
|
|
625
631
|
};
|
|
626
632
|
await io.writeFile(fullPath, JSON.stringify(content, null, 2) + "\n", "utf-8");
|
|
@@ -652,7 +658,7 @@ export async function runInit(cwd, options = {}) {
|
|
|
652
658
|
// fresh registration and uses MCP_SERVER_NAME.
|
|
653
659
|
if (!parsed[target.topLevelKey])
|
|
654
660
|
parsed[target.topLevelKey] = {};
|
|
655
|
-
parsed[target.topLevelKey][MCP_SERVER_NAME] = buildBridgeApiEntry(cwd, newEntryMetadata);
|
|
661
|
+
parsed[target.topLevelKey][MCP_SERVER_NAME] = adaptBridgeEntryForHostTarget(buildBridgeApiEntry(cwd, newEntryMetadata), target.target);
|
|
656
662
|
await io.writeFile(fullPath, JSON.stringify(parsed, null, 2) + "\n", "utf-8");
|
|
657
663
|
configActions.push({ path: target.path, action: "added entry" });
|
|
658
664
|
structuredActions.push({
|
|
@@ -789,6 +795,64 @@ export async function runInit(cwd, options = {}) {
|
|
|
789
795
|
if (skippedFiles.size > 0)
|
|
790
796
|
console.log(` Skipped (unchanged): ${skippedFiles.size}`);
|
|
791
797
|
console.log(` ${dirNames}`);
|
|
798
|
+
// ---- Phase 4a: Scaffold Codex-native repository skills ----
|
|
799
|
+
// Codex skills are a project-local, commit-safe surface. They intentionally
|
|
800
|
+
// do not participate in the global Codex MCP registration at
|
|
801
|
+
// ~/.codex/config.toml; that registration is owned by install-bridge.
|
|
802
|
+
const codexAssets = codexSkillAssets(COMMANDS);
|
|
803
|
+
const codexOutcomes = await Promise.all(codexAssets.map((asset) => {
|
|
804
|
+
const target = path.join(cwd, asset.relativePath);
|
|
805
|
+
return scaffoldFile(target, asset.content, path.dirname(target));
|
|
806
|
+
}));
|
|
807
|
+
const codexWritten = codexOutcomes.filter((outcome) => outcome !== "skipped").length;
|
|
808
|
+
const codexOverwritten = codexOutcomes.filter((outcome) => outcome === "overwritten").length;
|
|
809
|
+
const codexSkipped = codexOutcomes.filter((outcome) => outcome === "skipped").length;
|
|
810
|
+
console.log(`\nCodex skills: scaffolded ${codexAssets.length} skills into ${CODEX_SKILLS_DIR}/`);
|
|
811
|
+
if (codexWritten > 0)
|
|
812
|
+
console.log(` Written: ${codexWritten}`);
|
|
813
|
+
if (codexOverwritten > 0)
|
|
814
|
+
console.log(` Overwritten (content changed): ${codexOverwritten}`);
|
|
815
|
+
if (codexSkipped > 0)
|
|
816
|
+
console.log(` Skipped (unchanged): ${codexSkipped}`);
|
|
817
|
+
// ---- Phase 4a: Scaffold GitHub Copilot command artifacts ----
|
|
818
|
+
// VS Code Local agent discovers prompt files; Agent Host discovers project
|
|
819
|
+
// skills. Both artifacts are rendered from COMMANDS above, never a second
|
|
820
|
+
// Copilot-specific command catalog.
|
|
821
|
+
if (ideDetection.vscode) {
|
|
822
|
+
const promptsDir = path.join(cwd, ".github", "prompts");
|
|
823
|
+
const skillsDir = path.join(cwd, ".github", "skills");
|
|
824
|
+
const copilotWritten = new Set();
|
|
825
|
+
const copilotSkipped = new Set();
|
|
826
|
+
const copilotOverwritten = new Set();
|
|
827
|
+
const artifacts = commandEntries.map(([filename, content]) => ({
|
|
828
|
+
filename,
|
|
829
|
+
commandName: filename.replace(/\.md$/, ""),
|
|
830
|
+
...translateCommandToCopilot(filename, content),
|
|
831
|
+
}));
|
|
832
|
+
const outcomes = await Promise.all(artifacts.flatMap(({ filename, commandName, prompt, skill }) => [
|
|
833
|
+
scaffoldFile(path.join(promptsDir, filename.replace(/\.md$/, ".prompt.md")), prompt, promptsDir),
|
|
834
|
+
scaffoldFile(path.join(skillsDir, commandName, "SKILL.md"), skill, path.join(skillsDir, commandName)),
|
|
835
|
+
]));
|
|
836
|
+
artifacts.forEach(({ commandName }, i) => {
|
|
837
|
+
const commandOutcomes = outcomes.slice(i * 2, i * 2 + 2);
|
|
838
|
+
if (commandOutcomes.every((outcome) => outcome === "skipped")) {
|
|
839
|
+
copilotSkipped.add(commandName);
|
|
840
|
+
return;
|
|
841
|
+
}
|
|
842
|
+
if (commandOutcomes.some((outcome) => outcome === "overwritten")) {
|
|
843
|
+
copilotOverwritten.add(commandName);
|
|
844
|
+
}
|
|
845
|
+
copilotWritten.add(commandName);
|
|
846
|
+
});
|
|
847
|
+
console.log(`\nCopilot workflows: scaffolded ${total} prompt files and ${total} Agent Host skills`);
|
|
848
|
+
if (copilotWritten.size > 0)
|
|
849
|
+
console.log(` Written: ${copilotWritten.size}`);
|
|
850
|
+
if (copilotOverwritten.size > 0)
|
|
851
|
+
console.log(` Overwritten (content changed): ${copilotOverwritten.size}`);
|
|
852
|
+
if (copilotSkipped.size > 0)
|
|
853
|
+
console.log(` Skipped (unchanged): ${copilotSkipped.size}`);
|
|
854
|
+
console.log(" .github/prompts/ (VS Code Local agent) and .github/skills/ (Agent Host)");
|
|
855
|
+
}
|
|
792
856
|
// ---- Phase 4b: Scaffold shipped documentation assets ----
|
|
793
857
|
// Every doc asset the /install-bridge capability report points a human at,
|
|
794
858
|
// so no pointer it prints dangles inside an installed project: the
|
|
@@ -566,7 +566,7 @@ export const CONDUCTOR_PROFILE_EMPTY_MERGE_REMEDIATION = `run \`npx ${MCP_PACKAG
|
|
|
566
566
|
"then re-run `install conductor`.";
|
|
567
567
|
/** Remediation printed whenever the managed conductor hooks were not installed. */
|
|
568
568
|
export const CONDUCTOR_HOOKS_MANUAL_REMEDIATION = "re-run `install conductor` and accept the local-observability consent, or run " +
|
|
569
|
-
"`
|
|
569
|
+
"`epic-implementer install-git-hooks` directly.";
|
|
570
570
|
/**
|
|
571
571
|
* Phase: tool visibility.
|
|
572
572
|
*
|
|
@@ -713,7 +713,7 @@ async function runConductorLocalObservabilityPhase(deps, local) {
|
|
|
713
713
|
else {
|
|
714
714
|
// A skipped or warned hook is NOT provisioned local observability, and
|
|
715
715
|
// recording the capability here would make install state claim
|
|
716
|
-
// something a `
|
|
716
|
+
// something a `epic-implementer doctor` run would immediately contradict.
|
|
717
717
|
deps.log(" the managed hooks are not fully usable, so local observability was not recorded.");
|
|
718
718
|
manualActions.push(`local observability: ${CONDUCTOR_HOOKS_MANUAL_REMEDIATION}`);
|
|
719
719
|
}
|
|
@@ -791,7 +791,7 @@ export async function runInstallBridgeConductorCli(argv, deps) {
|
|
|
791
791
|
const access = accessResult.ok ? accessResult.access : null;
|
|
792
792
|
const accessError = accessResult.ok ? undefined : accessResult.error;
|
|
793
793
|
// ---- Phase 1: unified doctor, BEFORE every write -----------------------
|
|
794
|
-
deps.log("Phase 1/8 — running the unified
|
|
794
|
+
deps.log("Phase 1/8 — running the unified epic-implementer doctor (read-only)…");
|
|
795
795
|
const firstReport = await deps.runDoctor({
|
|
796
796
|
access,
|
|
797
797
|
accessError,
|
|
@@ -1040,7 +1040,7 @@ export async function runInstallBridgeConductorCli(argv, deps) {
|
|
|
1040
1040
|
else {
|
|
1041
1041
|
deps.log(" skipped — this caller supplied no local-provisioning seams.");
|
|
1042
1042
|
manualActions.push("local observability: run the packaged `install conductor` command, or " +
|
|
1043
|
-
"`
|
|
1043
|
+
"`epic-implementer install-git-hooks`, to install the managed conductor Git hooks.");
|
|
1044
1044
|
}
|
|
1045
1045
|
// The fail-loud hook-binary refusal exits 1 — but only AFTER the phase's
|
|
1046
1046
|
// read-only ledger report has been printed, which the phase guarantees.
|
|
@@ -1111,7 +1111,7 @@ export async function runInstallBridgeConductorCli(argv, deps) {
|
|
|
1111
1111
|
}
|
|
1112
1112
|
const matrix = renderCapabilityMatrix(deps, postReadiness);
|
|
1113
1113
|
deps.log("");
|
|
1114
|
-
deps.log(" re-running the unified
|
|
1114
|
+
deps.log(" re-running the unified epic-implementer doctor (read-only)…");
|
|
1115
1115
|
const finalReport = await deps.runDoctor({
|
|
1116
1116
|
access,
|
|
1117
1117
|
reviewPolicySource: options.reviewPolicy,
|