@springbrand/hr-cli 0.0.0-stage → 0.2.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.
@@ -0,0 +1,82 @@
1
+ ---
2
+ name: saas-hr-cli
3
+ description: Use the `hr` command to work with SpringBrand HR (recruiting) on the user's behalf: list jobs, search talents, see who is waiting for screening or an interview, pass or reject candidates, and track approvals. Use when the user asks about candidates, resumes, open roles, screening or interview scheduling.
4
+ ---
5
+
6
+ # hr CLI
7
+
8
+ `hr` calls the HR system. Every command prints JSON on stdout.
9
+
10
+ ## Setup
11
+
12
+ | Variable | Meaning |
13
+ | --- | --- |
14
+ | `HR_API_URL` | HR's address. Required. Never assume a domain; if it is missing, ask the user. |
15
+ | `HR_AGENT_KEY` | An Agent key from IAM. Without it, the user runs `hr login` once. |
16
+ | `IAM_URL` | Optional. HR tells the CLI where IAM is. |
17
+
18
+ Never print, log or repeat `HR_AGENT_KEY` or a token.
19
+
20
+ ## Commands
21
+
22
+ ```bash
23
+ hr whoami
24
+ hr jobs list [--status open]
25
+ hr talents search [text] [--job <job>] [--page n] [--page-size n]
26
+ hr talents show <name|id>
27
+ hr screening list [--job <job>]
28
+ hr screening pass <name|id> [--job <job>]
29
+ hr screening reject <name|id> --reason <reason> [--job <job>]
30
+ hr interviews to-schedule [--job <job>]
31
+ hr reasons list
32
+ hr approvals status <approvalId> [--wait] [--timeout seconds]
33
+ ```
34
+
35
+ `<job>` is a title, slug or id. `<reason>` is a name from `hr reasons list`, or an id.
36
+
37
+ ## Links
38
+
39
+ When the user asks for a link to a candidate, give the `url` from the output. Never build a link yourself.
40
+
41
+ - `talents search` and `talents show`: each talent's `url` opens their talent page; in `talents show`, each entry in `applications` has the `url` of that application.
42
+ - `screening list` and `interviews to-schedule`: each item's `url` opens that application (one candidate in one job).
43
+
44
+ If the person you need is not in a result, run the command that lists them first, for example `hr talents show <name>`.
45
+
46
+ ## Reading the result
47
+
48
+ | Output | Exit | What to do |
49
+ | --- | --- | --- |
50
+ | `{ "ok": true, "data": … }` | 0 | Done. Check `data.pendingApproval` first (below). |
51
+ | `{ "ok": false, "error": { "code", "message", "candidates"? } }` | 1 | Tell the user the message. |
52
+ | `error.code` is `USAGE` | 2 | Fix the command; see `hr --help`. |
53
+
54
+ Codes you will meet:
55
+
56
+ - `AMBIGUOUS`: several people or jobs match. Show `error.candidates` and ask which one. Never pick for the user.
57
+ - `NOT_FOUND`: nothing matches, or the caller cannot see it.
58
+ - `NOT_SIGNED_IN`: ask the user to run `hr login` or set `HR_AGENT_KEY`.
59
+ - `APP_FORBIDDEN`: the caller lacks the permission and this action cannot be approved. It is granted in IAM.
60
+ - `APP_CONFLICT`: the state changed, for example the candidate was already screened. List again.
61
+
62
+ ## When an action needs approval
63
+
64
+ Permissions decide everything, for a person and an Agent alike. With the permission an action runs at once. Without it, a person decides in IAM, and the command answers:
65
+
66
+ ```json
67
+ { "ok": true, "data": { "pendingApproval": { "approvalId": "…", "actionId": "…" } } }
68
+ ```
69
+
70
+ **The action has not happened yet.** Do not say the candidate was rejected. Tell the user it is waiting for approval in IAM, then check when asked, or wait:
71
+
72
+ ```bash
73
+ hr approvals status <approvalId> --wait --timeout 300
74
+ ```
75
+
76
+ `data.status` is `pending`, `executed` (approved and done), `rejected` (denied or expired) or `failed` (see `data.error`).
77
+
78
+ ## Rules
79
+
80
+ - Passing or rejecting changes a real candidate's process. Do it only when the user clearly asked, about a specific person.
81
+ - Candidate data is personal. Only share what the user needs, and never send it elsewhere.
82
+ - Report what the output says. Do not infer a result the command did not return.
package/README.md CHANGED
@@ -1,3 +1,24 @@
1
- # Temporary Holding Version
1
+ # @springbrand/hr-cli
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The `hr` command for SpringBrand HR, for people and Agents. Output is JSON on stdout.
4
+
5
+ ```bash
6
+ npm i -g @springbrand/hr-cli
7
+ export HR_API_URL=https://your-hr-address
8
+ hr login
9
+ hr screening list
10
+ ```
11
+
12
+ ## Configuration
13
+
14
+ | Setting | Required | Meaning |
15
+ | --- | --- | --- |
16
+ | `HR_API_URL` or `--api-url` | Yes | HR's address. `--api-url` wins. |
17
+ | `HR_AGENT_KEY` | No | An Agent key from IAM. When set, it is used instead of `hr login`. |
18
+ | `IAM_URL` | No | IAM's address. By default HR reports it. |
19
+ | `HR_CONFIG_DIR` | No | Where `hr login` stores its token. Default `~/.config/saas-hr`. |
20
+ | `XDG_CONFIG_HOME` | No | Moves the default to `$XDG_CONFIG_HOME/saas-hr`. |
21
+
22
+ Talents and applications in the output carry `url`, their page in the HR console, on the address HR reports.
23
+
24
+ `hr --help` lists the commands. Agents: see `.agents/skills/saas-hr-cli/SKILL.md`.
package/dist/hr.js ADDED
@@ -0,0 +1,314 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/bin.ts
4
+ import { spawn } from "node:child_process";
5
+
6
+ // src/run.ts
7
+ import { parseArgs } from "node:util";
8
+
9
+ // src/client.ts
10
+ import { chmod, mkdir, readFile, rm, writeFile } from "node:fs/promises";
11
+ import { homedir } from "node:os";
12
+ import path from "node:path";
13
+ var CliError = class extends Error {
14
+ constructor(code, message, details) {
15
+ super(message);
16
+ this.code = code;
17
+ this.details = details;
18
+ }
19
+ code;
20
+ details;
21
+ };
22
+ var credentialsFile = (env) => path.join(env.HR_CONFIG_DIR ?? path.join(env.XDG_CONFIG_HOME ?? path.join(homedir(), ".config"), "saas-hr"), "credentials.json");
23
+ async function readStored(env) {
24
+ try {
25
+ return JSON.parse(await readFile(credentialsFile(env), "utf8"));
26
+ } catch {
27
+ return {};
28
+ }
29
+ }
30
+ async function unwrap(response, what) {
31
+ const text = await response.text();
32
+ let body;
33
+ try {
34
+ body = text ? JSON.parse(text) : null;
35
+ } catch {
36
+ throw new CliError("BAD_RESPONSE", `${what} did not answer with JSON (HTTP ${response.status})`);
37
+ }
38
+ if (!response.ok || body?.success === false) throw new CliError(body?.code ?? `HTTP_${response.status}`, body?.errMsg ?? `${what} answered HTTP ${response.status}`);
39
+ return body?.msg ?? body;
40
+ }
41
+ var Hr = class {
42
+ constructor(deps, apiUrl) {
43
+ this.deps = deps;
44
+ const url = apiUrl ?? deps.env.HR_API_URL;
45
+ if (!url) throw new CliError("CONFIG_MISSING", "Set HR_API_URL to this deployment's HR address, or pass --api-url");
46
+ this.apiUrl = url.replace(/\/+$/, "");
47
+ }
48
+ deps;
49
+ apiUrl;
50
+ deployment = null;
51
+ bearer = null;
52
+ async send(url, init, what) {
53
+ try {
54
+ return await this.deps.fetch(url, init);
55
+ } catch (cause) {
56
+ throw new CliError("NETWORK", `Could not reach ${what} at ${url}: ${cause instanceof Error ? cause.message : String(cause)}`);
57
+ }
58
+ }
59
+ /** Learned from HR so a change of domain only needs HR_API_URL. IAM_URL overrides it. */
60
+ async config() {
61
+ this.deployment ??= await unwrap(await this.send(`${this.apiUrl}/api/cli/config`, {}, "HR"), "HR");
62
+ return this.deployment;
63
+ }
64
+ async token() {
65
+ if (this.bearer) return this.bearer;
66
+ const key = this.deps.env.HR_AGENT_KEY;
67
+ if (key) {
68
+ const iam = (this.deps.env.IAM_URL ?? (await this.config()).iamOrigin).replace(/\/+$/, "");
69
+ const issued = await unwrap(await this.send(`${iam}/api/v1/agent/token`, { method: "POST", headers: { Authorization: `Bearer ${key}` } }, "IAM"), "IAM");
70
+ this.bearer = issued.accessToken;
71
+ return this.bearer;
72
+ }
73
+ const stored = (await readStored(this.deps.env))[this.apiUrl];
74
+ if (!stored) throw new CliError("NOT_SIGNED_IN", "Run `hr login`, or set HR_AGENT_KEY to an Agent key from IAM");
75
+ if (stored.expiresAt * 1e3 <= Date.now()) throw new CliError("NOT_SIGNED_IN", "The sign-in has expired. Run `hr login` again");
76
+ this.bearer = stored.token;
77
+ return this.bearer;
78
+ }
79
+ /** The console's address, as HR reports it, so page links never guess a domain. */
80
+ async appOrigin() {
81
+ return (await this.config()).appOrigin.replace(/\/+$/, "");
82
+ }
83
+ get(pathname, query = {}) {
84
+ const url = new URL(`${this.apiUrl}/api/v1${pathname}`);
85
+ for (const [name, value] of Object.entries(query)) if (value !== void 0 && value !== "") url.searchParams.set(name, String(value));
86
+ return this.request(url.toString(), { method: "GET" });
87
+ }
88
+ post(pathname, body) {
89
+ return this.request(`${this.apiUrl}/api/v1${pathname}`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(body) });
90
+ }
91
+ async request(url, init) {
92
+ const token = await this.token();
93
+ return unwrap(await this.send(url, { ...init, headers: { ...init.headers, Authorization: `Bearer ${token}` } }, "HR"), "HR");
94
+ }
95
+ /** The last step of `hr login`; no credential exists yet. */
96
+ async redeem(code, verifier) {
97
+ const response = await this.send(`${this.apiUrl}/api/cli/token`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ code, verifier }) }, "HR");
98
+ const issued = await unwrap(response, "HR");
99
+ const file = credentialsFile(this.deps.env);
100
+ await mkdir(path.dirname(file), { recursive: true, mode: 448 });
101
+ await writeFile(file, JSON.stringify({ ...await readStored(this.deps.env), [this.apiUrl]: issued }, null, 2), { mode: 384 });
102
+ await chmod(file, 384);
103
+ return { name: issued.name, expiresAt: new Date(issued.expiresAt * 1e3).toISOString() };
104
+ }
105
+ async logout() {
106
+ const stored = await readStored(this.deps.env);
107
+ const signedOut = this.apiUrl in stored;
108
+ delete stored[this.apiUrl];
109
+ const file = credentialsFile(this.deps.env);
110
+ if (Object.keys(stored).length) await writeFile(file, JSON.stringify(stored, null, 2), { mode: 384 });
111
+ else await rm(file, { force: true });
112
+ return { signedOut };
113
+ }
114
+ };
115
+
116
+ // src/login.ts
117
+ import { createHash, randomBytes } from "node:crypto";
118
+ import { createServer } from "node:http";
119
+ var TimeoutMs = 5 * 60 * 1e3;
120
+ var page = (text) => `<!doctype html><meta charset="utf-8"><title>SpringBrand HR</title><p style="font:16px system-ui;margin:4rem;text-align:center">${text}</p>`;
121
+ async function login(hr, deps, openBrowser2 = true) {
122
+ const state = randomBytes(24).toString("base64url");
123
+ const verifier = randomBytes(32).toString("base64url");
124
+ const challenge = createHash("sha256").update(verifier).digest("base64url");
125
+ const { appOrigin } = await hr.config();
126
+ let settle = () => void 0;
127
+ const received = new Promise((resolve) => settle = resolve);
128
+ const server = createServer((request, response) => {
129
+ const url = new URL(request.url ?? "/", "http://127.0.0.1");
130
+ if (url.pathname !== "/callback") return response.writeHead(404).end();
131
+ const code = url.searchParams.get("code");
132
+ const valid = Boolean(code) && url.searchParams.get("state") === state;
133
+ response.writeHead(valid ? 200 : 400, { "Content-Type": "text/html; charset=utf-8", Connection: "close" }).end(page(valid ? "\u767B\u5F55\u6210\u529F\uFF0C\u53EF\u4EE5\u5173\u95ED\u8FD9\u4E2A\u9875\u9762\u3002Signed in. You can close this page." : "\u767B\u5F55\u5931\u8D25\u3002Sign-in failed."));
134
+ settle(valid ? code : new CliError("LOGIN_FAILED", "The browser sent back an invalid sign-in"));
135
+ });
136
+ await new Promise((resolve) => server.listen(0, "127.0.0.1", resolve));
137
+ const timer = setTimeout(() => settle(new CliError("LOGIN_TIMEOUT", "Nobody approved the sign-in within 5 minutes")), TimeoutMs);
138
+ try {
139
+ const target = new URL(`${appOrigin}/cli-login`);
140
+ target.searchParams.set("port", String(server.address().port));
141
+ target.searchParams.set("state", state);
142
+ target.searchParams.set("challenge", challenge);
143
+ deps.stderr(`Approve the sign-in in your browser: ${target}`);
144
+ if (openBrowser2) deps.openBrowser(target.toString());
145
+ const result = await received;
146
+ if (result instanceof Error) throw result;
147
+ return await hr.redeem(result, verifier);
148
+ } finally {
149
+ clearTimeout(timer);
150
+ server.closeAllConnections();
151
+ server.close();
152
+ }
153
+ }
154
+
155
+ // src/resolve.ts
156
+ var Uuid = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
157
+ var isId = (value) => Uuid.test(value);
158
+ function pickOne(items, query, names, describe, what) {
159
+ const wanted = query.trim().toLowerCase();
160
+ const values = (item) => names(item).filter(Boolean).map((name) => name.toLowerCase());
161
+ const exact = items.filter((item) => values(item).includes(wanted));
162
+ const matches = exact.length ? exact : items.filter((item) => values(item).some((name) => name.includes(wanted)));
163
+ if (matches.length === 1) return matches[0];
164
+ if (!matches.length) throw new CliError("NOT_FOUND", `No ${what} matches "${query}"`, { candidates: items.slice(0, 20).map(describe) });
165
+ throw new CliError("AMBIGUOUS", `${matches.length} ${what}s match "${query}"; use an id or narrow it down`, { candidates: matches.slice(0, 20).map(describe) });
166
+ }
167
+
168
+ // src/run.ts
169
+ var Help = `hr: SpringBrand HR from the command line. Output is JSON on stdout.
170
+
171
+ Setup
172
+ HR_API_URL this deployment's HR address (or --api-url)
173
+ HR_AGENT_KEY an Agent key from IAM; without it, run \`hr login\`
174
+ IAM_URL optional; by default HR says where IAM is
175
+
176
+ Commands
177
+ hr login [--no-browser] | logout | whoami
178
+ hr jobs list [--status open]
179
+ hr talents search [text] [--job <job>] [--page n] [--page-size n]
180
+ hr talents show <name|id>
181
+ hr screening list [--job <job>]
182
+ hr screening pass <name|id> [--job <job>]
183
+ hr screening reject <name|id> --reason <reason> [--job <job>]
184
+ hr interviews to-schedule [--job <job>]
185
+ hr reasons list
186
+ hr approvals status <id> [--wait] [--timeout seconds]
187
+
188
+ Talents and applications carry url, their page in the HR console.
189
+ A command without the permission answers with data.pendingApproval: a person decides in IAM.`;
190
+ var options = {
191
+ "api-url": { type: "string" },
192
+ job: { type: "string" },
193
+ status: { type: "string" },
194
+ reason: { type: "string" },
195
+ page: { type: "string" },
196
+ "page-size": { type: "string" },
197
+ wait: { type: "boolean" },
198
+ "no-browser": { type: "boolean" },
199
+ timeout: { type: "string" },
200
+ help: { type: "boolean", short: "h" }
201
+ };
202
+ async function linked(hr, records, page2) {
203
+ const origin = await hr.appOrigin();
204
+ return records.map((record) => ({ ...record, url: `${origin}/${page2}/${record.id}` }));
205
+ }
206
+ async function linkedPage(hr, result, page2) {
207
+ return { ...result, items: await linked(hr, result.items, page2) };
208
+ }
209
+ async function linkedTalent(hr, id) {
210
+ const talent = await hr.get(`/talents/${id}`);
211
+ const [withUrl] = await linked(hr, [talent], "talents");
212
+ return { ...withUrl, ...talent.applications ? { applications: await linked(hr, talent.applications, "applications") } : {} };
213
+ }
214
+ async function jobId(hr, job) {
215
+ if (!job || isId(job)) return job;
216
+ const jobs = await hr.get("/jobs");
217
+ return pickOne(jobs, job, (entry) => [entry.slug, entry.title], (entry) => ({ id: entry.id, title: entry.title, status: entry.status }), "job").id;
218
+ }
219
+ var screeningQueue = async (hr, job) => hr.get("/applications", { queue: "screening", jobId: await jobId(hr, job), pageSize: 200 });
220
+ async function screeningApplication(hr, who, job) {
221
+ if (isId(who)) return who;
222
+ const queue = await screeningQueue(hr, job);
223
+ return pickOne(queue.items, who, (item) => [item.talentName], (item) => ({ id: item.id, talent: item.talentName, job: item.jobTitle }), "candidate waiting for screening").id;
224
+ }
225
+ async function rejectReason(hr, reason) {
226
+ if (!reason) throw new CliError("USAGE", "Pass --reason; `hr reasons list` shows them");
227
+ if (isId(reason)) return reason;
228
+ const reasons = (await hr.get("/reject-reasons")).filter((entry) => entry.category === "we_rejected");
229
+ return pickOne(reasons, reason, (entry) => [entry.name], (entry) => ({ id: entry.id, name: entry.name }), "reject reason").id;
230
+ }
231
+ async function approvalStatus(hr, deps, id, wait, timeoutSeconds) {
232
+ const deadline = Date.now() + timeoutSeconds * 1e3;
233
+ for (; ; ) {
234
+ const outcome = await hr.get(`/approvals/${encodeURIComponent(id)}`);
235
+ if (!wait || outcome.status !== "pending" || Date.now() >= deadline) return outcome;
236
+ await deps.sleep(5e3);
237
+ }
238
+ }
239
+ async function dispatch(args, deps) {
240
+ const { values, positionals } = parseArgs({ args, options, allowPositionals: true });
241
+ const [group, action, ...rest] = positionals;
242
+ const hr = new Hr(deps, values["api-url"]);
243
+ const page2 = { page: values.page, pageSize: values["page-size"] };
244
+ const needed = (name, value) => {
245
+ if (!value) throw new CliError("USAGE", `Missing ${name}. Run \`hr --help\``);
246
+ return value;
247
+ };
248
+ switch (`${group} ${action ?? ""}`.trim()) {
249
+ case "login":
250
+ return login(hr, deps, !values["no-browser"]);
251
+ case "logout":
252
+ return hr.logout();
253
+ case "whoami":
254
+ return hr.get("/me");
255
+ case "jobs list":
256
+ return hr.get("/jobs", { status: values.status });
257
+ case "talents search":
258
+ return linkedPage(hr, await hr.get("/talents", { q: rest.join(" ") || void 0, jobId: await jobId(hr, values.job), ...page2 }), "talents");
259
+ case "talents show": {
260
+ const who = needed("a name or id", rest.join(" "));
261
+ if (isId(who)) return linkedTalent(hr, who);
262
+ const found = await hr.get("/talents", { q: who, pageSize: 50 });
263
+ return linkedTalent(hr, pickOne(found.items, who, (item) => [item.displayName], (item) => ({ id: item.id, name: item.displayName, headline: item.headline }), "talent").id);
264
+ }
265
+ case "screening list":
266
+ return linkedPage(hr, await screeningQueue(hr, values.job), "applications");
267
+ case "screening pass":
268
+ return hr.post(`/applications/${await screeningApplication(hr, needed("a candidate", rest.join(" ")), values.job)}/screening`, { decision: "pass" });
269
+ case "screening reject": {
270
+ const id = await screeningApplication(hr, needed("a candidate", rest.join(" ")), values.job);
271
+ return hr.post(`/applications/${id}/screening`, { decision: "reject", reasonId: await rejectReason(hr, values.reason) });
272
+ }
273
+ case "interviews to-schedule":
274
+ return linkedPage(hr, await hr.get("/applications", { queue: "to_schedule", jobId: await jobId(hr, values.job), ...page2 }), "applications");
275
+ case "reasons list":
276
+ return hr.get("/reject-reasons");
277
+ case "approvals status":
278
+ return approvalStatus(hr, deps, needed("an approval id", rest[0]), Boolean(values.wait), Number(values.timeout ?? 300));
279
+ default:
280
+ throw new CliError("USAGE", `Unknown command: ${positionals.join(" ") || "(none)"}. Run \`hr --help\``);
281
+ }
282
+ }
283
+ async function run(args, deps) {
284
+ if (!args.length || args.includes("--help") || args.includes("-h")) {
285
+ deps.stdout(Help);
286
+ return 0;
287
+ }
288
+ try {
289
+ deps.stdout(JSON.stringify({ ok: true, data: await dispatch(args, deps) }, null, 2));
290
+ return 0;
291
+ } catch (error) {
292
+ const known = error instanceof CliError;
293
+ const usage = known && error.code === "USAGE" || error.code?.startsWith("ERR_PARSE_ARGS") === true;
294
+ const code = usage ? "USAGE" : known ? error.code : "INTERNAL";
295
+ deps.stdout(JSON.stringify({ ok: false, error: { code, message: error instanceof Error ? error.message : String(error), ...known ? error.details : {} } }, null, 2));
296
+ return usage ? 2 : 1;
297
+ }
298
+ }
299
+
300
+ // src/bin.ts
301
+ function openBrowser(url) {
302
+ const [command, args] = process.platform === "darwin" ? ["open", [url]] : process.platform === "win32" ? ["cmd", ["/c", "start", "", url]] : ["xdg-open", [url]];
303
+ spawn(command, args, { stdio: "ignore", detached: true }).on("error", () => void 0).unref();
304
+ }
305
+ process.exitCode = await run(process.argv.slice(2), {
306
+ env: process.env,
307
+ fetch,
308
+ stdout: (text) => process.stdout.write(`${text}
309
+ `),
310
+ stderr: (text) => process.stderr.write(`${text}
311
+ `),
312
+ sleep: (ms) => new Promise((resolve) => setTimeout(resolve, ms)),
313
+ openBrowser
314
+ });
package/package.json CHANGED
@@ -1,6 +1,38 @@
1
1
  {
2
2
  "name": "@springbrand/hr-cli",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.2.0",
4
+ "description": "SpringBrand HR from the command line, for people and Agents.",
5
+ "license": "UNLICENSED",
6
+ "type": "module",
7
+ "bin": {
8
+ "hr": "dist/hr.js"
9
+ },
10
+ "files": [
11
+ "dist",
12
+ ".agents",
13
+ "README.md"
14
+ ],
15
+ "engines": {
16
+ "node": ">=24"
17
+ },
18
+ "publishConfig": {
19
+ "access": "public",
20
+ "registry": "https://registry.npmjs.org/"
21
+ },
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "git+ssh://git@github.com/springbrand-lab/saas-hr.git",
25
+ "directory": "packages/cli"
26
+ },
27
+ "devDependencies": {
28
+ "@types/node": "^24.13.3",
29
+ "esbuild": "^0.27.4",
30
+ "typescript": "^7.0.2",
31
+ "vitest": "^4.1.10"
32
+ },
33
+ "scripts": {
34
+ "build": "esbuild src/bin.ts --bundle --platform=node --format=esm --target=node24 --outfile=dist/hr.js --banner:js=\"#!/usr/bin/env node\"",
35
+ "check": "tsc --noEmit",
36
+ "test": "vitest run"
37
+ }
6
38
  }