@doubao-dev/cli 1.0.0-rc.7 → 1.0.0-rc.9

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/dist/main.d.ts CHANGED
@@ -170,6 +170,17 @@ declare namespace flow_open_platform_devtool {
170
170
  /** 全租户 */
171
171
  TENANT = 2
172
172
  }
173
+ enum WorkbenchReferenceSource {
174
+ Official = 1,
175
+ Store = 2,
176
+ Enterprise = 3,
177
+ Personal = 4
178
+ }
179
+ enum WorkbenchReferenceType {
180
+ Skill = 1,
181
+ /** 包括原 resource_type=4(Plugin)及 resource_type=3(SkillPackage)。 */
182
+ Plugin = 2
183
+ }
173
184
  /** 为含 MINI_APP 的既有 PLUGIN 版本生成二维码预览入口,支持 TEST / RELEASE。
174
185
  用户和业务/租户上下文从可信登录态取得,不接受客户端指定下游版本。
175
186
  不创建或构建资源,不执行安装,不修改正式发布状态。
@@ -234,20 +245,15 @@ declare namespace flow_open_platform_devtool {
234
245
  error?: flowpc_common_agw.Error;
235
246
  http_status_code?: number;
236
247
  }
237
- /** 返回可信 context 中的用户、企业身份及企业发布准入结果;不查询账号资料。 */
238
- interface DevtoolGetCurrentUserData {
239
- /** 当前豆包用户 ID,十进制字符串 */
240
- user_id?: string;
241
- /** 当前账号是否为企业账号;个人账号明确返回 false,不能以飞书绑定或内部 OIDC 身份代替判断 */
242
- is_enterprise?: boolean;
243
- /** 企业账号成功时返回可信飞书租户 ID 的十进制字符串;个人账号省略,不返回空字符串或 "0" */
244
- tenant_id?: string;
245
- /** 企业发布准入;复用 ENTERPRISE 发布检查,未通过时明确返回 false */
246
- is_enterprise_publication_access?: boolean;
247
- }
248
- interface DevtoolGetCurrentUserRequest {}
249
- interface DevtoolGetCurrentUserResponse {
250
- data?: flow_open_platform_devtool.DevtoolGetCurrentUserData;
248
+ interface DevtoolCreateWorkbenchPackageUploadData {
249
+ package_id?: string;
250
+ }
251
+ interface DevtoolCreateWorkbenchPackageUploadRequest {
252
+ file_name?: string;
253
+ PackageContent?: Blob;
254
+ }
255
+ interface DevtoolCreateWorkbenchPackageUploadResponse {
256
+ data?: flow_open_platform_devtool.DevtoolCreateWorkbenchPackageUploadData;
251
257
  code?: number;
252
258
  msg?: string;
253
259
  message?: string;
@@ -331,6 +337,18 @@ declare namespace flow_open_platform_devtool {
331
337
  error?: flowpc_common_agw.Error;
332
338
  http_status_code?: number;
333
339
  }
340
+ interface DevtoolGetWorkbenchDraftRequest {
341
+ name?: string;
342
+ ability_id?: string;
343
+ /** 业务必填,PUBLIC 或 ENTERPRISE */
344
+ publication_type?: string;
345
+ }
346
+ interface DevtoolGetWorkbenchVersionApprovalRequest {
347
+ /** 业务必填 */
348
+ approval_id?: string;
349
+ /** 业务必填,PUBLIC 或 ENTERPRISE */
350
+ publication_type?: string;
351
+ }
334
352
  interface DevtoolListPluginCategoriesRequest {
335
353
  publication_type?: string;
336
354
  }
@@ -361,6 +379,23 @@ declare namespace flow_open_platform_devtool {
361
379
  error?: flowpc_common_agw.Error;
362
380
  http_status_code?: number;
363
381
  }
382
+ interface DevtoolListWorkbenchVersionsRequest {
383
+ page_token?: string;
384
+ name?: string;
385
+ /** 1–50,未传默认 20 */
386
+ page_size?: number;
387
+ ability_id?: string;
388
+ /** 业务必填,PUBLIC 或 ENTERPRISE */
389
+ publication_type?: string;
390
+ }
391
+ interface DevtoolListWorkbenchVersionsResponse {
392
+ data?: flow_open_platform_ability.ListAbilityVersionsData;
393
+ code?: number;
394
+ msg?: string;
395
+ message?: string;
396
+ error?: flowpc_common_agw.Error;
397
+ http_status_code?: number;
398
+ }
364
399
  interface DevtoolOperatePluginToUserStoreData {}
365
400
  interface DevtoolOperatePluginToUserStoreRequest {
366
401
  /** 安装必填;卸载时可用原始插件 Name 替代 */
@@ -378,6 +413,23 @@ declare namespace flow_open_platform_devtool {
378
413
  error?: flowpc_common_agw.Error;
379
414
  http_status_code?: number;
380
415
  }
416
+ interface DevtoolOperateWorkbenchToUserStoreData {}
417
+ interface DevtoolOperateWorkbenchToUserStoreRequest {
418
+ /** Install 必填;Uninstall 与 Name 二选一 */
419
+ package_id?: string;
420
+ /** 业务必填,仅支持 Install / Uninstall */
421
+ action?: string;
422
+ /** 仅用于卸载,使用原始包名 */
423
+ name?: string;
424
+ }
425
+ interface DevtoolOperateWorkbenchToUserStoreResponse {
426
+ data?: flow_open_platform_devtool.DevtoolOperateWorkbenchToUserStoreData;
427
+ code?: number;
428
+ msg?: string;
429
+ message?: string;
430
+ error?: flowpc_common_agw.Error;
431
+ http_status_code?: number;
432
+ }
381
433
  interface DevtoolPluginVisibilityConfig {
382
434
  /** 传入配置时必填 */
383
435
  type?: flow_open_platform_devtool.DevtoolPluginVisibilityType;
@@ -404,6 +456,38 @@ declare namespace flow_open_platform_devtool {
404
456
  error?: flowpc_common_agw.Error;
405
457
  http_status_code?: number;
406
458
  }
459
+ interface DevtoolSaveWorkbenchVersionData {
460
+ /** 实际保存的三段式版本号 */
461
+ version?: string;
462
+ }
463
+ interface DevtoolSaveWorkbenchVersionRequest {
464
+ /** 1–64 字节 */
465
+ request_id?: string;
466
+ name?: string;
467
+ ability_id?: string;
468
+ /** 业务必填,PUBLIC 或 ENTERPRISE */
469
+ publication_type?: string;
470
+ }
471
+ interface DevtoolSaveWorkbenchVersionResponse {
472
+ data?: flow_open_platform_devtool.DevtoolSaveWorkbenchVersionData;
473
+ code?: number;
474
+ msg?: string;
475
+ message?: string;
476
+ error?: flowpc_common_agw.Error;
477
+ http_status_code?: number;
478
+ }
479
+ interface DevtoolSearchWorkbenchResourcesRequest {
480
+ keyword?: string;
481
+ sources?: Array<flow_open_platform_devtool.WorkbenchReferenceSource>;
482
+ }
483
+ interface DevtoolSearchWorkbenchResourcesResponse {
484
+ data?: flow_open_platform_devtool.SearchWorkbenchResourcesData;
485
+ code?: number;
486
+ msg?: string;
487
+ message?: string;
488
+ error?: flowpc_common_agw.Error;
489
+ http_status_code?: number;
490
+ }
407
491
  interface DevtoolSubmitPluginVersionApprovalData {
408
492
  approval_id?: string;
409
493
  }
@@ -425,6 +509,25 @@ declare namespace flow_open_platform_devtool {
425
509
  error?: flowpc_common_agw.Error;
426
510
  http_status_code?: number;
427
511
  }
512
+ interface DevtoolSubmitWorkbenchVersionApprovalData {
513
+ approval_id?: string;
514
+ }
515
+ interface DevtoolSubmitWorkbenchVersionApprovalRequest {
516
+ name?: string;
517
+ /** 业务必填,三段式版本号 */
518
+ version?: string;
519
+ ability_id?: string;
520
+ /** 业务必填,PUBLIC 或 ENTERPRISE */
521
+ publication_type?: string;
522
+ }
523
+ interface DevtoolSubmitWorkbenchVersionApprovalResponse {
524
+ data?: flow_open_platform_devtool.DevtoolSubmitWorkbenchVersionApprovalData;
525
+ code?: number;
526
+ msg?: string;
527
+ message?: string;
528
+ error?: flowpc_common_agw.Error;
529
+ http_status_code?: number;
530
+ }
428
531
  interface DevtoolUpsertPluginDraftData {
429
532
  draft?: flow_open_platform_devtool.PluginDraft;
430
533
  }
@@ -455,6 +558,19 @@ declare namespace flow_open_platform_devtool {
455
558
  error?: flowpc_common_agw.Error;
456
559
  http_status_code?: number;
457
560
  }
561
+ interface DevtoolUpsertWorkbenchDraftRequest {
562
+ package_id?: string;
563
+ /** 空字符串清空 */
564
+ additional_info?: string;
565
+ name?: string;
566
+ ability_id?: string;
567
+ /** 业务必填,PUBLIC 或 ENTERPRISE */
568
+ publication_type?: string;
569
+ /** 仅用于企业发布;省略时沿用草稿范围,首次默认仅本人;显式选择整体替换 */
570
+ visibility_config?: flow_open_platform_devtool.DevtoolPluginVisibilityConfig;
571
+ /** 补填内联 MCP 的测试凭据 */
572
+ modules?: Array<flow_open_platform_devtool.DevtoolWorkbenchModuleInput>;
573
+ }
458
574
  interface DevtoolValidatePluginMaterialData {
459
575
  passed?: boolean;
460
576
  issues?: Array<flow_open_platform_model.AbilityValidationIssue>;
@@ -481,6 +597,31 @@ declare namespace flow_open_platform_devtool {
481
597
  error?: flowpc_common_agw.Error;
482
598
  http_status_code?: number;
483
599
  }
600
+ interface DevtoolValidateWorkbenchMaterialData {
601
+ passed?: boolean;
602
+ issues?: Array<flow_open_platform_model.AbilityValidationIssue>;
603
+ }
604
+ interface DevtoolValidateWorkbenchMaterialRequest {
605
+ package_id?: string;
606
+ name?: string;
607
+ ability_id?: string;
608
+ /** 业务必填,PUBLIC 或 ENTERPRISE */
609
+ publication_type?: string;
610
+ /** PACKAGE_PARSE 仅用于上传包;MCP_PROBE 检测连通性。省略时执行目标支持的两项检测。 */
611
+ validate_list?: Array<string>;
612
+ /** 仅 MCP_PROBE 可传;省略时检测全部内联 MCP */
613
+ module_id?: string;
614
+ /** 可选,已保存的三段式版本号 */
615
+ version?: string;
616
+ }
617
+ interface DevtoolValidateWorkbenchMaterialResponse {
618
+ data?: flow_open_platform_devtool.DevtoolValidateWorkbenchMaterialData;
619
+ code?: number;
620
+ msg?: string;
621
+ message?: string;
622
+ error?: flowpc_common_agw.Error;
623
+ http_status_code?: number;
624
+ }
484
625
  interface DevtoolWithdrawPluginVersionApprovalData {
485
626
  approval?: flow_open_platform_devtool.PluginVersionApproval;
486
627
  }
@@ -498,6 +639,40 @@ declare namespace flow_open_platform_devtool {
498
639
  error?: flowpc_common_agw.Error;
499
640
  http_status_code?: number;
500
641
  }
642
+ interface DevtoolWithdrawWorkbenchVersionApprovalRequest {
643
+ /** 业务必填 */
644
+ approval_id?: string;
645
+ /** 业务必填,PUBLIC 或 ENTERPRISE */
646
+ publication_type?: string;
647
+ }
648
+ interface DevtoolWorkbenchDraftData {
649
+ draft?: flow_open_platform_devtool.WorkbenchDraft;
650
+ }
651
+ interface DevtoolWorkbenchDraftResponse {
652
+ data?: flow_open_platform_devtool.DevtoolWorkbenchDraftData;
653
+ code?: number;
654
+ msg?: string;
655
+ message?: string;
656
+ error?: flowpc_common_agw.Error;
657
+ http_status_code?: number;
658
+ }
659
+ interface DevtoolWorkbenchModuleInput {
660
+ /** 业务必填,mcp:<server> */
661
+ module_id?: string;
662
+ /** 内联 MCP 的测试凭据 */
663
+ mcp?: flow_open_platform_ability.MCPModuleInput;
664
+ }
665
+ interface DevtoolWorkbenchVersionApprovalData {
666
+ approval?: flow_open_platform_devtool.PluginVersionApproval;
667
+ }
668
+ interface DevtoolWorkbenchVersionApprovalResponse {
669
+ data?: flow_open_platform_devtool.DevtoolWorkbenchVersionApprovalData;
670
+ code?: number;
671
+ msg?: string;
672
+ message?: string;
673
+ error?: flowpc_common_agw.Error;
674
+ http_status_code?: number;
675
+ }
501
676
  /** 插件草稿视图;AbilityID 用于后续操作,Name 为当前包内 manifest.name。 */
502
677
  interface PluginDraft {
503
678
  version?: string;
@@ -513,7 +688,7 @@ declare namespace flow_open_platform_devtool {
513
688
  publication_type?: string;
514
689
  visibility_config?: flow_open_platform_model.VisibilityConfig;
515
690
  }
516
- /** 插件版本审批记录,仅返回 PLUGIN 的审批。 */
691
+ /** Plugin 和 Workbench Devtool 共用的版本审批记录。具体主体类型由接口决定。 */
517
692
  interface PluginVersionApproval {
518
693
  approval_id?: string;
519
694
  /** major.minor.patch,例如 1.2.3 */
@@ -526,9 +701,55 @@ declare namespace flow_open_platform_devtool {
526
701
  handled_by?: operation.OperationUser;
527
702
  handled_at_ms?: Int64;
528
703
  }
704
+ interface SearchWorkbenchResourcesData {
705
+ /** 最多返回 100 条匹配结果 */
706
+ items?: Array<flow_open_platform_devtool.WorkbenchCreationResource>;
707
+ }
708
+ /** 工作台创建候选资源;使用工作台引用枚举,保持下游数值。 */
709
+ interface WorkbenchCreationIcon {
710
+ uri?: string;
711
+ url?: string;
712
+ }
713
+ interface WorkbenchCreationResource {
714
+ resource_id?: string;
715
+ resource_type?: flow_open_platform_devtool.WorkbenchReferenceType;
716
+ source?: flow_open_platform_devtool.WorkbenchReferenceSource;
717
+ name?: string;
718
+ icon?: flow_open_platform_devtool.WorkbenchCreationIcon;
719
+ }
720
+ interface WorkbenchDraft {
721
+ version?: string;
722
+ package?: flow_open_platform_model.AbilityPackage;
723
+ form?: flow_open_platform_model.AbilityRevisionForm;
724
+ /** 返回工作台模块和包内 MCP 模块 */
725
+ modules?: Array<flow_open_platform_model.AbilityModule>;
726
+ created_at_ms?: Int64;
727
+ updated_at_ms?: Int64;
728
+ /** 包名 */
729
+ name?: string;
730
+ /** CLI 可保存至项目配置,供后续操作使用 */
731
+ ability_id?: string;
732
+ publication_type?: string;
733
+ visibility_config?: flow_open_platform_model.VisibilityConfig;
734
+ }
529
735
  }
530
736
 
531
737
  declare namespace flow_open_platform_model {
738
+ /** 关联资源自身的来源,不是工作台的管理来源;可引用范围仍由原有业务规则校验。 */
739
+ enum WorkbenchResourceSource {
740
+ Official = 1,
741
+ Store = 2,
742
+ Enterprise = 3,
743
+ Personal = 4
744
+ }
745
+ /** 工作台关联资源的实际类型,与 ActionHub/Core 引用类型对齐。
746
+ 不使用创建候选接口的 WorkbenchReferenceType(Plugin=2),避免丢失 Plugin/SkillPackage 身份。 */
747
+ enum WorkbenchResourceType {
748
+ Skill = 1,
749
+ /** 历史技能包,摘要统计时计入关联插件;References按独立类型截断,引用中保留原类型 */
750
+ SkillPackage = 3,
751
+ Plugin = 4
752
+ }
532
753
  /** 能力审批摘要。 */
533
754
  interface AbilityApproval {
534
755
  approval_id?: string;
@@ -577,6 +798,7 @@ declare namespace flow_open_platform_model {
577
798
  version?: string;
578
799
  /** 已提供的运行环境;未知时省略,不推断 */
579
800
  runtime_types?: Array<string>;
801
+ workbench?: flow_open_platform_model.WorkbenchModule;
580
802
  }
581
803
  /** 上传包元数据。PackageID 是不透明标识,不暴露底层存储 Key。 */
582
804
  interface AbilityPackage {
@@ -687,6 +909,30 @@ declare namespace flow_open_platform_model {
687
909
  /** 用户、部门、租户使用原生飞书 ID;群聊原样使用 Aily ChatID,不转为用户 ID 或 open_chat_id */
688
910
  entityID?: string;
689
911
  }
912
+ interface WorkbenchModule {
913
+ system_remind?: string;
914
+ related_skills?: flow_open_platform_model.WorkbenchReferenceSummary;
915
+ related_plugins?: flow_open_platform_model.WorkbenchReferenceSummary;
916
+ appearance_locations?: Array<string>;
917
+ /** 只读;协议待接入,暂不返回,不写入元信息或审批快照 */
918
+ preview_url?: string;
919
+ }
920
+ /** 工作台关联资源明细。仅有摘要的历史审批快照可返回只含 Name 的展示项。
921
+ 审核取本轮冻结值,管理取 ActionHub 当前生效版本的关联信息;名称、图标缺失时保持缺省。 */
922
+ interface WorkbenchReferenceItem {
923
+ resource_id?: string;
924
+ type?: flow_open_platform_model.WorkbenchResourceType;
925
+ source?: flow_open_platform_model.WorkbenchResourceSource;
926
+ name?: string;
927
+ icon_url?: string;
928
+ }
929
+ interface WorkbenchReferenceSummary {
930
+ /** 该类关联资源实际总数,不受展示截断影响 */
931
+ total?: Int64;
932
+ /** 字段 2 已退役。
933
+ 每组最多 7 项,优先保留名称非空的明细,保留入选项的原始相对顺序 */
934
+ items?: Array<flow_open_platform_model.WorkbenchReferenceItem>;
935
+ }
690
936
  }
691
937
 
692
938
  declare namespace flowpc_common_agw {
@@ -707,6 +953,8 @@ declare interface InitContext {
707
953
  declare interface InitOption {
708
954
  flags: string;
709
955
  description: string;
956
+ /** Included in the interactive capability selector when available. */
957
+ capability?: boolean | ((ctx: InitContext) => boolean);
710
958
  /** Yes/no question asked in interactive init; returning undefined skips the question. */
711
959
  prompt?: string | ((ctx: InitContext) => string | undefined);
712
960
  }
@@ -760,8 +1008,6 @@ declare interface PluginAPI {
760
1008
  };
761
1009
  }
762
1010
 
763
- declare type PluginDraft = flow_open_platform_devtool.PluginDraft;
764
-
765
1011
  declare interface PluginHooks {
766
1012
  setup: RegisteredHook<SetupHook>[];
767
1013
  initOptions: InitOption[];
@@ -795,9 +1041,11 @@ declare class PluginProject {
795
1041
  private manifest;
796
1042
  constructor(cwd?: string);
797
1043
  get plugin(): PluginManifest;
1044
+ get hasWorkbench(): boolean;
798
1045
  updatePluginId(id: string): Promise<void>;
799
1046
  updateManifest(update: (manifest: PluginManifest) => PluginManifest): Promise<void>;
800
1047
  updatePublicationType(publicationType: PublicationType): Promise<void>;
1048
+ assertWorkbenchModules(): void;
801
1049
  pack({ version, exclude }?: PackagePlan): Promise<Blob>;
802
1050
  readSkills(): Skill[];
803
1051
  get mcpServers(): McpServer[];
@@ -805,6 +1053,8 @@ declare class PluginProject {
805
1053
 
806
1054
  declare type PrepareTemplatesHook = (ctx: InitContext) => Awaitable<readonly string[]>;
807
1055
 
1056
+ declare type ProjectDraft = flow_open_platform_devtool.PluginDraft | flow_open_platform_devtool.WorkbenchDraft;
1057
+
808
1058
  declare type ProvideSkillsHook = (ctx: {
809
1059
  project: PluginProject;
810
1060
  }) => Awaitable<readonly SkillSource[]>;
@@ -850,7 +1100,7 @@ declare interface UploadContext {
850
1100
 
851
1101
  declare interface UploadDraftResult {
852
1102
  packageId: string;
853
- draft: PluginDraft;
1103
+ draft: ProjectDraft;
854
1104
  }
855
1105
 
856
1106
  declare interface UploadOptions {