@bridge_gpt/mcp-server 0.1.16 → 0.2.0
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 +333 -162
- package/build/agent-capabilities/cli.js +152 -0
- package/build/agent-capabilities/default-deps.js +45 -0
- package/build/agent-capabilities/probe-context.js +111 -0
- package/build/agent-capabilities/probes.js +278 -0
- package/build/agent-capabilities/reporter.js +50 -0
- package/build/agent-capabilities/runner.js +56 -0
- package/build/agent-capabilities/types.js +10 -0
- package/build/agent-launchers/claude.js +85 -0
- package/build/agent-launchers/index.js +17 -0
- package/build/agent-launchers/types.js +1 -0
- package/build/agents.generated.js +1 -1
- package/build/brainstorm-files.js +89 -0
- package/build/bridge-config.js +404 -0
- package/build/chain-orchestrator.js +1364 -0
- package/build/chain-utils.js +68 -0
- package/build/commands.generated.js +5 -3
- package/build/credential-materialization.js +128 -0
- package/build/credential-store.js +232 -0
- package/build/decision-page-schema.js +39 -6
- package/build/decision-page-template.js +54 -18
- package/build/doctor.js +18 -2
- package/build/fetch-stub.js +139 -0
- package/build/git-ignore-utils.js +63 -0
- package/build/index.js +1623 -546
- package/build/mcp-invoke.js +417 -0
- package/build/mcp-provisioning.js +249 -0
- package/build/mcp-registration-doctor.js +96 -0
- package/build/pipeline-orchestrator.js +66 -1
- package/build/pipeline-utils.js +33 -0
- package/build/pipelines.generated.js +165 -5
- package/build/schedule-run.js +951 -0
- package/build/schedule-store.js +132 -0
- package/build/scheduler-backends/at-fallback.js +144 -0
- package/build/scheduler-backends/escaping.js +113 -0
- package/build/scheduler-backends/index.js +72 -0
- package/build/scheduler-backends/launchd.js +216 -0
- package/build/scheduler-backends/systemd-user.js +237 -0
- package/build/scheduler-backends/task-scheduler.js +219 -0
- package/build/scheduler-backends/types.js +23 -0
- package/build/start-tickets-prereqs.js +90 -1
- package/build/start-tickets.js +222 -70
- package/build/third-party-mcp-targets.js +75 -0
- package/build/version.generated.js +1 -1
- package/package.json +8 -8
- package/pipelines/full-automation.json +49 -0
- package/pipelines/idea-to-ticket.json +71 -0
- package/pipelines/implement-ticket.json +28 -2
- package/smoke-test/SMOKE-TEST.md +511 -0
- package/smoke-test/smoke-test-mcp.md +23 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Local-only ignore helpers.
|
|
3
|
+
*
|
|
4
|
+
* Two idempotent, exact-line appenders:
|
|
5
|
+
* - `ensureGitignored` writes the tracked `<cwd>/.gitignore` (shared with the
|
|
6
|
+
* existing `--init` scaffolding behavior).
|
|
7
|
+
* - `ensureGitInfoExcluded` writes the UNtracked `<worktreeRoot>/.git/info/exclude`,
|
|
8
|
+
* used for Tier-3 file credentials that must never enter version control and
|
|
9
|
+
* must never touch the tracked `.gitignore`.
|
|
10
|
+
*
|
|
11
|
+
* Both are dependency-injected so they are unit-testable without real I/O, and
|
|
12
|
+
* neither ever includes credential file contents in an error.
|
|
13
|
+
*/
|
|
14
|
+
import path from "path";
|
|
15
|
+
/** True when `content` already contains `entry` as its own exact (trimmed) line. */
|
|
16
|
+
function hasExactLine(content, entry) {
|
|
17
|
+
return content.split("\n").some((line) => line.trim() === entry);
|
|
18
|
+
}
|
|
19
|
+
/** Append `entry` to `content`, inserting a separating newline only if needed. */
|
|
20
|
+
function appendLine(content, entry) {
|
|
21
|
+
const separator = content.length > 0 && !content.endsWith("\n") ? "\n" : "";
|
|
22
|
+
return content + separator + entry + "\n";
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Idempotently ensure `filePath` is listed in `<cwd>/.gitignore`. An absolute
|
|
26
|
+
* `filePath` is made relative to `cwd`; an already-relative path is used as-is.
|
|
27
|
+
* No-op when the exact line already exists.
|
|
28
|
+
*/
|
|
29
|
+
export async function ensureGitignored(cwd, filePath, deps) {
|
|
30
|
+
const gitignorePath = path.join(cwd, ".gitignore");
|
|
31
|
+
const entry = path.isAbsolute(filePath) ? path.relative(cwd, filePath) : filePath;
|
|
32
|
+
let content = "";
|
|
33
|
+
try {
|
|
34
|
+
content = await deps.readFile(gitignorePath);
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
/* .gitignore doesn't exist yet */
|
|
38
|
+
}
|
|
39
|
+
if (hasExactLine(content, entry))
|
|
40
|
+
return;
|
|
41
|
+
await deps.writeFile(gitignorePath, appendLine(content, entry));
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Idempotently ensure `relativePath` is listed in the worktree's local-only
|
|
45
|
+
* `<worktreeRoot>/.git/info/exclude`. Creates `<worktreeRoot>/.git/info` if it
|
|
46
|
+
* does not exist. Matching is exact-line (so `dw.json` is not treated as present
|
|
47
|
+
* just because `dw.json.bak` exists). Never edits the tracked `.gitignore`.
|
|
48
|
+
*/
|
|
49
|
+
export async function ensureGitInfoExcluded(worktreeRoot, relativePath, deps) {
|
|
50
|
+
const infoDir = path.join(worktreeRoot, ".git", "info");
|
|
51
|
+
const excludePath = path.join(infoDir, "exclude");
|
|
52
|
+
let content = "";
|
|
53
|
+
try {
|
|
54
|
+
content = await deps.readFile(excludePath);
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
/* exclude file (or .git/info) doesn't exist yet */
|
|
58
|
+
}
|
|
59
|
+
if (hasExactLine(content, relativePath))
|
|
60
|
+
return;
|
|
61
|
+
await deps.mkdir(infoDir, { recursive: true });
|
|
62
|
+
await deps.writeFile(excludePath, appendLine(content, relativePath));
|
|
63
|
+
}
|