@bridge_gpt/mcp-server 0.2.58 → 0.2.60
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 +231 -113
- package/build/agent-guidance.generated.js +1 -1
- package/build/agent-notes.js +7 -1
- 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 +7 -8
- package/build/conductor/bridge-api-client.js +202 -2
- package/build/conductor/bring-up-facts.js +1 -1
- package/build/conductor/claude-hook.js +16 -16
- package/build/conductor/doctor.js +279 -72
- package/build/conductor/epic-implementer-cli.js +38 -5
- package/build/conductor/epic-reconcile.js +1 -1
- package/build/conductor/epic-runtime.js +21 -12
- 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 +28 -6
- package/build/conductor/local-merge.js +319 -26
- package/build/conductor/merge-execution-contract.js +61 -0
- package/build/conductor/merge-execution-eligibility.js +129 -0
- 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 +166 -9
- package/build/conductor/readiness.js +97 -16
- package/build/conductor/recovery-cli.js +243 -12
- package/build/conductor/recovery-operations.js +64 -6
- 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/connect-bitbucket-api.js +6 -1
- package/build/connect-bitbucket.js +398 -88
- package/build/credential-store.js +16 -0
- package/build/docs.generated.js +2 -2
- package/build/doctor.js +199 -303
- package/build/drive-epic.js +88 -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 +184 -0
- package/build/epic-integration-pr.js +2 -2
- package/build/executor/ci-rerun-job.js +269 -0
- package/build/executor/cli.js +31 -0
- package/build/executor/credentials.js +11 -0
- package/build/executor/env.js +79 -8
- package/build/executor/heartbeat.js +1 -1
- package/build/executor/index.js +21 -4
- package/build/executor/job-errors.js +3 -3
- package/build/executor/job-runner.js +127 -1
- package/build/executor/job-types.js +12 -2
- package/build/executor/merge-job.js +46 -5
- 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/executor/service-lifecycle.js +136 -0
- package/build/executor/service-unit.js +427 -9
- package/build/executor/types.js +5 -0
- package/build/index.js +320 -342
- package/build/init.js +20 -28
- package/build/install-bridge-conductor.js +208 -15
- package/build/install-bridge.js +555 -37
- package/build/mcp-host-entry-adapter.js +6 -0
- package/build/mcp-host-targets.js +2 -0
- package/build/mcp-install-state.js +42 -4
- 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 +118 -10
- package/build/merge-workflow-codeowners.js +224 -0
- package/build/merge-workflow-config.js +133 -0
- package/build/merge-workflow-drift.js +66 -0
- package/build/merge-workflow-install.js +638 -0
- package/build/merge-workflow.js +572 -0
- package/build/model-routing-host.js +25 -0
- package/build/model-routing-preferences.js +99 -0
- package/build/pipelines.generated.js +10 -10
- package/build/{plan-epic-conductor-eligibility.js → plan-epic-implementer-eligibility.js} +18 -16
- package/build/plan-execution-ledger.js +8 -0
- package/build/plane/cli.js +24 -2
- package/build/plane/member-roster.js +5 -5
- package/build/plane/preflight.js +68 -0
- 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/run-unit-tests-launcher.js +5 -0
- package/build/setup-epic.js +171 -17
- 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 +4 -4
- package/pipelines/implement-ticket.json +1 -1
- package/pipelines/plan-epic.json +2 -2
- package/build/conduct-epic/bridge-client.js +0 -773
- package/build/conduct-epic/checkpoint-store.js +0 -542
- package/build/conduct-epic/cli.js +0 -3145
- package/build/conduct-epic/cut-protocol.js +0 -392
- package/build/conduct-epic/lock.js +0 -302
- package/build/conduct-epic/pr-state.js +0 -286
- package/build/conduct-epic/spawn.js +0 -113
- package/build/conductor/cli.js +0 -1278
- package/build/conductor-bundle-cli.js +0 -256
- package/build/direct-ticket-tools.js +0 -70
- package/build/executor/reconcile-overlap-governance.js +0 -129
- package/build/implement-epic/checkpoint-store.js +0 -542
- package/build/implement-epic/cli.js +0 -3158
- package/build/implement-epic/lock.js +0 -302
- package/build/implement-epic/pr-state.js +0 -286
- package/build/implement-epic/spawn.js +0 -113
- /package/build/{implement-epic → epic-shared}/bridge-client.js +0 -0
- /package/build/{implement-epic → epic-shared}/cut-protocol.js +0 -0
|
@@ -86,11 +86,11 @@ export async function emitSupervisorAssessmentIfNew(input, deps = {}) {
|
|
|
86
86
|
};
|
|
87
87
|
const event = {
|
|
88
88
|
id: eventId,
|
|
89
|
-
source: "
|
|
89
|
+
source: "epic-implementer-supervisor",
|
|
90
90
|
type: "supervisor.assessment",
|
|
91
91
|
run_id: input.run_id,
|
|
92
92
|
worker_id: input.idempotency.worker_id ?? input.worker_id ?? null,
|
|
93
|
-
producer: "
|
|
93
|
+
producer: "epic-implementer-supervisor",
|
|
94
94
|
observed_via: "supervisor",
|
|
95
95
|
data: {
|
|
96
96
|
summary: `supervisor assessment: ${input.idempotency.reason}`,
|
|
@@ -40,7 +40,7 @@ export function buildSupervisorEscalationWorkerMessage(candidate, assessment, st
|
|
|
40
40
|
status: "escalated",
|
|
41
41
|
details,
|
|
42
42
|
},
|
|
43
|
-
source: "
|
|
43
|
+
source: "epic-implementer-supervisor",
|
|
44
44
|
producer: "worker-message-relay",
|
|
45
45
|
};
|
|
46
46
|
}
|
|
@@ -71,7 +71,7 @@ export function buildSupervisorRemediationWorkerMessage(input) {
|
|
|
71
71
|
truncated: input.truncated,
|
|
72
72
|
},
|
|
73
73
|
},
|
|
74
|
-
source: "
|
|
74
|
+
source: "epic-implementer-supervisor",
|
|
75
75
|
producer: "worker-message-relay",
|
|
76
76
|
};
|
|
77
77
|
}
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
* Every worker-facing ledger operation (`check_messages`, and the
|
|
7
7
|
* `wait_for_done_gate` event emit) therefore runs through this module, which
|
|
8
8
|
* shells out to the packaged `conductor-bin.js` CLI executed by the conductor
|
|
9
|
-
* Node runtime captured at dispatch time in `
|
|
9
|
+
* Node runtime captured at dispatch time in `EPIC_IMPLEMENTER_NODE_PATH`. Conductor-OWNED
|
|
10
10
|
* processes (the CLI itself, the supervisor/epic runtimes) keep calling
|
|
11
11
|
* `store.ts` directly — they legitimately own the native load.
|
|
12
12
|
*
|
|
13
|
-
* Hard-fail contract: when `
|
|
14
|
-
* `
|
|
13
|
+
* Hard-fail contract: when `EPIC_IMPLEMENTER_NODE_PATH` is missing/invalid or
|
|
14
|
+
* `BAPI_EPIC_IMPLEMENTER_CLI_FILE` is absent, this boundary throws a typed
|
|
15
15
|
* {@link ConductorLedgerSubprocessRuntimeError} rather than silently falling back
|
|
16
16
|
* to the worker's own `process.execPath`. Falling back would re-introduce the
|
|
17
17
|
* native load into the worker Node — the exact failure mode this slice removes.
|
|
@@ -33,9 +33,9 @@ import { isAbsolute as pathIsAbsolute } from "node:path";
|
|
|
33
33
|
import { ConductorLedgerSubprocessRuntimeError, ConductorWorkerContextRequiredError, } from "./errors.js";
|
|
34
34
|
import { makeProducerDedupeKey, makeStableProducerEventId, } from "./producer-ledger.js";
|
|
35
35
|
/** The env key that carries the captured conductor Node executable path. */
|
|
36
|
-
export const
|
|
36
|
+
export const EPIC_IMPLEMENTER_NODE_PATH_ENV = "EPIC_IMPLEMENTER_NODE_PATH";
|
|
37
37
|
/** The (pre-existing) env key that carries the packaged `conductor-bin.js` path. */
|
|
38
|
-
export const
|
|
38
|
+
export const BAPI_EPIC_IMPLEMENTER_CLI_FILE_ENV = "BAPI_EPIC_IMPLEMENTER_CLI_FILE";
|
|
39
39
|
/**
|
|
40
40
|
* Bounded stdout buffer for a conductor CLI response. Conductor JSON responses
|
|
41
41
|
* (message batches / emit summaries) are small; 8 MiB is generous headroom while
|
|
@@ -60,9 +60,9 @@ function nonEmpty(value) {
|
|
|
60
60
|
/**
|
|
61
61
|
* Validate and resolve the worker-ledger subprocess runtime from the environment.
|
|
62
62
|
*
|
|
63
|
-
* `
|
|
63
|
+
* `EPIC_IMPLEMENTER_NODE_PATH` must be set, non-empty, and an ABSOLUTE path (a relative
|
|
64
64
|
* value like `node` / `./node` is rejected as `invalid` — it must never resolve
|
|
65
|
-
* against `PATH` or the worker cwd). `
|
|
65
|
+
* against `PATH` or the worker cwd). `BAPI_EPIC_IMPLEMENTER_CLI_FILE` must be set and
|
|
66
66
|
* non-empty. On any failure this throws a typed
|
|
67
67
|
* {@link ConductorLedgerSubprocessRuntimeError}; it NEVER falls back to
|
|
68
68
|
* `process.execPath`.
|
|
@@ -83,24 +83,24 @@ export function resolveWorkerLedgerCliRuntime(deps = {}) {
|
|
|
83
83
|
const isAbsolute = deps.isAbsolute ?? pathIsAbsolute;
|
|
84
84
|
// `undefined` specifically — an env var SET to "" is present-but-invalid and
|
|
85
85
|
// falls through to the fail-loud path below.
|
|
86
|
-
if (env[
|
|
87
|
-
env[
|
|
86
|
+
if (env[EPIC_IMPLEMENTER_NODE_PATH_ENV] === undefined &&
|
|
87
|
+
env[BAPI_EPIC_IMPLEMENTER_CLI_FILE_ENV] === undefined) {
|
|
88
88
|
throw new ConductorWorkerContextRequiredError([
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
EPIC_IMPLEMENTER_NODE_PATH_ENV,
|
|
90
|
+
BAPI_EPIC_IMPLEMENTER_CLI_FILE_ENV,
|
|
91
91
|
]);
|
|
92
92
|
}
|
|
93
|
-
const nodePathRaw = env[
|
|
93
|
+
const nodePathRaw = env[EPIC_IMPLEMENTER_NODE_PATH_ENV];
|
|
94
94
|
if (!nonEmpty(nodePathRaw)) {
|
|
95
|
-
throw new ConductorLedgerSubprocessRuntimeError("missing",
|
|
95
|
+
throw new ConductorLedgerSubprocessRuntimeError("missing", EPIC_IMPLEMENTER_NODE_PATH_ENV);
|
|
96
96
|
}
|
|
97
97
|
const nodePath = nodePathRaw.trim();
|
|
98
98
|
if (!isAbsolute(nodePath)) {
|
|
99
|
-
throw new ConductorLedgerSubprocessRuntimeError("invalid",
|
|
99
|
+
throw new ConductorLedgerSubprocessRuntimeError("invalid", EPIC_IMPLEMENTER_NODE_PATH_ENV);
|
|
100
100
|
}
|
|
101
|
-
const cliFileRaw = env[
|
|
101
|
+
const cliFileRaw = env[BAPI_EPIC_IMPLEMENTER_CLI_FILE_ENV];
|
|
102
102
|
if (!nonEmpty(cliFileRaw)) {
|
|
103
|
-
throw new ConductorLedgerSubprocessRuntimeError("cli_missing",
|
|
103
|
+
throw new ConductorLedgerSubprocessRuntimeError("cli_missing", BAPI_EPIC_IMPLEMENTER_CLI_FILE_ENV);
|
|
104
104
|
}
|
|
105
105
|
return { nodePath, cliFile: cliFileRaw.trim() };
|
|
106
106
|
}
|
|
@@ -129,14 +129,14 @@ export function execConductorCli(subcommandArgs, stdin, deps = {}) {
|
|
|
129
129
|
if (error) {
|
|
130
130
|
// A non-zero exit, spawn failure, or timeout kill — never surface the
|
|
131
131
|
// raw error text (it can carry paths/secrets). Fixed reason only.
|
|
132
|
-
reject(new ConductorLedgerSubprocessRuntimeError("spawn_failed",
|
|
132
|
+
reject(new ConductorLedgerSubprocessRuntimeError("spawn_failed", EPIC_IMPLEMENTER_NODE_PATH_ENV));
|
|
133
133
|
return;
|
|
134
134
|
}
|
|
135
135
|
resolve(stdout);
|
|
136
136
|
});
|
|
137
137
|
}
|
|
138
138
|
catch {
|
|
139
|
-
reject(new ConductorLedgerSubprocessRuntimeError("spawn_failed",
|
|
139
|
+
reject(new ConductorLedgerSubprocessRuntimeError("spawn_failed", EPIC_IMPLEMENTER_NODE_PATH_ENV));
|
|
140
140
|
return;
|
|
141
141
|
}
|
|
142
142
|
if (stdin !== undefined) {
|
|
@@ -169,7 +169,7 @@ export function parseCliJsonStdout(stdout) {
|
|
|
169
169
|
return JSON.parse(stdout);
|
|
170
170
|
}
|
|
171
171
|
catch {
|
|
172
|
-
throw new ConductorLedgerSubprocessRuntimeError("malformed_stdout",
|
|
172
|
+
throw new ConductorLedgerSubprocessRuntimeError("malformed_stdout", EPIC_IMPLEMENTER_NODE_PATH_ENV);
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
/**
|
|
@@ -29,7 +29,7 @@ const EPIC_SLUG_RE = /^[A-Za-z][A-Za-z0-9_-]*$/;
|
|
|
29
29
|
const PLACEHOLDER_RE = /TBD-\d+/;
|
|
30
30
|
/**
|
|
31
31
|
* The conductor's hard spec bound, mirroring `_SPEC_REVIEW_TICKET_SPEC_MAX_CHARS`
|
|
32
|
-
* (64,000) in `api/library/
|
|
32
|
+
* (64,000) in `api/library/epic_implementer/reconciler.py`. Since PR #848 the
|
|
33
33
|
* reconciler marks overflow beyond its own bound visibly (no silent loss), so
|
|
34
34
|
* this authoring guard exists only to reject a spec the conductor itself could
|
|
35
35
|
* not accept. For Jira-backed tickets the practical limit binds far earlier:
|
|
@@ -576,7 +576,7 @@ function findCycle(keys, edgeKeys) {
|
|
|
576
576
|
*/
|
|
577
577
|
const PY_WHITESPACE = /[\t\n\v\f\r \x1c-\x1f\x85\xa0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000]+/g;
|
|
578
578
|
/**
|
|
579
|
-
* Mirror `normalize_ticket_spec()` (`api/library/
|
|
579
|
+
* Mirror `normalize_ticket_spec()` (`api/library/epic_implementer/spec_hash.py`)
|
|
580
580
|
* so a cosmetic diff never triggers a Jira rewrite.
|
|
581
581
|
*
|
|
582
582
|
* Because whitespace collapses, a pure reflow/indent edit is deliberately NOT a
|
|
@@ -138,7 +138,12 @@ export async function mintBitbucketConnection(deps, repoName) {
|
|
|
138
138
|
if (!body || !state || !installUrl || typeof ttlSeconds !== "number") {
|
|
139
139
|
return { ok: false, kind: "malformed" };
|
|
140
140
|
}
|
|
141
|
-
|
|
141
|
+
// Optional and permissive ON PURPOSE, and only here: absent, null, empty, or any
|
|
142
|
+
// non-string collapses to null through the same nullable helper the candidate parser
|
|
143
|
+
// uses. Required-field strictness above is untouched — an optional field must not
|
|
144
|
+
// become a new way for a server change to fail a mint.
|
|
145
|
+
const redeemUrlTemplate = asNullableString(body.redeem_url_template);
|
|
146
|
+
return { ok: true, value: { state, installUrl, ttlSeconds, redeemUrlTemplate } };
|
|
142
147
|
}
|
|
143
148
|
/** Strictly parse candidates. A candidate missing a usable identity fails the whole list. */
|
|
144
149
|
function parseCandidates(value) {
|