@bridge_gpt/mcp-server 0.2.71 → 0.2.73
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 +55 -17
- package/build/agent-launchers/claude-executor-adapter.js +22 -3
- package/build/agent-notes.js +171 -95
- package/build/agents.generated.js +7 -7
- package/build/bridge-permissions.js +31 -0
- package/build/bridge-worktree-inspection.js +237 -0
- package/build/check-evidence.js +6 -0
- package/build/ci-system-detection.js +50 -0
- package/build/ci-trigger-adapters.js +631 -0
- package/build/ci-trigger-install.js +106 -0
- package/build/claude-review-workflow.js +1 -1
- package/build/cli-help.js +6 -0
- package/build/codex-auto-recovery.js +126 -0
- package/build/codex-launcher-pin.js +33 -2
- package/build/codex-skill-adapter.js +5 -1
- package/build/command-host.js +33 -0
- package/build/commands.generated.js +7 -6
- package/build/conductor/bridge-api-client.js +1352 -50
- package/build/conductor/bring-up-facts.js +18 -5
- package/build/conductor/command-drift-production.js +42 -17
- package/build/conductor/command-drift.js +47 -0
- package/build/conductor/declare-blocked.js +554 -0
- package/build/conductor/doctor.js +187 -28
- package/build/conductor/driver-commands.js +141 -0
- package/build/conductor/driver-guard.js +277 -0
- package/build/conductor/driver-lapse.js +321 -0
- package/build/conductor/driver-register.js +176 -0
- package/build/conductor/driver-release.js +174 -0
- package/build/conductor/driver-session-state.js +315 -0
- package/build/conductor/epic-branch-ci-inspection.js +222 -29
- package/build/conductor/epic-implementer-cli.js +213 -13
- package/build/conductor/epic-server-database.js +162 -0
- package/build/conductor/epic-server-guidance.js +278 -0
- package/build/conductor/epic-server-journal.js +239 -0
- package/build/conductor/epic-server-processes.js +324 -0
- package/build/conductor/epic-server-recipe.js +397 -0
- package/build/conductor/epic-server-runtime.js +1207 -0
- package/build/conductor/epic-server-sfcc.js +107 -0
- package/build/conductor/epic-server-state.js +427 -0
- package/build/conductor/epic-server.js +594 -0
- package/build/conductor/gate-discovery.js +281 -10
- package/build/conductor/gate-settings-review.js +525 -5
- package/build/conductor/git-hooks-uninstall.js +112 -0
- package/build/conductor/git-hooks.js +81 -15
- package/build/conductor/guided-repair.js +10 -1
- package/build/conductor/install-doctor.js +2 -4
- package/build/conductor/launch-need-probes.js +6 -53
- package/build/conductor/launch-plan.js +318 -121
- package/build/conductor/local-merge.js +12 -1
- package/build/conductor/merge-execution-contract.js +1 -1
- package/build/conductor/merged-child-check.js +2 -1
- package/build/conductor/prerequisite-inputs.js +1213 -0
- package/build/conductor/readiness-assessment.js +93 -0
- package/build/conductor/readiness-cli.js +30 -9
- package/build/conductor/readiness-prerequisites.js +77 -5
- package/build/conductor/readiness-sections.js +146 -126
- package/build/conductor/readiness.js +21 -3
- package/build/conductor/recovery-cli.js +236 -15
- package/build/conductor/recovery-operations.js +34 -4
- package/build/conductor/repair-contract.js +33 -0
- package/build/conductor/tools.js +36 -4
- package/build/conductor/wait-run-attention.js +115 -0
- package/build/conductor/wait-run-cli.js +300 -21
- package/build/conductor/worker-database-doctor-inspector.js +34 -2
- package/build/conductor/worker-setup-tally.js +27 -0
- package/build/credential-store.js +96 -21
- package/build/dependency-install-declarations.js +212 -0
- package/build/docs.generated.js +4 -4
- package/build/doctor.js +91 -8
- package/build/drive-epic-help.js +23 -4
- package/build/drive-epic.js +1841 -340
- package/build/engine-paths.js +20 -0
- package/build/epic-branch-ci-summary.js +140 -0
- package/build/epic-capability-statement.js +107 -0
- package/build/epic-ci-workflow-drift.js +30 -15
- package/build/epic-ci-workflow-install.js +110 -42
- package/build/epic-ci-workflow-v2.js +274 -0
- package/build/epic-ci-workflow.js +38 -12
- package/build/epic-implementer-bin.js +2184 -52
- package/build/epic-launch-context.js +607 -0
- package/build/epic-launch-profile.js +1 -1
- package/build/epic-server-record.js +273 -0
- package/build/epic-shared/bridge-client.js +11 -3
- package/build/escalation-reachability.js +43 -0
- package/build/executor/ci-fix-test-runs.js +334 -0
- package/build/executor/cli.js +2 -0
- package/build/executor/completion-contract.js +24 -1
- package/build/executor/credentials.js +1 -1
- package/build/executor/delivery-observations.js +113 -0
- package/build/executor/delivery-outcome.js +30 -0
- package/build/executor/dependency-refresh-runner.js +132 -0
- package/build/executor/dependency-refresh.js +530 -0
- package/build/executor/deps.js +4 -0
- package/build/executor/env.js +119 -17
- package/build/executor/epic-server-context.js +141 -0
- package/build/executor/gate-qualification-job.js +127 -26
- package/build/executor/harness-coverage.js +19 -0
- package/build/executor/http-client.js +87 -6
- package/build/executor/index.js +2 -1
- package/build/executor/install-preflight.js +1 -1
- package/build/executor/job-runner.js +659 -87
- package/build/executor/likely-tests.js +94 -97
- package/build/executor/observation.js +8 -0
- package/build/executor/pre-pr-checks.js +363 -0
- package/build/executor/prompt-spec.js +127 -5
- package/build/executor/reconcile-overlap-job.js +5 -3
- package/build/executor/required-verification.js +28 -0
- package/build/executor/required-work-diagnostics.js +32 -0
- package/build/executor/required-work-ledger.js +955 -39
- package/build/executor/results.js +100 -0
- package/build/executor/service-discovery.js +42 -0
- package/build/executor/service-lifecycle.js +109 -2
- package/build/executor/service-uninstall.js +205 -0
- package/build/executor/service-unit.js +5 -3
- package/build/executor/terminal-mutation.js +8 -0
- package/build/executor/test-clock.js +3 -0
- package/build/executor/verification-hints.js +179 -0
- package/build/executor/worker-command.js +126 -5
- package/build/executor/worker-database-config.js +281 -0
- package/build/executor/worker-database-target.js +16 -12
- package/build/executor/worker-database.js +575 -116
- package/build/executor/worker-finalization.js +71 -10
- package/build/executor/worker-guard-hook.js +10 -2
- package/build/executor/worker-resources.js +25 -3
- package/build/executor/worker-verification-guidance.js +55 -5
- package/build/executor/worktree-inspection.js +42 -0
- package/build/executor/worktree.js +20 -1
- package/build/executor-launch.js +54 -2
- package/build/generated-assets-catalog.js +2 -2
- package/build/github-sign-in.js +1 -1
- package/build/index.js +1111 -381
- package/build/init.js +29 -14
- package/build/install-bridge-conductor-answers.js +465 -0
- package/build/install-bridge-conductor-apply.js +259 -0
- package/build/install-bridge-conductor-assessment.js +895 -0
- package/build/install-bridge-conductor-compact.js +161 -0
- package/build/install-bridge-conductor-contracts.js +63 -0
- package/build/install-bridge-conductor-gate.js +1383 -188
- package/build/install-bridge-conductor-setup.js +637 -92
- package/build/install-bridge-conductor.js +3163 -740
- package/build/install-bridge.js +601 -128
- package/build/install-maintenance.js +127 -0
- package/build/install-reexec.js +1 -1
- package/build/launcher-config-inspection.js +162 -1
- package/build/local-cleanup.js +59 -0
- package/build/mcp-grant-candidates.js +767 -0
- package/build/mcp-grant-doctor.js +63 -0
- package/build/mcp-grant.js +288 -0
- package/build/mcp-host-targets.js +8 -0
- package/build/mcp-identity.js +23 -0
- package/build/mcp-install-state.js +68 -2
- package/build/mcp-invoke.js +126 -13
- package/build/mcp-presets.js +107 -0
- package/build/mcp-provisioning.js +134 -2
- package/build/mcp-registration-doctor.js +31 -2
- package/build/mcp-server-invocation.js +6 -1
- package/build/merge-workflow-install.js +236 -111
- package/build/package-script-semantics.js +10 -0
- package/build/pipeline-utils.js +1 -1
- package/build/pipelines.generated.js +6 -6
- package/build/plan-discovery.js +97 -4
- package/build/plan-execution-ledger.js +248 -9
- package/build/plan-generation-io.js +262 -0
- package/build/plan-generation.js +424 -0
- package/build/plane/build-freshness.js +6 -1
- package/build/plane/cli.js +75 -9
- package/build/plane/plane-freshness.js +23 -7
- package/build/plane/preflight.js +50 -10
- package/build/plane/shutdown.js +19 -0
- package/build/plane/terminal-run-cleanup.js +23 -5
- package/build/plane/terminal-run-status.js +4 -0
- package/build/printed-remedy-commands.js +229 -15
- package/build/readiness-check.js +1 -1
- package/build/readiness-prerequisites.generated.js +311 -4
- package/build/readme.generated.js +1 -1
- package/build/repository-state-paths.js +38 -0
- package/build/repository-toolchains.js +50 -8
- package/build/run-unit-tests-launcher.js +8 -1
- package/build/setup-change-policy.js +32 -0
- package/build/setup-epic.js +1192 -198
- package/build/setup-progress.js +44 -0
- package/build/setup-question.js +180 -0
- package/build/start-tickets.js +4 -0
- package/build/test-command-detection.js +32 -88
- package/build/test-support/notes-fs.js +40 -0
- package/build/third-party-mcp-targets.js +30 -0
- package/build/ticket-delivery-enrollment.js +30 -8
- package/build/ticket-delivery-run-scope.js +128 -0
- package/build/upgrade-cli.js +85 -2
- package/build/v2-readiness-requirements.js +28 -1
- package/build/version.generated.js +3 -3
- package/build/worker-guard-hook-bin.js +2 -2
- package/build/worktrees.js +105 -0
- package/docs/EPIC-IMPLEMENTER-INSTALL.md +9 -1
- package/docs/EPIC-IMPLEMENTER.md +5 -0
- package/docs/epic-implementer/getting-started.md +42 -15
- package/docs/epic-implementer/self-hosting.md +14 -1
- package/package.json +2 -2
|
@@ -56,7 +56,7 @@ export function classifyDatabaseMigration(bringUp) {
|
|
|
56
56
|
const id = "database-migration-current";
|
|
57
57
|
if (bringUp === null)
|
|
58
58
|
return unreported(id);
|
|
59
|
-
if (
|
|
59
|
+
if (bringUp.migration_readable !== true || bringUp.database_migration_current === null) {
|
|
60
60
|
return {
|
|
61
61
|
id,
|
|
62
62
|
state: "unreadable",
|
|
@@ -65,7 +65,7 @@ export function classifyDatabaseMigration(bringUp) {
|
|
|
65
65
|
refusal: "database-migration-unreadable",
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
|
-
if (
|
|
68
|
+
if (bringUp.database_migration_current === false) {
|
|
69
69
|
return {
|
|
70
70
|
id,
|
|
71
71
|
state: "bad",
|
|
@@ -81,7 +81,7 @@ export function classifyWorkerPresent(bringUp) {
|
|
|
81
81
|
const id = "worker-present";
|
|
82
82
|
if (bringUp === null)
|
|
83
83
|
return unreported(id);
|
|
84
|
-
if (
|
|
84
|
+
if (bringUp.heartbeat_readable !== true || bringUp.worker_present === null) {
|
|
85
85
|
return {
|
|
86
86
|
id,
|
|
87
87
|
state: "unreadable",
|
|
@@ -90,7 +90,7 @@ export function classifyWorkerPresent(bringUp) {
|
|
|
90
90
|
refusal: "worker-heartbeat-unreadable",
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
|
-
if (
|
|
93
|
+
if (bringUp.worker_present === false) {
|
|
94
94
|
return {
|
|
95
95
|
id,
|
|
96
96
|
state: "bad",
|
|
@@ -109,7 +109,7 @@ export function classifySingleTransitionAuthority(bringUp) {
|
|
|
109
109
|
const id = "single-transition-authority";
|
|
110
110
|
if (bringUp === null)
|
|
111
111
|
return unreported(id);
|
|
112
|
-
if (
|
|
112
|
+
if (bringUp.heartbeat_readable !== true || bringUp.fresh_reconciler_count === null) {
|
|
113
113
|
return {
|
|
114
114
|
id,
|
|
115
115
|
state: "unreadable",
|
|
@@ -160,6 +160,19 @@ export function firstBringUpRefusal(bringUp) {
|
|
|
160
160
|
.filter((reason) => reason !== undefined));
|
|
161
161
|
return BRING_UP_REFUSAL_REASONS.find((reason) => reasons.has(reason)) ?? null;
|
|
162
162
|
}
|
|
163
|
+
/**
|
|
164
|
+
* BAPI-1595 — the first PROVEN-bad refusal only: a second reconciler, a database
|
|
165
|
+
* behind head, or a missing worker, each established by a readable fact. An
|
|
166
|
+
* unreported block and an unreadable fact are unknown, never a refusal, so the
|
|
167
|
+
* result is `null` for them. Same order as {@link firstBringUpRefusal}.
|
|
168
|
+
*/
|
|
169
|
+
export function firstProvenBringUpRefusal(bringUp) {
|
|
170
|
+
const reasons = new Set(classifyBringUpFacts(bringUp)
|
|
171
|
+
.filter((verdict) => verdict.state === "bad")
|
|
172
|
+
.map((verdict) => verdict.refusal)
|
|
173
|
+
.filter((reason) => reason !== undefined));
|
|
174
|
+
return BRING_UP_REFUSAL_REASONS.find((reason) => reasons.has(reason)) ?? null;
|
|
175
|
+
}
|
|
163
176
|
/**
|
|
164
177
|
* The operator sentence for one refusal: the fact, the observed condition, and
|
|
165
178
|
* one concrete remedy. The caller appends its own closing sentence ("No run was
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { spawnSync } from "node:child_process";
|
|
17
17
|
import { COMMANDS } from "../commands.generated.js";
|
|
18
|
+
import { buildPackagedAssetCatalog } from "../generated-assets-catalog.js";
|
|
18
19
|
import { probeCommandDrift, } from "./command-drift.js";
|
|
19
20
|
/** Bounded timeout for one Git subprocess. */
|
|
20
21
|
const GIT_TIMEOUT_MS = 5_000;
|
|
@@ -71,27 +72,51 @@ export function createCommandDriftGit(run) {
|
|
|
71
72
|
},
|
|
72
73
|
};
|
|
73
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* BAPI-1635 — normalize the installer's own rendered asset catalog for the probe.
|
|
77
|
+
* Documents are not commands, agents, or host mirrors of them and are left out;
|
|
78
|
+
* every other asset keeps its catalog destination, identifier, and rendered bytes.
|
|
79
|
+
* An empty result means the catalog is unusable and the probe keeps its command-only path.
|
|
80
|
+
*/
|
|
81
|
+
export function normalizeDriftAssets(catalog) {
|
|
82
|
+
return catalog.assets.flatMap((asset) => {
|
|
83
|
+
if (asset.kind === "document")
|
|
84
|
+
return [];
|
|
85
|
+
const name = asset.workflows[0];
|
|
86
|
+
return name === undefined ? [] : [{ id: asset.id, destination: asset.destination, content: asset.content, kind: asset.kind, name }];
|
|
87
|
+
});
|
|
88
|
+
}
|
|
74
89
|
/**
|
|
75
90
|
* Build the production drift inspector: resolve Bridge access, read the confirmed
|
|
76
91
|
* profile's `customized_commands` (an unconfirmed repository has none), and probe
|
|
77
92
|
* Git. Never throws; an unresolved credential or failed read is a `warn`.
|
|
78
93
|
*/
|
|
79
94
|
export function createCommandDriftInspector(options) {
|
|
80
|
-
return () =>
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
})
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
return () => {
|
|
96
|
+
let assets = [];
|
|
97
|
+
try {
|
|
98
|
+
assets = normalizeDriftAssets((options.buildCatalog ?? buildPackagedAssetCatalog)());
|
|
99
|
+
}
|
|
100
|
+
catch {
|
|
101
|
+
assets = [];
|
|
102
|
+
}
|
|
103
|
+
return probeCommandDrift({
|
|
104
|
+
catalog: COMMANDS,
|
|
105
|
+
...(assets.length > 0 ? { assets } : {}),
|
|
106
|
+
git: createCommandDriftGit(options.runGit ?? createGitRunner(options.cwd)),
|
|
107
|
+
fetchCustomizedCommands: async () => {
|
|
108
|
+
// Lazy: keeps the credential/HTTP graph out of the static imports, as the
|
|
109
|
+
// doctor's other credentialed inspections do.
|
|
110
|
+
const client = await import("./bridge-api-client.js");
|
|
111
|
+
const resolved = await client.resolveConductorBridgeApiAccess({
|
|
112
|
+
env: options.env,
|
|
113
|
+
cwd: options.cwd,
|
|
114
|
+
});
|
|
115
|
+
if (!resolved.ok)
|
|
116
|
+
throw new Error("profile-unavailable");
|
|
117
|
+
const read = await client.fetchConductorGateProfile(resolved.access, ((url, init) => (options.fetch ?? fetch)(url, init)));
|
|
118
|
+
return read.profile?.customized_commands ?? [];
|
|
119
|
+
},
|
|
120
|
+
});
|
|
121
|
+
};
|
|
97
122
|
}
|
|
@@ -10,6 +10,51 @@ const SAFE_COMMAND_FILE = /^([a-z][a-z0-9-]*)\.md$/;
|
|
|
10
10
|
export function commandDriftTrackedPath(name) {
|
|
11
11
|
return `.claude/commands/${name}.md`;
|
|
12
12
|
}
|
|
13
|
+
function validAsset(value) {
|
|
14
|
+
if (typeof value !== "object" || value === null)
|
|
15
|
+
return false;
|
|
16
|
+
const a = value;
|
|
17
|
+
return typeof a.id === "string" && a.id.length > 0 && typeof a.destination === "string" && a.destination.length > 0
|
|
18
|
+
&& typeof a.content === "string" && typeof a.name === "string" && a.name.length > 0
|
|
19
|
+
&& ["command", "skill", "prompt", "agent"].includes(String(a.kind));
|
|
20
|
+
}
|
|
21
|
+
/** Compare every normalized asset by HEAD blob. Absent or untracked destinations are not installed, never drift. */
|
|
22
|
+
async function probeAssets(assets, customized, git) {
|
|
23
|
+
if (!Array.isArray(assets) || !assets.every(validAsset)) {
|
|
24
|
+
return { status: "warn", kind: "unassessable", reason: "git-unavailable" };
|
|
25
|
+
}
|
|
26
|
+
const divergent = new Set();
|
|
27
|
+
const customizedDivergent = new Set();
|
|
28
|
+
const refs = [];
|
|
29
|
+
try {
|
|
30
|
+
for (const asset of [...assets].sort((a, b) => a.destination.localeCompare(b.destination))) {
|
|
31
|
+
const tracked = await git.trackedBlob(asset.destination);
|
|
32
|
+
if (!tracked.tracked)
|
|
33
|
+
continue;
|
|
34
|
+
const packaged = await git.hashObject(asset.content);
|
|
35
|
+
if (packaged === tracked.blobId)
|
|
36
|
+
continue;
|
|
37
|
+
if (customized.has(asset.name) || customized.has(asset.id))
|
|
38
|
+
customizedDivergent.add(asset.name);
|
|
39
|
+
else {
|
|
40
|
+
divergent.add(asset.name);
|
|
41
|
+
refs.push({ id: asset.id, destination: asset.destination, kind: asset.kind });
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
return { status: "warn", kind: "unassessable", reason: "git-unavailable" };
|
|
47
|
+
}
|
|
48
|
+
if (divergent.size === 0)
|
|
49
|
+
return { status: "pass", customizedDivergent: [...customizedDivergent].sort() };
|
|
50
|
+
return {
|
|
51
|
+
status: "warn",
|
|
52
|
+
kind: "divergent",
|
|
53
|
+
divergent: [...divergent].sort(),
|
|
54
|
+
customizedDivergent: [...customizedDivergent].sort(),
|
|
55
|
+
divergentAssets: refs,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
13
58
|
/** Run the probe. Never throws and never returns a `fail`. */
|
|
14
59
|
export async function probeCommandDrift(deps) {
|
|
15
60
|
let customized;
|
|
@@ -19,6 +64,8 @@ export async function probeCommandDrift(deps) {
|
|
|
19
64
|
catch {
|
|
20
65
|
return { status: "warn", kind: "unassessable", reason: "profile-unavailable" };
|
|
21
66
|
}
|
|
67
|
+
if (deps.assets !== undefined)
|
|
68
|
+
return probeAssets(deps.assets, customized, deps.git);
|
|
22
69
|
const names = [];
|
|
23
70
|
for (const key of Object.keys(deps.catalog)) {
|
|
24
71
|
const match = SAFE_COMMAND_FILE.exec(key);
|