{"id":48589749,"url":"https://github.com/atjsh/web-push-for-codex","last_synced_at":"2026-04-08T19:01:03.650Z","repository":{"id":347749125,"uuid":"1195143913","full_name":"atjsh/web-push-for-codex","owner":"atjsh","description":"Codex App / CLI → Web Push → Remote Web Browser","archived":false,"fork":false,"pushed_at":"2026-03-29T10:54:58.000Z","size":39,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-29T13:21:01.749Z","etag":null,"topics":["web-push"],"latest_commit_sha":null,"homepage":"https://atjsh.ap.ngrok.io","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/atjsh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-29T09:32:19.000Z","updated_at":"2026-03-29T10:55:01.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/atjsh/web-push-for-codex","commit_stats":null,"previous_names":["atjsh/web-push-for-codex"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/atjsh/web-push-for-codex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atjsh%2Fweb-push-for-codex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atjsh%2Fweb-push-for-codex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atjsh%2Fweb-push-for-codex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atjsh%2Fweb-push-for-codex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atjsh","download_url":"https://codeload.github.com/atjsh/web-push-for-codex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atjsh%2Fweb-push-for-codex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31569400,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["web-push"],"created_at":"2026-04-08T19:01:02.884Z","updated_at":"2026-04-08T19:01:03.643Z","avatar_url":"https://github.com/atjsh.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# web-push-for-codex\n\nMinimal implementation for Codex turn completion alerts delivered over Web Push to a PWA.\n\n\u003e **[🇰🇷 한국어 버전](#web-push-for-codex-한국어)**\n\n## Components\n\n- `backend/src/server.js`: HTTP API with subscribe, event ingest, and run status page.\n- `pwa/public/index.html`: PWA shell with enable-notifications flow.\n- `pwa/public/service-worker.js`: push and notification click handling.\n- `scripts/codex_webpush_notify.js`: local Codex notify hook script.\n- `scripts/clear_tokens.js`: clears all push subscriptions from the database.\n\n## Environment Variables\n\n| Variable | Default | Description |\n|---|---|---|\n| `PORT` | `3000` | Server listen port |\n| `CODEX_NOTIFY_TOKEN` | `dev-token` | Bearer token for the `/api/codex/event` endpoint |\n| `VAPID_PUBLIC_KEY` | _(empty)_ | VAPID public key for Web Push |\n| `VAPID_PRIVATE_KEY` | _(empty)_ | VAPID private key for Web Push |\n| `ALLOWED_UA_PATTERN` | `iPhone` | Regex pattern for allowed User-Agents. Non-matching requests get an empty 404. Set to empty string to allow all. |\n| `CODEX_NOTIFY_BACKEND_URL` | _(required for notify script)_ | Backend URL used by `codex_webpush_notify.js` |\n\n## Run\n\n```bash\nCODEX_NOTIFY_TOKEN=dev-token npm start\n```\n\nThen open `http://localhost:3000`.\n\n## Subscription Management\n\nOnly one push subscription is allowed at a time. If a subscription already exists, new registrations are blocked (HTTP 409).\n\nTo clear existing subscriptions and allow a new device to register:\n\n```bash\nnpm run clear-tokens\n```\n\n---\n\n# web-push-for-codex (한국어)\n\nCodex 작업 완료 알림을 Web Push를 통해 PWA로 전달하는 최소 구현체입니다.\n\n## 구성 요소\n\n- `backend/src/server.js`: 구독, 이벤트 수신, 실행 상태 페이지를 제공하는 HTTP API.\n- `pwa/public/index.html`: 알림 활성화 플로우를 포함한 PWA 셸.\n- `pwa/public/service-worker.js`: 푸시 수신 및 알림 클릭 처리.\n- `scripts/codex_webpush_notify.js`: 로컬 Codex 알림 훅 스크립트.\n- `scripts/clear_tokens.js`: 데이터베이스의 모든 푸시 구독을 삭제.\n\n## 환경 변수\n\n| 변수 | 기본값 | 설명 |\n|---|---|---|\n| `PORT` | `3000` | 서버 리스닝 포트 |\n| `CODEX_NOTIFY_TOKEN` | `dev-token` | `/api/codex/event` 엔드포인트용 Bearer 토큰 |\n| `VAPID_PUBLIC_KEY` | _(비어 있음)_ | Web Push용 VAPID 공개 키 |\n| `VAPID_PRIVATE_KEY` | _(비어 있음)_ | Web Push용 VAPID 비공개 키 |\n| `ALLOWED_UA_PATTERN` | `iPhone` | 허용할 User-Agent 정규식 패턴. 일치하지 않는 요청은 빈 404를 반환합니다. 빈 문자열로 설정하면 모두 허용. |\n| `CODEX_NOTIFY_BACKEND_URL` | _(알림 스크립트에 필수)_ | `codex_webpush_notify.js`에서 사용하는 백엔드 URL |\n\n## 실행\n\n```bash\nCODEX_NOTIFY_TOKEN=dev-token npm start\n```\n\n이후 `http://localhost:3000`을 열어 주세요.\n\n## 구독 관리\n\n한 번에 하나의 푸시 구독만 허용됩니다. 이미 구독이 존재하면 새 등록이 차단됩니다 (HTTP 409).\n\n기존 구독을 삭제하고 새 기기를 등록하려면:\n\n```bash\nnpm run clear-tokens\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatjsh%2Fweb-push-for-codex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatjsh%2Fweb-push-for-codex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatjsh%2Fweb-push-for-codex/lists"}