@bridge_gpt/mcp-server 0.2.74 → 0.2.76
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 +14 -7
- package/build/agent-launchers/prompt.js +9 -21
- package/build/agents.generated.js +6 -6
- package/build/authored-plan.js +542 -0
- package/build/bridge-permissions.js +8 -0
- package/build/codex-auto-recovery.js +25 -7
- package/build/commands.generated.js +7 -7
- package/build/conductor/bridge-api-client.js +807 -52
- package/build/conductor/declare-blocked.js +4 -0
- package/build/conductor/driver-pass.js +8 -0
- package/build/conductor/epic-implementer-cli.js +341 -96
- package/build/conductor/epic-server-journal.js +13 -0
- package/build/conductor/epic-server-recipe.js +15 -5
- package/build/conductor/epic-server-runtime.js +163 -45
- package/build/conductor/epic-server.js +13 -6
- package/build/conductor/gate-discovery.js +209 -9
- package/build/conductor/gate-settings-review.js +7 -11
- package/build/conductor/install-doctor.js +30 -2
- package/build/conductor/launch-plan.js +58 -12
- package/build/conductor/local-merge.js +54 -12
- package/build/conductor/open-decision-phrases.js +50 -0
- package/build/conductor/pr-ci-producer.js +12 -3
- package/build/conductor/prerequisite-inputs.js +181 -14
- package/build/conductor/readiness-sections.js +46 -13
- package/build/conductor/readiness.js +3 -40
- package/build/conductor/recovery-cli.js +12 -12
- package/build/conductor/repository-workflow-remedy.js +147 -7
- package/build/conductor/ui-readiness.js +224 -0
- package/build/conductor/wait-run-attention.js +9 -4
- package/build/conductor/wait-run-cli.js +9 -2
- package/build/connect-github-api.js +18 -0
- package/build/connect-github.js +35 -18
- package/build/docs.generated.js +3 -3
- package/build/drive-epic.js +787 -37
- package/build/epic-ci-workflow.js +3 -2
- package/build/epic-implementer-bin.js +200 -66
- package/build/epic-implementer-bundle-cli.js +61 -0
- package/build/epic-implementer-claude-hook-bin.js +1 -1
- package/build/epic-implementer-env.js +3 -4
- package/build/epic-integration-pr.js +5 -2
- package/build/epic-launch-context.js +8 -1
- package/build/epic-shared/cut-protocol.js +55 -3
- package/build/executor/completion-contract.js +24 -1
- package/build/executor/failure-reason-codes.js +2 -0
- package/build/executor/gate-qualification-job.js +193 -23
- package/build/executor/gate-qualification-tests-ran.js +232 -0
- package/build/executor/integration-job.js +56 -2
- package/build/executor/job-runner.js +13 -723
- package/build/executor/job-type-wrappers.js +734 -0
- package/build/executor/merge-job.js +45 -1
- package/build/executor/permissions.js +187 -2
- package/build/executor/preflight.js +6 -2
- package/build/executor/process-containment.js +8 -1
- package/build/executor/provider-checks.js +28 -5
- package/build/executor/reconcile-overlap-job.js +70 -17
- package/build/executor/required-verification.js +28 -2
- package/build/executor/required-work-ledger.js +7 -2
- package/build/executor/resume-pre-spawn.js +32 -8
- package/build/executor/runner.js +30 -5
- package/build/executor/types.js +9 -0
- package/build/executor/worker-database.js +6 -1
- package/build/executor/worker-guard-hook.js +24 -2
- package/build/executor/worktree.js +12 -1
- package/build/generated/ticket-status.js +20 -0
- package/build/index.js +627 -551
- package/build/init.js +16 -0
- package/build/install-bridge-conductor-answers.js +32 -1
- package/build/install-bridge-conductor-apply.js +21 -3
- package/build/install-bridge-conductor-assessment.js +185 -12
- package/build/install-bridge-conductor-compact.js +2 -0
- package/build/install-bridge-conductor-contracts.js +9 -1
- package/build/install-bridge-conductor-gate.js +257 -80
- package/build/install-bridge-conductor-setup.js +106 -6
- package/build/install-bridge-conductor-trial-report.js +170 -0
- package/build/install-bridge-conductor.js +740 -124
- package/build/mcp-host-config.js +54 -37
- package/build/phase-context-git-probe.js +16 -0
- package/build/pipelines.generated.js +15 -15
- package/build/plan-execution-ledger.js +27 -0
- package/build/plan-generation.js +17 -0
- package/build/plane/plane-freshness.js +43 -26
- package/build/printed-remedy-commands.js +62 -0
- package/build/readme.generated.js +1 -1
- package/build/repository-toolchains.js +11 -5
- package/build/scripts/saved-commands-config-field-driver.js +65 -0
- package/build/secret-redaction.js +3 -0
- package/build/setup-epic.js +51 -9
- package/build/test-support/create-preview-world.js +232 -0
- package/build/test-support/executor-source-files.js +1 -1
- package/build/ticket-delivery.js +65 -0
- package/build/v2-readiness-requirements.js +13 -4
- package/build/version.generated.js +3 -3
- package/build/worker-guard-hook-bin.js +2 -2
- package/build/worktree-core.js +51 -7
- package/docs/EPIC-IMPLEMENTER.md +83 -4
- package/docs/epic-implementer/getting-started.md +1 -1
- package/docs/install/github-app.md +79 -92
- package/package.json +1 -1
- package/pipelines/implement-ticket.json +2 -2
- package/build/conductor/epic-reconcile.js +0 -603
- package/build/conductor/epic-runtime.js +0 -2020
- package/build/conductor/epic-state.js +0 -774
|
@@ -66,6 +66,7 @@ import { buildLocalMergeChildEnv, sanitizeLocalMergeOutput, } from "../conductor
|
|
|
66
66
|
import { resolveMergeCredentialAtAction } from "../conductor/stored-merge-credential.js";
|
|
67
67
|
import { EPIC_INTEGRATION_PR_READ_TIMEOUT_MS, createProductionEpicIntegrationGhRunner, ensureEpicIntegrationPullRequest, } from "../epic-integration-pr.js";
|
|
68
68
|
import { EPIC_WORKAROUNDS_DIR_PATH } from "../epic-workarounds-path.js";
|
|
69
|
+
import { captureExecutorMergeIndex, stageExecutorAllowedTree, unstageExecutorExcludedPaths, } from "./permissions.js";
|
|
69
70
|
import { HANDOFF_REPORT_DETAIL_CODES, HANDOFF_REPORT_PAYLOAD_VERSION, HANDOFF_REPORT_SHAPES, INTEGRATION_ACTION_OPERATIONS, INTEGRATION_ACTION_OUTCOMES, INTEGRATION_ACTION_PROTOCOL_VERSION, MAX_HANDOFF_REPORT_COMMENT_CHARS, } from "./types.js";
|
|
70
71
|
/** The route prefix, mirrored from `api/routes/__init__.py`. */
|
|
71
72
|
export const INTEGRATION_ACTION_ROUTE_PREFIX = "/epic-integration-actions";
|
|
@@ -918,6 +919,9 @@ export function createIntegrationCorrectionDriver(action, deps) {
|
|
|
918
919
|
const baseSha = action.expected_base_sha;
|
|
919
920
|
const remoteUrl = `https://github.com/${action.provider_repository}.git`;
|
|
920
921
|
const destination = `refs/heads/${action.epic_branch}`;
|
|
922
|
+
// BAPI-1732: the protected-path index state of THIS action's conflicted merge.
|
|
923
|
+
// `null` is "not captured", distinct from a captured empty snapshot.
|
|
924
|
+
let mergeSnapshot = null;
|
|
921
925
|
const git = async (ctx, args, timeoutMs = GIT_TIMEOUT_MS, env) => {
|
|
922
926
|
try {
|
|
923
927
|
const r = await deps.runCommand("git", args, {
|
|
@@ -1025,6 +1029,21 @@ export function createIntegrationCorrectionDriver(action, deps) {
|
|
|
1025
1029
|
await restore(ctx);
|
|
1026
1030
|
return finish(complete({ outcome: "failed", detailCode: "merge_start_failed" }));
|
|
1027
1031
|
}
|
|
1032
|
+
// The merge's own protected-path index entries, kept so the worker's
|
|
1033
|
+
// staging of host files can be undone without losing them.
|
|
1034
|
+
mergeSnapshot = null;
|
|
1035
|
+
let captured = null;
|
|
1036
|
+
try {
|
|
1037
|
+
captured = await captureExecutorMergeIndex((args) => git(ctx, args));
|
|
1038
|
+
}
|
|
1039
|
+
catch {
|
|
1040
|
+
captured = null;
|
|
1041
|
+
}
|
|
1042
|
+
if (captured === null) {
|
|
1043
|
+
await restore(ctx);
|
|
1044
|
+
return finish(complete({ outcome: "failed", detailCode: "merge_start_failed" }));
|
|
1045
|
+
}
|
|
1046
|
+
mergeSnapshot = captured;
|
|
1028
1047
|
}
|
|
1029
1048
|
return {
|
|
1030
1049
|
kind: "spawn_worker",
|
|
@@ -1043,11 +1062,44 @@ export function createIntegrationCorrectionDriver(action, deps) {
|
|
|
1043
1062
|
await restore(ctx);
|
|
1044
1063
|
return complete({ outcome: "failed", detailCode: "worker_rewrote_history" });
|
|
1045
1064
|
}
|
|
1046
|
-
|
|
1065
|
+
const commitFailed = async () => {
|
|
1066
|
+
await restore(ctx);
|
|
1067
|
+
return complete({ outcome: "failed", detailCode: "commit_failed" });
|
|
1068
|
+
};
|
|
1069
|
+
const snapshot = mergeSnapshot;
|
|
1070
|
+
if (isConflict && snapshot === null)
|
|
1071
|
+
return commitFailed();
|
|
1072
|
+
// Stage the allowed tree only; protected host paths never enter the commit.
|
|
1073
|
+
try {
|
|
1074
|
+
await stageExecutorAllowedTree((args) => git(ctx, args));
|
|
1075
|
+
}
|
|
1076
|
+
catch {
|
|
1077
|
+
return commitFailed();
|
|
1078
|
+
}
|
|
1079
|
+
// Conflicted protected paths belong to the worker's resolution: stage exactly
|
|
1080
|
+
// those, in a call of their own.
|
|
1081
|
+
if (snapshot !== null && snapshot.conflicted.size > 0) {
|
|
1082
|
+
const literal = Array.from(snapshot.conflicted, (p) => `:(top,literal)${p}`);
|
|
1083
|
+
// `-f`: these paths are tracked and unmerged, but `info/exclude` also names
|
|
1084
|
+
// them, and Git refuses an ignored path without it.
|
|
1085
|
+
const resolved = await git(ctx, ["add", "-f", "--", ...literal]);
|
|
1086
|
+
if (resolved.exitCode !== 0)
|
|
1087
|
+
return commitFailed();
|
|
1088
|
+
}
|
|
1089
|
+
try {
|
|
1090
|
+
await unstageExecutorExcludedPaths((args) => git(ctx, args), isConflict ? (snapshot ?? undefined) : undefined);
|
|
1091
|
+
}
|
|
1092
|
+
catch {
|
|
1093
|
+
return commitFailed();
|
|
1094
|
+
}
|
|
1047
1095
|
if (isConflict) {
|
|
1048
1096
|
const unmerged = await git(ctx, ["ls-files", "-u"]);
|
|
1097
|
+
if (unmerged.exitCode !== 0)
|
|
1098
|
+
return commitFailed();
|
|
1049
1099
|
const markers = await git(ctx, ["grep", "--cached", "-n", "-I", "-E", "^(<{7}|>{7})( |$)"]);
|
|
1050
|
-
if (
|
|
1100
|
+
if (markers.exitCode !== 0 && markers.exitCode !== 1)
|
|
1101
|
+
return commitFailed();
|
|
1102
|
+
if (unmerged.stdout.trim().length > 0 || markers.exitCode === 0) {
|
|
1051
1103
|
await restore(ctx);
|
|
1052
1104
|
return complete({ outcome: "failed", detailCode: "conflicts_unresolved" });
|
|
1053
1105
|
}
|
|
@@ -1058,6 +1110,8 @@ export function createIntegrationCorrectionDriver(action, deps) {
|
|
|
1058
1110
|
await restore(ctx);
|
|
1059
1111
|
return complete({ outcome: "failed", detailCode: "correction_no_change" });
|
|
1060
1112
|
}
|
|
1113
|
+
if (staged.exitCode !== 1)
|
|
1114
|
+
return commitFailed();
|
|
1061
1115
|
}
|
|
1062
1116
|
const message = isConflict
|
|
1063
1117
|
? `Merge ${action.base_branch} into ${action.epic_branch}`
|