@springbrand/hr-cli 0.5.0 → 0.6.1

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.
@@ -28,7 +28,8 @@ The rules below are what the help cannot tell you.
28
28
 
29
29
  ## Interviews, meetings and calendars
30
30
 
31
- - HR connects to no meeting platform or calendar. When the user wants an online interview, first create the meeting with the tool you have for the user (Feishu, Tencent Meeting, Zoom…), then book it in HR with that meeting's link (and its ID) as the place. For an in-person interview, pass the address.
31
+ - When the user asks to invite a candidate to an interview, book it in HR: HR mails the invitation itself. You need the time and whether it is online or in person; if the user did not say which, ask.
32
+ - HR connects to no meeting platform or calendar. For an online interview, unless the user names another platform or gives a link, create a Feishu meeting first with `lark-cli` (read `lark-cli skills read lark-calendar` once): `lark-cli calendar +create --as bot` at that time, titled with the candidate and the round, with the interviewers as attendees (it comes with a video meeting); then `lark-cli calendar +get --as bot` on that event for the meeting's join link, `https://…/j/<number>`. Book it in HR with that link (`--online`) and the number (`--code`) as the place. Never use the event's own link or a share link: the candidate cannot join with it. Never reuse the link of another interview, even a cancelled one. If no join link came back, tell the user instead of booking without one. For an in-person interview, pass the address.
32
33
  - Booking (and moving) an interview may mail the candidate an invitation with the time, place and link, when the job's stage is set to. Say so to the user only when `data.invite` says it was sent; `pendingApproval` there means the invitation waits for a person in IAM, though the interview is booked.
33
34
  - HR then waits for the candidate's answer, reminds them and gives up on its own, as the stage says. Never mail the candidate a second invitation yourself.
34
35
  - When an interview moves or is cancelled, change HR first (`reschedule`, `cancel`), then the meeting and any calendar event.
@@ -41,6 +42,17 @@ The rules below are what the help cannot tell you.
41
42
  - 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
43
  - 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
44
 
45
+ ## Telling people what happened (scheduled runs)
46
+
47
+ When a scheduled run asks you to pass on HR's news:
48
+
49
+ 1. Run `hr events next`. Each item says who to tell (`notify`) and what to tell them (`message`, `url`).
50
+ 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.
51
+ 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.
52
+ 4. While `remaining` is above 0, repeat. When nothing is left, stop without messaging anyone.
53
+
54
+ If a person in `notify` cannot be reached, note it in the run's result instead of retrying forever.
55
+
44
56
  ## What cannot be taken back
45
57
 
46
58
  - 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 # the stable release
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]",
@@ -785,7 +800,7 @@ var recruitingCommands = [
785
800
  {
786
801
  name: "interviews schedule",
787
802
  usage: "hr interviews schedule <name|id> --start <time> [--end <time> | --minutes n] (--online <link> [--code <meeting id>] | --offline <address>) [--with <people>] [--job <job>]",
788
- does: "Book an interview for a candidate waiting in `hr interviews to-schedule` (or an application id). <time> is ISO 8601 with its UTC offset, such as 2026-11-12T15:00+08:00. Length defaults to 60 minutes. Where: --online with the meeting link from any platform (Feishu, Tencent Meeting, Zoom\u2026; create the meeting first with your calendar tool) and optionally its meeting ID, or --offline with the address. <people> are interviewers, comma-separated names, emails or ids from `hr people search`; leave it out to use the stage's default interviewers, or else the job's interviewers. When the stage is set to, HR mails the candidate the invitation (time, place, link) in their thread and waits for their answer; it puts nothing on any calendar.",
803
+ does: "Book an interview for a candidate waiting in `hr interviews to-schedule` (or an application id). <time> is ISO 8601 with its UTC offset, such as 2026-11-12T15:00+08:00. Length defaults to 60 minutes. Where: --online with the join link (and --code the number) of a meeting created for this interview, on any platform (for Feishu, create it with `lark-cli` as the saas-hr-cli skill says), or --offline with the address. Never reuse the link of another interview, even a cancelled one: every change mails the candidate again. <people> are interviewers, comma-separated names, emails or ids from `hr people search`; leave it out to use the stage's default interviewers, or else the job's interviewers. When the stage is set to, HR mails the candidate the invitation (time, place, link) in their thread and waits for their answer; it puts nothing on any calendar.",
789
804
  returns: `${InterviewReturns.slice(0, -1)}, ${InviteReturns}`,
790
805
  example: 'hr interviews schedule "Li Wei" --start 2026-11-12T15:00+08:00 --online https://vc.feishu.cn/j/324385898 --code "324 385 898"',
791
806
  run: async (ctx) => {
@@ -824,7 +839,7 @@ var recruitingCommands = [
824
839
  {
825
840
  name: "interviews reschedule",
826
841
  usage: "hr interviews reschedule <interview id> [--start <time>] [--end <time> | --minutes n] [--online <link> [--code <meeting id>] | --offline <address>]",
827
- does: "Move or relocate an interview. A new --start keeps the length unless --end or --minutes is given. A new time or place mails the candidate the invitation again and asks them to confirm again.",
842
+ does: "Move or relocate an interview. A new --start keeps the length unless --end or --minutes is given; a new time alone keeps the meeting link. A new time or place mails the candidate the invitation again and asks them to confirm again, so pass a new link only for a meeting created for this interview, never one from another interview.",
828
843
  returns: `${InterviewReturns.slice(0, -1)}, ${InviteReturns}`,
829
844
  run: async ({ hr, args, values }) => {
830
845
  const id = needed("an interview id", args[0]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@springbrand/hr-cli",
3
- "version": "0.5.0",
3
+ "version": "0.6.1",
4
4
  "description": "SpringBrand HR from the command line, for people and Agents.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",