@lingjingai/lj-awb-cli-pre 0.4.6 → 0.4.8

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.
@@ -344,7 +344,7 @@ const VIRTUAL_COMMANDS = [
344
344
  ].join('\n'),
345
345
  args: [
346
346
  { name: 'brief', description: '输出面向 Agent 的轻量能力摘要,不展开每个参数' },
347
- { name: 'domain', valueName: 'name', description: '按命令域过滤,如 create / task / artifact / system' },
347
+ { name: 'domain', valueName: 'name', description: '按命令域过滤,如 create / task / system' },
348
348
  { name: 'command', valueName: 'name', description: '按子命令过滤,如 image / video / wait / doctor' },
349
349
  ],
350
350
  },
@@ -386,7 +386,8 @@ const RENAMED_COMMAND_HINTS = {
386
386
  'workspace team-select': 'account switch-team',
387
387
  'workspace project-groups': 'project list',
388
388
  'workspace project-group-current': 'project current',
389
- 'workspace project-group-select': 'project use',
389
+ 'workspace project-group-select': 'project switch',
390
+ 'project use': 'project switch',
390
391
  'workspace project-group-users': 'project users',
391
392
  'workspace project-group-create': 'project create',
392
393
  'workspace project-group-update': 'project update',
@@ -464,40 +465,11 @@ const GROUP_DESCRIPTIONS = {
464
465
  create: '创建:统一提交图片、视频、主体、音色、素材和视频去字幕任务',
465
466
  upload: '上传:把本地文件上传为平台可访问素材',
466
467
  task: '任务:任务列表、等待和本地任务台账',
467
- artifact: '最终产物:剧本、资产、视频、剪辑 CRUD 与本地 JSON 导入',
468
468
  };
469
469
 
470
- const SUBGROUP_DESCRIPTIONS = {
471
- artifact: {
472
- script: '剧本:document / asset / state / speaker / episode / scene / action 行 CRUD 与 script.json 批量导入',
473
- asset: '资产:角色 / 道具 / 场景 及其状态 CRUD,actors/props/locations JSON 批量导入',
474
- video: '视频:集 / 场 / clip 三级最终产物 CRUD 与 storyboard 批量导入',
475
- clip: '剪辑:按集组织的剪辑宽表 CRUD 与状态更新',
476
- },
477
- };
470
+ const SUBGROUP_DESCRIPTIONS = {};
478
471
 
479
- const SUBGROUP_EXAMPLES = {
480
- 'artifact script': [
481
- 'lj-awb artifact script import --project-id <projectId> --input-file 1_script/output/script.json --dry-run',
482
- 'lj-awb artifact script get --project-id <projectId>',
483
- 'lj-awb artifact script rows --project-id <projectId> --row-kind scene',
484
- ],
485
- 'artifact asset': [
486
- 'lj-awb artifact asset import --project-id <projectId> --input-dir 2_asset/output --dry-run',
487
- 'lj-awb artifact asset actors --project-id <projectId> --include-states true',
488
- 'lj-awb artifact asset props --project-id <projectId>',
489
- ],
490
- 'artifact video': [
491
- 'lj-awb artifact video import-storyboard --project-id <projectId> --input-file 3_footage/output/ep001/ep001_storyboard.json --dry-run',
492
- 'lj-awb artifact video episodes --project-id <projectId>',
493
- 'lj-awb artifact video clips --project-id <projectId> --episode-id ep_001 --scene-id scn_001',
494
- ],
495
- 'artifact clip': [
496
- 'lj-awb artifact clip upsert-episode --project-id <projectId> --input-file 4_clip/output/ep001_clip_output.json --dry-run',
497
- 'lj-awb artifact clip episodes --project-id <projectId>',
498
- 'lj-awb artifact clip episode-by-id --project-id <projectId> --episode-id ep_001',
499
- ],
500
- };
472
+ const SUBGROUP_EXAMPLES = {};
501
473
 
502
474
  const GROUP_EXAMPLES = {
503
475
  system: [
@@ -528,7 +500,7 @@ const GROUP_EXAMPLES = {
528
500
  project: [
529
501
  'lj-awb project list',
530
502
  'lj-awb project current',
531
- 'lj-awb project use --project-group-no <no> --yes',
503
+ 'lj-awb project switch --project-group-no <no> --yes',
532
504
  'lj-awb project create --name "CLI 测试项目" --point 1000 --yes',
533
505
  ],
534
506
  credits: [
@@ -569,12 +541,6 @@ const GROUP_EXAMPLES = {
569
541
  'lj-awb task wait --task-id <id> --task-type IMAGE_CREATE --wait-seconds 180',
570
542
  'lj-awb task records --task-record-file .awb/tasks.jsonl',
571
543
  ],
572
- artifact: [
573
- 'lj-awb artifact script import --project-id <projectId> --input-file 1_script/output/script.json --dry-run',
574
- 'lj-awb artifact asset import --project-id <projectId> --input-dir 2_asset/output --dry-run',
575
- 'lj-awb artifact video import-storyboard --project-id <projectId> --input-file 3_footage/output/ep001/ep001_storyboard.json --dry-run',
576
- 'lj-awb artifact clip upsert-episode --project-id <projectId> --input-file 4_clip/output/ep001_clip_output.json --dry-run',
577
- ],
578
544
  };
579
545
 
580
546
  const COMMAND_REQUIRED_OPTIONS = {
@@ -602,37 +568,6 @@ const COMMAND_REQUIRED_OPTIONS = {
602
568
  'create asset-group': ['name', 'platform'],
603
569
  'create asset-group-update': ['groupId', 'platform'],
604
570
  'create asset': ['groupId', 'name', 'platform'],
605
- 'artifact script row': ['rowKind', 'entityKey'],
606
- 'artifact script children': ['parentKey'],
607
- 'artifact script delete-row': ['rowKind', 'entityKey'],
608
- 'artifact asset actor': ['actorKey'],
609
- 'artifact asset prop': ['propKey'],
610
- 'artifact asset location': ['locationKey'],
611
- 'artifact asset upsert-actor-state': ['actorKey'],
612
- 'artifact asset upsert-prop-state': ['propKey'],
613
- 'artifact asset upsert-location-state': ['locationKey'],
614
- 'artifact asset delete-actor': ['actorKey'],
615
- 'artifact asset delete-prop': ['propKey'],
616
- 'artifact asset delete-location': ['locationKey'],
617
- 'artifact asset delete-actor-state': ['actorKey', 'stateKey'],
618
- 'artifact asset delete-prop-state': ['propKey', 'stateKey'],
619
- 'artifact asset delete-location-state': ['locationKey', 'stateKey'],
620
- 'artifact video episode': ['episodeId'],
621
- 'artifact video scenes': ['episodeId'],
622
- 'artifact video scene': ['episodeId', 'sceneId'],
623
- 'artifact video clips': ['episodeId', 'sceneId'],
624
- 'artifact video clip': ['episodeId', 'sceneId', 'clipId'],
625
- 'artifact video upsert-scene': ['episodeId'],
626
- 'artifact video upsert-clip': ['episodeId', 'sceneId'],
627
- 'artifact video update-clip-urls': ['episodeId', 'sceneId', 'clipId', 'videoUrlsJson'],
628
- 'artifact video delete-episode': ['episodeId'],
629
- 'artifact video delete-scene': ['episodeId', 'sceneId'],
630
- 'artifact video delete-clip': ['episodeId', 'sceneId', 'clipId'],
631
- 'artifact video import-storyboard': ['inputFile'],
632
- 'artifact clip episode': ['videoEpisodeId'],
633
- 'artifact clip episode-by-id': ['episodeId'],
634
- 'artifact clip update-status': ['videoEpisodeId', 'status'],
635
- 'artifact clip delete-episode': ['videoEpisodeId'],
636
571
  'create subject': ['name'],
637
572
  'create subject-wait': ['elementId'],
638
573
  'create subject-voice': ['name'],
@@ -649,61 +584,16 @@ const COMMAND_REQUIRED_ANY_OPTIONS = {
649
584
  'create video-subtitle-removal': [['sourceTaskId']],
650
585
  'create asset-group-update': [['name', 'description', 'projectName']],
651
586
  'create asset': [['file', 'url', 'backendPath']],
652
- 'artifact script upsert-row': [['bodyJson', 'inputFile']],
653
- 'artifact asset upsert-actor': [['bodyJson', 'inputFile']],
654
- 'artifact asset upsert-prop': [['bodyJson', 'inputFile']],
655
- 'artifact asset upsert-location': [['bodyJson', 'inputFile']],
656
- 'artifact asset upsert-actor-state': [['bodyJson', 'inputFile']],
657
- 'artifact asset upsert-prop-state': [['bodyJson', 'inputFile']],
658
- 'artifact asset upsert-location-state': [['bodyJson', 'inputFile']],
659
- 'artifact video upsert-episode': [['bodyJson', 'inputFile']],
660
- 'artifact video upsert-scene': [['bodyJson', 'inputFile']],
661
- 'artifact video upsert-clip': [['bodyJson', 'inputFile']],
662
- 'artifact clip upsert-episode': [['bodyJson', 'inputFile']],
663
- 'artifact clip upsert-batch': [['bodyJson', 'inputFile']],
664
587
  'create subject': [['resource'], ['modelCode']],
665
588
  'create subject-batch': [['modelCode']],
666
589
  'create subject-voice': [['file', 'voiceUrl', 'audioUrl', 'videoId']],
667
590
  'create subject-voice-wait': [['voiceRecordId', 'reqTaskId']],
668
591
  };
669
592
 
670
- const ARTIFACT_WRITE_COMMANDS = [
671
- 'artifact script upsert-row',
672
- 'artifact script delete-row',
673
- 'artifact script import',
674
- 'artifact asset upsert-actor',
675
- 'artifact asset upsert-prop',
676
- 'artifact asset upsert-location',
677
- 'artifact asset upsert-actor-state',
678
- 'artifact asset upsert-prop-state',
679
- 'artifact asset upsert-location-state',
680
- 'artifact asset delete-actor',
681
- 'artifact asset delete-prop',
682
- 'artifact asset delete-location',
683
- 'artifact asset delete-actor-state',
684
- 'artifact asset delete-prop-state',
685
- 'artifact asset delete-location-state',
686
- 'artifact asset import',
687
- 'artifact video upsert-episode',
688
- 'artifact video upsert-scene',
689
- 'artifact video upsert-clip',
690
- 'artifact video update-clip-urls',
691
- 'artifact video delete-episode',
692
- 'artifact video delete-scene',
693
- 'artifact video delete-clip',
694
- 'artifact video import-storyboard',
695
- 'artifact clip upsert-episode',
696
- 'artifact clip upsert-batch',
697
- 'artifact clip update-status',
698
- 'artifact clip delete-episode',
699
- ];
700
-
701
- const ARTIFACT_DELETE_COMMANDS = ARTIFACT_WRITE_COMMANDS.filter((name) => name.includes(' delete-'));
702
-
703
593
  const CONFIRMATION_COMMANDS = new Set([
704
594
  'auth clear',
705
595
  'account switch-team',
706
- 'project use',
596
+ 'project switch',
707
597
  'project create',
708
598
  'project update',
709
599
  'project ensure',
@@ -716,7 +606,6 @@ const CONFIRMATION_COMMANDS = new Set([
716
606
  'create asset-group',
717
607
  'create asset-group-update',
718
608
  'create asset',
719
- ...ARTIFACT_WRITE_COMMANDS,
720
609
  'create subject',
721
610
  'create subject-voice',
722
611
  'create subject-batch',
@@ -733,7 +622,7 @@ const COST_COMMANDS = new Set([
733
622
 
734
623
  const REMOTE_WRITE_COMMANDS = new Set([
735
624
  'account switch-team',
736
- 'project use',
625
+ 'project switch',
737
626
  'project create',
738
627
  'project update',
739
628
  'project ensure',
@@ -748,7 +637,6 @@ const REMOTE_WRITE_COMMANDS = new Set([
748
637
  'create asset-group',
749
638
  'create asset-group-update',
750
639
  'create asset',
751
- ...ARTIFACT_WRITE_COMMANDS,
752
640
  'create subject',
753
641
  'create subject-voice',
754
642
  'create subject-batch',
@@ -759,12 +647,12 @@ const LOCAL_STATE_WRITE_COMMANDS = new Set([
759
647
  'auth login',
760
648
  'auth clear',
761
649
  'auth logout',
762
- 'project use',
650
+ 'project switch',
763
651
  'project create',
764
652
  'project ensure',
765
653
  ]);
766
654
 
767
- const DESTRUCTIVE_COMMANDS = new Set(['auth clear', ...ARTIFACT_DELETE_COMMANDS]);
655
+ const DESTRUCTIVE_COMMANDS = new Set(['auth clear']);
768
656
  const LONG_RUNNING_COMMANDS = new Set(['auth login', 'credits redeem', 'task wait', 'task record-poll', 'create subject-wait', 'create subject-voice-wait']);
769
657
  const NETWORK_NONE_COMMANDS = new Set(['schema', 'auth status', 'auth clear', 'auth logout', 'credits buy', 'model input-guide', 'task records']);
770
658
  const NETWORK_CONDITIONAL_COMMANDS = new Set(['doctor', 'auth login']);
@@ -823,57 +711,6 @@ const OUTPUT_KIND_BY_COMMAND = {
823
711
  'create subject-voice': 'subject_voice_create_result',
824
712
  'create subject-voice-wait': 'subject_voice_status',
825
713
  'create subject-batch': 'batch_subject_publish_result',
826
- 'artifact script get': 'artifact_full',
827
- 'artifact script document': 'artifact_record',
828
- 'artifact script rows': 'artifact_list',
829
- 'artifact script row': 'artifact_record',
830
- 'artifact script children': 'artifact_list',
831
- 'artifact script upsert-row': 'artifact_write_result',
832
- 'artifact script delete-row': 'artifact_delete_result',
833
- 'artifact script import': 'artifact_import_result',
834
- 'artifact asset get': 'artifact_full',
835
- 'artifact asset actors': 'artifact_list',
836
- 'artifact asset actor': 'artifact_record',
837
- 'artifact asset props': 'artifact_list',
838
- 'artifact asset prop': 'artifact_record',
839
- 'artifact asset locations': 'artifact_list',
840
- 'artifact asset location': 'artifact_record',
841
- 'artifact asset upsert-actor': 'artifact_write_result',
842
- 'artifact asset upsert-prop': 'artifact_write_result',
843
- 'artifact asset upsert-location': 'artifact_write_result',
844
- 'artifact asset upsert-actor-state': 'artifact_write_result',
845
- 'artifact asset upsert-prop-state': 'artifact_write_result',
846
- 'artifact asset upsert-location-state': 'artifact_write_result',
847
- 'artifact asset delete-actor': 'artifact_delete_result',
848
- 'artifact asset delete-prop': 'artifact_delete_result',
849
- 'artifact asset delete-location': 'artifact_delete_result',
850
- 'artifact asset delete-actor-state': 'artifact_delete_result',
851
- 'artifact asset delete-prop-state': 'artifact_delete_result',
852
- 'artifact asset delete-location-state': 'artifact_delete_result',
853
- 'artifact asset import': 'artifact_import_result',
854
- 'artifact video get': 'artifact_full',
855
- 'artifact video episodes': 'artifact_list',
856
- 'artifact video episode': 'artifact_record',
857
- 'artifact video scenes': 'artifact_list',
858
- 'artifact video scene': 'artifact_record',
859
- 'artifact video clips': 'artifact_list',
860
- 'artifact video clip': 'artifact_record',
861
- 'artifact video upsert-episode': 'artifact_write_result',
862
- 'artifact video upsert-scene': 'artifact_write_result',
863
- 'artifact video upsert-clip': 'artifact_write_result',
864
- 'artifact video update-clip-urls': 'artifact_write_result',
865
- 'artifact video delete-episode': 'artifact_delete_result',
866
- 'artifact video delete-scene': 'artifact_delete_result',
867
- 'artifact video delete-clip': 'artifact_delete_result',
868
- 'artifact video import-storyboard': 'artifact_import_result',
869
- 'artifact clip get': 'artifact_full',
870
- 'artifact clip episodes': 'artifact_list',
871
- 'artifact clip episode': 'artifact_record',
872
- 'artifact clip episode-by-id': 'artifact_record',
873
- 'artifact clip upsert-episode': 'artifact_write_result',
874
- 'artifact clip upsert-batch': 'artifact_import_result',
875
- 'artifact clip update-status': 'artifact_status_update',
876
- 'artifact clip delete-episode': 'artifact_delete_result',
877
714
  };
878
715
 
879
716
  const PREFLIGHTS_BY_COMMAND = {
@@ -1007,7 +844,7 @@ function buildCommandWorkflow(command) {
1007
844
  }
1008
845
  return {
1009
846
  outputKind,
1010
- recommendedPreflight: PREFLIGHTS_BY_COMMAND[command.name] || (ARTIFACT_WRITE_COMMANDS.includes(command.name) ? [`${command.name} --dry-run`] : []),
847
+ recommendedPreflight: PREFLIGHTS_BY_COMMAND[command.name] || [],
1011
848
  nextActions: next,
1012
849
  };
1013
850
  }
@@ -1027,7 +864,6 @@ function buildDomainSummaries(commands) {
1027
864
 
1028
865
  function requiredOptionsForCommand(command) {
1029
866
  const requiredOptions = new Set();
1030
- if (commandGroup(command) === 'artifact') requiredOptions.add('projectId');
1031
867
  for (const key of COMMAND_REQUIRED_OPTIONS[command.name] || []) requiredOptions.add(key);
1032
868
  return [...requiredOptions];
1033
869
  }
@@ -1140,11 +976,6 @@ function buildAgentBrief(commands, version = 'unknown') {
1140
976
  start: ['task wait', 'task record-poll', 'task records'],
1141
977
  rule: '优先复用 create 返回的 nextCommand;批量任务使用 task-record-file,失败项单独重试。',
1142
978
  },
1143
- {
1144
- intent: '最终产物 artifact',
1145
- start: ['artifact script', 'artifact asset', 'artifact video', 'artifact clip'],
1146
- rule: 'artifact 使用 project-id,不是 project-group-no;写入/删除/导入先 dry-run,再一次性确认写入面。',
1147
- },
1148
979
  ],
1149
980
  lookup: {
1150
981
  preciseSchema: `${commandPrefix()} schema --domain <domain> --command <command> -f json`,
@@ -1185,7 +1016,6 @@ function buildAgentContract() {
1185
1016
  'taskId -> taskType / projectGroupNo / resultUrls / errorMessage',
1186
1017
  'subject name + modelCode -> elementId / externalId / nextRefSubject',
1187
1018
  'subject voice name + source -> voiceRecordId / externalId / nextVoiceArg',
1188
- 'artifact projectId and imported file paths',
1189
1019
  ],
1190
1020
  invalidation: '用户切换账号、团队、项目组、模型、素材、prompt 或关键参数后,只刷新受影响的缓存;不要重复跑未变化的 model options / create-spec / fee。',
1191
1021
  },
@@ -1197,7 +1027,7 @@ function buildAgentContract() {
1197
1027
  '用户给出多条同模型同参数任务时优先 batch + task-record-file,不要单条循环 create。',
1198
1028
  '命令返回 nextCommand / nextRefSubject / nextVoiceArg 时优先复用返回值,不手拼等价命令。',
1199
1029
  '素材加白平台先通过 model asset-review-models 或用户明确输入确定;create asset-* 必须显式传 --platform,不要依赖默认平台。create asset 会自动判断 assetType=Image/Video/Audio,本地文件会用 ffprobe 校验图片/视频尺寸、视频时长/FPS/像素数和音频时长;不合法素材正式执行时会询问是否转码,非交互场景可追加 --auto-convert;macOS + Homebrew 环境缺失时 CLI 会自动安装 ffmpeg。',
1200
- '旧根域 image / video / asset / subject 已移除;只使用 create / task / artifact 等 schema 暴露的 domain。',
1030
+ '旧根域 image / video / asset / subject 已移除;只使用 create / task 等 schema 暴露的 domain。',
1201
1031
  ],
1202
1032
  canonicalFields: {
1203
1033
  purpose: 'CLI 输出对上游平台多版本字段做了归一化。Agent 只识别 canonical 列,遇到 aliases 列出的旧字段名时说明是上游原始返回,CLI 已在 text / 归一化层做了 fallback。不要把旧名当成独立新字段对外报告。',
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: lj-awb
3
- version: 0.4.6
4
- description: "灵境 AWB CLI skill。使用 `lj-awb` 命令调用动漫平台 / AWB 云端能力,覆盖认证、项目组、积分(含充值购买与兑换码兑换)、模型发现、上传、统一 create 创建域、任务查询、视频超分、最终产物 artifact CRUD 与本地 JSON 导入。用户说生图、生视频、视频超分、主体、音色、素材加白、去字幕、充值、购买积分、兑换码、artifact 写入或查询时使用。正式生成、切换项目组、清空认证、兑换码、artifact 写入等写入或扣费动作前必须确认。"
3
+ version: 0.4.8
4
+ description: "灵境 AWB CLI skill。使用 `lj-awb` 命令调用动漫平台 / AWB 云端能力,覆盖认证、项目组、积分(含充值购买与兑换码兑换)、模型发现、上传、统一 create 创建域、任务查询、视频超分。用户说生图、生视频、视频超分、主体、音色、素材加白、去字幕、充值、购买积分、兑换码时使用。正式生成、切换项目组、清空认证、兑换码等写入或扣费动作前必须确认。"
5
5
  metadata:
6
6
  bootstrap:
7
7
  package: "@lingjingai/lj-awb-cli"
8
- version: "0.4.6"
8
+ version: "0.4.8"
9
9
  bin: "lj-awb"
10
10
  cliHelp: "lj-awb --help"
11
11
  ---
@@ -21,7 +21,7 @@ metadata:
21
21
 
22
22
  - CLI 全部能力域和业务边界。
23
23
  - Agent 状态账本,避免重复跑 `model options`、`model create-spec`、`fee`、`upload`。
24
- - 创作、批量、主体、音色、素材加白、artifact 的最短链条。
24
+ - 创作、批量、主体、音色、素材加白的最短链条。
25
25
  - 禁止清单:旧命令域、默认参数代决策、单条循环批量任务、直连后端等。
26
26
 
27
27
  只在驱动器把你引到某个细节模块时才继续读该模块。不要为了“掌握全部功能”一次性加载所有模块。
@@ -77,7 +77,6 @@ schema 查询必须先返回,再组织业务命令;不要把 schema 查询
77
77
  | 本地文件上传为 backendPath | `upload` | [`modules/upload.md`](modules/upload.md) |
78
78
  | 图片 / 视频 / 去字幕 / 主体 / 音色 / 素材创建 | `create` | [`modules/create.md`](modules/create.md)、[`modules/create-contract.md`](modules/create-contract.md) |
79
79
  | 异步任务等待与本地台账 | `task` | [`modules/task.md`](modules/task.md) |
80
- | 剧本、资产、视频、剪辑最终产物 | `artifact` | [`modules/artifact.md`](modules/artifact.md) |
81
80
 
82
81
  ## 触发分流
83
82
 
@@ -95,9 +94,8 @@ schema 查询必须先返回,再组织业务命令;不要把 schema 查询
95
94
  | “去字幕 / 擦掉英文字幕” | [`modules/video.md`](modules/video.md),只走 material 任务体系 |
96
95
  | “批量 / 多镜头 / 分镜 / JSONL / 并行” | [`modules/workflows.md`](modules/workflows.md) 的批量链条 |
97
96
  | “任务好了没 / 继续等 / 查状态” | [`modules/task.md`](modules/task.md) |
98
- | “写入 AWB / 最终产物 / script / actor / storyboard / clip” | [`modules/artifact.md`](modules/artifact.md) |
99
97
 
100
- 歧义词先一句话澄清:`加白` 是素材审核还是视觉白边;`存一下` 是 artifact 哪个子域;`角色一致` 是主体还是一次性参考图。
98
+ 歧义词先一句话澄清:`加白` 是素材审核还是视觉白边;`角色一致` 是主体还是一次性参考图。
101
99
 
102
100
  ## 全局硬规则
103
101
 
@@ -1 +1 @@
1
- 0.4.6
1
+ 0.4.8
@@ -1,6 +1,6 @@
1
1
  {
2
- "skillVersion": "0.4.6",
3
- "minCliVersion": "0.4.6",
2
+ "skillVersion": "0.4.8",
3
+ "minCliVersion": "0.4.8",
4
4
  "preferredCommand": "lj-awb",
5
- "updatedAt": "2026-06-11"
5
+ "updatedAt": "2026-06-13"
6
6
  }
@@ -9,7 +9,7 @@
9
9
  | `lj-awb account info` | 当前用户、团队、项目组、积分摘要(启动后第一条信息) |
10
10
  | `lj-awb account teams` | 列出当前账号可访问的团队 |
11
11
  | `lj-awb account switch-team --group-id <id> --dry-run` | 预览切换团队 |
12
- | `lj-awb account switch-team --group-id <id> --yes` | 切换团队(云端写入) |
12
+ | `lj-awb account switch-team --group-id <id> --yes` | 切换团队(换取该团队 accessKey 并刷新本地登录态) |
13
13
 
14
14
  ## 什么时候切团队
15
15
 
@@ -19,12 +19,14 @@
19
19
 
20
20
  不该切换的场景:
21
21
 
22
- - 用户只是要换"项目"——那是 [`project use`](project.md),**不是 switch-team**。
22
+ - 用户只是要换"项目"——那是 [`project switch`](project.md),**不是 switch-team**。
23
23
  - 用户没明确说要切——`account teams` 列出来给用户挑就够,别擅自切。
24
24
 
25
25
  ## 规则
26
26
 
27
27
  - `account switch-team` 改变团队上下文,**必须确认**后追加 `--yes`。
28
- - 切换团队会**重置项目组上下文**:之后跑 `project current` 必然为空,需要让用户重新 `project use --project-group-no <no>` 选一个。
28
+ - 切换原理:用当前用户 `userId` + 目标 `groupId` `groupAccessKey` 换到该团队的 accessKey,再**写回本地认证文件**(等同重新登录到该团队)。
29
+ - 若用户是通过 `LINGJING_AWB_ACCESS_KEY` 环境变量登录的,写回文件**不生效**(env key 优先级高于文件);这种情况下要么 `unset LINGJING_AWB_ACCESS_KEY` 后再切,要么直接换该团队的 access key。
30
+ - 切换团队会**重置项目组上下文**:之后跑 `project current` 必然为空,需要让用户重新 `project switch --project-group-no <no>` 选一个。
29
31
  - 不要把 `account info.groupName`(团队名)当作项目组名报告给用户。
30
32
  - 输出字段速查见 [`../references/output-fields.md`](../references/output-fields.md) 的"账号与项目组"小节。
@@ -30,7 +30,6 @@ Agent 在当前任务中记录这些值,后续直接复用:
30
30
  | `task` | create 返回的 `taskId` / `nextCommand` / wait 结果 | 任务终态后只追加结果 |
31
31
  | `subject` | `create subject-list` / `create subject` / `create subject-wait` | 主体名或 `modelCode` 变化 |
32
32
  | `voice` | `create subject-voice-list` / `create subject-voice-wait` | 音色名或来源变化 |
33
- | `artifactProjectId` | 用户给定或 artifact 查询 | 项目切换 |
34
33
 
35
34
  不要为了“保险”重复跑 `schema --brief`、精确 schema、`doctor --verify`、`project current`、`model options`、`model create-spec`、`fee`、`upload files`。缓存值不够时只补缺的那一步。
36
35
 
@@ -44,9 +43,8 @@ CLI 当前能力分为:
44
43
  - `upload`:把本地文件转成平台 `backendPath`。
45
44
  - `create`:图片、视频、视频去字幕、主体、主体音色、素材组和素材注册。
46
45
  - `task`:图片 / 视频 / 去字幕等异步任务状态、等待和本地台账。
47
- - `artifact`:剧本、资产、视频、剪辑最终产物 CRUD 与本地 JSON 导入。
48
46
 
49
- 不要把概念名当 command domain。图片、视频、主体、素材是业务对象;命令入口是 `create` / `task` / `artifact`。
47
+ 不要把概念名当 command domain。图片、视频、主体、素材是业务对象;命令入口是 `create` / `task`。
50
48
 
51
49
  ## 驱动链条
52
50
 
@@ -97,12 +95,6 @@ CLI 当前能力分为:
97
95
  - `create asset --file` 会在正式阶段自动上传并注册;同一文件多任务复用时,先 `upload files` 缓存 `backendPath`。
98
96
  - 注册成功后优先使用 `assetPath`,不要重新上传同一文件。
99
97
 
100
- ### Artifact
101
-
102
- - `artifact` 使用 `project-id`,不是 `project-group-no`。
103
- - 批量导入先把涉及的 script / asset / video / clip dry-run 全部跑完,再让用户一次性确认写入面。
104
- - 部分失败后只针对失败的 row / actor / episode / clip 重试,不删除或重导整批。
105
-
106
98
  ## 何时加载其它模块
107
99
 
108
100
  - 模型候选、参数字段解释:[`model.md`](model.md)。
@@ -111,7 +103,6 @@ CLI 当前能力分为:
111
103
  - 主体 / 音色:[`subject.md`](subject.md)。
112
104
  - 素材库 / 加白:[`asset.md`](asset.md)。
113
105
  - 等待、台账、失败状态:[`task.md`](task.md)、[`../references/error-codes.md`](../references/error-codes.md)。
114
- - 最终产物:[`artifact.md`](artifact.md) 及其子模块。
115
106
 
116
107
  ## 禁止清单
117
108
 
@@ -73,5 +73,5 @@ lj-awb create image \
73
73
 
74
74
  - `create image` 返回 `taskId` + `nextCommand`(通常 = `task wait`)→ **立刻接着跑** `task wait --task-id <id> --task-type IMAGE_CREATE --wait-seconds 180`,不要让用户再问"好了没"。
75
75
  - `create image-batch` 写入 `.awb/tasks.jsonl`,用 [`task.md`](task.md) → `task record-poll` 批量等。
76
- - 任务终态拿到 `resultUrls` → 视场景决定:① 直接交付给用户;② 用作下一轮生图 / 生视频的参考图(直接以 result URL 喂 `--resource image:reference=<url>`);③ 写回 [`artifact/asset.md`](artifact/asset.md) 的角色 / 道具 / 场景产物。
76
+ - 任务终态拿到 `resultUrls` → 视场景决定:① 直接交付给用户;② 用作下一轮生图 / 生视频的参考图(直接以 result URL 喂 `--resource image:reference=<url>`)。
77
77
  - 任务 `SUCCESS` 后**立刻**查素材库可能查不到——后端 `saveResourceToMaterial` 是事务提交后异步执行,详见 [`task.md`](task.md) 规则。优先用 `resultUrls` 直接消费;非要列素材库时先 sleep 2-3 秒。
@@ -9,7 +9,7 @@
9
9
  | `lj-awb project list` | 列出项目组 |
10
10
  | `lj-awb project list --name "<keyword>"` | 按名称过滤项目组 |
11
11
  | `lj-awb project current` | 查看云端当前项目组和项目预算 |
12
- | `lj-awb project use --project-group-no <no> --yes` | 切换项目组 |
12
+ | `lj-awb project switch --project-group-no <no> --yes` | 切换项目组 |
13
13
  | `lj-awb project users` | 列出创建项目组可选成员 |
14
14
  | `lj-awb project create --name "<name>" --point 1000 --yes` | 创建并切换项目组 |
15
15
  | `lj-awb project update --project-group-no <no> --name "<name>" --yes` | 修改项目组 |
@@ -21,7 +21,7 @@
21
21
  - 如果项目组不明显匹配用户意图,先询问用户,不要静默选择。
22
22
  - 联网场景下以 `project current` / `project list` 返回的云端当前项目组为准,不要把本地 `state.json` 当成权威来源。
23
23
  - 如果多个查询结果不一致,先重新运行 `account info` 和 `project list` 收敛结论,再继续估价或创建任务。
24
- - `project use`、`project create`、`project update`、`project ensure` 都会改变云端或本地上下文,必须确认后追加 `--yes`。
24
+ - `project switch`、`project create`、`project update`、`project ensure` 都会改变云端或本地上下文,必须确认后追加 `--yes`。
25
25
  - 输出字段速查见 [`../references/output-fields.md`](../references/output-fields.md) 的"账号与项目组"小节。
26
26
 
27
27
  ## 下一步
@@ -80,5 +80,5 @@ CLI 当前**不暴露 task cancel**;用户问"能不能停掉这个任务"时
80
80
 
81
81
  ## 下一步
82
82
 
83
- - 任务终态 + `resultUrls` 非空 → 视具体场景写回 [`artifact/video.md`](artifact/video.md) (`update-clip-urls`) 或交付给用户。
83
+ - 任务终态 + `resultUrls` 非空 → 交付给用户或用作后续生成的参考。
84
84
  - 任务 `FAILED` → 看 `errorMessage`;常见原因(积分 / 模型 / 资源)按 [`../references/error-codes.md`](../references/error-codes.md) 场景 7 处理。
@@ -97,7 +97,7 @@ lj-awb create video \
97
97
  - `create video` 返回 `taskId` + `nextCommand` → 立刻 `task wait --task-id <id> --task-type VIDEO_GROUP --wait-seconds 300`。
98
98
  - `create video-super-resolution` 返回 `taskId` + `nextCommand` → 立刻运行返回的 `task video-super-resolution-status --task-id <id>`。
99
99
  - `create video-batch` 写 `.awb/tasks.jsonl`,用 [`task.md`](task.md) → `task record-poll` 批量等。
100
- - 任务终态 `resultUrls` → 通常按集 / 场 / 镜头回写到 [`artifact/video.md`](artifact/video.md):`artifact video update-clip-urls --project-id <id> --episode-id ... --scene-id ... --clip-id ... --video-urls-json '[...]'`。
100
+ - 任务终态 `resultUrls` → 按集 / 场 / 镜头交付给用户,或用作后续生成的参考。
101
101
  - 任务 `SUCCESS` 后**立刻**用素材库接口找这条视频时可能查不到——后端 `saveResourceToMaterial` 是事务提交后异步执行,详见 [`task.md`](task.md) 规则。优先用 `resultUrls` 直接消费;非要列素材库时先 sleep 2-3 秒。
102
102
  - Seedance 原始视频带英文字幕 → 对成功的视频任务运行 `create video-subtitle-removal --source-task-id <videoTaskId> --yes` → `task video-subtitle-status --task-id <subtitleTaskId>`。
103
103
  - 需要对现有视频做清晰度提升 → 先确认 `objectName`(material backendPath 或 COS 对象路径),再 `create video-super-resolution-fee` 和 `create video-super-resolution`。
@@ -13,7 +13,6 @@
13
13
  - [分镜流水线(分镜图 → 视频)](#分镜流水线分镜图--视频) — GPT Image 2 分镜 → 视频生成
14
14
  - [预上传后批量复用](#预上传后批量复用) — `upload files` 一次,多任务复用 `backendPath`
15
15
  - [素材库加白后生视频](#素材库加白后生视频) — `model asset-review-models` → `create asset` → 视频
16
- - [Artifact 流水线错误恢复](#artifact-流水线错误恢复) — `import-storyboard` / 批量写入失败的局部重试
17
16
 
18
17
  ## 通用启动流程
19
18
 
@@ -290,77 +289,3 @@ lj-awb create video \
290
289
  - 同一角色后续视频任务复用同一 `assetId` / `assetPath`,不要每次重新 register。
291
290
  - asset 系列只服务于素材加白;**不要**把素材 `assetId` / `assetPath` 当成可灵的 `subject:reference` 用,反之亦然。
292
291
  - 不要调用隐式 submissions 自动补组;素材组查重、创建、素材注册都用显式 CLI 步骤。
293
-
294
- ## Artifact 流水线错误恢复
295
-
296
- 适用:把沙箱 / 本地流水线产出回写 AWB 时,`script import` / `asset import` / `video import-storyboard` / `clip upsert-batch` 部分失败的恢复路径。
297
-
298
- #### 全量预览,确认无误后再写
299
-
300
- 整条流水线统一先 `--dry-run`,让用户在一次确认里看完所有变更面(script / asset / video / clip 各跑一遍预览,再统一 `--yes`),避免提交一半发现规模不对。
301
-
302
- ```bash
303
- lj-awb artifact script import --project-id "$PROJECT_ID" --input-file 1_script/output/script.json --dry-run
304
- lj-awb artifact asset import --project-id "$PROJECT_ID" --input-dir 2_asset/output --dry-run
305
- lj-awb artifact video import-storyboard --project-id "$PROJECT_ID" --input-file 3_footage/output/ep001/ep001_storyboard.json --dry-run
306
- lj-awb artifact clip upsert-batch --project-id "$PROJECT_ID" --input-file 4_clip/output/ep001_clip_batch.json --dry-run
307
- ```
308
-
309
- #### 单文件 import 失败(argument_error / 业务字段错)
310
-
311
- `exit=20 error.type=argument_error`:CLI 已经拒绝写入,整条 batch 不会被部分提交。修 JSON 后重跑同一条命令。**不要**手工跑 `delete-*` 回滚,因为云端根本没写入。
312
-
313
- #### 单条 upsert 失败(某 scene/clip 字段不合法)
314
-
315
- 如果是 `upsert-batch` 已经 `--yes` 提交了一部分后某条失败:
316
-
317
- 1. 读响应 `data.results[]`,区分 `succeeded` 和 `failed`;失败项的 `body` 里有具体字段错。
318
- 2. 修这些失败行,单独跑 `upsert-clip` / `upsert-scene` / `upsert-episode` 补写,**不要**重跑整个 batch 文件(会把已成功的 episode/scene 再 upsert 一遍,浪费写入也容易盖掉已经手工修过的字段)。
319
-
320
- #### 整集需要回滚重导
321
-
322
- 确认要整集重来(例如 episodeId 拼错、storyboard 结构整体不对):
323
-
324
- ```bash
325
- lj-awb artifact video delete-episode \
326
- --project-id "$PROJECT_ID" \
327
- --episode-id ep_001 \
328
- --dry-run
329
-
330
- lj-awb artifact video delete-episode \
331
- --project-id "$PROJECT_ID" \
332
- --episode-id ep_001 \
333
- --yes
334
-
335
- lj-awb artifact video import-storyboard \
336
- --project-id "$PROJECT_ID" \
337
- --input-file 3_footage/output/ep001/ep001_storyboard.json \
338
- --yes
339
- ```
340
-
341
- `delete-episode` 会级联删除该集下所有 scene / clip(详见 [`artifact/video.md`](artifact/video.md))。
342
-
343
- #### clip 子域写入找不到 videoEpisodeId
344
-
345
- clip 子域用的是数字主键 `videoEpisodeId`,不是业务键 `ep_001`。先用 video 子域查到数字 id 再喂给 clip:
346
-
347
- ```bash
348
- lj-awb artifact video episode \
349
- --project-id "$PROJECT_ID" \
350
- --episode-id ep_001 \
351
- -f json
352
- # 取 .data.id
353
-
354
- lj-awb artifact clip update-status \
355
- --project-id "$PROJECT_ID" \
356
- --video-episode-id <上一步拿到的数字 id> \
357
- --status music_success \
358
- --messages-json '[{"level":"info","step":"music","message":"配乐完成"}]' \
359
- --yes
360
- ```
361
-
362
- 规则:
363
-
364
- - 不要在 import 失败后默认建议"全删重来";先看错误类型 — argument_error 直接修文件重跑;部分 upsert 失败用单条补写。
365
- - 删除是云端写入(虽然是逻辑删除),必须 `--dry-run` + `--yes` 两步走,不要看到 batch 报错就静默跑 delete。
366
- - artifact 系列写入失败不会扣积分;只有创作类(image/video/create asset/create subject)才有费用,恢复时不需要重新跑 `credits balance`。
@@ -99,7 +99,7 @@ lj-awb auth verify # 实际打一次平台 API
99
99
 
100
100
  - 积分不足:跑 `credits balance` 给用户看余额,建议充值或换模型。
101
101
  - 模型不可用:跑 `model image-models` / `video-models` 看 `taskQueueNum` 和上下架状态。
102
- - 项目组无权限:跑 `project list` 看用户在哪个项目组,必要时 `project use --project-group-no <no> --yes`。
102
+ - 项目组无权限:跑 `project list` 看用户在哪个项目组,必要时 `project switch --project-group-no <no> --yes`。
103
103
 
104
104
  ### 场景 8:api_error code=1007(视频素材模式混用)
105
105
 
@@ -22,7 +22,7 @@
22
22
  | `account_summary` | `account info` | `userName`、`groupName`、`currentProjectGroupName`、`billingPointBalance` | `userId`、`groupId` | — |
23
23
  | `team_list` | `account teams` | `count` + 团队名 | `groupId` 用于 `account switch-team` | — |
24
24
  | `project_list` | `project list` | `projectGroupName`、`isSelected` | `projectGroupNo`(下游引用) | budget 详情 |
25
- | `project_summary` | `project use / create / update / current` | `projectGroupName`、`selected/created/updated`、`projectBudgetBalance` | `projectGroupNo` | `memberCount` |
25
+ | `project_summary` | `project switch / create / update / current` | `projectGroupName`、`selected/created/updated`、`projectBudgetBalance` | `projectGroupNo` | `memberCount` |
26
26
  | `project_user_list` | `project users` | `count` | `userId` | — |
27
27
 
28
28
  ## 积分
@@ -100,17 +100,10 @@
100
100
  | `asset_group_write_result` | `create asset-group / group-update` | `created/updated`、`groupId`、`platform` | — | — |
101
101
  | `asset_register_result` | `create asset` | `registered`、`assetId`、`assetPath`、`platform`、`assetType` | `assetId`(下游引用) | upload 嵌套 |
102
102
 
103
- ## Artifact(产物 CRUD)
103
+ ## 更新
104
104
 
105
105
  | outputKind | 命令 | 必报给用户 | agent 内部用 | 可丢弃 |
106
106
  |------------|------|-----------|--------------|--------|
107
- | `artifact_list` | `* rows` / `* episodes` / `* scenes` / `* clips` / `* actors` / ... | `count` + 关键字段摘要 | `id / entityKey / episodeId / sceneId / clipId` | 全 row 嵌套 |
108
- | `artifact_record` | `* row` / `* episode` / `* scene` / `* clip` / `* actor` / ... | 关键标识 + 状态 | `id`(下游 update / delete 用) | 大段 description / payload |
109
- | `artifact_full` | `script get` / `asset get` / `video get` / `clip get` | 顶层 `id`、各子集合 `*.Count` | — | 整棵嵌套 |
110
- | `artifact_write_result` | `upsert-*` / `update-clip-urls` | 写入字段 + `id` | `id`(下游) | — |
111
- | `artifact_delete_result` | `delete-*` | `deleted`、`key`、级联 | — | — |
112
- | `artifact_import_result` | `* import` / `import-storyboard` / `upsert-batch` | `imported`、`rowCount/actorCount/...`、文件计数 | `rowsByKind`(用于断言) | `batch` 数组 |
113
- | `artifact_status_update` | `artifact clip update-status` | `updated`、`status` | — | messageCount |
114
107
  | `update_result` | `update` / `update --check` | `updateAvailable`、`currentVersion`、`latestVersion`、`command` | `skillUpdated`、`restartRecommended` | 安装日志 |
115
108
 
116
109
  ## Dry-run
@@ -120,4 +113,4 @@
120
113
  - agent 内部用:`results[]`(批量 dry-run 每条)
121
114
  - 可丢弃:完整 `request` 嵌套(已经在 compact summary 里)
122
115
 
123
- `--yes` 后再跑会换成对应的写入 outputKind(如 `task_submission` / `artifact_write_result`),字段语义见上表。
116
+ `--yes` 后再跑会换成对应的写入 outputKind(如 `task_submission`),字段语义见上表。