@wport/cli 0.4.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/CHANGELOG.md +51 -4
- package/README.md +28 -0
- package/dist/index.js +906 -36
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,57 @@
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [0.6.0] — 2026-07-08
|
|
9
|
+
|
|
10
|
+
issue #106 實測回饋:讓 agent 更容易讀懂錯誤與能力邊界,不必踩裸 40x 才知道。
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **`enterprise jobs publish` 失敗明列缺欄**:BR-008 publish gate 回 400(`data.missing_fields`)時,錯誤訊息直接列出缺哪些欄位(如 `Missing required fields: work_hours, headcount`),並提示以 `jobs update` 補齊;不再只有翻譯後的中文一句話。
|
|
15
|
+
- **`enterprise jobs copy` 顯示 `incomplete_fields`**:複製 legacy 職缺(來源子表為空)時,人類模式印出 `⚠ Incomplete for publish — fill before \`jobs publish\`: …`;json 模式回應含 `incomplete_fields`。
|
|
16
|
+
- **`wport doctor` 新增「Enterprise talent scope」區塊**:明示 Enterprise API Key 僅存取「已投遞」人才庫(`talents list --tab visit` 尚未開放、回 400),且**無主動搜尋**——`/api/search-talent` 需互動式 JWT(企業模式)session,API Key → 401(設計如此,非設定錯誤)。
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- `enterprise talents` 群組說明對齊現況:applied pool only、無主動搜尋(詳見 `wport doctor`)。
|
|
21
|
+
|
|
22
|
+
### Notes
|
|
23
|
+
|
|
24
|
+
- 上述錯誤/邊界提示與後端無耦合,對任何後端版本皆生效;`incomplete_fields` 顯示需後端已含 issue #106 copy 回應擴充(已於 backend `main`)。
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## [0.5.0] — 2026-07-07
|
|
29
|
+
|
|
30
|
+
pm_41 企業 CLI 補完:人才庫、召募活動、公司資料、用量查詢,以及職缺複製/關閉。命令樹至此完整覆蓋 PRD §6.1 企業模式全部命令。
|
|
31
|
+
|
|
32
|
+
### Added
|
|
33
|
+
|
|
34
|
+
- `wport enterprise talents`:`list`(`--tab` / `--job` / `--keyword` / `--from` / `--to` / 分頁 / `--fields` / `--minimal`)、`view <enc_resume_id>`、`respond <enc_resume_id> --subject --body|--body-file`。強制分頁、PII 白名單、無 bulk export。
|
|
35
|
+
- `wport enterprise campaigns`:`list` / `view` / `create --file` / `update --file` / `publish` / `unpublish`(可逆,故無 `--confirm`;不開放 delete)。
|
|
36
|
+
- `wport enterprise company`:`view` / `update --file` / `logo upload`(v1 子集欄位;`uniform_number` 唯讀,update DTO 天然不含)。
|
|
37
|
+
- `wport enterprise usage`:查月配額與 rate limit 剩餘(`GET /api/v1/enterprise/usage`)。
|
|
38
|
+
- `wport enterprise jobs copy <enc_id>` / `jobs close <enc_id>`(close 為破壞性、需 `--confirm`);`jobs list` 新增統計欄位 `published_at` / `clicks_7d`(形狀向後相容)。
|
|
39
|
+
- 新增 `readTextInput()` helper:支援 `--body-file`(檔案或 `-` stdin)讀入純文字訊息內文。
|
|
40
|
+
|
|
41
|
+
### Notes
|
|
42
|
+
|
|
43
|
+
- 所有寫入命令自動產生 `Idempotency-Key`(可用 `--idempotency-key` 覆寫);破壞性寫入(`jobs delete` / `jobs close` / `jobs batch`)無 `--confirm` 一律本地 exit 2、不發請求。
|
|
44
|
+
- ⚠️ 需要後端已部署對應 pm_41 端點(talents / campaigns / company / usage / jobs copy·close)。對未部署環境會回 404。
|
|
45
|
+
|
|
46
|
+
## [0.4.0] — 2026-07-02
|
|
47
|
+
|
|
48
|
+
企業 API 金鑰治理 + 職缺寫入。
|
|
49
|
+
|
|
50
|
+
### Added
|
|
51
|
+
|
|
52
|
+
- `wport enterprise keys`:`list`(顯示 enc_id + 末 4 碼掩碼)、`rotate <enc_id>`(key-for-key 換發,`--reveal` 才顯示新明文全文、`--expiry-days` 設到期)。過期金鑰仍可用於 `rotate`。
|
|
53
|
+
- `wport enterprise jobs` 寫入全套:`create --file` / `update --file` / `publish` / `unpublish` / `delete`(需 `--confirm`)/ `batch --file`。
|
|
54
|
+
|
|
55
|
+
### Changed
|
|
56
|
+
|
|
57
|
+
- 修正 `enterprise-client` 的 401 提示:金鑰**過期**時引導 `wport enterprise keys rotate`(重 login 同一把過期 key 仍 401、解不了),撤銷/錯誤才引導 `login`。
|
|
58
|
+
|
|
8
59
|
## [0.2.2] — 2026-06-30
|
|
9
60
|
|
|
10
61
|
**無 CLI 邏輯/原始碼變動**(`src/` 行為與 0.2.1 相同),純清理打包進 npm 的文件死連結。registry 上 0.2.1 的 `repository` / `homepage` 與 README/CHANGELOG 仍指向私有 `W101-TalentSearchHub` repo(公開使用者點了 404),npm 已發布版本不可覆寫,故 bump PATCH 重新發布以覆蓋呈現。
|
|
@@ -36,10 +87,6 @@
|
|
|
36
87
|
- `--status published|unpublished` filter (mapped to the server's numeric contract; sending the
|
|
37
88
|
openapi.yaml string enum `active|inactive|deleted` is rejected at the CLI layer to prevent 400s).
|
|
38
89
|
|
|
39
|
-
## [Unreleased]
|
|
40
|
-
|
|
41
|
-
下一輪變更會寫在這裡。
|
|
42
|
-
|
|
43
90
|
---
|
|
44
91
|
|
|
45
92
|
## [0.1.3] — 2026-06-02
|
package/README.md
CHANGED
|
@@ -65,6 +65,34 @@ wport enterprise whoami
|
|
|
65
65
|
wport enterprise jobs list --status published
|
|
66
66
|
wport enterprise jobs view <enc_id>
|
|
67
67
|
|
|
68
|
+
# Create / update / publish jobs (writes are idempotent; destructive ops need --confirm)
|
|
69
|
+
wport enterprise jobs create --file new-job.json
|
|
70
|
+
wport enterprise jobs publish <enc_id>
|
|
71
|
+
wport enterprise jobs copy <enc_id>
|
|
72
|
+
wport enterprise jobs close <enc_id> --confirm
|
|
73
|
+
|
|
74
|
+
# View / update your company profile
|
|
75
|
+
wport enterprise company view
|
|
76
|
+
wport enterprise company update --file company-patch.json
|
|
77
|
+
wport enterprise company logo upload ./logo.png
|
|
78
|
+
|
|
79
|
+
# Talent pool: browse applicants and reply (no bulk export by design)
|
|
80
|
+
wport enterprise talents list --tab applied
|
|
81
|
+
wport enterprise talents view <enc_resume_id>
|
|
82
|
+
wport enterprise talents respond <enc_resume_id> --subject "Interview invite" --body-file reply.txt
|
|
83
|
+
|
|
84
|
+
# Recruitment campaigns
|
|
85
|
+
wport enterprise campaigns list --status open
|
|
86
|
+
wport enterprise campaigns create --file campaign.json
|
|
87
|
+
wport enterprise campaigns publish <enc_id>
|
|
88
|
+
|
|
89
|
+
# API key governance: list your keys, rotate an expired one in place
|
|
90
|
+
wport enterprise keys list
|
|
91
|
+
wport enterprise keys rotate <enc_id> --reveal
|
|
92
|
+
|
|
93
|
+
# Monthly quota + rate-limit headroom
|
|
94
|
+
wport enterprise usage
|
|
95
|
+
|
|
68
96
|
# Agent / CI friendly: no key on disk
|
|
69
97
|
WPORT_API_KEY=wpk_live_... wport enterprise jobs list --minimal --output json
|
|
70
98
|
|