@crabcloud/skills 0.1.24 → 0.1.25
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.
|
@@ -152,8 +152,8 @@ flags 的数组)判定:`styles`(款式库)、`records`(记录)、`ma
|
|
|
152
152
|
## 制单与生产(写闸 production)
|
|
153
153
|
|
|
154
154
|
**制单 = 三态生命周期的投产通知单**(2026-10-09 定稿):**未确认(草稿,可
|
|
155
|
-
编辑)→
|
|
156
|
-
留档)**。只有已确认单据出 A4
|
|
155
|
+
编辑)→ 确认(定稿:可打印工艺单;数量矩阵仍可补录调整,改数量落时间线)→ 作废(单向终态:不可打印、
|
|
156
|
+
留档)**。只有已确认单据出 A4 工艺单(**不含任何金额**,
|
|
157
157
|
留档 + 给工厂)。标题默认「款式名 + 日期」可改。规格明细 = 「色板 × 尺码」
|
|
158
158
|
矩阵:尺寸必有(款式未录尺码 400,先补商品规格);色板可有可无(单色款不
|
|
159
159
|
填色)。加工厂只收 factory 类型供应商(留空 = 自加工);交期 = 预计交期。
|
|
@@ -170,9 +170,9 @@ tab 一键标记款式完成。**超量不拦(流水账语义)**:累计可
|
|
|
170
170
|
代报时见到 ⚠ 先向用户复述确认再继续。Web 操作位置见 `references/web-ui.md`。
|
|
171
171
|
**采购记录(2026-10-12 切片)**:细化 planning「一期不做独立采购单」——逐条
|
|
172
172
|
台账挂已确认制单,**物料必须关联核算面辅料行**(`--material` = 核算行 id,须
|
|
173
|
-
|
|
173
|
+
在本款核算清单内(随核算现行,含确认后新增的行);名称/货号/规格/单位由服务端带出,不自由填)。
|
|
174
174
|
`--amount-cents` = 实付金额整数分(非单价×数量派生);到货两态单向(待到货 →
|
|
175
|
-
已到货)。对账口径:用量 =
|
|
175
|
+
已到货)。对账口径:用量 = 单件耗料 × 件数(物料随核算现行),差数即余缺(用量/已买/实付为 0 时输出省略该段,与 Web 0 值空白同口径)。删除是金额录错
|
|
176
176
|
兜底(时间线留痕不撤);Web 的「生产」tab = 采购/报数/入库合流(选单 + 工单头
|
|
177
177
|
速览 + 三板块上下平铺:01 采购 / 02 报数 / 03 入库)。
|
|
178
178
|
|
|
@@ -181,13 +181,13 @@ tab 一键标记款式完成。**超量不拦(流水账语义)**:累计可
|
|
|
181
181
|
| 看一款的制单 | `crab atelier orders <styleId> [--status draft\|confirmed\|voided]`(三态计数随行) |
|
|
182
182
|
| 看一单 | `crab atelier order <orderId>`(标题 + 规格明细 + 工序报数累计 + 入库对账 + **采购对账与流水** + **报数/回货流水〔含色码矩阵〕** + 快照合计;orderId 见 orders) |
|
|
183
183
|
| 建草稿 | `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"`) |
|
|
184
|
-
|
|
|
185
|
-
| 确认定稿 | `crab atelier order confirm <orderId
|
|
184
|
+
| 改制单 | `crab atelier order edit <orderId> [--title ... --breakdown "..." --supplier ... --delivery ... --notes ...]`(草稿全量可改;已确认单仅 --breakdown 数量补录,落时间线) |
|
|
185
|
+
| 确认定稿 | `crab atelier order confirm <orderId>`(可打印;定稿后不可再改) |
|
|
186
186
|
| 作废 | `crab atelier order void <orderId>`(单向终态:不可打印、留档) |
|
|
187
187
|
| 报数 | `crab atelier order log <orderId> --step 裁剪 --breakdown "S=10,M=20" [--defect 2 --note 备注]`(--step 须在单据工序列表内〔order 详情可看〕;--breakdown 按单据规格逐格报、总数服务端按格求和;次品 ≤ 总数) |
|
|
188
188
|
| 登记回货 | `crab atelier order inbound <orderId> --breakdown "S=10,M=20" [--note 备注]`(本批按单据规格逐格填;分批多次;差数 = 未交尾数) |
|
|
189
189
|
| 看采购台账 | `crab atelier order purchase <orderId>`(物料对账段:用量/已买/余缺/实付合计 + 采购流水) |
|
|
190
|
-
| 记采购 | `crab atelier order purchase add <orderId> --material <costMaterialId> --qty 2.5 --amount-cents N [--supplier <id\|前缀\|名称> --note 备注]`(仅已确认单;--material
|
|
190
|
+
| 记采购 | `crab atelier order purchase add <orderId> --material <costMaterialId> --qty 2.5 --amount-cents N [--supplier <id\|前缀\|名称> --note 备注]`(仅已确认单;--material 须在本款核算清单内〔order 详情可看物料〕;实付金额整数分) |
|
|
191
191
|
| 标记到货 | `crab atelier order purchase recv <purchaseId>`(待到货 → 已到货,单向不可逆) |
|
|
192
192
|
| 删采购 | `crab atelier order purchase rm <purchaseId>`(金额录错兜底;时间线留痕不撤) |
|
|
193
193
|
|
|
@@ -200,7 +200,7 @@ tab 一键标记款式完成。**超量不拦(流水账语义)**:累计可
|
|
|
200
200
|
- `crab atelier suppliers --json` → `{ suppliers: [...], total, page, totalPages, statusCounts, typeCounts }`
|
|
201
201
|
- `crab atelier costing <styleId> --json` → `{ styleId, craftNotes, materials, processes, extras, totals: { materialsCents, processCents, extrasCents, totalCents } }`(行金额服务端算好;数量为毫单位 ×1000)
|
|
202
202
|
- `crab atelier orders <styleId> --json` → `{ orders: [...], total, page, totalPages, statusCounts: { draft, confirmed, voided } }`;订单含 `title`、`orderNo`(款号-seq)、`breakdown`(色板→尺码→件数两级矩阵)、`steps`(工序列表)、`progress`(各工序报数累计)、`inboundQty`(累计入库)、`costingSnapshot`(确认时点冻结)
|
|
203
|
-
- `crab atelier order <orderId> --json` →
|
|
203
|
+
- `crab atelier order <orderId> --json` → 制单全量视图(含成本三表〔物料随核算现行〕+ totals + sizes/sizeChart + progress + inboundQty + `logs` 报数流水〔`qtyDone` 服务端按矩阵派生 + `breakdown`〕 + `inbounds` 回货流水〔同上〕 + `purchases` 采购台账 + `purchaseSummary` 物料对账〔`demandMilli` 用量/`purchasedMilli` 已买/`amountCents` 实付合计/`pendingCount` 待到笔数〕)
|
|
204
204
|
- `crab atelier order purchase <orderId> --json` → `{ purchases, summary }`(台账 + 对账一次取)
|
|
205
205
|
- `crab atelier records --json` → `{ records: [...], total, page, totalPages }`(type 含 inbound = 回货入库事件)
|
|
206
206
|
- `crab atelier audits --json` → `{ events: [...], total, page, totalPages }`(事件含 `action`/`actorName`/`actorType`〔agent = 令牌动作〕/`meta`;仅 owner 令牌可查)
|
|
@@ -58,11 +58,15 @@ short 命令需要 **short scope** 的令牌:`crab login --scopes short`(绑
|
|
|
58
58
|
| 写剧本 | `crab short episode edit <id> --script "…"`(整体替换;修改是常事,直接覆盖) |
|
|
59
59
|
| 推制作状态 | `--prod-status outline\|scripting\|prep\|shooting\|post\|ready` |
|
|
60
60
|
| 发布 | `--published on`(要求 prod-status 先到 ready,否则 409 not_ready) |
|
|
61
|
+
| 下架 | `--published off`(已发布的集要先下架才能降制作态,否则 409 published_downgrade) |
|
|
61
62
|
| 删集 | `crab short episode rm <id>`(分镜一并删除,不可恢复) |
|
|
62
63
|
|
|
63
64
|
剧状态:`draft → published → archived`。归档不是删除——archived 剧的内容
|
|
64
|
-
|
|
65
|
-
draft|published` 改回来。
|
|
65
|
+
只读(内容字段有实际改动即 409 series_archived,原样保存不算改动),唯一
|
|
66
|
+
出口是 `series edit <id> --status draft|published` 改回来。
|
|
67
|
+
|
|
68
|
+
已发布的集要降制作态,先 `--published off` 下架再改——保持「已发布」的同时
|
|
69
|
+
降级会被拒(409 published_downgrade),避免产出「僵尸已发布」集。
|
|
66
70
|
|
|
67
71
|
## 主体库(挂剧,跨集复用)
|
|
68
72
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crabcloud/skills",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.25",
|
|
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": {
|