@bridge_gpt/mcp-server 0.2.68 → 0.2.70
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 +226 -320
- package/build/agent-launchers/claude-executor-adapter.js +17 -4
- package/build/agents.generated.js +4 -4
- package/build/artifact-diff.js +110 -0
- package/build/bin-entrypoint.js +36 -0
- package/build/bridge-permissions.js +650 -98
- package/build/check-update-cli.js +74 -0
- package/build/claude-review-workflow-drift.js +3 -3
- package/build/claude-settings.js +84 -2
- package/build/cli-help.js +7 -1
- package/build/codex-bridge-profile.js +1 -1
- package/build/codex-home.js +9 -1
- package/build/codex-launcher-pin.js +598 -0
- package/build/commands.generated.js +8 -8
- package/build/conductor/bridge-api-client.js +598 -19
- package/build/conductor/bring-up-facts.js +9 -9
- package/build/conductor/doctor.js +466 -18
- package/build/conductor/epic-child-continuation.js +54 -3
- package/build/conductor/epic-implementer-cli.js +132 -34
- package/build/conductor/epic-runtime.js +2 -2
- package/build/conductor/epic-state.js +1 -1
- package/build/conductor/hook-runtime-qualification.js +1 -1
- package/build/conductor/install-doctor.js +4 -2
- package/build/conductor/launch-need-probes.js +337 -0
- package/build/conductor/local-merge.js +241 -56
- package/build/conductor/merge-credential.js +172 -0
- package/build/conductor/merge-execution-eligibility.js +1 -1
- package/build/conductor/merged-child-check.js +95 -0
- package/build/conductor/plan-trim.js +30 -0
- package/build/conductor/pr-ci-producer.js +1 -1
- package/build/conductor/readiness-cli.js +11 -6
- package/build/conductor/readiness-prerequisites.js +41 -0
- package/build/conductor/readiness-sections.js +345 -55
- package/build/conductor/readiness.js +99 -87
- package/build/conductor/recovery-cli.js +606 -21
- package/build/conductor/recovery-operations.js +306 -7
- package/build/conductor/repair-contract.js +47 -2
- package/build/conductor/repository-workflow-remedy.js +8 -6
- package/build/conductor/stored-merge-credential.js +76 -0
- package/build/conductor/stored-merge-token-probe.js +28 -0
- package/build/conductor/temporary-plan.js +50 -0
- package/build/conductor/wait-run-cli.js +759 -0
- package/build/conductor/worker-database-doctor-inspector.js +49 -0
- package/build/conductor-bin.js +2 -2
- package/build/conductor-claude-hook-bin.js +2 -2
- package/build/conductor-claude-hook-removed-stub-bin.js +2 -5
- package/build/conductor-removed-stub-bin.js +2 -5
- package/build/connect-github-api.js +33 -14
- package/build/credential-store.js +356 -13
- package/build/docs.generated.js +27 -14
- package/build/doctor.js +203 -38
- package/build/drive-epic-help.js +212 -0
- package/build/drive-epic.js +1840 -373
- package/build/epic-ci-workflow-drift.js +77 -0
- package/build/epic-ci-workflow-install.js +183 -0
- package/build/epic-ci-workflow.js +157 -0
- package/build/epic-contract-context.js +326 -0
- package/build/epic-implementer-bin.js +131 -120
- package/build/epic-implementer-claude-hook-bin.js +2 -2
- package/build/escalation-reachability.js +134 -0
- package/build/executor/cleanup-report.js +99 -0
- package/build/executor/cli.js +12 -1
- package/build/executor/completion-contract.js +68 -11
- package/build/executor/completion-supervision.js +99 -0
- package/build/executor/delivery-outcome.js +179 -0
- package/build/executor/deps.js +3 -0
- package/build/executor/env.js +71 -0
- package/build/executor/failure-reason-codes.js +126 -0
- package/build/executor/heartbeat.js +38 -0
- package/build/executor/http-client.js +115 -4
- package/build/executor/integration-job.js +298 -5
- package/build/executor/job-errors.js +36 -6
- package/build/executor/job-runner.js +720 -36
- package/build/executor/likely-tests.js +36 -2
- package/build/executor/merge-job.js +145 -2
- package/build/executor/observation.js +73 -4
- package/build/executor/permissions.js +193 -97
- package/build/executor/preflight.js +14 -3
- package/build/executor/process-containment.js +28 -2
- package/build/executor/prompt-spec.js +50 -5
- package/build/executor/rebase-finalization.js +38 -3
- package/build/executor/reconcile-overlap-job.js +35 -7
- package/build/executor/required-work-ledger.js +236 -81
- package/build/executor/resume-pre-spawn.js +38 -1
- package/build/executor/runner.js +91 -3
- package/build/executor/test-clock.js +8 -0
- package/build/executor/types.js +37 -2
- package/build/executor/worker-cli-launcher.js +259 -0
- package/build/executor/worker-command.js +41 -4
- package/build/executor/worker-database-target.js +91 -0
- package/build/executor/worker-database.js +908 -0
- package/build/executor/worker-finalization.js +106 -0
- package/build/executor/worker-guard-hook.js +203 -0
- package/build/executor/worker-resources.js +47 -0
- package/build/executor/worker-verification-guidance.js +15 -2
- package/build/executor/worktree.js +303 -15
- package/build/executor-launch.js +11 -1
- package/build/generated-assets-doctor.js +9 -1
- package/build/generated-assets-health.js +13 -4
- package/build/generated-assets-legacy.js +39 -0
- package/build/generated-assets-paths.js +12 -1
- package/build/generated-assets-repair.js +4 -1
- package/build/generated-assets-test-support.js +12 -0
- package/build/github-remote.js +33 -0
- package/build/github-sign-in.js +62 -0
- package/build/index.js +1214 -465
- package/build/init.js +39 -1
- package/build/install-bridge-conductor-gate.js +78 -0
- package/build/install-bridge-conductor-setup.js +413 -0
- package/build/install-bridge-conductor.js +1226 -267
- package/build/install-bridge.js +629 -350
- package/build/launcher-config-inspection.js +184 -19
- package/build/mcp-host-targets.js +4 -0
- package/build/mcp-identity.js +7 -0
- package/build/mcp-install-state.js +8 -2
- package/build/merge-pull-request.js +6 -0
- package/build/merge-workflow-install.js +763 -345
- package/build/phase-result-artifacts.js +75 -20
- package/build/pipeline-orchestrator.js +247 -4
- package/build/pipelines.generated.js +35 -35
- package/build/plan-discovery.js +15 -2
- package/build/plan-execution-ledger.js +306 -17
- package/build/plan-phase-routing.js +48 -13
- package/build/plane/cli.js +105 -51
- package/build/plane/defaults.js +3 -0
- package/build/plane/plane-freshness.js +294 -0
- package/build/plane/schema-compatibility.js +137 -0
- package/build/plane/shutdown-deps.js +38 -0
- package/build/plane/shutdown.js +83 -8
- package/build/plane/terminal-run-cleanup.js +303 -0
- package/build/printed-remedy-commands.js +26 -4
- package/build/readiness-check.js +6 -2
- package/build/readiness-prerequisites.generated.js +532 -0
- package/build/readme.generated.js +1 -1
- package/build/session-upgrade-notice.js +86 -0
- package/build/setup-epic.js +400 -30
- package/build/shared-resources.generated.js +5 -0
- package/build/start-tickets.js +43 -15
- package/build/test-command-detection.js +247 -0
- package/build/test-command-validation.js +73 -0
- package/build/testing-config-client.js +150 -0
- package/build/ticket-delivery-artifacts.js +258 -0
- package/build/ticket-delivery-enrollment.js +306 -0
- package/build/ticket-delivery.js +205 -0
- package/build/ticket-review-summary.js +14 -0
- package/build/tool-call-advisory.js +162 -0
- package/build/tool-surface-gating.js +28 -89
- package/build/update-check.js +97 -16
- package/build/update-status.js +61 -71
- package/build/upgrade-advice.js +15 -11
- package/build/upgrade-cli.js +360 -20
- package/build/v2-readiness-requirements.js +552 -0
- package/build/version.generated.js +3 -3
- package/build/worker-guard-hook-bin.js +2 -2
- package/build/worktree-core.js +22 -7
- package/docs/BRIDGE-DIRECTORY-README.md +48 -0
- package/docs/EPIC-IMPLEMENTER-INSTALL.md +12 -867
- package/docs/EPIC-IMPLEMENTER.md +104 -63
- package/docs/epic-implementer/getting-started.md +131 -0
- package/docs/epic-implementer/self-hosting.md +133 -0
- package/package.json +3 -3
- package/pipelines/idea-to-ticket.json +1 -1
- package/pipelines/implement-ticket.json +8 -8
- package/pipelines/review-ticket.json +2 -2
- package/design-assets/favicon/favicon-32x32.png +0 -0
- package/design-assets/just-logo-rough-draft.png +0 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The single "should this session be told about an upgrade?" decision (BAPI-1446).
|
|
3
|
+
*
|
|
4
|
+
* Every notice surface asks here: the startup instructions, the first completed
|
|
5
|
+
* tool result, the Claude SessionStart hook, the `ping` advice, and the
|
|
6
|
+
* `start-tickets` reminder. One synchronous, non-throwing function holds every
|
|
7
|
+
* eligibility and silence rule, so the surfaces cannot drift apart.
|
|
8
|
+
*
|
|
9
|
+
* Nothing in this module touches the network or starts asynchronous work. The
|
|
10
|
+
* only I/O is the synchronous read of the local update cache.
|
|
11
|
+
*/
|
|
12
|
+
import { parseDefaultOnEnvFlag } from "./env-flags.js";
|
|
13
|
+
import { isNewerVersion, isPlainReleaseVersion, readCachedLatestVersion, readFakeLatestOverride, } from "./update-check.js";
|
|
14
|
+
import { formatSessionUpgradeNotice } from "./upgrade-advice.js";
|
|
15
|
+
/** The kill switch for every update check and notice. Default on. */
|
|
16
|
+
export const UPDATE_CHECK_ENABLED_ENV = "BAPI_MCP_UPDATE_CHECK_ENABLED";
|
|
17
|
+
/** Worker markers: either one means no person is watching the session. */
|
|
18
|
+
export const UNATTENDED_MARKER_ENVS = [
|
|
19
|
+
"BAPI_WORKER_BRANCH",
|
|
20
|
+
"BAPI_EPIC_IMPLEMENTER_WORKER_ID",
|
|
21
|
+
];
|
|
22
|
+
const SILENT = { show: false };
|
|
23
|
+
/** True when either worker marker holds a non-empty string. */
|
|
24
|
+
export function isUnattendedSession(env) {
|
|
25
|
+
return UNATTENDED_MARKER_ENVS.some((name) => {
|
|
26
|
+
const value = env[name];
|
|
27
|
+
return typeof value === "string" && value.trim().length > 0;
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Decide whether to show the upgrade notice. Never throws and never starts
|
|
32
|
+
* asynchronous work.
|
|
33
|
+
*
|
|
34
|
+
* Silence comes first: a disabled kill switch, an unattended session, or an
|
|
35
|
+
* invalid current version returns `{ show: false }` before any latest-version
|
|
36
|
+
* source is read.
|
|
37
|
+
*
|
|
38
|
+
* Latest-version sources, in order:
|
|
39
|
+
* 1. a valid `BAPI_MCP_UPDATE_CHECK_FAKE_LATEST` override;
|
|
40
|
+
* 2. a reliable, known authoritative latest from a settled live check, which
|
|
41
|
+
* stays authoritative even when it says "current" and an older cache
|
|
42
|
+
* would suggest an update;
|
|
43
|
+
* 3. the local cache, when the authoritative source is absent, still in
|
|
44
|
+
* flight, or failed.
|
|
45
|
+
*
|
|
46
|
+
* The cache ignores its own age on purpose. It is a lower bound: it can
|
|
47
|
+
* under-claim an update but never claims one that does not exist. Unknown,
|
|
48
|
+
* equal, older, or invalid versions are silent.
|
|
49
|
+
*/
|
|
50
|
+
export function getNoticeDecision(env, currentVersion, authoritativeLatest) {
|
|
51
|
+
try {
|
|
52
|
+
if (!parseDefaultOnEnvFlag(env[UPDATE_CHECK_ENABLED_ENV]))
|
|
53
|
+
return SILENT;
|
|
54
|
+
if (isUnattendedSession(env))
|
|
55
|
+
return SILENT;
|
|
56
|
+
if (!isPlainReleaseVersion(currentVersion))
|
|
57
|
+
return SILENT;
|
|
58
|
+
let latest = readFakeLatestOverride(env);
|
|
59
|
+
if (latest === null &&
|
|
60
|
+
authoritativeLatest &&
|
|
61
|
+
authoritativeLatest.known === true &&
|
|
62
|
+
isPlainReleaseVersion(authoritativeLatest.latest)) {
|
|
63
|
+
latest = authoritativeLatest.latest;
|
|
64
|
+
}
|
|
65
|
+
if (latest === null)
|
|
66
|
+
latest = readCachedLatestVersion(env);
|
|
67
|
+
if (!isPlainReleaseVersion(latest))
|
|
68
|
+
return SILENT;
|
|
69
|
+
if (!isNewerVersion(currentVersion, latest))
|
|
70
|
+
return SILENT;
|
|
71
|
+
return { show: true, current: currentVersion, latest };
|
|
72
|
+
}
|
|
73
|
+
catch {
|
|
74
|
+
return SILENT;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Append the session notice to the server's startup instructions when eligible.
|
|
79
|
+
* The base string is returned unchanged when the decision is silent.
|
|
80
|
+
*/
|
|
81
|
+
export function composeServerInstructions(baseInstructions, env, currentVersion) {
|
|
82
|
+
const decision = getNoticeDecision(env, currentVersion);
|
|
83
|
+
if (!decision.show)
|
|
84
|
+
return baseInstructions;
|
|
85
|
+
return `${baseInstructions} ${formatSessionUpgradeNotice(decision.current, decision.latest)}`;
|
|
86
|
+
}
|