feat(contract): @forgegraph/contract — Effect HttpApi → operation IR compiler #564
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
gmackie/ForgeGraph!564
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/contract-package"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
New workspace package
packages/contract(@forgegraph/contract0.1.0): compile an EffectHttpApiinto ForgeGraph's operation contract IR with no hand-authored endpoint, schema, error or auth catalogs.Phase 1, tasks 1.1–1.7 of the plan: https://7n04n7hhuesf.postplan.dev
Surface
effect@forgegraph/contract/./irvalidateContract, fingerprints./sla./effectcompileHttpApi,Sla/IsPublic/Authenticationannotations,forgeGraph({...})helperDesign points
<serviceId>.<group>.<endpoint>; matches thegroup.endpointspan name the create-gmacko-app template already emits. A route move does not change identity (tested).HttpApi.reflect(identity, middleware, statuses, merged annotations) andOpenApi.fromApi(JSON Schema + components). No AST walking.Authenticationis derived from the security middleware (cookie/basic → user, bearer/header key → service, both → mixed, none → anonymous). An explicit annotation overrides and setsmismatch: truefor ForgeGraph to flag../irZod schema (Phase 2).Verification
pnpm -F @forgegraph/contract test), typecheck andtsc -p tsconfig.build.jsonclean, oxlint clean of errors.effectrc.112 and its deps).Not in this PR
Ingest endpoint, tables, UI tab (Phase 2) and the template-side annotations +
contract.jsongeneration (tasks 1.8–1.10, separate PR in create-gmacko-app).🤖 Generated with Claude Code
b91621836047a91edcffPreview environment is live: https://pr-564-forgegraph.forgegraf.com
Deployed
b9162183with the beta stage's environment. It redeploys on every push and is destroyed when this PR closes.47a91edcffc2f1c4ef6ePreview environment is live: https://pr-564-forgegraph.forgegraf.com
Deployed
c2f1c4efwith the beta stage's environment. It redeploys on every push and is destroyed when this PR closes.