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

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
@@ -90,6 +90,614 @@ declare type ExcludeHook = (ctx: {
90
90
  project: PluginProject;
91
91
  }, purpose: PackagePurpose) => Awaitable<readonly string[]>;
92
92
 
93
+ declare namespace flow_open_platform_ability {
94
+ /** 子元素填写内容。ModuleID 必填,类型化内容必须与包解析出的模块类型一致。 */
95
+ interface AbilityModuleInput {
96
+ module_id?: string;
97
+ /** 2、3、4 曾用于 EvaluationURL、ExamplePrompt、TestAccount,不复用。 */
98
+ skill?: flow_open_platform_ability.SkillModuleInput;
99
+ mcp?: flow_open_platform_ability.MCPModuleInput;
100
+ mcp_app?: flow_open_platform_ability.MCPAppModuleInput;
101
+ cli?: flow_open_platform_ability.CLIModuleInput;
102
+ /** Type=MINI_APP,应用插件 */
103
+ mini_app?: flow_open_platform_ability.MiniAppModuleInput;
104
+ }
105
+ /** CLI 子元素填写内容。 */
106
+ interface CLIModuleInput {
107
+ instruction_document_url?: string;
108
+ }
109
+ interface GetAbilitySourceRequest {
110
+ ability_id?: string;
111
+ draft_id?: string;
112
+ /** 版本实体 ID */
113
+ version_id?: string;
114
+ }
115
+ interface GetAbilitySourceResponse {
116
+ PackageContent?: Blob;
117
+ code?: number;
118
+ msg?: string;
119
+ message?: string;
120
+ error?: flowpc_common_agw.Error;
121
+ http_status_code?: number;
122
+ }
123
+ interface GetAbilityVersionBuildStatusData {
124
+ /** 下游状态缺失时不返回,不能据此判定产物就绪 */
125
+ artifact_status?: string;
126
+ /** 下游返回的构建错误信息 */
127
+ artifact_build_error_info?: flow_open_platform_model.ArtifactBuildErrorInfo;
128
+ }
129
+ interface ListAbilityCategoriesData {
130
+ items?: Array<flow_open_platform_model.AbilityCategory>;
131
+ }
132
+ interface ListAbilityVersionsData {
133
+ items?: Array<flow_open_platform_model.AbilityVersionSummary>;
134
+ page?: flow_open_platform_common.PageResponse;
135
+ }
136
+ /** MCP Apps 子元素填写内容。 */
137
+ interface MCPAppModuleInput {
138
+ mcp?: flow_open_platform_ability.MCPModuleInput;
139
+ }
140
+ /** MCP 子元素填写内容。 */
141
+ interface MCPModuleInput {
142
+ /** 按鉴权方式填写测试账号或测试 Key */
143
+ test_credential?: string;
144
+ }
145
+ /** 小程序子元素填写内容。展示信息来自插件包,应用凭证通过专用接口读取,均不可填写。 */
146
+ interface MiniAppModuleInput {
147
+ evaluation_report_url?: string;
148
+ /** 与 Skill 一致,提审时要求 5 至 10 条非空内容 */
149
+ example_prompts?: Array<string>;
150
+ }
151
+ /** Skill 子元素填写内容。 */
152
+ interface SkillModuleInput {
153
+ evaluation_report_url?: string;
154
+ /** 提审时要求 5 至 10 条非空内容 */
155
+ example_prompts?: Array<string>;
156
+ }
157
+ }
158
+
159
+ declare namespace flow_open_platform_common {
160
+ /** 分页响应 */
161
+ interface PageResponse {
162
+ next_page_token?: string;
163
+ }
164
+ }
165
+
166
+ declare namespace flow_open_platform_devtool {
167
+ enum DevtoolPluginVisibilityType {
168
+ /** 仅本人 */
169
+ SELF = 1,
170
+ /** 全租户 */
171
+ TENANT = 2
172
+ }
173
+ /** 为含 MINI_APP 的既有 PLUGIN 版本生成二维码预览入口,支持 TEST / RELEASE。
174
+ 用户和业务/租户上下文从可信登录态取得,不接受客户端指定下游版本。
175
+ 不创建或构建资源,不执行安装,不修改正式发布状态。
176
+ optional 是协议兼容修饰;业务必填、权限及版本状态由服务端校验。
177
+ PreviewURL 为二维码编码内容,由前端或 CLI 绘制;不承诺作为 PC 网页链接使用。 */
178
+ interface AbilityPreview {
179
+ /** 1、3 曾用于 VersionID、ExpiresAtMS,不复用。
180
+ doubaoapp://debug?short_token=...;短 Token 用于还原原始 debugInfo 链接,完整 URL 禁止写普通日志 */
181
+ preview_url?: string;
182
+ }
183
+ interface CreateAbilityDevelopmentPreviewData {
184
+ preview?: flow_open_platform_devtool.AbilityPreview;
185
+ /** 预览链接过期时间,Unix 毫秒 */
186
+ expires_at_ms?: Int64;
187
+ /** 插件展示名称 */
188
+ display_name?: string;
189
+ /** 测试版本号 */
190
+ test_version?: string;
191
+ }
192
+ interface CreateAbilityDevelopmentPreviewRequest {
193
+ /** 必填,版本实体 ID;不接受草稿 ID、语义版本号或 latest */
194
+ version_id?: string;
195
+ }
196
+ interface CreateAbilityDevelopmentPreviewResponse {
197
+ data?: flow_open_platform_devtool.CreateAbilityDevelopmentPreviewData;
198
+ code?: number;
199
+ msg?: string;
200
+ message?: string;
201
+ error?: flowpc_common_agw.Error;
202
+ http_status_code?: number;
203
+ }
204
+ interface DevtoolCreatePluginDevelopmentPreviewRequest {
205
+ /** 按发布类型定位;与 AbilityID 二选一;包内 manifest.name,非展示名称 */
206
+ name?: string;
207
+ /** 业务必填,三段式版本号 */
208
+ version?: string;
209
+ /** 开放平台能力 ID;与 Name 二选一 */
210
+ ability_id?: string;
211
+ /** 按 Name 默认 PUBLIC,企业传 ENTERPRISE。按 AbilityID 沿用主体类型,显式值须一致。 */
212
+ publication_type?: string;
213
+ }
214
+ interface DevtoolCreatePluginDevelopmentPreviewResponse {
215
+ data?: flow_open_platform_devtool.CreateAbilityDevelopmentPreviewData;
216
+ code?: number;
217
+ msg?: string;
218
+ message?: string;
219
+ error?: flowpc_common_agw.Error;
220
+ http_status_code?: number;
221
+ }
222
+ interface DevtoolCreatePluginPackageUploadData {
223
+ package_id?: string;
224
+ }
225
+ interface DevtoolCreatePluginPackageUploadRequest {
226
+ file_name?: string;
227
+ PackageContent?: Blob;
228
+ }
229
+ interface DevtoolCreatePluginPackageUploadResponse {
230
+ data?: flow_open_platform_devtool.DevtoolCreatePluginPackageUploadData;
231
+ code?: number;
232
+ msg?: string;
233
+ message?: string;
234
+ error?: flowpc_common_agw.Error;
235
+ http_status_code?: number;
236
+ }
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;
251
+ code?: number;
252
+ msg?: string;
253
+ message?: string;
254
+ error?: flowpc_common_agw.Error;
255
+ http_status_code?: number;
256
+ }
257
+ interface DevtoolGetPluginDraftData {
258
+ draft?: flow_open_platform_devtool.PluginDraft;
259
+ }
260
+ interface DevtoolGetPluginDraftRequest {
261
+ /** 按发布类型定位;与 AbilityID 二选一;包内 manifest.name,非展示名称 */
262
+ name?: string;
263
+ /** 开放平台能力 ID;与 Name 二选一 */
264
+ ability_id?: string;
265
+ /** 按 Name 默认 PUBLIC,企业传 ENTERPRISE。按 AbilityID 沿用主体类型,显式值须一致。 */
266
+ publication_type?: string;
267
+ }
268
+ interface DevtoolGetPluginDraftResponse {
269
+ data?: flow_open_platform_devtool.DevtoolGetPluginDraftData;
270
+ code?: number;
271
+ msg?: string;
272
+ message?: string;
273
+ error?: flowpc_common_agw.Error;
274
+ http_status_code?: number;
275
+ }
276
+ interface DevtoolGetPluginMiniAppBaseInfoData {
277
+ mini_app_base_info?: flow_open_platform_model.MiniAppBaseInfo;
278
+ }
279
+ interface DevtoolGetPluginMiniAppBaseInfoRequest {
280
+ /** 按发布类型定位;与 AbilityID 二选一;包内 manifest.name,非展示名称 */
281
+ name?: string;
282
+ /** 开放平台能力 ID;与 Name 二选一 */
283
+ ability_id?: string;
284
+ /** 按 Name 默认 PUBLIC,企业传 ENTERPRISE。按 AbilityID 沿用主体类型,显式值须一致。 */
285
+ publication_type?: string;
286
+ }
287
+ interface DevtoolGetPluginMiniAppBaseInfoResponse {
288
+ data?: flow_open_platform_devtool.DevtoolGetPluginMiniAppBaseInfoData;
289
+ code?: number;
290
+ msg?: string;
291
+ message?: string;
292
+ error?: flowpc_common_agw.Error;
293
+ http_status_code?: number;
294
+ }
295
+ /** 保持原响应 Data 的字段编号和类型兼容;仅 Devtool 增加审批记录。 */
296
+ interface DevtoolGetPluginVersionApprovalData {
297
+ /** 1、2 为历史字段,保留编号不复用。
298
+ 兼容原字段,与 Approval.Reply 一致 */
299
+ improvement_reason?: string;
300
+ approval?: flow_open_platform_devtool.PluginVersionApproval;
301
+ }
302
+ interface DevtoolGetPluginVersionApprovalRequest {
303
+ /** 业务必填 */
304
+ approval_id?: string;
305
+ /** 默认 PUBLIC,兼容既有 CLI;企业审批传 ENTERPRISE */
306
+ publication_type?: string;
307
+ }
308
+ interface DevtoolGetPluginVersionApprovalResponse {
309
+ data?: flow_open_platform_devtool.DevtoolGetPluginVersionApprovalData;
310
+ code?: number;
311
+ msg?: string;
312
+ message?: string;
313
+ error?: flowpc_common_agw.Error;
314
+ http_status_code?: number;
315
+ }
316
+ interface DevtoolGetPluginVersionBuildStatusRequest {
317
+ /** 按发布类型定位;与 AbilityID 二选一;包内 manifest.name,非展示名称 */
318
+ name?: string;
319
+ /** 业务必填,三段式版本号 */
320
+ version?: string;
321
+ /** 开放平台能力 ID;与 Name 二选一 */
322
+ ability_id?: string;
323
+ /** 按 Name 默认 PUBLIC,企业传 ENTERPRISE。按 AbilityID 沿用主体类型,显式值须一致。 */
324
+ publication_type?: string;
325
+ }
326
+ interface DevtoolGetPluginVersionBuildStatusResponse {
327
+ data?: flow_open_platform_ability.GetAbilityVersionBuildStatusData;
328
+ code?: number;
329
+ msg?: string;
330
+ message?: string;
331
+ error?: flowpc_common_agw.Error;
332
+ http_status_code?: number;
333
+ }
334
+ interface DevtoolListPluginCategoriesRequest {
335
+ publication_type?: string;
336
+ }
337
+ interface DevtoolListPluginCategoriesResponse {
338
+ data?: flow_open_platform_ability.ListAbilityCategoriesData;
339
+ code?: number;
340
+ msg?: string;
341
+ message?: string;
342
+ error?: flowpc_common_agw.Error;
343
+ http_status_code?: number;
344
+ }
345
+ interface DevtoolListPluginVersionsRequest {
346
+ page_token?: string;
347
+ /** 按发布类型定位;与 AbilityID 二选一;包内 manifest.name,非展示名称 */
348
+ name?: string;
349
+ /** 1–50,未传默认 20 */
350
+ page_size?: number;
351
+ /** 开放平台能力 ID;与 Name 二选一 */
352
+ ability_id?: string;
353
+ /** 按 Name 默认 PUBLIC,企业传 ENTERPRISE。按 AbilityID 沿用主体类型,显式值须一致。 */
354
+ publication_type?: string;
355
+ }
356
+ interface DevtoolListPluginVersionsResponse {
357
+ data?: flow_open_platform_ability.ListAbilityVersionsData;
358
+ code?: number;
359
+ msg?: string;
360
+ message?: string;
361
+ error?: flowpc_common_agw.Error;
362
+ http_status_code?: number;
363
+ }
364
+ interface DevtoolOperatePluginToUserStoreData {}
365
+ interface DevtoolOperatePluginToUserStoreRequest {
366
+ /** 安装必填;卸载时可用原始插件 Name 替代 */
367
+ package_id?: string;
368
+ /** 业务必填,仅支持 Install / Uninstall */
369
+ action?: string;
370
+ /** 仅卸载使用;原始包的 manifest.name,非生成的测试插件名称 */
371
+ name?: string;
372
+ }
373
+ interface DevtoolOperatePluginToUserStoreResponse {
374
+ data?: flow_open_platform_devtool.DevtoolOperatePluginToUserStoreData;
375
+ code?: number;
376
+ msg?: string;
377
+ message?: string;
378
+ error?: flowpc_common_agw.Error;
379
+ http_status_code?: number;
380
+ }
381
+ interface DevtoolPluginVisibilityConfig {
382
+ /** 传入配置时必填 */
383
+ type?: flow_open_platform_devtool.DevtoolPluginVisibilityType;
384
+ }
385
+ interface DevtoolSavePluginVersionData {
386
+ /** 实际保存的三段式版本号,供后续查询、预览及送审使用 */
387
+ version?: string;
388
+ }
389
+ interface DevtoolSavePluginVersionRequest {
390
+ /** 1–64 字节 */
391
+ request_id?: string;
392
+ /** 按发布类型定位;与 AbilityID 二选一;包内 manifest.name,非展示名称 */
393
+ name?: string;
394
+ /** 开放平台能力 ID;与 Name 二选一 */
395
+ ability_id?: string;
396
+ /** 按 Name 默认 PUBLIC,企业传 ENTERPRISE。按 AbilityID 沿用主体类型,显式值须一致。 */
397
+ publication_type?: string;
398
+ }
399
+ interface DevtoolSavePluginVersionResponse {
400
+ data?: flow_open_platform_devtool.DevtoolSavePluginVersionData;
401
+ code?: number;
402
+ msg?: string;
403
+ message?: string;
404
+ error?: flowpc_common_agw.Error;
405
+ http_status_code?: number;
406
+ }
407
+ interface DevtoolSubmitPluginVersionApprovalData {
408
+ approval_id?: string;
409
+ }
410
+ interface DevtoolSubmitPluginVersionApprovalRequest {
411
+ /** 按发布类型定位;与 AbilityID 二选一;包内 manifest.name,非展示名称 */
412
+ name?: string;
413
+ /** 业务必填,三段式版本号 */
414
+ version?: string;
415
+ /** 开放平台能力 ID;与 Name 二选一 */
416
+ ability_id?: string;
417
+ /** 按 Name 默认 PUBLIC,企业传 ENTERPRISE。按 AbilityID 沿用主体类型,显式值须一致。 */
418
+ publication_type?: string;
419
+ }
420
+ interface DevtoolSubmitPluginVersionApprovalResponse {
421
+ data?: flow_open_platform_devtool.DevtoolSubmitPluginVersionApprovalData;
422
+ code?: number;
423
+ msg?: string;
424
+ message?: string;
425
+ error?: flowpc_common_agw.Error;
426
+ http_status_code?: number;
427
+ }
428
+ interface DevtoolUpsertPluginDraftData {
429
+ draft?: flow_open_platform_devtool.PluginDraft;
430
+ }
431
+ interface DevtoolUpsertPluginDraftRequest {
432
+ /** 草稿保存不提供 RequestID 幂等重放。 */
433
+ package_id?: string;
434
+ /** 最多两个 */
435
+ category_ids?: Array<string>;
436
+ modules?: Array<flow_open_platform_ability.AbilityModuleInput>;
437
+ /** 空字符串表示清空 */
438
+ additional_info?: string;
439
+ /** 5 曾用于 Version,不复用。
440
+ 按发布类型定位;与 AbilityID 二选一;包内 manifest.name,非展示名称 */
441
+ name?: string;
442
+ /** 开放平台能力 ID;与 Name 二选一 */
443
+ ability_id?: string;
444
+ /** 新建或按包名定位时,省略按 PUBLIC 处理。企业插件须传 ENTERPRISE,与本次包校验使用的发布类型一致。
445
+ 按 AbilityID 更新时可省略,沿用主体的发布类型。显式传入的类型必须与主体一致。 */
446
+ publication_type?: string;
447
+ /** 仅企业插件可传。省略时沿用草稿范围,首次建草稿默认仅本人。显式选择整体替换。 */
448
+ visibility_config?: flow_open_platform_devtool.DevtoolPluginVisibilityConfig;
449
+ }
450
+ interface DevtoolUpsertPluginDraftResponse {
451
+ data?: flow_open_platform_devtool.DevtoolUpsertPluginDraftData;
452
+ code?: number;
453
+ msg?: string;
454
+ message?: string;
455
+ error?: flowpc_common_agw.Error;
456
+ http_status_code?: number;
457
+ }
458
+ interface DevtoolValidatePluginMaterialData {
459
+ passed?: boolean;
460
+ issues?: Array<flow_open_platform_model.AbilityValidationIssue>;
461
+ }
462
+ interface DevtoolValidatePluginMaterialRequest {
463
+ package_id?: string;
464
+ /** PACKAGE_PARSE 仅解析包;省略时执行完整检测,含小程序时执行 APP_VALIDATE */
465
+ validate_list?: Array<string>;
466
+ /** 仅检测指定 MCP 模块的连通性 */
467
+ module_id?: string;
468
+ /** 按发布类型定位;与 AbilityID 二选一;包内 manifest.name,非展示名称 */
469
+ name?: string;
470
+ /** 指定已创建的版本;省略时检测当前草稿 */
471
+ version?: string;
472
+ /** 开放平台能力 ID;与 Name 二选一 */
473
+ ability_id?: string;
474
+ publication_type?: string;
475
+ }
476
+ interface DevtoolValidatePluginMaterialResponse {
477
+ data?: flow_open_platform_devtool.DevtoolValidatePluginMaterialData;
478
+ code?: number;
479
+ msg?: string;
480
+ message?: string;
481
+ error?: flowpc_common_agw.Error;
482
+ http_status_code?: number;
483
+ }
484
+ interface DevtoolWithdrawPluginVersionApprovalData {
485
+ approval?: flow_open_platform_devtool.PluginVersionApproval;
486
+ }
487
+ interface DevtoolWithdrawPluginVersionApprovalRequest {
488
+ /** 业务必填 */
489
+ approval_id?: string;
490
+ /** 默认 PUBLIC,兼容既有 CLI;企业审批传 ENTERPRISE */
491
+ publication_type?: string;
492
+ }
493
+ interface DevtoolWithdrawPluginVersionApprovalResponse {
494
+ data?: flow_open_platform_devtool.DevtoolWithdrawPluginVersionApprovalData;
495
+ code?: number;
496
+ msg?: string;
497
+ message?: string;
498
+ error?: flowpc_common_agw.Error;
499
+ http_status_code?: number;
500
+ }
501
+ /** 插件草稿视图;AbilityID 用于后续操作,Name 为当前包内 manifest.name。 */
502
+ interface PluginDraft {
503
+ version?: string;
504
+ package?: flow_open_platform_model.AbilityPackage;
505
+ form?: flow_open_platform_model.AbilityRevisionForm;
506
+ modules?: Array<flow_open_platform_model.AbilityModule>;
507
+ created_at_ms?: Int64;
508
+ updated_at_ms?: Int64;
509
+ /** ActionHub 插件 name(包内 manifest.name),非展示名称 */
510
+ name?: string;
511
+ /** 开放平台能力 ID;创建成功后 CLI 可保存项目关联 */
512
+ ability_id?: string;
513
+ publication_type?: string;
514
+ visibility_config?: flow_open_platform_model.VisibilityConfig;
515
+ }
516
+ /** 插件版本审批记录,仅返回 PLUGIN 的审批。 */
517
+ interface PluginVersionApproval {
518
+ approval_id?: string;
519
+ /** major.minor.patch,例如 1.2.3 */
520
+ sem_ver?: string;
521
+ status?: string;
522
+ reply?: string;
523
+ submitted_by?: string;
524
+ submitted_at_ms?: Int64;
525
+ /** 未处理时不返回;通过、拒绝或撤回时记录实际处理人 */
526
+ handled_by?: operation.OperationUser;
527
+ handled_at_ms?: Int64;
528
+ }
529
+ }
530
+
531
+ declare namespace flow_open_platform_model {
532
+ /** 能力审批摘要。 */
533
+ interface AbilityApproval {
534
+ approval_id?: string;
535
+ status?: string;
536
+ reply?: string;
537
+ }
538
+ interface AbilityCategory {
539
+ /** ActionHub 分类 ID */
540
+ category_id?: string;
541
+ name?: string;
542
+ }
543
+ /** 包内合规声明,仅供回显;修改声明须重新上传包,不接受表单覆盖。 */
544
+ interface AbilityCompliance {
545
+ /** 隐私政策链接;商店提审时必填,缺失不阻断上传、解析、调试或创建版本 */
546
+ privacy_url?: string;
547
+ /** 仅接受字符串 "true" / "false";包内缺失或为空时标准化为 "false" */
548
+ is_minor_included?: string;
549
+ /** 特殊行业资质证明链接,选填 */
550
+ special_license_url?: string;
551
+ }
552
+ /** 能力包中的子元素。 */
553
+ interface AbilityModule {
554
+ /** 包内唯一,用于匹配本次解析结果 */
555
+ module_id?: string;
556
+ type?: string;
557
+ name?: string;
558
+ icon_url?: string;
559
+ description?: string;
560
+ /** Type=SKILL */
561
+ skill?: flow_open_platform_model.SkillModule;
562
+ /** Type=MCP */
563
+ mcp?: flow_open_platform_model.MCPModule;
564
+ /** 历史审批快照;新填写内容使用 Skill.EvaluationReportURL */
565
+ evaluation_url?: string;
566
+ /** 历史审批快照;新填写内容使用 Skill.ExamplePrompts */
567
+ example_prompt?: string;
568
+ /** Type=MCP_APP */
569
+ mcp_app?: flow_open_platform_model.MCPAppModule;
570
+ /** Type=CLI */
571
+ cli?: flow_open_platform_model.CLIModule;
572
+ /** Type=MINI_APP */
573
+ mini_app?: flow_open_platform_model.MiniAppModule;
574
+ /** 管理详情:AH 子能力资源 ID */
575
+ resource_id?: string;
576
+ /** 管理详情:父插件固定绑定的子能力版本 */
577
+ version?: string;
578
+ /** 已提供的运行环境;未知时省略,不推断 */
579
+ runtime_types?: Array<string>;
580
+ }
581
+ /** 上传包元数据。PackageID 是不透明标识,不暴露底层存储 Key。 */
582
+ interface AbilityPackage {
583
+ package_id?: string;
584
+ file_name?: string;
585
+ size_bytes?: string;
586
+ }
587
+ /** 从包解析的展示信息;分类和补充说明允许开发者单独修改。 */
588
+ interface AbilityRevisionForm {
589
+ display_name?: string;
590
+ description?: string;
591
+ detailed_description?: string;
592
+ /** 从包内图片解析生成 */
593
+ icon_url?: string;
594
+ /** 历史审批快照;新填写内容使用 Categories */
595
+ category_id?: string;
596
+ /** 使用场景、调用限制等补充信息 */
597
+ additional_info?: string;
598
+ categories?: Array<flow_open_platform_model.AbilityCategory>;
599
+ /** 插件取 plugin.json.extensions.com.doubao,独立技能取 SKILL.md.metadata;审批快照冻结本轮声明 */
600
+ compliance?: flow_open_platform_model.AbilityCompliance;
601
+ }
602
+ /** 物料校验问题。 */
603
+ interface AbilityValidationIssue {
604
+ /** 稳定错误码 */
605
+ code?: string;
606
+ /** 可展示消息 */
607
+ message?: string;
608
+ /** 包内相对路径 */
609
+ path?: string;
610
+ /** 文件内字段路径,如 metadata.version */
611
+ field_path?: string;
612
+ }
613
+ /** 开发者控制台中的版本列表项。VersionID 和 DraftID 二选一。 */
614
+ interface AbilityVersionSummary {
615
+ version_id?: string;
616
+ draft_id?: string;
617
+ version?: string;
618
+ status?: string;
619
+ status_message?: string;
620
+ created_at_ms?: Int64;
621
+ updated_at_ms?: Int64;
622
+ is_online?: boolean;
623
+ current_approval?: flow_open_platform_model.AbilityApproval;
624
+ /** 包含的能力类型,MINI_APP 表示小程序 */
625
+ capability?: Array<string>;
626
+ /** 11 已移除,保留编号不复用。
627
+ 版本最近一次更新人,UserID 为转换后的飞书 ID,user_id_type=feishu_user_id;姓名、头像实时查询 */
628
+ updated_by?: operation.OperationUser;
629
+ }
630
+ /** 对齐小程序平台 ArtifactBuildErrorInfo;错误内容需移除内部日志和敏感信息。 */
631
+ interface ArtifactBuildErrorInfo {
632
+ last_status_before_failed?: string;
633
+ error_code?: string;
634
+ error_info?: string;
635
+ }
636
+ /** CLI 子元素信息。功能说明文档由开发者填写。 */
637
+ interface CLIModule {
638
+ instruction_document_url?: string;
639
+ }
640
+ /** MCP Apps 子元素信息。 */
641
+ interface MCPAppModule {
642
+ mcp?: flow_open_platform_model.MCPModule;
643
+ }
644
+ /** MCP 子元素信息。传输和鉴权方式从包中解析,测试凭据仅返回脱敏摘要。 */
645
+ interface MCPModule {
646
+ transport?: string;
647
+ auth_type?: string;
648
+ has_test_credential?: boolean;
649
+ /** 4 曾用于 TestAccount,不复用。 */
650
+ masked_test_credential?: string;
651
+ }
652
+ /** 小程序基础信息。名称、头像、描述来自插件包;应用凭证仅向具有凭证读取权限的调用方返回。 */
653
+ interface MiniAppBaseInfo {
654
+ /** 小程序应用标识 */
655
+ app_id?: string;
656
+ /** 应用密钥,禁止写普通日志 */
657
+ app_secret?: string;
658
+ /** PluginParsedManifest.Name,只读 */
659
+ name?: string;
660
+ /** PluginParsedManifest.Icon,只读 */
661
+ icon_url?: string;
662
+ /** PluginParsedManifest.Description,只读 */
663
+ description?: string;
664
+ }
665
+ /** 小程序子元素信息,基础凭证按调用方的凭证读取权限返回。 */
666
+ interface MiniAppModule {
667
+ mini_app_base_info?: flow_open_platform_model.MiniAppBaseInfo;
668
+ evaluation_report_url?: string;
669
+ example_prompts?: Array<string>;
670
+ }
671
+ /** Skill 子元素信息。评测报告和示例 Prompt 由开发者填写。 */
672
+ interface SkillModule {
673
+ script_count?: number;
674
+ evaluation_report_url?: string;
675
+ example_prompts?: Array<string>;
676
+ }
677
+ interface VisibilityConfig {
678
+ /** 查询沿用 Aily:0:未指定;1:所有人;2:租户内全员;3:指定对象;4:仅自己。写入仅支持 2、3 */
679
+ type?: number;
680
+ /** 管理员指定范围支持用户、部门、用户组,至少一个对象;全员时为空。用户组保留原 ID,不转换为群聊或展开成员 */
681
+ entities?: Array<flow_open_platform_model.VisibilityEntity>;
682
+ }
683
+ /** 企业范围对象;群聊类型沿用 Aily,不将其映射为部门。 */
684
+ interface VisibilityEntity {
685
+ /** 0:未指定;1:用户;2:部门;3:租户;4:群聊;5:Admin 用户组。管理员范围支持 1、2、5;开发者申请范围沿用原约定 */
686
+ type?: number;
687
+ /** 用户、部门、租户使用原生飞书 ID;群聊原样使用 Aily ChatID,不转为用户 ID 或 open_chat_id */
688
+ entityID?: string;
689
+ }
690
+ }
691
+
692
+ declare namespace flowpc_common_agw {
693
+ /** Deprecated: 新增IDL 改引用上一层目录的 flow_agw/flow_agw_error.thrift */
694
+ interface Error {
695
+ code?: number;
696
+ message?: string;
697
+ locale?: string;
698
+ }
699
+ }
700
+
93
701
  declare interface InitContext {
94
702
  name: string;
95
703
  directory: string;
@@ -103,12 +711,25 @@ declare interface InitOption {
103
711
  prompt?: string | ((ctx: InitContext) => string | undefined);
104
712
  }
105
713
 
714
+ declare type Int64 = string | number;
715
+
106
716
  declare type Logger = Record<'info' | 'success' | 'warn' | 'error', (message: string) => void>;
107
717
 
108
718
  export declare function main(argv?: string[], options?: CLIOptions): Promise<void>;
109
719
 
110
720
  declare type McpServer = Record<string, unknown>;
111
721
 
722
+ declare namespace operation {
723
+ /** 运营平台人员展示信息(操作人或提交人);身份由服务端从可信登录态或已保存的审批记录取得,姓名、头像按需补充查询。 */
724
+ interface OperationUser {
725
+ /** 原始身份 ID,按 UserIDType 解释 */
726
+ user_id?: string;
727
+ user_id_type?: string;
728
+ name?: string;
729
+ avatar_url?: string;
730
+ }
731
+ }
732
+
112
733
  declare interface PackagePlan {
113
734
  version?: string;
114
735
  exclude?: readonly string[];
@@ -139,6 +760,8 @@ declare interface PluginAPI {
139
760
  };
140
761
  }
141
762
 
763
+ declare type PluginDraft = flow_open_platform_devtool.PluginDraft;
764
+
142
765
  declare interface PluginHooks {
143
766
  setup: RegisteredHook<SetupHook>[];
144
767
  initOptions: InitOption[];
@@ -227,11 +850,7 @@ declare interface UploadContext {
227
850
 
228
851
  declare interface UploadDraftResult {
229
852
  packageId: string;
230
- draft: {
231
- name?: string;
232
- ability_id?: string;
233
- version?: string;
234
- };
853
+ draft: PluginDraft;
235
854
  }
236
855
 
237
856
  declare interface UploadOptions {