diff --git a/README.md b/README.md index 947109d4..7cfddd46 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # CodePilot -CodePilot is a Mac menu bar app and iPhone companion for running coding-agent sessions from a Mac you control. It currently focuses on Codex account switching, usage visibility, remote iPhone access, file uploads, connector status, notifications, and gateway-backed conversation control. +CodePilot is a public-beta Mac menu bar app and iPhone companion for running coding-agent sessions from a Mac you control. It is built first for Codex CLI users who want mobile visibility, account switching, file uploads, connector status, notifications, and gateway-backed conversation control without exposing their Mac directly to the internet. -The project is designed to become provider-neutral over time, including future Claude Code compatibility. +The product name is provider-neutral, but the current implementation is Codex-focused. Future provider support, including Claude Code compatibility, is planned only after the Codex beta path is stable. ## License @@ -17,9 +17,13 @@ Commercial use requires a separate written license. See [LICENSE.md](LICENSE.md) - **CodePilot iOS**: an iPhone app that connects to the gateway for remote chat, file uploads, usage status, steering, stopping turns, and notifications. - **Cloudflare Tunnel support**: optional remote access to the gateway through a user-owned Cloudflare Tunnel. +## Beta Audience + +CodePilot is for AI coding users who already run Codex CLI on a Mac and are comfortable with beta software. The beta is focused on installation, connection reliability, safe remote access, and clear recovery steps. It does not make pricing, subscription, App Store availability, or future-provider compatibility promises. + ## Current Provider Support -CodePilot currently supports Codex by working with the local Codex home on the Mac: +CodePilot currently supports Codex by working with the local Codex home and CodePilot state directory on the Mac: - `~/.codex/auth.json` - `~/.codex/state_5.sqlite` @@ -50,9 +54,15 @@ The public product name is provider-neutral, but the first implementation remain See: +- [Public beta site](docs/index.md) - [Mac Installation](docs/INSTALL_MAC.md) - [iOS Installation](docs/INSTALL_IOS.md) - [Cloudflare Setup](docs/CLOUDFLARE_SETUP.md) +- [FAQ](docs/FAQ.md) +- [Privacy](docs/PRIVACY.md) +- [Support](docs/SUPPORT.md) +- [Changelog](docs/CHANGELOG.md) +- [Screenshot Plan](docs/SCREENSHOTS.md) - [Security](docs/SECURITY.md) - [Architecture](docs/ARCHITECTURE.md) - [Troubleshooting](docs/TROUBLESHOOTING.md) @@ -73,8 +83,8 @@ See: ## Screenshots -Screenshots will be added before the first public release. +Public-safe screenshots are being prepared for the beta. The screenshot checklist is tracked in [docs/SCREENSHOTS.md](docs/SCREENSHOTS.md); no private account names, hosts, tokens, file paths, or personal screenshots should be committed. ## Public Release Status -CodePilot is being prepared for broader publishing. Expect some internal names, bundle identifiers, LaunchAgent labels, and local state paths to still contain legacy Codex-specific names during the first migration phase. +CodePilot is being prepared for a TestFlight-first iOS beta and GitHub/source distribution for the Mac app, gateway, and docs. Expect some internal names, bundle identifiers, LaunchAgent labels, and local state paths to still contain legacy Codex-specific names during the first migration phase. diff --git a/Tests/CodexAccountSwitcherTests/RemoteDesktopCoordinatorTests.swift b/Tests/CodexAccountSwitcherTests/RemoteDesktopCoordinatorTests.swift index 618f52b0..eb7283d0 100644 --- a/Tests/CodexAccountSwitcherTests/RemoteDesktopCoordinatorTests.swift +++ b/Tests/CodexAccountSwitcherTests/RemoteDesktopCoordinatorTests.swift @@ -28,9 +28,9 @@ final class RemoteDesktopCoordinatorTests: XCTestCase { let pending = try coordinator.beginPairing( deviceID: "phone-1", - name: "Tony's iPhone", + name: "Beta iPhone", publicKeyRawRepresentation: publicKey, - macName: "Mac mini" + macName: "Mac host" ) XCTAssertEqual(coordinator.snapshot.pendingPairing?.deviceID, "phone-1") @@ -41,9 +41,9 @@ final class RemoteDesktopCoordinatorTests: XCTestCase { _ = try coordinator.beginPairing( deviceID: "phone-1", - name: "Tony's iPhone", + name: "Beta iPhone", publicKeyRawRepresentation: publicKey, - macName: "Mac mini" + macName: "Mac host" ) try coordinator.approvePendingPairing() @@ -69,9 +69,9 @@ final class RemoteDesktopCoordinatorTests: XCTestCase { let key = P256.Signing.PrivateKey() let challenge = coordinator.pairingStore.issueChallenge( deviceID: "phone-1", - name: "Tony's iPhone", + name: "Beta iPhone", publicKeyRawRepresentation: key.publicKey.rawRepresentation, - macName: "Mac mini" + macName: "Mac host" ) let approval = try coordinator.pairingStore.verifyChallenge( challenge, diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md new file mode 100644 index 00000000..cfa8ac66 --- /dev/null +++ b/docs/CHANGELOG.md @@ -0,0 +1,16 @@ +# Changelog + +## Unreleased + +### Public Beta Preparation + +- Added public beta docs for GitHub Pages, FAQ, privacy, support, screenshots, and changelog. +- Clarified that CodePilot currently targets Codex CLI users and remains beta-focused. +- Documented the Mac, gateway, iPhone, Cloudflare, and troubleshooting paths from a public user perspective. +- Added guidance for keeping screenshots, logs, support requests, and public issues free of private names, hosts, tokens, and local paths. + +### Recent Product Work + +- Added Cloudflare setup wizard docs and automation. +- Added gateway health, setup, and recovery guidance. +- Added remote desktop, localhost URL opening, file preview, and gateway-backed iPhone control improvements. diff --git a/docs/FAQ.md b/docs/FAQ.md new file mode 100644 index 00000000..cc838cbe --- /dev/null +++ b/docs/FAQ.md @@ -0,0 +1,33 @@ +# FAQ + +## Who is CodePilot for? + +CodePilot is for AI coding users who already run Codex CLI on a Mac and want an iPhone companion for visibility, file uploads, turn control, usage status, and account switching. + +## Is CodePilot ready for production teams? + +No. The current release track is a public beta. Use it on a trusted Mac, expect rough edges, and review the security and privacy docs before exposing the gateway outside your local network. + +## Does CodePilot replace Codex CLI? + +No. CodePilot uses Codex on your Mac. The iPhone app talks to the CodePilot gateway, and the gateway uses the active Codex setup on that Mac. + +## Does it support Claude Code or other coding agents? + +Not yet. The name is provider-neutral, but the first beta is Codex-focused. Future provider work should wait until the Codex setup, gateway, and support path are stable. + +## Do I need Cloudflare? + +Only for access away from your local network. Same-network iPhone access can use a local gateway URL. Remote access should use HTTPS and a private gateway token. + +## Does CodePilot send my Codex credentials to a hosted service? + +No hosted CodePilot service is required for the current beta. Credentials stay on the Mac unless you choose to expose the local gateway through infrastructure you control, such as Cloudflare Tunnel. + +## What should I avoid posting in issues? + +Do not post auth files, gateway tokens, private hostnames, personal account names, local file paths, private screenshots, Apple identifiers, or logs that contain any of those values. + +## Is commercial use allowed? + +Not without a separate written license. See the repository license, commercial license, and notice files. diff --git a/docs/INSTALL_IOS.md b/docs/INSTALL_IOS.md index 3d4ba79d..55f84e9e 100644 --- a/docs/INSTALL_IOS.md +++ b/docs/INSTALL_IOS.md @@ -9,6 +9,12 @@ CodePilot iOS connects to a Mac running the CodePilot gateway. - The gateway bearer token from the Mac. - Optional: Cloudflare Tunnel for remote access outside the local network. +## Beta Installation + +TestFlight is the intended iPhone distribution path during the public beta. Install the beta build from the TestFlight invite shared by the maintainers, then connect it to your own Mac gateway. + +Developers building from source can open the Xcode project under `ios/CodexPhone/` and build the `CodexPhone` scheme for a simulator or device configured with their own signing setup. + ## Connection On first launch: diff --git a/docs/PRIVACY.md b/docs/PRIVACY.md new file mode 100644 index 00000000..2f704e72 --- /dev/null +++ b/docs/PRIVACY.md @@ -0,0 +1,39 @@ +# Privacy + +CodePilot is designed around a Mac you control. In the current beta there is no hosted CodePilot account service. + +## Data On The Mac + +The Mac app and gateway use local Codex and CodePilot state, including auth files, saved account profiles, usage metadata, uploaded files, and gateway configuration. Treat the Mac as trusted infrastructure. + +Sensitive local files include: + +- `~/.codex/auth.json` +- `~/.codex-account-switcher/accounts/*/auth.json` +- `~/.codex-account-switcher/phone-gateway-token` +- `~/.codex-account-switcher/phone-gateway.env` +- `~/.codex-account-switcher/phone-uploads/` + +Do not commit these files or include their contents in screenshots, logs, issues, or support requests. + +## iPhone App + +The iPhone app stores the gateway URL and token locally on the device so it can reconnect to your Mac gateway. The app talks to the gateway you configure; it does not need a hosted CodePilot account for the current beta. + +## Gateway And Remote Access + +The gateway exposes local Codex-related actions to trusted clients. It must require the gateway token. If you use Cloudflare Tunnel, Cloudflare becomes part of your network path and its own terms and privacy practices apply. + +Do not publish gateway URLs, bearer tokens, private hostnames, or screenshots showing connection details. + +## Diagnostics And Support + +Before sharing logs or screenshots, remove: + +- Account names and email addresses. +- Gateway URLs and hostnames. +- Bearer tokens and auth file contents. +- Local file paths and uploaded file names. +- Apple team identifiers or signing details. + +This privacy copy is intended for the beta docs and should be reviewed before any App Store, paid, or broader public release. diff --git a/docs/PRODUCTION_READINESS_IMPLEMENTATION_PLAN.md b/docs/PRODUCTION_READINESS_IMPLEMENTATION_PLAN.md index 58362bfe..596364ba 100644 --- a/docs/PRODUCTION_READINESS_IMPLEMENTATION_PLAN.md +++ b/docs/PRODUCTION_READINESS_IMPLEMENTATION_PLAN.md @@ -323,7 +323,7 @@ curl -fsS -X POST http://127.0.0.1:8787/codexphone/api/build curl -fsS http://127.0.0.1:8787/codexphone/api/status ``` -Wait until `current.state == "complete"`, then verify the manifest and IPA from `https://ota.sprenkeling.co` return HTTP 200. +Wait until `current.state == "complete"`, then verify the manifest and IPA from the configured OTA domain return HTTP 200. - [ ] **Step 8: Commit** @@ -497,8 +497,8 @@ Expected: `current.state` becomes `complete`. Run: ```sh -curl -I https://ota.sprenkeling.co/codexphone/manifest.plist -curl -I https://ota.sprenkeling.co/codexphone/CodePilot.ipa +curl -I https://ota.example.com/codexphone/manifest.plist +curl -I https://ota.example.com/codexphone/CodePilot.ipa ``` Expected: HTTP 200 or the exact current generated manifest/IPA paths return HTTP 200. diff --git a/docs/RELEASE_CHECKLIST.md b/docs/RELEASE_CHECKLIST.md index 8ee9ae91..ebe7c69b 100644 --- a/docs/RELEASE_CHECKLIST.md +++ b/docs/RELEASE_CHECKLIST.md @@ -9,4 +9,6 @@ - [ ] Public manifest and IPA return HTTP 200 from the OTA domain - [ ] TestFlight upload if shipping a beta build - [ ] Public docs checked for personal names, private email addresses, tokens, hostnames, Apple team IDs, and machine-specific paths +- [ ] Public screenshots use sanitized demo data only +- [ ] Privacy, support, FAQ, and README copy reviewed for beta positioning - [ ] `.superpowers/` scratch files are not committed diff --git a/docs/SCREENSHOTS.md b/docs/SCREENSHOTS.md new file mode 100644 index 00000000..9216bfd8 --- /dev/null +++ b/docs/SCREENSHOTS.md @@ -0,0 +1,25 @@ +# Screenshot Plan + +No public screenshots are committed yet. + +Use this checklist before adding screenshots to the repository, GitHub Pages, TestFlight, App Store metadata, README, or support docs: + +- Use demo account names only, such as `Work`, `Personal`, or `Demo`. +- Use example hostnames only, such as `codepilot.example.com`. +- Hide gateway bearer tokens and auth details. +- Hide local file paths unless the path is a generic example. +- Hide private thread names, prompts, uploads, and repository names. +- Hide Apple IDs, team IDs, bundle signing details, and TestFlight account details. +- Prefer clean beta flows: setup checklist, gateway status, iPhone connection, thread list, file upload, and remote desktop permission state. + +Recommended beta screenshot set: + +- Mac menu bar status with demo account usage. +- Mac setup checklist showing ready and optional states. +- Cloudflare setup wizard using an example hostname. +- iPhone connection wizard for same-network and Cloudflare modes. +- iPhone thread list with demo thread names. +- File upload confirmation using non-private sample files. +- Remote desktop permission screen without a live private desktop. + +Create real screenshots only from sanitized demo data. diff --git a/docs/SECURITY.md b/docs/SECURITY.md index 07f7b718..a40b6289 100644 --- a/docs/SECURITY.md +++ b/docs/SECURITY.md @@ -34,3 +34,5 @@ CodePilot swaps local provider auth files. It waits for active turns to finish b Do not include auth files, bearer tokens, logs containing tokens, or uploaded private files in issue reports. Before sharing logs, search for account names, email addresses, hostnames, tokens, Apple team identifiers, and local file paths. + +See [Privacy](PRIVACY.md) and [Support](SUPPORT.md) for public beta reporting guidance. diff --git a/docs/SUPPORT.md b/docs/SUPPORT.md new file mode 100644 index 00000000..3905a7ac --- /dev/null +++ b/docs/SUPPORT.md @@ -0,0 +1,40 @@ +# Support + +CodePilot beta support is handled through public repository issues and pull requests. + +## Before Opening An Issue + +Check: + +- [Mac installation](INSTALL_MAC.md) +- [iOS installation](INSTALL_IOS.md) +- [Cloudflare setup](CLOUDFLARE_SETUP.md) +- [Troubleshooting](TROUBLESHOOTING.md) +- [Security](SECURITY.md) +- [FAQ](FAQ.md) + +## Helpful Issue Details + +Include: + +- Mac app, gateway, or iOS app area affected. +- What you expected to happen. +- What happened instead. +- Whether the iPhone is on the same network or using Cloudflare. +- The visible recovery message, if one appears. +- Sanitized logs with private values removed. + +## Do Not Share + +Do not include: + +- Codex auth files. +- Gateway bearer tokens. +- Private hostnames or Cloudflare tunnel URLs. +- Personal account names or email addresses. +- Apple account, team, signing, or TestFlight identifiers. +- Screenshots that show private files, paths, accounts, tokens, or hosts. + +## Security Reports + +For issues involving exposed credentials, unsafe gateway access, remote desktop bypass, or uploaded private files, avoid public details. Open a minimal issue that says a security report is available and coordinate disclosure with the maintainers. diff --git a/docs/_config.yml b/docs/_config.yml new file mode 100644 index 00000000..16d0d1d3 --- /dev/null +++ b/docs/_config.yml @@ -0,0 +1,4 @@ +title: CodePilot +description: Public beta docs for CodePilot, a Mac and iPhone companion for Codex CLI users. +markdown: kramdown +theme: minima diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 00000000..02ba0f0e --- /dev/null +++ b/docs/index.md @@ -0,0 +1,31 @@ +# CodePilot Public Beta + +CodePilot is a Mac menu bar app, local gateway, and iPhone companion for Codex CLI users who want to monitor and steer coding-agent sessions from a Mac they control. + +The beta is focused on practical workflows for AI coding users: + +- See active Codex usage and account status from the Mac and iPhone. +- Switch saved Codex account profiles after active turns finish. +- Connect the iPhone app to the Mac gateway on the same network or through a user-owned Cloudflare Tunnel. +- Upload files, inspect threads, steer or stop turns where supported, and receive turn-finished notifications. +- Use remote desktop features only after pairing and macOS permission checks. + +CodePilot is source-available for noncommercial use. It is not OSI open source. See the repository license files before redistributing or using it commercially. + +## Start Here + +- [Mac installation](INSTALL_MAC.md) +- [iOS installation](INSTALL_IOS.md) +- [Cloudflare remote access](CLOUDFLARE_SETUP.md) +- [Troubleshooting](TROUBLESHOOTING.md) +- [FAQ](FAQ.md) +- [Privacy](PRIVACY.md) +- [Support](SUPPORT.md) +- [Changelog](CHANGELOG.md) +- [Screenshot plan](SCREENSHOTS.md) + +## Beta Limits + +CodePilot currently targets Codex CLI. Future provider support is not part of the first beta promise. + +Do not share screenshots, logs, gateway URLs, tokens, account names, hostnames, or local file paths in public issues unless they have been sanitized. diff --git a/docs/superpowers/plans/2026-06-27-secure-remote-desktop.md b/docs/superpowers/plans/2026-06-27-secure-remote-desktop.md index 27bb2647..661be3e8 100644 --- a/docs/superpowers/plans/2026-06-27-secure-remote-desktop.md +++ b/docs/superpowers/plans/2026-06-27-secure-remote-desktop.md @@ -632,11 +632,11 @@ Verify pairing approval, Face ID session start, Wi-Fi direct path, cellular TURN Run: ```bash -cd /Users/homeserver/Developer/de-kleine-eekhoorn/ios +cd /Users/example/CodePilot/ios python3 scripts/dke_ota_build.py build --app codexphone --branch release ``` -Expected: status reaches `complete`; output reports bundle ID `com.tony.codexphone`; both public manifest and IPA return HTTP 200; the OTA install updates the configured CodePilot app rather than creating another instance. +Expected: status reaches `complete`; output reports bundle ID `legacy.bundle.identifier`; both public manifest and IPA return HTTP 200; the OTA install updates the configured CodePilot app rather than creating another instance. - [ ] **Step 7: Commit** diff --git a/docs/superpowers/plans/2026-07-01-codepilot-launch-agent-system.md b/docs/superpowers/plans/2026-07-01-codepilot-launch-agent-system.md index 506d14f1..96aeea4c 100644 --- a/docs/superpowers/plans/2026-07-01-codepilot-launch-agent-system.md +++ b/docs/superpowers/plans/2026-07-01-codepilot-launch-agent-system.md @@ -15,14 +15,14 @@ - Agents must not invent credentials, create accounts with fake identity, spam communities, or bypass platform rules. - Reddit promotion must be transparent: disclose the creator relationship and follow subreddit rules. - Anything involving App Store submission, payments, pricing, legal terms, public claims, or user data policy requires explicit human approval. -- Agents should ping Tony in the current Codex thread only when intervention is necessary. +- Agents should ping the maintainer in the current Codex thread only when intervention is necessary. - Routine findings should become GitHub issues, PRs, docs updates, or release notes without a ping. - Every code change must be tested before being marked complete. - Every iOS app change must trigger the project OTA build process before completion. ## Escalation Rules -Ping Tony only for: +Ping the maintainer only for: - Apple, Cloudflare, GitHub, Reddit, or payment-provider authentication. - App Store Connect agreements, pricing, tax, banking, privacy, age rating, export compliance, or review submission approval. @@ -31,7 +31,7 @@ Ping Tony only for: - A public post, launch announcement, paid promotion, or subreddit submission that needs final approval. - A product decision that affects subscription value, pricing, usage limits, or public positioning. -Do not ping Tony for: +Do not ping the maintainer for: - Routine dependency updates that pass tests. - GitHub issue triage. @@ -146,7 +146,7 @@ Do not ping Tony for: - Track feedback and convert real product problems into GitHub issues. - Maintain a transparent creator profile. -**Important constraint:** The agent can prepare the Reddit account plan, profile text, and posts, but Tony must create or approve any Reddit account and final posts. Creating accounts and posting must comply with Reddit rules and subreddit rules. +**Important constraint:** The agent can prepare the Reddit account plan, profile text, and posts, but the maintainer must create or approve any Reddit account and final posts. Creating accounts and posting must comply with Reddit rules and subreddit rules. **Outputs:** @@ -216,7 +216,7 @@ Do not ping Tony for: 4. **Prepare community launch** - Community Growth Agent drafts Reddit account profile and launch posts. - - Tony approves account/posting strategy. + - the maintainer approves account/posting strategy. - Agent schedules staged, rule-compliant posts. 5. **Start beta loop** @@ -229,7 +229,7 @@ Do not ping Tony for: - Revenue Agent proposes tiers and pricing. - Presence Agent updates website and App Store copy. - Security Agent signs off on public release. - - Tony approves pricing, legal, and App Store submission. + - the maintainer approves pricing, legal, and App Store submission. ## Proposed Recurring Automations diff --git a/ios/CodexPhone/CodexPhoneTests/RemoteDesktopTests.swift b/ios/CodexPhone/CodexPhoneTests/RemoteDesktopTests.swift index 98306811..11262566 100644 --- a/ios/CodexPhone/CodexPhoneTests/RemoteDesktopTests.swift +++ b/ios/CodexPhone/CodexPhoneTests/RemoteDesktopTests.swift @@ -48,28 +48,28 @@ final class RemoteDesktopTests: XCTestCase { } func testRemoteFilePathAcceptsCustomPreviewURL() throws { - let url = try XCTUnwrap(remoteFilePreviewURL(path: "/Users/homeserver/Developer/CodePilot/README.md")) + let url = try XCTUnwrap(remoteFilePreviewURL(path: "/Users/example/CodePilot/README.md")) - XCTAssertEqual(remoteFilePath(from: url), "/Users/homeserver/Developer/CodePilot/README.md") + XCTAssertEqual(remoteFilePath(from: url), "/Users/example/CodePilot/README.md") } func testRemoteFilePathAcceptsMarkdownAbsolutePathURL() throws { - let url = try XCTUnwrap(URL(string: "/Users/homeserver/Developer/CodexAccountSwitcher/docs/superpowers/plans/2026-07-01-codepilot-launch-agent-system.md")) + let url = try XCTUnwrap(URL(string: "/Users/example/CodePilot/docs/superpowers/plans/2026-07-01-codepilot-launch-agent-system.md")) XCTAssertEqual( remoteFilePath(from: url), - "/Users/homeserver/Developer/CodexAccountSwitcher/docs/superpowers/plans/2026-07-01-codepilot-launch-agent-system.md" + "/Users/example/CodePilot/docs/superpowers/plans/2026-07-01-codepilot-launch-agent-system.md" ) } func testRemoteFilePathAcceptsFileURLAndStripsLineSuffix() throws { - let url = URL(fileURLWithPath: "/Users/homeserver/Developer/CodePilot/Sources/App.swift:42") + let url = URL(fileURLWithPath: "/Users/example/CodePilot/Sources/App.swift:42") - XCTAssertEqual(remoteFilePath(from: url), "/Users/homeserver/Developer/CodePilot/Sources/App.swift") + XCTAssertEqual(remoteFilePath(from: url), "/Users/example/CodePilot/Sources/App.swift") } func testRemoteFilePathRejectsWebURLs() throws { - let url = try XCTUnwrap(URL(string: "https://example.com/Users/homeserver/README.md")) + let url = try XCTUnwrap(URL(string: "https://example.com/Users/example/README.md")) XCTAssertNil(remoteFilePath(from: url)) } diff --git a/ops/agents/escalations/presence-maintenance.md b/ops/agents/escalations/presence-maintenance.md new file mode 100644 index 00000000..d66ccb84 --- /dev/null +++ b/ops/agents/escalations/presence-maintenance.md @@ -0,0 +1,8 @@ +# Presence Maintenance Escalation + +Approval needed before public publishing: + +- Confirm beta privacy copy in `docs/PRIVACY.md`. +- Confirm public positioning in `README.md`, `docs/index.md`, and `docs/FAQ.md`. +- Enable or confirm GitHub Pages source for the repository, preferably the `docs/` folder. +- Approve sanitized screenshot capture before screenshots are committed or used in App Store/TestFlight metadata. diff --git a/ops/agents/prompts/release-readiness.md b/ops/agents/prompts/release-readiness.md index 260d8b22..7df6dc9e 100644 --- a/ops/agents/prompts/release-readiness.md +++ b/ops/agents/prompts/release-readiness.md @@ -7,7 +7,7 @@ Follow `docs/superpowers/plans/2026-07-01-codepilot-launch-agent-system.md`. Rules: - Run relevant tests and builds when safe. - Prepare release notes and blocker summaries. -- Do not submit App Store review or alter pricing/legal metadata without Tony. +- Do not submit App Store review or alter pricing/legal metadata without the maintainer. - If intervention is needed, write a concise escalation note to `ops/agents/escalations/release-readiness.md`. Report: diff --git a/scripts/codepilot-agent-escalate.sh b/scripts/codepilot-agent-escalate.sh index ca969283..ce607a70 100755 --- a/scripts/codepilot-agent-escalate.sh +++ b/scripts/codepilot-agent-escalate.sh @@ -1,7 +1,7 @@ #!/usr/bin/env zsh set -euo pipefail -ROOT="${CODEPILOT_REPO_ROOT:-/Users/homeserver/Developer/CodexAccountSwitcher}" +ROOT="${CODEPILOT_REPO_ROOT:-$(cd "$(dirname "$0")/.." && pwd)}" STATE_DIR="${CODEPILOT_AGENT_STATE_DIR:-$HOME/.codex-account-switcher/agents}" THREAD_ID_FILE="$STATE_DIR/thread-id" CODEX_BIN="${CODEPILOT_CODEX_BIN:-codex}" diff --git a/scripts/codepilot-agent-runner.sh b/scripts/codepilot-agent-runner.sh index cacde95e..289a231e 100755 --- a/scripts/codepilot-agent-runner.sh +++ b/scripts/codepilot-agent-runner.sh @@ -1,7 +1,7 @@ #!/usr/bin/env zsh set -euo pipefail -ROOT="${CODEPILOT_REPO_ROOT:-/Users/homeserver/Developer/CodexAccountSwitcher}" +ROOT="${CODEPILOT_REPO_ROOT:-$(cd "$(dirname "$0")/.." && pwd)}" JOB="${1:-}" if [[ -z "$JOB" ]]; then diff --git a/scripts/install-codepilot-local-agents.sh b/scripts/install-codepilot-local-agents.sh index 273c47a3..006485cc 100755 --- a/scripts/install-codepilot-local-agents.sh +++ b/scripts/install-codepilot-local-agents.sh @@ -1,7 +1,7 @@ #!/usr/bin/env zsh set -euo pipefail -ROOT="${CODEPILOT_REPO_ROOT:-/Users/homeserver/Developer/CodexAccountSwitcher}" +ROOT="${CODEPILOT_REPO_ROOT:-$(cd "$(dirname "$0")/.." && pwd)}" PLIST_DIR="$HOME/Library/LaunchAgents" RUNNER="$ROOT/scripts/codepilot-agent-runner.sh" diff --git a/scripts/privacy-audit.sh b/scripts/privacy-audit.sh index 679a343f..087d1ecc 100755 --- a/scripts/privacy-audit.sh +++ b/scripts/privacy-audit.sh @@ -36,7 +36,14 @@ print("|".join(bytes.fromhex(entry).decode("utf-8") for entry in entries)) PY )" -if git grep -n -I -E "$pattern" -- "$(git ls-files)"; then +tracked_files=("${(@f)$(git ls-files)}") +audit_files=() +for file in "${tracked_files[@]}"; do + [[ "$file" == "scripts/privacy-audit.sh" ]] && continue + audit_files+=("$file") +done + +if git grep -n -I -E "$pattern" -- "${audit_files[@]}"; then echo "privacy audit failed: tracked files contain private identifiers" >&2 exit 1 fi @@ -44,7 +51,7 @@ fi secret_patterns=( 'ghp_[A-Za-z0-9_]+' 'github_pat_[A-Za-z0-9_]+' - 'sk-[A-Za-z0-9]+' + 'sk-[A-Za-z0-9]{20,}' '-----BEGIN (RSA|OPENSSH|PRIVATE) KEY' 'Bearer [A-Za-z0-9._-]{20,}' 'client_secret' @@ -53,7 +60,7 @@ secret_patterns=( secret_pattern="$(IFS='|'; echo "${secret_patterns[*]}")" -if git grep -n -I -E "$secret_pattern" -- "$(git ls-files)"; then +if git grep -n -I -E "$secret_pattern" -- "${audit_files[@]}"; then echo "privacy audit failed: tracked files contain secret-looking material" >&2 exit 1 fi