@cocos/cocos-cli-types 0.0.1-alpha.21.1 → 0.0.1-alpha.22.1

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.
@@ -23,6 +23,7 @@ export declare interface IBaseConfiguration extends EventEmitterMethods {
23
23
  * 默认配置数据
24
24
  */
25
25
  getDefaultConfig(): Record<string, any> | undefined;
26
+ mergeDefaultConfig(defaultConfig?: Record<string, any>): void;
26
27
  /**
27
28
  * 获取配置值
28
29
  * @param key 配置键名,支持点号分隔的嵌套路径
@@ -61,26 +62,21 @@ export declare interface ICocosConfigurationNode {
61
62
  properties: Record<string, ICocosConfigurationPropertySchema>;
62
63
  }
63
64
 
64
- /**
65
- * Cocos 配置元数据定义。
66
- *
67
- * 基于 COCOS_CONFIG 类型(@types/cocos.config.d.ts)展开,
68
- * 按 group(顶级模块) → node(二级字段) 组织。
69
- *
70
- * 供 Pink 配置面板渲染使用,通过 CocosHostConfiguration.getMetadata() 返回。
71
- */
72
65
  export declare interface ICocosConfigurationPropertySchema {
73
66
  type: 'string' | 'number' | 'boolean' | 'object' | 'array';
74
67
  default?: unknown;
75
68
  title?: string;
76
69
  description?: string;
77
- scope: string[];
78
- enum?: any[];
70
+ enum?: Array<string | number | boolean>;
79
71
  enumDescriptions?: string[];
80
72
  minimum?: number;
81
73
  maximum?: number;
82
74
  step?: number;
83
75
  order?: number;
76
+ properties?: Record<string, ICocosConfigurationPropertySchema>;
77
+ items?: ICocosConfigurationPropertySchema | ICocosConfigurationPropertySchema[];
78
+ additionalProperties?: boolean | ICocosConfigurationPropertySchema;
79
+ required?: string[];
84
80
  }
85
81
 
86
82
  /**
@@ -99,6 +95,13 @@ export declare function migrate(): Promise<void>;
99
95
 
100
96
  export declare function migrateFromProject(): Promise<IConfiguration>;
101
97
 
98
+ /**
99
+ * 注册 configurationManager 保存事件的监听器
100
+ * 每次 cocos.config.json 被写入磁盘时触发
101
+ * @returns 取消监听的函数
102
+ */
103
+ export declare function onDidSave(callback: () => void): () => void;
104
+
102
105
  export declare function reload(): Promise<void>;
103
106
 
104
107
  export declare function remove(key: string, scope?: ConfigurationScope): Promise<boolean>;
package/index.d.ts CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  import { ChunkInfo } from '@cocos/creator-programming-quick-pack/lib/loader';
4
4
  import { EventEmitter } from 'events';
5
+ import { NextFunction } from 'express';
6
+ import { Request as Request_2 } from 'express';
7
+ import { Response as Response_2 } from 'express';
8
+
9
+ /**
10
+ * Add component to node // 添加组件到节点
11
+ */
12
+ declare function addComponent(options: IAddComponentOptions): Promise<IComponent>;
5
13
 
6
14
  /** 动画剪辑资源的 userData */
7
15
  declare interface AnimationClipAssetUserData {
@@ -443,6 +451,19 @@ declare type CCEModuleMap = {
443
451
 
444
452
  declare function close_2(): Promise<void>;
445
453
 
454
+ export declare namespace Component {
455
+ export {
456
+ addComponent,
457
+ createComponent,
458
+ removeComponent,
459
+ queryComponent,
460
+ resetComponent,
461
+ setProperty,
462
+ executeComponentMethod,
463
+ queryAllComponent
464
+ };
465
+ }
466
+
446
467
  export declare namespace Configuration {
447
468
  export {
448
469
  init_3 as init,
@@ -453,6 +474,7 @@ export declare namespace Configuration {
453
474
  set,
454
475
  remove,
455
476
  save,
477
+ onDidSave,
456
478
  getMetadata,
457
479
  IConfiguration,
458
480
  ConfigurationScope,
@@ -514,6 +536,11 @@ declare interface CreateAssetOptions {
514
536
  customOptions?: Record<string, any>;
515
537
  }
516
538
 
539
+ /**
540
+ * Add component to node // 添加组件到节点
541
+ */
542
+ declare function createComponent(options: IAddComponentOptions): Promise<boolean>;
543
+
517
544
  /**
518
545
  * Delete Asset // 删除资源
519
546
  */
@@ -608,6 +635,8 @@ declare interface ExecuteAssetDBScriptMethodOptions {
608
635
  args?: any[];
609
636
  }
610
637
 
638
+ declare function executeComponentMethod(options: IExecuteComponentMethodOptions): Promise<boolean>;
639
+
611
640
  declare interface Features {
612
641
  [feature: string]: IModuleItem;
613
642
  }
@@ -669,13 +698,27 @@ declare function getMetadata(): Promise<ICocosConfigurationNode[]>;
669
698
  declare function getProgrammingFacet(): Promise<ProgrammingFacet>;
670
699
 
671
700
  /**
672
- * Get the MCP server status.
701
+ * Get the MCP registration status.
673
702
  */
674
703
  declare function getStatus(): {
704
+ registered: boolean;
705
+ url?: string;
706
+ };
707
+
708
+ /**
709
+ * Get the server running status.
710
+ */
711
+ declare function getStatus_2(): {
675
712
  running: boolean;
676
713
  url?: string;
677
714
  };
678
715
 
716
+ /**
717
+ * Get the current server base URL.
718
+ * Returns undefined if the server is not running.
719
+ */
720
+ declare function getUrl(): string | undefined;
721
+
679
722
  /** glTF 动画资源的 userData */
680
723
  declare interface GltfAnimationAssetUserData {
681
724
  gltfIndex: number;
@@ -857,6 +900,14 @@ declare interface GlTFUserData {
857
900
  };
858
901
  }
859
902
 
903
+ /**
904
+ * 创建/添加组件
905
+ */
906
+ declare interface IAddComponentOptions {
907
+ nodePathOrUuid: string;
908
+ component: string;
909
+ }
910
+
860
911
  declare interface IAssetConfig {
861
912
  displayName?: string;
862
913
  description?: string;
@@ -964,6 +1015,7 @@ declare interface IBaseConfiguration extends EventEmitterMethods {
964
1015
  * 默认配置数据
965
1016
  */
966
1017
  getDefaultConfig(): Record<string, any> | undefined;
1018
+ mergeDefaultConfig(defaultConfig?: Record<string, any>): void;
967
1019
  /**
968
1020
  * 获取配置值
969
1021
  * @param key 配置键名,支持点号分隔的嵌套路径
@@ -1007,32 +1059,62 @@ declare interface ICocosConfigurationNode {
1007
1059
  properties: Record<string, ICocosConfigurationPropertySchema>;
1008
1060
  }
1009
1061
 
1010
- /**
1011
- * Cocos 配置元数据定义。
1012
- *
1013
- * 基于 COCOS_CONFIG 类型(@types/cocos.config.d.ts)展开,
1014
- * 按 group(顶级模块) → node(二级字段) 组织。
1015
- *
1016
- * 供 Pink 配置面板渲染使用,通过 CocosHostConfiguration.getMetadata() 返回。
1017
- */
1018
1062
  declare interface ICocosConfigurationPropertySchema {
1019
1063
  type: 'string' | 'number' | 'boolean' | 'object' | 'array';
1020
1064
  default?: unknown;
1021
1065
  title?: string;
1022
1066
  description?: string;
1023
- scope: string[];
1024
- enum?: any[];
1067
+ enum?: Array<string | number | boolean>;
1025
1068
  enumDescriptions?: string[];
1026
1069
  minimum?: number;
1027
1070
  maximum?: number;
1028
1071
  step?: number;
1029
1072
  order?: number;
1073
+ properties?: Record<string, ICocosConfigurationPropertySchema>;
1074
+ items?: ICocosConfigurationPropertySchema | ICocosConfigurationPropertySchema[];
1075
+ additionalProperties?: boolean | ICocosConfigurationPropertySchema;
1076
+ required?: string[];
1030
1077
  }
1031
1078
 
1032
1079
  declare interface ICollisionMatrix {
1033
1080
  [x: string]: number;
1034
1081
  }
1035
1082
 
1083
+ /**
1084
+ * 代表组件属性信息
1085
+ */
1086
+ declare interface IComponent extends IComponentIdentifier {
1087
+ properties: {
1088
+ [key: string]: IPropertyValueType;
1089
+ };
1090
+ prefab: ICompPrefabInfo | null;
1091
+ }
1092
+
1093
+ declare interface IComponentForPinK extends IProperty {
1094
+ value: {
1095
+ enabled: IPropertyValueType;
1096
+ uuid: IPropertyValueType;
1097
+ name: IPropertyValueType;
1098
+ } & Record<string, IPropertyValueType>;
1099
+ mountedRoot?: string;
1100
+ }
1101
+
1102
+ /**
1103
+ * 代表一个组件
1104
+ */
1105
+ declare interface IComponentIdentifier {
1106
+ cid: string;
1107
+ path: string;
1108
+ uuid: string;
1109
+ name: string;
1110
+ type: string;
1111
+ enabled: boolean;
1112
+ }
1113
+
1114
+ declare interface ICompPrefabInfo {
1115
+ fileId: string;
1116
+ }
1117
+
1036
1118
  /**
1037
1119
  * 配置的格式
1038
1120
  */
@@ -1165,6 +1247,15 @@ declare interface IEngineProjectConfig extends Exclude<IEngineConfig, 'includeMo
1165
1247
  globalConfigKey?: string;
1166
1248
  }
1167
1249
 
1250
+ /**
1251
+ * 执行组件方法选项
1252
+ */
1253
+ declare interface IExecuteComponentMethodOptions {
1254
+ uuid: string;
1255
+ name: string;
1256
+ args: any[];
1257
+ }
1258
+
1168
1259
  declare interface IFbxSetting {
1169
1260
  /**
1170
1261
  * https://github.com/cocos-creator/FBX-glTF-conv/pull/26
@@ -1247,6 +1338,11 @@ declare type IFlags = Record<string, boolean | number>;
1247
1338
 
1248
1339
  declare type IFlags_2 = Record<string, boolean | number>;
1249
1340
 
1341
+ declare interface IGetPostConfig {
1342
+ url: string | RegExp;
1343
+ handler: (req: Request_2, res: Response_2, next?: NextFunction) => Promise<void>;
1344
+ }
1345
+
1250
1346
  declare interface IInitEngineInfo {
1251
1347
  importBase: string;
1252
1348
  nativeBase: string;
@@ -1302,6 +1398,13 @@ declare interface ImageMeta {
1302
1398
  remap?: string;
1303
1399
  }
1304
1400
 
1401
+ declare interface IMiddlewareContribution {
1402
+ get?: IGetPostConfig[];
1403
+ post?: IGetPostConfig[];
1404
+ staticFiles?: IStaticFileConfig[];
1405
+ socket?: ISocketConfig;
1406
+ }
1407
+
1305
1408
  declare interface IModuleConfig {
1306
1409
  moduleTreeDump: {
1307
1410
  default: IModules;
@@ -1458,6 +1561,78 @@ declare interface IProject {
1458
1561
  updateInfo<T>(keyOrValue: string | ProjectInfo, value?: T): Promise<boolean>;
1459
1562
  }
1460
1563
 
1564
+ /**
1565
+ * 组件的 dump 数据,以 IProperty 格式编码组件信息
1566
+ * 与 IComponent 不同,所有属性(包括 uuid, name, enabled)都通过 encodeObject 编码为 IProperty
1567
+ */
1568
+ declare interface IProperty {
1569
+ value: { [key: string]: IPropertyValueType } | IPropertyValueType;
1570
+ default?: any; // 默认值
1571
+
1572
+ // 多选节点之后,这里存储多个数据,用于自行判断多选后的显示效果,无需更新该数据
1573
+ values?: ({ [key: string]: IPropertyValueType } | IPropertyValueType)[];
1574
+
1575
+ lock?: { [key in keyof Vec4]?: IPropertyLock };
1576
+
1577
+ cid?: string;
1578
+ type?: string;
1579
+ ui?: { name: string; data?: any }; // 是否用指定的 UI 组件,name 是组件的名称
1580
+ readonly?: boolean;
1581
+ visible?: boolean;
1582
+ name?: string;
1583
+
1584
+ elementTypeData?: IProperty; // 数组里的数据的默认值 dump
1585
+
1586
+ path?: string; // 数据的搜索路径,这个是由使用方填充的
1587
+
1588
+ isArray?: boolean;
1589
+ invalid?: boolean;
1590
+ extends?: string[]; // 继承链
1591
+ displayName?: string; // 显示到界面上的名字
1592
+ displayOrder?: number; // 显示排序
1593
+ help?: string; // 帮助文档的 url 地址
1594
+ group?: IPropertyGroupOptions; // tab
1595
+ tooltip?: string; // 提示文本
1596
+ editor?: any; // 组件上定义的编辑器数据
1597
+ animatable?: boolean; // 是否可以在动画中编辑
1598
+ radioGroup?: boolean; // 是否渲染为 RadioGroup
1599
+
1600
+ // Enum
1601
+ enumList?: any[]; // enum 类型的 list 选项数组
1602
+
1603
+ bitmaskList?: any[];
1604
+
1605
+ // Number
1606
+ min?: number; // 数值类型的最小值
1607
+ max?: number; // 数值类型的最大值
1608
+ step?: number; // 数值类型的步进值
1609
+ slide?: boolean; // 数组是否显示为滑块
1610
+ unit?: string; // 显示的单位
1611
+ radian?: boolean; // 标识是否为角度
1612
+
1613
+ // Label
1614
+ multiline?: boolean; // 字符串是否允许换行
1615
+ // nullable?: boolean; 属性是否允许为空
1616
+
1617
+ optionalTypes?: string[]; // 对属性是 object 且是可变类型的数据的支持,比如 render-pipeline
1618
+
1619
+ userData?: { [key: string]: any }; // 用户透传的数据
1620
+ }
1621
+
1622
+ declare interface IPropertyGroupOptions {
1623
+ id: string // 默认 'default'
1624
+ name: string,
1625
+ displayOrder: number, // 默认 Infinity, 排在最后面
1626
+ style: string // 默认为 'tab'
1627
+ }
1628
+
1629
+ declare type IPropertyLock = {
1630
+ default: number;
1631
+ message: string
1632
+ };
1633
+
1634
+ declare type IPropertyValueType = IProperty | IProperty[] | null | undefined | number | boolean | string | Vec4 | Vec3 | Vec2 | Mat4 | any | Array<unknown>
1635
+
1461
1636
  declare interface IRedirectInfo {
1462
1637
  // 跳转资源的类型
1463
1638
  type: string;
@@ -1465,6 +1640,25 @@ declare interface IRedirectInfo {
1465
1640
  uuid: string;
1466
1641
  }
1467
1642
 
1643
+ /**
1644
+ * 删除组件
1645
+ */
1646
+ declare interface IRemoveComponentOptions {
1647
+ pathOrUuidOrUrl: string;
1648
+ }
1649
+
1650
+ declare interface ISetPropertyOptionsForPink {
1651
+ uuid: string;
1652
+ path: string;
1653
+ dump: IProperty;
1654
+ record?: boolean;
1655
+ }
1656
+
1657
+ declare interface ISocketConfig {
1658
+ connection: (socket: any) => void;
1659
+ disconnect: (socket: any) => void;
1660
+ }
1661
+
1468
1662
  declare interface ISplashBackgroundColor {
1469
1663
  x: number;
1470
1664
  y: number;
@@ -1491,6 +1685,11 @@ declare interface ISplashSetting {
1491
1685
  }
1492
1686
  }
1493
1687
 
1688
+ declare interface IStaticFileConfig {
1689
+ url: string;
1690
+ path: string;
1691
+ }
1692
+
1494
1693
  declare type ISupportCreateCCType =
1495
1694
  | 'cc.AnimationClip' // 动画剪辑
1496
1695
  | 'cc.Script' // 脚本(TypeScript/JavaScript)
@@ -1600,10 +1799,32 @@ declare type MacroItem = {
1600
1799
 
1601
1800
  declare type MakeRequired<T, K extends keyof T> = T & Required<Pick<T, K>>;
1602
1801
 
1802
+ declare interface Mat4 {
1803
+ m00: number;
1804
+ m01: number;
1805
+ m02: number;
1806
+ m03: number;
1807
+
1808
+ m04: number;
1809
+ m05: number;
1810
+ m06: number;
1811
+ m07: number;
1812
+
1813
+ m08: number;
1814
+ m09: number;
1815
+ m10: number;
1816
+ m11: number;
1817
+
1818
+ m12: number;
1819
+ m13: number;
1820
+ m14: number;
1821
+ m15: number;
1822
+ }
1823
+
1603
1824
  export declare namespace Mcp {
1604
1825
  export {
1605
- startServer,
1606
- stopServer,
1826
+ register,
1827
+ unregister,
1607
1828
  getStatus
1608
1829
  };
1609
1830
  }
@@ -1763,6 +1984,13 @@ declare function onAssetRemoved(listener: (info: IAssetInfo) => void): () => voi
1763
1984
  */
1764
1985
  declare function onDBReady(listener: (dbInfo: IAssetDBInfo) => void): () => void;
1765
1986
 
1987
+ /**
1988
+ * 注册 configurationManager 保存事件的监听器
1989
+ * 每次 cocos.config.json 被写入磁盘时触发
1990
+ * @returns 取消监听的函数
1991
+ */
1992
+ declare function onDidSave(callback: () => void): () => void;
1993
+
1766
1994
  /**
1767
1995
  * Register listener for initialization progress.
1768
1996
  *
@@ -2030,6 +2258,11 @@ declare interface ProjectInfo {
2030
2258
  */
2031
2259
  declare type ProjectType = '2d' | '3d';
2032
2260
 
2261
+ /**
2262
+ * Query all component names // 查询所有组件名称
2263
+ */
2264
+ declare function queryAllComponent(): Promise<string[]>;
2265
+
2033
2266
  /**
2034
2267
  * Query Asset Config Map // 查询资源配置映射表
2035
2268
  */
@@ -2088,6 +2321,11 @@ declare function queryAssetUserDataConfig(urlOrUuidOrPath: string): Promise<fals
2088
2321
  */
2089
2322
  declare function queryAssetUsers(uuidOrUrl: string, type?: QueryAssetType): Promise<string[]>;
2090
2323
 
2324
+ /**
2325
+ * Query component info // 查询组件信息
2326
+ */
2327
+ declare function queryComponent(uuid: string): Promise<IComponentForPinK | null>;
2328
+
2091
2329
  /**
2092
2330
  * Query Creatable Asset Map // 查询可创建资源映射表
2093
2331
  */
@@ -2118,6 +2356,36 @@ declare function queryUUID(urlOrPath: string): Promise<string | null>;
2118
2356
  */
2119
2357
  declare function refresh(dir: string): Promise<number>;
2120
2358
 
2359
+ /**
2360
+ * MCP Facade Module
2361
+ *
2362
+ * Called by the cocos-code utility process to register MCP middleware
2363
+ * in an already-initialized environment.
2364
+ * Prerequisite: the Server module must be started before calling this module.
2365
+ * This module only handles MCP-specific work: populating the toolRegistry
2366
+ * and registering MCP routes on the running server.
2367
+ */
2368
+ /**
2369
+ * Register MCP middleware on the running server.
2370
+ *
2371
+ * Note: the Express server must already be started via the Server module.
2372
+ * This function only:
2373
+ * 1. Imports API modules to populate the toolRegistry (@tool decorator side-effects)
2374
+ * 2. Creates McpMiddleware and registers routes on the server
2375
+ *
2376
+ * @returns MCP endpoint URL (e.g. http://localhost:9527/mcp)
2377
+ */
2378
+ declare function register(): Promise<string>;
2379
+
2380
+ /**
2381
+ * Register a middleware contribution (routes, static files, sockets)
2382
+ * on the running server.
2383
+ *
2384
+ * @param name Middleware identifier
2385
+ * @param module Middleware contribution config
2386
+ */
2387
+ declare function register_2(name: string, module: IMiddlewareContribution): Promise<void>;
2388
+
2121
2389
  /**
2122
2390
  * Reimport Asset // 重新导入资源
2123
2391
  */
@@ -2127,6 +2395,11 @@ declare function reload(): Promise<void>;
2127
2395
 
2128
2396
  declare function remove(key: string, scope?: ConfigurationScope): Promise<boolean>;
2129
2397
 
2398
+ /**
2399
+ * Remove component from node // 移除节点上的组件
2400
+ */
2401
+ declare function removeComponent(options: IRemoveComponentOptions): Promise<boolean>;
2402
+
2130
2403
  /**
2131
2404
  * Rename Asset // 重命名资源
2132
2405
  */
@@ -2138,6 +2411,8 @@ declare interface RenderTextureAssetUserData extends TextureBaseAssetUserData {
2138
2411
  height: number;
2139
2412
  }
2140
2413
 
2414
+ declare function resetComponent(uuid: string): Promise<void>;
2415
+
2141
2416
  /** 渲染纹理精灵帧的 userData */
2142
2417
  declare interface RtSpriteFrameAssetUserData {
2143
2418
  /** 图片 UUID 或数据库 URI */
@@ -2188,8 +2463,23 @@ declare interface SerializedAssetFinder {
2188
2463
  scenes?: Array<string | null>;
2189
2464
  }
2190
2465
 
2466
+ export declare namespace Server {
2467
+ export {
2468
+ start_2 as start,
2469
+ stop_2 as stop,
2470
+ getUrl,
2471
+ register_2 as register,
2472
+ getStatus_2 as getStatus
2473
+ };
2474
+ }
2475
+
2191
2476
  declare function set<T>(key: string, value: T, scope?: ConfigurationScope): Promise<boolean>;
2192
2477
 
2478
+ /**
2479
+ * Set component property // 设置组件属性
2480
+ */
2481
+ declare function setProperty(options: ISetPropertyOptionsForPink): Promise<boolean>;
2482
+
2193
2483
  declare interface SharedSettings {
2194
2484
  useDefineForClassFields: boolean;
2195
2485
  allowDeclareFields: boolean;
@@ -2282,37 +2572,26 @@ declare interface SpriteFrameVertices {
2282
2572
  declare function start(): Promise<void>;
2283
2573
 
2284
2574
  /**
2285
- * 在独立的子进程中运行项目脚本编译
2286
- * 以避免阻塞主进程
2287
- */
2288
- declare function startCompileScript(assetChanges?: AssetChangeInfo[]): Promise<void>;
2289
-
2290
- declare function startEngineCompilation(force?: boolean): Promise<void>;
2291
-
2292
- /**
2293
- * MCP Server Facade Module
2575
+ * Server Facade Module
2294
2576
  *
2295
- * Called by the cocos-code utility process to start the MCP server
2296
- * in an already-initialized environment.
2297
- * Prerequisite: core modules (project/engine/assets/scripting/builder)
2298
- * have been initialized via their respective lib modules.
2299
- * This module only handles MCP-specific work: populating the toolRegistry,
2300
- * starting Express, and registering MCP routes.
2577
+ * Provides a simplified interface for managing the Express HTTP server.
2578
+ * Wraps the core server service with startup guards and status tracking.
2301
2579
  */
2302
2580
  /**
2303
- * Start the MCP server.
2304
- *
2305
- * Note: does NOT call CocosAPI.startup() / Launcher because
2306
- * core modules are already initialized by the utility process.
2307
- * This function only:
2308
- * 1. Imports API modules to populate the toolRegistry (@tool decorator side-effects)
2309
- * 2. Starts the Express HTTP server
2310
- * 3. Creates McpMiddleware and registers routes
2581
+ * Initialize and start the Express HTTP server.
2311
2582
  *
2312
2583
  * @param port Optional port number; auto-selected if omitted
2313
- * @returns MCP server URL (e.g. http://localhost:9527/mcp)
2584
+ * @returns The server base URL (e.g. http://localhost:9527)
2585
+ */
2586
+ declare function start_2(port?: number): Promise<string>;
2587
+
2588
+ /**
2589
+ * 在独立的子进程中运行项目脚本编译
2590
+ * 以避免阻塞主进程
2314
2591
  */
2315
- declare function startServer(port?: number): Promise<string>;
2592
+ declare function startCompileScript(assetChanges?: AssetChangeInfo[]): Promise<void>;
2593
+
2594
+ declare function startEngineCompilation(force?: boolean): Promise<void>;
2316
2595
 
2317
2596
  /**
2318
2597
  * Start the scene worker process.
@@ -2322,9 +2601,9 @@ declare function startServer(port?: number): Promise<string>;
2322
2601
  declare function startupWorker(projectPath: string): Promise<void>;
2323
2602
 
2324
2603
  /**
2325
- * Stop the MCP server.
2604
+ * Stop the Express HTTP server.
2326
2605
  */
2327
- declare function stopServer(): Promise<void>;
2606
+ declare function stop_2(): Promise<void>;
2328
2607
 
2329
2608
  /** 支持创建的资源类型常量数组(用于 Zod enum 和 TypeScript type) */
2330
2609
  declare const SUPPORT_CREATE_TYPES: readonly ['animation-clip', 'typescript', 'auto-atlas', 'effect', 'scene', 'prefab', 'material', 'terrain', 'physics-material', 'label-atlas', 'render-texture', 'directory', 'effect-header'];
@@ -2388,6 +2667,12 @@ declare interface ThumbnailInfo {
2388
2667
  value: string; // 具体 icon 名字或者 image 路径,image 路径支持绝对路径、 db:// 、 project:// 、和 packages:// 下的路径
2389
2668
  }
2390
2669
 
2670
+ /**
2671
+ * Clean up MCP state.
2672
+ * Note: does NOT stop the Express server — use the Server module for that.
2673
+ */
2674
+ declare function unregister(): Promise<void>;
2675
+
2391
2676
  /**
2392
2677
  * Update Asset User Data // 更新资源用户数据
2393
2678
  */
@@ -2398,6 +2683,24 @@ declare function updateAssetUserData(urlOrUuidOrPath: string, path: string, valu
2398
2683
  */
2399
2684
  declare function updateDefaultUserData(handler: string, path: string, value: any): Promise<void>;
2400
2685
 
2686
+ declare interface Vec2 {
2687
+ x: number;
2688
+ y: number;
2689
+ }
2690
+
2691
+ declare interface Vec3 {
2692
+ x: number;
2693
+ y: number;
2694
+ z: number;
2695
+ }
2696
+
2697
+ declare interface Vec4 {
2698
+ x: number;
2699
+ y: number;
2700
+ z: number;
2701
+ w: number;
2702
+ }
2703
+
2401
2704
  declare type WrapMode = 'repeat' | 'clamp-to-edge' | 'mirrored-repeat';
2402
2705
 
2403
2706
  export { };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@cocos/cocos-cli-types",
3
3
  "description": "types for cocos cli",
4
4
  "author": "cocos cli",
5
- "version": "0.0.1-alpha.21.1",
5
+ "version": "0.0.1-alpha.22.1",
6
6
  "main": "index.d.ts",
7
7
  "types": "index.d.ts",
8
8
  "exports": {