@dispatch/contract (0.1.0)
Installation
@dispatch:registry=https://git.lynkedup.cloud/api/packages/Satyam_Rastogi/npm/npm install @dispatch/contract@0.1.0"@dispatch/contract": "0.1.0"About this package
@dispatch/contract
The Dispatch Broker's wire contract: the request/response schemas and TypeScript types for its
three procedures — recommend, assign and decision.get. One oRPC contract, from which the
service's REST surface, its GET /openapi.json tool schemas and any typed client are all
generated, so none of the three can drift from the others.
Shapes only. No router, no HTTP server, no client — importing this package pulls in zod and
@orpc/contract and nothing else.
Install
# .npmrc in your repo
@dispatch:registry=https://git.lynkedup.cloud/api/packages/Satyam_Rastogi/npm/
//git.lynkedup.cloud/api/packages/Satyam_Rastogi/npm/:_authToken=${GITEA_TOKEN}
export GITEA_TOKEN=<a Gitea token with read:package>
npm install @dispatch/contract # or pnpm add
Use
import {
RecommendInputSchema,
type AssignResult,
type DecisionView,
StageSchema,
type RefusalDetail,
} from "@dispatch/contract"
const input = RecommendInputSchema.parse(await req.json())
Requires an ESM consumer ("type": "module" or .mts) on Node 22+.
What a version pins
A version of this package pins the contract — the shapes, the refusal semantics, the status
codes. It does not pin the collaborators behind the service; those adapters are still fakes.
See docs/CAPABILITIES.md and docs/USING.md in the Dispatch Broker repository.
Publishing (maintainers)
pnpm publish from this directory. The published manifest points main/types/exports at
dist/; the in-repo manifest points at src/ so the workspace keeps resolving TypeScript source.
That swap lives in publishConfig and is applied by pnpm at pack time — publish with pnpm, not
npm, or the tarball will name src/index.ts as its entry point.
Dependencies
Dependencies
| ID | Version |
|---|---|
| @orpc/contract | ^1.15.0 |
| zod | ^4.4.3 |