@bridge_gpt/mcp-server 0.2.58 → 0.2.59
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 +105 -109
- package/build/agent-registry.js +15 -0
- package/build/agent-utils.js +16 -8
- package/build/claude-user-config-doctor.js +1 -35
- package/build/codex-bridge-profile.js +1 -1
- package/build/commands.generated.js +5 -6
- package/build/conductor/bridge-api-client.js +149 -0
- package/build/conductor/bring-up-facts.js +1 -1
- package/build/conductor/claude-hook.js +16 -16
- package/build/conductor/doctor.js +24 -19
- package/build/conductor/epic-implementer-cli.js +38 -5
- package/build/conductor/epic-reconcile.js +1 -1
- package/build/conductor/epic-runtime.js +10 -10
- package/build/conductor/errors.js +3 -3
- package/build/conductor/file-scope-guard.js +4 -4
- package/build/conductor/git-ci-types.js +1 -1
- package/build/conductor/git-inspection.js +2 -2
- package/build/conductor/install-doctor.js +6 -6
- package/build/conductor/merge-ledger.js +2 -2
- package/build/conductor/pr-ci-producer.js +6 -6
- package/build/conductor/pr-review-producer.js +2 -2
- package/build/conductor/producer-ledger.js +2 -0
- package/build/conductor/readiness-sections.js +7 -7
- package/build/conductor/readiness.js +2 -2
- package/build/conductor/recovery-cli.js +243 -12
- package/build/conductor/recovery-operations.js +56 -4
- package/build/conductor/repair-contract.js +38 -4
- package/build/conductor/spec-review-producer.js +6 -6
- package/build/conductor/store.js +10 -10
- package/build/conductor/supervisor-config.js +14 -14
- package/build/conductor/supervisor-ledger.js +2 -2
- package/build/conductor/supervisor-message-relay.js +2 -2
- package/build/conductor/worker-ledger-cli.js +19 -19
- package/build/conductor-bundle-artifacts.js +2 -2
- package/build/doctor.js +16 -294
- package/build/drive-epic.js +65 -71
- package/build/epic-implementer-bin.js +22 -17
- package/build/epic-implementer-claude-hook-bin.js +4 -2
- package/build/epic-implementer-env.js +155 -0
- package/build/epic-integration-pr.js +2 -2
- package/build/epic-shared/bridge-client.js +773 -0
- package/build/epic-shared/cut-protocol.js +392 -0
- package/build/executor/env.js +19 -8
- package/build/executor/heartbeat.js +1 -1
- package/build/executor/job-errors.js +3 -3
- package/build/executor/job-runner.js +1 -1
- package/build/executor/merge-job.js +35 -3
- package/build/executor/observation.js +1 -1
- package/build/executor/preflight.js +1 -1
- package/build/executor/prompt-spec.js +1 -1
- package/build/executor/reconcile-overlap-job.js +10 -130
- package/build/executor/reconcile-overlap-types.js +1 -1
- package/build/executor/runner.js +1 -1
- package/build/implement-epic/cli.js +1 -1
- package/build/index.js +181 -218
- package/build/init.js +20 -28
- package/build/install-bridge-conductor.js +7 -7
- package/build/install-bridge.js +199 -7
- package/build/mcp-host-entry-adapter.js +6 -0
- package/build/mcp-host-targets.js +2 -0
- package/build/mcp-invoke.js +5 -5
- package/build/mcp-profile.js +2 -2
- package/build/mcp-provisioning.js +2 -2
- package/build/mcp-server-invocation.js +3 -3
- package/build/merge-pull-request.js +15 -0
- package/build/model-routing-host.js +25 -0
- package/build/model-routing-preferences.js +99 -0
- package/build/pipelines.generated.js +9 -9
- package/build/plan-epic-implementer-eligibility.js +215 -0
- package/build/plan-execution-ledger.js +8 -0
- package/build/plane/member-roster.js +5 -5
- package/build/plane/supervisor.js +1 -1
- package/build/plane/types.js +5 -5
- package/build/readiness-check.js +1 -1
- package/build/readme.generated.js +1 -1
- package/build/review-tickets.js +4 -4
- package/build/setup-epic.js +8 -8
- package/build/start-tickets-conductor.js +32 -32
- package/build/start-tickets-prereqs.js +4 -9
- package/build/start-tickets.js +475 -91
- package/build/version.generated.js +3 -3
- package/docs/CONDUCTOR.md +69 -18
- package/docs/install/mcp-tool-integrations.md +2 -1
- package/package.json +2 -2
- package/pipelines/implement-ticket.json +1 -1
- package/pipelines/plan-epic.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// AUTO-GENERATED — do not edit manually. Regenerate with: npm run build
|
|
2
|
-
export const VERSION = "0.2.
|
|
3
|
-
export const BUILD_COMMIT = "
|
|
4
|
-
export const LAUNCHER_ARGS = ["-y", "--prefer-offline", "@bridge_gpt/mcp-server@0.2.
|
|
2
|
+
export const VERSION = "0.2.59";
|
|
3
|
+
export const BUILD_COMMIT = "6caab78d0b75";
|
|
4
|
+
export const LAUNCHER_ARGS = ["-y", "--prefer-offline", "@bridge_gpt/mcp-server@0.2.59", "serve"];
|
package/docs/CONDUCTOR.md
CHANGED
|
@@ -159,18 +159,18 @@ the scheduler can catch overlaps you did not anticipate.
|
|
|
159
159
|
> reconciler). That backstop covers declared and undeclared nodes alike — which is
|
|
160
160
|
> exactly why omitting `touched_files` is safe to accept.
|
|
161
161
|
|
|
162
|
-
## The conductor CI gate — `
|
|
162
|
+
## The conductor CI gate — `epic-implementer-ci / gate` (BAPI-695)
|
|
163
163
|
|
|
164
164
|
**Before driving a run you want CI-gated, wire its policy.** The reconciler's
|
|
165
165
|
per-ticket `ci` gate reads **`policy_json.required_checks`** (a declared
|
|
166
166
|
`RunPolicy` key) and observes those check-run conclusions at the ticket PR's
|
|
167
167
|
**current head SHA**. If that list is empty, the observer short-circuits to
|
|
168
168
|
`PASSED` with `{"no_required_checks": true}` and **runs no CI at all** — the loop
|
|
169
|
-
merges on hand-verification only. `.github/workflows/
|
|
170
|
-
the real, always-reporting required context **`
|
|
169
|
+
merges on hand-verification only. `.github/workflows/epic-implementer-ci.yml` publishes
|
|
170
|
+
the real, always-reporting required context **`epic-implementer-ci / gate`**; set
|
|
171
171
|
|
|
172
172
|
```json
|
|
173
|
-
"policy_json": { "required_checks": ["
|
|
173
|
+
"policy_json": { "required_checks": ["epic-implementer-ci / gate"] }
|
|
174
174
|
```
|
|
175
175
|
|
|
176
176
|
on every run you want gated. The workflow existing is not enough — the context has
|
|
@@ -198,7 +198,7 @@ to be in the run policy.
|
|
|
198
198
|
|
|
199
199
|
**Once gated, expect this behavior:**
|
|
200
200
|
|
|
201
|
-
- The `ci` gate now waits for `
|
|
201
|
+
- The `ci` gate now waits for `epic-implementer-ci / gate` on the ticket PR's current head.
|
|
202
202
|
A complete **red** aggregator enters the bounded `ci_fix` remediation path; a
|
|
203
203
|
**missing or still-running** current-head context stays pending (never a hard
|
|
204
204
|
fail).
|
|
@@ -212,11 +212,11 @@ For the exact new-run/PATCH procedure (and the **whole-object `policy_json`
|
|
|
212
212
|
replacement** caution — GET, merge `required_checks` locally, PATCH the whole
|
|
213
213
|
object), and the immutable case-sensitive matching of the context string, see the
|
|
214
214
|
operator runbook, **§4a "Wire the conductor CI required check"**
|
|
215
|
-
([`docs/claude/epic-
|
|
215
|
+
([`docs/claude/epic-implementer-v2-operator-runbook.md`](../../docs/claude/epic-implementer-v2-operator-runbook.md)).
|
|
216
216
|
|
|
217
217
|
## Conductor observability (opt-in via `--conductor`, BAPI-394)
|
|
218
218
|
|
|
219
|
-
Conductor is **off by default** — without `--conductor` no `
|
|
219
|
+
Conductor is **off by default** — without `--conductor` no `BAPI_EPIC_IMPLEMENTER_*` env,
|
|
220
220
|
supervisor tab, or message-relay prompt is produced. With `--conductor`, a run mints
|
|
221
221
|
a single conductor `run_id` and emits one canonical `run.started` event into the
|
|
222
222
|
local conductor ledger (`~/.config/bridge/events.db`), attributing each worker by
|
|
@@ -224,11 +224,11 @@ local conductor ledger (`~/.config/bridge/events.db`), attributing each worker b
|
|
|
224
224
|
the selected agent is **Claude Code**, the CLI also injects a conductor lifecycle
|
|
225
225
|
hook into each created worktree's `.claude/settings.local.json` (preserving any
|
|
226
226
|
existing hooks) so the spawned session streams local `run.started` / `run.stopped` /
|
|
227
|
-
`agent.notification` (and, with `
|
|
227
|
+
`agent.notification` (and, with `BAPI_EPIC_IMPLEMENTER_ENABLE_PRE_TOOL_USE=1`,
|
|
228
228
|
`tool.intent`) events. Per-worker conductor identity is passed only via secret-free
|
|
229
229
|
environment scoped to that one terminal/tab/session — no credentials are ever placed
|
|
230
230
|
in the env, hook command, or run metadata. Override the gate/supervisor labels with
|
|
231
|
-
`
|
|
231
|
+
`BAPI_EPIC_IMPLEMENTER_GATE_NAME` / `BAPI_EPIC_IMPLEMENTER_SUPERVISOR_MODE`. Inspect the stream
|
|
232
232
|
with `epic-implementer doctor`. Observability is best-effort: a conductor failure never
|
|
233
233
|
blocks or aborts a spawn, and `--dry-run` performs no conductor side effects.
|
|
234
234
|
(Epic dispatch always enables conductor internally, independent of this flag.)
|
|
@@ -238,6 +238,57 @@ When `--conductor` is set, the spawn boundary also injects
|
|
|
238
238
|
supervisor MCP tools (a plain `start-tickets` run stays on the default `core`
|
|
239
239
|
profile). See [README → Environment Variables](../README.md#environment-variables).
|
|
240
240
|
|
|
241
|
+
### Environment-variable names and the legacy-name refusal (BAPI-1190)
|
|
242
|
+
|
|
243
|
+
Every Epic Implementer environment variable uses the `BAPI_EPIC_IMPLEMENTER_`
|
|
244
|
+
prefix, and the worker Node path is `EPIC_IMPLEMENTER_NODE_PATH`. These replaced
|
|
245
|
+
the old Conductor names by a plain token swap: `CONDUCTOR` became
|
|
246
|
+
`EPIC_IMPLEMENTER` and the rest of the name stayed the same. For example, the old
|
|
247
|
+
run-id variable is now `BAPI_EPIC_IMPLEMENTER_RUN_ID`. There are no aliases and no
|
|
248
|
+
dual reads.
|
|
249
|
+
|
|
250
|
+
**Old names are refused, not ignored.** If any variable with the old
|
|
251
|
+
`BAPI_CONDUCTOR_` prefix, or the old `CONDUCTOR_NODE_PATH`, is set, these entry
|
|
252
|
+
points refuse to start:
|
|
253
|
+
|
|
254
|
+
| Entry point | On an old name |
|
|
255
|
+
|---|---|
|
|
256
|
+
| MCP server (bare startup) and every `npx @bridge_gpt/mcp-server <subcommand>` | stderr diagnostic, exit `1`, before any spawn, network call, ledger open, or file write |
|
|
257
|
+
| `epic-implementer` bin | stderr diagnostic, exit `1`, before argv reaches the CLI |
|
|
258
|
+
| `epic-implementer-claude-hook` bin | same stderr diagnostic, **exit `0`**, no ledger event |
|
|
259
|
+
|
|
260
|
+
The hook is the one exception to the non-zero exit. A hook must never block the
|
|
261
|
+
Claude tool loop, so it stays loud but exits `0`. The two removed `conductor`
|
|
262
|
+
stub bins are not guarded; they already fail with a fixed migration message.
|
|
263
|
+
|
|
264
|
+
The diagnostic lists **every** offending key, sorted, in one message. Each line
|
|
265
|
+
gives the exact successor, a "retired — remove it" note (the old MCP shadowing
|
|
266
|
+
override), or, for an unknown old name, the generic advice: rename the prefix if
|
|
267
|
+
it is still a current setting, otherwise remove it. It prints **key names only,
|
|
268
|
+
never values**, because these variables can hold secrets. Old names copied from
|
|
269
|
+
frozen records (`docs/BAPI-*.md`, run notes) are refused the same way. Stale
|
|
270
|
+
names usually live in shell profiles, hand-edited executor service units, or CI
|
|
271
|
+
environment configuration.
|
|
272
|
+
|
|
273
|
+
**Version skew.** A worker environment injected by an **older** published package
|
|
274
|
+
still carries the old names. A **newer** TypeScript process started inside it (for
|
|
275
|
+
example the MCP server launched through `mcp-invoke`) will refuse to start. This
|
|
276
|
+
is intended: it is the loud outcome, not a silent half-configured worker.
|
|
277
|
+
|
|
278
|
+
- **Remedy:** re-spawn the worker so the launcher and the process it starts run
|
|
279
|
+
the same package version.
|
|
280
|
+
- **If that does not fix it:** send the MCP package owner the launcher version,
|
|
281
|
+
the process version, and the offending **key names only** — never their values.
|
|
282
|
+
|
|
283
|
+
The executor's worker-environment filter rejects both whole prefixes and both
|
|
284
|
+
node-path spellings, so an old ambient name never reaches a worker it spawns.
|
|
285
|
+
|
|
286
|
+
**No Python guard.** No production Python reads these variables, so they are
|
|
287
|
+
inert there, and no broad Python `BAPI_*` guard is added. They are refused when
|
|
288
|
+
inherited by a TypeScript child or MCP process. The Python dead-man variables
|
|
289
|
+
(`CONDUCTOR_DEAD_MAN_ONLY`, `CONDUCTOR_DEADMAN_*`) are a separate exact-name
|
|
290
|
+
contract owned by BAPI-1231.
|
|
291
|
+
|
|
241
292
|
## `epic-implementer install-git-hooks` (BAPI-395)
|
|
242
293
|
|
|
243
294
|
Installs local git hooks that opportunistically emit conductor git/PR/CI events into
|
|
@@ -373,10 +424,10 @@ supervisor remain the authority; this change only stops the worker's own ledger
|
|
|
373
424
|
from failing.
|
|
374
425
|
|
|
375
426
|
**The invariant.** Worker-facing ledger operations run through `conductor-bin.js`
|
|
376
|
-
executed **under the captured conductor Node** (`
|
|
427
|
+
executed **under the captured conductor Node** (`EPIC_IMPLEMENTER_NODE_PATH`). **The worker
|
|
377
428
|
Node must never load `better-sqlite3`.** Dispatch captures the conductor process's
|
|
378
|
-
own Node executable and threads it to each worker as `
|
|
379
|
-
with `
|
|
429
|
+
own Node executable and threads it to each worker as `EPIC_IMPLEMENTER_NODE_PATH`, paired
|
|
430
|
+
with `BAPI_EPIC_IMPLEMENTER_CLI_FILE` (the packaged `conductor-bin.js` path). The
|
|
380
431
|
worker-side boundary (`src/conductor/worker-ledger-cli.ts`) shells out with a fixed
|
|
381
432
|
**list argv** via `execFile` (never `shell: true`, never a command string) and
|
|
382
433
|
passes event JSON over **stdin** (`--data-json-stdin`), so raw payloads/secrets
|
|
@@ -384,14 +435,14 @@ never enter the process argument list. Conductor-**owned** processes (the CLI,
|
|
|
384
435
|
supervisor, and epic runtimes) keep calling `store.ts` directly — they legitimately
|
|
385
436
|
own the native load.
|
|
386
437
|
|
|
387
|
-
**Fail loud, never fall back.** A missing/invalid `
|
|
388
|
-
`
|
|
438
|
+
**Fail loud, never fall back.** A missing/invalid `EPIC_IMPLEMENTER_NODE_PATH` or absent
|
|
439
|
+
`BAPI_EPIC_IMPLEMENTER_CLI_FILE` raises the typed `ConductorLedgerSubprocessRuntimeError`,
|
|
389
440
|
surfaced to callers as the `LEDGER_SUBPROCESS_RUNTIME_UNAVAILABLE` (503) envelope
|
|
390
441
|
with a fixed, path-free, secret-free `details: { env_var, reason }` bag
|
|
391
442
|
(`reason ∈ missing | invalid | cli_missing | spawn_failed | malformed_stdout`). The
|
|
392
443
|
boundary **never** falls back to the worker's `process.execPath` — doing so would
|
|
393
444
|
re-introduce the native load into the worker Node, the exact failure this removes.
|
|
394
|
-
`
|
|
445
|
+
`EPIC_IMPLEMENTER_NODE_PATH` is **non-secret operational metadata**: it is inherited from
|
|
395
446
|
the worker shell env injected at the spawn boundary and is **not** persisted into
|
|
396
447
|
`.mcp.json`, which stays intentionally env-free.
|
|
397
448
|
|
|
@@ -411,7 +462,7 @@ BAPI-527 adds three independent reliability guarantees. Each is a protective
|
|
|
411
462
|
default; none changes the interactive (non-conductor) `start-tickets` contract.
|
|
412
463
|
|
|
413
464
|
1. **Ledger operations are isolated from the worker path.** Worker-facing ledger
|
|
414
|
-
operations run in a subprocess under `
|
|
465
|
+
operations run in a subprocess under `EPIC_IMPLEMENTER_NODE_PATH` (details above), so a
|
|
415
466
|
Node ABI mismatch degrades a worker convenience, never the whole session.
|
|
416
467
|
|
|
417
468
|
2. **Dispatch does not alter your branch.** Unattended/epic dispatch is
|
|
@@ -422,9 +473,9 @@ default; none changes the interactive (non-conductor) `start-tickets` contract.
|
|
|
422
473
|
guard** additionally refuses dispatch (or, with an explicit override, warns
|
|
423
474
|
loudly) when the conductor's base repo path equals the operator's live
|
|
424
475
|
dev-server checkout:
|
|
425
|
-
- `
|
|
476
|
+
- `BAPI_EPIC_IMPLEMENTER_LIVE_SOURCE_PATH` — the operator's live dev-server checkout
|
|
426
477
|
path to protect.
|
|
427
|
-
- `
|
|
478
|
+
- `BAPI_EPIC_IMPLEMENTER_ALLOW_LIVE_SOURCE_DISPATCH` — truthy (`1`/`true`/`yes`/`on`)
|
|
428
479
|
override that downgrades a collision from fatal to a loud warning.
|
|
429
480
|
The read-only `doctor` command surfaces the guard state
|
|
430
481
|
(`not-configured` / `safe` / `collision`) without mutating anything.
|
|
@@ -118,6 +118,7 @@ scope for local v1):
|
|
|
118
118
|
| `get_comments` | Jira (only) **[BLOCK]** |
|
|
119
119
|
| `add_comment` | Jira (only) **[BLOCK]** |
|
|
120
120
|
| `attachment` (upload/download/list) | Jira (only) **[BLOCK]** |
|
|
121
|
+
| `publish_reviewed_attachment` | Jira (only) **[BLOCK]** |
|
|
121
122
|
|
|
122
123
|
### AI ticket-artifact generators — ticket backend + VCS + code index
|
|
123
124
|
|
|
@@ -323,7 +324,7 @@ wanting both selects `sfcc,sfcc-write` (or `full`).
|
|
|
323
324
|
| Integration | BLOCK without it | DEGRADE without it |
|
|
324
325
|
|---|---|---|
|
|
325
326
|
| **Ticket backend** (jira mode) | `create_ticket`, `get_ticket(s)`, `update_ticket_description`, `update_jira_status`, and every AI generator (they read the ticket) | — |
|
|
326
|
-
| **Jira (only)** | `get_comments`, `add_comment`, `attachment`, `estimate_epic` | — |
|
|
327
|
+
| **Jira (only)** | `get_comments`, `add_comment`, `attachment`, `publish_reviewed_attachment`, `estimate_epic` | — |
|
|
327
328
|
| **Version control (VCS)** | `create_pull_request`, `merge_pull_request`, `resolve_ci_checks`, `poll_ci_checks`, `wait_for_ci_checks`, `fresh_base`, `parse_repository`, `regenerate_directory_map`; **Tier-3** `request_plan_generation`/`get_plan`, `request_reimplement_context`/`get_reimplement_context`, `create_doc`(tdd/architecture) | **Tier-4** `request_ticket_review`, `create_doc`(prd/fsd), `clarify_task` |
|
|
328
329
|
| **Code index** (succeeded parse) | Tier-3 plan/reimplement/`create_doc`(tdd/architecture); `request_council` in `technical`/`discovery` modes | Tier-4 review/prd/fsd, `clarify_task` |
|
|
329
330
|
| **SFCC OCAPI** | `check_permissions` + every gated SFCC read and write tool | — |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bridge_gpt/mcp-server",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.59",
|
|
4
4
|
"description": "Bridge API MCP server — exposes Jira endpoints as MCP tools for Claude Code agents",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"zod": "^4.4.3"
|
|
48
48
|
},
|
|
49
49
|
"optionalDependencies": {
|
|
50
|
-
"better-sqlite3": "^
|
|
50
|
+
"better-sqlite3": "^13.0.3",
|
|
51
51
|
"playwright": "^1.51.1"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"save_locally": true,
|
|
19
19
|
"provider": "{provider}"
|
|
20
20
|
},
|
|
21
|
-
"description": "Submit implementation-plan generation without waiting through an MCP client deadline. Re-entry-safe: the backend reuses a fresh existing plan (reused: true, no new run). force is reserved for deliberate regeneration; this step never sets it. On a dropped connection or other ambiguous submission outcome, use get_plan to inspect the existing run — never reissue this step automatically."
|
|
21
|
+
"description": "Submit implementation-plan generation without waiting through an MCP client deadline. The next step keeps polling get_plan through normal pending windows without an operator decision, including in auto mode. Re-entry-safe: the backend reuses a fresh existing plan (reused: true, no new run). force is reserved for deliberate regeneration; this step never sets it. On a dropped connection or other ambiguous submission outcome, use get_plan to inspect the existing run — never reissue this step automatically."
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
"type": "agent_task",
|
package/pipelines/plan-epic.json
CHANGED
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
"type": "agent_task",
|
|
50
|
-
"instruction_file": "assess-
|
|
51
|
-
"description": "Assessing
|
|
50
|
+
"instruction_file": "assess-epic-implementer-eligibility.md",
|
|
51
|
+
"description": "Assessing Epic Implementer eligibility"
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
54
|
"type": "agent_task",
|