@springbrand/hr-cli 0.5.0 → 0.6.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/.agents/skills/saas-hr-cli/SKILL.md +11 -0
- package/README.md +1 -2
- package/dist/hr.js +16 -1
- package/package.json +1 -1
|
@@ -41,6 +41,17 @@ The rules below are what the help cannot tell you.
|
|
|
41
41
|
- Answer a reply only when the user asks, with the user's own words or a draft they approved. Mailing the candidate marks their replies dealt with.
|
|
42
42
|
- Submit an evaluation only for the user's own interview, with the verdict and reasons the user gave. Never choose a verdict for them.
|
|
43
43
|
|
|
44
|
+
## Telling people what happened (scheduled runs)
|
|
45
|
+
|
|
46
|
+
When a scheduled run asks you to pass on HR's news:
|
|
47
|
+
|
|
48
|
+
1. Run `hr events next`. Each item says who to tell (`notify`) and what to tell them (`message`, `url`).
|
|
49
|
+
2. Send each person in `notify` the `message` with the `url`, one direct message each, by their `principalId`, right away (not in a digest). Do not reword it into something else, and add no candidate contact details or resume content.
|
|
50
|
+
3. Then `hr events ack` every id you handled, including those with an empty `notify`. Confirm an event only after its messages went out; one you could not deliver stays for the next run.
|
|
51
|
+
4. While `remaining` is above 0, repeat. When nothing is left, stop without messaging anyone.
|
|
52
|
+
|
|
53
|
+
If a person in `notify` cannot be reached, note it in the run's result instead of retrying forever.
|
|
54
|
+
|
|
44
55
|
## What cannot be taken back
|
|
45
56
|
|
|
46
57
|
- Erasing a talent, merging two talents, deleting a mailbox, a pool, a tag or a job board rule, and removing or rotating the webhook are final. Do them only when the user asked for that exact record, after saying what will happen and hearing yes.
|
package/README.md
CHANGED
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
The `hr` command for SpringBrand HR, for people and Agents. Output is JSON on stdout.
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
npm i -g @springbrand/hr-cli
|
|
7
|
-
npm i -g @springbrand/hr-cli@alpha # the newest alpha, ahead of the deployed HR
|
|
6
|
+
npm i -g @springbrand/hr-cli
|
|
8
7
|
export HR_API_URL=https://your-hr-address
|
|
9
8
|
hr login
|
|
10
9
|
hr screening list
|
package/dist/hr.js
CHANGED
|
@@ -197,7 +197,8 @@ var Options = {
|
|
|
197
197
|
template: { type: "string" },
|
|
198
198
|
password: { type: "string" },
|
|
199
199
|
address: { type: "string" },
|
|
200
|
-
preset: { type: "string" }
|
|
200
|
+
preset: { type: "string" },
|
|
201
|
+
limit: { type: "string" }
|
|
201
202
|
};
|
|
202
203
|
function needed(name, value) {
|
|
203
204
|
if (!value) throw new CliError("USAGE", `Missing ${name}. Run \`hr --help\``);
|
|
@@ -499,6 +500,20 @@ var coreCommands = [
|
|
|
499
500
|
returns: "data: { id, type, displayName, email, jobTitle, departments, \u2026 }",
|
|
500
501
|
run: ({ hr, args }) => hr.get(`/people/${needed("a person id", args[0])}`)
|
|
501
502
|
},
|
|
503
|
+
{
|
|
504
|
+
name: "events next",
|
|
505
|
+
usage: "hr events next [--limit n]",
|
|
506
|
+
does: "What happened in HR that someone should hear about, oldest first, from the first time the caller asked (no backlog): each event with the people to tell and the message to send them. Events stay until confirmed with `hr events ack`, so nothing is lost if a run stops halfway. Needs \u67E5\u770B\u6295\u9012 on all applications. Limit defaults to 20, at most 100.",
|
|
507
|
+
returns: "data: { items: [{ id, type, at, payload, notify: [{ principalId, role recruiter|hiring_manager|interviewer|next_interviewer|named, name, email }], message, url }], remaining }. An empty notify means nobody needs telling: just confirm it. remaining is how many more wait after this page.",
|
|
508
|
+
run: ({ hr, values }) => hr.get("/events/next", { limit: values.limit })
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
name: "events ack",
|
|
512
|
+
usage: "hr events ack <event id>[,<event id>\u2026]",
|
|
513
|
+
does: "Confirm events as handled (told everyone in notify, or nothing to tell), so `hr events next` does not return them again. Up to 100 ids.",
|
|
514
|
+
returns: "data: { confirmed }",
|
|
515
|
+
run: ({ hr, args }) => hr.post("/events/ack", { ids: list(needed("event ids", args.join(","))) })
|
|
516
|
+
},
|
|
502
517
|
{
|
|
503
518
|
name: "approvals status",
|
|
504
519
|
usage: "hr approvals status <id> [--wait] [--timeout seconds]",
|