openxiangda-skill-kit 2.3.119 → 2.3.121

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openxiangda-skill-kit",
3
- "version": "2.3.119",
3
+ "version": "2.3.121",
4
4
  "description": "OpenXiangda 2.0 中文 AI 技能的校验、分发与安装。",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -17,7 +17,7 @@
17
17
  "README.md"
18
18
  ],
19
19
  "dependencies": {
20
- "openxiangda-devkit-core": "2.68.0"
20
+ "openxiangda-devkit-core": "2.69.1"
21
21
  },
22
22
  "devDependencies": {
23
23
  "tsx": "4.23.12",
@@ -206,3 +206,17 @@ Native记录事件才能使用 `ordering:record`。订阅错误先修正应用
206
206
  在已经授权清理的范围运行 `acceptance-data.execute-cleanup`,核对金丝雀原回执,再把 mode 改为 remaining。丢响应先 preview/status,不换 run 或 digest;pending 清单复用原 repair。每份计划最多100条/1MiB,终结后重新 preview 下一批。外部修改、坏凭证、变化 Head、未知/预算结果及部分失败不会返回 purged。只有完整读回 `cleanupState: purged` 和剩余0表示此批 owned Native 数据验空;registry、参与者、凭证、审计和原修复回执保留。
207
207
 
208
208
  MCP仍通过 `application_operations/application_operation` 使用同一目录,不提供任意URL或重建来源。生产、旧数据、其他run不接受此入口。目录可用不代表目标平台已升级;404核对版本,不用直接SQL旁路。
209
+
210
+
211
+ ## 旧审批当前节点接续
212
+
213
+ `admin execute workflows.legacy-prepare --environment test --input <file> --json`
214
+ 使用应用超级管理员身份锁定现有 Native 业务单、版本、原申请人、审批轮次与历史事实。
215
+ 输入契约从 `admin operations --json` 查询。未导入的原单先通过正式 Native 导入协议
216
+ 保留 UUID,不能用新建流程替代。仅支持内部分派、手动审批和线性条件路径;姓名无法
217
+ 证明账号、历史不完整或分支不匹配时拒绝接续。
218
+
219
+ 准备成功后保留 planId、planDigest,通过 `workflows.legacy-apply` 原子创建当前节点
220
+ 及待办。`workflows.legacy-receipt` 查询原回执,结果未知时沿用原计划查询/重试。
221
+ 历史审批只作为来源事实保留,不伪造旧 V2 操作、发起人登录或历史通知。角色撤销、
222
+ 原单、Head 或有效配置变化会拒绝尚未执行的旧计划;已执行计划返回原实例。
@@ -288,6 +288,327 @@ MCP 使用项目锁定的根包;在客户端配置下列 stdio 启动参数,
288
288
  {
289
289
  "type": "object",
290
290
  "oneOf": [
291
+ {
292
+ "type": "object",
293
+ "additionalProperties": false,
294
+ "properties": {
295
+ "operation": {
296
+ "const": "workflows.legacy-prepare",
297
+ "description": "准备旧审批当前节点接续,冻结原申请人、轮次、历史和Native业务单"
298
+ },
299
+ "environment": {
300
+ "type": "string",
301
+ "enum": [
302
+ "test",
303
+ "production"
304
+ ]
305
+ },
306
+ "input": {
307
+ "type": "object",
308
+ "additionalProperties": false,
309
+ "properties": {
310
+ "schemaVersion": {
311
+ "const": "openxiangda.workflow-legacy-adoption-prepare/v2"
312
+ },
313
+ "requestKey": {
314
+ "type": "string",
315
+ "minLength": 1,
316
+ "maxLength": 128
317
+ },
318
+ "reason": {
319
+ "type": "string",
320
+ "minLength": 1,
321
+ "maxLength": 1000
322
+ },
323
+ "expectedHeadRevision": {
324
+ "type": "integer",
325
+ "minimum": 1,
326
+ "maximum": 9007199254740991
327
+ },
328
+ "workflowCode": {
329
+ "type": "string",
330
+ "minLength": 1,
331
+ "maxLength": 128,
332
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$"
333
+ },
334
+ "resourceCode": {
335
+ "type": "string",
336
+ "minLength": 1,
337
+ "maxLength": 128,
338
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$"
339
+ },
340
+ "recordId": {
341
+ "type": "string",
342
+ "minLength": 1,
343
+ "maxLength": 36,
344
+ "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
345
+ },
346
+ "expectedRevision": {
347
+ "type": "integer",
348
+ "minimum": 1,
349
+ "maximum": 9007199254740991
350
+ },
351
+ "source": {
352
+ "type": "object",
353
+ "additionalProperties": false,
354
+ "properties": {
355
+ "system": {
356
+ "type": "string",
357
+ "minLength": 1,
358
+ "maxLength": 128,
359
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$"
360
+ },
361
+ "recordKey": {
362
+ "type": "string",
363
+ "minLength": 1,
364
+ "maxLength": 255
365
+ },
366
+ "snapshotSha256": {
367
+ "type": "string",
368
+ "minLength": 1,
369
+ "maxLength": 64,
370
+ "pattern": "^[0-9a-f]{64}$"
371
+ },
372
+ "recordSha256": {
373
+ "type": "string",
374
+ "minLength": 1,
375
+ "maxLength": 64,
376
+ "pattern": "^[0-9a-f]{64}$"
377
+ }
378
+ },
379
+ "required": [
380
+ "system",
381
+ "recordKey",
382
+ "snapshotSha256",
383
+ "recordSha256"
384
+ ]
385
+ },
386
+ "checkpoint": {
387
+ "type": "object",
388
+ "additionalProperties": false,
389
+ "properties": {
390
+ "initiatorUserId": {
391
+ "type": "string",
392
+ "minLength": 1,
393
+ "maxLength": 36,
394
+ "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
395
+ },
396
+ "approvalRound": {
397
+ "type": "integer",
398
+ "minimum": 1,
399
+ "maximum": 2147483647
400
+ },
401
+ "currentNodeId": {
402
+ "type": "string",
403
+ "minLength": 1,
404
+ "maxLength": 128,
405
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$"
406
+ },
407
+ "initiatorField": {
408
+ "type": "string",
409
+ "minLength": 1,
410
+ "maxLength": 63,
411
+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,62}$"
412
+ },
413
+ "initiatorIdentityField": {
414
+ "type": "string",
415
+ "minLength": 1,
416
+ "maxLength": 63,
417
+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,62}$"
418
+ },
419
+ "roundField": {
420
+ "type": "string",
421
+ "minLength": 1,
422
+ "maxLength": 63,
423
+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,62}$"
424
+ },
425
+ "stateField": {
426
+ "type": "string",
427
+ "minLength": 1,
428
+ "maxLength": 63,
429
+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,62}$"
430
+ },
431
+ "stateValue": {
432
+ "type": "string",
433
+ "minLength": 1,
434
+ "maxLength": 255
435
+ },
436
+ "history": {
437
+ "type": "array",
438
+ "maxItems": 64,
439
+ "items": {
440
+ "type": "object",
441
+ "additionalProperties": false,
442
+ "properties": {
443
+ "nodeId": {
444
+ "type": "string",
445
+ "minLength": 1,
446
+ "maxLength": 128,
447
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$"
448
+ },
449
+ "reviewerDisplay": {
450
+ "type": "string",
451
+ "minLength": 1,
452
+ "maxLength": 255
453
+ },
454
+ "reviewedAt": {
455
+ "type": "string",
456
+ "minLength": 1,
457
+ "maxLength": 64
458
+ },
459
+ "opinion": {
460
+ "type": "string",
461
+ "maxLength": 8192
462
+ },
463
+ "reviewerField": {
464
+ "type": "string",
465
+ "minLength": 1,
466
+ "maxLength": 63,
467
+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,62}$"
468
+ },
469
+ "reviewedAtField": {
470
+ "type": "string",
471
+ "minLength": 1,
472
+ "maxLength": 63,
473
+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,62}$"
474
+ },
475
+ "opinionField": {
476
+ "type": "string",
477
+ "minLength": 1,
478
+ "maxLength": 63,
479
+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,62}$"
480
+ }
481
+ },
482
+ "required": [
483
+ "nodeId",
484
+ "reviewerDisplay",
485
+ "reviewedAt",
486
+ "opinion",
487
+ "reviewerField",
488
+ "reviewedAtField",
489
+ "opinionField"
490
+ ]
491
+ }
492
+ }
493
+ },
494
+ "required": [
495
+ "initiatorUserId",
496
+ "approvalRound",
497
+ "currentNodeId",
498
+ "initiatorField",
499
+ "initiatorIdentityField",
500
+ "roundField",
501
+ "stateField",
502
+ "stateValue",
503
+ "history"
504
+ ]
505
+ }
506
+ },
507
+ "required": [
508
+ "schemaVersion",
509
+ "requestKey",
510
+ "reason",
511
+ "expectedHeadRevision",
512
+ "workflowCode",
513
+ "resourceCode",
514
+ "recordId",
515
+ "expectedRevision",
516
+ "source",
517
+ "checkpoint"
518
+ ]
519
+ }
520
+ },
521
+ "required": [
522
+ "operation",
523
+ "environment",
524
+ "input"
525
+ ]
526
+ },
527
+ {
528
+ "type": "object",
529
+ "additionalProperties": false,
530
+ "properties": {
531
+ "operation": {
532
+ "const": "workflows.legacy-apply",
533
+ "description": "按原计划摘要原子接续当前节点,仅创建当前待办"
534
+ },
535
+ "environment": {
536
+ "type": "string",
537
+ "enum": [
538
+ "test",
539
+ "production"
540
+ ]
541
+ },
542
+ "input": {
543
+ "type": "object",
544
+ "additionalProperties": false,
545
+ "properties": {
546
+ "schemaVersion": {
547
+ "const": "openxiangda.workflow-legacy-adoption-apply/v2"
548
+ },
549
+ "planId": {
550
+ "type": "string",
551
+ "minLength": 1,
552
+ "maxLength": 36,
553
+ "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
554
+ },
555
+ "expectedPlanDigest": {
556
+ "type": "string",
557
+ "minLength": 1,
558
+ "maxLength": 64,
559
+ "pattern": "^[0-9a-f]{64}$"
560
+ }
561
+ },
562
+ "required": [
563
+ "schemaVersion",
564
+ "planId",
565
+ "expectedPlanDigest"
566
+ ]
567
+ }
568
+ },
569
+ "required": [
570
+ "operation",
571
+ "environment",
572
+ "input"
573
+ ]
574
+ },
575
+ {
576
+ "type": "object",
577
+ "additionalProperties": false,
578
+ "properties": {
579
+ "operation": {
580
+ "const": "workflows.legacy-receipt",
581
+ "description": "读取旧审批接续准备或执行回执"
582
+ },
583
+ "environment": {
584
+ "type": "string",
585
+ "enum": [
586
+ "test",
587
+ "production"
588
+ ]
589
+ },
590
+ "input": {
591
+ "type": "object",
592
+ "additionalProperties": false,
593
+ "properties": {
594
+ "planId": {
595
+ "type": "string",
596
+ "minLength": 1,
597
+ "maxLength": 36,
598
+ "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
599
+ }
600
+ },
601
+ "required": [
602
+ "planId"
603
+ ]
604
+ }
605
+ },
606
+ "required": [
607
+ "operation",
608
+ "environment",
609
+ "input"
610
+ ]
611
+ },
291
612
  {
292
613
  "type": "object",
293
614
  "additionalProperties": false,
@@ -1261,3 +1261,24 @@ pnpm openxiangda workflow sync request-review --from production --to test \
1261
1261
  新节点尚未填完标准成员/角色时可以保存草稿;正式发布与办理覆盖仍完整校验。服务端重新读取实际上下文,不信任浏览器自报目录或已校验标志。AI提案同样经过原binding/canvas门禁;不能把草稿可保存解释为可发布。
1262
1262
 
1263
1263
  冲突、失权或结果未知时保留整个assignment及原operationId,不自动合并分支、不静默丢失条件。已进入流程的任务仍使用原冻结快照,新的规则不回写历史任务。源码同步、配置与发布分别核对原Head/版本和操作回执。
1264
+
1265
+
1266
+ ### 应用事务拥有的业务待办
1267
+
1268
+ 预约分配、结算确认等非 Workflow 的业务任务,可由同一 Native 事务写入业务状态并
1269
+ 发送不可变自定义事件。订阅显式声明
1270
+ `platformAccess.notification: { mode: 'business-task', taskCodes: ['booking-review'] }`,
1271
+ 验证签名的 Nest 事件消费者使用 `OpenXiangdaBusinessNotificationService.sendTaskFromEvent`。
1272
+ 平台协商 `notification-hub-v2.event-tasks` 能力并检查当前运行 Head 和封存的任务代码清单。
1273
+
1274
+ 输入使用 `openxiangda.notification.event-task-send/v2`,通过 taskCodePath、recordKeyPath、
1275
+ generationPath、sequencePath、statePath、recipientPaths、titlePath 和可选 summaryPath
1276
+ 投影原事件,状态只能是 action_required/completed/rejected/cancelled。不接收调用者
1277
+ 自拟收件人或消息键。navigationTarget 使用同应用 AUTHENTICATED APP_ROUTE,原页面
1278
+ 重新验证办理权限;不生成 Workflow 回调或审批令牌。
1279
+
1280
+ 同一业务键和轮次只产生一个待办;重新申请必须创建新的 generation。终态先到、
1281
+ 乱序和重试不会重新打开旧待办。应用应冻结原任务收件人,在原业务事务中关闭旧轮次
1282
+ 并创建下一轮,不因管理员变化覆盖旧任务。此能力复用平台任务中心、通知发件箱、
1283
+ 供应方关闭和审计;普通 informational 通知仍不能创建待办。业务提交成功不等于
1284
+ 供应方投递或用户收到,分别核对业务回执、事件投递和消息详情。