# AGENTS.md - Vouch SDK

Public npm package (`@getvouch/sdk`) for integrating with the Vouch web proof platform. Provides utilities for constructing proof request links, widget URLs, and interacting with the Vouch proof flow.

For monorepo-level guidance, see the root [`AGENTS.md`](../../AGENTS.md).

## Development commands

```bash
pnpm build             # Compile TypeScript + resolve path aliases (tsc + tsc-alias)
pnpm test              # Run unit tests (Vitest)
pnpm lint              # ESLint (src/) + TypeScript type-check
pnpm lint:fix          # Auto-fix lint issues
pnpm format            # Check formatting
pnpm format:fix        # Auto-fix formatting
```

## Directory structure

```text
packages/sdk/
├── src/
│   ├── index.ts        # Package entry point
│   ├── lib/            # Core SDK logic
│   ├── utils/          # Helper utilities
│   └── errors.ts       # SDK error types
└── dist/               # Build output (compiled JS + declarations)
```

## Build and publish

- Build output goes to `dist/` with `main: dist/index.js` and `types: dist/index.d.ts`
- The package is **public** (`private: false`) and published to npm as `@getvouch/sdk`
- Uses `tsc-alias` to resolve TypeScript path aliases in the compiled output
- Version bumps and publishing are handled by the `release-sdk.yaml` GitHub Actions workflow

## Notes

- Zero runtime dependencies — the SDK is lightweight by design
- Uses `common` as a dev dependency for shared types during development
- Always run `pnpm build` after making changes to verify the dist output compiles cleanly
- Test with `pnpm test` before publishing
