@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
package/build/mcp-host-config.js
CHANGED
|
@@ -27,12 +27,14 @@
|
|
|
27
27
|
* existing byte), and DECLINE (`manual-required`) an existing Bridge table
|
|
28
28
|
* rather than reserialize unrelated content.
|
|
29
29
|
*/
|
|
30
|
+
import { readFile as fsReadFile } from "fs/promises";
|
|
30
31
|
import { VERSION } from "./version.generated.js";
|
|
31
32
|
import { codexHome } from "./codex-home.js";
|
|
32
33
|
import { refreshBridgeApiPackageSpec } from "./init.js";
|
|
33
34
|
import { hostAdapterForTarget, } from "./mcp-host-targets.js";
|
|
34
35
|
import { adaptBridgeEntryForHostTarget, } from "./mcp-host-entry-adapter.js";
|
|
35
36
|
export { adaptBridgeEntryForHostTarget, } from "./mcp-host-entry-adapter.js";
|
|
37
|
+
import { resolveProfiles } from "./mcp-profile.js";
|
|
36
38
|
import { LEGACY_SERVER_NAMES, MCP_SERVER_NAME, MCP_PACKAGE_NAME, RECOGNIZED_SERVER_NAMES, resolveRegistrationKey, } from "./mcp-identity.js";
|
|
37
39
|
/**
|
|
38
40
|
* The secret-free, repair-oriented detail every duplicate-registration outcome
|
|
@@ -464,54 +466,46 @@ export const BRIDGE_PROFILE_TOKEN_CONFIGS = [
|
|
|
464
466
|
{ path: ".cursor/mcp.json", topLevelKey: "mcpServers" },
|
|
465
467
|
];
|
|
466
468
|
/**
|
|
467
|
-
*
|
|
468
|
-
* `
|
|
469
|
-
* deliberately NOT `resolveProfiles`, which force-injects the implicit `core`
|
|
470
|
-
* group the stored value never contains.
|
|
469
|
+
* The raw stored `BRIDGE_MCP_PROFILE` string on one registration entry, or
|
|
470
|
+
* `undefined` when none is stored. Null when the entry is not an object.
|
|
471
471
|
*/
|
|
472
|
-
function
|
|
473
|
-
if (typeof value !== "string")
|
|
474
|
-
return [];
|
|
475
|
-
return value
|
|
476
|
-
.split(",")
|
|
477
|
-
.map((t) => t.trim())
|
|
478
|
-
.filter((t) => t.length > 0);
|
|
479
|
-
}
|
|
480
|
-
/** The `BRIDGE_MCP_PROFILE` tokens stored on one registration entry, if any. */
|
|
481
|
-
function entryProfileTokens(entry) {
|
|
472
|
+
function entryStoredProfile(entry) {
|
|
482
473
|
if (!entry || typeof entry !== "object" || Array.isArray(entry))
|
|
483
474
|
return null;
|
|
484
475
|
const env = entry.env;
|
|
485
476
|
const stored = env && typeof env === "object" && !Array.isArray(env)
|
|
486
477
|
? env.BRIDGE_MCP_PROFILE
|
|
487
478
|
: undefined;
|
|
488
|
-
return
|
|
479
|
+
return { stored: typeof stored === "string" ? stored : undefined };
|
|
480
|
+
}
|
|
481
|
+
/** Whether a stored profile loads `token`, resolved exactly as the runtime does. */
|
|
482
|
+
function storedProfileLoads(stored, token) {
|
|
483
|
+
return resolveProfiles(stored).has(token);
|
|
489
484
|
}
|
|
490
485
|
/**
|
|
491
|
-
* Inspect one supported host config for
|
|
486
|
+
* Inspect one supported host config for Bridge entries loading `token`.
|
|
492
487
|
*
|
|
493
|
-
* BAPI-807:
|
|
488
|
+
* BAPI-807: entries are looked up under EVERY recognized registration key, not
|
|
494
489
|
* the `bridge-api` literal alone. A fresh install writes `bridge`, so reading
|
|
495
|
-
* only the legacy key would report `no-bridge-entry` for every current install
|
|
496
|
-
* and send the operator to re-run the base install that already ran.
|
|
490
|
+
* only the legacy key would report `no-bridge-entry` for every current install.
|
|
497
491
|
*
|
|
498
|
-
*
|
|
499
|
-
*
|
|
500
|
-
*
|
|
501
|
-
*
|
|
502
|
-
*
|
|
492
|
+
* BAPI-1719: group availability is the RESOLVED set (`resolveProfiles`), so
|
|
493
|
+
* `full` and any-case `Epic_Implementer` count as loaded, and the config is
|
|
494
|
+
* `token-present` only when EVERY inspected entry loads it. A config carrying
|
|
495
|
+
* both keys is flagged `duplicateRegistration`; choosing which duplicate wins is
|
|
496
|
+
* a write-path decision the writer refuses loudly.
|
|
503
497
|
*
|
|
504
|
-
* Every failure mode is an explicit state rather than a thrown error
|
|
505
|
-
*
|
|
506
|
-
* unreadable file is a diagnosable outcome the operator can act on. Neither may
|
|
507
|
-
* surface a filesystem message or JSON parser text.
|
|
498
|
+
* Every failure mode is an explicit state rather than a thrown error. Neither a
|
|
499
|
+
* filesystem message nor JSON parser text may escape.
|
|
508
500
|
*/
|
|
509
501
|
async function inspectOneProfileConfig(projectRoot, target, token, deps) {
|
|
510
502
|
const read = await readJsonHostConfig(joinPath(projectRoot, target.path), deps);
|
|
511
|
-
if (read.state === "missing")
|
|
503
|
+
if (read.state === "missing") {
|
|
512
504
|
return { path: target.path, state: "absent" };
|
|
513
|
-
|
|
505
|
+
}
|
|
506
|
+
if (read.state !== "valid") {
|
|
514
507
|
return { path: target.path, state: "unreadable" };
|
|
508
|
+
}
|
|
515
509
|
const root = read.value[target.topLevelKey];
|
|
516
510
|
if (!root || typeof root !== "object" || Array.isArray(root)) {
|
|
517
511
|
return { path: target.path, state: "no-bridge-entry" };
|
|
@@ -519,16 +513,22 @@ async function inspectOneProfileConfig(projectRoot, target, token, deps) {
|
|
|
519
513
|
const servers = root;
|
|
520
514
|
// Own properties only, for the same reason `resolveRegistrationKey` insists on
|
|
521
515
|
// it: a `bridge` inherited from a polluted prototype is not a registration.
|
|
522
|
-
const
|
|
523
|
-
|
|
524
|
-
.
|
|
525
|
-
|
|
516
|
+
const present = RECOGNIZED_SERVER_NAMES.filter((name) => Object.prototype.hasOwnProperty.call(servers, name));
|
|
517
|
+
const profiles = present
|
|
518
|
+
.map((name) => entryStoredProfile(servers[name]))
|
|
519
|
+
.filter((p) => p !== null);
|
|
520
|
+
if (profiles.length === 0) {
|
|
526
521
|
return { path: target.path, state: "no-bridge-entry" };
|
|
527
|
-
|
|
528
|
-
//
|
|
522
|
+
}
|
|
523
|
+
// Only booleans derived from the stored profiles escape this function — the
|
|
524
|
+
// env object itself is read here and nowhere else.
|
|
529
525
|
return {
|
|
530
526
|
path: target.path,
|
|
531
|
-
state:
|
|
527
|
+
state: profiles.every((p) => storedProfileLoads(p.stored, token))
|
|
528
|
+
? "token-present"
|
|
529
|
+
: "token-absent",
|
|
530
|
+
// Present only when true, so every earlier-shaped inspection keeps its exact keys.
|
|
531
|
+
...(present.length > 1 ? { duplicateRegistration: true } : {}),
|
|
532
532
|
};
|
|
533
533
|
}
|
|
534
534
|
/**
|
|
@@ -551,6 +551,23 @@ export async function inspectBridgeApiProfileToken(projectRoot, token, deps) {
|
|
|
551
551
|
bridgeEntryPresent: configs.some((c) => c.state === "token-present" || c.state === "token-absent"),
|
|
552
552
|
};
|
|
553
553
|
}
|
|
554
|
+
/**
|
|
555
|
+
* BAPI-1356 / BAPI-1719: whether `mergeBridgeApiProfileToken` has anything to do
|
|
556
|
+
* for `token`, from an inspection already in hand.
|
|
557
|
+
*
|
|
558
|
+
* True when any inspected Bridge entry lacks the group, and also when a config
|
|
559
|
+
* carries BOTH registration keys — the writer is what refuses that loudly, so a
|
|
560
|
+
* satisfied registration must never hide it. Absent, no-entry, and unreadable
|
|
561
|
+
* configs are excluded, exactly as the writer skips them. Setup and doctor both
|
|
562
|
+
* decide through this one function.
|
|
563
|
+
*/
|
|
564
|
+
export function profileMergeNeededFrom(inspection) {
|
|
565
|
+
return inspection.configs.some((c) => c.state === "token-absent" || c.duplicateRegistration === true);
|
|
566
|
+
}
|
|
567
|
+
/** Read-only: whether the writer has anything to do for `token` under `projectRoot`. */
|
|
568
|
+
export async function profileMergeNeeded(projectRoot, token, deps = { readFile: (p) => fsReadFile(p, "utf-8") }) {
|
|
569
|
+
return profileMergeNeededFrom(await inspectBridgeApiProfileToken(projectRoot, token, deps));
|
|
570
|
+
}
|
|
554
571
|
/**
|
|
555
572
|
* Whether a vendor kind's secret-delivery contract is VERIFIED. Only verified
|
|
556
573
|
* contracts are ever invoked; an uncertain contract falls back to a direct
|
|
@@ -66,3 +66,19 @@ export async function evaluateCheckpointReachability(options) {
|
|
|
66
66
|
return { head, reachable: "unknown", reason: classifyGitFailure(err) };
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* BAPI-1733 — choose the directory a checkpoint-reachability probe runs in.
|
|
71
|
+
*
|
|
72
|
+
* - A run-scoped call that names a worktree probes only that worktree's canonical
|
|
73
|
+
* verified path. The raw supplied path is never accepted as evidence.
|
|
74
|
+
* - The same call without a verified worktree returns `undefined`: the caller must
|
|
75
|
+
* make no git call and report an unknown head, never fall back to another checkout.
|
|
76
|
+
* - Every other call (unscoped, or a run id with no supplied path) probes the
|
|
77
|
+
* project root.
|
|
78
|
+
*/
|
|
79
|
+
export function selectCheckpointProbeRoot(options) {
|
|
80
|
+
if (options.epicRunId !== undefined && options.worktreePath !== undefined) {
|
|
81
|
+
return options.verifiedWorktree?.path;
|
|
82
|
+
}
|
|
83
|
+
return options.projectRoot;
|
|
84
|
+
}
|