@profullstack/agenticjobs 0.11.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +136 -1
- package/dist/cli/args.js +4 -2
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/index.js +227 -5
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/jobfile.js +38 -2
- package/dist/cli/jobfile.js.map +1 -1
- package/dist/client/client.d.ts +157 -0
- package/dist/client/client.js +44 -0
- package/dist/client/client.js.map +1 -1
- package/dist/config.d.ts +35 -1
- package/dist/config.js +33 -1
- package/dist/config.js.map +1 -1
- package/dist/core/agentwriter.js +22 -5
- package/dist/core/agentwriter.js.map +1 -1
- package/dist/core/applications.js +1 -1
- package/dist/core/applications.js.map +1 -1
- package/dist/core/candidates.js +3 -5
- package/dist/core/candidates.js.map +1 -1
- package/dist/core/capacity.d.ts +1 -1
- package/dist/core/capacity.js +11 -19
- package/dist/core/capacity.js.map +1 -1
- package/dist/core/coinpay.d.ts +143 -0
- package/dist/core/coinpay.js +417 -0
- package/dist/core/coinpay.js.map +1 -0
- package/dist/core/import.js +19 -9
- package/dist/core/import.js.map +1 -1
- package/dist/core/inbox.d.ts +155 -0
- package/dist/core/inbox.js +353 -0
- package/dist/core/inbox.js.map +1 -0
- package/dist/core/invoices.d.ts +111 -0
- package/dist/core/invoices.js +292 -0
- package/dist/core/invoices.js.map +1 -0
- package/dist/core/jobs.d.ts +24 -6
- package/dist/core/jobs.js +116 -31
- package/dist/core/jobs.js.map +1 -1
- package/dist/core/mail.d.ts +16 -0
- package/dist/core/mail.js +22 -0
- package/dist/core/mail.js.map +1 -1
- package/dist/core/recommendations.d.ts +134 -0
- package/dist/core/recommendations.js +356 -0
- package/dist/core/recommendations.js.map +1 -0
- package/dist/core/updates.d.ts +15 -3
- package/dist/core/updates.js +58 -24
- package/dist/core/updates.js.map +1 -1
- package/dist/core/zip.js +29 -4
- package/dist/core/zip.js.map +1 -1
- package/dist/directory/federate.js +3 -1
- package/dist/directory/federate.js.map +1 -1
- package/dist/directory/fetch.d.ts +1 -1
- package/dist/markup/markdown.js +6 -2
- package/dist/markup/markdown.js.map +1 -1
- package/dist/markup/resume.js +18 -5
- package/dist/markup/resume.js.map +1 -1
- package/dist/mcp/tools.js +249 -7
- package/dist/mcp/tools.js.map +1 -1
- package/dist/schema/index.d.ts +1 -0
- package/dist/schema/index.js +1 -0
- package/dist/schema/index.js.map +1 -1
- package/dist/schema/instance.js +29 -0
- package/dist/schema/instance.js.map +1 -1
- package/dist/schema/job.d.ts +12 -0
- package/dist/schema/job.js +17 -3
- package/dist/schema/job.js.map +1 -1
- package/dist/schema/jsonld.js +7 -6
- package/dist/schema/jsonld.js.map +1 -1
- package/dist/schema/pay.d.ts +173 -0
- package/dist/schema/pay.js +668 -0
- package/dist/schema/pay.js.map +1 -0
- package/dist/server/app.d.ts +4 -3
- package/dist/server/app.js +10 -5
- package/dist/server/app.js.map +1 -1
- package/dist/server/deps.d.ts +5 -0
- package/dist/server/middleware.d.ts +11 -1
- package/dist/server/middleware.js +26 -3
- package/dist/server/middleware.js.map +1 -1
- package/dist/server/routes/api.js +437 -7
- package/dist/server/routes/api.js.map +1 -1
- package/dist/server/routes/discovery.js +29 -8
- package/dist/server/routes/discovery.js.map +1 -1
- package/dist/server/routes/inbox.d.ts +9 -0
- package/dist/server/routes/inbox.js +223 -0
- package/dist/server/routes/inbox.js.map +1 -0
- package/dist/server/routes/openapi.js +260 -2
- package/dist/server/routes/openapi.js.map +1 -1
- package/dist/server/routes/pages.d.ts +22 -0
- package/dist/server/routes/pages.js +244 -19
- package/dist/server/routes/pages.js.map +1 -1
- package/dist/tui/views.js +9 -3
- package/dist/tui/views.js.map +1 -1
- package/dist/views/candidates.d.ts +7 -0
- package/dist/views/candidates.js +3 -2
- package/dist/views/candidates.js.map +1 -1
- package/dist/views/docs.js +10 -1
- package/dist/views/docs.js.map +1 -1
- package/dist/views/inbox.d.ts +90 -0
- package/dist/views/inbox.js +73 -0
- package/dist/views/inbox.js.map +1 -0
- package/dist/views/jobs.d.ts +25 -0
- package/dist/views/jobs.js +35 -12
- package/dist/views/jobs.js.map +1 -1
- package/dist/views/layout.d.ts +24 -0
- package/dist/views/layout.js +20 -2
- package/dist/views/layout.js.map +1 -1
- package/dist/views/me.d.ts +10 -3
- package/dist/views/me.js +3 -2
- package/dist/views/me.js.map +1 -1
- package/dist/views/post.d.ts +18 -0
- package/dist/views/post.js +39 -7
- package/dist/views/post.js.map +1 -1
- package/dist/views/recommendations.d.ts +43 -0
- package/dist/views/recommendations.js +26 -0
- package/dist/views/recommendations.js.map +1 -0
- package/dist/views/updates.d.ts +13 -0
- package/dist/views/updates.js +6 -5
- package/dist/views/updates.js.map +1 -1
- package/docs/openjob.md +63 -0
- package/migrations/0014_inbox_and_billing.sql +138 -0
- package/migrations/0015_pay_lines.sql +38 -0
- package/migrations/0016_recommendations.sql +65 -0
- package/package.json +1 -1
- package/web/public/app.css +192 -2
- package/web/public/sw.js +1 -1
package/dist/views/me.js
CHANGED
|
@@ -2,9 +2,10 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "hono/jsx/jsx-
|
|
|
2
2
|
import { ago } from "../schema/text.js";
|
|
3
3
|
import { Alert, Badge, Card, Empty, Field, Prose } from "./layout.js";
|
|
4
4
|
import { UpdateComposer, UpdateList } from "./updates.js";
|
|
5
|
-
|
|
5
|
+
import { RecommendationsSection } from "./recommendations.js";
|
|
6
|
+
export const MePage = ({ viewer, orgs, jobs, resumes, applications, updates, following, candidateSlug, updateMax, recommendations = { received: [], given: [] }, children, }) => (_jsxs("div", { class: "stack", children: [_jsxs("div", { children: [_jsx("h1", { children: "You" }), _jsx("p", { class: "lede", children: viewer.email })] }), _jsxs("section", { class: "stack", children: [_jsxs("div", { class: "spread", children: [_jsx("h2", { children: "Resumes" }), _jsx("a", { class: "btn btn-sm", href: "/me/resumes/new", children: "New resume" })] }), _jsx("p", { class: "small muted", children: "Markdown, in the OpenResume.md convention. Upload a PDF or a Word file and it is converted for you; what you keep is the Markdown." }), resumes.length === 0 ? (_jsx(Empty, { children: "No resumes yet." })) : (_jsx("ul", { class: "job-list", children: resumes.map((resume) => (_jsx("li", { children: _jsxs("a", { class: "card card-link", href: `/me/resumes/${resume.slug}`, children: [_jsxs("div", { class: "spread", children: [_jsx("h3", { class: "card-title", children: resume.title }), _jsx(Badge, { variant: resume.visibility === 'private' ? 'outline' : 'primary', children: resume.visibility })] }), _jsxs("p", { class: "small muted", children: ["Updated ", ago(resume.updatedAt), resume.sourceName !== null && ` - from ${resume.sourceName}`] })] }) }))) }))] }), _jsxs("section", { class: "stack", children: [_jsx("h2", { children: "Updates" }), candidateSlug === null ? (_jsx("p", { class: "small muted", children: "Publish a resume and you can post updates as yourself: what you shipped, when you are free next. They appear on your candidate page and in the board's feed." })) : (_jsxs(_Fragment, { children: [_jsx(UpdateComposer, { action: "/me/updates", as: viewer.name ?? viewer.email, max: updateMax }), updates.length > 0 && _jsx(UpdateList, { updates: updates, showAuthor: false })] })), following.length > 0 && (_jsxs("p", { class: "small muted", children: ["You follow", ' ', following.map((entry, index) => (_jsxs(_Fragment, { children: [index > 0 && ', ', entry.slug === null ? (entry.name) : (_jsx("a", { href: entry.kind === 'employer'
|
|
6
7
|
? `/employers/${entry.slug}`
|
|
7
|
-
: `/candidates/${entry.slug}`, children: entry.name }))] }))), ". ", _jsx("a", { href: "/updates", children: "
|
|
8
|
+
: `/candidates/${entry.slug}`, children: entry.name }))] }))), ". ", _jsx("a", { href: "/updates", children: "Read their updates" }), "."] }))] }), _jsx(RecommendationsSection, { received: recommendations.received, given: recommendations.given, ...(recommendations.error === undefined ? {} : { error: recommendations.error }) }), _jsxs("section", { class: "stack", children: [_jsxs("div", { class: "spread", children: [_jsx("h2", { children: "Employers" }), _jsx("a", { class: "btn btn-sm btn-secondary", href: "/me/employers/new", children: "Add an employer" })] }), orgs.length === 0 ? (_jsx(Empty, { children: "You cannot post a job until you add the employer it is for." })) : (_jsx("div", { class: "row", children: orgs.map((org) => (_jsx("a", { class: "badge badge-primary", href: `/employers/${org.slug}`, children: org.name }))) }))] }), _jsxs("section", { class: "stack", children: [_jsxs("div", { class: "spread", children: [_jsx("h2", { children: "Your listings" }), orgs.length > 0 && (_jsx("a", { class: "btn btn-sm", href: "/post", children: "Post a job" }))] }), jobs.length === 0 ? (_jsx(Empty, { children: "Nothing posted yet." })) : (_jsx("ul", { class: "job-list", children: jobs.map((job) => (_jsx("li", { children: _jsxs("a", { class: "card card-link", href: `/me/jobs/${job.slug}`, children: [_jsxs("div", { class: "spread", children: [_jsx("h3", { class: "card-title", children: job.title }), _jsx(Badge, { variant: job.status === 'published' ? 'primary' : 'outline', children: job.status })] }), _jsxs("p", { class: "small muted", children: [job.org.name, " - ", job.status === 'published' ? ago(job.publishedAt) : 'not live'] })] }) }))) }))] }), _jsxs("section", { class: "stack", children: [_jsx("h2", { children: "Applications you have sent" }), applications.length === 0 ? (_jsx(Empty, { children: "None yet." })) : (_jsx("ul", { class: "job-list", children: applications.map((application) => (_jsx("li", { children: _jsxs("a", { class: "card card-link", href: `/jobs/${application.jobSlug}`, children: [_jsxs("div", { class: "spread", children: [_jsx("h3", { class: "card-title", children: application.jobTitle }), _jsx(Badge, { variant: "outline", children: application.status })] }), _jsxs("p", { class: "small muted", children: ["Sent ", ago(application.createdAt)] })] }) }))) }))] }), _jsxs(Card, { children: [_jsxs("div", { class: "card-header", children: [_jsx("h2", { class: "card-title", children: "Terminals and agents" }), _jsxs("p", { class: "card-description", children: [_jsx("code", { children: "agenticjobs login" }), " asks this board for a code; approve it at", ' ', _jsx("a", { href: "/device", children: "/device" }), ". A terminal token can read and apply, and is never an administrator."] })] }), _jsx("button", { class: "btn btn-secondary btn-sm", type: "button", id: "passkey-add", hidden: true, children: "Add a passkey to this account" }), _jsx("p", { class: "small error-text", id: "passkey-add-error", hidden: true }), _jsx("form", { method: "post", action: "/logout", style: "margin-top:.75rem", children: _jsx("button", { class: "btn btn-ghost btn-sm", type: "submit", children: "Sign out of this browser" }) })] }), children] }));
|
|
8
9
|
export const ResumeEditor = ({ resume, html, warnings, error, saved }) => (
|
|
9
10
|
/*
|
|
10
11
|
* The preview sits below the editor, not beside it.
|
package/dist/views/me.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"me.js","sourceRoot":"","sources":["../../src/views/me.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,aAAc,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,cAAe,CAAC;AAG3D,MAAM,CAAC,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"me.js","sourceRoot":"","sources":["../../src/views/me.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,aAAc,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,cAAe,CAAC;AAG3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAuB,CAAC;AAE/D,MAAM,CAAC,MAAM,MAAM,GAkBb,CAAC,EACL,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,YAAY,EACZ,OAAO,EACP,SAAS,EACT,aAAa,EACb,SAAS,EACT,eAAe,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EAC7C,QAAQ,GACT,EAAE,EAAE,CAAC,CACJ,eAAK,KAAK,EAAC,OAAO,aAChB,0BACE,+BAAY,EACZ,YAAG,KAAK,EAAC,MAAM,YAAE,MAAM,CAAC,KAAK,GA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aACtB,aAAI,KAAK,EAAC,YAAY,YACnB,MAAM,CAAC,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,gBAAgB,GACxE,EACL,YAAG,KAAK,EAAC,kBAAkB,YACxB,MAAM,CAAC,UAAU,KAAK,QAAQ;gDAC7B,CAAC,CAAC,oDAAoD;gDACtD,CAAC,CAAC,yDAAyD,GAC3D,IACA,EACN,YAAG,KAAK,EAAC,OAAO,YACd,aAAG,IAAI,EAAE,eAAe,MAAM,CAAC,UAAU,EAAE,6BAAe,MAAM,CAAC,UAAU,IAAK,GAC9E,IACC,CACR,EACE,QAAQ,CAAC,MAAM,GAAG,CAAC,IAAI,CACtB,MAAC,KAAK,IAAC,OAAO,EAAC,SAAS,aACtB,6CAA8B,EAC9B,aAAI,KAAK,EAAC,sCAAsC,YAC7C,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CACzB,uBAAK,OAAO,GAAM,CACnB,CAAC,GACC,IACC,CACT,IACK,IACJ,EAEN,MAAC,IAAI,eACH,eAAK,KAAK,EAAC,aAAa,aACtB,aAAI,KAAK,EAAC,YAAY,wBAAa,EACnC,aAAG,KAAK,EAAC,kBAAkB,kDACS,MAAM,EAAE,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,gCAEpF,IACA,EACN,KAAC,KAAK,IAAC,IAAI,EAAE,IAAI,GAAI,IAChB,IACH,CACP,CAAC"}
|
package/dist/views/post.d.ts
CHANGED
|
@@ -20,6 +20,24 @@ export declare const ManageJobPage: FC<{
|
|
|
20
20
|
resumeTitle: string | null;
|
|
21
21
|
})[];
|
|
22
22
|
publicUrl: string;
|
|
23
|
+
/** Why the last publish or pay change was refused, shown where it happened. */
|
|
24
|
+
error?: string;
|
|
25
|
+
}>;
|
|
26
|
+
/**
|
|
27
|
+
* The pay fields, shared by the post form and the manage page.
|
|
28
|
+
*
|
|
29
|
+
* One line per price, typed the way it is said: "$120k - $150k a year",
|
|
30
|
+
* "$0.25 per task", "0.01 SOL per PR that fixes a bug", "10% revenue share".
|
|
31
|
+
* A textarea rather than four inputs and a select, because the old four
|
|
32
|
+
* could describe exactly one salary range and nothing this board is for.
|
|
33
|
+
*
|
|
34
|
+
* `values` may carry the old flat fields (an agent draft, a re-rendered
|
|
35
|
+
* form): they are folded into the text so nothing typed is lost.
|
|
36
|
+
*/
|
|
37
|
+
export declare const PayFields: FC<{
|
|
38
|
+
values: Record<string, string>;
|
|
39
|
+
/** Without the fieldset and its legend, for a card that already has a title. */
|
|
40
|
+
bare?: boolean;
|
|
23
41
|
}>;
|
|
24
42
|
export declare const NewEmployerPage: FC<{
|
|
25
43
|
error?: string;
|
package/dist/views/post.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "hono/jsx/jsx-runtime";
|
|
2
|
-
import { AGENT_POLICIES, APPLICATION_DECISIONS, EMPLOYMENT_TYPES,
|
|
2
|
+
import { AGENT_POLICIES, APPLICATION_DECISIONS, EMPLOYMENT_TYPES, SENIORITIES, WORKPLACES, } from "../schema/job.js";
|
|
3
|
+
import { PAYMENT_COINS, PAYMENT_RAILS, PAY_LINE_EXAMPLES, formatPay, formatMethod, normalisePay, payOfJob, payStated, payToText, } from "../schema/pay.js";
|
|
3
4
|
import { ago } from "../schema/text.js";
|
|
4
|
-
import { Alert, Badge, Card, Empty, Field, Prose } from "./layout.js";
|
|
5
|
-
export const PostJobPage = ({ orgs, error, values = {}, canDraft = false, brief = '' }) => (_jsxs("div", { class: "grid-2", children: [_jsxs("div", { class: "stack", children: [_jsx("h1", { children: "Post a job" }), _jsx("p", { class: "lede", children: "It stays a draft until you publish it, so nothing goes live by accident." }), error !== undefined && _jsx(Alert, { variant: "error", children: error }), orgs.length === 0 ? (_jsxs(Alert, { variant: "info", children: ["Add the employer first: ", _jsx("a", { href: "/me/employers/new", children: "add an employer" }), "."] })) : (_jsxs(_Fragment, { children: [canDraft && (_jsxs("form", { class: "stack-sm", method: "post", action: "/post/draft", children: [_jsx(Field, { label: "Write it with an agent", name: "brief", hint: "A sentence or two is enough. It fills the form in below and posts nothing: you read and edit every field, and it still stays a draft after that.", children: _jsx("textarea", { class: "textarea", id: "brief", name: "brief", rows: 3, placeholder: "Senior Go engineer, remote in European timezones, to own our payments service.", children: brief }) }), _jsxs("div", { class: "row", children: [_jsx("button", { class: "btn btn-secondary", type: "submit", children: "Draft it" }), _jsx("span", { class: "small muted", children: "It will not invent a salary. Pay comes from what you write here, or stays empty." })] })] })), _jsxs("form", { class: "stack", method: "post", action: "/post", children: [_jsx(Field, { label: "Employer", name: "org", children: _jsx("select", { class: "select", id: "org", name: "org", required: true, children: orgs.map((org) => (_jsx("option", { value: org.slug, selected: values['org'] === org.slug, children: org.name }))) }) }), _jsx(Field, { label: "Title", name: "title", children: _jsx("input", { class: "input", type: "text", id: "title", name: "title", value: values['title'] ?? '', required: true, maxlength: 140 }) }), _jsx(Field, { label: "Description", name: "description", hint:
|
|
5
|
+
import { Alert, Badge, Card, Empty, Field, MARKDOWN_HINT, Markdown, Prose } from "./layout.js";
|
|
6
|
+
export const PostJobPage = ({ orgs, error, values = {}, canDraft = false, brief = '' }) => (_jsxs("div", { class: "grid-2", children: [_jsxs("div", { class: "stack", children: [_jsx("h1", { children: "Post a job" }), _jsx("p", { class: "lede", children: "It stays a draft until you publish it, so nothing goes live by accident." }), error !== undefined && _jsx(Alert, { variant: "error", children: error }), orgs.length === 0 ? (_jsxs(Alert, { variant: "info", children: ["Add the employer first: ", _jsx("a", { href: "/me/employers/new", children: "add an employer" }), "."] })) : (_jsxs(_Fragment, { children: [canDraft && (_jsxs("form", { class: "stack-sm", method: "post", action: "/post/draft", children: [_jsx(Field, { label: "Write it with an agent", name: "brief", hint: "A sentence or two is enough. It fills the form in below and posts nothing: you read and edit every field, and it still stays a draft after that.", children: _jsx("textarea", { class: "textarea", id: "brief", name: "brief", rows: 3, placeholder: "Senior Go engineer, remote in European timezones, to own our payments service.", children: brief }) }), _jsxs("div", { class: "row", children: [_jsx("button", { class: "btn btn-secondary", type: "submit", children: "Draft it" }), _jsx("span", { class: "small muted", children: "It will not invent a salary. Pay comes from what you write here, or stays empty." })] })] })), _jsxs("form", { class: "stack", method: "post", action: "/post", children: [_jsx(Field, { label: "Employer", name: "org", children: _jsx("select", { class: "select", id: "org", name: "org", required: true, children: orgs.map((org) => (_jsx("option", { value: org.slug, selected: values['org'] === org.slug, children: org.name }))) }) }), _jsx(Field, { label: "Title", name: "title", children: _jsx("input", { class: "input", type: "text", id: "title", name: "title", value: values['title'] ?? '', required: true, maxlength: 140 }) }), _jsx(Field, { label: "Description", name: "description", hint: `${MARKDOWN_HINT} Headings, lists, links and tables all work.`, children: _jsx("textarea", { class: "textarea", id: "description", name: "description", required: true, children: values['description'] ?? '' }) }), _jsxs("div", { class: "row", children: [_jsx(Field, { label: "Type", name: "employmentType", children: _jsx("select", { class: "select", id: "employmentType", name: "employmentType", children: EMPLOYMENT_TYPES.map((type) => (_jsx("option", { value: type, selected: values['employmentType'] === type, children: type }))) }) }), _jsx(Field, { label: "Where", name: "workplace", children: _jsx("select", { class: "select", id: "workplace", name: "workplace", children: WORKPLACES.map((place) => (_jsx("option", { value: place, selected: values['workplace'] === place, children: place }))) }) }), _jsx(Field, { label: "Level", name: "seniority", children: _jsxs("select", { class: "select", id: "seniority", name: "seniority", children: [_jsx("option", { value: "", children: "unspecified" }), SENIORITIES.map((level) => (_jsx("option", { value: level, selected: values['seniority'] === level, children: level })))] }) })] }), _jsx(Field, { label: "Location", name: "location", hint: 'Free text: "Berlin", "US timezones".', children: _jsx("input", { class: "input", type: "text", id: "location", name: "location", value: values['location'] ?? '' }) }), _jsx(PayFields, { values: values }), _jsx(Field, { label: "Stack", name: "stack", hint: "Comma separated. Also what people search on.", children: _jsx("input", { class: "input", type: "text", id: "stack", name: "stack", value: values['stack'] ?? '', placeholder: "typescript, postgres, hono" }) }), _jsx(Field, { label: "Tags", name: "tags", hint: "Comma separated.", children: _jsx("input", { class: "input", type: "text", id: "tags", name: "tags", value: values['tags'] ?? '', placeholder: "backend, remote-first" }) }), _jsxs("fieldset", { children: [_jsx("legend", { children: "Agent policy" }), _jsx("p", { class: "hint", style: "margin-top:0", children: "Required. Candidates increasingly use an agent to write applications; this says where you stand, instead of them finding out by being rejected without a reason." }), AGENT_POLICIES.map((policy) => (_jsxs("label", { class: "row", style: "align-items:flex-start;margin-top:.5rem", children: [_jsx("input", { type: "radio", name: "agentPolicy", value: policy, checked: (values['agentPolicy'] ?? 'disclose') === policy, style: "margin-top:.35rem" }), _jsxs("span", { children: [_jsx("strong", { children: POLICY_LABEL[policy] }), _jsx("br", {}), _jsx("span", { class: "hint", children: POLICY_HELP[policy] })] })] })))] }), _jsxs("fieldset", { children: [_jsx("legend", { children: "How to apply" }), _jsx("p", { class: "small muted", children: "Applications are taken on this board, so an agent can complete one without a browser and you get every application in one place. There is no offsite link." })] }), _jsx("button", { class: "btn btn-block", type: "submit", children: "Create draft" })] })] }))] }), _jsx("aside", { class: "stack", children: _jsxs(Card, { children: [_jsx("div", { class: "card-header", children: _jsx("h2", { class: "card-title", children: "Or post it from anywhere else" }) }), _jsx("pre", { class: "code-block", children: "agenticjobs post --org acme job.md" }), _jsx("p", { class: "small muted", children: "Over MCP, with the board connected:" }), _jsx("pre", { class: "code-block", children: "post_job(org: \"acme\", ...)" }), _jsx("p", { class: "small muted", children: "Through myna, alongside the rest of a launch:" }), _jsx("pre", { class: "code-block", children: "myna jobs post --to jobs:acme job.md" })] }) })] }));
|
|
6
7
|
const POLICY_LABEL = {
|
|
7
8
|
welcome: 'Agents welcome',
|
|
8
9
|
disclose: 'Agents, if disclosed',
|
|
@@ -26,8 +27,39 @@ const DECISION_VERBS = {
|
|
|
26
27
|
rejected: 'Reject',
|
|
27
28
|
hired: 'Hire',
|
|
28
29
|
};
|
|
29
|
-
export const ManageJobPage = ({ job, html, applications, publicUrl
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
export const ManageJobPage = ({ job, html, applications, publicUrl, error }) => {
|
|
31
|
+
const pay = payOfJob(job);
|
|
32
|
+
return (_jsxs("div", { class: "stack", children: [_jsxs("div", { class: "spread", children: [_jsxs("div", { children: [_jsx("h1", { children: job.title }), _jsxs("p", { class: "lede", children: [job.org.name, " -", ' ', _jsx(Badge, { variant: job.status === 'published' ? 'primary' : 'outline', children: job.status }), formatPay(pay) !== null && (_jsxs(_Fragment, { children: [' ', "- ", formatPay(pay), formatMethod(pay.method) !== null &&
|
|
33
|
+
`, ${formatMethod(pay.method)?.toLowerCase()}`] }))] })] }), _jsx("div", { class: "row", children: job.status !== 'published' ? (_jsx("form", { method: "post", action: `/me/jobs/${job.slug}/publish`, children: _jsx("button", { class: "btn", type: "submit", children: "Publish" }) })) : (_jsxs(_Fragment, { children: [_jsx("a", { class: "btn btn-secondary", href: `/jobs/${job.slug}`, children: "View live" }), _jsx("form", { method: "post", action: `/me/jobs/${job.slug}/close`, children: _jsx("button", { class: "btn btn-secondary", type: "submit", children: "Close" }) })] })) })] }), error !== undefined && _jsx(Alert, { variant: "error", children: error }), job.status === 'draft' && (_jsx(Alert, { variant: "info", children: "This is a draft. It is not in the list, not in the feed, not in the API and not visible to any other instance until you publish it." })), !payStated(pay) && (_jsxs(Alert, { variant: "warning", children: [_jsx("strong", { children: "This listing does not say what it pays." }), ' ', job.status === 'published'
|
|
34
|
+
? 'It is live, but pay is now required, so say it below.'
|
|
35
|
+
: 'It cannot be published until it does.'] })), _jsxs(Card, { id: "pay", children: [_jsxs("div", { class: "card-header", children: [_jsx("h2", { class: "card-title", children: "Pay" }), _jsx("p", { class: "card-description", children: "Required to publish. Change it here without rewriting the rest of the listing." })] }), _jsxs("form", { class: "stack-sm", method: "post", action: `/me/jobs/${job.slug}/pay`, children: [_jsx(PayFields, { values: {
|
|
36
|
+
pay: payToText(pay),
|
|
37
|
+
payMethod: pay.method ?? '',
|
|
38
|
+
payEquity: pay.equity ?? '',
|
|
39
|
+
salaryUnpaid: pay.unpaid ? 'on' : '',
|
|
40
|
+
}, bare: true }), _jsx("div", { class: "row", children: _jsx("button", { class: "btn btn-secondary btn-sm", type: "submit", children: "Save pay" }) })] })] }), _jsxs("section", { class: "stack", children: [_jsxs("h2", { children: [applications.length, " ", applications.length === 1 ? 'application' : 'applications'] }), applications.length === 0 ? (_jsx(Empty, { children: "Nobody yet." })) : (applications.map((application) => (_jsxs(Card, { children: [_jsxs("div", { class: "spread", children: [_jsxs("h3", { class: "card-title", children: [application.answers['name'] ?? 'Someone', ' ', application.answers['email'] !== undefined && (_jsx("a", { class: "small", href: `mailto:${application.answers['email']}`, children: application.answers['email'] }))] }), _jsxs("span", { class: "row", children: [application.agent !== null && (_jsxs(Badge, { variant: "disclose", children: ["agent: ", application.agent.name, application.agent.supervised ? ', supervised' : ''] })), _jsx(Badge, { variant: application.status === 'hired' ? 'primary' : 'outline', children: application.status }), _jsx(Badge, { variant: "outline", children: ago(application.createdAt) })] })] }), Object.entries(application.answers)
|
|
41
|
+
.filter(([key]) => !['name', 'email'].includes(key))
|
|
42
|
+
.map(([key, value]) =>
|
|
43
|
+
// A box the applicant could write prose in is shown as prose. A
|
|
44
|
+
// one-line answer stays on its line.
|
|
45
|
+
job.apply.schema.fields.some((field) => field.name === key && field.type === 'textarea') ? (_jsxs("div", { class: "small", children: [_jsxs("strong", { children: [key, ":"] }), _jsx(Markdown, { source: value, class: "prose-compact answer-body" })] })) : (_jsxs("p", { class: "small", children: [_jsxs("strong", { children: [key, ":"] }), " ", value] }))), application.resume !== null && (_jsxs("details", { children: [_jsx("summary", { class: "small", children: "Resume" }), _jsx(Prose, { html: application.resume })] })), _jsx("div", { class: "row", children: APPLICATION_DECISIONS.filter((decision) => decision !== application.status).map((decision) => (_jsxs("form", { method: "post", action: `/me/jobs/${job.slug}/applications/${application.id}/decision`, children: [_jsx("input", { type: "hidden", name: "status", value: decision }), _jsx("button", { class: "btn btn-secondary btn-sm", type: "submit", children: DECISION_VERBS[decision] })] }))) })] }))))] }), _jsxs("details", { children: [_jsx("summary", { children: "The listing as it stands" }), _jsx(Prose, { html: html }), _jsxs("p", { class: "small muted", children: ["Machine readable at", ' ', _jsxs("code", { children: [publicUrl, "/api/v1/jobs/", job.slug] })] })] })] }));
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* The pay fields, shared by the post form and the manage page.
|
|
49
|
+
*
|
|
50
|
+
* One line per price, typed the way it is said: "$120k - $150k a year",
|
|
51
|
+
* "$0.25 per task", "0.01 SOL per PR that fixes a bug", "10% revenue share".
|
|
52
|
+
* A textarea rather than four inputs and a select, because the old four
|
|
53
|
+
* could describe exactly one salary range and nothing this board is for.
|
|
54
|
+
*
|
|
55
|
+
* `values` may carry the old flat fields (an agent draft, a re-rendered
|
|
56
|
+
* form): they are folded into the text so nothing typed is lost.
|
|
57
|
+
*/
|
|
58
|
+
export const PayFields = ({ values, bare = false }) => {
|
|
59
|
+
const folded = normalisePay(values);
|
|
60
|
+
const text = values['pay'] ?? (typeof folded === 'string' ? '' : payToText(folded));
|
|
61
|
+
const body = (_jsxs(_Fragment, { children: [!bare && (_jsx("p", { class: "hint", style: "margin-top:0", children: "Required before the listing can be published. A listing that does not say what it pays gets fewer and worse applications, and an agent reading it cannot tell whether to bother." })), _jsx(Field, { label: "What it pays", name: "pay", hint: `One price per line, the way you would say it: ${PAY_LINE_EXAMPLES}. Several lines are fine: "$0.25 per task" and "$0.25 per PR that fixes a bug" are two.`, children: _jsx("textarea", { class: "textarea", id: "pay", name: "pay", rows: 3, placeholder: '$120k - $150k a year\n$0.25 per task', children: text }) }), _jsxs("div", { class: "row", style: "flex-wrap:wrap;gap:.75rem;align-items:flex-start", children: [_jsxs(Field, { label: "Paid in", name: "payMethod", hint: "A coin, or a rail: bank transfer, PayPal, payroll.", children: [_jsx("input", { class: "input", type: "text", id: "payMethod", name: "payMethod", list: "pay-methods", maxlength: 40, placeholder: "SOL, USDC, bank transfer", value: values['payMethod'] ?? '' }), _jsx("datalist", { id: "pay-methods", children: [...PAYMENT_COINS, ...PAYMENT_RAILS].map((method) => (_jsx("option", { value: method }))) })] }), _jsx(Field, { label: "Equity", name: "payEquity", hint: "Optional, as text.", children: _jsx("input", { class: "input", type: "text", id: "payEquity", name: "payEquity", maxlength: 60, placeholder: "0.1% - 0.4%", value: values['payEquity'] ?? values['salaryEquity'] ?? '' }) })] }), _jsxs("p", { class: "hint", style: "margin-top:0", children: [_jsxs("label", { children: [_jsx("input", { type: "checkbox", name: "salaryUnpaid", value: "on", checked: values['salaryUnpaid'] === 'on' }), ' ', "This role is unpaid"] }), ' ', "An unpaid internship or volunteer post says so here. It reads as Unpaid rather than as a listing whose author skipped the question, and any line above is ignored."] })] }));
|
|
62
|
+
return bare ? (_jsx("div", { class: "stack-sm", children: body })) : (_jsxs("fieldset", { children: [_jsx("legend", { children: "Pay" }), body] }));
|
|
63
|
+
};
|
|
64
|
+
export const NewEmployerPage = ({ error }) => (_jsx("div", { style: "max-width:32rem;margin:0 auto", children: _jsxs("div", { class: "stack", children: [_jsx("h1", { children: "Add an employer" }), _jsx("p", { class: "lede", children: "You post jobs under an employer, not under your own name." }), error !== undefined && _jsx(Alert, { variant: "error", children: error }), _jsx(Card, { children: _jsxs("form", { class: "stack", method: "post", action: "/me/employers/new", children: [_jsx(Field, { label: "Name", name: "name", children: _jsx("input", { class: "input", type: "text", id: "name", name: "name", required: true, maxlength: 120 }) }), _jsx(Field, { label: "Website", name: "website", children: _jsx("input", { class: "input", type: "url", id: "website", name: "website", placeholder: "https://" }) }), _jsx(Field, { label: "About", name: "description", hint: MARKDOWN_HINT, children: _jsx("textarea", { class: "textarea", id: "description", name: "description" }) }), _jsx("button", { class: "btn btn-block", type: "submit", children: "Add employer" })] }) })] }) }));
|
|
33
65
|
//# sourceMappingURL=post.js.map
|
package/dist/views/post.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version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,MAAM,0EAA8D,EAC5E,KAAK,KAAK,SAAS,IAAI,KAAC,KAAK,IAAC,OAAO,EAAC,OAAO,YAAE,KAAK,GAAS,EAC9D,KAAC,IAAI,cACH,gBAAM,KAAK,EAAC,OAAO,EAAC,MAAM,EAAC,MAAM,EAAC,MAAM,EAAC,mBAAmB,aAC1D,KAAC,KAAK,IAAC,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,MAAM,YAC7B,gBAAO,KAAK,EAAC,OAAO,EAAC,IAAI,EAAC,MAAM,EAAC,EAAE,EAAC,MAAM,EAAC,IAAI,EAAC,MAAM,EAAC,QAAQ,QAAC,SAAS,EAAE,GAAG,GAAI,GAC5E,EACR,KAAC,KAAK,IAAC,KAAK,EAAC,SAAS,EAAC,IAAI,EAAC,SAAS,YACnC,gBAAO,KAAK,EAAC,OAAO,EAAC,IAAI,EAAC,KAAK,EAAC,EAAE,EAAC,SAAS,EAAC,IAAI,EAAC,SAAS,EAAC,WAAW,EAAC,UAAU,GAAG,GAC/E,EACR,KAAC,KAAK,IAAC,KAAK,EAAC,OAAO,EAAC,IAAI,EAAC,aAAa,EAAC,IAAI,EAAE,aAAa,YACzD,mBAAU,KAAK,EAAC,UAAU,EAAC,EAAE,EAAC,aAAa,EAAC,IAAI,EAAC,aAAa,GAAY,GACpE,EACR,iBAAQ,KAAK,EAAC,eAAe,EAAC,IAAI,EAAC,QAAQ,6BAElC,IACJ,GACF,IACH,GACF,CACP,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recommendations: the ones on a page, the form that writes one, and the
|
|
3
|
+
* section of /me where they are approved or rejected.
|
|
4
|
+
*
|
|
5
|
+
* A recommendation is plain text or Markdown, rendered the way every other
|
|
6
|
+
* body on the board is. It carries a name and a link to the page that name
|
|
7
|
+
* has, because a paragraph nobody signed is a review, and this is not a review.
|
|
8
|
+
*/
|
|
9
|
+
import type { FC } from 'hono/jsx';
|
|
10
|
+
import type { Recommendation } from '../core/recommendations.ts';
|
|
11
|
+
export declare const RecommendationItem: FC<{
|
|
12
|
+
item: Recommendation;
|
|
13
|
+
showSubject?: boolean;
|
|
14
|
+
}>;
|
|
15
|
+
/** The approved ones, on a candidate's or an employer's page. */
|
|
16
|
+
export declare const RecommendationList: FC<{
|
|
17
|
+
items: Recommendation[];
|
|
18
|
+
about: string;
|
|
19
|
+
}>;
|
|
20
|
+
/**
|
|
21
|
+
* The form on a page, for a signed-in reader who is not the subject.
|
|
22
|
+
*
|
|
23
|
+
* `existing` is what this reader already wrote, so the form is a rewrite
|
|
24
|
+
* rather than a second copy, and says what state the earlier one is in.
|
|
25
|
+
*/
|
|
26
|
+
export interface RecommendFormProps {
|
|
27
|
+
action: string;
|
|
28
|
+
asOptions: {
|
|
29
|
+
slug: string;
|
|
30
|
+
name: string;
|
|
31
|
+
}[];
|
|
32
|
+
canWriteAsSelf: boolean;
|
|
33
|
+
existing: Recommendation | null;
|
|
34
|
+
values?: Record<string, string>;
|
|
35
|
+
error?: string;
|
|
36
|
+
}
|
|
37
|
+
export declare const RecommendForm: FC<RecommendFormProps>;
|
|
38
|
+
/** The /me section: what is waiting, what is up, and what you wrote. */
|
|
39
|
+
export declare const RecommendationsSection: FC<{
|
|
40
|
+
received: Recommendation[];
|
|
41
|
+
given: Recommendation[];
|
|
42
|
+
error?: string;
|
|
43
|
+
}>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "hono/jsx/jsx-runtime";
|
|
2
|
+
import { ago } from "../schema/text.js";
|
|
3
|
+
import { Alert, Badge, Card, Field, MARKDOWN_HINT, Markdown } from "./layout.js";
|
|
4
|
+
function pageOf(party) {
|
|
5
|
+
if (party.slug === null)
|
|
6
|
+
return null;
|
|
7
|
+
return party.kind === 'employer' ? `/employers/${party.slug}` : `/candidates/${party.slug}`;
|
|
8
|
+
}
|
|
9
|
+
const PartyName = ({ party }) => {
|
|
10
|
+
const href = pageOf(party);
|
|
11
|
+
return href === null ? _jsx("span", { children: party.name }) : _jsx("a", { href: href, children: party.name });
|
|
12
|
+
};
|
|
13
|
+
export const RecommendationItem = ({ item, showSubject = false, }) => (_jsxs("div", { class: "recommendation", children: [_jsx(Markdown, { source: item.body, class: "prose-compact recommendation-body" }), _jsxs("p", { class: "small muted recommendation-meta", children: [_jsx("strong", { children: _jsx(PartyName, { party: item.author }) }), showSubject && (_jsxs(_Fragment, { children: [' ', "about ", _jsx(PartyName, { party: item.subject })] })), item.relationship !== null && _jsxs(_Fragment, { children: [" - ", item.relationship] }), ' - ', ago(item.decidedAt ?? item.createdAt)] })] }));
|
|
14
|
+
/** The approved ones, on a candidate's or an employer's page. */
|
|
15
|
+
export const RecommendationList = ({ items, about, }) => items.length === 0 ? (_jsx(_Fragment, {})) : (_jsxs("section", { class: "stack-sm", id: "recommendations", children: [_jsxs("h2", { class: "card-title", children: [items.length, " ", items.length === 1 ? 'recommendation' : 'recommendations'] }), _jsxs("p", { class: "small muted", children: ["Written by people and employers who worked with ", about, ", and shown because ", about, " approved each one."] }), _jsx("ul", { class: "recommendations", children: items.map((item) => (_jsx("li", { children: _jsx(RecommendationItem, { item: item }) }))) })] }));
|
|
16
|
+
export const RecommendForm = ({ action, asOptions, canWriteAsSelf, existing, values = {}, error, }) => (_jsxs("details", { class: "card", id: "recommend", children: [_jsx("summary", { class: "card-title", style: "cursor:pointer", children: existing === null ? 'Write a recommendation' : 'Rewrite your recommendation' }), _jsxs("div", { class: "stack-sm", style: "margin-top:.75rem", children: [error !== undefined && _jsx(Alert, { variant: "error", children: error }), existing !== null && (_jsxs("p", { class: "small muted", children: ["You wrote one ", ago(existing.createdAt), "; it is", ' ', _jsx(Badge, { variant: existing.status === 'approved' ? 'primary' : 'outline', children: existing.status }), ". Writing again replaces it and asks them to read it again."] })), !canWriteAsSelf && asOptions.length === 0 ? (_jsxs("p", { class: "small muted", children: ["A recommendation is signed by a page. ", _jsx("a", { href: "/me/resumes/new", children: "Publish a resume" }), " to write one as yourself, or add the employer you are writing for."] })) : (_jsxs("form", { class: "stack-sm", method: "post", action: action, children: [(asOptions.length > 0 || !canWriteAsSelf) && (_jsx(Field, { label: "From", name: "as", hint: canWriteAsSelf
|
|
17
|
+
? 'Yourself, or an employer you post for.'
|
|
18
|
+
: 'An employer you post for.', children: _jsxs("select", { class: "select", id: "as", name: "as", children: [canWriteAsSelf && (_jsx("option", { value: "", selected: (values['as'] ?? '') === '', children: "Yourself" })), asOptions.map((option) => (_jsx("option", { value: option.slug, selected: values['as'] === option.slug, children: option.name })))] }) })), _jsx(Field, { label: "How you know them", name: "relationship", hint: '"Hired them for a three-month contract", "Worked together at Acme". Optional.', children: _jsx("input", { class: "input", type: "text", id: "relationship", name: "relationship", maxlength: 120, value: values['relationship'] ?? existing?.relationship ?? '' }) }), _jsx(Field, { label: "What you would say", name: "body", hint: `At least 20 characters. ${MARKDOWN_HINT} It goes on their page with your name on it, once they approve it.`, children: _jsx("textarea", { class: "textarea", id: "body", name: "body", rows: 5, required: true, minlength: 20, maxlength: 2000, children: values['body'] ?? existing?.body ?? '' }) }), _jsx("div", { class: "row", children: _jsx("button", { class: "btn", type: "submit", children: "Send for approval" }) })] }))] })] }));
|
|
19
|
+
const DecisionButtons = ({ item }) => (_jsxs("div", { class: "row", children: [item.status !== 'approved' && (_jsx("form", { method: "post", action: `/me/recommendations/${item.id}/approve`, children: _jsx("button", { class: "btn btn-sm", type: "submit", children: "Approve" }) })), item.status !== 'rejected' && (_jsx("form", { method: "post", action: `/me/recommendations/${item.id}/reject`, children: _jsx("button", { class: "btn btn-secondary btn-sm", type: "submit", children: item.status === 'approved' ? 'Take it down' : 'Reject' }) }))] }));
|
|
20
|
+
/** The /me section: what is waiting, what is up, and what you wrote. */
|
|
21
|
+
export const RecommendationsSection = ({ received, given, error }) => {
|
|
22
|
+
const pending = received.filter((item) => item.status === 'pending');
|
|
23
|
+
const decided = received.filter((item) => item.status !== 'pending');
|
|
24
|
+
return (_jsxs("section", { class: "stack", id: "recommendations", children: [_jsx("h2", { children: "Recommendations" }), error !== undefined && _jsx(Alert, { variant: "error", children: error }), _jsx("p", { class: "small muted", children: "What people and employers who worked with you say about you. Nothing is shown on your page until you approve it, and you can take one down later. There is a form on every candidate and employer page to write one." }), pending.length > 0 && (_jsxs(Card, { children: [_jsx("div", { class: "card-header", children: _jsxs("h3", { class: "card-title", children: [pending.length, " waiting for you"] }) }), _jsx("ul", { class: "recommendations", children: pending.map((item) => (_jsxs("li", { class: "stack-sm", children: [_jsx(RecommendationItem, { item: item, showSubject: true }), _jsx(DecisionButtons, { item: item })] }))) })] })), decided.length > 0 && (_jsxs(Card, { children: [_jsx("div", { class: "card-header", children: _jsx("h3", { class: "card-title", children: "About you" }) }), _jsx("ul", { class: "recommendations", children: decided.map((item) => (_jsxs("li", { class: "stack-sm", children: [_jsx(RecommendationItem, { item: item, showSubject: true }), _jsxs("div", { class: "row", style: "align-items:center;gap:.6rem", children: [_jsx(Badge, { variant: item.status === 'approved' ? 'primary' : 'outline', children: item.status === 'approved' ? 'on your page' : 'rejected' }), _jsx(DecisionButtons, { item: item })] })] }))) })] })), given.length > 0 && (_jsxs(Card, { children: [_jsx("div", { class: "card-header", children: _jsx("h3", { class: "card-title", children: "You wrote" }) }), _jsx("ul", { class: "recommendations", children: given.map((item) => (_jsxs("li", { class: "stack-sm", children: [_jsx(RecommendationItem, { item: item, showSubject: true }), _jsxs("div", { class: "row", style: "align-items:center;gap:.6rem", children: [_jsx(Badge, { variant: item.status === 'approved' ? 'primary' : 'outline', children: item.status }), _jsx("form", { method: "post", action: `/me/recommendations/${item.id}/withdraw`, children: _jsx("button", { class: "btn btn-ghost btn-sm", type: "submit", children: "Withdraw" }) })] })] }))) })] })), received.length === 0 && given.length === 0 && (_jsx("p", { class: "small muted", children: "None yet, in either direction." }))] }));
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=recommendations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"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AAQ,yBAEzC,GACJ,IACH,IACH,CACN,CAAC,GACC,IACA,CACR,EACA,QAAQ,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,CAC9C,YAAG,KAAK,EAAC,aAAa,+CAAmC,CAC1D,IACO,CACX,CAAC;AACJ,CAAC,CAAC"}
|
package/dist/views/updates.d.ts
CHANGED
|
@@ -68,6 +68,19 @@ export interface SocialProps {
|
|
|
68
68
|
action: string;
|
|
69
69
|
max: number;
|
|
70
70
|
} | null;
|
|
71
|
+
/**
|
|
72
|
+
* A way to write to this author privately. Absent on your own page, and
|
|
73
|
+
* the only way to reach somebody here: there is no public comment box.
|
|
74
|
+
*/
|
|
75
|
+
message?: {
|
|
76
|
+
to: {
|
|
77
|
+
candidate: string;
|
|
78
|
+
} | {
|
|
79
|
+
employer: string;
|
|
80
|
+
};
|
|
81
|
+
signedIn: boolean;
|
|
82
|
+
next: string;
|
|
83
|
+
};
|
|
71
84
|
error?: string;
|
|
72
85
|
}
|
|
73
86
|
export declare const AuthorSocial: FC<SocialProps>;
|
package/dist/views/updates.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "hono/jsx/jsx-runtime";
|
|
2
|
-
import { Card, Empty, Field } from "./layout.js";
|
|
2
|
+
import { Card, Empty, Field, MARKDOWN_HINT, Markdown } from "./layout.js";
|
|
3
3
|
import { ago } from "../schema/text.js";
|
|
4
|
+
import { MessageButton } from "./inbox.js";
|
|
4
5
|
/** Where an author's own page is, when they have one. */
|
|
5
6
|
function authorHref(author) {
|
|
6
7
|
if (author.slug === null)
|
|
@@ -21,7 +22,7 @@ export const UpdateItem = ({ update, showAuthor = true, }) => {
|
|
|
21
22
|
return (
|
|
22
23
|
// The id is the feed's anchor: every entry's guid points at this element,
|
|
23
24
|
// so an item opened from a reader lands on the update it came from.
|
|
24
|
-
_jsxs("li", { class: "update", id: update.id, children: [showAuthor && (_jsxs("p", { class: "update-author", children: [href === null ? (_jsx("strong", { children: update.author.name })) : (_jsx("a", { href: href, children: _jsx("strong", { children: update.author.name }) })), ' ', _jsxs("span", { class: "small muted", children: [update.author.kind === 'employer' ? 'employer' : 'candidate', " \u00B7", ' ', ago(update.createdAt)] })] })), _jsx(
|
|
25
|
+
_jsxs("li", { class: "update", id: update.id, children: [showAuthor && (_jsxs("p", { class: "update-author", children: [href === null ? (_jsx("strong", { children: update.author.name })) : (_jsx("a", { href: href, children: _jsx("strong", { children: update.author.name }) })), ' ', _jsxs("span", { class: "small muted", children: [update.author.kind === 'employer' ? 'employer' : 'candidate', " \u00B7", ' ', ago(update.createdAt)] })] })), _jsx(Markdown, { source: update.body, class: "prose-compact update-body" }), update.link !== null && (_jsx("p", { class: "small", children: _jsx("a", { href: update.link, rel: "nofollow noopener", class: "update-link", children: hostOf(update.link) }) })), !showAuthor && _jsx("p", { class: "small muted", children: ago(update.createdAt) })] }));
|
|
25
26
|
};
|
|
26
27
|
export const UpdateList = ({ updates, showAuthor = true, }) => (_jsx("ul", { class: "update-list", children: updates.map((update) => (_jsx(UpdateItem, { update: update, showAuthor: showAuthor }))) }));
|
|
27
28
|
/**
|
|
@@ -31,7 +32,7 @@ export const UpdateList = ({ updates, showAuthor = true, }) => (_jsx("ul", { cla
|
|
|
31
32
|
* candidate's own dashboard without either growing a hidden "who am I" field
|
|
32
33
|
* that a caller could change.
|
|
33
34
|
*/
|
|
34
|
-
export const UpdateComposer = ({ action, as, max, error, value }) => (_jsxs(Card, { children: [_jsxs("div", { class: "card-header", children: [_jsx("h2", { class: "card-title", children: "Post an update" }), _jsxs("p", { class: "card-description", children: ["As ", _jsx("strong", { children: as }), ". What changed: a role filled, something shipped, when you are free next. Five a day, ", max, " characters, one link."] })] }), _jsxs("form", { method: "post", action: action, class: "stack-sm", children: [_jsx(Field, { label: "Update", name: "body", error: error, children: _jsx("textarea", { id: "body", name: "body", rows: 3, maxlength: max, required: true, placeholder: "We just closed the backend role. Two more open next month.", children: value ?? '' }) }), _jsx(Field, { label: "Link", name: "link", hint: "Optional. One public URL.", children: _jsx("input", { id: "link", name: "link", type: "url", placeholder: "https://" }) }), _jsx("div", { class: "row", children: _jsx("button", { class: "btn", type: "submit", children: "Post" }) })] })] }));
|
|
35
|
+
export const UpdateComposer = ({ action, as, max, error, value }) => (_jsxs(Card, { children: [_jsxs("div", { class: "card-header", children: [_jsx("h2", { class: "card-title", children: "Post an update" }), _jsxs("p", { class: "card-description", children: ["As ", _jsx("strong", { children: as }), ". What changed: a role filled, something shipped, when you are free next. Five a day, ", max, " characters, one link."] })] }), _jsxs("form", { method: "post", action: action, class: "stack-sm", children: [_jsx(Field, { label: "Update", name: "body", hint: MARKDOWN_HINT, error: error, children: _jsx("textarea", { id: "body", name: "body", rows: 3, maxlength: max, required: true, placeholder: "We just closed the backend role. Two more open next month.", children: value ?? '' }) }), _jsx(Field, { label: "Link", name: "link", hint: "Optional. One public URL.", children: _jsx("input", { id: "link", name: "link", type: "url", placeholder: "https://" }) }), _jsx("div", { class: "row", children: _jsx("button", { class: "btn", type: "submit", children: "Post" }) })] })] }));
|
|
35
36
|
/**
|
|
36
37
|
* Follow, as a form rather than a link.
|
|
37
38
|
*
|
|
@@ -39,11 +40,11 @@ export const UpdateComposer = ({ action, as, max, error, value }) => (_jsxs(Card
|
|
|
39
40
|
* scanner or crawler can make on the reader's behalf.
|
|
40
41
|
*/
|
|
41
42
|
export const FollowButton = ({ action, following, followers, signedIn, next }) => (_jsxs("div", { class: "row", style: "align-items:center;gap:.6rem;flex-wrap:wrap", children: [signedIn ? (_jsxs("form", { method: "post", action: action, children: [_jsx("input", { type: "hidden", name: "following", value: following ? 'yes' : 'no' }), _jsx("button", { class: following ? 'btn btn-secondary btn-sm' : 'btn btn-sm', type: "submit", children: following ? 'Following' : 'Follow' })] })) : (_jsx("a", { class: "btn btn-sm", href: `/login?next=${encodeURIComponent(next)}`, children: "Follow" })), _jsxs("span", { class: "small muted", children: [followers, " ", followers === 1 ? 'follower' : 'followers'] })] }));
|
|
42
|
-
export const AuthorSocial = ({ as, updates, follow, composer, error }) => (_jsxs("div", { class: "stack", children: [_jsx(FollowButton, { ...follow }), composer !== null && (_jsx(UpdateComposer, { action: composer.action, as: as, max: composer.max, error: error })), updates.length > 0 && (_jsxs("div", { class: "stack-sm", children: [_jsx("h2", { class: "card-title", children: "Updates" }), _jsx(UpdateList, { updates: updates, showAuthor: false })] }))] }));
|
|
43
|
+
export const AuthorSocial = ({ as, updates, follow, composer, message, error, }) => (_jsxs("div", { class: "stack", children: [_jsxs("div", { class: "row", style: "align-items:center;gap:.6rem;flex-wrap:wrap", children: [_jsx(FollowButton, { ...follow }), message !== undefined && _jsx(MessageButton, { ...message })] }), composer !== null && (_jsx(UpdateComposer, { action: composer.action, as: as, max: composer.max, error: error })), updates.length > 0 && (_jsxs("div", { class: "stack-sm", children: [_jsx("h2", { class: "card-title", children: "Updates" }), _jsx(UpdateList, { updates: updates, showAuthor: false })] }))] }));
|
|
43
44
|
/** The board's news page: everything anybody posted. */
|
|
44
45
|
export const UpdatesPage = ({ updates, boardName, followed, following }) => (_jsxs("div", { class: "stack", children: [_jsxs("div", { class: "stack-sm", children: [_jsx("h1", { children: "Updates" }), _jsxs("p", { class: "lede", children: ["Short posts from the employers and candidates on ", boardName, ". Everyone here is a real employer or a person with a resume, and nobody can post more than five a day."] })] }), followed !== null && (_jsxs(Card, { children: [_jsx("div", { class: "card-header", children: _jsxs("h2", { class: "card-title", children: ["From the ", following.length, " you follow"] }) }), followed.length === 0 ? (_jsx("p", { class: "small muted", children: following.length === 0
|
|
45
46
|
? 'You do not follow anybody yet. There is a Follow button on every employer and candidate page.'
|
|
46
47
|
: 'Nothing yet from anybody you follow.' })) : (_jsx(UpdateList, { updates: followed })), following.length > 0 && (_jsxs("p", { class: "small muted", style: "margin-top:.6rem", children: ["Following:", ' ', following.map((entry, index) => (_jsxs(_Fragment, { children: [index > 0 && ', ', entry.slug === null ? (entry.name) : (_jsx("a", { href: entry.kind === 'employer'
|
|
47
48
|
? `/employers/${entry.slug}`
|
|
48
|
-
: `/candidates/${entry.slug}`, children: entry.name }))] })))] }))] })), _jsx("h2", { class: "card-title", children: "Everyone" }), updates.length === 0 ? (_jsxs(Empty, { children: [_jsx("h2", { children: "Nothing posted yet" }), _jsx("p", { children: "An employer or a candidate posts here from their own page. It is the space between \"posted a job\" and silence." })] })) : (_jsx(UpdateList, { updates: updates })), _jsxs("p", { class: "small muted", children: ["This page is a feed: ", _jsx("a", { href: "/updates/feed", children: "/updates/feed" }), ", as Markdown at", ' ', _jsx("a", { href: "/updates.md", children: "/updates.md" }), ", as JSON at
|
|
49
|
+
: `/candidates/${entry.slug}`, children: entry.name }))] })))] }))] })), _jsx("h2", { class: "card-title", children: "Everyone" }), updates.length === 0 ? (_jsxs(Empty, { children: [_jsx("h2", { children: "Nothing posted yet" }), _jsx("p", { children: "An employer or a candidate posts here from their own page. It is the space between \"posted a job\" and silence." })] })) : (_jsx(UpdateList, { updates: updates })), _jsxs("p", { class: "small muted", children: ["This page is a feed: ", _jsx("a", { href: "/updates/feed", children: "/updates/feed" }), ", as Markdown at", ' ', _jsx("a", { href: "/updates.md", children: "/updates.md" }), ", as JSON at", ' ', _jsx("a", { href: "/api/v1/updates", children: "/api/v1/updates" }), ". One author at a time with", ' ', _jsx("code", { children: "?org=slug" }), " or ", _jsx("code", { children: "?candidate=slug" }), "."] })] }));
|
|
49
50
|
//# sourceMappingURL=updates.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updates.js","sourceRoot":"","sources":["../../src/views/updates.tsx"],"names":[],"mappings":";AAWA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,aAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"updates.js","sourceRoot":"","sources":["../../src/views/updates.tsx"],"names":[],"mappings":";AAWA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,aA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AAa,sCACC,YAAG,IAAI,EAAC,eAAe,8BAAkB,sBAAiB,GAAG,EAClF,YAAG,IAAI,EAAC,aAAa,4BAAgB,kBAAa,GAAG,EACrD,YAAG,IAAI,EAAC,iBAAiB,gCAAoB,iCAA4B,GAAG,EAC5E,uCAAsB,UAAI,6CAA4B,SACpD,IACA,CACP,CAAC"}
|
package/docs/openjob.md
CHANGED
|
@@ -35,6 +35,14 @@ serves at `GET /api/v1/jobs/{slug}`.
|
|
|
35
35
|
"seniority": "staff",
|
|
36
36
|
"location": "European timezones",
|
|
37
37
|
"remoteRegions": ["DE", "NL", "PT"],
|
|
38
|
+
"pay": {
|
|
39
|
+
"lines": [
|
|
40
|
+
{ "type": "yearly", "min": 180000, "max": 230000, "currency": "USD", "unit": null }
|
|
41
|
+
],
|
|
42
|
+
"method": "payroll",
|
|
43
|
+
"equity": "0.1% - 0.4%",
|
|
44
|
+
"unpaid": false
|
|
45
|
+
},
|
|
38
46
|
"salary": {
|
|
39
47
|
"min": 180000,
|
|
40
48
|
"max": 230000,
|
|
@@ -57,6 +65,60 @@ serves at `GET /api/v1/jobs/{slug}`.
|
|
|
57
65
|
|
|
58
66
|
`description` is Markdown. Not HTML, and not plain text with the formatting removed.
|
|
59
67
|
|
|
68
|
+
## pay
|
|
69
|
+
|
|
70
|
+
What it pays, in full, and **required before a listing can be published**. A listing
|
|
71
|
+
that says nothing about pay gets fewer and worse applications, and an agent reading it
|
|
72
|
+
cannot tell whether to bother; on this board "not stated" is not a listing anybody can
|
|
73
|
+
act on. "Unpaid" counts, because it is an answer.
|
|
74
|
+
|
|
75
|
+
`pay.lines` is a list because one price is not enough for the work this board is for.
|
|
76
|
+
A listing that pays per task, per pull request and per social post has three lines,
|
|
77
|
+
and a reader deciding whether to apply needs all of them:
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
"pay": {
|
|
81
|
+
"lines": [
|
|
82
|
+
{ "type": "per_task", "min": 0.25, "max": 0.25, "currency": "USD", "unit": "task" },
|
|
83
|
+
{ "type": "per_unit", "min": 0.25, "max": 0.25, "currency": "USD", "unit": "PR that fixes a bug you find" },
|
|
84
|
+
{ "type": "per_unit", "min": 0.25, "max": 0.25, "currency": "USD", "unit": "social post linking to your page" }
|
|
85
|
+
],
|
|
86
|
+
"method": "SOL",
|
|
87
|
+
"equity": null,
|
|
88
|
+
"unpaid": false
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
`type` is one of `hourly`, `daily`, `weekly`, `monthly`, `yearly`, `fixed`, `per_task`,
|
|
93
|
+
`per_unit`, `revenue_share`, `bounty`: the same list [ugig.net](https://ugig.net) carries
|
|
94
|
+
as a gig's `budget_type`, in the same spelling, so a gig there and a job here describe
|
|
95
|
+
pay the same way. `currency` is what the figure is written in, an ISO code or a ticker
|
|
96
|
+
such as `SOL`; `%` for a revenue share. `method` is separate from the price on purpose:
|
|
97
|
+
"$100 an hour paid in USDC" is one rate with a settlement preference, not two rates,
|
|
98
|
+
and the number does not change because the rail did. It is a coin (`SOL`, `USDC`, `ETH`,
|
|
99
|
+
`USDT`, `POL`) or a rail (`bank transfer`, `PayPal`, `payroll`).
|
|
100
|
+
|
|
101
|
+
**Writing it.** Nobody has to build that JSON. Every writer on this board, the web form,
|
|
102
|
+
the API, the CLI, the job file and the MCP tool, takes each line as the sentence a person
|
|
103
|
+
would say, and the reference implementation parses it:
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
$120k - $150k a year $100 an hour $800 a day
|
|
107
|
+
$5000 fixed $250 bounty 10% revenue share
|
|
108
|
+
$0.25 per task $0.25 per PR that fixes a bug you find
|
|
109
|
+
0.01 SOL per task $0.25 per social post, settled in SOL
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
A rail on the end of a line ("settled in SOL", "via bank transfer") becomes `method`.
|
|
113
|
+
A line that says how much but not what for (`$60k`) is refused with the fix. In a job
|
|
114
|
+
file the lines are a `pay:` list in the front matter and `pay_method:` beside it; over
|
|
115
|
+
the API, `pay` is an array of those strings or of line objects.
|
|
116
|
+
|
|
117
|
+
`salary` is the first time-based line flattened to `min`, `max`, `currency`, `period`,
|
|
118
|
+
kept for readers written against earlier versions and for the salary filter and sort,
|
|
119
|
+
which compare on an annual basis. A listing that pays per task has a null range there,
|
|
120
|
+
and its pay in `pay`.
|
|
121
|
+
|
|
60
122
|
## agentPolicy
|
|
61
123
|
|
|
62
124
|
The field this format exists for. Required on every listing, with exactly three
|
|
@@ -168,6 +230,7 @@ both - the JSON-LD for search engines, the OpenJob document for everything else.
|
|
|
168
230
|
| `workplace: "remote"` | `jobLocationType: "TELECOMMUTE"` |
|
|
169
231
|
| `remoteRegions` | `applicantLocationRequirements` |
|
|
170
232
|
| `location` | `jobLocation` |
|
|
233
|
+
| `pay` | nothing whole; the first time-based line travels as `salary`, below |
|
|
171
234
|
| `salary` | `baseSalary`, plus an annualised `estimatedSalary` |
|
|
172
235
|
| `salary.unpaid` | nothing; schema.org has no vocabulary for it, so `baseSalary` is simply absent |
|
|
173
236
|
| `expiresAt` | `validThrough` |
|