Skip to content

Keep tools current and serve Xcode MCP over HTTP - #34

Open
MrSaneApps wants to merge 40 commits into
mainfrom
keep-current-and-xcode-mcp
Open

MrSaneApps wants to merge 40 commits into
mainfrom
keep-current-and-xcode-mcp

Conversation

@MrSaneApps

Copy link
Copy Markdown
Collaborator

Summary

  • Weekly keep_current applies npm pins and in-major Firecrawl bumps; Mini nightly does the Mini role.
  • Recurring Mini jobs run on LaunchAgent plus Grok. Codex heartbeats stay paused. Leftover paid-X-API scout plist is removed on install.
  • Xcode MCP is the Mini HTTP singleton at http://127.0.0.1:37915/mcp, forwarded through the existing AgentMemory tunnel, instead of a fresh SSH stdio spawn that timed out at Grok session start.
  • Machine cleanup plans generated junk by kind, not free space.

Test plan

  • ruby scripts/mcp_contract_test.rb 11/11
  • ruby scripts/automation/memory_sync_test.rb 10/10
  • ruby scripts/automation/air_mini_acceptance_test.rb 10/10
  • ruby scripts/automation/dependency_baseline_test.rb 33/33
  • ruby scripts/automation/agent_heartbeat_test.rb 13/13
  • ruby scripts/sanemaster/machine_cleanup_test.rb 23/23
  • ruby scripts/sanemaster/machine_cleanup_retention_test.rb 7/7
  • Mini GET /healthz on 37915 ok; Air initialize through the tunnel HTTP 200
  • Restart Grok once so the live session loads the HTTP xcode server

SJ and others added 30 commits August 18, 2026 23:44
Weekly keep-current applies npm pins and in-major Firecrawl bumps. Mini
recurring jobs run on LaunchAgent plus Grok, with Codex heartbeats paused.
Xcode MCP uses the Mini HTTP singleton through the existing tunnel instead
of a fresh SSH stdio spawn. Machine cleanup plans generated junk by kind,
not free space.
Bring in locked Mini screenshot evidence and the CWS watcher recovery
from main. Keep the 2026-08-21 Grok/Cursor keep-current work.
Grok was importing Claude hooks that matched tool_name=Bash and no-opped
on GROK_HOOK_EVENT, so shell guards never saw run_terminal_command.
Shared guards now parse Claude, Grok, and Cursor payloads. Grok loads
native ~/.grok/hooks and turns off Claude/Cursor hook import. Cursor
keeps its adapters. Claude and Codex registrations stay in place.
Owner-approved SANEBAR_RELEASE_POLICY_ONLY ships can reuse a Mini
release_preflight receipt without customer-UI, verify, upgrade-path, or
fingerprint binds. Forward the env to Mini so candidate preflight stays
in the same mode.
Stop a T&Z Mini pending marker from injecting stop follow-ups into unrelated chats by storing state under conversation_id, ignoring the legacy global file, and treating detector self-tests plus AX/simctl reads as non-mutations.

Co-authored-by: Cursor <cursoragent@cursor.com>
Require livez plus orphan :3111 reclaim in the Mini supervisor, schedule an Air memory-only watch with notify-on-red, treat AgentMemory API polls as GUI feedback, and surface dirty/unpushed finish-line apps in operator_brief.

Co-authored-by: Cursor <cursoragent@cursor.com>
Compare 5-minute load to core count on Air and Mini, ignore expected
build and app work, and notify only on Air after two consecutive hits.
Unblock hosted-file post-release checks for Clip (product 779223) and allow an explicit lemon_variant_id pin in products.yml.

Co-authored-by: Cursor <cursoragent@cursor.com>
Block ad-hoc Cloudflare and NVIDIA chat calls unless llm_bakeoff, a fresh
research receipt, or an explicit owner override is present—stops winging
vendor APIs that kept failing on wrong call shape.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Document CF+NVIDIA burn on Mini LaunchAgent and allowlist
overnight_quota/draft_claim in the LLM API guard.

Co-authored-by: Cursor <cursoragent@cursor.com>
Drop KeepAlive wording so recurring-jobs matches translations
AI_CROSSCHECK and the Mini LaunchAgent install script.

Co-authored-by: Cursor <cursoragent@cursor.com>
Peekaboo v4 removed the list/image subcommands, which broke the visual
workspace guard probe and the smoke capture commands at runtime even
though the old tests still passed. Move all call sites to the 4.3.3
syntax (window list, app list, menubar list, see --no-elements) and
update the tests and docs to match.

Also included in this unit: mini-local routing plus reduced-motion and
canonical lefthook pinning for web captures, deterministic session
identity for locked evidence captures, and the 5s Tailscale ping
timeout the proxy already uses.
Three guards required scripts/hooks/core/hook_payload, which was never
added, so every guard in the chain crashed with LoadError and the
dispatcher failed closed-open (raw captures and layout violations
passed). Add the shared payload parser with cross-client shell/edit
classification plus its unit tests.

Also in this unit: shared local-UI guard (Air app-edit, pasteboard,
and local-GUI blocks with Mini-remote exemptions), no-prompt Keychain
policy, persistence-debt handoff tracking, subagent brief-completeness
gate, TCC language corrections, and UTF-8 stdin handling.
Session start/end, cleanup routes, and MCP checks point at Grok and
SaneMaster instead of retired Codex paths. Standing maintenance
authorization recorded. Development and architecture notes cover
mini-local capture, reduced-motion receipts, memory-guard skip rules,
keep-current pins, and retired duplicate jobs. Handoff ledger current
with no secret material.
Deploy retires duplicate disk-clean jobs and agents. Memory guard
skips runs during active builds or open coding clients. Nightly adds
a bounded keep-current section. AgentMemory supervision requires
livez health and reclaims orphan port listeners by exact PID.
Fixtures cover the livez requirement without network. Test registry
covers the new suites.
Validation reads live projects from meta/PROJECT_MAP instead of a
hardcoded list, covers websites, and stops hardcoding /Users/sj.
Release SOP gains the Lemon Squeezy hosted-file handoff with official
source citations, matching the staged-upload lane.
portal_targets silently resolved app id 1847 to the release-peer checkout
instead of canonical SaneClip (companion one-liner in the peer repo
disables setapp there). Abort loudly on duplicate app ids, pin Xcode
SDKROOT for the clang residue fixture, and add setapp_config_test.rb
(registered in test_registry.json).

Suites: upload 39/39, config 2/2, verify_guard 59/59.
Air-verified 2026-09-17: com.saneapps.mini-screenshot agent queue
request/receipt recipe (exit 0, 1920x1080 PNG); wrapper Screen
Recording fallback guidance.
Secrets model corrected (Keychain-first), ARCHITECTURE gate/count,
RELEASE_SOP fallback+numbering, BOOTSTRAP ZIP revision, registry
precedence, hook README behavior rows, handoff trimmed to active cards.
Wires sane_push_guard.rb into the bash guard chain and registers its
suite. Fails closed on non-fast-forward plain pushes; fails open for
force-family, detached HEAD, and unreachable remotes so git still
reports the real error. Prevents the push-reject-fetch-rebase loop.
…ging

Drops automatic-release-after-approval enforcement so versions stay
manual until the owner approves. Adds appstore.iap.price_usd config
lookup with 14.99 default and UTF-8-safe env parsing. Lemon Squeezy
staging now verifies SHA-256 and retains earlier archives pending
remote proof instead of deleting them. Release script requires an
affirmative published-file snapshot.
…ardening

Adds SaneRuntimeLog supervisor (owns only its log child, bounded
capture with receipt) and routes test_mode/sane_test through it with
--quiet-logs/--log-seconds. Removes TCC database manipulation and
screensaver-default mutation from the work-session guard; bounded
caffeinate with PID ownership checks instead. Verify checks the
OS-reported executable for test processes and retains per-phase
bundles. Machine cleanup plans by artifact kind with a server-busy
refuse path. Customer UI contract revokes legacy executor receipts
and rejects declaration-only artifacts.
…curring jobs

Dependency baseline becomes keep-current: version pin bumps, safe
same-major Firecrawl auto-bump with receipts, no-prompt keychain
policy, and an Air-only weekly LaunchAgent. Session guardian gains a
sustained-CPU watch with expected-work allowlist plus --install.
Control-plane sync (Codex/Grok/Cursor) never overwrites peer-owned
files and fails closed on conflicts or transfer errors. Adds
LaunchAgent recurring-job runners (review watch, X scout, email
campaigns, agent heartbeats) with single-instance locks, human-
readable review-watch emails, dimension-aware funnel reporting, and
hardened SEO/social/X-scout audits.
- Forward 37917 (serena) alongside existing MCP forwards
- ssh -n -S none so tunnel restarts cannot silently die as mux slaves
- ConnectTimeout 3->15 for slow Mini wakeups
Firecrawl CLI belongs on Mini as well as Air now that Grok TUI runs here.
AgentMemory MCP talks to the Mini worker on loopback instead of hanging on
Cloudflare Access at session start. Cloud login stays --login only.

Peekaboo 4.4.0 is a Mini binary install (GitHub tarball); brew still cannot
keg-upgrade without Xcode 27.
Declaration-only artifacts cannot prove runtime execution; revokes legacy executor receipts.
Pairs with 5d67fd0 (tunnel ConnectTimeout 15); rest of this file merges separately.
…de-mcp

# Conflicts:
#	AGENTS.md
#	SESSION_HANDOFF.md
#	scripts/automation/agent_heartbeat_test.rb
#	scripts/automation/dependency_baseline.rb
#	scripts/automation/dependency_baseline_test.rb
#	scripts/automation/heartbeats/saneapps-launch-ops.md
#	scripts/automation/install-recurring-agents.sh
#	scripts/automation/recurring-jobs.md
#	scripts/automation/sync-control-plane.sh
#	scripts/automation/sync-cursor-mini.sh
#	scripts/automation/sync-grok-mini.sh
#	scripts/grok-bin/README.md
#	scripts/grok-bin/xcode-mcp-frame.py
#	scripts/hooks/core/hook_payload.rb
#	scripts/hooks/sane_bash_guards.rb
#	scripts/hooks/sane_layout_guard.rb
#	scripts/mcp_singleton_bridge.cjs
#	scripts/mini/README.md
#	scripts/mini/SCREENSHOT_TOOLS.md
#	scripts/sanemaster/command_registry.rb
#	templates/RELEASE_SOP.md
Keep Air behavior (approval-prefix guards, until-direct assert, annotate fixture, registry rewrite) and Mini additions (payload/brief-linter registry entries).
Grok TUI runs on Mini as well as Air; shared pin stays 1.23.3.
Orwell compression, no policy deleted. Frees delegation-startup budget (home+codex+project must fit Muse 64KiB cap).
Q10 check fails when ~/AGENTS.md + ~/.codex/AGENTS.md exceed 62KiB (warn 60KiB); cap math: 65536 incl ~2KiB framing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant