@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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Combined, strictly read-only
|
|
2
|
+
* Combined, strictly read-only epic-implementer doctor report (BAPI-395, BAPI-418).
|
|
3
3
|
*
|
|
4
4
|
* Extends the existing SQLite ledger health report with local git hook health.
|
|
5
5
|
* Missing hooks and non-worktree directories are reported as a degraded
|
|
@@ -63,10 +63,67 @@ export const MCP_REGISTRATION_FORM_REMEDIATION = "build this package so an on-di
|
|
|
63
63
|
export const NODE_ENGINE_REMEDIATION = "reinstall the package so its package.json is readable; until then the expected Node version is " +
|
|
64
64
|
"unknown and a Node/ABI skew cannot be diagnosed.";
|
|
65
65
|
/** Remediation for a deny-enforcement result the readiness gate could not establish. */
|
|
66
|
-
export const DENY_ENFORCEMENT_SKIP_REMEDIATION = "run `
|
|
67
|
-
"preflight; `
|
|
66
|
+
export const DENY_ENFORCEMENT_SKIP_REMEDIATION = "run `epic-implementer doctor` (without --no-deny-probe) to execute the owning deny-enforcement " +
|
|
67
|
+
"preflight; `epic-implementer readiness` never spawns that probe itself.";
|
|
68
68
|
/** Explicit display value for an unset `BRIDGE_MCP_PROFILE`. */
|
|
69
69
|
export const MCP_PROFILE_UNSET = "(unset)";
|
|
70
|
+
/**
|
|
71
|
+
* The CLI-only verbs that call the Bridge API from a shell-spawned process and
|
|
72
|
+
* therefore resolve credentials themselves (CLAUDE.md "Shell-Spawned Credential
|
|
73
|
+
* Resolution"): the four BAPI-872 recovery verbs and the three BAPI-1154 repair
|
|
74
|
+
* verbs. `.mcp.json` env is invisible to them — only `BAPI_API_KEY` in the parent
|
|
75
|
+
* env and the user-scoped credential store count.
|
|
76
|
+
*/
|
|
77
|
+
export const CREDENTIALED_RECOVERY_COMMANDS = [
|
|
78
|
+
"stop-run",
|
|
79
|
+
"abandon-run",
|
|
80
|
+
"unpark",
|
|
81
|
+
"adopt-current-head-and-unpark",
|
|
82
|
+
"scope-reparse",
|
|
83
|
+
"dispatch-remediation",
|
|
84
|
+
"merge-child",
|
|
85
|
+
];
|
|
86
|
+
/** Remediation for recovery/repair verbs that cannot resolve Bridge credentials. */
|
|
87
|
+
export const REPAIR_CREDENTIAL_REMEDIATION = "export BAPI_API_KEY in the shell that runs `conductor`, or store a credential for this " +
|
|
88
|
+
"repository in ~/.config/bridge/credentials.json (target `bapi:<repo>`) — for example by " +
|
|
89
|
+
"re-running the Bridge install; `.mcp.json` env is not visible to a shell-spawned command. " +
|
|
90
|
+
"Diagnostic only: nothing is written for you.";
|
|
91
|
+
/**
|
|
92
|
+
* Inspect credential resolution for the recovery/repair verbs through the SAME
|
|
93
|
+
* shared resolver they use (`resolveConductorBridgeApiAccess` →
|
|
94
|
+
* `resolveBapiCredentials`). Read-only: it resolves, it never stores, migrates,
|
|
95
|
+
* or repairs anything, and it never calls the Bridge API. Any resolver failure
|
|
96
|
+
* — including a throw — is reported as unavailable, never as an exception.
|
|
97
|
+
*/
|
|
98
|
+
export async function inspectRepairVerbCredentials(env, resolve) {
|
|
99
|
+
let outcome;
|
|
100
|
+
try {
|
|
101
|
+
let run = resolve;
|
|
102
|
+
if (!run) {
|
|
103
|
+
// Lazy: keeps the credential/HTTP graph out of doctor.ts's static imports,
|
|
104
|
+
// exactly as the recovery verbs themselves load it.
|
|
105
|
+
const mod = await import("./bridge-api-client.js");
|
|
106
|
+
run = (d) => mod.resolveConductorBridgeApiAccess(d);
|
|
107
|
+
}
|
|
108
|
+
outcome = await run({ env });
|
|
109
|
+
}
|
|
110
|
+
catch {
|
|
111
|
+
outcome = { ok: false, kind: "credentials-unavailable" };
|
|
112
|
+
}
|
|
113
|
+
if (outcome.ok) {
|
|
114
|
+
return { commands: CREDENTIALED_RECOVERY_COMMANDS, available: true, kind: "available", warnings: [] };
|
|
115
|
+
}
|
|
116
|
+
const kind = typeof outcome.kind === "string" && outcome.kind ? outcome.kind : "credentials-unavailable";
|
|
117
|
+
return {
|
|
118
|
+
commands: CREDENTIALED_RECOVERY_COMMANDS,
|
|
119
|
+
available: false,
|
|
120
|
+
kind,
|
|
121
|
+
warnings: [
|
|
122
|
+
`Recovery/repair verbs (${CREDENTIALED_RECOVERY_COMMANDS.join(", ")}) cannot resolve Bridge ` +
|
|
123
|
+
`API credentials (${kind}): ${REPAIR_CREDENTIAL_REMEDIATION}`,
|
|
124
|
+
],
|
|
125
|
+
};
|
|
126
|
+
}
|
|
70
127
|
/**
|
|
71
128
|
* Explicit not-run state for the `deny_enforcement` section when the probe is
|
|
72
129
|
* skipped via `--no-deny-probe`. Enforcement is UNVERIFIED, so the state is
|
|
@@ -495,6 +552,7 @@ export async function buildConductorDoctorReport(deps = {}) {
|
|
|
495
552
|
native_ledger,
|
|
496
553
|
deny_enforcement,
|
|
497
554
|
claude_login,
|
|
555
|
+
repair_credentials: await inspectRepairVerbCredentials(deps.env ?? process.env, deps.resolveRepairAccess),
|
|
498
556
|
};
|
|
499
557
|
}
|
|
500
558
|
/**
|
|
@@ -615,6 +673,19 @@ export function formatConductorDoctorReport(report) {
|
|
|
615
673
|
for (const w of local_merge.warnings)
|
|
616
674
|
lines.push(` - ${w}`);
|
|
617
675
|
}
|
|
676
|
+
if (report.repair_credentials) {
|
|
677
|
+
const repair = report.repair_credentials;
|
|
678
|
+
lines.push("");
|
|
679
|
+
lines.push("Recovery/repair verb credentials (shell-spawned)");
|
|
680
|
+
lines.push("────────────────────────────────────────────────");
|
|
681
|
+
lines.push(`credentials resolve: ${repair.available} ${repair.available ? "[OK]" : `[WARNING] ${repair.kind}`}`);
|
|
682
|
+
lines.push(`commands: ${repair.commands.join(", ")}`);
|
|
683
|
+
if (repair.warnings.length > 0) {
|
|
684
|
+
lines.push("recovery credential warnings:");
|
|
685
|
+
for (const w of repair.warnings)
|
|
686
|
+
lines.push(` - ${w}`);
|
|
687
|
+
}
|
|
688
|
+
}
|
|
618
689
|
lines.push("");
|
|
619
690
|
lines.push("Native ledger module (required for conductor coordination)");
|
|
620
691
|
lines.push("─────────────────────────────────────────────────────────");
|
|
@@ -685,18 +756,18 @@ export const CONDUCTOR_READINESS_DESCRIPTORS = [
|
|
|
685
756
|
{ id: "claude-login", label: "Claude login" },
|
|
686
757
|
];
|
|
687
758
|
/** Remediation for a degraded local event ledger. */
|
|
688
|
-
export const CONDUCTOR_LEDGER_REMEDIATION = "run `
|
|
759
|
+
export const CONDUCTOR_LEDGER_REMEDIATION = "run `epic-implementer doctor` for the ledger detail, then re-create the local ledger directory with " +
|
|
689
760
|
"owner-only permissions; the ledger is local observability and never blocks a run.";
|
|
690
761
|
/** Remediation for degraded or missing managed git hooks. */
|
|
691
|
-
export const CONDUCTOR_GIT_HOOKS_REMEDIATION = "run `
|
|
762
|
+
export const CONDUCTOR_GIT_HOOKS_REMEDIATION = "run `epic-implementer install-git-hooks` to install the managed post-commit and reference-transaction " +
|
|
692
763
|
"hooks; they are local, opportunistic, and bypassable.";
|
|
693
764
|
/** Remediation for a Claude login this host cannot confirm. */
|
|
694
765
|
export const CONDUCTOR_CLAUDE_LOGIN_REMEDIATION = "run `claude login` on the host that will run conductor workers; Bridge stores no Anthropic " +
|
|
695
766
|
"credential and can only advise here.";
|
|
696
767
|
/** Fixed detail for a prerequisite whose owning inspection was not collected. */
|
|
697
|
-
const CONDUCTOR_UNCOLLECTED_DETAIL = "not collected — the
|
|
768
|
+
const CONDUCTOR_UNCOLLECTED_DETAIL = "not collected — the epic-implementer doctor did not report this inspection";
|
|
698
769
|
/** Fixed remediation for a prerequisite whose owning inspection was not collected. */
|
|
699
|
-
const CONDUCTOR_UNCOLLECTED_REMEDIATION = "run `
|
|
770
|
+
const CONDUCTOR_UNCOLLECTED_REMEDIATION = "run `epic-implementer doctor` directly to collect this inspection; its state is unknown, not healthy.";
|
|
700
771
|
/** Ordered outcomes an inspection contributed, or `[]` when it reported none. */
|
|
701
772
|
function outcomesOf(inspection) {
|
|
702
773
|
// Read defensively: an injected sentinel (and the installer's degraded-doctor
|
|
@@ -761,7 +832,7 @@ function gitHooksOutcome(report) {
|
|
|
761
832
|
/**
|
|
762
833
|
* Derive the deny-enforcement outcome.
|
|
763
834
|
*
|
|
764
|
-
* `
|
|
835
|
+
* `epic-implementer readiness` NEVER runs the owning probe: `runDenyEnforcementPreflight`
|
|
765
836
|
* spawns real headless agent runs costing minutes, and an advisory report is not
|
|
766
837
|
* a reason to pay that. When the report carries an explicitly skipped result the
|
|
767
838
|
* outcome is `skip` with a remediation naming the command that DOES run it —
|
|
@@ -829,7 +900,7 @@ function claudeLoginOutcome(report) {
|
|
|
829
900
|
* reword, and a gate that read it would change meaning on a copy edit.
|
|
830
901
|
*
|
|
831
902
|
* A null report yields the full descriptor set as failures rather than nothing:
|
|
832
|
-
* "the
|
|
903
|
+
* "the epic-implementer doctor could not be built" must not read as "there is nothing
|
|
833
904
|
* to report here".
|
|
834
905
|
*/
|
|
835
906
|
export function mapConductorDoctorReportToReadinessChecks(report) {
|