@mmerterden/multi-agent-pipeline 10.5.0 → 10.7.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.
Files changed (37) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/README.md +11 -42
  3. package/install/index.mjs +9 -101
  4. package/package.json +1 -1
  5. package/pipeline/agents/android-architect.md +3 -3
  6. package/pipeline/agents/backend-architect.md +3 -3
  7. package/pipeline/agents/code-reviewer.md +3 -3
  8. package/pipeline/agents/ios-architect.md +3 -3
  9. package/pipeline/commands/multi-agent/finish.md +4 -4
  10. package/pipeline/commands/multi-agent/refs/features/model-fallback.md +18 -10
  11. package/pipeline/commands/multi-agent/refs/phases/phase-4-review.md +1 -11
  12. package/pipeline/commands/multi-agent/setup.md +18 -1
  13. package/pipeline/commands/multi-agent/stack.md +1 -1
  14. package/pipeline/commands/multi-agent/sync.md +5 -74
  15. package/pipeline/commands/multi-agent/update.md +9 -0
  16. package/pipeline/scripts/README.md +0 -1
  17. package/pipeline/scripts/build-stack-plugins.mjs +2 -2
  18. package/pipeline/scripts/smoke-cross-cli-behavior.sh +0 -7
  19. package/pipeline/scripts/smoke-install-layout.sh +1 -2
  20. package/pipeline/scripts/smoke-model-fallback.sh +11 -10
  21. package/pipeline/skills/shared/core/multi-agent-finish/SKILL.md +1 -1
  22. package/pipeline/skills/shared/core/multi-agent-stack/SKILL.md +1 -1
  23. package/pipeline/skills/shared/core/multi-agent-sync/SKILL.md +1 -1
  24. package/install/_adapters.mjs +0 -73
  25. package/pipeline/adapters/_base.mjs +0 -640
  26. package/pipeline/adapters/antigravity.mjs +0 -140
  27. package/pipeline/adapters/codex.mjs +0 -159
  28. package/pipeline/adapters/copilot-chat-orchestration.mjs +0 -148
  29. package/pipeline/adapters/copilot-chat.mjs +0 -124
  30. package/pipeline/adapters/cursor-orchestration.mjs +0 -152
  31. package/pipeline/adapters/cursor.mjs +0 -146
  32. package/pipeline/scripts/smoke-adapters.sh +0 -276
  33. package/pipeline/scripts/smoke-shared-runtime.sh +0 -108
  34. package/pipeline/scripts/smoke-stack-swap.sh +0 -132
  35. package/pipeline/scripts/smoke-sync-adapters.sh +0 -113
  36. package/pipeline/scripts/stack-swap.sh +0 -182
  37. package/pipeline/scripts/sync-adapters.mjs +0 -183
@@ -1,6 +1,6 @@
1
1
  ---
2
- description: "One-shot sync of the entire multi-agent ecosystem: Claude Code, Copilot CLI, Cursor/Antigravity/Copilot Chat orchestration adapters, pipeline repo, website, and remote-control."
3
- argument-hint: "[release] [--no-adapters] [--platform=<macos|linux|windows>]"
2
+ description: "One-shot sync of the entire multi-agent ecosystem: Claude Code, Copilot CLI, pipeline repo, website, and remote-control."
3
+ argument-hint: "[release] [--platform=<macos|linux|windows>]"
4
4
  allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion, WebFetch
5
5
  ---
6
6
 
@@ -14,9 +14,8 @@ When invoked, it synchronizes all 7 targets in order. It detects what changed, u
14
14
 
15
15
  | Arg | Meaning |
16
16
  |---|---|
17
- | (none) | Full ecosystem sync: global targets (Claude, Copilot, Codex CLI, pipeline repo, website, remote-control) AND per-project adapter files (Cursor / Antigravity / Copilot Chat) in `prefs.global.projectsTouched[]`. Step 2b runs by default. Files are refreshed and a LOCAL commit is made per project; push stays the user's call (never automatic). |
17
+ | (none) | Full ecosystem sync: Claude Code, Copilot CLI, pipeline repo, website, remote-control. |
18
18
  | `release` | Full sync + version bump + tag + npm publish + website deploy |
19
- | `--no-adapters` | Skip Step 2b (per-project adapter refresh). Use when you want only the global targets and must not touch any project repo (e.g. mid-feature-branch in a project). |
20
19
  | `--platform=<macos\|linux\|windows>` | Override automatic platform detection. For CI / cross-platform smoke. |
21
20
  | `"change description"` | Apply the description to every target at once |
22
21
 
@@ -27,8 +26,6 @@ When invoked, it synchronizes all 7 targets in order. It detects what changed, u
27
26
  | 0 | Figma source (deprecated) | `prefs.global.figmaSource.path` | skip (see memory `feedback_figma_source_deprecated`) |
28
27
  | 1 | Claude Code (source of truth) | `~/.claude/commands/multi-agent.md` + `~/.claude/commands/multi-agent/` + `~/.claude/agents/` + `~/.claude/scripts/` + `~/.claude/lib/` | source |
29
28
  | 2 | Copilot CLI | `~/.copilot/copilot-instructions.md` + `~/.copilot/skills/` | <- from Claude |
30
- | 2a | OpenAI Codex CLI (global, auto when `~/.codex` present) | `~/.codex/prompts/multi-agent.md` + `~/.codex/AGENTS.md` + `~/.codex/config.toml` | <- from Claude |
31
- | 2b | Cursor / Antigravity / Copilot Chat adapters (default; skip with `--no-adapters`) | `.cursor/rules/multi-agent.mdc`, `.github/copilot-instructions.md` in each project root | <- from Claude (template) |
32
29
  | 3 | multi-agent-pipeline repo | `~/multi-agent-pipeline/pipeline/` | <- from Claude (genericized) |
33
30
  | 4 | Website | `{owner}/{website-host}` | <- version + features |
34
31
  | 5 | Remote Control | `{owner}/remote-control` | <- pipeline references |
@@ -62,13 +59,6 @@ Step 0: FIGMA_SYNC SKIP (deprecated - feedback_figma_source_deprecated)
62
59
  Step 1: PLATFORM Detect macOS / Linux / Windows (Git Bash / WSL); export PLATFORM env
63
60
  Step 1.5: DETECT Compare timestamps, find stale targets
64
61
  Step 2: COPILOT Claude Code -> Copilot CLI (instructions + 34 sub-command skills)
65
- Step 2a: CODEX Claude Code -> Codex CLI (global ~/.codex prompt + AGENTS.md + config.toml mcp)
66
- - runs via `node pipeline/scripts/sync-adapters.mjs`, which fires the
67
- codex adapter ONCE (global) when `~/.codex` exists on this machine
68
- Step 2b: ADAPTERS Cursor / Antigravity / Copilot Chat per-project rule files refresh
69
- - RUNS BY DEFAULT: refreshes all projectsTouched[] targets + the pipeline repo
70
- - `--no-adapters` skips this step entirely
71
- - writes files + a LOCAL commit per project; push stays the user's call
72
62
  Step 3: REPO Claude Code -> pipeline repo (genericized, personal data scrub, bash -n on all sh)
73
63
  Step 3c: PLUGINS pipeline shared/external -> multi-agent-plugins marketplace (rebuild knowledge/,
74
64
  bump changed plugins' patch version, commit + push the plugins repo)
@@ -134,65 +124,6 @@ If nothing is stale → report "All targets up to date" and stop.
134
124
  4. **Do not duplicate** - summary in Copilot, full spec in Claude. Keep this distinction.
135
125
  5. **Report** - show a short diff summary after sync
136
126
 
137
- ## Step 2b - Per-Project Adapter Sync (default; skip with `--no-adapters`)
138
-
139
- Cursor and GitHub Copilot Chat do not have global skill directories like Claude Code (`~/.claude/`) or Copilot CLI (`~/.copilot/`). They consume the pipeline through a separate rule file per project. So for them, sync runs **per-project**, over every repo in `prefs.global.projectsTouched[]`.
140
-
141
- This step RUNS BY DEFAULT. The only side effect on a project repo is a refresh of the marker-wrapped adapter files plus a LOCAL commit; **push is never automatic** (see below), so sync cannot publish anything to a project's remote on its own. If you still need to keep a project repo completely untouched this run (e.g. you are mid-feature-branch and do not want even a local commit), pass `--no-adapters` to skip the step.
142
-
143
- | Adapter | Per-project files | Created by setup |
144
- |---|---|---|
145
- | Cursor | `.cursor/rules/multi-agent-*.mdc` + `.cursor/agents/ma-*.md` + `.cursor/commands/multi-agent.md` + `.cursor/mcp.json` | `multi-agent:setup` `--cursor` flag |
146
- | Antigravity | `.agent/rules/multi-agent-*.md` + `.agent/workflows/multi-agent.md` + `AGENTS.md` + `.agent/mcp_config.json` | `multi-agent:setup` `--antigravity` flag |
147
- | Copilot Chat (VS Code) | `.github/copilot-instructions.md` + `.github/agents/ma-*.agent.md` + `.github/prompts/multi-agent.prompt.md` + `.vscode/mcp.json` | `multi-agent:setup` `--copilot-chat` flag |
148
-
149
- These three are FULL-orchestration adapters (subagents/workflow + a `/multi-agent` command + the dev-toolkit MCP server), not just knowledge layers. Claude Code and Copilot CLI run the pipeline natively and are synced via the global flow above, not here.
150
-
151
- **OpenAI Codex CLI is NOT in this per-project table.** Codex is a global-config tool: its custom prompts and MCP servers live under `~/.codex/` and there is no per-project prompt directory. So Codex is synced in the GLOBAL flow (Step 2a), not per-project - `sync-adapters.mjs` fires the codex adapter once when `~/.codex` exists, writing `~/.codex/prompts/multi-agent.md`, `~/.codex/AGENTS.md`, and the `[mcp_servers.dev-toolkit]` block in `~/.codex/config.toml`. Installed via `multi-agent:setup` `--codex` flag (or `node install.js --codex`). Codex has no subagent fan-out, so the Phase 4 parallel review degrades to a sequential adversarial two-pass.
152
-
153
- ### Flow
154
-
155
- Adapter sync orchestration goes through `pipeline/scripts/sync-adapters.mjs` - this script discovers per-project marker files (`.cursor*`, `.github/copilot-instructions.md`, `.agent`/`AGENTS.md`) and dispatches the matching adapter module (`pipeline/adapters/{cursor,copilot-chat,antigravity}.mjs`, each of which also emits its orchestration layer).
156
-
157
- 1. Read the `prefs.global.projectsTouched[]` list (LRU, max 20 entries). Each entry is in the form `{ path, adapters: [...] }`: a record of which adapters are installed in that project.
158
-
159
- 2. One command, all projects:
160
- ```bash
161
- node pipeline/scripts/sync-adapters.mjs --all
162
- ```
163
-
164
- For each target the script:
165
- - If a `.cursor/` or `.cursorrules` marker is present, runs the **cursor** adapter → `pipeline/adapters/cursor.mjs install()` emits 174+ `.cursor/rules/multi-agent-*.mdc` files + one legacy `.cursorrules` digest.
166
- - If a `.copilot/` or `.github/copilot-instructions.md` marker is present, runs the **copilot-chat** adapter.
167
- - The pipeline repo itself (when `pipeline/` + `.git/` are present) always gets the cursor sync - the maintainer's canonical cursor consumer.
168
- - If no marker is present, skips (`[skip]`).
169
-
170
- 3. Dry-run view:
171
- ```bash
172
- node pipeline/scripts/sync-adapters.mjs --doctor
173
- ```
174
-
175
- 4. Single-project refresh (this repo or another target):
176
- ```bash
177
- node pipeline/scripts/sync-adapters.mjs --target=/path/to/repo --platform=ios
178
- ```
179
-
180
- 5. Commits are made separately per project (no cross-project commit):
181
- ```bash
182
- cd "$PROJ"
183
- if ! git diff --cached --quiet; then
184
- git commit -m "chore(adapter): sync multi-agent rules"
185
- # NOTE: push is not automatic - it's the user's call. Sync only makes a local commit.
186
- fi
187
- ```
188
-
189
- 4. Push is **not automatic**. Adapter sync leaves the commit local by default; the push decision for each project branch is the user's (whether the project branch is shared requires external knowledge).
190
-
191
- ### Skip conditions
192
-
193
- - If `--no-adapters` is given, Step 2b is skipped entirely (the report says "skipped (--no-adapters)").
194
- - `prefs.global.projectsTouched[]` empty -> "no project adapter installs recorded - run `multi-agent:setup` in a project first". Step 2b is a no-op (nothing to refresh), not an error.
195
- - Project directory deleted -> the entry is subject to LRU pruning (sync does not error there).
196
127
 
197
128
  ---
198
129
 
@@ -217,7 +148,7 @@ Adapter sync orchestration goes through `pipeline/scripts/sync-adapters.mjs` -
217
148
  5. **Files NOT synced** (local-only, may contain personal data):
218
149
  - `~/.claude/multi-agent-preferences.json`
219
150
  - `~/.claude/CLAUDE.md`, `~/.claude/rules/`, `~/.claude/knowledge/`
220
- - `~/.claude/scripts/` - EXCEPT `pre-commit-check.sh`, `stack-swap.sh` (legacy, retained for manual use), and `build-stack-plugins.mjs` (generic, synced)
151
+ - `~/.claude/scripts/` - EXCEPT `pre-commit-check.sh` and `build-stack-plugins.mjs` (generic, synced)
221
152
  - `~/.claude/settings.json`
222
153
 
223
154
  6. **Cross-platform smoke gate** (final step of the REPO sync, before push):
@@ -340,7 +271,7 @@ When invoked with the `release` argument:
340
271
 
341
272
  ## Sub-Command Sync (Claude Code <-> Copilot CLI Skills)
342
273
 
343
- This step runs only on the Claude <-> Copilot axis. Cursor / Copilot Chat do not have a global command directory; they consume the pipeline through the per-project rule files in Step 2b, so they have no sub-command-level sync target.
274
+ This runs on the Claude <-> Copilot axis the two CLIs the pipeline supports natively.
344
275
 
345
276
  | Claude Code | Copilot CLI |
346
277
  |-------------|-------------|
@@ -51,6 +51,15 @@ Update the pipeline in one command. Existing preferences are preserved; only ski
51
51
  fi
52
52
  ```
53
53
 
54
+ 4c. **Prune retired adapter files** (Cursor / Antigravity / Codex / Copilot Chat were removed in v10.7.0 — the pipeline now targets Claude Code + Copilot CLI only):
55
+ ```bash
56
+ # Global Codex adapter prompt is safe to remove (no longer produced).
57
+ rm -f "$HOME/.codex/prompts/multi-agent.md"
58
+ echo " -> pruned retired global Codex adapter prompt (if present)"
59
+ # Per-project adapter files (.cursor/, .agent/, .github/copilot-instructions.md)
60
+ # live in your repos and are left untouched — remove them manually if you like.
61
+ ```
62
+
54
63
  5. **Migrate preferences** (if there is an old schema):
55
64
  ```bash
56
65
  if [ -f "$HOME/.claude/scripts/migrate-prefs.mjs" ]; then
@@ -52,7 +52,6 @@ Validate contracts. Each emits `══ <name> smoke: N passed, M failed ══`
52
52
  - `smoke-prefs-language.sh` - `prefs.global.promptLanguage` contract
53
53
  - `smoke-progress-contract.sh` - progress-line quiet/normal/verbose
54
54
  - `smoke-search.sh` - `/multi-agent:search` log search + smart ranking
55
- - `smoke-stack-swap.sh` - `/multi-agent:stack` auto-detect + manual override
56
55
  - `smoke-subagent-validators.sh` - Phase 1/2 validator schemas
57
56
  - `smoke-telemetry.sh` - opt-in telemetry contract
58
57
  - `smoke-validator-contradiction.sh` - Phase 4 approved/blocking contradiction detection
@@ -13,7 +13,7 @@
13
13
  * plugin repo and are NEVER touched here — only the `knowledge/` layer + plugin.json
14
14
  * knowledge entries are regenerated.
15
15
  *
16
- * Routing mirrors pipeline/scripts/stack-swap.sh patterns. Genuinely cross-stack
16
+ * Routing uses the per-stack skill patterns (formerly carried by stack-swap.sh). Genuinely cross-stack
17
17
  * skills go to ai-common-engineering-toolkit (not into each stack plugin). Apple/
18
18
  * Xcode-only vendored skills that match no stack pattern belong to iOS only.
19
19
  *
@@ -45,7 +45,7 @@ const APPLE_ONLY = [
45
45
  'xcode-compilation-analyzer', 'xcode-project-analyzer',
46
46
  ];
47
47
 
48
- // stack → matching pattern (mirrors stack-swap.sh IOS/ANDROID/BACKEND/FRONTEND patterns)
48
+ // stack → matching pattern (per-stack routing patterns (formerly in stack-swap.sh))
49
49
  const STACK_PATTERNS = {
50
50
  'ai-ios-engineering-toolkit': /(swiftui|swift-|ios-|hig-|apple-|storekit|widgetkit|healthkit|homekit|mapkit|musickit|passkit|pencilkit|realitykit|weatherkit|alarmkit|callkit|cloudkit|coreml|core-|eventkit|energykit|permissionkit|tipkit|shareplay|live-activities|background-processing|app-store|app-clips|app-intents|authentication|contacts-framework|device-integrity|macos-|natural-language|photos-camera|push-notifications|speech-recognition|swiftdata|vision-framework|debugging-instruments|help-skills)/i,
51
51
  'ai-android-engineering-toolkit': /(android|compose-|kotlin-|room-database|retrofit-|gradle-|play-store)/i,
@@ -226,13 +226,6 @@ if grep -q '"reviewerCount"' "$TRSCHEMA" && grep -qi "Claude Code = 2, Copilot C
226
226
  else
227
227
  fail "triage consensus.reviewerCount does not document the 2/3 split"
228
228
  fi
229
- # The 3 adapter platforms must document their concrete reviewer set (a 2-model
230
- # cross-vendor review configured to each platform's available models).
231
- if grep -qi "Adapter platforms" "$P4" && grep -qi "cross-vendor" "$P4" && grep -q "ma-code-reviewer-x" "$P4"; then
232
- pass "phase-4-review documents the adapter-platform cross-vendor reviewer set"
233
- else
234
- fail "phase-4-review does not document the adapter-platform reviewer set"
235
- fi
236
229
 
237
230
  echo ""
238
231
  echo "══ cross-cli-behavior smoke: $PASS passed, $FAIL failed ══"
@@ -4,7 +4,7 @@
4
4
  # the same on-disk output as the pre-v8.0.0 monolithic installer.
5
5
  #
6
6
  # v8.0.0 split install.js (1246 LOC) into ./install/{index,claude,copilot,
7
- # _common,_platform-filter,_telemetry,_adapters,_dev-only-files,
7
+ # _common,_platform-filter,_telemetry,_dev-only-files,
8
8
  # _copilot-instructions}.mjs. The legacy install.js stayed as a thin shim
9
9
  # that imports install/index.mjs and calls runInstall(process.argv).
10
10
  #
@@ -66,7 +66,6 @@ expected_modules=(
66
66
  "_common.mjs"
67
67
  "_platform-filter.mjs"
68
68
  "_telemetry.mjs"
69
- "_adapters.mjs"
70
69
  "_copilot-instructions.mjs"
71
70
  "_dev-only-files.mjs"
72
71
  )
@@ -62,19 +62,20 @@ echo "→ 3. Phase wiring references the contract"
62
62
  grep -q "model-fallback.md" "$P0" && ok "phase-0-init wires the date gate" || fail "phase-0-init missing fallback wiring"
63
63
  grep -q "model-fallback.md" "$P4" && ok "phase-4-review wires the per-dispatch triggers" || fail "phase-4-review missing fallback wiring"
64
64
 
65
- echo "→ 4. Personas declare opus as preferred (fallback is dispatch-time, not file-time)"
66
- OPUS_COUNT=$(grep -l "^preferredModel: opus" "$REPO_ROOT"/pipeline/agents/*.md 2>/dev/null | wc -l | tr -d ' ')
67
- if [ "$OPUS_COUNT" -ge 5 ]; then
68
- ok "opus personas intact ($OPUS_COUNT files)"
65
+ echo "→ 4. Top-tier personas declare their preferred model (fallback is dispatch-time, not file-time)"
66
+ # Fable 5 is the top tier again: architect + Reviewer-1 (+ triage) personas pin it.
67
+ FABLE_COUNT=$(grep -l "^preferredModel: fable" "$REPO_ROOT"/pipeline/agents/*.md 2>/dev/null | wc -l | tr -d ' ')
68
+ if [ "$FABLE_COUNT" -ge 4 ]; then
69
+ ok "fable top-tier personas present ($FABLE_COUNT files)"
69
70
  else
70
- fail "expected >=5 opus personas, found $OPUS_COUNT"
71
+ fail "expected >=4 fable personas (architects + Reviewer-1), found $FABLE_COUNT"
71
72
  fi
72
- # Fable 5 is retired - no persona should still pin it.
73
- FABLE_LEFT=$(grep -l "^preferredModel: fable" "$REPO_ROOT"/pipeline/agents/*.md 2>/dev/null | wc -l | tr -d ' ')
74
- if [ "$FABLE_LEFT" -eq 0 ]; then
75
- ok "no persona still pins retired fable tier"
73
+ # Opus stays a valid tier the first fallback below fable, and the top tier for security personas.
74
+ OPUS_COUNT=$(grep -l "^preferredModel: opus" "$REPO_ROOT"/pipeline/agents/*.md 2>/dev/null | wc -l | tr -d ' ')
75
+ if [ "$OPUS_COUNT" -ge 1 ]; then
76
+ ok "opus personas intact ($OPUS_COUNT files)"
76
77
  else
77
- fail "expected 0 fable personas (fable retired), found $FABLE_LEFT"
78
+ fail "expected >=1 opus persona (fallback tier / security), found $OPUS_COUNT"
78
79
  fi
79
80
 
80
81
  echo ""
@@ -35,7 +35,7 @@ Phases 1-3 (Analysis / Planning / Dev) are skipped by design - the branch's lo
35
35
 
36
36
  ```bash
37
37
  multi-agent finish # current branch vs base; Jira id from branch name
38
- multi-agent finish DIJITAL-12345 # explicit Jira id for the Phase 7 comment
38
+ multi-agent finish PROJ-12345 # explicit Jira id for the Phase 7 comment
39
39
  multi-agent finish --base develop # override base branch for the diff
40
40
  multi-agent finish autopilot # no gate prompts: auto-fix, auto-PR, auto-comment
41
41
  ```
@@ -47,4 +47,4 @@ multi-agent-stack all # all four stack toolkits + common
47
47
  - Enablement is per-repo and declarative — commit `.claude/settings.json` so teammates get the same stack.
48
48
  - Restart the conversation to pick up newly enabled plugins.
49
49
  - Pipeline Phase 1 stack detection is independent (it reads project files); `stack` only sets which plugin skill set is active.
50
- - Legacy: `stack-swap.sh` is retained for manual/offline use but is no longer wired to any hook.
50
+ - The old `stack-swap.sh` skill-dir swap has been removed; stack selection is entirely plugin enablement.
@@ -90,7 +90,7 @@ If nothing is stale -> report "All targets up to date" and stop.
90
90
  5. **Files NOT synced** (local-only, may contain personal data):
91
91
  - `~/.claude/multi-agent-preferences.json`
92
92
  - `~/.claude/CLAUDE.md`, `~/.claude/rules/`, `~/.claude/knowledge/`
93
- - `~/.claude/scripts/` - EXCEPT `pre-commit-check.sh`, `stack-swap.sh` (legacy, retained), and `build-stack-plugins.mjs` (generic, synced)
93
+ - `~/.claude/scripts/` - EXCEPT `pre-commit-check.sh` and `build-stack-plugins.mjs` (generic, synced)
94
94
  - Step 3c (PLUGINS): rebuild the `{owner}/multi-agent-plugins` marketplace from `shared/external` via `build-stack-plugins.mjs` (bumps changed plugins' patch version), then commit + push the plugins repo
95
95
  - `~/.claude/settings.json`
96
96
 
@@ -1,73 +0,0 @@
1
- /**
2
- * Third-party adapter dispatch.
3
- *
4
- * Each adapter (Cursor / Copilot Chat) is dynamically imported only when its
5
- * flag is set, so the default Claude / Copilot install path stays free of
6
- * adapter module load cost.
7
- *
8
- * As of v8.5.4 the previously-shipped Windsurf / Cline / Zed / Continue
9
- * adapters were removed — pipeline owner did not use them, and keeping them
10
- * green added smoke-test surface for no real benefit. Their files were
11
- * deleted from `pipeline/adapters/`. Reintroducing any of them is a one-file
12
- * add against `_base.mjs`.
13
- *
14
- * @module install/_adapters
15
- */
16
-
17
- import { join } from "path";
18
-
19
- /**
20
- * @typedef {object} AdapterFlags
21
- * @property {boolean} cursor
22
- * @property {boolean} copilotChat
23
- * @property {boolean} antigravity
24
- * @property {boolean} codex
25
- */
26
-
27
- /**
28
- * @param {AdapterFlags} flags
29
- * @returns {boolean}
30
- */
31
- export function anyAdapterRequested(flags) {
32
- return flags.cursor || flags.copilotChat || flags.antigravity || flags.codex;
33
- }
34
-
35
- /**
36
- * @param {{
37
- * pipelineRoot: string,
38
- * pipelineSrc: string,
39
- * target: string,
40
- * platformFilter: "ios"|"android"|"all",
41
- * flags: AdapterFlags,
42
- * }} ctx
43
- */
44
- export async function installAdapters(ctx) {
45
- const { pipelineRoot, target, platformFilter, flags } = ctx;
46
- console.log("");
47
- console.log(" Third-party tool adapters (knowledge layer only)");
48
- console.log(` Target: ${target}`);
49
- console.log("");
50
-
51
- const adapterCommonOpts = {
52
- pipelineSrc: ctx.pipelineSrc,
53
- target,
54
- platformFilter,
55
- };
56
-
57
- const adapterTargets = [
58
- flags.cursor && "./pipeline/adapters/cursor.mjs",
59
- flags.copilotChat && "./pipeline/adapters/copilot-chat.mjs",
60
- flags.antigravity && "./pipeline/adapters/antigravity.mjs",
61
- flags.codex && "./pipeline/adapters/codex.mjs",
62
- ].filter(Boolean);
63
-
64
- for (const modPath of adapterTargets) {
65
- try {
66
- const adapter = (await import(join(pipelineRoot, modPath))).default;
67
- console.log(` [${adapter.name}] Installing...`);
68
- adapter.install(adapterCommonOpts);
69
- } catch (e) {
70
- console.error(` -> Adapter load failed (${modPath}): ${e.message}`);
71
- }
72
- }
73
- }