Skip to content

feat(boss): add ask-resume (#1068)#1377

Open
can4hou6joeng4 wants to merge 1 commit into
jackwener:mainfrom
can4hou6joeng4:feat/boss-ask-resume-1068
Open

feat(boss): add ask-resume (#1068)#1377
can4hou6joeng4 wants to merge 1 commit into
jackwener:mainfrom
can4hou6joeng4:feat/boss-ask-resume-1068

Conversation

@can4hou6joeng4
Copy link
Copy Markdown

Closes #1068.

What this adds

A new recruiter-side command that triggers the 求简历 (request attachment resume) action — the same button BOSS Zhipin's web UI exposes in the candidate panel.

boss ask-resume <uid>
boss ask-resume <uid> --job-id <encrypted_job_id>

One-line endpoint extension, not a new wapi route

clis/boss/exchange.js already calls POST /wapi/zpchat/exchange/request with type=1 (phone) and type=2 (wechat). The 求简历 action hits the same endpoint with type=3. This was reverse-engineered and verified in production by boss-agent-cli (Python) — see recruiter_client.py exchange_request().

⚠️ Why this is Draft — one open schema question

I left a comment on #1068 laying out three options:

Field convention type securityId uniqueId name uid jobId gid
OpenCLI exchange.js (current)
boss-agent-cli (verified for type=3)

This PR currently sends the union of both schemas (option A — defensive). Will rewrite to:

  • B — drop uid / gid, keep jobId, OpenCLI-style fields only
  • C — extend exchange.js with --type resume instead of new file

within ~30 min once a maintainer picks. Marking this PR as Draft until then.

What's tested

  • clis/boss/ask-resume.js — 62 lines, follows invite.js template
  • clis/boss/ask-resume.test.js — 99 lines, 5 cases:
    1. registers under boss/ask-resume key
    2. main path: type=3 POST with all fields, returns success row
    3. --job-id overrides friend.encryptJobId fallback
    4. greet-list fallback when not in chat list
    5. throws clear 未找到该候选人 error on not-found
$ npx vitest run --project adapter clis/boss/
 Test Files  2 passed (2)
      Tests  9 passed (9)        ← search.test.js (4) + ask-resume.test.js (5)
   Duration  1.10s

$ npm run typecheck
(clean)

cli-manifest.json auto-picks up ('boss', 'ask-resume') as the new entry.

Checklist

  • Endpoint reuse documented (no new wapi route)
  • Tests cover happy path + fallback + error case
  • Typecheck clean
  • Manifest regenerates correctly
  • No regression on existing boss/search.test.js
  • Field schema confirmed by maintainer ← blocking for ready-for-review

@T-Programmer @Astro-Han @jackwener

Adds a new recruiter-side command that triggers the "求简历"
(request attachment resume) action via POST /wapi/zpchat/exchange/request
with type=3 — the same endpoint exchange.js already uses for type=1 (phone)
and type=2 (wechat).

Field schema sends the union of OpenCLI's existing exchange.js convention
(securityId / uniqueId / name) and boss-agent-cli's verified type=3
convention (uid / jobId / gid). Marked Draft pending maintainer choice
on which schema to keep long-term — see issue thread for A/B/C options.

Tests: 5 cases covering registration, main path, --job-id override,
greet-list fallback, and not-found error. typecheck clean. Manifest
auto-regenerates with the new ('boss', 'ask-resume') entry.
@can4hou6joeng4 can4hou6joeng4 marked this pull request as ready for review May 7, 2026 03:45
@can4hou6joeng4 can4hou6joeng4 marked this pull request as draft May 7, 2026 03:58
@can4hou6joeng4 can4hou6joeng4 marked this pull request as ready for review May 8, 2026 02:07
@GreyC
Copy link
Copy Markdown
Contributor

GreyC commented May 13, 2026

Related but separate BOSS adapter issue: #1536. This PR addresses ask-resume (#1068); #1536 tracks job-seeker-side chatlist/chatmsg support and should not be treated as a replacement for this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: BOSS直聘能否添加一个求简历的操作

2 participants