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
4 changes: 2 additions & 2 deletions .agent/skills/Sentinel.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ on:
jobs:
web-build:
name: Web Build (apps/web)
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

services:
postgres:
image: ankane/pgvector:latest
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: convospan_ci
POSTGRES_DB: craftmyfunnel_ci
ports:
- 5432:5432
options: >-
Expand Down Expand Up @@ -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
Expand All @@ -79,16 +79,16 @@ 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"
REDIS_URL: "redis://localhost:6379"

api-typecheck:
name: API Strict Typecheck (apps/api)
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -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
Expand All @@ -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
41 changes: 36 additions & 5 deletions .github/workflows/neon_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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 }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/phi3-runtime-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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: |
Expand Down Expand Up @@ -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/
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: >-
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/production-gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ on:
jobs:
validate-readiness:
name: Production Stability Audit (apps/web)
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

services:
postgres:
image: ankane/pgvector:latest
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: convospan
POSTGRES_DB: craftmyfunnel
ports:
- 5432:5432
options: >-
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vercel-parity-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ concurrency:

jobs:
vercel-parity-build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- name: Checkout repo
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/modules/security/FirmwareService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion apps/edge-fastapi/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion apps/edge-fastapi/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Loading
Loading