@crabcloud/skills 0.1.14 → 0.1.15

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.
@@ -131,16 +131,29 @@ flags 的数组)判定:`styles`(款式库)、`records`(记录)、`ma
131
131
  留档 + 给工厂)。标题默认「款式名 + 日期」可改。规格明细 = 「色板 × 尺码」
132
132
  矩阵:尺寸必有(款式未录尺码 400,先补商品规格);色板可有可无(单色款不
133
133
  填色)。加工厂只收 factory 类型供应商(留空 = 自加工);交期 = 预计交期。
134
+ **工序列表 = 单据级、默认四道(裁剪/车缝/后整/质检)**:草稿期可增删改名
135
+ (毛织无裁剪、加「绣花(外发)」等例外),确认后冻结,报数按工序名挂。
134
136
  建单不自动推进款式阶段(阶段是定位标记,需手动 `style edit --stage 生产`)。
137
+ **报数与回货(2026-10-09 拍板;2026-10-11 矩阵化)**:仅已确认单据可报数/
138
+ 登记回货;两者都按单据规格「色 × 码」逐格报数(`--breakdown` 矩阵语法同制
139
+ 单,总数 = 服务端按格求和派生、客户端不传总数;单据没订的色码格不可报)。
140
+ 报数流水只增不改(QC 简化 = 质检工序的次品数即结果,次品全单口径 ≤ 总数);
141
+ 回货分批多次,单据累计对账「已入库 X/件数 Y」,累计 ≥ 件数即可在 Web 入库
142
+ tab 一键标记款式完成。**超量不拦(流水账语义)**:累计可超单据件数(超产/
143
+ 多交真实存在)——Web 侧超量弹窗二次确认,CLI 提交成功后输出 ⚠ 超量警告行;
144
+ 代报时见到 ⚠ 先向用户复述确认再继续。Web 侧:报数在款式详情「报数」tab
145
+ (选单 → 矩阵报数)、入库在「入库」tab,制单在「制单」tab(2026-10-11 拆分)。
135
146
 
136
147
  | 意图 | 命令 |
137
148
  |---|---|
138
149
  | 看一款的制单 | `crab atelier orders <styleId> [--status draft\|confirmed\|voided]`(三态计数随行) |
139
- | 看一单 | `crab atelier order <orderId>`(标题 + 规格明细 + 快照合计;orderId 见 orders) |
150
+ | 看一单 | `crab atelier order <orderId>`(标题 + 规格明细 + 工序报数累计 + 入库对账 + **报数/回货流水〔含色码矩阵〕** + 快照合计;orderId 见 orders) |
140
151
  | 建草稿 | `crab atelier order add <styleId> --breakdown "黑色:S=30,M=45\|米白:S=20" [--title 标题 --supplier <id\|前缀\|名称> --delivery 2026-10-20 --notes 备注]`(--breakdown 色码=件数:多色 `\|` 分段、`色:` 前缀;单色款直接 `"S=10,M=20"`) |
141
152
  | 改草稿 | `crab atelier order edit <orderId> [--title ... --breakdown "..." --supplier ... --delivery ... --notes ...]`(仅未确认可编辑) |
142
153
  | 确认定稿 | `crab atelier order confirm <orderId>`(快照冻结、可打印;定稿后不可再改) |
143
154
  | 作废 | `crab atelier order void <orderId>`(单向终态:不可打印、留档) |
155
+ | 报数 | `crab atelier order log <orderId> --step 裁剪 --breakdown "S=10,M=20" [--defect 2 --note 备注]`(--step 须在单据工序列表内〔order 详情可看〕;--breakdown 按单据规格逐格报、总数服务端按格求和;次品 ≤ 总数) |
156
+ | 登记回货 | `crab atelier order inbound <orderId> --breakdown "S=10,M=20" [--note 备注]`(本批按单据规格逐格填;分批多次;差数 = 未交尾数) |
144
157
 
145
158
  ## 机器可读输出(--json)
146
159
 
@@ -150,9 +163,9 @@ flags 的数组)判定:`styles`(款式库)、`records`(记录)、`ma
150
163
  - `crab atelier style <id> --json` → `{ style, samples, events }`(samples 为旧模型遗留空表、恒 `[]`;事件新→旧最近 50)
151
164
  - `crab atelier suppliers --json` → `{ suppliers: [...], total, page, totalPages, statusCounts, typeCounts }`
152
165
  - `crab atelier costing <styleId> --json` → `{ styleId, craftNotes, materials, processes, extras, totals: { materialsCents, processCents, extrasCents, totalCents } }`(行金额服务端算好;数量为毫单位 ×1000)
153
- - `crab atelier orders <styleId> --json` → `{ orders: [...], total, page, totalPages, statusCounts: { draft, confirmed, voided } }`;订单含 `title`、`orderNo`(款号-seq)、`breakdown`(色板→尺码→件数两级矩阵)、`costingSnapshot`(确认时点冻结)
154
- - `crab atelier order <orderId> --json` → 制单全量视图(含快照三表 + totals + sizes/sizeChart)
155
- - `crab atelier records --json` → `{ records: [...], total, page, totalPages }`
166
+ - `crab atelier orders <styleId> --json` → `{ orders: [...], total, page, totalPages, statusCounts: { draft, confirmed, voided } }`;订单含 `title`、`orderNo`(款号-seq)、`breakdown`(色板→尺码→件数两级矩阵)、`steps`(工序列表)、`progress`(各工序报数累计)、`inboundQty`(累计入库)、`costingSnapshot`(确认时点冻结)
167
+ - `crab atelier order <orderId> --json` → 制单全量视图(含快照三表 + totals + sizes/sizeChart + progress + inboundQty + `logs` 报数流水〔`qtyDone` 服务端按矩阵派生 + `breakdown`〕 + `inbounds` 回货流水〔同上〕)
168
+ - `crab atelier records --json` → `{ records: [...], total, page, totalPages }`(type 含 inbound = 回货入库事件)
156
169
  - `crab atelier desk --json` → `{ org, stats: { totalStyles, activeStyles, doneStyles, samplingStyles, reviewPending, stageCounts, activeCollections, suppliersFabric, suppliersFactory }, reviewTodos, recentRecords }`
157
170
  - `crab atelier invite --json` → `{ token, createdAt, link }`
158
171
  - 时间字段一律纪元毫秒;金额字段 `*Cents` 一律整数分
@@ -172,4 +185,8 @@ flags 的数组)判定:`styles`(款式库)、`records`(记录)、`ma
172
185
  建议「删掉重录」。联系人/联系方式是自由文本,不要拆成结构化字段。
173
186
  - 制单生命周期:草稿可编辑 → **确认定稿**(不可再改、可打印)→ 作废终态
174
187
  (不可打印、留档)。确认/作废前与用户复述单据标题与数量矩阵。
188
+ - 报数/回货**只对已确认单据**,且流水只增不改(写错不能撤,报数前与用户
189
+ 复述工序与色码数量);两者都按单据规格「色 × 码」矩阵逐格报(`--breakdown`),
190
+ 总数服务端派生——不要凭总数拼矩阵(单据没订的格子会被 400 拒);报数不影响
191
+ 时间线,回货每笔落「入库」记录。
175
192
  - 多工坊账号务必确认 `--org` 后再写,写错工坊的数据不属于本工坊。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crabcloud/skills",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "type": "module",
5
5
  "description": "Crab Cloud agent skills (SKILL.md) with a standalone installer — teach coding agents to operate the user's personal cloud via the crab CLI.",
6
6
  "bin": {