diff --git a/.agent/skills/Sentinel.md b/.agent/skills/Sentinel.md index bdde2a6b..a8e10da7 100644 --- a/.agent/skills/Sentinel.md +++ b/.agent/skills/Sentinel.md @@ -1,11 +1,11 @@ --- name: Sentinel Audit -description: A high-precision data auditor and systems engineer (Covospan Sentinel). +description: A high-precision data auditor and systems engineer (CraftMyFunnel Sentinel). --- # Sentinel Agent Prompt -**System Role**: You are the **Covospan Sentinel**. Your mission is to validate incoming scraped payloads and monitor the connection health of the scraper nodes. You verify data quality, consistency, and operational stability before ingestion. +**System Role**: You are the **CraftMyFunnel Sentinel**. Your mission is to validate incoming scraped payloads and monitor the connection health of the scraper nodes. You verify data quality, consistency, and operational stability before ingestion. ## Task 1: Data Quality Check (DQC) - **Schema Validation**: Ensure `title`, `description`, `friction_signal`, `source_url`, `region_id` are present. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52fd6481..fa608d95 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ on: jobs: web-build: name: Web Build (apps/web) - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 services: postgres: @@ -19,7 +19,7 @@ jobs: env: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres - POSTGRES_DB: convospan_ci + POSTGRES_DB: craftmyfunnel_ci ports: - 5432:5432 options: >- @@ -60,14 +60,14 @@ jobs: - name: Generate Prisma Client working-directory: apps/web - run: DATABASE_URL="postgresql://postgres:postgres@localhost:5432/convospan_ci" DIRECT_URL="postgresql://postgres:postgres@localhost:5432/convospan_ci" npx prisma generate --config prisma/prisma.config.ts --schema prisma/schema.prisma + run: DATABASE_URL="postgresql://postgres:postgres@localhost:5432/craftmyfunnel_ci" DIRECT_URL="postgresql://postgres:postgres@localhost:5432/craftmyfunnel_ci" npx prisma generate --config prisma/prisma.config.ts --schema prisma/schema.prisma - name: Setup Database Schema working-directory: apps/web run: npx prisma db push --config prisma/prisma.config.ts --schema prisma/schema.prisma --skip-generate env: - DATABASE_URL: "postgresql://postgres:postgres@localhost:5432/convospan_ci" - DIRECT_URL: "postgresql://postgres:postgres@localhost:5432/convospan_ci" + DATABASE_URL: "postgresql://postgres:postgres@localhost:5432/craftmyfunnel_ci" + DIRECT_URL: "postgresql://postgres:postgres@localhost:5432/craftmyfunnel_ci" - name: Type Check working-directory: apps/web @@ -79,8 +79,8 @@ jobs: env: NEXT_PUBLIC_API_URL: http://localhost:3001 NEXT_PHASE: phase-production-build - DATABASE_URL: "postgresql://postgres:postgres@localhost:5432/convospan_ci" - DIRECT_URL: "postgresql://postgres:postgres@localhost:5432/convospan_ci" + DATABASE_URL: "postgresql://postgres:postgres@localhost:5432/craftmyfunnel_ci" + DIRECT_URL: "postgresql://postgres:postgres@localhost:5432/craftmyfunnel_ci" NEXTAUTH_SECRET: ci-secret-not-real NEXTAUTH_URL: http://localhost:3000 SKIP_ENV_VALIDATION: "true" @@ -88,7 +88,7 @@ jobs: api-typecheck: name: API Strict Typecheck (apps/api) - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 @@ -120,7 +120,7 @@ jobs: docker-smoke: name: Docker Build Smoke (api required, edge-fastapi optional) - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 @@ -129,8 +129,8 @@ jobs: run: node scripts/check-critical-runtime-files.mjs - name: Build API image - run: docker build -t convospan-api-ci -f apps/api/Dockerfile . + run: docker build -t craftmyfunnel-api-ci -f apps/api/Dockerfile . - name: Build Edge image (optional) continue-on-error: true - run: docker build -t convospan-edge-ci -f apps/edge-fastapi/Dockerfile apps/edge-fastapi + run: docker build -t craftmyfunnel-edge-ci -f apps/edge-fastapi/Dockerfile apps/edge-fastapi diff --git a/.github/workflows/neon_workflow.yml b/.github/workflows/neon_workflow.yml index b0f7b575..6c7685f7 100644 --- a/.github/workflows/neon_workflow.yml +++ b/.github/workflows/neon_workflow.yml @@ -15,12 +15,17 @@ jobs: setup: name: Setup outputs: - branch: ${{ steps.branch_name.outputs.current_branch }} - runs-on: ubuntu-latest + branch: ${{ steps.branch_name.outputs.safe_branch }} + runs-on: ubuntu-22.04 steps: - name: Get branch name id: branch_name - uses: tj-actions/branch-names@v8 + shell: bash + run: | + branch="${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}" + safe_branch="$(printf '%s' "$branch" | tr '/[:upper:]' '-[:lower:]' | tr -cd 'a-z0-9._-')" + safe_branch="${safe_branch:0:48}" + echo "safe_branch=${safe_branch:-preview}" >> "$GITHUB_OUTPUT" create_neon_branch: name: Create Neon Branch @@ -33,12 +38,25 @@ jobs: github.event.action == 'synchronize' || github.event.action == 'opened' || github.event.action == 'reopened') - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Get branch expiration date as an env variable (2 weeks from now) id: get_expiration_date run: echo "EXPIRES_AT=$(date -u --date '+14 days' +'%Y-%m-%dT%H:%M:%SZ')" >> "$GITHUB_ENV" + - name: Check Neon configuration + id: neon_config + env: + NEON_PROJECT_ID: ${{ vars.NEON_PROJECT_ID }} + NEON_API_KEY: ${{ secrets.NEON_API_KEY }} + run: | + if [ -n "$NEON_PROJECT_ID" ] && [ -n "$NEON_API_KEY" ]; then + echo "configured=true" >> "$GITHUB_OUTPUT" + else + echo "configured=false" >> "$GITHUB_OUTPUT" + echo "Neon preview branch configuration is not present; skipping branch creation." >> "$GITHUB_STEP_SUMMARY" + fi - name: Create Neon Branch + if: steps.neon_config.outputs.configured == 'true' id: create_neon_branch uses: neondatabase/create-branch-action@v6 with: @@ -51,9 +69,22 @@ jobs: name: Delete Neon Branch needs: setup if: github.event_name == 'pull_request' && github.event.action == 'closed' - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: + - name: Check Neon configuration + id: neon_config + env: + NEON_PROJECT_ID: ${{ vars.NEON_PROJECT_ID }} + NEON_API_KEY: ${{ secrets.NEON_API_KEY }} + run: | + if [ -n "$NEON_PROJECT_ID" ] && [ -n "$NEON_API_KEY" ]; then + echo "configured=true" >> "$GITHUB_OUTPUT" + else + echo "configured=false" >> "$GITHUB_OUTPUT" + echo "Neon preview branch configuration is not present; skipping branch deletion." >> "$GITHUB_STEP_SUMMARY" + fi - name: Delete Neon Branch + if: steps.neon_config.outputs.configured == 'true' uses: neondatabase/delete-branch-action@v3 with: project_id: ${{ vars.NEON_PROJECT_ID }} diff --git a/.github/workflows/phi3-runtime-verify.yml b/.github/workflows/phi3-runtime-verify.yml index 5ddd6a63..f6dd0df3 100644 --- a/.github/workflows/phi3-runtime-verify.yml +++ b/.github/workflows/phi3-runtime-verify.yml @@ -26,7 +26,7 @@ concurrency: jobs: runtime-verify: name: Phi-3 Runtime Evaluation - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 timeout-minutes: 60 steps: @@ -36,7 +36,7 @@ jobs: fetch-depth: 1 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v4 + uses: docker/setup-buildx-action@v3 - name: Verify required files exist run: | @@ -77,7 +77,7 @@ jobs: - name: Upload verification artifacts if: always() - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@v4 with: name: phi3-verification-logs-${{ github.run_id }} path: verification-artifacts/ diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 868771d1..007333f5 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -11,14 +11,14 @@ jobs: test: name: Playwright (apps/web) timeout-minutes: 60 - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 services: postgres: image: ankane/pgvector:latest env: POSTGRES_PASSWORD: password - POSTGRES_DB: convospan + POSTGRES_DB: craftmyfunnel ports: - 5432:5432 options: >- @@ -54,22 +54,22 @@ jobs: npx prisma generate --config prisma/prisma.config.ts --schema prisma/schema.prisma npx prisma db push --config prisma/prisma.config.ts --schema prisma/schema.prisma env: - DATABASE_URL: postgresql://postgres:password@localhost:5432/convospan - DIRECT_URL: postgresql://postgres:password@localhost:5432/convospan + DATABASE_URL: postgresql://postgres:password@localhost:5432/craftmyfunnel + DIRECT_URL: postgresql://postgres:password@localhost:5432/craftmyfunnel - name: Create test user working-directory: apps/web run: npx tsx scripts/create-test-user.ts env: - DATABASE_URL: postgresql://postgres:password@localhost:5432/convospan - DIRECT_URL: postgresql://postgres:password@localhost:5432/convospan + DATABASE_URL: postgresql://postgres:password@localhost:5432/craftmyfunnel + DIRECT_URL: postgresql://postgres:password@localhost:5432/craftmyfunnel - name: Build application working-directory: apps/web run: npm run build env: - DATABASE_URL: postgresql://postgres:password@localhost:5432/convospan - DIRECT_URL: postgresql://postgres:password@localhost:5432/convospan + DATABASE_URL: postgresql://postgres:password@localhost:5432/craftmyfunnel + DIRECT_URL: postgresql://postgres:password@localhost:5432/craftmyfunnel NEXTAUTH_SECRET: ci-playwright-secret NEXTAUTH_URL: http://localhost:3000 NEXT_PUBLIC_API_URL: http://localhost:3001 @@ -83,15 +83,15 @@ jobs: working-directory: apps/web run: npx playwright test env: - DATABASE_URL: postgresql://postgres:password@localhost:5432/convospan - DIRECT_URL: postgresql://postgres:password@localhost:5432/convospan + DATABASE_URL: postgresql://postgres:password@localhost:5432/craftmyfunnel + DIRECT_URL: postgresql://postgres:password@localhost:5432/craftmyfunnel NEXTAUTH_SECRET: ci-playwright-secret NEXTAUTH_URL: http://localhost:3000 TEST_USER_EMAIL: audit_user@example.com TEST_USER_PASSWORD: AuditPassword123! REDIS_URL: redis://localhost:6379 - - uses: actions/upload-artifact@v7 + - uses: actions/upload-artifact@v4 if: always() with: name: playwright-report diff --git a/.github/workflows/production-gate.yml b/.github/workflows/production-gate.yml index 8995d607..7d8750dc 100644 --- a/.github/workflows/production-gate.yml +++ b/.github/workflows/production-gate.yml @@ -12,7 +12,7 @@ on: jobs: validate-readiness: name: Production Stability Audit (apps/web) - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 services: postgres: @@ -20,7 +20,7 @@ jobs: env: POSTGRES_USER: postgres POSTGRES_PASSWORD: password - POSTGRES_DB: convospan + POSTGRES_DB: craftmyfunnel ports: - 5432:5432 options: >- @@ -57,35 +57,35 @@ jobs: working-directory: apps/web run: npx prisma generate --config prisma/prisma.config.ts --schema prisma/schema.prisma env: - DATABASE_URL: "postgresql://postgres:password@localhost:5432/convospan" - DIRECT_URL: "postgresql://postgres:password@localhost:5432/convospan" + DATABASE_URL: "postgresql://postgres:password@localhost:5432/craftmyfunnel" + DIRECT_URL: "postgresql://postgres:password@localhost:5432/craftmyfunnel" - name: Setup Database working-directory: apps/web run: npx prisma db push --config prisma/prisma.config.ts --schema prisma/schema.prisma env: - DATABASE_URL: "postgresql://postgres:password@localhost:5432/convospan" - DIRECT_URL: "postgresql://postgres:password@localhost:5432/convospan" + DATABASE_URL: "postgresql://postgres:password@localhost:5432/craftmyfunnel" + DIRECT_URL: "postgresql://postgres:password@localhost:5432/craftmyfunnel" - name: Seed Readiness Data working-directory: apps/web run: npm run readiness:seed env: - DATABASE_URL: "postgresql://postgres:password@localhost:5432/convospan" - DIRECT_URL: "postgresql://postgres:password@localhost:5432/convospan" + DATABASE_URL: "postgresql://postgres:password@localhost:5432/craftmyfunnel" + DIRECT_URL: "postgresql://postgres:password@localhost:5432/craftmyfunnel" - name: Execute Production Readiness Audit id: audit working-directory: apps/web run: npm run readiness:audit env: - DATABASE_URL: "postgresql://postgres:password@localhost:5432/convospan" - DIRECT_URL: "postgresql://postgres:password@localhost:5432/convospan" + DATABASE_URL: "postgresql://postgres:password@localhost:5432/craftmyfunnel" + DIRECT_URL: "postgresql://postgres:password@localhost:5432/craftmyfunnel" REDIS_URL: "redis://localhost:6379" NEXTAUTH_SECRET: ci-secret NEXTAUTH_URL: http://localhost:3000 NODE_ENV: production - GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} + GEMINI_API_KEY: "ci-dummy-key" - name: Hardening Compliance Report if: always() diff --git a/.github/workflows/vercel-parity-build.yml b/.github/workflows/vercel-parity-build.yml index 4e9f0f44..10d518ea 100644 --- a/.github/workflows/vercel-parity-build.yml +++ b/.github/workflows/vercel-parity-build.yml @@ -12,7 +12,7 @@ concurrency: jobs: vercel-parity-build: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Checkout repo diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index ec9d59ec..a9943325 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -14,7 +14,7 @@ concurrency: jobs: verify-safety-invariants: name: Verify Phi-3 Safety Enforcement - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 timeout-minutes: 5 steps: @@ -50,7 +50,7 @@ jobs: merge-gate: name: Merge Gate needs: verify-safety-invariants - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 if: always() steps: - name: Check verification result diff --git a/apps/api/prisma/migrations/20251217185234_add_marketplace/migration.sql b/apps/api/prisma/migrations/20251217185234_add_marketplace/migration.sql index a5eb7e33..22dabaa0 100644 --- a/apps/api/prisma/migrations/20251217185234_add_marketplace/migration.sql +++ b/apps/api/prisma/migrations/20251217185234_add_marketplace/migration.sql @@ -9,7 +9,7 @@ CREATE TABLE "MarketplaceTemplate" ( "config" JSONB NOT NULL, "metrics" JSONB, "isOfficial" BOOLEAN NOT NULL DEFAULT true, - "author" TEXT NOT NULL DEFAULT 'ConvoSpan', + "author" TEXT NOT NULL DEFAULT 'CraftMyFunnel', "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, CONSTRAINT "MarketplaceTemplate_pkey" PRIMARY KEY ("id") diff --git a/apps/api/src/modules/security/FirmwareService.ts b/apps/api/src/modules/security/FirmwareService.ts index 1f05d2b0..86861f97 100644 --- a/apps/api/src/modules/security/FirmwareService.ts +++ b/apps/api/src/modules/security/FirmwareService.ts @@ -3,7 +3,7 @@ import crypto from 'crypto'; /** * Firmware Service * Handles Digital Signing and Remote Attestation for Edge Nodes (Jetson). - * Ensures that only code signed by the "Covospan Developer Key" is running. + * Ensures that only code signed by the "CraftMyFunnel Developer Key" is running. */ export class FirmwareService { // In production, these should be loaded from a secure HSM or KMS diff --git a/apps/edge-fastapi/Dockerfile b/apps/edge-fastapi/Dockerfile index f4afa83d..e44e3eb0 100644 --- a/apps/edge-fastapi/Dockerfile +++ b/apps/edge-fastapi/Dockerfile @@ -1,6 +1,6 @@ # Stage 1: Build dependencies and artifacts FROM python:3.11-slim AS builder -LABEL org.opencontainers.image.source="https://github.com/Convospanai-outreach/fullstack" +LABEL org.opencontainers.image.source="https://github.com/craftmyfunnel-outreach/fullstack" ENV PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 \ diff --git a/apps/edge-fastapi/main.py b/apps/edge-fastapi/main.py index 21077c42..5b909d7c 100644 --- a/apps/edge-fastapi/main.py +++ b/apps/edge-fastapi/main.py @@ -38,7 +38,7 @@ async def dispatch(self, request, call_next): "The browser actuator cannot run unauthenticated. Set EDGE_API_KEY or disable EDGE_EXECUTE_ENABLED." ) -app = FastAPI(title="ConvoSpan Edge Node") +app = FastAPI(title="CraftMyFunnel Edge Node") app.add_middleware(CorrelationMiddleware) # Inject correlation ID into logs diff --git a/apps/web/package.json b/apps/web/package.json index ec4a405c..6832dc68 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -3,7 +3,7 @@ "private": true, "repository": { "type": "git", - "url": "git+https://github.com/Convospanai-outreach/fullstack.git" + "url": "git+https://github.com/craftmyfunnel-outreach/fullstack.git" }, "publishConfig": { "registry": "https://npm.pkg.github.com" diff --git a/apps/web/prisma/migrations/20251217185234_add_marketplace/migration.sql b/apps/web/prisma/migrations/20251217185234_add_marketplace/migration.sql index a5eb7e33..22dabaa0 100644 --- a/apps/web/prisma/migrations/20251217185234_add_marketplace/migration.sql +++ b/apps/web/prisma/migrations/20251217185234_add_marketplace/migration.sql @@ -9,7 +9,7 @@ CREATE TABLE "MarketplaceTemplate" ( "config" JSONB NOT NULL, "metrics" JSONB, "isOfficial" BOOLEAN NOT NULL DEFAULT true, - "author" TEXT NOT NULL DEFAULT 'ConvoSpan', + "author" TEXT NOT NULL DEFAULT 'CraftMyFunnel', "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, CONSTRAINT "MarketplaceTemplate_pkey" PRIMARY KEY ("id") diff --git a/apps/web/src/app/(dashboard)/governance/keys/page.tsx b/apps/web/src/app/(dashboard)/governance/keys/page.tsx index c9b2ec01..3e000378 100644 --- a/apps/web/src/app/(dashboard)/governance/keys/page.tsx +++ b/apps/web/src/app/(dashboard)/governance/keys/page.tsx @@ -87,7 +87,7 @@ export default function SecurityKeysPage() {
Automate your workspace using the CovoSpan Public API.
+Automate your workspace using the CraftMyFunnel Public API.