mirror of
https://github.com/bitbaum/ai-forms.git
synced 2026-12-04 06:17:06 +01:00
* feat: publish as @bitbaum/ai-forms (same code, same version) Owner, 2026-11-06: the fleet's packages belong under the @bitbaum npm organization; this one was published earlier, unscoped, and never moved (fleet docs/package-scope-migration-plan.md). Name, imports in tests, examples and docs change; no API changes. The old name stays installable and is deprecated once no adopter uses it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvpWNTLxXNfwUHS7MD * ci(publish): the current Publish workflow, which can make a package's first npm release The renamed @bitbaum/ai-forms is a new npm name, and npm trusts a publisher only for an existing package; the current template publishes the first version with the org token and links tokenless publishing afterwards. The old copy here was OIDC-only, so it would fail on a new name. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvpWNTLxXNfwUHS7MD * chore(example): regenerate the example's lockfile for the @bitbaum/ai-forms name The example's lock still keyed the local file:../.. dependency as ai-forms, so the fleet rollout gate found no locked artifact for @bitbaum/ai-forms and held this PR (sweep: 'Missing locked artifact for @bitbaum/ai-forms'). --------- Co-authored-by: Claude <noreply@anthropic.com>
70 lines
2.1 KiB
TypeScript
70 lines
2.1 KiB
TypeScript
import { defineFields } from '@bitbaum/ai-forms';
|
|
|
|
/**
|
|
* One declaration of what this form contains. The server resolves fields by
|
|
* target key, so the browser can never widen the set the model may write.
|
|
*/
|
|
export const JOB_FIELDS = defineFields([
|
|
{
|
|
name: 'title',
|
|
label: 'Role title',
|
|
type: 'text',
|
|
required: true,
|
|
maxLength: 80,
|
|
placeholder: 'Senior Backend Engineer',
|
|
},
|
|
{
|
|
name: 'summary',
|
|
label: 'Summary',
|
|
type: 'textarea',
|
|
maxLength: 600,
|
|
hint: 'Two or three sentences a candidate would actually read.',
|
|
},
|
|
{
|
|
name: 'seniority',
|
|
label: 'Seniority',
|
|
type: 'select',
|
|
options: [
|
|
{ value: 'intern', label: 'Intern' },
|
|
{ value: 'junior', label: 'Junior' },
|
|
{ value: 'mid', label: 'Mid' },
|
|
{ value: 'senior', label: 'Senior' },
|
|
{ value: 'staff', label: 'Staff' },
|
|
{ value: 'principal', label: 'Principal' },
|
|
],
|
|
},
|
|
{
|
|
name: 'skills',
|
|
label: 'Skills',
|
|
type: 'tags',
|
|
hint: 'Technologies the role actually requires.',
|
|
},
|
|
{ name: 'salaryMin', label: 'Salary from', type: 'number', min: 0 },
|
|
{ name: 'salaryMax', label: 'Salary to', type: 'number', min: 0 },
|
|
{
|
|
name: 'currency',
|
|
label: 'Currency',
|
|
type: 'select',
|
|
overridable: true,
|
|
options: [{ value: 'CHF' }, { value: 'EUR' }, { value: 'USD' }],
|
|
hint: 'Defaults to CHF; a fill pass may replace it because it is a template default.',
|
|
},
|
|
{ name: 'remote', label: 'Remote allowed', type: 'boolean' },
|
|
{ name: 'startDate', label: 'Start date', type: 'date' },
|
|
{ name: 'contact', label: 'Contact email', type: 'email' },
|
|
// Never shown to the model and never written by it.
|
|
{ name: 'postingId', label: 'Posting ID', type: 'text', aiExcluded: true },
|
|
]);
|
|
|
|
export const JOB_TARGET = {
|
|
key: 'job',
|
|
name: 'Job posting',
|
|
fields: JOB_FIELDS,
|
|
instructions: [
|
|
'Salary figures are annual gross, in the form currency.',
|
|
'The summary is addressed to the candidate, never to the recruiter.',
|
|
],
|
|
} as const;
|
|
|
|
export const JOB_INITIAL_VALUES = { currency: 'CHF', postingId: 'JOB-2043' };
|