makea-cli 0.2.0__tar.gz → 0.2.2__tar.gz

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.
Files changed (65) hide show
  1. {makea_cli-0.2.0 → makea_cli-0.2.2}/CHANGELOG.md +44 -0
  2. {makea_cli-0.2.0 → makea_cli-0.2.2}/PKG-INFO +22 -1
  3. {makea_cli-0.2.0 → makea_cli-0.2.2}/README.md +21 -0
  4. makea_cli-0.2.2/makea_cli/__init__.py +1 -0
  5. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/api_client.py +138 -0
  6. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/commands/brand/cmd.py +353 -0
  7. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/commands/factory/cmd.py +143 -0
  8. {makea_cli-0.2.0 → makea_cli-0.2.2}/pyproject.toml +1 -1
  9. {makea_cli-0.2.0 → makea_cli-0.2.2}/tests/golden_manifest.json +964 -68
  10. makea_cli-0.2.2/tests/test_persona_commands.py +411 -0
  11. makea_cli-0.2.0/makea_cli/__init__.py +0 -1
  12. makea_cli-0.2.0/tests/test_persona_commands.py +0 -210
  13. {makea_cli-0.2.0 → makea_cli-0.2.2}/.claude/skills/create-supplier-profile/SKILL.md +0 -0
  14. {makea_cli-0.2.0 → makea_cli-0.2.2}/.claude/skills/lark-cli-setup/SKILL.md +0 -0
  15. {makea_cli-0.2.0 → makea_cli-0.2.2}/.claude/skills/link-supplier-user/SKILL.md +0 -0
  16. {makea_cli-0.2.0 → makea_cli-0.2.2}/.claude/skills/makea-cli-setup/SKILL.md +0 -0
  17. {makea_cli-0.2.0 → makea_cli-0.2.2}/.claude/skills/payment-revenue-report/SKILL.md +0 -0
  18. {makea_cli-0.2.0 → makea_cli-0.2.2}/.claude/skills/supplier-user-id-migration/SKILL.md +0 -0
  19. {makea_cli-0.2.0 → makea_cli-0.2.2}/.gitignore +0 -0
  20. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea-collection-upload/SKILL.md +0 -0
  21. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea-collection-upload/scripts/create_products.py +0 -0
  22. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/__main__.py +0 -0
  23. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/auth_pkce.py +0 -0
  24. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/commands/__init__.py +0 -0
  25. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/commands/_util.py +0 -0
  26. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/commands/analytics/__init__.py +0 -0
  27. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/commands/analytics/cmd.py +0 -0
  28. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/commands/auth/__init__.py +0 -0
  29. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/commands/auth/cmd.py +0 -0
  30. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/commands/brand/__init__.py +0 -0
  31. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/commands/designer/__init__.py +0 -0
  32. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/commands/designer/cmd.py +0 -0
  33. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/commands/directory/__init__.py +0 -0
  34. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/commands/directory/cmd.py +0 -0
  35. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/commands/document/__init__.py +0 -0
  36. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/commands/document/cmd.py +0 -0
  37. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/commands/email/__init__.py +0 -0
  38. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/commands/email/cmd.py +0 -0
  39. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/commands/factory/__init__.py +0 -0
  40. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/commands/library/__init__.py +0 -0
  41. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/commands/library/cmd.py +0 -0
  42. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/commands/metrics/__init__.py +0 -0
  43. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/commands/metrics/cmd.py +0 -0
  44. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/commands/orders/__init__.py +0 -0
  45. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/commands/orders/cmd.py +0 -0
  46. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/commands/product/__init__.py +0 -0
  47. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/commands/product/cmd.py +0 -0
  48. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/commands/production/__init__.py +0 -0
  49. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/commands/production/cmd.py +0 -0
  50. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/commands/production/pricing_spec.py +0 -0
  51. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/commands/supplier/__init__.py +0 -0
  52. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/commands/supplier/cmd.py +0 -0
  53. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/config.py +0 -0
  54. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/errors.py +0 -0
  55. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/identity.py +0 -0
  56. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/main.py +0 -0
  57. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/output.py +0 -0
  58. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/posthog_client.py +0 -0
  59. {makea_cli-0.2.0 → makea_cli-0.2.2}/makea_cli/registry.py +0 -0
  60. {makea_cli-0.2.0 → makea_cli-0.2.2}/npm/makea-cli/README.md +0 -0
  61. {makea_cli-0.2.0 → makea_cli-0.2.2}/npm/makea-cli/makea-cli.mjs +0 -0
  62. {makea_cli-0.2.0 → makea_cli-0.2.2}/npm/makea-cli/package.json +0 -0
  63. {makea_cli-0.2.0 → makea_cli-0.2.2}/tests/test_output_contract.py +0 -0
  64. {makea_cli-0.2.0 → makea_cli-0.2.2}/tests/test_registry.py +0 -0
  65. {makea_cli-0.2.0 → makea_cli-0.2.2}/uv.lock +0 -0
@@ -1,5 +1,49 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.2
4
+
5
+ Order lifecycle, exposed in tiers rather than all at once.
6
+
7
+ - `ask` (an agent must put it in front of a person): `designer submit
8
+ sampling-order` (confirm a sample order), `designer submit production-order`,
9
+ `designer update production-order --complete|--links-file`, `designer update
10
+ shipping-order --confirm-receive`.
11
+ - `never` (an agent must not run it at all): `designer update sampling-order
12
+ --cancel`, `designer delete sampling-order` (DRAFT only, the backend enforces
13
+ that), `designer delete shipping-order` — the endpoint is named cancel but it
14
+ unlinks every production order and removes the shipment.
15
+
16
+ Cancel and delete are separate commands rather than flags on an `ask` one. The
17
+ grade is per command, so putting them on a milder command would launder a
18
+ destructive action through the wrong grade.
19
+
20
+ **The grade is advice to a harness, not a gate in the CLI.** A person in a
21
+ terminal runs any of these; `never` means an agent may not decide to.
22
+
23
+ Payments, bank transfers and subscriptions stay out of the CLI. The endpoints
24
+ exist, and a `--dry-run` would even make them look safe, but giving them a
25
+ command puts a charge one step away from an agent and no approval grade makes
26
+ that a good trade. A test asserts no write command reaches them.
27
+
28
+ ## 0.2.1
29
+
30
+ Each persona can now clear its own queue. `list task` and `list action` could show
31
+ you the work; nothing could close it.
32
+
33
+ - **designer**: `list action`, `update task --complete|--dismiss`,
34
+ `update action --acknowledge|--snooze DAYS|--dismiss`,
35
+ `update note --accept|--reject` (a task the assistant proposed),
36
+ `update proposal --note N` (apply one proposed spec change),
37
+ `update suggested-action -a note:action` (accept several at once, one write).
38
+ - **supplier**: `list task`, `list quote-edit-request`, `update task`, `update action`,
39
+ `update quote <rfq> <link> --file` (revise a quote already sent), and
40
+ `update rfq --status|--archive|--accept-terms` — a factory could submit a quote
41
+ but had no way to correct it or answer the invitation.
42
+
43
+ Acknowledging an action does not close it: an action is closed by the fact it asks
44
+ for. The help text says so, because the opposite assumption is easy to make and
45
+ produces a dashboard that lies.
46
+
3
47
  ## 0.2.0
4
48
 
5
49
  **The command names changed.** Every command is now `makea-cli <persona> <verb> <noun>`:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: makea-cli
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: Makea admin CLI (browser login + Makea admin HTTP API)
5
5
  Requires-Python: >=3.10
6
6
  Requires-Dist: click<9,>=8.1
@@ -79,6 +79,8 @@ makea-cli auth --logout
79
79
 
80
80
  每条命令都有的开关:`--describe` 打印它的机器可读定义(flags、副作用、审批档位);`--json` 强制纯 JSON(stdout 不是终端时默认就是)。读命令还有 `--fields a,b,c` 只保留这些字段;`list` 命令还有 `--limit N`(后端自己分页的就透传,不分页的在本地截断并在结果里写明 `truncated` / `returned` / `omitted`);写命令还有 `--dry-run`(打印将要发出的请求,不发)和 `--idempotency-key <k>`。`makea-cli --describe --json` 打印全量 manifest。
81
81
 
82
+ 写命令的**审批档位**(manifest 的 `approval`)是给 harness 的建议,不是 CLI 的门:`auto` 可以自动跑;`ask` 必须先让人确认;`never` agent 不许自己决定(人在终端照常能跑)。动钱的端点(payments / bank transfer / subscription)**故意不进 CLI**。
83
+
82
84
  exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不匹配 · `4` 后端拒绝(4xx,错误 JSON 在 stderr)· `5` 没跑完(5xx / 网络 / 超时)——读命令直接重试即可;**写命令可能已经生效了,重试前先读一遍状态**。
83
85
 
84
86
  0.1 的平铺命令名(`list-users`、`submit-supplier-quote` …)仍可用,作为隐藏的过渡别名转发到新命令并在 stderr 打一行提示;**下一个 minor 版本删除**。完整的改名对照表在 [CHANGELOG.md](CHANGELOG.md)。
@@ -147,6 +149,8 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
147
149
  | `makea-cli designer create product` | write(ask) | `POST /designer/product/create_or_update_product` | payload must match manufacture/specifications (all frontend fields; categories/subcategories + collection_id in --hel… | `designer-upsert-product` |
148
150
  | `makea-cli designer create rfq` | write(ask) | `POST /designer/product/send_rfq` | ask the chosen suppliers to quote on a product. --supplier repeats; --makea-sourcing also asks Makea to source. | — |
149
151
  | `makea-cli designer create sampling-order` | write(ask) | `POST /designer/sampling_orders` | order samples. --file is the full order payload (product_order_id, items, fees …); run --dry-run first and read the b… | — |
152
+ | `makea-cli designer delete sampling-order` | write(never) | `DELETE /designer/sampling_orders/{sampling_order_id}` | delete a DRAFT sample order. The backend refuses any other status. Graded `never`. | — |
153
+ | `makea-cli designer delete shipping-order` | write(never) | `POST /designer/shipping_orders/{shipping_order_id}/cancel` | the endpoint is called cancel but it unlinks every production order and removes the shipment, so it is a delete here.… | — |
150
154
  | `makea-cli designer download document` | read | `GET /designer/document/download` | save bytes for user_id + document_id (designer-authenticated; same query contract as admin document download). | `designer-download-document` |
151
155
  | `makea-cli designer get collection` | read | `GET /designer/collections/{collection_id}/overview` | one collection with its products, orders and lifecycle in a single read. | — |
152
156
  | `makea-cli designer get lifecycle` | read | `GET /designer/product_orders/{product_order_id}/lifecycle` | which stage this product is in. | — |
@@ -154,6 +158,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
154
158
  | `makea-cli designer get quote-advice` | read | `GET /designer/product/quote_advice` | which quote to award and why, from cache. Reading never spends a model call; the web app is what asks for a fresh one. | — |
155
159
  | `makea-cli designer get tech-pack` | read | `GET /designer/products/{product_id}/technical-specifications` | the product's tech pack. | — |
156
160
  | `makea-cli designer get tech-pack-history` | read | `GET /designer/products/{product_id}/specification-change-history` | who changed which spec field, when, and from what. | — |
161
+ | `makea-cli designer list action` | read | `GET /designer/actions` | the pending actions on you, optionally for one product. An action is closed by the fact it asks for, not by acknowled… | — |
157
162
  | `makea-cli designer list channel` | read | `GET /designer/products/{product_id}/channels` | the product's conversation channels. | — |
158
163
  | `makea-cli designer list collection` | read | `GET /designer/collections` | the brand's collections. | — |
159
164
  | `makea-cli designer list library-element` | read | `GET /designer/library_components` | the brand's own shelf (fabrics, trims, colours, artwork); --section narrows to one kind. | — |
@@ -166,7 +171,17 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
166
171
  | `makea-cli designer list task` | read | `GET /designer/tasks` | what the platform is waiting on you for. | — |
167
172
  | `makea-cli designer search note` | read | `GET /designer/products/{product_id}/channel_search` | full-text search across a product's conversation; --channel narrows to one channel key. | — |
168
173
  | `makea-cli designer set product-collection` | write(auto) | `POST /designer/products/{id}/link-to-collection` | assign product to a collection. | `designer-link-product-to-collection` |
174
+ | `makea-cli designer submit production-order` | write(ask) | `POST /designer/production_orders/{production_order_id}/submit` | submit a 大货 order. This is the commitment, so --dry-run and confirm with the user first. | — |
175
+ | `makea-cli designer submit sampling-order` | write(ask) | `POST /designer/sampling_orders/{sampling_order_id}/confirm` | confirm a sample order so the supplier starts. Run --dry-run first and read it back to the user. | — |
176
+ | `makea-cli designer update action` | write(auto) | `POST /designer/actions/{action_id}/{acknowledge\|snooze\|dismiss}` | respond to one of the pending actions from `designer list action`. An action is closed by the fact it asks for, not b… | — |
177
+ | `makea-cli designer update note` | write(ask) | `POST /designer/products/{product_id}/notes/{note_id}/{accept\|reject}` | decide on a task the assistant proposed on a product. | — |
169
178
  | `makea-cli designer update product` | write(auto) | `POST /designer/product/update_basic_info` | patch fields on a product. --cover-image / --back-image take a document id and are what the assistant's set_product_i… | — |
179
+ | `makea-cli designer update production-order` | write(ask) | `POST /designer/production_orders/{production_order_id}/complete` | POST /designer/production_orders/{id}/complete, or PUT the order to re-pick which supplier links it covers (--links-f… | — |
180
+ | `makea-cli designer update proposal` | write(ask) | `POST /designer/beeboo_proposals/approve` | apply one spec change the assistant proposed. This edits the pack, so read the proposal first. | — |
181
+ | `makea-cli designer update sampling-order` | write(never) | `POST /designer/sampling_orders/{sampling_order_id}/cancel` | cancel a sample order. Graded `never`: an agent must not do this on its own, a person runs it. | — |
182
+ | `makea-cli designer update shipping-order` | write(ask) | `POST /designer/shipping_orders/{shipping_order_id}/confirm_receive` | say the goods arrived. The backend accepts this only while the shipment is IN_TRANSIT. | — |
183
+ | `makea-cli designer update suggested-action` | write(ask) | `POST /designer/channels/{channel_id}/suggested_actions/bulk_accept` | accept several of a channel's suggested actions in one write. --action takes note_id:action_id and repeats. | — |
184
+ | `makea-cli designer update task` | write(auto) | `POST /designer/tasks/{complete\|dismiss}` | close one of the tasks from `designer list task`. Complete means you did it; dismiss means it does not apply. | — |
170
185
  | `makea-cli designer upload document` | write(auto) | `POST /designer/document/upload` | upload a file for the current designer token; optional product_id (omit to start a new draft id server-side). | `designer-upload-document` |
171
186
 
172
187
  ### `supplier`
@@ -183,8 +198,14 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
183
198
  | `makea-cli supplier list channel` | read | `GET /supplier/products/{product_id}/channels` | the channels you are part of on a product. | — |
184
199
  | `makea-cli supplier list note` | read | `GET /supplier/products/{product_id}/channels/{channel_key}/notes` | the conversation in one channel. | — |
185
200
  | `makea-cli supplier list production-order` | read | `GET /supplier/production_orders` | your production orders, optionally for one RFQ. | — |
201
+ | `makea-cli supplier list quote-edit-request` | read | `GET /supplier/quote_requests/{quote_request_id}/quote_edit_requests` | changes the brand has asked you to make to a quote you already sent. | — |
186
202
  | `makea-cli supplier list rfq` | read | `GET /supplier/quote_requests` | the RFQs (quote requests) sent to you. | — |
203
+ | `makea-cli supplier list task` | read | `GET /supplier/tasks` | your onboarding and per-order to-dos. | — |
187
204
  | `makea-cli supplier submit quote` | write(ask) | `POST /supplier/quote_requests/{id}/submit_quote` | submit your quote for an RFQ. --file is the supplier link payload as JSON (same shape the web form posts); run with -… | — |
205
+ | `makea-cli supplier update action` | write(auto) | `POST /supplier/actions/{action_id}/{acknowledge\|snooze}` | respond to a pending action. Acknowledging says you have seen it; the action still closes on the fact it asks for. | — |
206
+ | `makea-cli supplier update quote` | write(ask) | `POST /supplier/quote_requests/{quote_request_id}/links/{link_id}/edit` | revise a quote you already sent. --file is the same payload shape as submit; --dry-run first. | — |
207
+ | `makea-cli supplier update rfq` | write(ask) | `POST /supplier/quote_requests/{quote_request_id}/{status\|archive\|accept_terms}` | answer an RFQ. --status accepts or declines the invitation; --archive takes it off your board; --accept-terms accepts… | — |
208
+ | `makea-cli supplier update task` | write(auto) | `POST /supplier/tasks/{complete\|dismiss}` | close one of the tasks from `supplier list task`. | — |
188
209
 
189
210
  其它:`makea-cli auth [--logout]` 登录/登出;`makea-cli version` 版本号。
190
211
 
@@ -67,6 +67,8 @@ makea-cli auth --logout
67
67
 
68
68
  每条命令都有的开关:`--describe` 打印它的机器可读定义(flags、副作用、审批档位);`--json` 强制纯 JSON(stdout 不是终端时默认就是)。读命令还有 `--fields a,b,c` 只保留这些字段;`list` 命令还有 `--limit N`(后端自己分页的就透传,不分页的在本地截断并在结果里写明 `truncated` / `returned` / `omitted`);写命令还有 `--dry-run`(打印将要发出的请求,不发)和 `--idempotency-key <k>`。`makea-cli --describe --json` 打印全量 manifest。
69
69
 
70
+ 写命令的**审批档位**(manifest 的 `approval`)是给 harness 的建议,不是 CLI 的门:`auto` 可以自动跑;`ask` 必须先让人确认;`never` agent 不许自己决定(人在终端照常能跑)。动钱的端点(payments / bank transfer / subscription)**故意不进 CLI**。
71
+
70
72
  exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不匹配 · `4` 后端拒绝(4xx,错误 JSON 在 stderr)· `5` 没跑完(5xx / 网络 / 超时)——读命令直接重试即可;**写命令可能已经生效了,重试前先读一遍状态**。
71
73
 
72
74
  0.1 的平铺命令名(`list-users`、`submit-supplier-quote` …)仍可用,作为隐藏的过渡别名转发到新命令并在 stderr 打一行提示;**下一个 minor 版本删除**。完整的改名对照表在 [CHANGELOG.md](CHANGELOG.md)。
@@ -135,6 +137,8 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
135
137
  | `makea-cli designer create product` | write(ask) | `POST /designer/product/create_or_update_product` | payload must match manufacture/specifications (all frontend fields; categories/subcategories + collection_id in --hel… | `designer-upsert-product` |
136
138
  | `makea-cli designer create rfq` | write(ask) | `POST /designer/product/send_rfq` | ask the chosen suppliers to quote on a product. --supplier repeats; --makea-sourcing also asks Makea to source. | — |
137
139
  | `makea-cli designer create sampling-order` | write(ask) | `POST /designer/sampling_orders` | order samples. --file is the full order payload (product_order_id, items, fees …); run --dry-run first and read the b… | — |
140
+ | `makea-cli designer delete sampling-order` | write(never) | `DELETE /designer/sampling_orders/{sampling_order_id}` | delete a DRAFT sample order. The backend refuses any other status. Graded `never`. | — |
141
+ | `makea-cli designer delete shipping-order` | write(never) | `POST /designer/shipping_orders/{shipping_order_id}/cancel` | the endpoint is called cancel but it unlinks every production order and removes the shipment, so it is a delete here.… | — |
138
142
  | `makea-cli designer download document` | read | `GET /designer/document/download` | save bytes for user_id + document_id (designer-authenticated; same query contract as admin document download). | `designer-download-document` |
139
143
  | `makea-cli designer get collection` | read | `GET /designer/collections/{collection_id}/overview` | one collection with its products, orders and lifecycle in a single read. | — |
140
144
  | `makea-cli designer get lifecycle` | read | `GET /designer/product_orders/{product_order_id}/lifecycle` | which stage this product is in. | — |
@@ -142,6 +146,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
142
146
  | `makea-cli designer get quote-advice` | read | `GET /designer/product/quote_advice` | which quote to award and why, from cache. Reading never spends a model call; the web app is what asks for a fresh one. | — |
143
147
  | `makea-cli designer get tech-pack` | read | `GET /designer/products/{product_id}/technical-specifications` | the product's tech pack. | — |
144
148
  | `makea-cli designer get tech-pack-history` | read | `GET /designer/products/{product_id}/specification-change-history` | who changed which spec field, when, and from what. | — |
149
+ | `makea-cli designer list action` | read | `GET /designer/actions` | the pending actions on you, optionally for one product. An action is closed by the fact it asks for, not by acknowled… | — |
145
150
  | `makea-cli designer list channel` | read | `GET /designer/products/{product_id}/channels` | the product's conversation channels. | — |
146
151
  | `makea-cli designer list collection` | read | `GET /designer/collections` | the brand's collections. | — |
147
152
  | `makea-cli designer list library-element` | read | `GET /designer/library_components` | the brand's own shelf (fabrics, trims, colours, artwork); --section narrows to one kind. | — |
@@ -154,7 +159,17 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
154
159
  | `makea-cli designer list task` | read | `GET /designer/tasks` | what the platform is waiting on you for. | — |
155
160
  | `makea-cli designer search note` | read | `GET /designer/products/{product_id}/channel_search` | full-text search across a product's conversation; --channel narrows to one channel key. | — |
156
161
  | `makea-cli designer set product-collection` | write(auto) | `POST /designer/products/{id}/link-to-collection` | assign product to a collection. | `designer-link-product-to-collection` |
162
+ | `makea-cli designer submit production-order` | write(ask) | `POST /designer/production_orders/{production_order_id}/submit` | submit a 大货 order. This is the commitment, so --dry-run and confirm with the user first. | — |
163
+ | `makea-cli designer submit sampling-order` | write(ask) | `POST /designer/sampling_orders/{sampling_order_id}/confirm` | confirm a sample order so the supplier starts. Run --dry-run first and read it back to the user. | — |
164
+ | `makea-cli designer update action` | write(auto) | `POST /designer/actions/{action_id}/{acknowledge\|snooze\|dismiss}` | respond to one of the pending actions from `designer list action`. An action is closed by the fact it asks for, not b… | — |
165
+ | `makea-cli designer update note` | write(ask) | `POST /designer/products/{product_id}/notes/{note_id}/{accept\|reject}` | decide on a task the assistant proposed on a product. | — |
157
166
  | `makea-cli designer update product` | write(auto) | `POST /designer/product/update_basic_info` | patch fields on a product. --cover-image / --back-image take a document id and are what the assistant's set_product_i… | — |
167
+ | `makea-cli designer update production-order` | write(ask) | `POST /designer/production_orders/{production_order_id}/complete` | POST /designer/production_orders/{id}/complete, or PUT the order to re-pick which supplier links it covers (--links-f… | — |
168
+ | `makea-cli designer update proposal` | write(ask) | `POST /designer/beeboo_proposals/approve` | apply one spec change the assistant proposed. This edits the pack, so read the proposal first. | — |
169
+ | `makea-cli designer update sampling-order` | write(never) | `POST /designer/sampling_orders/{sampling_order_id}/cancel` | cancel a sample order. Graded `never`: an agent must not do this on its own, a person runs it. | — |
170
+ | `makea-cli designer update shipping-order` | write(ask) | `POST /designer/shipping_orders/{shipping_order_id}/confirm_receive` | say the goods arrived. The backend accepts this only while the shipment is IN_TRANSIT. | — |
171
+ | `makea-cli designer update suggested-action` | write(ask) | `POST /designer/channels/{channel_id}/suggested_actions/bulk_accept` | accept several of a channel's suggested actions in one write. --action takes note_id:action_id and repeats. | — |
172
+ | `makea-cli designer update task` | write(auto) | `POST /designer/tasks/{complete\|dismiss}` | close one of the tasks from `designer list task`. Complete means you did it; dismiss means it does not apply. | — |
158
173
  | `makea-cli designer upload document` | write(auto) | `POST /designer/document/upload` | upload a file for the current designer token; optional product_id (omit to start a new draft id server-side). | `designer-upload-document` |
159
174
 
160
175
  ### `supplier`
@@ -171,8 +186,14 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
171
186
  | `makea-cli supplier list channel` | read | `GET /supplier/products/{product_id}/channels` | the channels you are part of on a product. | — |
172
187
  | `makea-cli supplier list note` | read | `GET /supplier/products/{product_id}/channels/{channel_key}/notes` | the conversation in one channel. | — |
173
188
  | `makea-cli supplier list production-order` | read | `GET /supplier/production_orders` | your production orders, optionally for one RFQ. | — |
189
+ | `makea-cli supplier list quote-edit-request` | read | `GET /supplier/quote_requests/{quote_request_id}/quote_edit_requests` | changes the brand has asked you to make to a quote you already sent. | — |
174
190
  | `makea-cli supplier list rfq` | read | `GET /supplier/quote_requests` | the RFQs (quote requests) sent to you. | — |
191
+ | `makea-cli supplier list task` | read | `GET /supplier/tasks` | your onboarding and per-order to-dos. | — |
175
192
  | `makea-cli supplier submit quote` | write(ask) | `POST /supplier/quote_requests/{id}/submit_quote` | submit your quote for an RFQ. --file is the supplier link payload as JSON (same shape the web form posts); run with -… | — |
193
+ | `makea-cli supplier update action` | write(auto) | `POST /supplier/actions/{action_id}/{acknowledge\|snooze}` | respond to a pending action. Acknowledging says you have seen it; the action still closes on the fact it asks for. | — |
194
+ | `makea-cli supplier update quote` | write(ask) | `POST /supplier/quote_requests/{quote_request_id}/links/{link_id}/edit` | revise a quote you already sent. --file is the same payload shape as submit; --dry-run first. | — |
195
+ | `makea-cli supplier update rfq` | write(ask) | `POST /supplier/quote_requests/{quote_request_id}/{status\|archive\|accept_terms}` | answer an RFQ. --status accepts or declines the invitation; --archive takes it off your board; --accept-terms accepts… | — |
196
+ | `makea-cli supplier update task` | write(auto) | `POST /supplier/tasks/{complete\|dismiss}` | close one of the tasks from `supplier list task`. | — |
176
197
 
177
198
  其它:`makea-cli auth [--logout]` 登录/登出;`makea-cli version` 版本号。
178
199
 
@@ -0,0 +1 @@
1
+ __version__ = "0.2.2"
@@ -1220,3 +1220,141 @@ def supplier_download_document(
1220
1220
  ) -> tuple[bytes, str | None]:
1221
1221
  """GET /supplier/document/download — a document this factory may read."""
1222
1222
  return _download("/supplier/document/download", {"document_id": document_id}, timeout=timeout)
1223
+
1224
+
1225
+ # --- clearing the queue: tasks, actions, and the assistant's proposals ----------
1226
+
1227
+
1228
+ def designer_task_action(action: str, task_id: str) -> Any:
1229
+ """POST /designer/tasks/{dismiss|complete} — body ``{"task_id": "<type>#<key>"}``."""
1230
+ return post_json(f"/designer/tasks/{action}", {"task_id": task_id})
1231
+
1232
+
1233
+ def designer_action_state(action_id: str, state: str, *, days: int | None = None) -> Any:
1234
+ """POST /designer/actions/{id}/{acknowledge|snooze|dismiss}."""
1235
+ body: dict[str, Any] = {}
1236
+ if state == "snooze" and days is not None:
1237
+ body["days"] = days
1238
+ return post_json(f"/designer/actions/{action_id}/{state}", body)
1239
+
1240
+
1241
+ def designer_note_decision(product_id: str, note_id: str, decision: str) -> Any:
1242
+ """POST /designer/products/{id}/notes/{note_id}/{accept|reject} — a task candidate."""
1243
+ return post_json(f"/designer/products/{product_id}/notes/{note_id}/{decision}", {})
1244
+
1245
+
1246
+ def designer_approve_proposal(note_id: str, proposal_id: str) -> Any:
1247
+ """POST /designer/beeboo_proposals/approve — apply one of the assistant's spec proposals."""
1248
+ return post_json(
1249
+ "/designer/beeboo_proposals/approve", {"note_id": note_id, "proposal_id": proposal_id}
1250
+ )
1251
+
1252
+
1253
+ def designer_bulk_accept_actions(channel_id: str, actions: list[dict[str, str]]) -> Any:
1254
+ """POST /designer/channels/{id}/suggested_actions/bulk_accept — accept several at once."""
1255
+ return post_json(
1256
+ f"/designer/channels/{channel_id}/suggested_actions/bulk_accept", {"actions": actions}
1257
+ )
1258
+
1259
+
1260
+ def supplier_task_action(action: str, task_id: str) -> Any:
1261
+ """POST /supplier/tasks/{dismiss|complete} — body ``{"task_id": "<type>#<key>"}``."""
1262
+ return post_json(f"/supplier/tasks/{action}", {"task_id": task_id})
1263
+
1264
+
1265
+ def supplier_action_state(action_id: str, state: str, *, days: int | None = None) -> Any:
1266
+ """POST /supplier/actions/{id}/{acknowledge|snooze}."""
1267
+ body: dict[str, Any] = {}
1268
+ if state == "snooze" and days is not None:
1269
+ body["days"] = days
1270
+ return post_json(f"/supplier/actions/{action_id}/{state}", body)
1271
+
1272
+
1273
+ # --- the factory's quote lifecycle ----------------------------------------------
1274
+
1275
+
1276
+ def supplier_edit_quote(quote_request_id: str, link_id: str, body: dict[str, Any]) -> Any:
1277
+ """POST /supplier/quote_requests/{id}/links/{link_id}/edit — revise a quote already sent."""
1278
+ return post_json(
1279
+ f"/supplier/quote_requests/{quote_request_id}/links/{link_id}/edit", body, timeout=120.0
1280
+ )
1281
+
1282
+
1283
+ def supplier_set_rfq_status(quote_request_id: str, status: str) -> Any:
1284
+ """POST /supplier/quote_requests/{id}/status — accept or decline the invitation."""
1285
+ return post_json(f"/supplier/quote_requests/{quote_request_id}/status", {"status": status})
1286
+
1287
+
1288
+ def supplier_archive_rfq(quote_request_id: str) -> Any:
1289
+ """POST /supplier/quote_requests/{id}/archive — take it off your board."""
1290
+ return post_json(f"/supplier/quote_requests/{quote_request_id}/archive", {})
1291
+
1292
+
1293
+ def supplier_accept_terms(quote_request_id: str, agreement_keys: list[str]) -> Any:
1294
+ """POST /supplier/quote_requests/{id}/accept_terms — accept the named agreements."""
1295
+ return post_json(
1296
+ f"/supplier/quote_requests/{quote_request_id}/accept_terms",
1297
+ {"agreement_keys": agreement_keys},
1298
+ )
1299
+
1300
+
1301
+ def supplier_list_quote_edit_requests(quote_request_id: str) -> Any:
1302
+ """GET /supplier/quote_requests/{id}/quote_edit_requests — the brand's change requests."""
1303
+ return get_json(f"/supplier/quote_requests/{quote_request_id}/quote_edit_requests")
1304
+
1305
+
1306
+ def designer_list_actions(*, product_id: str | None = None) -> Any:
1307
+ """GET /designer/actions — the brand's pending actions, optionally for one product."""
1308
+ params = {"product_id": product_id} if product_id else None
1309
+ return get_json("/designer/actions", params=params)
1310
+
1311
+
1312
+ def supplier_list_tasks() -> Any:
1313
+ """GET /supplier/tasks — the factory's onboarding and per-order to-dos."""
1314
+ return get_json("/supplier/tasks")
1315
+
1316
+
1317
+ # --- order lifecycle (designer). Tiered on purpose: see the commands' approval
1318
+ # --- grades -- submit/confirm ask a person, cancel/delete are never automatic,
1319
+ # --- and nothing here moves money. Payments and subscriptions are deliberately
1320
+ # --- absent from the CLI: an agent should not have a path to a charge.
1321
+
1322
+
1323
+ def designer_confirm_sampling_order(sampling_order_id: str) -> Any:
1324
+ """POST /designer/sampling_orders/{id}/confirm — the brand confirms the sample order."""
1325
+ return post_json(f"/designer/sampling_orders/{sampling_order_id}/confirm", {})
1326
+
1327
+
1328
+ def designer_cancel_sampling_order(sampling_order_id: str) -> Any:
1329
+ """POST /designer/sampling_orders/{id}/cancel — cancel it."""
1330
+ return post_json(f"/designer/sampling_orders/{sampling_order_id}/cancel", {})
1331
+
1332
+
1333
+ def designer_delete_sampling_order(sampling_order_id: str) -> Any:
1334
+ """DELETE /designer/sampling_orders/{id} — DRAFT only; the backend refuses anything else."""
1335
+ return delete_json(f"/designer/sampling_orders/{sampling_order_id}")
1336
+
1337
+
1338
+ def designer_submit_production_order(production_order_id: str) -> Any:
1339
+ """POST /designer/production_orders/{id}/submit — hand the bulk order to the supplier."""
1340
+ return post_json(f"/designer/production_orders/{production_order_id}/submit", {})
1341
+
1342
+
1343
+ def designer_complete_production_order(production_order_id: str) -> Any:
1344
+ """POST /designer/production_orders/{id}/complete — the brand marks the bulk order done."""
1345
+ return post_json(f"/designer/production_orders/{production_order_id}/complete", {})
1346
+
1347
+
1348
+ def designer_update_production_order(production_order_id: str, body: dict[str, Any]) -> Any:
1349
+ """PUT /designer/production_orders/{id} — re-pick which supplier links the order covers."""
1350
+ return put_json(f"/designer/production_orders/{production_order_id}", body, timeout=120.0)
1351
+
1352
+
1353
+ def designer_confirm_receive_shipping_order(shipping_order_id: str) -> Any:
1354
+ """POST /designer/shipping_orders/{id}/confirm_receive — IN_TRANSIT only."""
1355
+ return post_json(f"/designer/shipping_orders/{shipping_order_id}/confirm_receive", {})
1356
+
1357
+
1358
+ def designer_cancel_shipping_order(shipping_order_id: str) -> Any:
1359
+ """POST /designer/shipping_orders/{id}/cancel — unlinks every production order, then deletes it."""
1360
+ return post_json(f"/designer/shipping_orders/{shipping_order_id}/cancel", {})