@bridge_gpt/mcp-server 0.2.67 → 0.2.68
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 +178 -15
- package/build/agent-launchers/claude-executor-adapter.js +27 -0
- package/build/agents.generated.js +22 -2
- package/build/bitbucket-workspace-remote.js +136 -0
- package/build/bootstrap-project-identity.js +24 -0
- package/build/bridge-permissions.js +829 -0
- package/build/claude-settings.js +18 -0
- package/build/cli-help.js +21 -0
- package/build/command-assets-doctor.js +24 -70
- package/build/command-provisioning.js +29 -5
- package/build/commands.generated.js +8 -8
- package/build/conductor/bridge-api-client.js +714 -0
- package/build/conductor/command-drift-production.js +92 -0
- package/build/conductor/command-drift.js +89 -0
- package/build/conductor/doctor.js +69 -26
- package/build/conductor/epic-branch-ci-inspection.js +1375 -0
- package/build/conductor/epic-implementer-cli.js +76 -22
- package/build/conductor/gate-discovery.js +890 -0
- package/build/conductor/install-doctor.js +15 -3
- package/build/conductor/json-output.js +63 -0
- package/build/conductor/readiness-cli.js +95 -10
- package/build/conductor/readiness-sections.js +369 -3
- package/build/conductor/readiness.js +211 -8
- package/build/conductor/recovery-cli.js +110 -4
- package/build/conductor/recovery-operations.js +99 -1
- package/build/connect-bitbucket-api.js +41 -6
- package/build/connect-bitbucket.js +106 -33
- package/build/credential-store.js +207 -47
- package/build/docs.generated.js +57 -3
- package/build/doctor.js +92 -1
- package/build/drive-epic.js +45 -8
- package/build/epic-coherence-input.test-fixtures.js +4 -3
- package/build/epic-implementer-bin.js +1374 -25
- package/build/epic-workarounds-path.js +39 -0
- package/build/executor/cli.js +30 -0
- package/build/executor/completion-contract.js +18 -5
- package/build/executor/deps.js +4 -1
- package/build/executor/gate-qualification-job.js +499 -0
- package/build/executor/guarded-fast-forward-push.js +129 -0
- package/build/executor/integration-job.js +122 -8
- package/build/executor/job-errors.js +8 -1
- package/build/executor/job-runner.js +589 -47
- package/build/executor/likely-tests.js +290 -0
- package/build/executor/live-worker-registry.js +1 -1
- package/build/executor/observation.js +31 -2
- package/build/executor/packaged-recipe.js +106 -0
- package/build/executor/permissions.js +115 -28
- package/build/executor/platform.js +1 -1
- package/build/executor/preflight.js +61 -12
- package/build/executor/process-containment.js +36 -12
- package/build/executor/process.js +15 -7
- package/build/executor/prompt-spec.js +33 -1
- package/build/executor/recently-failed-tests-file.js +71 -0
- package/build/executor/reconcile-overlap-job.js +41 -23
- package/build/executor/required-verification.js +1 -1
- package/build/executor/required-work-ledger.js +105 -17
- package/build/executor/retirement.js +69 -0
- package/build/executor/runner.js +114 -11
- package/build/executor/test-clock.js +15 -0
- package/build/executor/types.js +32 -0
- package/build/executor/viewer-tabs.js +58 -8
- package/build/executor/worker-command.js +23 -7
- package/build/executor/worker-diagnostics.js +37 -0
- package/build/executor/worker-finalization.js +31 -5
- package/build/executor/worker-guard-hook.js +179 -25
- package/build/executor/worker-log.js +4 -3
- package/build/executor/worker-verification-guidance.js +37 -0
- package/build/executor/worktree.js +88 -11
- package/build/first-build-advisory.js +97 -0
- package/build/generated-assets-advisory.js +14 -0
- package/build/generated-assets-catalog.js +66 -0
- package/build/generated-assets-context.js +46 -0
- package/build/generated-assets-dependencies.js +26 -0
- package/build/generated-assets-doctor.js +50 -0
- package/build/generated-assets-health.js +65 -0
- package/build/generated-assets-host.js +17 -0
- package/build/generated-assets-inventory.js +17 -0
- package/build/generated-assets-paths.js +60 -0
- package/build/generated-assets-publisher.js +133 -0
- package/build/generated-assets-remedy.js +25 -0
- package/build/generated-assets-repair.js +72 -0
- package/build/generated-assets-session.js +71 -0
- package/build/generated-assets-test-support.js +35 -0
- package/build/index.js +964 -768
- package/build/init.js +54 -177
- package/build/install-bridge-conductor-gate.js +1372 -0
- package/build/install-bridge-conductor.js +289 -36
- package/build/install-bridge.js +544 -37
- package/build/mcp-install-state.js +50 -4
- package/build/merge-workflow-install.js +3 -4
- package/build/pipeline-utils.js +6 -2
- package/build/pipelines.generated.js +22 -142
- package/build/plan-execution-ledger.js +2 -32
- package/build/plane/manifest.js +16 -1
- package/build/plane/preflight.js +54 -1
- package/build/printed-remedy-commands.js +16 -1
- package/build/readme.generated.js +1 -1
- package/build/repair-assets.js +93 -0
- package/build/run-unit-tests-launcher.js +130 -49
- package/build/secret-redaction.js +33 -0
- package/build/setup-epic.js +108 -3
- package/build/start-tickets-prereqs.js +70 -16
- package/build/start-tickets.js +29 -5
- package/build/tool-surface-gating.js +36 -0
- package/build/upgrade-cli.js +55 -1
- package/build/version.generated.js +3 -3
- package/build/worker-guard-hook-bin.js +3 -2
- package/build/worker-guard-hook-main.js +1 -1
- package/build/worktree-core.js +15 -2
- package/docs/EPIC-IMPLEMENTER-INSTALL.md +30 -12
- package/docs/EPIC-IMPLEMENTER.md +68 -2
- package/package.json +3 -3
- package/pipelines/greenfield-setup.json +4 -128
- package/pipelines/implement-ticket.json +3 -2
package/build/claude-settings.js
CHANGED
|
@@ -127,3 +127,21 @@ export async function provisionClaudeSettingsForWorktree(worktreePath, mergeSett
|
|
|
127
127
|
}
|
|
128
128
|
return { ok: true };
|
|
129
129
|
}
|
|
130
|
+
/**
|
|
131
|
+
* The Claude Code settings key that turns auto-memory off (BAPI-1397, F6).
|
|
132
|
+
*
|
|
133
|
+
* Confirmed against the installed Claude Code 2.1.287: auto-memory is OFF when
|
|
134
|
+
* the merged settings carry `autoMemoryEnabled: false`, or when the environment
|
|
135
|
+
* sets `CLAUDE_CODE_DISABLE_AUTO_MEMORY` to a truthy value (which wins over the
|
|
136
|
+
* setting). Both forms are applied to executor workers.
|
|
137
|
+
*/
|
|
138
|
+
export const CLAUDE_AUTO_MEMORY_SETTING_KEY = "autoMemoryEnabled";
|
|
139
|
+
/** The environment form of the same control; a truthy value turns auto-memory off. */
|
|
140
|
+
export const CLAUDE_DISABLE_AUTO_MEMORY_ENV = "CLAUDE_CODE_DISABLE_AUTO_MEMORY";
|
|
141
|
+
/**
|
|
142
|
+
* Merge `autoMemoryEnabled: false` into a Claude settings object, keeping every
|
|
143
|
+
* other entry. Idempotent: re-applying it yields an equal object.
|
|
144
|
+
*/
|
|
145
|
+
export function mergeClaudeSettingsWithAutoMemoryDisabled(settings) {
|
|
146
|
+
return { ...settings, [CLAUDE_AUTO_MEMORY_SETTING_KEY]: false };
|
|
147
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { MCP_PACKAGE_NAME } from "./mcp-identity.js";
|
|
2
|
+
/** The one recovery command shared by terminal guidance surfaces. */
|
|
3
|
+
export const INSTALL_RECOVERY_COMMAND = `npx -y ${MCP_PACKAGE_NAME} install`;
|
|
4
|
+
/** Returns static CLI orientation text without resolving configuration or doing I/O. */
|
|
5
|
+
export function getTopLevelCliUsage() {
|
|
6
|
+
return `Usage: bridge-api-mcp-server [command]
|
|
7
|
+
|
|
8
|
+
Commands:
|
|
9
|
+
install Guided project and MCP host setup.
|
|
10
|
+
serve Run the MCP server over stdio.
|
|
11
|
+
No command also starts the stdio MCP server.
|
|
12
|
+
|
|
13
|
+
Already ran npm i ${MCP_PACKAGE_NAME}?
|
|
14
|
+
The package is installed; project and MCP host setup still need the installer.
|
|
15
|
+
From your intended project root, run:
|
|
16
|
+
${INSTALL_RECOVERY_COMMAND}
|
|
17
|
+
|
|
18
|
+
No uninstall is needed. Follow the remaining setup instructions.
|
|
19
|
+
Run install --help for detailed installer options.
|
|
20
|
+
`;
|
|
21
|
+
}
|
|
@@ -1,72 +1,26 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const MAX_LISTED_MISSING = 5;
|
|
19
|
-
/** The `path` API for the target platform (win32 vs posix). */
|
|
20
|
-
function pathApiForPlatform(platform) {
|
|
21
|
-
return platform === "win32" ? path.win32 : path.posix;
|
|
22
|
-
}
|
|
23
|
-
/** Render a bounded, deterministic list of missing filenames (generated order). */
|
|
24
|
-
function formatMissing(missing) {
|
|
25
|
-
if (missing.length <= MAX_LISTED_MISSING) {
|
|
26
|
-
return missing.join(", ");
|
|
27
|
-
}
|
|
28
|
-
const shown = missing.slice(0, MAX_LISTED_MISSING).join(", ");
|
|
29
|
-
return `${shown} (+${missing.length - MAX_LISTED_MISSING} more)`;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Probe whether `<worktreeRoot>/.claude/commands/` contains every packaged
|
|
33
|
-
* command asset. A `readFile` that resolves counts the asset as present (any
|
|
34
|
-
* contents); a rejection (missing OR unreadable) counts it as absent. Returns
|
|
35
|
-
* `found: true` only when every packaged command filename is present, otherwise a
|
|
36
|
-
* `found: false` result with a concise, actionable, secret-free detail that
|
|
37
|
-
* points the operator back to `start-tickets` (never to manually copying or
|
|
38
|
-
* committing generated files).
|
|
39
|
-
*/
|
|
40
|
-
export async function probeWorktreeCommandAssets(worktreeRoot, deps) {
|
|
41
|
-
const filenames = Object.keys(COMMANDS);
|
|
42
|
-
if (filenames.length === 0) {
|
|
43
|
-
return {
|
|
44
|
-
found: false,
|
|
45
|
-
detail: "Packaged command bundle is empty — reinstall or rebuild the MCP server package.",
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
const api = pathApiForPlatform(deps.platform);
|
|
49
|
-
const commandsDir = api.join(worktreeRoot, ".claude", "commands");
|
|
50
|
-
const missing = [];
|
|
51
|
-
for (const filename of filenames) {
|
|
52
|
-
try {
|
|
53
|
-
await deps.readFile(api.join(commandsDir, filename));
|
|
54
|
-
}
|
|
55
|
-
catch {
|
|
56
|
-
// Missing OR unreadable — either way the asset is not usable. We never
|
|
57
|
-
// surface the underlying error (it can carry paths / exception text).
|
|
58
|
-
missing.push(filename);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
if (missing.length === 0) {
|
|
62
|
-
return {
|
|
63
|
-
found: true,
|
|
64
|
-
detail: `${filenames.length} packaged command assets present under ${COMMAND_DIR_LABEL}`,
|
|
65
|
-
};
|
|
1
|
+
/** Metadata-only compatibility probe for worktree command assets. */
|
|
2
|
+
import { buildPackagedAssetCatalog } from "./generated-assets-catalog.js";
|
|
3
|
+
import { inspectPackagedDependency } from "./generated-assets-health.js";
|
|
4
|
+
import { packagedAssetRemedy } from "./generated-assets-remedy.js";
|
|
5
|
+
export async function probeWorktreeCommandAssets(root, deps) {
|
|
6
|
+
if (!deps.metadata)
|
|
7
|
+
return { found: false, detail: "Command-asset inspection indeterminate (metadata access unavailable)." };
|
|
8
|
+
const catalog = buildPackagedAssetCatalog();
|
|
9
|
+
const assets = catalog.assets.filter(a => a.kind === "command" && a.hosts.includes("claude"));
|
|
10
|
+
if (!assets.length || catalog.packageProblems.length)
|
|
11
|
+
return { found: false, detail: "Packaged command bundle is empty or unavailable — rebuild or reinstall the package." };
|
|
12
|
+
const findings = [];
|
|
13
|
+
const deadline = Date.now() + 1000;
|
|
14
|
+
for (const asset of assets) {
|
|
15
|
+
if (Date.now() >= deadline)
|
|
16
|
+
return { found: false, detail: "Command-asset inspection indeterminate (time budget)." };
|
|
17
|
+
findings.push(await inspectPackagedDependency(root, asset, { ...deps.metadata, platform: deps.platform }, deadline - Date.now()));
|
|
66
18
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
detail: `${
|
|
70
|
-
|
|
71
|
-
|
|
19
|
+
const unusable = findings.filter(f => f.status !== "present");
|
|
20
|
+
if (!unusable.length)
|
|
21
|
+
return { found: true, detail: `${assets.length} packaged command assets present under .claude/commands/` };
|
|
22
|
+
const shown = unusable.slice(0, 5).map(f => `${f.destination.split("/").at(-1)}: ${f.status} (${f.reason})`).join(", ");
|
|
23
|
+
const missing = unusable.filter(f => f.status === "missing").length;
|
|
24
|
+
const guidance = missing ? packagedAssetRemedy(root, "claude", undefined, deps.platform).command : "Resolve path/permission problems; use explicit --project-root and --host for provisioning.";
|
|
25
|
+
return { found: false, detail: `${unusable.length} of ${assets.length} packaged command assets unusable under .claude/commands/ (${shown}${unusable.length > 5 ? `, +${unusable.length - 5} more` : ""}). ${guidance}` };
|
|
72
26
|
}
|
|
@@ -25,8 +25,7 @@
|
|
|
25
25
|
* and rendered by the caller's existing orchestration boundary.
|
|
26
26
|
*/
|
|
27
27
|
import path from "path";
|
|
28
|
-
import {
|
|
29
|
-
import { codexSkillAssets } from "./codex-skill-adapter.js";
|
|
28
|
+
import { buildPackagedAssetCatalog } from "./generated-assets-catalog.js";
|
|
30
29
|
import { ensureGitInfoExcluded } from "./git-ignore-utils.js";
|
|
31
30
|
/** The exact exclude entry appended for the command directory (POSIX-relative). */
|
|
32
31
|
const COMMAND_DIR_EXCLUDE_ENTRY = ".claude/commands/";
|
|
@@ -59,7 +58,10 @@ export async function provisionCommandsForWorktree(worktreeRoot, deps, includeCo
|
|
|
59
58
|
? api.normalize(worktreeRoot)
|
|
60
59
|
: api.resolve(deps.cwd, worktreeRoot);
|
|
61
60
|
const commandsDir = api.join(normalizedRoot, ".claude", "commands");
|
|
62
|
-
const
|
|
61
|
+
const catalog = buildPackagedAssetCatalog();
|
|
62
|
+
const commandAssets = catalog.assets.filter(a => a.kind === "command" && a.hosts.includes("claude"));
|
|
63
|
+
const entries = commandAssets.map(a => [api.basename(a.destination), a.content]);
|
|
64
|
+
const successful = [];
|
|
63
65
|
if (entries.length === 0) {
|
|
64
66
|
// No runnable slash commands could ever be provisioned — fail loudly rather
|
|
65
67
|
// than reporting a hollow success.
|
|
@@ -74,6 +76,9 @@ export async function provisionCommandsForWorktree(worktreeRoot, deps, includeCo
|
|
|
74
76
|
const target = api.join(commandsDir, filename);
|
|
75
77
|
try {
|
|
76
78
|
await deps.readFile(target);
|
|
79
|
+
const asset = commandAssets.find(a => api.basename(a.destination) === filename);
|
|
80
|
+
if (asset)
|
|
81
|
+
successful.push(asset);
|
|
77
82
|
}
|
|
78
83
|
catch (err) {
|
|
79
84
|
if (isEnoentError(err)) {
|
|
@@ -92,6 +97,9 @@ export async function provisionCommandsForWorktree(worktreeRoot, deps, includeCo
|
|
|
92
97
|
await deps.mkdir(commandsDir, { recursive: true });
|
|
93
98
|
for (const [filename, content] of missing) {
|
|
94
99
|
await deps.writeFile(api.join(commandsDir, filename), content);
|
|
100
|
+
const asset = commandAssets.find(a => api.basename(a.destination) === filename);
|
|
101
|
+
if (asset)
|
|
102
|
+
successful.push(asset);
|
|
95
103
|
}
|
|
96
104
|
}
|
|
97
105
|
catch {
|
|
@@ -102,8 +110,8 @@ export async function provisionCommandsForWorktree(worktreeRoot, deps, includeCo
|
|
|
102
110
|
// Codex launch requires the full bundle. Fill only, preserving customer assets.
|
|
103
111
|
if (!fillError && includeCodexSkills) {
|
|
104
112
|
try {
|
|
105
|
-
for (const asset of
|
|
106
|
-
const target = api.join(normalizedRoot, asset.
|
|
113
|
+
for (const asset of catalog.assets.filter(a => a.kind === "skill" && a.hosts.includes("codex"))) {
|
|
114
|
+
const target = api.join(normalizedRoot, asset.destination);
|
|
107
115
|
try {
|
|
108
116
|
await deps.readFile(target);
|
|
109
117
|
}
|
|
@@ -113,6 +121,7 @@ export async function provisionCommandsForWorktree(worktreeRoot, deps, includeCo
|
|
|
113
121
|
await deps.mkdir(api.dirname(target), { recursive: true });
|
|
114
122
|
await deps.writeFile(target, asset.content);
|
|
115
123
|
}
|
|
124
|
+
successful.push(asset);
|
|
116
125
|
}
|
|
117
126
|
}
|
|
118
127
|
catch {
|
|
@@ -131,6 +140,13 @@ export async function provisionCommandsForWorktree(worktreeRoot, deps, includeCo
|
|
|
131
140
|
runCommand: deps.runCommand,
|
|
132
141
|
platform: deps.platform,
|
|
133
142
|
});
|
|
143
|
+
if (deps.recordAssets) {
|
|
144
|
+
// Inventory is machine-local state, just like the generated workflow files.
|
|
145
|
+
await ensureGitInfoExcluded(normalizedRoot, ".bridge/install-state.json", {
|
|
146
|
+
readFile: deps.readFile, writeFile: deps.writeFile, mkdir: deps.mkdir,
|
|
147
|
+
runCommand: deps.runCommand, platform: deps.platform,
|
|
148
|
+
});
|
|
149
|
+
}
|
|
134
150
|
if (includeCodexSkills) {
|
|
135
151
|
await ensureGitInfoExcluded(normalizedRoot, CODEX_SKILLS_EXCLUDE_ENTRY, {
|
|
136
152
|
readFile: deps.readFile,
|
|
@@ -145,6 +161,14 @@ export async function provisionCommandsForWorktree(worktreeRoot, deps, includeCo
|
|
|
145
161
|
excludeError =
|
|
146
162
|
"Command provisioning failed: could not add generated command assets to the worktree Git exclude file.";
|
|
147
163
|
}
|
|
164
|
+
if (deps.recordAssets && successful.length) {
|
|
165
|
+
try {
|
|
166
|
+
await deps.recordAssets(normalizedRoot, successful, includeCodexSkills ? ["claude", "codex"] : ["claude"]);
|
|
167
|
+
}
|
|
168
|
+
catch {
|
|
169
|
+
fillError ??= "Command provisioning failed: could not record packaged workflow inventory.";
|
|
170
|
+
}
|
|
171
|
+
}
|
|
148
172
|
if (fillError)
|
|
149
173
|
return { ok: false, error: fillError };
|
|
150
174
|
if (excludeError)
|