@playcraft/common 0.0.27 → 0.0.30
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/agent-tools/types.d.ts +372 -1
- package/dist/agent-tools/types.d.ts.map +1 -1
- package/dist/agent-tools/types.js +32 -1
- package/dist/agent-tools/types.js.map +1 -1
- package/dist/recommend/api-types.d.ts +74 -0
- package/dist/recommend/api-types.d.ts.map +1 -1
- package/dist/recommend/atom-graph/basic-atom-graph.d.ts +3 -0
- package/dist/recommend/atom-graph/basic-atom-graph.d.ts.map +1 -0
- package/dist/recommend/atom-graph/basic-atom-graph.js +291 -0
- package/dist/recommend/atom-graph/basic-atom-graph.js.map +1 -0
- package/dist/recommend/atom-graph/basic-atom-skill-graph.d.ts +3 -0
- package/dist/recommend/atom-graph/basic-atom-skill-graph.d.ts.map +1 -0
- package/dist/recommend/atom-graph/basic-atom-skill-graph.js +130 -0
- package/dist/recommend/atom-graph/basic-atom-skill-graph.js.map +1 -0
- package/dist/recommend/atom-graph/index.d.ts +6 -0
- package/dist/recommend/atom-graph/index.d.ts.map +1 -0
- package/dist/recommend/atom-graph/index.js +6 -0
- package/dist/recommend/atom-graph/index.js.map +1 -0
- package/dist/recommend/atom-graph/remix-examples.d.ts +6 -0
- package/dist/recommend/atom-graph/remix-examples.d.ts.map +1 -0
- package/dist/recommend/atom-graph/remix-examples.js +192 -0
- package/dist/recommend/atom-graph/remix-examples.js.map +1 -0
- package/dist/recommend/atom-graph/types.d.ts +332 -0
- package/dist/recommend/atom-graph/types.d.ts.map +1 -0
- package/dist/recommend/atom-graph/types.js +2 -0
- package/dist/recommend/atom-graph/types.js.map +1 -0
- package/dist/recommend/atom-graph/validate.d.ts +7 -0
- package/dist/recommend/atom-graph/validate.d.ts.map +1 -0
- package/dist/recommend/atom-graph/validate.js +140 -0
- package/dist/recommend/atom-graph/validate.js.map +1 -0
- package/dist/recommend/index.d.ts +1 -0
- package/dist/recommend/index.d.ts.map +1 -1
- package/dist/recommend/index.js +1 -0
- package/dist/recommend/index.js.map +1 -1
- package/package.json +2 -1
- package/dist/auth/jwt.test.d.ts +0 -2
- package/dist/auth/jwt.test.d.ts.map +0 -1
- package/dist/auth/jwt.test.js +0 -13
- package/dist/auth/jwt.test.js.map +0 -1
- package/dist/auth/signature.spec.d.ts +0 -2
- package/dist/auth/signature.spec.d.ts.map +0 -1
- package/dist/auth/signature.spec.js +0 -195
- package/dist/auth/signature.spec.js.map +0 -1
- package/dist/messenger/server.test.d.ts +0 -2
- package/dist/messenger/server.test.d.ts.map +0 -1
- package/dist/messenger/server.test.js +0 -66
- package/dist/messenger/server.test.js.map +0 -1
- package/dist/models/converters.d.ts +0 -11
- package/dist/models/converters.d.ts.map +0 -1
- package/dist/models/converters.js +0 -25
- package/dist/models/converters.js.map +0 -1
- package/dist/models/converters.test.d.ts +0 -2
- package/dist/models/converters.test.d.ts.map +0 -1
- package/dist/models/converters.test.js +0 -18
- package/dist/models/converters.test.js.map +0 -1
- package/dist/models/scene.test.d.ts +0 -2
- package/dist/models/scene.test.d.ts.map +0 -1
- package/dist/models/scene.test.js +0 -12
- package/dist/models/scene.test.js.map +0 -1
- package/dist/sharedb/server.test.d.ts +0 -2
- package/dist/sharedb/server.test.d.ts.map +0 -1
- package/dist/sharedb/server.test.js +0 -59
- package/dist/sharedb/server.test.js.map +0 -1
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/** 与 `basicAtomGraph` 对齐的示意 Remix:每条为一条 plausible 生产闭包(引擎→玩法→素材/音频/配置→包装→校验)。 */
|
|
2
|
+
export const basicAtomRemixExamples = [
|
|
3
|
+
{
|
|
4
|
+
id: 'remix_fake_game_match3',
|
|
5
|
+
label: { zh: 'FakeGame 三消稿', en: 'FakeGame match-3 creative' },
|
|
6
|
+
primaryGameplayId: 'match3',
|
|
7
|
+
atomIds: [
|
|
8
|
+
'phaser',
|
|
9
|
+
'grid_puzzle_framework',
|
|
10
|
+
'match3',
|
|
11
|
+
'jewel_tile_set',
|
|
12
|
+
'background_image',
|
|
13
|
+
'ui_button_set',
|
|
14
|
+
'win_lose_panel',
|
|
15
|
+
'casual_bgm',
|
|
16
|
+
'match_sfx',
|
|
17
|
+
'win_sfx',
|
|
18
|
+
'board_size',
|
|
19
|
+
'move_limit',
|
|
20
|
+
'scoring_rule',
|
|
21
|
+
'camera_preset',
|
|
22
|
+
'fake_game_packaging',
|
|
23
|
+
'asset_reference_check',
|
|
24
|
+
'creative_size_check',
|
|
25
|
+
'semantic_consistency_check',
|
|
26
|
+
'build_smoke_test',
|
|
27
|
+
'playable_runtime_check',
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
id: 'remix_runner_collect_fake',
|
|
32
|
+
label: { zh: '跑酷收集 FakeGame', en: 'Runner collect FakeGame' },
|
|
33
|
+
primaryGameplayId: 'runner_collect',
|
|
34
|
+
atomIds: [
|
|
35
|
+
'phaser',
|
|
36
|
+
'casual_2d_framework',
|
|
37
|
+
'runner_collect',
|
|
38
|
+
'character_sprite',
|
|
39
|
+
'background_image',
|
|
40
|
+
'ui_button_set',
|
|
41
|
+
'win_lose_panel',
|
|
42
|
+
'casual_bgm',
|
|
43
|
+
'collision_sfx',
|
|
44
|
+
'win_sfx',
|
|
45
|
+
'level_timer',
|
|
46
|
+
'scoring_rule',
|
|
47
|
+
'camera_preset',
|
|
48
|
+
'fake_game_packaging',
|
|
49
|
+
'asset_reference_check',
|
|
50
|
+
'creative_size_check',
|
|
51
|
+
'semantic_consistency_check',
|
|
52
|
+
'build_smoke_test',
|
|
53
|
+
'playable_runtime_check',
|
|
54
|
+
],
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
id: 'remix_iq_sort_puzzle',
|
|
58
|
+
label: { zh: 'IQ 分类排序稿', en: 'IQ sort puzzle' },
|
|
59
|
+
primaryGameplayId: 'sort_puzzle',
|
|
60
|
+
atomIds: [
|
|
61
|
+
'phaser',
|
|
62
|
+
'grid_puzzle_framework',
|
|
63
|
+
'sort_puzzle',
|
|
64
|
+
'fruit_tile_set',
|
|
65
|
+
'background_image',
|
|
66
|
+
'ui_button_set',
|
|
67
|
+
'win_lose_panel',
|
|
68
|
+
'casual_bgm',
|
|
69
|
+
'match_sfx',
|
|
70
|
+
'win_sfx',
|
|
71
|
+
'board_size',
|
|
72
|
+
'move_limit',
|
|
73
|
+
'difficulty_curve',
|
|
74
|
+
'camera_preset',
|
|
75
|
+
'iq_test_packaging',
|
|
76
|
+
'asset_reference_check',
|
|
77
|
+
'creative_size_check',
|
|
78
|
+
'semantic_consistency_check',
|
|
79
|
+
'build_smoke_test',
|
|
80
|
+
'playable_runtime_check',
|
|
81
|
+
],
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
id: 'remix_iq_pin_puzzle',
|
|
85
|
+
label: { zh: 'IQ 拉针稿', en: 'IQ pin puzzle' },
|
|
86
|
+
primaryGameplayId: 'pin_puzzle',
|
|
87
|
+
atomIds: [
|
|
88
|
+
'phaser',
|
|
89
|
+
'casual_2d_framework',
|
|
90
|
+
'pin_puzzle',
|
|
91
|
+
'direction_arrow_sprite',
|
|
92
|
+
'background_image',
|
|
93
|
+
'ui_button_set',
|
|
94
|
+
'win_lose_panel',
|
|
95
|
+
'tension_bgm',
|
|
96
|
+
'collision_sfx',
|
|
97
|
+
'win_sfx',
|
|
98
|
+
'difficulty_curve',
|
|
99
|
+
'level_timer',
|
|
100
|
+
'camera_preset',
|
|
101
|
+
'iq_test_packaging',
|
|
102
|
+
'asset_reference_check',
|
|
103
|
+
'creative_size_check',
|
|
104
|
+
'semantic_consistency_check',
|
|
105
|
+
'build_smoke_test',
|
|
106
|
+
'playable_runtime_check',
|
|
107
|
+
],
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
id: 'remix_doctor_word_puzzle',
|
|
111
|
+
label: { zh: '医生建议 文字解谜', en: 'Doctor advice word puzzle' },
|
|
112
|
+
primaryGameplayId: 'word_puzzle',
|
|
113
|
+
atomIds: [
|
|
114
|
+
'phaser',
|
|
115
|
+
'grid_puzzle_framework',
|
|
116
|
+
'word_puzzle',
|
|
117
|
+
'ui_button_set',
|
|
118
|
+
'background_image',
|
|
119
|
+
'win_lose_panel',
|
|
120
|
+
'casual_bgm',
|
|
121
|
+
'win_sfx',
|
|
122
|
+
'move_limit',
|
|
123
|
+
'board_size',
|
|
124
|
+
'scoring_rule',
|
|
125
|
+
'camera_preset',
|
|
126
|
+
'doctor_advice_packaging',
|
|
127
|
+
'asset_reference_check',
|
|
128
|
+
'creative_size_check',
|
|
129
|
+
'semantic_consistency_check',
|
|
130
|
+
'build_smoke_test',
|
|
131
|
+
'playable_runtime_check',
|
|
132
|
+
],
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
id: 'remix_showcase_eight_ball',
|
|
136
|
+
label: { zh: '玩法展示 台球', en: 'Gameplay showcase 8-ball' },
|
|
137
|
+
primaryGameplayId: 'eight_ball',
|
|
138
|
+
atomIds: [
|
|
139
|
+
'phaser',
|
|
140
|
+
'physics_ball_framework',
|
|
141
|
+
'eight_ball',
|
|
142
|
+
'billiard_ball_set',
|
|
143
|
+
'pool_table_skin',
|
|
144
|
+
'background_image',
|
|
145
|
+
'ui_button_set',
|
|
146
|
+
'win_lose_panel',
|
|
147
|
+
'casual_bgm',
|
|
148
|
+
'collision_sfx',
|
|
149
|
+
'win_sfx',
|
|
150
|
+
'scoring_rule',
|
|
151
|
+
'camera_preset',
|
|
152
|
+
'gameplay_showcase_packaging',
|
|
153
|
+
'asset_reference_check',
|
|
154
|
+
'creative_size_check',
|
|
155
|
+
'semantic_consistency_check',
|
|
156
|
+
'build_smoke_test',
|
|
157
|
+
'playable_runtime_check',
|
|
158
|
+
],
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
id: 'remix_showcase_tetris',
|
|
162
|
+
label: { zh: '玩法展示 方块', en: 'Gameplay showcase Tetris-like' },
|
|
163
|
+
primaryGameplayId: 'tetris',
|
|
164
|
+
atomIds: [
|
|
165
|
+
'phaser',
|
|
166
|
+
'grid_puzzle_framework',
|
|
167
|
+
'tetris',
|
|
168
|
+
'block_skin_set',
|
|
169
|
+
'background_image',
|
|
170
|
+
'ui_button_set',
|
|
171
|
+
'win_lose_panel',
|
|
172
|
+
'tension_bgm',
|
|
173
|
+
'collision_sfx',
|
|
174
|
+
'win_sfx',
|
|
175
|
+
'gravity_mode',
|
|
176
|
+
'difficulty_curve',
|
|
177
|
+
'camera_preset',
|
|
178
|
+
'gameplay_showcase_packaging',
|
|
179
|
+
'asset_reference_check',
|
|
180
|
+
'creative_size_check',
|
|
181
|
+
'semantic_consistency_check',
|
|
182
|
+
'build_smoke_test',
|
|
183
|
+
'playable_runtime_check',
|
|
184
|
+
],
|
|
185
|
+
},
|
|
186
|
+
];
|
|
187
|
+
/** 返回 `atomIds` 中在图中不存在的 id(用于测试或导入校验)。 */
|
|
188
|
+
export function collectUnknownRemixAtomIds(graph, example) {
|
|
189
|
+
const ids = new Set(graph.nodes.map((n) => n.id));
|
|
190
|
+
return example.atomIds.filter((id) => !ids.has(id));
|
|
191
|
+
}
|
|
192
|
+
//# sourceMappingURL=remix-examples.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remix-examples.js","sourceRoot":"","sources":["../../../src/recommend/atom-graph/remix-examples.ts"],"names":[],"mappings":"AAEA,iFAAiF;AACjF,MAAM,CAAC,MAAM,sBAAsB,GAAgC;IACjE;QACE,EAAE,EAAE,wBAAwB;QAC5B,KAAK,EAAE,EAAE,EAAE,EAAE,cAAc,EAAE,EAAE,EAAE,2BAA2B,EAAE;QAC9D,iBAAiB,EAAE,QAAQ;QAC3B,OAAO,EAAE;YACP,QAAQ;YACR,uBAAuB;YACvB,QAAQ;YACR,gBAAgB;YAChB,kBAAkB;YAClB,eAAe;YACf,gBAAgB;YAChB,YAAY;YACZ,WAAW;YACX,SAAS;YACT,YAAY;YACZ,YAAY;YACZ,cAAc;YACd,eAAe;YACf,qBAA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A6B;YAC7B,uBAAuB;YACvB,qBAAqB;YACrB,4BAA4B;YAC5B,kBAAkB;YAClB,wBAAwB;SACzB;KACF;CACF,CAAC;AAEF,2CAA2C;AAC3C,MAAM,UAAU,0BAA0B,CAAC,KAAgB,EAAE,OAAyB;IACpF,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAClD,OAAO,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
export type AtomCategory = 'engine' | 'gameplay' | 'visual' | 'audio' | 'config' | 'packaging' | 'validator' | 'layout' | 'scene' | 'state' | 'component' | 'build' | 'util';
|
|
2
|
+
export type AtomMode = 'fixed' | 'parametric' | 'generative';
|
|
3
|
+
export type AtomEdgeKind = 'requires' | 'compatibleWith' | 'semanticallyRelatedTo' | 'alternativeTo';
|
|
4
|
+
export type AtomBindingRole = 'gameEngine' | 'playableSdk' | 'buildPipeline' | 'responsiveLayout' | 'gridBoardLayout' | 'sceneLifecycle' | 'preloaderScene' | 'gameMainScene' | 'userSettings' | 'themeManager' | 'levelProgress' | 'runContext' | 'gameplayRule' | 'levelDataFormat' | 'pathBatchRenderer' | 'pathAnimationDirector' | 'boardInputHandler' | 'levelLifecycleController' | 'directionalIndicator' | 'boardBackgroundTexture' | 'successFeedbackPanel' | 'failFeedbackPanel' | 'dangerFlashOverlay' | 'appLogo' | 'tutorialPointer' | 'clockIcon' | 'winParticleAsset' | 'normalParticleAsset' | 'bgMusic' | 'sfxClick' | 'sfxAppear' | 'sfxSuccess' | 'sfxFail' | 'sfxLose' | 'sfxMistake' | 'sfxWinAnim' | 'sfxArrowMoveError' | 'sfxButtonClick' | 'loadingScreen' | 'topUiBar' | 'countdownTimer' | 'livesIndicator' | 'comboDisplay' | 'comboPraiseText' | 'progressBar' | 'downloadCta' | 'gameOverDialog' | 'tutorialOverlay' | 'digitGlyphRenderer' | 'audioPlayHelper' | 'levelDataPack' | 'themeVariantConfig' | 'appMetadata' | 'boardEntitySprite' | 'particleAsset' | 'slideOutToTrayAnimation' | 'matchEngine' | 'trayContainer' | 'entityRenderer' | 'cameraController' | 'bottomUiBar' | 'assetPipeline' | 'levelValidator' | 'dataValidator' | 'debugTool' | 'testFramework' | 'typeDeclaration' | 'buildSystem' | 'playableGuidanceLayout' | 'playableHudLayout' | 'playableEndScreenLayout' | 'engineRuntime' | 'frameworkRuntime' | 'backgroundTexture' | 'tileTextureSet' | 'vehicleSpriteSet' | 'billiardBallSet' | 'poolTableSkin' | 'blockSkinSet' | 'bubbleSkinSet' | 'characterSprite' | 'uiButtonSet' | 'resultPanel' | 'backgroundMusic' | 'soundEffect' | 'gameConfig' | 'packagingPattern' | 'validationGate';
|
|
5
|
+
export type AtomNode = {
|
|
6
|
+
id: string;
|
|
7
|
+
category: AtomCategory;
|
|
8
|
+
mode: AtomMode;
|
|
9
|
+
label: {
|
|
10
|
+
zh: string;
|
|
11
|
+
en: string;
|
|
12
|
+
};
|
|
13
|
+
description?: string;
|
|
14
|
+
bindingRoles?: AtomBindingRole[];
|
|
15
|
+
tags?: string[];
|
|
16
|
+
skillRefs?: string[];
|
|
17
|
+
};
|
|
18
|
+
export type AtomEdge = {
|
|
19
|
+
from: string;
|
|
20
|
+
to: string;
|
|
21
|
+
kind: AtomEdgeKind;
|
|
22
|
+
label?: string;
|
|
23
|
+
weight?: number;
|
|
24
|
+
};
|
|
25
|
+
export type AtomGraph = {
|
|
26
|
+
id: string;
|
|
27
|
+
version: number;
|
|
28
|
+
status: 'prototype' | 'active' | 'deprecated';
|
|
29
|
+
description: string;
|
|
30
|
+
nodes: AtomNode[];
|
|
31
|
+
edges: AtomEdge[];
|
|
32
|
+
};
|
|
33
|
+
/** 示意性 Remix(试玩实例)原子闭包:用于可视化高亮或交付清单,非线上投放事实源。 */
|
|
34
|
+
export type AtomRemixExample = {
|
|
35
|
+
id: string;
|
|
36
|
+
label: {
|
|
37
|
+
zh: string;
|
|
38
|
+
en: string;
|
|
39
|
+
};
|
|
40
|
+
/** 该实例主玩法 atom id(便于说明与排序) */
|
|
41
|
+
primaryGameplayId: string;
|
|
42
|
+
/** 属于该 Remix 的全部 Atom id */
|
|
43
|
+
atomIds: readonly string[];
|
|
44
|
+
};
|
|
45
|
+
export type AtomGraphValidationErrorCode = 'duplicate_node_id' | 'edge_missing_source' | 'edge_missing_target' | 'cycle_detected';
|
|
46
|
+
export type AtomGraphValidationError = {
|
|
47
|
+
code: AtomGraphValidationErrorCode;
|
|
48
|
+
message: string;
|
|
49
|
+
nodeId?: string;
|
|
50
|
+
edge?: AtomEdge;
|
|
51
|
+
};
|
|
52
|
+
export type AtomGraphValidationWarningCode = 'gameplay_without_engine_path' | 'isolated_node' | 'invalid_edge_weight';
|
|
53
|
+
export type AtomGraphValidationWarning = {
|
|
54
|
+
code: AtomGraphValidationWarningCode;
|
|
55
|
+
message: string;
|
|
56
|
+
nodeId?: string;
|
|
57
|
+
edge?: AtomEdge;
|
|
58
|
+
};
|
|
59
|
+
export type AtomGraphValidationResult = {
|
|
60
|
+
valid: boolean;
|
|
61
|
+
errors: AtomGraphValidationError[];
|
|
62
|
+
warnings: AtomGraphValidationWarning[];
|
|
63
|
+
topologicalOrder: string[];
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* 封包后缀类型,对应 asset-library 的 BUNDLE_SUFFIXES
|
|
67
|
+
*
|
|
68
|
+
* - aiimage / aiaudio / aiconfig / aigameplay:资源/配置/玩法,同原有用法
|
|
69
|
+
* - aicomponent:通用代码 skill(引擎/布局/场景/UI/状态/构建/工具等)
|
|
70
|
+
* - aivalidator:校验/测试/质量门禁 skill(测试脚本 + 校验报告)
|
|
71
|
+
* - prefab:已废除,不要再使用,现有 prefab skill 已拆解为多个具体 skill
|
|
72
|
+
*/
|
|
73
|
+
export type AtomBundleType = 'aiimage' | 'aiaudio' | 'aiconfig' | 'aigameplay' | 'aicomponent' | 'aivalidator';
|
|
74
|
+
/**
|
|
75
|
+
* Recipe:怎么来的——生成过程的完整记录,支持复用和 fork。
|
|
76
|
+
* Agent 读取历史决策,修改后重新生成时写回。
|
|
77
|
+
*/
|
|
78
|
+
export type AtomRecipe = {
|
|
79
|
+
/** 生成类型(image / sfx / bgm / sprite-sheet / config-patch / level-data / theme-config / scaffold / pgs / ...) */
|
|
80
|
+
kind: string;
|
|
81
|
+
/**
|
|
82
|
+
* 关联的 Platform Skill 名称(在 packages/skills/platform-skills/ 下)。
|
|
83
|
+
* Agent 应读取该 skill 了解 CLI 用法,再结合本 manifest 的其他字段生成内容。
|
|
84
|
+
* - aiimage: "playcraft-image-generation"
|
|
85
|
+
* - aiaudio (bgm): "playcraft-audio-generation"
|
|
86
|
+
* - aiaudio (sfx): "playcraft-audio-generation"(同一 skill,命令不同)
|
|
87
|
+
*/
|
|
88
|
+
platformSkill?: string;
|
|
89
|
+
/** 生成 prompt(generative 模式必填) */
|
|
90
|
+
prompt?: string;
|
|
91
|
+
/**
|
|
92
|
+
* AI 模型标识(使用 Platform Skill 中的 modelRef 格式,如 google/imagen-3.0-generate-002)
|
|
93
|
+
* 留空则使用平台默认配置
|
|
94
|
+
*/
|
|
95
|
+
model?: string;
|
|
96
|
+
/** 参考图片路径(相对于 skill 目录,用于图生图) */
|
|
97
|
+
referenceImage?: string;
|
|
98
|
+
/** 参考音频路径(相对于 skill 目录,用于音频生成参考) */
|
|
99
|
+
referenceAudio?: string;
|
|
100
|
+
/** 随机种子,用于可复现生成 */
|
|
101
|
+
seed?: number;
|
|
102
|
+
/** 宽高比(图像封包),如 "1:1" | "9:16" | "16:9" */
|
|
103
|
+
aspectRatio?: string;
|
|
104
|
+
/** 风格约束(图像封包) */
|
|
105
|
+
style?: string;
|
|
106
|
+
/** 时长秒数(音频封包) */
|
|
107
|
+
duration?: number;
|
|
108
|
+
/** 是否循环(音频封包) */
|
|
109
|
+
loop?: boolean;
|
|
110
|
+
/** BGM 风格(bgm 类型) */
|
|
111
|
+
bgmStyle?: string;
|
|
112
|
+
/** BGM 节奏(bpm) */
|
|
113
|
+
bpm?: number;
|
|
114
|
+
/** parametric/fixed 模式的参数键值对 */
|
|
115
|
+
params?: Record<string, string | number | boolean>;
|
|
116
|
+
/** 其他扩展字段 */
|
|
117
|
+
[key: string]: unknown;
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* Result:是什么——生成产物的规格与引用。
|
|
121
|
+
* Agent 可直接引用,不必重新生成。
|
|
122
|
+
*/
|
|
123
|
+
export type AtomResult = {
|
|
124
|
+
/** 产物主文件名(相对于封包目录) */
|
|
125
|
+
outputFile?: string;
|
|
126
|
+
/** 文件格式 */
|
|
127
|
+
format?: string;
|
|
128
|
+
/** 尺寸与格式约束 */
|
|
129
|
+
constraints?: Record<string, number | string>;
|
|
130
|
+
/** 参数化配置的键路径(config 封包) */
|
|
131
|
+
configKey?: string;
|
|
132
|
+
/** 参数化配置的值 */
|
|
133
|
+
configValue?: string | number | boolean;
|
|
134
|
+
/** 其他扩展字段 */
|
|
135
|
+
[key: string]: unknown;
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* Binding:怎么用——接入 Prefab/DAG 的契约。
|
|
139
|
+
* Binding 由容器(Prefab)定义,不由 Atom 自身定义。
|
|
140
|
+
* Recipe + Result 可跨容器复用,Binding 需在新容器下重新生成。
|
|
141
|
+
*/
|
|
142
|
+
export type AtomBinding = {
|
|
143
|
+
/** binding role,对应 AtomBindingRole */
|
|
144
|
+
role: AtomBindingRole;
|
|
145
|
+
/** 目标挂载路径(scene:// URI 或文件路径) */
|
|
146
|
+
target: string;
|
|
147
|
+
/** 引用类型 */
|
|
148
|
+
type: string;
|
|
149
|
+
/** 约束条件(格式、尺寸等) */
|
|
150
|
+
constraints?: Record<string, number | string>;
|
|
151
|
+
/** 其他扩展字段 */
|
|
152
|
+
[key: string]: unknown;
|
|
153
|
+
};
|
|
154
|
+
/** Atom 实例在生产流水线中的状态 */
|
|
155
|
+
export type AtomInstanceStatus = 'planned' | 'generating' | 'generated' | 'bound' | 'validated' | 'failed';
|
|
156
|
+
/**
|
|
157
|
+
* AtomInstance:某次 Remix 生产中的具体 Atom。
|
|
158
|
+
* 对应一个已实例化(或待实例化)的封包。
|
|
159
|
+
*/
|
|
160
|
+
export type AtomInstance = {
|
|
161
|
+
/** 实例唯一 id */
|
|
162
|
+
instanceId: string;
|
|
163
|
+
/** 对应图节点 id(= skill 名称,例如 forest.aiimage) */
|
|
164
|
+
atomId: string;
|
|
165
|
+
/** 所属 Remix id */
|
|
166
|
+
remixId?: string;
|
|
167
|
+
/** 三要素:生成方式 */
|
|
168
|
+
recipe?: AtomRecipe;
|
|
169
|
+
/** 三要素:产物规格 */
|
|
170
|
+
result?: AtomResult;
|
|
171
|
+
/** 三要素:接入契约 */
|
|
172
|
+
binding?: AtomBinding;
|
|
173
|
+
/** 实例状态 */
|
|
174
|
+
status: AtomInstanceStatus;
|
|
175
|
+
};
|
|
176
|
+
/**
|
|
177
|
+
* Scaffold 文件贡献:描述一个 skill 向 Remix 项目贡献的某个文件的来源与合并策略。
|
|
178
|
+
* 文件路径 key 为相对 Remix 项目根目录的目标路径。
|
|
179
|
+
*/
|
|
180
|
+
export type ScaffoldContribution = {
|
|
181
|
+
/** scaffold 来源:Atom ref/ 目录内的相对路径,例如 "ref/PathRenderer.ts" */
|
|
182
|
+
source: string;
|
|
183
|
+
/**
|
|
184
|
+
* 贡献权重:组装时同一目标文件有多个贡献者时,按权重降序,最高者胜出。
|
|
185
|
+
* 默认 0。
|
|
186
|
+
*/
|
|
187
|
+
weight?: number;
|
|
188
|
+
/**
|
|
189
|
+
* 贡献模式(默认 "full"):
|
|
190
|
+
* - full:完整提供该文件
|
|
191
|
+
* - merge-json:JSON 文件按 deep-merge 合并(package.json / tsconfig.json 等)
|
|
192
|
+
* - anchor-insert:在已有文件的指定 anchor 注入代码片段
|
|
193
|
+
* - patch:提供 unified diff,应用到上一版本
|
|
194
|
+
*/
|
|
195
|
+
mode?: 'full' | 'merge-json' | 'anchor-insert' | 'patch';
|
|
196
|
+
/** anchor-insert 模式时使用,如 "// @atom-insert: imports" */
|
|
197
|
+
anchor?: string;
|
|
198
|
+
};
|
|
199
|
+
/**
|
|
200
|
+
* Import 声明:此 skill 需要什么。
|
|
201
|
+
*
|
|
202
|
+
* 双形态:
|
|
203
|
+
* - 硬依赖(pinAtomId):目标 skill 已知,无候选,组装时直接引入
|
|
204
|
+
* - 软槽位(matchBindingRoles + constraints):目标从图谱候选实例中按权重选出
|
|
205
|
+
*
|
|
206
|
+
* 注意:具体如何根据声明选实例是图谱组装机制的职责(后续讨论)。
|
|
207
|
+
* manifest 中只需写清楚"要什么"即可。
|
|
208
|
+
*/
|
|
209
|
+
export type ImportDeclaration = {
|
|
210
|
+
/** 槽位名,在本 skill manifest 中唯一标识此 import */
|
|
211
|
+
slot: string;
|
|
212
|
+
/** 自然语言描述(给 LLM 和人理解用) */
|
|
213
|
+
description?: string;
|
|
214
|
+
/** scaffold 中引用此槽位选中实例的占位符标识 */
|
|
215
|
+
bindAs: string;
|
|
216
|
+
/** 是否必需,默认 true */
|
|
217
|
+
required?: boolean;
|
|
218
|
+
/** 边类型(默认:硬依赖用 requires,软槽位用 compatibleWith) */
|
|
219
|
+
edgeKind?: AtomEdgeKind;
|
|
220
|
+
/** 锁定具体 atomId(已知唯一目标)。与软槽位字段互斥。 */
|
|
221
|
+
pinAtomId?: string;
|
|
222
|
+
/** 候选筛选:实例必须有这些 bindingRoles 之一 */
|
|
223
|
+
matchBindingRoles?: AtomBindingRole[];
|
|
224
|
+
/** 候选筛选:实例的 category 限定 */
|
|
225
|
+
allowedCategories?: AtomCategory[];
|
|
226
|
+
/** 候选筛选:实例的 bundleType 限定 */
|
|
227
|
+
allowedBundleTypes?: AtomBundleType[];
|
|
228
|
+
/** 规格约束:用于过滤不合规候选 + LLM 验证(如 { directions: 4, minSize: {...} }) */
|
|
229
|
+
constraints?: Record<string, unknown>;
|
|
230
|
+
/** 选几个候选(默认 1) */
|
|
231
|
+
cardinality?: number | 'many';
|
|
232
|
+
};
|
|
233
|
+
/**
|
|
234
|
+
* AtomSkillManifest:packages/skills/skills/<atomId>/manifest.json 的 TypeScript 映射。
|
|
235
|
+
* 每个 Skill 目录下的 manifest 必须满足此类型。
|
|
236
|
+
*
|
|
237
|
+
* 字段分两类:
|
|
238
|
+
* - 身份信息(必填):schemaVersion / atomId / bundleType / category / mode / label / tags / files
|
|
239
|
+
* - 内容描述(按 bundleType 选填):
|
|
240
|
+
* - aiimage / aiaudio / aiconfig / aigameplay 用 generation + result + binding(旧三要素)
|
|
241
|
+
* - aicomponent / aivalidator 用 scaffold + imports + exports(新机制)
|
|
242
|
+
* - aivalidator 额外可附 validation 字段(校验目标与产出格式)
|
|
243
|
+
* - 任意类型均可附 neutralDescriptor + usageHints + bindingRoles
|
|
244
|
+
*/
|
|
245
|
+
export type AtomSkillManifest = {
|
|
246
|
+
schemaVersion: 1;
|
|
247
|
+
/** 等于目录名,等于图节点 id,例如 forest.aiimage */
|
|
248
|
+
atomId: string;
|
|
249
|
+
/** 封包后缀类型 */
|
|
250
|
+
bundleType: AtomBundleType;
|
|
251
|
+
/** Atom 分类 */
|
|
252
|
+
category: AtomCategory;
|
|
253
|
+
/** 操作模式 */
|
|
254
|
+
mode: AtomMode;
|
|
255
|
+
/** 双语标签 */
|
|
256
|
+
label: {
|
|
257
|
+
zh: string;
|
|
258
|
+
en: string;
|
|
259
|
+
};
|
|
260
|
+
/** 索引和过滤标签(至少 1 个) */
|
|
261
|
+
tags: string[];
|
|
262
|
+
/** 语义角色标签:标识该 skill 是哪一类节点,用于候选召回和同类替代簇识别 */
|
|
263
|
+
bindingRoles?: AtomBindingRole[];
|
|
264
|
+
/** Recipe(生成方式模板)——aiimage / aiaudio / aiconfig / aigameplay 使用 */
|
|
265
|
+
generation?: AtomRecipe;
|
|
266
|
+
/** Result(产物规格模板)——aiimage / aiaudio / aiconfig / aigameplay 使用 */
|
|
267
|
+
result?: AtomResult;
|
|
268
|
+
/** Binding(接入契约模板)——aiimage / aiaudio / aiconfig / aigameplay 使用 */
|
|
269
|
+
binding?: AtomBinding;
|
|
270
|
+
/**
|
|
271
|
+
* Scaffold:该 skill 向 Remix 项目贡献的文件骨架。
|
|
272
|
+
* key 为相对 Remix 项目根目录的目标路径,value 为贡献描述。
|
|
273
|
+
*/
|
|
274
|
+
scaffold?: {
|
|
275
|
+
files: Record<string, ScaffoldContribution>;
|
|
276
|
+
/** 合并到 package.json 的依赖与脚本 */
|
|
277
|
+
packageJson?: {
|
|
278
|
+
dependencies?: Record<string, {
|
|
279
|
+
version: string;
|
|
280
|
+
weight?: number;
|
|
281
|
+
}>;
|
|
282
|
+
devDependencies?: Record<string, {
|
|
283
|
+
version: string;
|
|
284
|
+
weight?: number;
|
|
285
|
+
}>;
|
|
286
|
+
scripts?: Record<string, {
|
|
287
|
+
command: string;
|
|
288
|
+
weight?: number;
|
|
289
|
+
}>;
|
|
290
|
+
};
|
|
291
|
+
};
|
|
292
|
+
/**
|
|
293
|
+
* Imports:声明该 skill 需要什么(双形态)。
|
|
294
|
+
* 具体候选实例如何选取由图谱组装机制决定(后续落地)。
|
|
295
|
+
*/
|
|
296
|
+
imports?: ImportDeclaration[];
|
|
297
|
+
/** Exports:暴露给其他 skill 使用的符号 */
|
|
298
|
+
exports?: Array<{
|
|
299
|
+
/** 导出标识(其他 skill 通过 imports.bindAs 引用) */
|
|
300
|
+
name: string;
|
|
301
|
+
/** 符号类型:class / function / asset-key / route / scene-name 等 */
|
|
302
|
+
kind: string;
|
|
303
|
+
/** 在 scaffold 中的位置(用于编译期解析) */
|
|
304
|
+
location: string;
|
|
305
|
+
}>;
|
|
306
|
+
/**
|
|
307
|
+
* 中性描述:避免情境名词锁死 LLM 关联范围,提供纯几何/功能性描述。
|
|
308
|
+
* 见 agent-decision-mechanism.md §3。
|
|
309
|
+
*/
|
|
310
|
+
neutralDescriptor?: {
|
|
311
|
+
geometry?: string;
|
|
312
|
+
layers?: string[];
|
|
313
|
+
replaceable?: string[];
|
|
314
|
+
material?: string;
|
|
315
|
+
[key: string]: unknown;
|
|
316
|
+
};
|
|
317
|
+
/** 使用提示(给人看,不进入 LLM 提示词) */
|
|
318
|
+
usageHints?: string[];
|
|
319
|
+
/** 校验描述——仅 aivalidator 使用 */
|
|
320
|
+
validation?: {
|
|
321
|
+
/** 校验目标领域 */
|
|
322
|
+
target: 'gameplay' | 'levelData' | 'assets' | 'compliance' | 'ux' | 'performance';
|
|
323
|
+
/** 产出格式 */
|
|
324
|
+
outputFormat: 'report' | 'pass-fail' | 'test-suite';
|
|
325
|
+
};
|
|
326
|
+
/** 关联文件 */
|
|
327
|
+
files: {
|
|
328
|
+
skill: 'SKILL.md';
|
|
329
|
+
[key: string]: string;
|
|
330
|
+
};
|
|
331
|
+
};
|
|
332
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/recommend/atom-graph/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GACpB,QAAQ,GACR,UAAU,GACV,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,WAAW,GACX,WAAW,GAEX,QAAQ,GACR,OAAO,GACP,OAAO,GACP,WAAW,GACX,OAAO,GACP,MAAM,CAAC;AAGX,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,YAAY,GAAG,YAAY,CAAC;AAE7D,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,gBAAgB,GAAG,uBAAuB,GAAG,eAAe,CAAC;AAErG,MAAM,MAAM,eAAe,GAEvB,YAAY,GACZ,aAAa,GACb,eAAe,GAEf,kBAAkB,GAClB,iBAAiB,GAEjB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IAE9B,gCAAgC;IAChC,OAAO,CAAC,EAAE,KAAK,CAAC;QACd,0CAA0C;QAC1C,IAAI,EAAE,MAAM,CAAC;QACb,+DAA+D;QAC/D,IAAI,EAAE,MAAM,CAAC;QACb,+BAA+B;QAC/B,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC,CAAC;IAEH;;;OAGG;IACH,iBAAiB,CAAC,EAAE;QAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;QAClB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;QACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;IAEF,4BAA4B;IAC5B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IAItB,6BAA6B;IAC7B,UAAU,CAAC,EAAE;QACX,aAAa;QACb,MAAM,EAAE,UAAU,GAAG,WAAW,GAAG,QAAQ,GAAG,YAAY,GAAG,IAAI,GAAG,aAAa,CAAC;QAClF,WAAW;QACX,YAAY,EAAE,QAAQ,GAAG,WAAW,GAAG,YAAY,CAAC;KACrD,CAAC;IAEF,WAAW;IACX,KAAK,EAAE;QACL,KAAK,EAAE,UAAU,CAAC;QAClB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;KACvB,CAAC;CACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/recommend/atom-graph/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AtomEdge, AtomEdgeKind, AtomGraph, AtomGraphValidationResult, AtomNode } from './types.js';
|
|
2
|
+
export declare function getAtomNode(graph: AtomGraph, nodeId: string): AtomNode | undefined;
|
|
3
|
+
export declare function getAtomEdges(graph: AtomGraph, edgeKinds?: AtomEdgeKind[]): AtomEdge[];
|
|
4
|
+
export declare function findAtomAncestors(graph: AtomGraph, nodeId: string, edgeKinds?: AtomEdgeKind[]): string[];
|
|
5
|
+
export declare function topologicalSortAtomGraph(graph: AtomGraph, edgeKinds?: AtomEdgeKind[]): string[];
|
|
6
|
+
export declare function validateAtomGraph(graph: AtomGraph): AtomGraphValidationResult;
|
|
7
|
+
//# sourceMappingURL=validate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../src/recommend/atom-graph/validate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,YAAY,EACZ,SAAS,EAET,yBAAyB,EAEzB,QAAQ,EACT,MAAM,YAAY,CAAC;AAIpB,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAElF;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,EAAE,SAAS,CAAC,EAAE,YAAY,EAAE,GAAG,QAAQ,EAAE,CAIrF;AAED,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,SAAS,EAChB,MAAM,EAAE,MAAM,EACd,SAAS,GAAE,YAAY,EAAgC,GACtD,MAAM,EAAE,CAoBV;AAED,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,SAAS,EAChB,SAAS,GAAE,YAAY,EAAgC,GACtD,MAAM,EAAE,CAoCV;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,SAAS,GAAG,yBAAyB,CA4F7E"}
|