@bridge_gpt/mcp-server 0.2.2 → 0.2.4
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 +554 -66
- 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 +1 -1
- 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 +682 -81
- 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 +17 -5
- 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 +17 -9
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Secret redaction for conductor event payloads.
|
|
3
|
+
*
|
|
4
|
+
* Every value stored in the `events.data_json` column passes through
|
|
5
|
+
* {@link redactSecrets} so credential-shaped material never lands in the local
|
|
6
|
+
* ledger (and therefore never leaks back through poll/wait reads). Redaction is
|
|
7
|
+
* pattern-based and conservative: it replaces recognizable secret values with
|
|
8
|
+
* `[REDACTED]` while preserving the surrounding structure and non-secret text.
|
|
9
|
+
*/
|
|
10
|
+
const REDACTED = "[REDACTED]";
|
|
11
|
+
/** Standalone secret-shaped patterns, applied in order (PEM/multiline first). */
|
|
12
|
+
const STANDALONE_PATTERNS = [
|
|
13
|
+
// PEM private-key blocks (any key type), including the body.
|
|
14
|
+
{
|
|
15
|
+
pattern: /-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,
|
|
16
|
+
replacement: REDACTED,
|
|
17
|
+
},
|
|
18
|
+
// JWT-like tokens: three base64url segments separated by dots.
|
|
19
|
+
{
|
|
20
|
+
pattern: /eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g,
|
|
21
|
+
replacement: REDACTED,
|
|
22
|
+
},
|
|
23
|
+
// Bearer tokens — keep the scheme word, drop the credential.
|
|
24
|
+
{ pattern: /\bBearer\s+[A-Za-z0-9._-]+/gi, replacement: `Bearer ${REDACTED}` },
|
|
25
|
+
// AWS access key IDs (AKIA/ASIA + 16 base32 chars).
|
|
26
|
+
{ pattern: /\b(?:AKIA|ASIA)[0-9A-Z]{16}\b/g, replacement: REDACTED },
|
|
27
|
+
// GitHub tokens (ghp_/gho_/ghu_/ghs_/ghr_ + body). Short floor (>= 6) so
|
|
28
|
+
// test-style fakes are redacted too; real tokens are 36+.
|
|
29
|
+
{ pattern: /\bgh[pousr]_[A-Za-z0-9]{6,}\b/g, replacement: REDACTED },
|
|
30
|
+
// OpenAI / Anthropic style keys (sk-..., sk-ant-..., sk-proj-...). The floor
|
|
31
|
+
// is intentionally short (>= 6 body chars) so short test-style keys are also
|
|
32
|
+
// redacted; real keys are far longer.
|
|
33
|
+
{ pattern: /\bsk-(?:ant-|proj-)?[A-Za-z0-9_-]{6,}\b/g, replacement: REDACTED },
|
|
34
|
+
];
|
|
35
|
+
/** Secret-bearing key names used by assignment-style redaction. */
|
|
36
|
+
const ASSIGNMENT_KEYS = "api[_-]?key|apikey|secret|token|password|passwd|pwd|authorization|auth";
|
|
37
|
+
/** `key: "value"` / `key = "value"` — preserve the key + quotes, redact the value. */
|
|
38
|
+
const ASSIGNMENT_QUOTED = new RegExp(`\\b(${ASSIGNMENT_KEYS})(\\s*[:=]\\s*)("|')[^"']*("|')`, "gi");
|
|
39
|
+
/** `key=value` / `key: value` (unquoted) — preserve the key, redact the value. */
|
|
40
|
+
const ASSIGNMENT_UNQUOTED = new RegExp(`\\b(${ASSIGNMENT_KEYS})(\\s*[:=]\\s*)([^\\s"',;}{]+)`, "gi");
|
|
41
|
+
/**
|
|
42
|
+
* Redact known secret-shaped patterns from a single string. Non-secret text is
|
|
43
|
+
* preserved; recognized secret values become `[REDACTED]`.
|
|
44
|
+
*/
|
|
45
|
+
export function redactSecretString(value) {
|
|
46
|
+
let out = value;
|
|
47
|
+
for (const { pattern, replacement } of STANDALONE_PATTERNS) {
|
|
48
|
+
out = out.replace(pattern, replacement);
|
|
49
|
+
}
|
|
50
|
+
out = out.replace(ASSIGNMENT_QUOTED, (_m, key, sep, q) => `${key}${sep}${q}${REDACTED}${q}`);
|
|
51
|
+
out = out.replace(ASSIGNMENT_UNQUOTED, (_m, key, sep) => `${key}${sep}${REDACTED}`);
|
|
52
|
+
return out;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Secret-bearing object KEY names. Value-shape redaction alone is blind to
|
|
56
|
+
* structured secrets like `{ password: "plainvalue" }` or `{ api_key: "..." }`
|
|
57
|
+
* whose values have no recognizable shape, so {@link redactSecrets} also redacts
|
|
58
|
+
* a string value whenever its KEY looks credential-bearing. Matching normalizes
|
|
59
|
+
* case + `_`/`-` separators and compares whole/suffix words, so `access_token`
|
|
60
|
+
* and `clientSecret` match while the plural metric `tokens` and `author` do not.
|
|
61
|
+
*/
|
|
62
|
+
const SECRET_KEY_WORDS = [
|
|
63
|
+
"password",
|
|
64
|
+
"passwd",
|
|
65
|
+
"pwd",
|
|
66
|
+
"secret",
|
|
67
|
+
"token",
|
|
68
|
+
"apikey",
|
|
69
|
+
"authorization",
|
|
70
|
+
"auth",
|
|
71
|
+
];
|
|
72
|
+
/** True when an object key looks credential-bearing. */
|
|
73
|
+
export function isSecretKey(key) {
|
|
74
|
+
const norm = key.toLowerCase().replace(/[_-]/g, "");
|
|
75
|
+
return SECRET_KEY_WORDS.some((word) => norm === word || norm.endsWith(word));
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Recursively redact secrets in a JSON-like value while preserving array/object
|
|
79
|
+
* shape. A string value is redacted when EITHER its content is secret-shaped
|
|
80
|
+
* ({@link redactSecretString}) OR its object key is credential-bearing
|
|
81
|
+
* ({@link isSecretKey}) — the latter catches structured secrets with otherwise
|
|
82
|
+
* unrecognizable values. `undefined` is normalized deterministically: object
|
|
83
|
+
* properties whose value is `undefined` are omitted, and `undefined` array
|
|
84
|
+
* elements become `null` (matching `JSON.stringify` semantics) so serialized
|
|
85
|
+
* output is stable.
|
|
86
|
+
*/
|
|
87
|
+
export function redactSecrets(value) {
|
|
88
|
+
if (typeof value === "string") {
|
|
89
|
+
return redactSecretString(value);
|
|
90
|
+
}
|
|
91
|
+
if (Array.isArray(value)) {
|
|
92
|
+
return value.map((item) => (item === undefined ? null : redactSecrets(item)));
|
|
93
|
+
}
|
|
94
|
+
if (value !== null && typeof value === "object") {
|
|
95
|
+
const out = {};
|
|
96
|
+
for (const [key, val] of Object.entries(value)) {
|
|
97
|
+
if (val === undefined)
|
|
98
|
+
continue;
|
|
99
|
+
// Key-name redaction: a string under a credential-bearing key is replaced
|
|
100
|
+
// wholesale, regardless of whether its value matches a known secret shape.
|
|
101
|
+
if (typeof val === "string" && isSecretKey(key)) {
|
|
102
|
+
out[key] = REDACTED;
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
out[key] = redactSecrets(val);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return out;
|
|
109
|
+
}
|
|
110
|
+
// number | boolean | null | bigint | symbol | function — return primitives as-is.
|
|
111
|
+
return value;
|
|
112
|
+
}
|