Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .codex/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Project-local Codex MCP config. Codex CLI loads this only when the
# repository is marked trusted in the user's global Codex config.
#
# TODO: replace this manual file with APM-managed `.codex/config.toml`
# once microsoft/apm#803 lands.
[mcp_servers.chrome-devtools]
command = "nix"
args = ["develop", ".#e2e", "--command", "just", "ai::mcp-chrome-devtools"]
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ CLAUDE.md linguist-generated
.claude/launch.json -linguist-generated
.agents/** linguist-generated
.codex/** linguist-generated
.codex/config.toml -linguist-generated
.opencode/** linguist-generated
42 changes: 33 additions & 9 deletions agents/ai.just
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,35 @@ apm-sync: apm-audit
echo "ERROR: .claude/ out of sync with sources — run: just ai::apm" >&2
exit 1
fi
if ! diff -r .codex "$scratch/.codex"; then
# `.codex/config.toml` is currently a checked-in manual fallback for
# project-local Codex MCP until microsoft/apm#803 lands; current APM
# does not emit it in the scratch tree yet.
if ! diff -r \
-x config.toml \
.codex "$scratch/.codex"; then
echo "ERROR: .codex/ out of sync with sources — run: just ai::apm" >&2
exit 1
fi
if ! diff -r .agents "$scratch/.agents"; then
echo "ERROR: .agents/ out of sync with sources — run: just ai::apm" >&2
exit 1
fi
if ! diff -r .opencode "$scratch/.opencode"; then
if ! diff -r \
-x .gitignore \
-x node_modules \
-x package-lock.json \
-x package.json \
.opencode "$scratch/.opencode"; then
echo "ERROR: .opencode/ out of sync with sources — run: just ai::apm" >&2
exit 1
fi
if [[ -e opencode.json || -e "$scratch/opencode.json" ]]; then
if [[ ! -e opencode.json || ! -e "$scratch/opencode.json" ]] || \
! diff <(jq -S . opencode.json) <(jq -S . "$scratch/opencode.json"); then
echo "ERROR: opencode.json out of sync with sources — run: just ai::apm" >&2
exit 1
fi
fi
if ! diff AGENTS.md "$scratch/AGENTS.md"; then
echo "ERROR: AGENTS.md out of sync with sources — run: just ai::apm" >&2
exit 1
Expand All @@ -109,18 +126,25 @@ agent *args: apm
just prepare
{{ env('AI_AGENT', 'claude --dangerously-skip-permissions') }} {{ args }}

# Launch chrome-devtools-mcp server over stdio — wired up via the root
# `.mcp.json`, which shells out via `nix develop --command just
# ai::mcp-chrome-devtools` (Claude Code starts outside the nix devshell).
# Launch chrome-devtools-mcp server over stdio.
#
# Today the checked-in project-local MCP entrypoints are:
# - Claude Code: `.mcp.json`
# - Codex CLI: `.codex/config.toml` (only for trusted projects)
#
# The top-level `apm.yml` mirrors the same server for runtimes APM can
# configure natively today. Codex project-scoped MCP is tracked upstream
# in microsoft/apm#803; once that lands, `.codex/config.toml` should
# become APM-managed like the other generated runtime config.
#
# All paths shell out via `nix develop .#e2e --command just
# ai::mcp-chrome-devtools` so agent runtimes that start outside the nix
# devshell still get Playwright's Chrome-for-Testing.
# Chrome binary resolved from Playwright's nix-provided Chrome-for-Testing
# across platforms: `chrome-linux64/chrome` on Linux and
# `chrome-mac-*/Google Chrome for Testing.app/.../Google Chrome for Testing`
# on macOS. `find` picks either layout; a miss fails loud downstream
# (empty --executable-path → MCP server errors out visibly).
#
# TODO: fold .mcp.json's entry into `dependencies.mcp` above once
# microsoft/apm#655 (Claude Code MCP adapter) merges and lands in juspay's
# fork — `.mcp.json` then becomes a generated artifact of `just ai::apm`.
mcp-chrome-devtools:
bash -c 'shopt -s nullglob; \
for c in "$PLAYWRIGHT_BROWSERS_PATH"/chromium-*/chrome-linux64/chrome \
Expand Down
16 changes: 15 additions & 1 deletion apm.lock.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
lockfile_version: '1'
generated_at: '2026-04-22T18:22:05.656399+00:00'
generated_at: '2026-04-22T19:34:51.132897+00:00'
apm_version: 0.9.1
dependencies:
- repo_url: _local/agents
Expand Down Expand Up @@ -134,3 +134,17 @@ dependencies:
.opencode/agents/hickey.md: sha256:edde9b0d3b27b947b7372f662b2e8652d136e0bb9af7924892b00450a1e586bc
.opencode/agents/lowy.md: sha256:a1c8e5ba115439bcfa0d7e331f96e71b2d690ff2e5fb9b824bb5f588eb43ac75
content_hash: sha256:f309878ce79ee166620ef89812d093707f07b79cbebaa74725dc6f32f3cac8d3
mcp_servers:
- chrome-devtools
mcp_configs:
chrome-devtools:
name: chrome-devtools
transport: stdio
args:
- develop
- .#e2e
- --command
- just
- ai::mcp-chrome-devtools
registry: false
command: nix
11 changes: 11 additions & 0 deletions apm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,14 @@ dependencies:
- juspay/skills/skills/nix-justfile
- juspay/skills/skills/nix-typescript
- anthropics/skills/skills/frontend-design
mcp:
- name: chrome-devtools
registry: false
transport: stdio
command: nix
args:
- develop
- .#e2e
- --command
- just
- ai::mcp-chrome-devtools
16 changes: 16 additions & 0 deletions opencode.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"mcp": {
"chrome-devtools": {
"type": "local",
"enabled": true,
"command": [
"nix",
"develop",
".#e2e",
"--command",
"just",
"ai::mcp-chrome-devtools"
]
}
}
}