4 Commits

Author SHA1 Message Date
72c0f8c12c feat(talent): wire recruiter placement/unlock revenue via Creem
The talent graph's recruiter monetization was designed (Opportunity → Pilot →
Proof funnel) but never wired to charge. This adds the placement/candidate-unlock
revenue engine on top of the existing talent graph, charged through Creem (a
merchant-of-record with Turkey-based-seller payout support — the portfolio
standard used by bidstage/CalDesk), not Polar/Stripe.

Revenue gate: a recruiter (opportunity owner) unlocks a matched candidate's
contact + full evidence. Gating mirrors the referral gate (owner-only, no
self-unlock, candidate must have real matching evidence). The fee is charged via
a Creem checkout whose custom_price is the exact computed fee, and settled by the
signed checkout.completed webhook, which records the entitlement + receipt.

- Fee math (pure, configurable): flat unlock access fee (TALENT_UNLOCK_FEE_CENTS,
  default $49) or a percentage placement success fee (rate + min/max clamps) when
  a placement amount is supplied.
- New TalentPlacement model + migration: entitlement/receipt with a compound
  unique key (opportunity, candidate, recruiter) for charge idempotency and a
  unique providerOrderId; provider defaults to creem.
- Creem adapter (createCreemCheckout) mirroring the reviewed bidstage lib/creem.ts,
  and a signed Creem webhook route (HMAC-SHA256, timing-safe) that settles
  placements. Amount is revalidated against the quoted fee before unlocking.
- Routes: POST/GET /talent-graph/opportunities/:id/unlocks and gated
  GET .../candidates/:candidateId/contact (402 until paid).
- Errors.paymentRequired (402) helper.
- Tests: fee math, gating, charge idempotency, and the signed webhook settlement
  path (75 tests). Secrets are env-only (CREEM_API_KEY, CREEM_WEBHOOK_SECRET,
  CREEM_PRODUCT_ID) — none committed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-26 21:31:07 +03:00
090086841f fix: completion verification — all 7 products build, test, and boot
Functional verify+fix across both products after the build-out/harvest marathon.
All 7 subprojects WORK (production build + tests + boot smoke).

- gitgram-backend: fix 2FA backup-code lifecycle + QR-secret privacy regression,
  messageController reaction-aggregation crash; +4 test-harness updates for new
  models. Build clean, 1356/1356 tests, /health 200
- gitgram-web: fix render-time location/router.replace crash in app/camera prerender;
  next/link test mock. Production build green (216 pages), 76/86 tests
- gitgram-mobile: add expo-haptics jest mock. tsc clean, 8/8 tests
- aitm-core: fix IPv4/IPv6 authz test + a2aVendored auth-allowlist classification.
  541/541 tests
- aitm-api: vitest timeout bump for cold-transform false timeouts. 728/728 tests, /health 200
- aitm-mcp: correct beads_mark_done test (PUT not PATCH). 176/176 tests, boots
- aitm-website: build green (93 pages)

Deploy note: backend needs a Prisma migration for MutedWord/Post.contentLanguage/
MessageReaction (schema validates; generate against a migration-capable Postgres).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 20:14:40 +03:00
54ca6de161 feat: round-4 product build-out (50 more gaps closed, all 7 green ~94-100%)
Second deep audit→build→verify pass; all products typecheck clean.

- gitgram-web (100): fix feed pagination, reel drafts, 6 gaps
- gitgram-backend (99): add admin/moderator role checks to moderation routes;
  wire backend-e2e CI (Postgres+Redis services); 5 gaps
- gitgram-mobile (97): fix broken create-reel flow; 11 gaps
- aitm-core (98): dedupe vendored CLI command registrations; real vector search
  with local fallback; 7 gaps
- aitm-api (99): replace hash-based embeddings with real OpenAI/Voyage embeddings
  (+ checkpoints test_status migration 0008); 8 gaps
- aitm-mcp (99): add X-API-Key to workspace tool proxy calls; 8 gaps
- aitm-website (94): fix annual billing checkout; 5 gaps

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 14:44:42 +03:00
49b183818c Unify gitgram + aitimemachine into the monorepo (de-submodule) and merge vendored engines
Convert gitgram/ and aitimemachine/ from embedded git repos (which showed as
opaque submodule gitlinks on GitHub) into fully-tracked first-party content.

AITM now merges its 7 vendored repos as first-party engines:
- memory: beads (Go task DAG) + context7 (docs SDK), unified into saved_contexts
- git: vendored C git (bundled binary) + gitnexus (in-process code intelligence)
- agentic: a2a (@a2a-js/sdk) + pal (AITM-managed Python subprocess)

Includes the full session's product build: Gitgram web/mobile/backend features,
AITM website/CLI/MCP, the unified memory layer, engine build tooling
(scripts/build-engines.sh, Dockerfile, CI), docs (README, ENGINES.md, ARCHITECTURE.md),
and extensive test suites.

Build artifacts, node_modules, external/, and gemini-cli are gitignored.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 14:14:09 +03:00