@happyvertical/smrt-human-resources
HR records: who works for an organization, as what, and with what standing. Employment with dated terms, and qualifications with expiry.
What it gives you
HR records: who works for an organization, as what, and with what standing. Employment with dated terms, and qualifications with expiry.
- 01One Employment per tenant and profile with a stable id; a rehire adds a term, and history is append-only
- 02Dates are calendar dates with no timezone; the package has no clock and never flips a status when a date passes
- 03QualificationService.check is the gate before allowing work: not-held, not-yet-issued, expired, suspended, or revoked
Employment
hire, end, rehire, changePosition, changeWorkerType, placeOnLeave, and returnFromLeave are dated changes recorded by EmploymentService. An end may be recorded ahead of the last day; employed-on-a-date is answered from the terms, never from the stored status. A login belongs to one employment at a time.
Qualifications
A Qualification defines a ticket, certification, authorization, training, or restriction. A HeldQualification carries issue and expiry dates; a renewal is a new row pointing at the old one. suspend, reinstate, and revoke take an effectiveOn, and standing is decided from the dated history everywhere.
Boundaries
Pay belongs to payroll, time records to smrt-timesheets, logins and permissions to smrt-users, and identity to smrt-profiles. Every model is tenant-scoped, sensitive, and closed; writes go through the two services, which are constructed from a trusted actor the application has already authorized.
Package UI
Components in this package
Import these public components directly. When the package also exports playground entries, the next tab renders its real components with package-owned example data.
Package previews
No playground module yet
This package does not currently export a ./playground module. Its component names and import path remain available in the Components tab.
Intentionally not registered
Generated interface
REST
The exact route set comes from each model's @smrt({ api }) policy
and the application manifest—not from a second controller definition.
Every model and collection publishes no generated REST, MCP, WebMCP, or CLI operation. The application authorizes the acting person and calls EmploymentService or QualificationService.
Generated interface
MCP
AI tools are generated from the methods you explicitly include. Their inputs are validated against the same model metadata used by REST and CLI.
Every model and collection publishes no generated REST, MCP, WebMCP, or CLI operation. The application authorizes the acting person and calls EmploymentService or QualificationService.
Browser-native agent interface
WebMCP
The generated web definitions carry the same tool names, descriptions, and JSON Schema
inputs as MCP. smrt-web registers them with document.modelContext.
Every model and collection publishes no generated REST, MCP, WebMCP, or CLI operation. The application authorizes the acting person and calls EmploymentService or QualificationService.
Generated interface
CLI
The app CLI turns manifest resources into predictable operator commands while keeping package-specific actions close to their models.
Every model and collection publishes no generated REST, MCP, WebMCP, or CLI operation. The application authorizes the acting person and calls EmploymentService or QualificationService.