@bridge_gpt/mcp-server 0.2.70 → 0.2.71
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 +5 -5
- package/build/agent-launchers/claude-executor-adapter.js +10 -1
- package/build/agent-registry.js +5 -5
- package/build/agents.generated.js +11 -1
- package/build/bounded-wait.js +9 -1
- package/build/bridge-permissions.js +13 -5
- package/build/commands.generated.js +3 -3
- package/build/conductor/bridge-api-client.js +260 -2
- package/build/conductor/command-drift-production.js +7 -2
- package/build/conductor/doctor.js +9 -3
- package/build/conductor/epic-implementer-cli.js +4 -0
- package/build/conductor/gate-discovery.js +524 -10
- package/build/conductor/gate-settings-review.js +451 -0
- package/build/conductor/launch-need-probes.js +16 -11
- package/build/conductor/launch-plan.js +145 -0
- package/build/conductor/precheck-timings.js +14 -0
- package/build/conductor/preview-observations.js +10 -0
- package/build/conductor/readiness-sections.js +4 -1
- package/build/conductor/recovery-cli.js +59 -2
- package/build/conductor/recovery-operations.js +45 -2
- package/build/docs.generated.js +1 -1
- package/build/drive-epic.js +188 -45
- package/build/epic-ci-workflow-drift.js +71 -23
- package/build/epic-ci-workflow-install.js +83 -26
- package/build/epic-ci-workflow-v1.js +132 -0
- package/build/epic-ci-workflow.js +174 -13
- package/build/epic-implementer-bin.js +18 -18
- package/build/executor/ci-rerun-job.js +220 -14
- package/build/executor/env.js +207 -3
- package/build/executor/gate-qualification-job.js +20 -5
- package/build/executor/job-runner.js +112 -11
- package/build/executor/likely-tests.js +6 -1
- package/build/executor/preflight.js +5 -0
- package/build/executor/process-containment.js +18 -0
- package/build/executor/prompt-spec.js +72 -13
- package/build/executor/reconcile-overlap-job.js +6 -1
- package/build/executor/worker-command.js +136 -1
- package/build/executor/worker-database.js +30 -11
- package/build/executor/worker-resources.js +12 -1
- package/build/executor/worker-verification-guidance.js +29 -0
- package/build/index.js +221 -165
- package/build/install-bridge-conductor-gate.js +195 -14
- package/build/install-bridge-conductor-setup.js +20 -6
- package/build/install-bridge-conductor.js +355 -37
- package/build/install-bridge.js +1 -1
- package/build/merge-workflow-install.js +20 -0
- package/build/pipelines.generated.js +2 -2
- package/build/plan-execution-ledger.js +23 -8
- package/build/plane/plane-freshness.js +6 -2
- package/build/plane/preflight.js +19 -0
- package/build/printed-remedy-commands.js +8 -1
- package/build/readme.generated.js +1 -1
- package/build/repository-toolchains.js +581 -0
- package/build/setup-epic.js +24 -7
- package/build/test-command-detection.js +58 -21
- package/build/ticket-delivery-artifacts.js +7 -0
- package/build/ticket-delivery-enrollment.js +67 -4
- package/build/version.generated.js +3 -3
- package/docs/EPIC-IMPLEMENTER.md +38 -0
- package/docs/epic-implementer/getting-started.md +58 -2
- package/package.json +2 -2
|
@@ -94,32 +94,46 @@ export const PR_DEPENDENCY_VALUES = [
|
|
|
94
94
|
"pr_preview_environment",
|
|
95
95
|
];
|
|
96
96
|
/**
|
|
97
|
-
* BAPI-1492: the verification hand-off vocabulary. Mirrored from
|
|
98
|
-
* `HANDOFF_ELIGIBLE_CLASSES`, and `HANDOFF_FIELDS` in
|
|
97
|
+
* BAPI-1492 / BAPI-1544: the verification hand-off vocabulary. Mirrored from
|
|
98
|
+
* `HANDOFF_CAUSES`, `HANDOFF_ELIGIBLE_CLASSES`, and `HANDOFF_FIELDS` in
|
|
99
99
|
* `api/library/vcs/ticket_delivery_identity.py`; both sides must agree.
|
|
100
100
|
*
|
|
101
101
|
* A hand-off is additive metadata on an escalated `pre_pr_verification` record for
|
|
102
|
-
*
|
|
103
|
-
* missing. It is never a disposition and never a `prDependency`
|
|
104
|
-
* may satisfy the step is decided only by the server, from
|
|
102
|
+
* a unit-test, E2E, or rendered-UI step whose check could not run because a
|
|
103
|
+
* prerequisite was missing. It is never a disposition and never a `prDependency`
|
|
104
|
+
* value. Whether it may satisfy the step is decided only by the server, from
|
|
105
|
+
* persisted run state.
|
|
106
|
+
*
|
|
107
|
+
* The contract has six fields. `cause` is a missing-capability cause only.
|
|
108
|
+
* `observation` is what the first attempt hit, and `corrected_invocation` is the
|
|
109
|
+
* corrected rerun and what it hit, so a zero-test selector or a wrong command can
|
|
110
|
+
* never pass for a missing capability. Both are secret-free narrative; for example
|
|
111
|
+
* a unit step whose acquire command timed out names the command and the timeout,
|
|
112
|
+
* never a token. `observed_head_sha` is the full head SHA the observation ran
|
|
113
|
+
* against, and the server requires it to equal the submission's own tested head.
|
|
114
|
+
* The narrative is a worker attestation: the server validates structure,
|
|
115
|
+
* vocabulary, sanitized non-blank text, eligibility, and head identity, and does
|
|
116
|
+
* not judge whether the prose proves a capability was missing.
|
|
105
117
|
*/
|
|
106
118
|
export const HANDOFF_CAUSES = [
|
|
107
119
|
"no_live_server",
|
|
108
120
|
"no_database",
|
|
109
121
|
"toolchain_unavailable",
|
|
110
122
|
"credential_unavailable",
|
|
123
|
+
"mcp_unavailable",
|
|
111
124
|
];
|
|
112
|
-
export const HANDOFF_ELIGIBLE_CLASSES = ["e2e_tests", "rendered_ui_review"];
|
|
125
|
+
export const HANDOFF_ELIGIBLE_CLASSES = ["unit_tests", "e2e_tests", "rendered_ui_review"];
|
|
113
126
|
export const HANDOFF_FIELDS = [
|
|
114
127
|
"cause",
|
|
115
128
|
"criterion",
|
|
116
129
|
"observation",
|
|
130
|
+
"corrected_invocation",
|
|
117
131
|
"observed_head_sha",
|
|
118
132
|
"next_action",
|
|
119
133
|
];
|
|
120
134
|
/** Mirrors the server's `MAX_EVIDENCE_TEXT`: longer text is truncated, not refused. */
|
|
121
135
|
export const HANDOFF_MAX_TEXT = 4000;
|
|
122
|
-
const HANDOFF_TEXT_FIELDS = ["criterion", "observation", "next_action"];
|
|
136
|
+
const HANDOFF_TEXT_FIELDS = ["criterion", "observation", "corrected_invocation", "next_action"];
|
|
123
137
|
const FULL_SHA_PATTERN = /^[0-9a-f]{40}$/;
|
|
124
138
|
/**
|
|
125
139
|
* Change categories that may never be adapted. Meeting one of these means the step's
|
|
@@ -623,7 +637,7 @@ export function validateHandoff(record, metadata, phase) {
|
|
|
623
637
|
fail("handoff is accepted only on a pre_pr_verification record");
|
|
624
638
|
}
|
|
625
639
|
if (!HANDOFF_ELIGIBLE_CLASSES.includes(owningPart.provenance_class)) {
|
|
626
|
-
fail("handoff is accepted only for e2e_tests or rendered_ui_review steps; review
|
|
640
|
+
fail("handoff is accepted only for unit_tests, e2e_tests, or rendered_ui_review steps; review steps always run");
|
|
627
641
|
}
|
|
628
642
|
if (record.prDependency !== undefined) {
|
|
629
643
|
fail("handoff cannot be combined with prDependency");
|
|
@@ -636,6 +650,7 @@ function normalizeHandoff(handoff) {
|
|
|
636
650
|
cause: handoff.cause,
|
|
637
651
|
criterion: bound(handoff.criterion),
|
|
638
652
|
observation: bound(handoff.observation),
|
|
653
|
+
corrected_invocation: bound(handoff.corrected_invocation),
|
|
639
654
|
observed_head_sha: handoff.observed_head_sha.trim().toLowerCase(),
|
|
640
655
|
next_action: bound(handoff.next_action),
|
|
641
656
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { monotonicNow, elapsedMs } from "../conductor/precheck-timings.js";
|
|
1
2
|
/**
|
|
2
3
|
* Local-plane freshness evidence (BAPI-1476).
|
|
3
4
|
*
|
|
@@ -199,12 +200,15 @@ export async function checkPlaneFreshness(repoRoot, deps, checkout, options) {
|
|
|
199
200
|
? manifestRead.manifest.snapshotPath
|
|
200
201
|
: checkout;
|
|
201
202
|
const guarded = async (run, fallback) => {
|
|
203
|
+
const started = monotonicNow();
|
|
204
|
+
let report;
|
|
202
205
|
try {
|
|
203
|
-
|
|
206
|
+
report = await run();
|
|
204
207
|
}
|
|
205
208
|
catch {
|
|
206
|
-
|
|
209
|
+
report = fallback();
|
|
207
210
|
}
|
|
211
|
+
return { ...report, duration_ms: elapsedMs(started) };
|
|
208
212
|
};
|
|
209
213
|
const [snapshot, database] = await Promise.all([
|
|
210
214
|
guarded(() => checkSnapshot(repoRoot, deps, options, timeoutMs, manifestRead), () => unverifiedSnapshot("the check did not complete")),
|
package/build/plane/preflight.js
CHANGED
|
@@ -21,6 +21,25 @@ import { detectClaudeLogin, formatClaudeLoginAdvisory } from "../claude-login.js
|
|
|
21
21
|
import { createReadinessCheck, createReadinessCheckSafely, } from "../readiness-check.js";
|
|
22
22
|
/** Files that must exist for a path to be this repository's root. */
|
|
23
23
|
const REQUIRED_REPO_FILES = ["main.py", "worker.py", "alembic.ini"];
|
|
24
|
+
/** Applicability only. Plane startup has additional, independent prerequisites. */
|
|
25
|
+
export async function isBridgeEngineRepository(repoRoot, fs) {
|
|
26
|
+
let missing = false;
|
|
27
|
+
for (const marker of [...REQUIRED_REPO_FILES, "scripts/conductor_health_check.py"]) {
|
|
28
|
+
try {
|
|
29
|
+
const entry = await fs.stat(path.join(repoRoot, marker));
|
|
30
|
+
if (entry.mode !== undefined && (entry.mode & 0o170000) !== 0o100000)
|
|
31
|
+
missing = true;
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
const code = error.code;
|
|
35
|
+
if (code === "ENOENT" || code === "ENOTDIR")
|
|
36
|
+
missing = true;
|
|
37
|
+
else
|
|
38
|
+
throw new Error("repository_identity_unverifiable");
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return !missing;
|
|
42
|
+
}
|
|
24
43
|
/** Phases in which a plane already serving a BOUND run can be re-attached to it. */
|
|
25
44
|
const BOUND_RUN_ATTACHABLE_PHASES = [
|
|
26
45
|
"lanes-starting",
|
|
@@ -44,6 +44,13 @@ export const PRINTED_CONDUCTOR_EXECUTOR_INSTALL_COMMAND = `${PRINTED_CONDUCTOR_I
|
|
|
44
44
|
export const PRINTED_DOCTOR_COMMAND = `${LAUNCHER} doctor`;
|
|
45
45
|
/** Sessionless GitHub App connection. `--repo` is optional for this command. */
|
|
46
46
|
export const PRINTED_CONNECT_GITHUB_COMMAND = `${LAUNCHER} connect-github`;
|
|
47
|
+
/**
|
|
48
|
+
* BAPI-1536 — save or replace the repository's stored test command. The flag is
|
|
49
|
+
* the consent for that one write; the placeholder is never filled in here.
|
|
50
|
+
*/
|
|
51
|
+
export const PRINTED_TEST_COMMAND_INSTALL_COMMAND = `${LAUNCHER} install conductor --test-command "<command>"`;
|
|
52
|
+
/** Explains the `<command>` placeholder; print it beside the test-command remedy. */
|
|
53
|
+
export const PRINTED_TEST_COMMAND_INSTRUCTION = "Replace <command> with the one command that runs your tests.";
|
|
47
54
|
/** Explains the `<check-name>` placeholder; print it beside a conductor command. */
|
|
48
55
|
export const PRINTED_CHECK_NAME_INSTRUCTION = "Run setup to create the workflow and store the required check.";
|
|
49
56
|
/** Explains the `<id>` placeholder of the executor command. */
|
|
@@ -65,7 +72,7 @@ export const READINESS_PREREQUISITE_FIXES = {
|
|
|
65
72
|
no_index: "Re-index the repository, then retry readiness.",
|
|
66
73
|
pending_index: "Wait for indexing to finish, then retry readiness.",
|
|
67
74
|
missing_workflow: `Run ${PRINTED_CONDUCTOR_INSTALL_COMMAND}, merge the workflow changes, then re-index the repository.`,
|
|
68
|
-
explicit_command:
|
|
75
|
+
explicit_command: `Run ${PRINTED_TEST_COMMAND_INSTALL_COMMAND}. ${PRINTED_TEST_COMMAND_INSTRUCTION}`,
|
|
69
76
|
escalation: "Declare a notify webhook, or verify the account email with live email delivery.",
|
|
70
77
|
self_host: "Check the self-host installation guide, then retry readiness.",
|
|
71
78
|
consent: "Turn on Allow unattended Epic Implementer runs on the repository Setup page, or use --attended.",
|