@bridge_gpt/mcp-server 0.2.1 → 0.2.3
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 +97 -15
- package/build/agent-config-credential-migration.js +272 -0
- package/build/agents.generated.js +1 -1
- package/build/chain-orchestrator.js +16 -1
- package/build/commands.generated.js +9 -7
- package/build/conductor/bridge-api-client.js +625 -0
- package/build/conductor/claude-hook.js +251 -0
- package/build/conductor/cli.js +1048 -0
- package/build/conductor/data-normalization.js +114 -0
- package/build/conductor/doctor.js +164 -0
- package/build/conductor/done-gate.js +325 -0
- package/build/conductor/epic-reconcile.js +139 -0
- package/build/conductor/epic-runtime.js +611 -0
- package/build/conductor/epic-state.js +125 -0
- package/build/conductor/errors.js +85 -0
- package/build/conductor/git-ci-types.js +129 -0
- package/build/conductor/git-hooks.js +218 -0
- package/build/conductor/git-inspection.js +185 -0
- package/build/conductor/git-producer.js +137 -0
- package/build/conductor/merge-ledger.js +198 -0
- package/build/conductor/paths.js +224 -0
- package/build/conductor/plan.js +77 -0
- package/build/conductor/pr-ci-producer.js +427 -0
- package/build/conductor/pr-discovery.js +135 -0
- package/build/conductor/producer-ledger.js +125 -0
- package/build/conductor/redaction.js +112 -0
- package/build/conductor/store.js +1156 -0
- package/build/conductor/supervisor-config.js +150 -0
- package/build/conductor/supervisor-escalation.js +244 -0
- package/build/conductor/supervisor-judgment-python.js +141 -0
- package/build/conductor/supervisor-judgment.js +215 -0
- package/build/conductor/supervisor-ledger.js +119 -0
- package/build/conductor/supervisor-merge.js +127 -0
- package/build/conductor/supervisor-message-relay.js +61 -0
- package/build/conductor/supervisor-notification.js +39 -0
- package/build/conductor/supervisor-runtime.js +351 -0
- package/build/conductor/supervisor-state.js +572 -0
- package/build/conductor/supervisor-types.js +16 -0
- package/build/conductor/taxonomy.js +58 -0
- package/build/conductor/tools.js +367 -0
- package/build/conductor/types.js +9 -0
- package/build/conductor-bin.js +21 -0
- package/build/conductor-claude-hook-bin.js +21 -0
- package/build/credential-store.js +175 -4
- package/build/credentials-cli.js +223 -0
- package/build/decision-page-schema.js +60 -0
- package/build/decision-page-template.js +262 -10
- package/build/doctor.js +5 -1
- package/build/index.js +558 -63
- package/build/pipeline-orchestrator.js +5 -1
- package/build/pipeline-utils.js +45 -5
- package/build/pipelines.generated.js +37 -9
- package/build/readme.generated.js +3 -0
- package/build/review-tickets.js +596 -0
- package/build/scheduled-prompt.js +16 -10
- package/build/start-tickets-conductor.js +496 -0
- package/build/start-tickets-prereqs.js +32 -23
- package/build/start-tickets-repo.js +49 -0
- package/build/start-tickets.js +683 -82
- package/build/version.generated.js +1 -1
- package/design-assets/favicon/android-chrome-192x192.png +0 -0
- package/design-assets/favicon/android-chrome-512x512.png +0 -0
- package/design-assets/favicon/apple-touch-icon.png +0 -0
- package/design-assets/favicon/favicon-16x16.png +0 -0
- package/design-assets/favicon/favicon-32x32.png +0 -0
- package/design-assets/favicon/favicon.ico +0 -0
- package/design-assets/favicon/site.webmanifest +1 -0
- package/design-assets/just-logo-rough-draft.png +0 -0
- package/package.json +18 -6
- package/pipelines/idea-to-ticket.json +5 -0
- package/pipelines/plan-epic.json +16 -1
- package/pipelines/review-ticket.json +2 -1
- package/public/css/main.min.css +2 -0
- package/public/css/main.min.css.map +1 -0
- package/public/fonts/OFL.txt +93 -0
- package/public/fonts/SourceSansPro-Black.ttf +0 -0
- package/public/fonts/SourceSansPro-BlackItalic.ttf +0 -0
- package/public/fonts/SourceSansPro-Bold.ttf +0 -0
- package/public/fonts/SourceSansPro-BoldItalic.ttf +0 -0
- package/public/fonts/SourceSansPro-ExtraLight.ttf +0 -0
- package/public/fonts/SourceSansPro-ExtraLightItalic.ttf +0 -0
- package/public/fonts/SourceSansPro-Italic.ttf +0 -0
- package/public/fonts/SourceSansPro-Light.ttf +0 -0
- package/public/fonts/SourceSansPro-LightItalic.ttf +0 -0
- package/public/fonts/SourceSansPro-Regular.ttf +0 -0
- package/public/fonts/SourceSansPro-SemiBold.ttf +0 -0
- package/public/fonts/SourceSansPro-SemiBoldItalic.ttf +0 -0
- package/public/img/bridge-logo-160x51.webp +0 -0
- package/public/img/bridge-logo-300x92.webp +0 -0
- package/public/img/favicon/android-chrome-192x192.png +0 -0
- package/public/img/favicon/android-chrome-512x512.png +0 -0
- package/public/img/favicon/apple-touch-icon.png +0 -0
- package/public/img/favicon/favicon-16x16.png +0 -0
- package/public/img/favicon/favicon-32x32.png +0 -0
- package/public/img/favicon/favicon.ico +0 -0
- package/public/img/favicon/site.webmanifest +1 -0
- package/public/img/installation/bitbucket/app-password-1.png +0 -0
- package/public/img/installation/bitbucket/app-password-2.png +0 -0
- package/public/img/installation/bitbucket/create-token-1.png +0 -0
- package/public/img/installation/bitbucket/create-token-2.png +0 -0
- package/public/img/installation/bitbucket/webhook-1.png +0 -0
- package/public/img/installation/github/github-review-webhook.png +0 -0
- package/public/img/installation/jira/credentials/api-key.png +0 -0
- package/public/img/installation/jira/webhook/create-rule.png +0 -0
- package/public/img/installation/jira/webhook/project-settings.png +0 -0
- package/public/img/installation/jira/webhook/rule-create-1.png +0 -0
- package/public/img/installation/jira/webhook/rule-create-2.png +0 -0
- package/public/img/installation/jira/webhook/rule-create-3.png +0 -0
- package/public/img/installation/pinecone/pinecone-api-key.png +0 -0
- package/public/img/installation/pinecone/pinecone-index.png +0 -0
- package/public/js/main.min.js +2 -0
- package/public/js/main.min.js.map +1 -0
- package/smoke-test/SMOKE-TEST.md +16 -8
|
@@ -222,7 +222,9 @@ export async function runPipeline(deps, input) {
|
|
|
222
222
|
}
|
|
223
223
|
let recipe;
|
|
224
224
|
try {
|
|
225
|
-
recipe = resolveRecipe(pipelineDef, deps.instructions, mergedVariables, undefined, autoApprove
|
|
225
|
+
recipe = resolveRecipe(pipelineDef, deps.instructions, mergedVariables, undefined, autoApprove, {
|
|
226
|
+
includeUpgradeAdviceSurfacing: deps.includeUpgradeAdviceSurfacing !== false,
|
|
227
|
+
});
|
|
226
228
|
}
|
|
227
229
|
catch (err) {
|
|
228
230
|
return failedEnvelope("VALIDATION", err instanceof Error ? err.message : String(err), { pipeline: input.pipeline });
|
|
@@ -487,6 +489,7 @@ async function continuePipelineExecution(deps, persistence, row, recipe, autoApp
|
|
|
487
489
|
step_description: step.description,
|
|
488
490
|
instruction: approvalInstruction,
|
|
489
491
|
results,
|
|
492
|
+
preamble: recipe.agent_instructions,
|
|
490
493
|
};
|
|
491
494
|
}
|
|
492
495
|
if (step.type === "agent_task") {
|
|
@@ -514,6 +517,7 @@ async function continuePipelineExecution(deps, persistence, row, recipe, autoApp
|
|
|
514
517
|
step_description: step.description,
|
|
515
518
|
instruction: step.instruction ?? "",
|
|
516
519
|
results,
|
|
520
|
+
preamble: recipe.agent_instructions,
|
|
517
521
|
};
|
|
518
522
|
}
|
|
519
523
|
// mcp_call branch (executing now)
|
package/build/pipeline-utils.js
CHANGED
|
@@ -53,6 +53,11 @@ export function validatePipelineSchema(json) {
|
|
|
53
53
|
if (s.requires_approval !== undefined && typeof s.requires_approval !== "boolean") {
|
|
54
54
|
errors.push(`${prefix}: "requires_approval" must be a boolean if provided.`);
|
|
55
55
|
}
|
|
56
|
+
if (s.id !== undefined) {
|
|
57
|
+
if (typeof s.id !== "string" || s.id.trim().length === 0) {
|
|
58
|
+
errors.push(`${prefix}."id" must be a non-empty string when provided`);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
56
61
|
if (s.type === "mcp_call") {
|
|
57
62
|
if (typeof s.tool !== "string" || s.tool.trim() === "") {
|
|
58
63
|
errors.push(`${prefix}: mcp_call step requires "tool" (string).`);
|
|
@@ -145,7 +150,23 @@ function substituteInParams(params, variables) {
|
|
|
145
150
|
// ---------------------------------------------------------------------------
|
|
146
151
|
// Recipe Resolution
|
|
147
152
|
// ---------------------------------------------------------------------------
|
|
148
|
-
|
|
153
|
+
/**
|
|
154
|
+
* Shared convention (BAPI-375) appended to the recipe preamble so every
|
|
155
|
+
* ping-bearing pipeline proactively surfaces the server's upgrade advice. The
|
|
156
|
+
* advice STRING is owned by the backend `compute_upgrade()` and emitted by the
|
|
157
|
+
* `ping` tool as a second text content item; this text only tells the agent to
|
|
158
|
+
* relay it. It deliberately contains NO advice wording (no "Your bridge-api MCP
|
|
159
|
+
* is…" sentence) so there is no second source of truth to drift from the server.
|
|
160
|
+
*/
|
|
161
|
+
export const UPGRADE_ADVICE_SURFACING_INSTRUCTIONS = " Upgrade advice: when any `ping` MCP call in this run returns a non-empty" +
|
|
162
|
+
" second text content item, relay that server-provided text to the user" +
|
|
163
|
+
" verbatim — do not invent, prefix, suffix, summarize, or paraphrase it." +
|
|
164
|
+
" Surface it at most once per pipeline run or session, including any" +
|
|
165
|
+
" chained sub-pipelines. Stay completely silent when the second content" +
|
|
166
|
+
" item is absent or empty. A ping failure, a non-OK ping response, missing" +
|
|
167
|
+
" advice, or empty advice is fail-open: it must never block, pause, or" +
|
|
168
|
+
" crash the run, and you must never synthesize advice of your own.";
|
|
169
|
+
export function resolveRecipe(pipeline, instructions, variables, skipSteps, autoApprove, options) {
|
|
149
170
|
// Validate required variables are provided
|
|
150
171
|
const declared = pipeline.variables ?? [];
|
|
151
172
|
const missing = declared.filter((v) => !(v in variables));
|
|
@@ -158,22 +179,36 @@ export function resolveRecipe(pipeline, instructions, variables, skipSteps, auto
|
|
|
158
179
|
const resolvedSteps = [];
|
|
159
180
|
let stepIndex = 1;
|
|
160
181
|
for (const step of pipeline.steps) {
|
|
161
|
-
//
|
|
162
|
-
|
|
182
|
+
// Prefer a meaningful step `id` as the skip key; fall back to tool name
|
|
183
|
+
// (mcp_call) or raw description (agent_task) for untagged steps.
|
|
184
|
+
const stepId = typeof step.id === "string" && step.id.trim().length > 0
|
|
185
|
+
? step.id
|
|
186
|
+
: undefined;
|
|
187
|
+
const skipKey = stepId ??
|
|
188
|
+
(step.type === "mcp_call" ? step.tool : step.description);
|
|
163
189
|
if (skip.has(skipKey))
|
|
164
190
|
continue;
|
|
165
191
|
const declaredApproval = step.requires_approval ?? false;
|
|
166
192
|
const effectiveApproval = declaredApproval && !autoApprove;
|
|
193
|
+
// `ping` is the best-effort connectivity / upgrade-advice probe (BAPI-375):
|
|
194
|
+
// it must never halt a pipeline when degraded, so its effective on_error is
|
|
195
|
+
// always warn_and_continue regardless of any declared value. Non-ping steps
|
|
196
|
+
// keep their declared on_error, defaulting to halt.
|
|
197
|
+
const isPingStep = step.type === "mcp_call" && step.tool === "ping";
|
|
167
198
|
const base = {
|
|
168
199
|
step: stepIndex++,
|
|
169
200
|
type: step.type,
|
|
170
201
|
description: substituteVariables(step.description, variables),
|
|
171
|
-
on_error: step.on_error ?? "halt",
|
|
202
|
+
on_error: isPingStep ? "warn_and_continue" : (step.on_error ?? "halt"),
|
|
172
203
|
requires_approval: effectiveApproval,
|
|
173
204
|
};
|
|
174
205
|
if (declaredApproval !== effectiveApproval) {
|
|
175
206
|
base.requires_approval_declared = declaredApproval;
|
|
176
207
|
}
|
|
208
|
+
// Emit the stable step id only when meaningful — never substitute variables.
|
|
209
|
+
if (stepId !== undefined) {
|
|
210
|
+
base.id = stepId;
|
|
211
|
+
}
|
|
177
212
|
if (step.type === "mcp_call") {
|
|
178
213
|
base.tool = step.tool;
|
|
179
214
|
base.params = substituteInParams(step.params, variables);
|
|
@@ -202,6 +237,11 @@ export function resolveRecipe(pipeline, instructions, variables, skipSteps, auto
|
|
|
202
237
|
'For on_error "halt", stop the pipeline immediately on failure. ' +
|
|
203
238
|
'For on_error "warn_and_continue", log a warning and proceed. ' +
|
|
204
239
|
"Do not skip steps, reorder them, or substitute your own tool calls.";
|
|
240
|
+
// Default-on: include the upgrade-advice surfacing convention unless the
|
|
241
|
+
// caller explicitly opts out (BAPI_MCP_UPGRADE_ADVICE_ENABLED=false).
|
|
242
|
+
const upgradeAdviceConvention = options?.includeUpgradeAdviceSurfacing !== false
|
|
243
|
+
? UPGRADE_ADVICE_SURFACING_INSTRUCTIONS
|
|
244
|
+
: "";
|
|
205
245
|
const autoApproveSuffix = autoApprove
|
|
206
246
|
? " Auto-approve mode is ACTIVE: every approval gate has been pre-approved by the user via the auto_approve flag — proceed without pausing for confirmation, applying the default branching, file-staging, and recommendation choices documented in each instruction file's auto-approve branch."
|
|
207
247
|
: "";
|
|
@@ -209,7 +249,7 @@ export function resolveRecipe(pipeline, instructions, variables, skipSteps, auto
|
|
|
209
249
|
pipeline: pipeline.name,
|
|
210
250
|
description: pipeline.description ?? "",
|
|
211
251
|
total_steps: resolvedSteps.length,
|
|
212
|
-
agent_instructions: baseInstructions + autoApproveSuffix,
|
|
252
|
+
agent_instructions: baseInstructions + upgradeAdviceConvention + autoApproveSuffix,
|
|
213
253
|
auto_approve: !!autoApprove,
|
|
214
254
|
steps: resolvedSteps,
|
|
215
255
|
};
|