diffcat-cli 0.2.1 → 0.3.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.
Files changed (69) hide show
  1. package/README.md +34 -5
  2. package/connectors/workbuddy/cli.json +3 -3
  3. package/connectors/workbuddy/connector-meta.json +10 -4
  4. package/connectors/workbuddy/skills/diffcat/SKILL.md +39 -15
  5. package/connectors/workbuddy/skills/diffcat/references/knowledge.md +26 -0
  6. package/connectors/workbuddy/skills/diffcat/references/operations.md +12 -0
  7. package/connectors/workbuddy/skills/diffcat/references/safety.md +1 -1
  8. package/dist/capability-authorization.d.ts +23 -0
  9. package/dist/capability-authorization.js +36 -0
  10. package/dist/capability-authorization.js.map +1 -0
  11. package/dist/client.d.ts +4 -1
  12. package/dist/client.js +14 -0
  13. package/dist/client.js.map +1 -1
  14. package/dist/device-login.d.ts +0 -1
  15. package/dist/device-login.js +0 -2
  16. package/dist/device-login.js.map +1 -1
  17. package/dist/index.js +73 -40
  18. package/dist/index.js.map +1 -1
  19. package/dist/knowledge-store.d.ts +55 -0
  20. package/dist/knowledge-store.js +265 -0
  21. package/dist/knowledge-store.js.map +1 -0
  22. package/dist/knowledge-types.d.ts +47 -0
  23. package/dist/knowledge-types.js +2 -0
  24. package/dist/knowledge-types.js.map +1 -0
  25. package/dist/types.d.ts +18 -0
  26. package/knowledge/catalog.json +542 -0
  27. package/knowledge/topics/documents/consignment-reconciliation.md +7 -0
  28. package/knowledge/topics/documents/crowdfunding-order.md +7 -0
  29. package/knowledge/topics/documents/direct-order.md +7 -0
  30. package/knowledge/topics/documents/expense-request.md +7 -0
  31. package/knowledge/topics/documents/inbound-order.md +7 -0
  32. package/knowledge/topics/documents/invoice-request.md +7 -0
  33. package/knowledge/topics/documents/leave-request.md +7 -0
  34. package/knowledge/topics/documents/outbound-order.md +7 -0
  35. package/knowledge/topics/documents/purchase-request.md +7 -0
  36. package/knowledge/topics/documents/refund-request.md +7 -0
  37. package/knowledge/topics/documents/sales-order.md +17 -0
  38. package/knowledge/topics/documents/stocktake-order.md +7 -0
  39. package/knowledge/topics/documents/supply-entry-order.md +7 -0
  40. package/knowledge/topics/documents/supply-issue-request.md +7 -0
  41. package/knowledge/topics/documents/supply-purchase-request.md +7 -0
  42. package/knowledge/topics/documents/supply-stocktake-order.md +7 -0
  43. package/knowledge/topics/guides/document-drafts.md +13 -0
  44. package/knowledge/topics/guides/login-and-authorization.md +12 -0
  45. package/knowledge/topics/guides/master-data-and-query.md +13 -0
  46. package/knowledge/topics/guides/recovery.md +13 -0
  47. package/knowledge/topics/guides/workflow-tasks.md +12 -0
  48. package/knowledge/topics/modules/administration.md +12 -0
  49. package/knowledge/topics/modules/crowdfunding.md +14 -0
  50. package/knowledge/topics/modules/finance.md +14 -0
  51. package/knowledge/topics/modules/inventory.md +14 -0
  52. package/knowledge/topics/modules/operations.md +14 -0
  53. package/knowledge/topics/modules/organization.md +16 -0
  54. package/knowledge/topics/modules/partner.md +11 -0
  55. package/knowledge/topics/modules/project.md +17 -0
  56. package/knowledge/topics/modules/sales.md +15 -0
  57. package/knowledge/topics/overview/navigation.md +21 -0
  58. package/knowledge/topics/overview/system.md +14 -0
  59. package/knowledge/topics/troubleshooting/document-correction.md +16 -0
  60. package/knowledge/topics/troubleshooting/permission-and-not-found.md +12 -0
  61. package/knowledge/topics/troubleshooting/workflow-stuck.md +11 -0
  62. package/package.json +2 -1
  63. package/plugins/diffcat/.codex-plugin/plugin.json +7 -5
  64. package/plugins/diffcat/README.md +7 -1
  65. package/plugins/diffcat/skills/diffcat/SKILL.md +32 -7
  66. package/plugins/diffcat/skills/diffcat/agents/openai.yaml +2 -2
  67. package/plugins/diffcat/skills/diffcat/references/authentication.md +12 -5
  68. package/plugins/diffcat/skills/diffcat/references/capabilities.md +1 -0
  69. package/plugins/diffcat/skills/diffcat/references/knowledge.md +40 -0
package/dist/types.d.ts CHANGED
@@ -35,3 +35,21 @@ export interface OperationResponse {
35
35
  result?: unknown;
36
36
  [key: string]: unknown;
37
37
  }
38
+ export interface AgentGrantSubject {
39
+ id: string;
40
+ displayName: string;
41
+ userKind: string;
42
+ departmentId: string | null;
43
+ roleId: string | null;
44
+ }
45
+ export interface CurrentAgentGrant {
46
+ id: string;
47
+ clientId: string;
48
+ deviceName: string;
49
+ capabilities: string[];
50
+ constraints: Record<string, unknown>;
51
+ expiresAt: string;
52
+ lastUsedAt: string | null;
53
+ createdAt: string;
54
+ subject: AgentGrantSubject;
55
+ }
@@ -0,0 +1,542 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "knowledgeVersion": "0.3.0",
4
+ "updatedAt": "2026-09-09",
5
+ "categories": [
6
+ { "id": "overview", "title": "开始使用", "description": "系统定位、菜单入口和知识使用方式。" },
7
+ { "id": "modules", "title": "业务模块", "description": "各业务模块的用途、入口和协作关系。" },
8
+ { "id": "documents", "title": "单据与流程", "description": "单据用途、办理节点、状态和业务影响。" },
9
+ { "id": "guides", "title": "操作指引", "description": "登录、查询、草稿、待办和恢复操作。" },
10
+ { "id": "troubleshooting", "title": "疑难诊断", "description": "按实时状态和用户身份判断处理路径。" }
11
+ ],
12
+ "topics": [
13
+ {
14
+ "id": "overview.system",
15
+ "title": "DiffCat 系统概览",
16
+ "summary": "了解系统覆盖的业务领域、资料、单据、流程和跨模块影响。",
17
+ "category": "overview",
18
+ "relatedTopicIds": ["overview.navigation", "guide.login-and-authorization"],
19
+ "keywords": ["系统介绍", "功能介绍", "能做什么", "业务全景"],
20
+ "aliases": ["diffcat overview", "system introduction", "features"],
21
+ "path": "topics/overview/system.md",
22
+ "updatedAt": "2026-09-09"
23
+ },
24
+ {
25
+ "id": "overview.navigation",
26
+ "title": "菜单与功能导航",
27
+ "summary": "按九个菜单分组查找当前 54 个员工端页面及嘉宾门户入口。",
28
+ "category": "overview",
29
+ "relatedTopicIds": ["overview.system", "troubleshooting.permission-and-not-found"],
30
+ "keywords": ["菜单", "页面", "入口", "在哪里", "54个页面"],
31
+ "aliases": ["menu navigation", "page entry", "where is"],
32
+ "path": "topics/overview/navigation.md",
33
+ "menuCodes": ["workbench:home", "workbench:data-center"],
34
+ "updatedAt": "2026-09-09"
35
+ },
36
+ {
37
+ "id": "module.organization",
38
+ "title": "组织与权限模块",
39
+ "summary": "用户、部门、角色、公司、菜单授权和个人账号的使用说明。",
40
+ "category": "modules",
41
+ "relatedTopicIds": ["module.operations", "overview.navigation", "guide.login-and-authorization"],
42
+ "keywords": ["组织", "用户", "部门", "角色", "公司", "权限"],
43
+ "aliases": ["organization", "users", "departments", "roles", "companies", "permissions"],
44
+ "path": "topics/modules/organization.md",
45
+ "menuCodes": ["org:users", "org:depts", "org:roles", "org:comps"],
46
+ "updatedAt": "2026-09-09"
47
+ },
48
+ {
49
+ "id": "module.operations",
50
+ "title": "运维与系统配置模块",
51
+ "summary": "菜单、字典、流程模板、币种汇率、单位、编码和审计配置说明。",
52
+ "category": "modules",
53
+ "relatedTopicIds": ["module.organization", "guide.recovery"],
54
+ "keywords": ["运维", "字典", "审计", "流程模板", "编码规则", "汇率"],
55
+ "aliases": ["operations", "administration console", "dictionary", "audit", "flow templates"],
56
+ "path": "topics/modules/operations.md",
57
+ "menuCodes": ["ops:menus", "ops:audits", "ops:events", "ops:dict", "ops:flow-temps", "ops:currencies", "ops:ex-rates", "ops:uoms", "ops:ec-rules", "ops:fee-sbjs"],
58
+ "updatedAt": "2026-09-09"
59
+ },
60
+ {
61
+ "id": "module.sales",
62
+ "title": "销售与品牌模块",
63
+ "summary": "客户、门店、合同、商品、价目和三类销售单据的协作方式。",
64
+ "category": "modules",
65
+ "relatedTopicIds": ["document.sales-order", "document.direct-order", "document.consignment-reconciliation", "module.finance"],
66
+ "keywords": ["品牌", "销售", "客户", "门店", "合同", "商品", "价目"],
67
+ "aliases": ["sales", "brand", "customer", "store", "contract", "product", "price list"],
68
+ "path": "topics/modules/sales.md",
69
+ "menuCodes": ["sales:custs", "sales:stores", "sales:contract", "sales:prods", "sales:prices", "sales:orders", "sales:direct-orders", "sales:con-rec"],
70
+ "updatedAt": "2026-09-09"
71
+ },
72
+ {
73
+ "id": "module.inventory",
74
+ "title": "制造与库存模块",
75
+ "summary": "仓库、供应商、物料、库存流水和采购、出入库、盘存的使用说明。",
76
+ "category": "modules",
77
+ "relatedTopicIds": ["document.purchase-request", "document.inbound-order", "document.outbound-order", "document.stocktake-order"],
78
+ "keywords": ["制造", "库存", "仓库", "供应商", "物料", "采购", "入库", "出库", "盘存"],
79
+ "aliases": ["inventory", "manufacturing", "warehouse", "supplier", "material", "purchase", "inbound", "outbound", "stocktake"],
80
+ "path": "topics/modules/inventory.md",
81
+ "menuCodes": ["inv:warehouses", "inv:suppliers", "inv:materials", "inv:material-invs", "inv:records", "inv:purchases", "inv:inbounds", "inv:outbounds", "inv:stocktakes"],
82
+ "updatedAt": "2026-09-09"
83
+ },
84
+ {
85
+ "id": "module.administration",
86
+ "title": "行政模块",
87
+ "summary": "行政用品、用品库存、固定支出、费用和请假业务说明。",
88
+ "category": "modules",
89
+ "relatedTopicIds": ["document.supply-entry-order", "document.supply-issue-request", "document.supply-purchase-request", "document.supply-stocktake-order", "document.leave-request", "document.expense-request"],
90
+ "keywords": ["行政", "用品", "固定支出", "请假", "费用"],
91
+ "aliases": ["administration", "office supplies", "fixed expense", "leave request"],
92
+ "path": "topics/modules/administration.md",
93
+ "menuCodes": ["adm:sup", "adm:sup-purchases", "adm:sup-issues", "adm:sup-stocktakes", "adm:sup-entries", "adm:expenses", "adm:expense-plans", "adm:leaves"],
94
+ "updatedAt": "2026-09-09"
95
+ },
96
+ {
97
+ "id": "module.finance",
98
+ "title": "财务模块",
99
+ "summary": "应收、收款、应付、付款、银行、开票、退款和费用的业务关系。",
100
+ "category": "modules",
101
+ "relatedTopicIds": ["document.expense-request", "document.invoice-request", "document.refund-request", "module.sales"],
102
+ "keywords": ["财务", "应收", "收款", "应付", "付款", "银行", "开票", "退款"],
103
+ "aliases": ["finance", "receivable", "receipt", "payable", "payment", "invoice", "refund"],
104
+ "path": "topics/modules/finance.md",
105
+ "menuCodes": ["fin:receivables", "fin:receipts", "fin:invoices", "fin:payables", "fin:payments", "fin:bank-accounts", "fin:bank-trans", "fin:credit-records", "fin:refund-requests"],
106
+ "updatedAt": "2026-09-09"
107
+ },
108
+ {
109
+ "id": "module.project",
110
+ "title": "项目模块使用说明",
111
+ "summary": "项目档案、预算条目、预算申请、项目计划和项目核算的使用路径。",
112
+ "category": "modules",
113
+ "relatedTopicIds": ["module.inventory", "module.finance", "guide.master-data-and-query"],
114
+ "keywords": ["项目模块怎么用", "项目档案", "预算", "计划", "核算"],
115
+ "aliases": ["project module", "project management", "project budget", "project plan", "project accounting"],
116
+ "path": "topics/modules/project.md",
117
+ "resourceNames": ["pm.projects"],
118
+ "menuCodes": ["proj:projects"],
119
+ "updatedAt": "2026-09-09"
120
+ },
121
+ {
122
+ "id": "module.crowdfunding",
123
+ "title": "众筹项目与履约模块",
124
+ "summary": "众筹平台、项目、订单导入、准备发货、履约单和发货记录说明。",
125
+ "category": "modules",
126
+ "relatedTopicIds": ["document.crowdfunding-order", "module.inventory", "module.finance"],
127
+ "keywords": ["众筹", "平台", "导入", "履约", "发货"],
128
+ "aliases": ["crowdfunding", "campaign", "fulfillment", "shipment"],
129
+ "path": "topics/modules/crowdfunding.md",
130
+ "menuCodes": ["crowdfunding:platforms", "crowdfunding:projects", "crowdfunding:shipments"],
131
+ "updatedAt": "2026-09-09"
132
+ },
133
+ {
134
+ "id": "module.partner",
135
+ "title": "合作商门户",
136
+ "summary": "嘉宾用户查看订单、资金和专属仓库库存的范围与限制。",
137
+ "category": "modules",
138
+ "relatedTopicIds": ["module.sales", "document.sales-order", "guide.login-and-authorization"],
139
+ "keywords": ["合作商", "嘉宾", "门户", "资金", "专属仓库"],
140
+ "aliases": ["partner portal", "guest user", "partner order", "partner inventory"],
141
+ "path": "topics/modules/partner.md",
142
+ "updatedAt": "2026-09-09"
143
+ },
144
+ {
145
+ "id": "document.sales-order",
146
+ "title": "销售订单办理流程",
147
+ "summary": "销售订单从创建、报价、接单、发货、财务处理到确认收货的办理说明。",
148
+ "category": "documents",
149
+ "relatedTopicIds": ["module.sales", "module.inventory", "module.finance", "troubleshooting.document-correction"],
150
+ "keywords": ["销售订单流程", "报价", "接单", "待发货", "财务处理", "确认收货"],
151
+ "aliases": ["sales order workflow", "sales order process", "sales.orders"],
152
+ "path": "topics/documents/sales-order.md",
153
+ "resourceNames": ["sales.orders"],
154
+ "menuCodes": ["sales:orders"],
155
+ "flowCode": "SALES_ORDER",
156
+ "updatedAt": "2026-09-09",
157
+ "nodeResponsibilities": {
158
+ "START": "启动销售订单流程。",
159
+ "CREATOR_TYPE": "根据创建人类型判断是否需要先报价。",
160
+ "QUOTE": "为嘉宾创建的订单确认商品价格、数量和结算信息。",
161
+ "ACCEPT": "复核并接单,准备额度或预存资金并创建销售出库。",
162
+ "WAIT_OUTBOUND": "等待全部有效销售出库完成并汇总实际发货。",
163
+ "FINANCE_PROCESS": "核对收款方式并完成销售订单财务处理。",
164
+ "CONFIRM_RECEIPT": "确认客户已收货并结束履约。",
165
+ "END": "完成销售订单流程。"
166
+ }
167
+ },
168
+ {
169
+ "id": "document.direct-order",
170
+ "title": "直销订单办理流程",
171
+ "summary": "直销订单初审、接单、发货和确认收货流程。",
172
+ "category": "documents",
173
+ "relatedTopicIds": ["module.sales", "module.inventory", "troubleshooting.document-correction"],
174
+ "keywords": ["直销订单", "初审", "接单", "发货"],
175
+ "aliases": ["direct sales order", "sales.direct_orders"],
176
+ "path": "topics/documents/direct-order.md",
177
+ "resourceNames": ["sales.direct_orders"],
178
+ "menuCodes": ["sales:direct-orders"],
179
+ "flowCode": "SALES_DIRECT_ORDER",
180
+ "updatedAt": "2026-09-09",
181
+ "nodeResponsibilities": {
182
+ "INITIAL_AUDIT": "核对直销订单来源、客户、商品、数量和价格。",
183
+ "ACCEPT": "确认接单并创建后续出库安排。",
184
+ "WAIT_OUTBOUND": "等待关联出库全部完成。",
185
+ "CONFIRM_RECEIPT": "确认收货并完成直销订单。"
186
+ }
187
+ },
188
+ {
189
+ "id": "document.consignment-reconciliation",
190
+ "title": "代销对账单办理流程",
191
+ "summary": "代销对账单业务审核、财务办理和收款核销说明。",
192
+ "category": "documents",
193
+ "relatedTopicIds": ["module.sales", "module.finance", "troubleshooting.document-correction"],
194
+ "keywords": ["代销", "对账单", "核销", "财务办理"],
195
+ "aliases": ["consignment reconciliation", "sales.consignment_reconciliations"],
196
+ "path": "topics/documents/consignment-reconciliation.md",
197
+ "resourceNames": ["sales.consignment_reconciliations"],
198
+ "menuCodes": ["sales:con-rec"],
199
+ "flowCode": "SALES_CONSIGNMENT_RECONCILIATION",
200
+ "updatedAt": "2026-09-09",
201
+ "nodeResponsibilities": {
202
+ "BUSINESS_APPROVAL": "复核门店对账范围、销售数据和应收金额。",
203
+ "FINANCE_HANDLE": "核对入账流水,办理收款并完成门店库存核销。"
204
+ }
205
+ },
206
+ {
207
+ "id": "document.crowdfunding-order",
208
+ "title": "众筹履约订单办理流程",
209
+ "summary": "众筹履约订单市场审核、发货等待和确认收货流程。",
210
+ "category": "documents",
211
+ "relatedTopicIds": ["module.crowdfunding", "module.inventory", "troubleshooting.document-correction"],
212
+ "keywords": ["众筹履约订单", "市场审核", "来源冲突", "准备发货"],
213
+ "aliases": ["crowdfunding fulfillment order", "sales.crowdfunding_orders"],
214
+ "path": "topics/documents/crowdfunding-order.md",
215
+ "resourceNames": ["sales.crowdfunding_orders"],
216
+ "menuCodes": ["crowdfunding:projects"],
217
+ "flowCode": "CROWDFUNDING_ORDER_FLOW_V2",
218
+ "updatedAt": "2026-09-09",
219
+ "nodeResponsibilities": {
220
+ "MARKET_APPROVAL": "复核来源冲突、单仓和数量,创建唯一销售出库。",
221
+ "WAIT_OUTBOUND": "等待关联出库完成并回写实际发货数量。",
222
+ "CONFIRM_RECEIPT": "确认收货并完成众筹履约订单。"
223
+ }
224
+ },
225
+ {
226
+ "id": "document.purchase-request",
227
+ "title": "采购申请办理流程",
228
+ "summary": "采购申请从部门审核、总经理审核、财务办理到等待入库的流程。",
229
+ "category": "documents",
230
+ "relatedTopicIds": ["module.inventory", "module.finance", "document.inbound-order", "troubleshooting.document-correction"],
231
+ "keywords": ["采购申请", "部门审核", "总经理审核", "财务办理", "等待入库"],
232
+ "aliases": ["purchase request workflow", "inv.purchase_requests"],
233
+ "path": "topics/documents/purchase-request.md",
234
+ "resourceNames": ["inv.purchase_requests"],
235
+ "menuCodes": ["inv:purchases"],
236
+ "flowCode": "PURCHASE_REQUEST",
237
+ "updatedAt": "2026-09-09",
238
+ "nodeResponsibilities": {
239
+ "DEPT_APPROVAL": "由归属部门核对采购必要性、物料和数量。",
240
+ "GENERAL_MANAGER_APPROVAL": "对采购安排和预算作管理审批。",
241
+ "FINANCE_PROCESS": "准备应付或付款安排。",
242
+ "WAIT_INBOUND": "等待关联采购入库完成并汇总差异。"
243
+ }
244
+ },
245
+ {
246
+ "id": "document.inbound-order",
247
+ "title": "入库单办理流程",
248
+ "summary": "不同入库类型的部门审核、明细核实、IQC 和完成入库说明。",
249
+ "category": "documents",
250
+ "relatedTopicIds": ["module.inventory", "document.purchase-request", "troubleshooting.workflow-stuck"],
251
+ "keywords": ["入库单", "采购入库", "生产入库", "调拨入库", "IQC", "核实明细"],
252
+ "aliases": ["inbound order workflow", "goods receipt", "inv.inbound_orders"],
253
+ "path": "topics/documents/inbound-order.md",
254
+ "resourceNames": ["inv.inbound_orders"],
255
+ "menuCodes": ["inv:inbounds"],
256
+ "flowCode": "INBOUND_ORDER",
257
+ "updatedAt": "2026-09-09",
258
+ "nodeResponsibilities": {
259
+ "INBOUND_TYPE": "按入库类型和仓库选择审核路径。",
260
+ "PRODUCTION_WAREHOUSE": "判断生产入库是否进入生产仓路径。",
261
+ "MARKET_DEPT_APPROVAL": "审核市场相关入库。",
262
+ "PRODUCTION_DEPT_APPROVAL": "审核生产入库。",
263
+ "PURCHASE_DEPT_APPROVAL": "审核采购入库。",
264
+ "TRANSFER_RETURN_DEPT_APPROVAL": "审核调拨或退货入库。",
265
+ "OTHER_DEPT_APPROVAL": "审核其他入库。",
266
+ "VERIFY_LINES": "核实实际入库明细和来源差异。",
267
+ "OTHER_VERIFY_LINES": "核实其他类型入库明细。",
268
+ "IQC_INSPECTION": "完成生产入库的质量检验。",
269
+ "COMPLETE_INBOUND": "写入库存、批次和库存流水并完成入库。"
270
+ }
271
+ },
272
+ {
273
+ "id": "document.outbound-order",
274
+ "title": "出库单办理流程",
275
+ "summary": "出库单仓库审核、备货冻结和发货扣减流程。",
276
+ "category": "documents",
277
+ "relatedTopicIds": ["module.inventory", "document.sales-order", "troubleshooting.workflow-stuck"],
278
+ "keywords": ["出库单", "仓库审核", "备货", "冻结库存", "发货"],
279
+ "aliases": ["outbound order workflow", "shipment", "inv.outbound_orders"],
280
+ "path": "topics/documents/outbound-order.md",
281
+ "resourceNames": ["inv.outbound_orders"],
282
+ "menuCodes": ["inv:outbounds"],
283
+ "flowCode": "OUTBOUND_ORDER",
284
+ "updatedAt": "2026-09-09",
285
+ "nodeResponsibilities": {
286
+ "WAREHOUSE_APPROVAL": "仓库核对出库类型、仓库和明细。",
287
+ "PREPARE_OUTBOUND": "按批次备货并冻结可用库存。",
288
+ "SHIP_OUTBOUND": "扣减冻结库存、记录库存流水并通知来源单据。"
289
+ }
290
+ },
291
+ {
292
+ "id": "document.stocktake-order",
293
+ "title": "盘存单办理流程",
294
+ "summary": "盘存审批、库存锁、盘盈盘亏执行和反冲边界。",
295
+ "category": "documents",
296
+ "relatedTopicIds": ["module.inventory", "troubleshooting.document-correction"],
297
+ "keywords": ["盘存单", "盘点", "盘盈", "盘亏", "库存锁"],
298
+ "aliases": ["stocktake order", "inventory count", "inv.stocktake_orders"],
299
+ "path": "topics/documents/stocktake-order.md",
300
+ "resourceNames": ["inv.stocktake_orders"],
301
+ "menuCodes": ["inv:stocktakes"],
302
+ "flowCode": "INV_STOCKTAKE_ORDER",
303
+ "updatedAt": "2026-09-09",
304
+ "nodeResponsibilities": {
305
+ "APPROVAL": "复核盘点明细,并在库存锁保护下执行盘盈、盘亏或平账。"
306
+ }
307
+ },
308
+ {
309
+ "id": "document.expense-request",
310
+ "title": "费用申请办理流程",
311
+ "summary": "费用申请部门审核、总经理审核和财务办理流程。",
312
+ "category": "documents",
313
+ "relatedTopicIds": ["module.administration", "module.finance", "troubleshooting.document-correction"],
314
+ "keywords": ["费用申请", "报销", "部门审核", "总经理审核", "财务办理"],
315
+ "aliases": ["expense request", "reimbursement", "fin.expense_requests"],
316
+ "path": "topics/documents/expense-request.md",
317
+ "resourceNames": ["fin.expense_requests"],
318
+ "menuCodes": ["adm:expenses"],
319
+ "flowCode": "FIN_EXPENSE_REQUEST",
320
+ "updatedAt": "2026-09-09",
321
+ "nodeResponsibilities": {
322
+ "DEPT_APPROVAL": "核对费用归属、事由、金额和附件。",
323
+ "GENERAL_MANAGER_APPROVAL": "对费用合理性和管理授权作审批。",
324
+ "FINANCE_HANDLE": "复核财务资料并生成应付账款。"
325
+ }
326
+ },
327
+ {
328
+ "id": "document.invoice-request",
329
+ "title": "开票申请办理流程",
330
+ "summary": "开票申请财务审核和开票办理流程。",
331
+ "category": "documents",
332
+ "relatedTopicIds": ["module.finance", "troubleshooting.document-correction"],
333
+ "keywords": ["开票申请", "发票", "财务审核", "开票办理"],
334
+ "aliases": ["invoice request", "fin.invoice_requests"],
335
+ "path": "topics/documents/invoice-request.md",
336
+ "resourceNames": ["fin.invoice_requests"],
337
+ "menuCodes": ["fin:invoices"],
338
+ "flowCode": "FIN_INVOICE_REQUEST",
339
+ "updatedAt": "2026-09-09",
340
+ "nodeResponsibilities": {
341
+ "FINANCE_APPROVAL": "核对购方、税号、金额和开票依据。",
342
+ "INVOICE_HANDLE": "登记实际开票信息并完成申请。"
343
+ }
344
+ },
345
+ {
346
+ "id": "document.refund-request",
347
+ "title": "退款申请办理流程",
348
+ "summary": "退款申请财务办理、付款完成和上游恢复说明。",
349
+ "category": "documents",
350
+ "relatedTopicIds": ["module.finance", "document.sales-order", "troubleshooting.document-correction"],
351
+ "keywords": ["退款申请", "退款", "财务办理", "付款", "撤销"],
352
+ "aliases": ["refund request", "fin.refund_requests"],
353
+ "path": "topics/documents/refund-request.md",
354
+ "resourceNames": ["fin.refund_requests"],
355
+ "menuCodes": ["fin:refund-requests"],
356
+ "flowCode": "FIN_REFUND_REQUEST",
357
+ "updatedAt": "2026-09-09",
358
+ "nodeResponsibilities": {
359
+ "FINANCE_HANDLE": "核对退款来源、收款记录、金额和收款账户。",
360
+ "COMPLETE": "生成应付和付款并完成退款,按来源恢复上游业务。"
361
+ }
362
+ },
363
+ {
364
+ "id": "document.supply-entry-order",
365
+ "title": "用品录入单办理流程",
366
+ "summary": "行政用品录入的部门审核、部门办理和库存增加说明。",
367
+ "category": "documents",
368
+ "relatedTopicIds": ["module.administration", "troubleshooting.document-correction"],
369
+ "keywords": ["用品录入单", "用品入库", "部门审核", "部门办理"],
370
+ "aliases": ["supply entry order", "adm.supply_entry_orders"],
371
+ "path": "topics/documents/supply-entry-order.md",
372
+ "resourceNames": ["adm.supply_entry_orders"],
373
+ "menuCodes": ["adm:sup-entries"],
374
+ "flowCode": "ADM_SUPPLY_ENTRY_ORDER",
375
+ "updatedAt": "2026-09-09",
376
+ "nodeResponsibilities": {
377
+ "DEPT_APPROVAL": "审核用品、数量、仓库和录入原因。",
378
+ "DEPT_HANDLE": "执行用品库存增加并完成录入。"
379
+ }
380
+ },
381
+ {
382
+ "id": "document.supply-issue-request",
383
+ "title": "用品领用申请办理流程",
384
+ "summary": "行政用品领用审核、发放和库存扣减说明。",
385
+ "category": "documents",
386
+ "relatedTopicIds": ["module.administration", "troubleshooting.document-correction"],
387
+ "keywords": ["用品领用", "领用申请", "用品发放", "资产"],
388
+ "aliases": ["supply issue request", "adm.supply_issue_requests"],
389
+ "path": "topics/documents/supply-issue-request.md",
390
+ "resourceNames": ["adm.supply_issue_requests"],
391
+ "menuCodes": ["adm:sup-issues"],
392
+ "flowCode": "ADM_SUPPLY_ISSUE_REQUEST",
393
+ "updatedAt": "2026-09-09",
394
+ "nodeResponsibilities": {
395
+ "DEPT_APPROVAL": "审核领用人、用品、数量和用途。",
396
+ "DEPT_HANDLE": "发放用品,扣减库存并按需形成资产记录。"
397
+ }
398
+ },
399
+ {
400
+ "id": "document.supply-purchase-request",
401
+ "title": "用品采购申请办理流程",
402
+ "summary": "行政用品采购审核、办理和费用关联说明。",
403
+ "category": "documents",
404
+ "relatedTopicIds": ["module.administration", "document.expense-request", "troubleshooting.document-correction"],
405
+ "keywords": ["用品采购", "采购申请", "费用申请", "项目计划"],
406
+ "aliases": ["supply purchase request", "adm.supply_purchase_requests"],
407
+ "path": "topics/documents/supply-purchase-request.md",
408
+ "resourceNames": ["adm.supply_purchase_requests"],
409
+ "menuCodes": ["adm:sup-purchases"],
410
+ "flowCode": "ADM_SUPPLY_PURCHASE_REQUEST",
411
+ "updatedAt": "2026-09-09",
412
+ "nodeResponsibilities": {
413
+ "DEPT_APPROVAL": "审核采购用品、数量、费用来源和项目计划。",
414
+ "DEPT_HANDLE": "完成采购办理并登记后续用品录入依据。"
415
+ }
416
+ },
417
+ {
418
+ "id": "document.supply-stocktake-order",
419
+ "title": "用品盘点单办理流程",
420
+ "summary": "行政用品盘点审核、办理和库存调整说明。",
421
+ "category": "documents",
422
+ "relatedTopicIds": ["module.administration", "troubleshooting.document-correction"],
423
+ "keywords": ["用品盘点", "用品库存", "盘盈", "盘亏"],
424
+ "aliases": ["supply stocktake order", "adm.supply_stocktake_orders"],
425
+ "path": "topics/documents/supply-stocktake-order.md",
426
+ "resourceNames": ["adm.supply_stocktake_orders"],
427
+ "menuCodes": ["adm:sup-stocktakes"],
428
+ "flowCode": "ADM_SUPPLY_STOCKTAKE_ORDER",
429
+ "updatedAt": "2026-09-09",
430
+ "nodeResponsibilities": {
431
+ "DEPT_APPROVAL": "审核盘点范围、账面数和实盘数。",
432
+ "DEPT_HANDLE": "执行用品库存调整并记录盘点结果。"
433
+ }
434
+ },
435
+ {
436
+ "id": "document.leave-request",
437
+ "title": "请假申请办理流程",
438
+ "summary": "请假申请的部门审批、主管审批和返岗办理说明。",
439
+ "category": "documents",
440
+ "relatedTopicIds": ["module.administration", "troubleshooting.document-correction"],
441
+ "keywords": ["请假申请", "部门审批", "主管审批", "返岗"],
442
+ "aliases": ["leave request", "absence request"],
443
+ "path": "topics/documents/leave-request.md",
444
+ "menuCodes": ["adm:leaves"],
445
+ "flowCode": "adm_leave_request.default",
446
+ "updatedAt": "2026-09-09",
447
+ "nodeResponsibilities": {
448
+ "DEPT_APPROVAL": "由申请人所属部门审核请假安排。",
449
+ "DIRECTOR_APPROVAL": "由主管复核请假安排和工作交接。",
450
+ "RETURN_HANDLE": "确认返岗并完成请假流程。"
451
+ }
452
+ },
453
+ {
454
+ "id": "guide.login-and-authorization",
455
+ "title": "登录与最小授权",
456
+ "summary": "连接 DiffCat、选择 profile、申请最小能力和处理授权失效。",
457
+ "category": "guides",
458
+ "relatedTopicIds": ["overview.system", "guide.recovery", "troubleshooting.permission-and-not-found"],
459
+ "keywords": ["登录", "授权", "profile", "能力", "权限失效"],
460
+ "aliases": ["login", "authentication", "authorization", "grant", "profile"],
461
+ "path": "topics/guides/login-and-authorization.md",
462
+ "updatedAt": "2026-09-09"
463
+ },
464
+ {
465
+ "id": "guide.master-data-and-query",
466
+ "title": "基础资料与业务查询",
467
+ "summary": "按名称解析资料、查询列表和详情,并正确处理分页与重名。",
468
+ "category": "guides",
469
+ "relatedTopicIds": ["guide.login-and-authorization", "guide.document-drafts", "troubleshooting.permission-and-not-found"],
470
+ "keywords": ["基础资料", "查询", "列表", "详情", "分页", "重名"],
471
+ "aliases": ["master data", "resource query", "list", "get", "pagination"],
472
+ "path": "topics/guides/master-data-and-query.md",
473
+ "updatedAt": "2026-09-09"
474
+ },
475
+ {
476
+ "id": "guide.document-drafts",
477
+ "title": "创建单据草稿",
478
+ "summary": "准备业务字段、解析基础资料并创建和回查单据草稿。",
479
+ "category": "guides",
480
+ "relatedTopicIds": ["guide.master-data-and-query", "guide.workflow-tasks", "guide.recovery"],
481
+ "keywords": ["创建草稿", "新建单据", "必填信息", "回查"],
482
+ "aliases": ["create draft", "document draft", "create document"],
483
+ "path": "topics/guides/document-drafts.md",
484
+ "updatedAt": "2026-09-09"
485
+ },
486
+ {
487
+ "id": "guide.workflow-tasks",
488
+ "title": "流程待办与审批",
489
+ "summary": "查看当前办理人的任务、理解节点职责并安全办理支持的审批。",
490
+ "category": "guides",
491
+ "relatedTopicIds": ["guide.document-drafts", "troubleshooting.workflow-stuck", "guide.recovery"],
492
+ "keywords": ["待办", "审批", "办理人", "流程任务", "抄送"],
493
+ "aliases": ["workflow task", "approval", "assignee", "pending task"],
494
+ "path": "topics/guides/workflow-tasks.md",
495
+ "updatedAt": "2026-09-09"
496
+ },
497
+ {
498
+ "id": "guide.recovery",
499
+ "title": "失败恢复与安全重试",
500
+ "summary": "处理中断、状态未知、网页确认、校验失败和授权撤销。",
501
+ "category": "guides",
502
+ "relatedTopicIds": ["guide.login-and-authorization", "guide.document-drafts", "guide.workflow-tasks"],
503
+ "keywords": ["失败", "恢复", "重试", "状态未知", "确认", "幂等"],
504
+ "aliases": ["recovery", "retry", "unknown status", "idempotency", "verification failed"],
505
+ "path": "topics/guides/recovery.md",
506
+ "updatedAt": "2026-09-09"
507
+ },
508
+ {
509
+ "id": "troubleshooting.document-correction",
510
+ "title": "单据填错后的处理判断",
511
+ "summary": "根据单号、单据状态、当前用户身份、流程权限和下游影响选择修正方案。",
512
+ "category": "troubleshooting",
513
+ "relatedTopicIds": ["guide.master-data-and-query", "guide.workflow-tasks", "guide.recovery", "document.sales-order"],
514
+ "keywords": ["订单填错了", "单据填错", "怎么改", "修改订单", "撤回", "重建", "取消"],
515
+ "aliases": ["wrong order", "correct document", "edit submitted order", "fix order"],
516
+ "path": "topics/troubleshooting/document-correction.md",
517
+ "updatedAt": "2026-09-09"
518
+ },
519
+ {
520
+ "id": "troubleshooting.permission-and-not-found",
521
+ "title": "没有权限或查不到数据",
522
+ "summary": "区分未登录、未授权、无菜单权限、对象范围限制和查询条件问题。",
523
+ "category": "troubleshooting",
524
+ "relatedTopicIds": ["guide.login-and-authorization", "guide.master-data-and-query", "overview.navigation"],
525
+ "keywords": ["没有权限", "查不到", "不存在", "无结果", "越权"],
526
+ "aliases": ["permission denied", "not found", "empty result", "missing capability"],
527
+ "path": "topics/troubleshooting/permission-and-not-found.md",
528
+ "updatedAt": "2026-09-09"
529
+ },
530
+ {
531
+ "id": "troubleshooting.workflow-stuck",
532
+ "title": "流程停滞与待办诊断",
533
+ "summary": "判断流程是否在人工节点、等待外部事件、办理人缺失或下游失败。",
534
+ "category": "troubleshooting",
535
+ "relatedTopicIds": ["guide.workflow-tasks", "guide.recovery", "document.inbound-order", "document.outbound-order"],
536
+ "keywords": ["流程卡住", "一直等待", "没有待办", "办理人", "发货未完成", "入库未完成"],
537
+ "aliases": ["workflow stuck", "missing task", "wait node", "no assignee"],
538
+ "path": "topics/troubleshooting/workflow-stuck.md",
539
+ "updatedAt": "2026-09-09"
540
+ }
541
+ ]
542
+ }
@@ -0,0 +1,7 @@
1
+ # 代销对账单办理流程
2
+
3
+ 代销对账单用于把门店代销期间的销售结果汇总为可审核、可收款核销的业务依据。创建前应核对门店、对账期间、销售明细、退货或差异及应收金额。
4
+
5
+ 基线流程包含业务审核和财务办理。业务审核确认对账范围与销售数据;财务办理核对入账流水、生成或处理收款,并完成门店库存核销。实际配置使用 `knowledge flow SALES_CONSIGNMENT_RECONCILIATION` 查询。
6
+
7
+ 完成核销后发现错误时,应先检查收款和库存结果,再选择受控的撤销、冲正或重建路径。
@@ -0,0 +1,7 @@
1
+ # 众筹履约订单办理流程
2
+
3
+ 众筹履约订单承接平台订单导入后的审核、出库与收货确认。办理前核对平台项目、外部订单唯一性、收货地址、商品映射、仓库和数量。
4
+
5
+ 基线流程为市场审核、等待出库和确认收货。市场审核需要处理来源冲突并确保唯一出库;等待节点汇总实际发货;确认收货结束履约。当前发布配置使用 `knowledge flow CROWDFUNDING_ORDER_FLOW_V2` 查询。
6
+
7
+ 已创建出库或已发货时,不得重复生成履约;应结合下游出库和发货记录诊断。
@@ -0,0 +1,7 @@
1
+ # 直销订单办理流程
2
+
3
+ 直销订单用于较直接的销售履约。创建前核对客户、商品、价格、数量、收货信息和仓库安排。
4
+
5
+ 基线流程为初审、接单、等待出库、确认收货。初审关注订单来源与交易字段;接单确认可履约性并安排出库;等待节点依赖全部有效出库完成;确认收货结束订单。当前节点和办理人以 `knowledge flow SALES_DIRECT_ORDER` 返回的发布版本为准。
6
+
7
+ 若订单已生成出库或已经发货,修正必须连同库存和履约结果一起判断,不能仅改原订单字段。
@@ -0,0 +1,7 @@
1
+ # 费用申请办理流程
2
+
3
+ 费用申请用于提交费用或报销事项,并在完成后形成财务应付。创建前准备申请人、归属部门、费用科目、事由、金额、项目或计划以及必要附件。
4
+
5
+ 基线流程为部门审核、总经理审核和财务办理。部门核对归属和凭据;总经理作管理审批;财务复核并生成应付账款。实际版本用 `knowledge flow FIN_EXPENSE_REQUEST` 查询。
6
+
7
+ 若应付已经生成,纠错要同时检查应付和后续付款;附件或金额问题不能只修改原申请而忽略财务结果。
@@ -0,0 +1,7 @@
1
+ # 入库单办理流程
2
+
3
+ 入库单记录采购、生产、调拨退货或其他来源的实际入库。创建前确认入库类型、来源单据、仓库、物料、批次和数量。
4
+
5
+ 流程会按入库类型和仓库选择部门审核路径,再核实实际明细;生产入库可能需要 IQC;完成节点才正式写入库存、批次和流水。当前分支与办理人以 `knowledge flow INBOUND_ORDER` 为准。
6
+
7
+ 流程停在等待或核实时,应检查来源单据、明细差异、质量检验和办理人。已完成入库后发现错误,需要评估库存反冲或后续调整,不能当作未提交草稿修改。
@@ -0,0 +1,7 @@
1
+ # 开票申请办理流程
2
+
3
+ 开票申请用于基于真实交易向购方开具发票。创建前核对购方名称、税号、地址电话、开户信息、开票内容、金额和业务依据。
4
+
5
+ 基线流程包含财务审核和开票办理。审核节点确认购方、金额和依据;办理节点登记实际发票信息并完成申请。当前配置使用 `knowledge flow FIN_INVOICE_REQUEST` 查询。
6
+
7
+ 已开票后发现错误时,应按发票和财务制度判断红冲、作废或重开,不能仅修改申请记录。
@@ -0,0 +1,7 @@
1
+ # 请假申请办理流程
2
+
3
+ 请假申请记录员工的请假类型、起止时间、原因、工作交接和返岗情况。创建前应确认申请人部门、主管关系和时间是否冲突。
4
+
5
+ 基线流程包含部门审批、主管审批和返岗办理;具体节点可随组织和流程配置变化。使用 `knowledge flow adm_leave_request.default` 查询当前发布版本和办理人。
6
+
7
+ 提交后填错时,应先查看当前待办和是否允许撤回。已经审批或进入请假期间时,还需考虑排班、考勤及工作交接影响。
@@ -0,0 +1,7 @@
1
+ # 出库单办理流程
2
+
3
+ 出库单承接销售、调拨或其他领用来源,控制从审核到库存扣减的全过程。创建前确认出库类型、来源、仓库、物料或商品、批次和数量。
4
+
5
+ 基线流程为仓库审核、备货和发货。仓库审核核对来源及明细;备货按批次冻结可用库存;发货扣减冻结库存、记录流水并通知来源单据。当前配置使用 `knowledge flow OUTBOUND_ORDER` 查询。
6
+
7
+ 卡在备货时重点检查可用库存、批次和冻结;已发货后修正会影响库存和上游订单,必须走受控处理路径。