@bridge_gpt/mcp-server 0.2.53 → 0.2.55
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 +116 -56
- package/build/agent-guidance.generated.js +3 -0
- package/build/agent-launchers/claude-executor-adapter.js +3 -0
- package/build/agent-launchers/claude.js +3 -3
- package/build/agent-launchers/prompt.js +8 -11
- package/build/agent-notes.js +178 -0
- package/build/agent-registry.js +5 -2
- package/build/agent-utils.js +58 -0
- package/build/agents.generated.js +1 -1
- package/build/base-ref.js +33 -9
- package/build/bounded-wait.js +174 -0
- package/build/codex-skill-adapter.js +55 -0
- package/build/commands.generated.js +6 -5
- package/build/conductor/bridge-api-client.js +235 -14
- package/build/conductor/bring-up-facts.js +187 -0
- package/build/conductor/claude-hook.js +7 -5
- package/build/conductor/cli.js +28 -0
- package/build/conductor/doctor.js +80 -9
- package/build/conductor/epic-implementer-cli.js +1298 -0
- package/build/conductor/epic-runtime.js +134 -98
- package/build/conductor/errors.js +2 -2
- package/build/conductor/git-ci-types.js +1 -1
- package/build/conductor/git-hooks.js +28 -14
- package/build/conductor/install-doctor.js +11 -5
- package/build/conductor/readiness-cli.js +10 -10
- package/build/conductor/readiness-sections.js +58 -9
- package/build/conductor/readiness.js +120 -4
- package/build/conductor/recovery-cli.js +289 -10
- package/build/conductor/recovery-operations.js +125 -2
- package/build/conductor/repair-contract.js +58 -0
- package/build/conductor/run-branch.js +137 -0
- package/build/conductor/store.js +2 -2
- package/build/conductor/supervisor-runtime.js +1 -1
- package/build/conductor/test-run-branch-vectors.js +165 -0
- package/build/conductor-bin.js +2 -139
- package/build/conductor-claude-hook-bin.js +2 -2
- package/build/conductor-claude-hook-removed-stub-bin.js +31 -0
- package/build/conductor-removed-stub-bin.js +30 -0
- package/build/docs.generated.js +1 -1
- package/build/doctor.js +145 -18
- package/build/drive-epic.js +752 -90
- package/build/epic-implementer-bin.js +145 -0
- package/build/epic-implementer-bundle-cli.js +264 -0
- package/build/epic-implementer-claude-hook-bin.js +3 -0
- package/build/epic-integration-pr.js +5 -3
- package/build/executor/claim-scope.js +104 -0
- package/build/executor/cli.js +14 -25
- package/build/executor/env-file-guard.js +82 -3
- package/build/executor/env.js +6 -0
- package/build/executor/interrupted-worktree.js +60 -0
- package/build/executor/job-errors.js +45 -0
- package/build/executor/job-runner.js +334 -9
- package/build/executor/job-types.js +25 -9
- package/build/executor/merge-tree-classifier.js +171 -0
- package/build/executor/reconcile-overlap-governance.js +129 -0
- package/build/executor/reconcile-overlap-job.js +989 -0
- package/build/executor/reconcile-overlap-types.js +14 -0
- package/build/executor/spawn-job-driver.js +1 -0
- package/build/executor/types.js +2 -0
- package/build/executor/worker-finalization.js +25 -2
- package/build/executor/worker-guard-hook.js +15 -7
- package/build/implement-epic/bridge-client.js +773 -0
- package/build/implement-epic/checkpoint-store.js +542 -0
- package/build/implement-epic/cli.js +3158 -0
- package/build/implement-epic/cut-protocol.js +392 -0
- package/build/implement-epic/lock.js +302 -0
- package/build/implement-epic/pr-state.js +286 -0
- package/build/implement-epic/spawn.js +113 -0
- package/build/index.js +657 -481
- package/build/init.js +72 -8
- package/build/install-bridge-conductor.js +5 -5
- package/build/install-bridge.js +403 -70
- package/build/local-artifact-storage.js +130 -0
- package/build/mcp-host-config.js +22 -60
- package/build/mcp-host-entry-adapter.js +18 -0
- package/build/mcp-host-targets.js +1 -21
- package/build/merge-pull-request.js +1 -1
- package/build/pipelines.generated.js +23 -16
- package/build/plan-epic-conductor-eligibility.js +1 -1
- package/build/plane/cli.js +321 -41
- package/build/plane/manifest.js +209 -1
- package/build/plane/member-roster.js +70 -0
- package/build/plane/preflight.js +128 -12
- package/build/plane/shutdown.js +18 -5
- package/build/plane/status.js +35 -1
- package/build/plane/supervisor.js +546 -164
- package/build/plane/types.js +25 -2
- package/build/polling-policy.js +72 -0
- package/build/readiness-check.js +3 -3
- package/build/readme.generated.js +1 -1
- package/build/review-generation.js +219 -0
- package/build/run-unit-tests-launcher.js +6 -1
- package/build/setup-epic.js +567 -38
- package/build/start-tickets-conductor.js +8 -7
- package/build/ticket-key-utils.js +4 -3
- package/build/ticket-review-artifact-gate.js +461 -0
- package/build/upgrade-cli.js +5 -26
- package/build/version.generated.js +3 -3
- package/build/worker-guard-hook-bin.js +1 -1
- package/docs/CONDUCTOR.md +8 -6
- package/docs/install/mcp-tool-integrations.md +23 -1
- package/package.json +5 -3
- package/pipelines/review-ticket.json +17 -4
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for the `reconcile_overlap` executor job (BAPI-1152).
|
|
3
|
+
*
|
|
4
|
+
* The server authors the payload (`api/library/epic_conductor/reconcile_overlap_payload.py`)
|
|
5
|
+
* and verifies the result (`reconcile_overlap_completion_contract.py`); these
|
|
6
|
+
* interfaces are the executor's view of both. They are deliberately plain data —
|
|
7
|
+
* validation lives in `reconcile-overlap-job.ts`, which refuses anything that does
|
|
8
|
+
* not match before a single subprocess runs.
|
|
9
|
+
*
|
|
10
|
+
* ARCHITECTURE BOUNDARY: executor-local. Imports nothing from the conductor
|
|
11
|
+
* runtime or the server-side reconciler graph.
|
|
12
|
+
*/
|
|
13
|
+
/** The payload schema version this executor understands. */
|
|
14
|
+
export const RECONCILE_OVERLAP_PAYLOAD_SCHEMA_VERSION = 1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/build/executor/types.js
CHANGED
|
@@ -17,6 +17,8 @@ export const EXECUTOR_JOB_TYPE_VALUES = [
|
|
|
17
17
|
"ci_fix",
|
|
18
18
|
"merge",
|
|
19
19
|
"smoke",
|
|
20
|
+
// BAPI-1151 registered it server-side; BAPI-1152 lands the executor body.
|
|
21
|
+
"reconcile_overlap",
|
|
20
22
|
];
|
|
21
23
|
/**
|
|
22
24
|
* Server-authoritative completion classification (T2 `ExecutorClassification`,
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
* this ticket removes. The reconciler stays the decision-maker — the executor
|
|
57
57
|
* only reports the observation (R14 rule 3).
|
|
58
58
|
*/
|
|
59
|
-
import { secretFreeErrorMessage, WorkerFinalizationMissingRemoteBranchAndPr, WorkerFinalizationPrBaseMismatch, WorkerFinalizationPrNotAttached, WorkerFinalizationSavedButUnfinalized, } from "./job-errors.js";
|
|
59
|
+
import { ReconcileOverlapPushUnfinalized, secretFreeErrorMessage, WorkerFinalizationMissingRemoteBranchAndPr, WorkerFinalizationPrBaseMismatch, WorkerFinalizationPrNotAttached, WorkerFinalizationSavedButUnfinalized, } from "./job-errors.js";
|
|
60
60
|
import { isImplementationStyleJobType } from "./job-types.js";
|
|
61
61
|
/** Bounded settling re-check defaults for the authoritative origin-tip lookup. */
|
|
62
62
|
const DEFAULT_ORIGIN_FINALIZATION_ATTEMPTS = 3;
|
|
@@ -361,6 +361,27 @@ function savedButUnfinalizedFailure(job, branch, originSha, workerHeadSha) {
|
|
|
361
361
|
last_commit_sha: originSha,
|
|
362
362
|
};
|
|
363
363
|
}
|
|
364
|
+
/**
|
|
365
|
+
* BAPI-1152: the `reconcile_overlap` counterpart of
|
|
366
|
+
* {@link savedButUnfinalizedFailure}. For that job the push is the WRAPPER's,
|
|
367
|
+
* made once and guarded by a lease on the recorded child head, and the worktree is
|
|
368
|
+
* reset to that head on every non-pushing exit. "Resume/finalize from the branch"
|
|
369
|
+
* would therefore send an operator to recover work that was deliberately
|
|
370
|
+
* discarded; what they need to know is that the guarded push did not land and
|
|
371
|
+
* which head origin actually carries.
|
|
372
|
+
*/
|
|
373
|
+
function reconcilePushUnfinalizedFailure(job, branch, originSha, pushedSha) {
|
|
374
|
+
const label = job.ticket_key ? `${job.ticket_key} (job ${job.id})` : `job ${job.id}`;
|
|
375
|
+
return {
|
|
376
|
+
error_kind: ReconcileOverlapPushUnfinalized,
|
|
377
|
+
error_message: `${label}: the reconciliation's guarded push of ${pushedSha.slice(0, 12)} did not land — ` +
|
|
378
|
+
`origin branch '${branch}' is at ${originSha.slice(0, 12)}. Nothing was lost: the ` +
|
|
379
|
+
`worktree was reset to the recorded child head, and the next reconciliation attempt ` +
|
|
380
|
+
`starts from origin's head.`,
|
|
381
|
+
classification: "crashed",
|
|
382
|
+
last_commit_sha: originSha,
|
|
383
|
+
};
|
|
384
|
+
}
|
|
364
385
|
/**
|
|
365
386
|
* Validate that an implementation-style job's clean exit actually published its
|
|
366
387
|
* work to origin AND left an attached pull request. Non-implementation-style jobs
|
|
@@ -451,7 +472,9 @@ export async function validateWorkerFinalization(input) {
|
|
|
451
472
|
if (trimmedHeadSha && remoteSha !== trimmedHeadSha) {
|
|
452
473
|
return {
|
|
453
474
|
ok: false,
|
|
454
|
-
failure:
|
|
475
|
+
failure: job.job_type === "reconcile_overlap"
|
|
476
|
+
? reconcilePushUnfinalizedFailure(job, trimmedBranch, remoteSha, trimmedHeadSha)
|
|
477
|
+
: savedButUnfinalizedFailure(job, trimmedBranch, remoteSha, trimmedHeadSha),
|
|
455
478
|
};
|
|
456
479
|
}
|
|
457
480
|
// BAPI-862: the work is provably ON ORIGIN. That was the whole of the success
|
|
@@ -315,10 +315,12 @@ function isOwnBranchDestination(destination, workerBranch) {
|
|
|
315
315
|
* `git push` — allowed ONLY when every explicit destination is the worker's own
|
|
316
316
|
* branch.
|
|
317
317
|
*
|
|
318
|
-
* A
|
|
319
|
-
*
|
|
320
|
-
*
|
|
321
|
-
*
|
|
318
|
+
* A worker with NO branch identity is denied every push, before anything else is
|
|
319
|
+
* considered (BAPI-1152 — the `reconcile_overlap` worker holds no remote write
|
|
320
|
+
* authority; its wrapper pushes). For a worker WITH an identity, a push with no
|
|
321
|
+
* explicit destination is allowed: it follows the branch's configured upstream,
|
|
322
|
+
* which for a conductor worker is the branch it is standing on. Everything else —
|
|
323
|
+
* a tag, a deletion refspec, another branch — denies. The
|
|
322
324
|
* per-flag globs in `permissions.ts` (`--tags`, `--delete`, `refs/tags/`, ` main`,
|
|
323
325
|
* `epic/`) cover the common spellings; this is the general rule underneath them.
|
|
324
326
|
*/
|
|
@@ -352,12 +354,18 @@ function evaluateGitPush(args, ctx) {
|
|
|
352
354
|
}
|
|
353
355
|
positional.push(token);
|
|
354
356
|
}
|
|
355
|
-
//
|
|
356
|
-
|
|
357
|
-
|
|
357
|
+
// BAPI-1152: branch identity is checked FIRST. A worker launched with no branch
|
|
358
|
+
// identity (a `reconcile_overlap` worker, which must never write to a remote)
|
|
359
|
+
// is denied EVERY push, including the refspec-less `git push` / `git push
|
|
360
|
+
// <remote>` forms below. Before this ordering those forms were allowed ahead of
|
|
361
|
+
// the branch check, so omitting the branch did not in fact deny a bare push.
|
|
358
362
|
const workerBranch = ctx.workerBranch;
|
|
359
363
|
if (typeof workerBranch !== "string" || workerBranch.length === 0)
|
|
360
364
|
return deny;
|
|
365
|
+
// `git push` / `git push <remote>` with no refspec: the configured upstream,
|
|
366
|
+
// which for a worker with a branch identity is its own job branch.
|
|
367
|
+
if (positional.length <= 1)
|
|
368
|
+
return { kind: "allow" };
|
|
361
369
|
const destinations = positional.slice(1);
|
|
362
370
|
return destinations.every((d) => isOwnBranchDestination(d, workerBranch))
|
|
363
371
|
? { kind: "allow" }
|