@bridge_gpt/mcp-server 0.2.59 → 0.2.62
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 +181 -51
- package/build/agent-guidance.generated.js +1 -1
- package/build/agent-notes.js +7 -1
- package/build/commands.generated.js +6 -6
- package/build/conductor/bridge-api-client.js +406 -4
- package/build/conductor/doctor.js +255 -53
- package/build/conductor/epic-runtime.js +11 -2
- package/build/conductor/install-doctor.js +24 -2
- package/build/conductor/local-merge.js +319 -26
- package/build/conductor/merge-execution-contract.js +86 -0
- package/build/conductor/merge-execution-eligibility.js +130 -0
- package/build/conductor/readiness-sections.js +256 -16
- package/build/conductor/readiness.js +203 -29
- package/build/conductor/recovery-operations.js +8 -2
- package/build/connect-bitbucket-api.js +6 -1
- package/build/connect-bitbucket.js +398 -88
- package/build/credential-store.js +172 -0
- package/build/docs.generated.js +2 -2
- package/build/doctor.js +277 -15
- package/build/drive-epic.js +147 -12
- package/build/epic-implementer-bin.js +15 -15
- package/build/epic-implementer-claude-hook-bin.js +1 -1
- package/build/epic-implementer-env.js +43 -14
- package/build/epic-integration-pr.js +61 -15
- package/build/epic-launch-profile.js +455 -0
- package/build/executor/ci-rerun-job.js +269 -0
- package/build/executor/cli.js +40 -0
- package/build/executor/credentials.js +28 -1
- package/build/executor/env.js +60 -0
- package/build/executor/http-client.js +45 -1
- package/build/executor/index.js +21 -4
- package/build/executor/integration-job.js +759 -0
- package/build/executor/job-runner.js +218 -9
- package/build/executor/job-types.js +12 -2
- package/build/executor/merge-job.js +11 -2
- package/build/executor/observation.js +114 -7
- package/build/executor/runner.js +101 -1
- package/build/executor/service-lifecycle.js +136 -0
- package/build/executor/service-unit.js +427 -9
- package/build/executor/types.js +48 -0
- package/build/index.js +479 -240
- package/build/install-bridge-conductor.js +599 -14
- package/build/install-bridge.js +448 -46
- package/build/mcp-install-state.js +42 -4
- package/build/merge-pull-request.js +103 -10
- package/build/merge-workflow-codeowners.js +224 -0
- package/build/merge-workflow-config.js +187 -0
- package/build/merge-workflow-drift.js +97 -0
- package/build/merge-workflow-install.js +638 -0
- package/build/merge-workflow.js +956 -0
- package/build/pipelines.generated.js +3 -3
- package/build/plane/cli.js +24 -2
- package/build/plane/preflight.js +68 -0
- package/build/plane/supervisor.js +6 -0
- package/build/readme.generated.js +1 -1
- package/build/run-unit-tests-launcher.js +5 -0
- package/build/setup-epic.js +263 -38
- package/build/version.generated.js +3 -3
- package/package.json +3 -3
- package/build/conduct-epic/bridge-client.js +0 -773
- package/build/conduct-epic/checkpoint-store.js +0 -542
- package/build/conduct-epic/cli.js +0 -3145
- package/build/conduct-epic/cut-protocol.js +0 -392
- package/build/conduct-epic/lock.js +0 -302
- package/build/conduct-epic/pr-state.js +0 -286
- package/build/conduct-epic/spawn.js +0 -113
- package/build/conductor/cli.js +0 -1278
- package/build/conductor-bundle-cli.js +0 -256
- package/build/direct-ticket-tools.js +0 -70
- package/build/executor/reconcile-overlap-governance.js +0 -129
- package/build/implement-epic/bridge-client.js +0 -773
- package/build/implement-epic/checkpoint-store.js +0 -542
- package/build/implement-epic/cli.js +0 -3158
- package/build/implement-epic/cut-protocol.js +0 -392
- package/build/implement-epic/lock.js +0 -302
- package/build/implement-epic/pr-state.js +0 -286
- package/build/implement-epic/spawn.js +0 -113
- package/build/plan-epic-conductor-eligibility.js +0 -213
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical byte identity for the Epic Implementer merge workflow (BAPI-1136).
|
|
3
|
+
*
|
|
4
|
+
* The merge workflow is the one file in a customer repository that can perform a
|
|
5
|
+
* privileged write on Bridge's behalf, so "is the installed copy the copy Bridge
|
|
6
|
+
* ships?" has to be answerable cheaply, in more than one place, and with one
|
|
7
|
+
* answer. This module is that one place.
|
|
8
|
+
*
|
|
9
|
+
* It follows `claude-review-workflow-drift.ts`'s shape deliberately: a leaf
|
|
10
|
+
* module with NO filesystem, network, or subprocess access, importing only the
|
|
11
|
+
* shared Git blob hash so two workflow-identity implementations cannot drift
|
|
12
|
+
* apart about what "the same file" means. Callers acquire bytes however their
|
|
13
|
+
* own layer already does and hand them in.
|
|
14
|
+
*
|
|
15
|
+
* Nothing here logs file content: a classification carries a path, a pair of
|
|
16
|
+
* SHAs, and a closed-vocabulary state — never bytes, never provider text.
|
|
17
|
+
*/
|
|
18
|
+
import { computeGitBlobSha } from "./claude-review-workflow-drift.js";
|
|
19
|
+
import { MERGE_WORKFLOW_PATH } from "./conductor/merge-execution-contract.js";
|
|
20
|
+
import { renderEpicImplementerMergeWorkflow } from "./merge-workflow.js";
|
|
21
|
+
export { MERGE_WORKFLOW_PATH };
|
|
22
|
+
/**
|
|
23
|
+
* The Git blob SHA-1 of the workflow this build renders.
|
|
24
|
+
*
|
|
25
|
+
* Computed, never hardcoded. A checked-in literal would be a second byte source
|
|
26
|
+
* the renderer could silently diverge from — exactly the drift this module
|
|
27
|
+
* exists to make impossible.
|
|
28
|
+
*/
|
|
29
|
+
export function canonicalMergeWorkflowSha() {
|
|
30
|
+
return computeGitBlobSha(Buffer.from(renderEpicImplementerMergeWorkflow(), "utf8"));
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Every Bridge-published historical rendering of the merge workflow, by Git blob
|
|
34
|
+
* SHA, with the contract version it declared.
|
|
35
|
+
*
|
|
36
|
+
* A future contract version adds its predecessor's SHA here, and only then can
|
|
37
|
+
* {@link classifyMergeWorkflowContent} return `managed_version_older`.
|
|
38
|
+
*
|
|
39
|
+
* ## Why a version-1 entry exists without a version bump (BAPI-1257)
|
|
40
|
+
*
|
|
41
|
+
* The first entry is a rendering that was published AS version 1 and then
|
|
42
|
+
* corrected WITHIN version 1. Its fork-origin guard read
|
|
43
|
+
* `jq -r '.isCrossRepository // true'`, and jq's `//` yields its right-hand side
|
|
44
|
+
* when the left is null OR FALSE — so a same-repository pull request, which
|
|
45
|
+
* every epic child is, read as `true` and the merge was refused as fork-origin.
|
|
46
|
+
* That rendering could never merge anything.
|
|
47
|
+
*
|
|
48
|
+
* The marker version is deliberately NOT bumped: the wire contract, the dispatch
|
|
49
|
+
* inputs and the command-fetch protocol are all unchanged, and
|
|
50
|
+
* `MERGE_WORKFLOW_EXPECTED_VERSION` is the server's deploy-ordering check, not a
|
|
51
|
+
* byte checksum. But without this entry a repository holding that rendering
|
|
52
|
+
* classifies as `modified_or_unrecognized`, and the installer's preflight hard
|
|
53
|
+
* refuses to touch a workflow Bridge does not recognise — leaving no automated
|
|
54
|
+
* path off a copy that cannot merge. Registering the superseded SHA restores it:
|
|
55
|
+
* the copy classifies `managed_version_older` and the installer opens its
|
|
56
|
+
* ordinary upgrade pull request.
|
|
57
|
+
*
|
|
58
|
+
* The SHA is the Git blob SHA of the complete superseded rendering, which is
|
|
59
|
+
* what {@link canonicalMergeWorkflowSha} computes for the current one.
|
|
60
|
+
*
|
|
61
|
+
* ## The version-1 entry added by BAPI-1259
|
|
62
|
+
*
|
|
63
|
+
* `0d44c814…` is the last version-1 rendering (the one BAPI-1257 corrected).
|
|
64
|
+
* Contract version 2 adds the `operation` input and the integration job, so a
|
|
65
|
+
* repository holding that rendering is an ordinary managed older version and
|
|
66
|
+
* the installer opens its upgrade pull request.
|
|
67
|
+
*/
|
|
68
|
+
export const MANAGED_MERGE_WORKFLOW_HISTORY = new Map([
|
|
69
|
+
["3d4956c9447223c37075069352cdd9aae2d561dc", 1],
|
|
70
|
+
["0d44c81436005beb3c314de1b98eaf972ef3b4db", 1],
|
|
71
|
+
]);
|
|
72
|
+
/**
|
|
73
|
+
* Classify an installed copy against the canonical bytes.
|
|
74
|
+
*
|
|
75
|
+
* `existing` is `null` for an absent file. The comparison is on RAW BYTES, not
|
|
76
|
+
* normalized text: a copy that differs only in line endings is still a copy this
|
|
77
|
+
* installer did not write, and treating it as identical would let a rewrite hide
|
|
78
|
+
* behind a whitespace-insensitive compare.
|
|
79
|
+
*/
|
|
80
|
+
export function classifyMergeWorkflowContent(existing) {
|
|
81
|
+
if (existing === null)
|
|
82
|
+
return "not_installed";
|
|
83
|
+
const canonical = renderEpicImplementerMergeWorkflow();
|
|
84
|
+
if (existing === canonical)
|
|
85
|
+
return "identical";
|
|
86
|
+
const sha = computeGitBlobSha(Buffer.from(existing, "utf8"));
|
|
87
|
+
if (MANAGED_MERGE_WORKFLOW_HISTORY.has(sha))
|
|
88
|
+
return "managed_version_older";
|
|
89
|
+
return "modified_or_unrecognized";
|
|
90
|
+
}
|
|
91
|
+
/** Operator-facing gloss for each classification. Secret-free and path-only. */
|
|
92
|
+
export const MERGE_WORKFLOW_CLASSIFICATION_TEXT = {
|
|
93
|
+
not_installed: `${MERGE_WORKFLOW_PATH} is not installed`,
|
|
94
|
+
identical: `${MERGE_WORKFLOW_PATH} already matches the version this build ships`,
|
|
95
|
+
managed_version_older: `${MERGE_WORKFLOW_PATH} is an older Bridge-managed version and can be upgraded`,
|
|
96
|
+
modified_or_unrecognized: `${MERGE_WORKFLOW_PATH} has been modified or is not a version Bridge published`,
|
|
97
|
+
};
|