@craft_eco/craft-mcp 0.1.34 → 0.1.35-beta.2

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.
Files changed (113) hide show
  1. package/README.md +2 -2
  2. package/bin/craft-mcp.mjs +11 -2
  3. package/dist-server/core/http-utils.mjs +11 -0
  4. package/dist-server/game-workflow/asset-formats.mjs +1 -1
  5. package/dist-server/game-workflow/bundle-files.mjs +19 -0
  6. package/dist-server/game-workflow/bundle-template.mjs +5 -0
  7. package/dist-server/game-workflow/context-state.mjs +1 -1
  8. package/dist-server/game-workflow/draft-archive.mjs +61 -0
  9. package/dist-server/game-workflow/draft-binding-migration.mjs +73 -0
  10. package/dist-server/game-workflow/draft-uploads.mjs +258 -75
  11. package/dist-server/game-workflow/native-context.mjs +4 -1
  12. package/dist-server/game-workflow/project-bundles.mjs +17 -6
  13. package/dist-server/game-workflow/projects.mjs +4 -0
  14. package/dist-server/game-workflow/template-refresh.mjs +430 -0
  15. package/dist-server/integrations/distribution-targets.mjs +2 -0
  16. package/dist-server/integrations/files.mjs +30 -2
  17. package/dist-server/integrations/fixed-launcher.mjs +4 -4
  18. package/dist-server/integrations/install.mjs +5 -5
  19. package/dist-server/integrations/installation-state.mjs +6 -7
  20. package/dist-server/integrations/launcher-start.mjs +12 -8
  21. package/dist-server/integrations/opencode-config.mjs +1 -1
  22. package/dist-server/integrations/project-setup.mjs +0 -1
  23. package/dist-server/integrations/runtime-candidate.mjs +8 -12
  24. package/dist-server/integrations/runtime-gc.mjs +20 -21
  25. package/dist-server/integrations/runtime.mjs +7 -3
  26. package/dist-server/integrations/updates.mjs +64 -27
  27. package/dist-server/launcher.mjs +39 -14
  28. package/dist-server/mcp/login-page.mjs +2 -2
  29. package/dist-server/mcp/server.mjs +10 -12
  30. package/dist-server/mcp/update-session.mjs +3 -3
  31. package/dist-server/upstream/{craft-aigc.mjs → craft-platform.mjs} +40 -115
  32. package/dist-server/upstream/draft-audit.mjs +51 -0
  33. package/dist-server/upstream/draft-transport.mjs +184 -0
  34. package/package.json +3 -3
  35. package/resources/craft-update/SKILL.md +2 -0
  36. package/resources/targets/claude/js/js/bundle.json +15 -9
  37. package/resources/targets/claude/js/target.json +8 -6
  38. package/resources/targets/claude/js3d/js3d/bundle.json +21 -10
  39. package/resources/targets/claude/js3d/target.json +14 -7
  40. package/resources/targets/codebuddy/js/js/bundle.json +15 -9
  41. package/resources/targets/codebuddy/js/target.json +8 -6
  42. package/resources/targets/codebuddy/js3d/js3d/bundle.json +21 -10
  43. package/resources/targets/codebuddy/js3d/target.json +14 -7
  44. package/resources/targets/codex/js/js/bundle.json +15 -9
  45. package/resources/targets/codex/js/target.json +8 -6
  46. package/resources/targets/codex/js3d/js3d/bundle.json +21 -10
  47. package/resources/targets/codex/js3d/target.json +14 -7
  48. package/resources/targets/comate/js/js/bundle.json +15 -9
  49. package/resources/targets/comate/js/target.json +8 -6
  50. package/resources/targets/comate/js3d/js3d/bundle.json +21 -10
  51. package/resources/targets/comate/js3d/target.json +14 -7
  52. package/resources/targets/cursor/js/js/bundle.json +15 -9
  53. package/resources/targets/cursor/js/target.json +8 -6
  54. package/resources/targets/cursor/js3d/js3d/bundle.json +21 -10
  55. package/resources/targets/cursor/js3d/target.json +14 -7
  56. package/resources/targets/dsh/js/js/bundle.json +15 -9
  57. package/resources/targets/dsh/js/target.json +8 -6
  58. package/resources/targets/dsh/js3d/js3d/bundle.json +21 -10
  59. package/resources/targets/dsh/js3d/target.json +14 -7
  60. package/resources/targets/index.json +56 -56
  61. package/resources/targets/kimi/js/js/bundle.json +15 -9
  62. package/resources/targets/kimi/js/target.json +8 -6
  63. package/resources/targets/kimi/js3d/js3d/bundle.json +21 -10
  64. package/resources/targets/kimi/js3d/target.json +14 -7
  65. package/resources/targets/opencode/js/js/bundle.json +15 -9
  66. package/resources/targets/opencode/js/target.json +8 -6
  67. package/resources/targets/opencode/js3d/js3d/bundle.json +21 -10
  68. package/resources/targets/opencode/js3d/target.json +14 -7
  69. package/resources/targets/qoder/js/js/bundle.json +15 -9
  70. package/resources/targets/qoder/js/target.json +8 -6
  71. package/resources/targets/qoder/js3d/js3d/bundle.json +21 -10
  72. package/resources/targets/qoder/js3d/target.json +14 -7
  73. package/resources/targets/qoder-cn/js/js/bundle.json +15 -9
  74. package/resources/targets/qoder-cn/js/target.json +8 -6
  75. package/resources/targets/qoder-cn/js3d/js3d/bundle.json +21 -10
  76. package/resources/targets/qoder-cn/js3d/target.json +14 -7
  77. package/resources/targets/qwen/js/js/bundle.json +15 -9
  78. package/resources/targets/qwen/js/target.json +8 -6
  79. package/resources/targets/qwen/js3d/js3d/bundle.json +21 -10
  80. package/resources/targets/qwen/js3d/target.json +14 -7
  81. package/resources/targets/trae/js/js/bundle.json +15 -9
  82. package/resources/targets/trae/js/target.json +8 -6
  83. package/resources/targets/trae/js3d/js3d/bundle.json +21 -10
  84. package/resources/targets/trae/js3d/target.json +14 -7
  85. package/resources/targets/workbuddy/js/js/bundle.json +15 -9
  86. package/resources/targets/workbuddy/js/target.json +8 -6
  87. package/resources/targets/workbuddy/js3d/js3d/bundle.json +21 -10
  88. package/resources/targets/workbuddy/js3d/target.json +14 -7
  89. package/resources/targets/zcode/js/js/bundle.json +15 -9
  90. package/resources/targets/zcode/js/target.json +8 -6
  91. package/resources/targets/zcode/js3d/js3d/bundle.json +21 -10
  92. package/resources/targets/zcode/js3d/target.json +14 -7
  93. package/resources/templates/js/materialize_paths.json +9 -0
  94. package/resources/templates/js/project/package.json +1 -0
  95. package/resources/templates/js/project/runtime/lightgame/1.1.0/platform/platform-capture-dom.mjs +176 -0
  96. package/resources/templates/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +5 -1
  97. package/resources/templates/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +87 -3
  98. package/resources/templates/js/project/runtime/lightgame/1.1.0/release.json +3 -2
  99. package/resources/templates/js/project/scripts/refresh-runtime.mjs +50 -0
  100. package/resources/templates/js3d/materialize_paths.json +9 -0
  101. package/resources/templates/js3d/project/package.json +4 -2
  102. package/resources/templates/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-dom.mjs +176 -0
  103. package/resources/templates/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +5 -1
  104. package/resources/templates/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +87 -3
  105. package/resources/templates/js3d/project/runtime/lightgame/1.1.0/release.json +3 -2
  106. package/resources/templates/js3d/project/scripts/refresh-runtime.mjs +50 -0
  107. package/resources/templates/js3d/project/scripts/skill-modules/gameplay-check/check.mjs +331 -0
  108. package/resources/templates/js3d/project/src/game/capability/core.ts +3 -0
  109. package/resources/templates/js3d/project/src/main.ts +23 -6
  110. package/resources/templates/js3d/project/src/skill-modules/gameplay/core/index.d.mts +92 -0
  111. package/resources/templates/js3d/project/src/skill-modules/gameplay/core/index.mjs +375 -0
  112. package/resources/templates/js3d/project/src/skill-modules/gameplay/installed.json +6 -0
  113. package/dist-server/game-workflow/local-context.mjs +0 -64
@@ -6,6 +6,7 @@ import { loadEngineResources } from '../game-workflow/engines.mjs';
6
6
  import { readContextLock, checkProjectCompatibility, planContextRelease, assertContextRelease } from '../game-workflow/project-bundles.mjs';
7
7
  import { checkForUpdate, readUpdateStatus, readInstallation, confirmActiveInstallation, pendingChannelSwitch, queryRegistry } from '../integrations/updates.mjs';
8
8
  import { sameRuntimeIdentity } from '../integrations/installation-state.mjs';
9
+ import { sameFilePath } from '../integrations/files.mjs';
9
10
  import { connectionHandoff } from '../integrations/connection-handoff.mjs';
10
11
  import { readProjectInstall, assertProjectInstallConnection } from '../game-workflow/project-install.mjs';
11
12
 
@@ -46,8 +47,7 @@ export class UpdateSession {
46
47
  }
47
48
  try {
48
49
  const state=await readInstallation(this.installationFile);
49
- const normalize=value=>{const resolved=path.resolve(value);return process.platform==='win32'?resolved.toLowerCase():resolved;};
50
- if(state.server_id!==this.serverId || state.host!==this.host || normalize(state.workspace)!==normalize(this.workspace) || new URL(state.platform).origin!==new URL(this.platform).origin) throw new Error('Craft installation server, host, workspace or platform differs from this connection; run install with the intended scope and reconnect');
50
+ if(state.server_id!==this.serverId || state.host!==this.host || !sameFilePath(state.workspace,this.workspace) || new URL(state.platform).origin!==new URL(this.platform).origin) throw new Error('Craft installation server, host, workspace or platform differs from this connection; run install with the intended scope and reconnect');
51
51
  const switched=pendingChannelSwitch(state,this.current,this.connectedSource);
52
52
  if(switched) return this.withHandoff(switched,handoff);
53
53
  // Remember the source only when this process actually matches the target.
@@ -154,6 +154,7 @@ export class UpdateSession {
154
154
  const request_key = turnKey ?? randomUUID();
155
155
  const notice = this.check({intent:'inspect', request_key, advisory:true})
156
156
  .then(result=>{
157
+ if (result.status === 'channel_not_found') return {status:result.status,channel:result.channel,message:result.message,request_key,update_available:false};
157
158
  if (!result.update_available && result.status !== 'pending_reconnect') return;
158
159
  return {status:result.status, version:result.remote?.version, target_version:result.target?.version,
159
160
  request_key, update_available:result.update_available === true,
@@ -205,7 +206,6 @@ export class UpdateSession {
205
206
  const candidate=engines[project.engine];
206
207
  await checkProjectCompatibility(project.project,candidate.bundle);
207
208
  const lock=await readContextLock(project.project,project.engine);
208
- if(lock?.schema>=2 && !isDeepStrictEqual(lock.compatibility,candidate.bundle.compatibility)) throw new Error('New Craft context is incompatible with this project; keep its engine and migrate explicitly');
209
209
  if(lock?.contexts && candidate.host) assertContextRelease(await planContextRelease(candidate.legacyResources,candidate.bundle,lock));
210
210
  } : undefined;
211
211
  const result=await this.checkInstallation({installationFile:this.installationFile,current:this.current,connectedSource:this.connectedSource,intent,
@@ -1,38 +1,23 @@
1
1
  import { AuthStore } from '../core/auth-store.mjs';
2
+ import { boundedBody } from '../core/http-utils.mjs';
2
3
  import { resolveLibraryUrl } from './library-url.mjs';
3
- import { externalGameUploadRequest, parseExternalGameUploadReceipt } from '#craft-sdk';
4
- import { parseDraftAudit, parseDraftScanFailure } from './draft-audit.mjs';
5
- import { encodeDraftSource, legacySourceFormat } from './draft-source.mjs';
4
+ import { createDraftSession, fetchDraftUploadLimits } from './draft-transport.mjs';
6
5
  import { mcpLocationHeader, validMcpProduceLocation } from '../core/production-source.mjs';
7
6
 
8
7
  const API = Object.freeze({ me: '/api/auth/me', metadata: '/api/ms/gamemeta/file-hashes',
9
- uploadLimits:'/api/ms/external-game-uploads/limits',
10
8
  generate: '/api/res/generate-2-d-text-to-image', generate_image_edit:'/api/res/generate-2-d-image-text-to-image',
11
9
  generate_static_mesh:'/api/res/generate-3-d-props-pipeline', generate_skeletal_mesh:'/api/res/generate-3-d-character-pipeline',
12
10
  generate_music:'/api/res/generate-music', generate_video:'/api/res/generate-video',
13
11
  generate_sprite_sheet:'/api/res/generate-sprite-sheet-pipeline', generate_animation:'/api/res/generate-mocap',
14
12
  query: '/api/res/query-tasks', cancel: '/api/res/cancel-task',
15
13
  search:'/api/ms/agent/toolbox/search/js/batch-semantic-search' });
16
- const draftId = /^[a-zA-Z0-9_-]{1,128}$/;
17
- const draftAPI = '/api/ms/external-game-uploads';
14
+ const projectIdPattern = /^[a-zA-Z0-9_-]{1,128}$/;
18
15
 
19
16
  export class PlatformError extends Error {
20
17
  constructor(message, detail = {}) { super(message); this.detail = detail; }
21
18
  }
22
19
 
23
- export async function boundedBody(response, limit) {
24
- const tooLarge = () => Object.assign(new Error('Response exceeds size limit'),{ code:'CRAFT_RESPONSE_TOO_LARGE' });
25
- if (Number(response.headers.get('content-length')) > limit) { await response.body?.cancel(); throw tooLarge(); }
26
- const parts = []; let size = 0;
27
- for await (const part of response.body ?? []) {
28
- size += part.length;
29
- if (size > limit) throw tooLarge();
30
- parts.push(Buffer.from(part));
31
- }
32
- return Buffer.concat(parts);
33
- }
34
-
35
- export class CraftAigc {
20
+ export class CraftPlatform {
36
21
  #metadata;
37
22
  constructor(sessionFile, base, store) {
38
23
  if (typeof base !== 'string' || !base.trim()) throw new Error('CRAFT_WEB_URL must be configured');
@@ -43,12 +28,17 @@ export class CraftAigc {
43
28
  this.store = store ?? new AuthStore(sessionFile);
44
29
  this.store.onChange(() => { this.#metadata = undefined; });
45
30
  }
31
+ createError(message, detail) { return new PlatformError(message, detail); }
32
+ isPinnedSession(owner, token) {
33
+ const session = this.store.getSession();
34
+ return session.loggedIn && session.token === token && Number(session.identity?.userId) === owner;
35
+ }
46
36
  account() {
47
37
  const session = this.store.getSession();
48
38
  if (!session.loggedIn || !session.token || !session.identity?.userId) throw new Error('Craft login required; use craft_auth_open');
49
39
  return { user_id: Number(session.identity.userId), nickname: session.identity.displayName, roles: session.identity.roles };
50
40
  }
51
- async #http(endpoint, method, body, token, signal, bare = false, { draft = false, rawJSON = false, location, clientVersion, invalidate = true } = {}) {
41
+ async send({ endpoint, method, body, token, signal, bare = false, rawJSON = false, contentType = 'application/json', location, clientVersion, uploadProtocol, invalidate = true, timeoutMs, onHttpError } = {}) {
52
42
  let response, data;
53
43
  const search = endpoint === API.search, mutation = !search && !['GET','HEAD'].includes(method);
54
44
  const redact = value => (token ? String(value).split(token).join('[REDACTED]') : String(value)).slice(0,400);
@@ -60,15 +50,17 @@ export class CraftAigc {
60
50
  delivery_unknown };
61
51
  };
62
52
  try {
63
- const headers = { 'Content-Type':'application/json',Authorization:'Bearer ' + token };
53
+ const headers = { 'Content-Type':contentType,Authorization:'Bearer ' + token };
54
+ if (uploadProtocol) headers['X-Craft-Upload-Protocol'] = uploadProtocol;
64
55
  if (location !== undefined) headers[mcpLocationHeader] = String(location);
65
56
  if (clientVersion !== undefined) {
66
57
  headers['X-Client-Version'] = clientVersion;
67
58
  headers['X-Client-Type'] = 'pc';
68
59
  }
69
- const payload = rawJSON || body === undefined ? body : JSON.stringify(body);
60
+ const payload = rawJSON || contentType !== 'application/json' || body === undefined ? body : JSON.stringify(body);
61
+ const effectiveTimeout = timeoutMs ?? (search ? 25000 : 15000);
70
62
  response = await fetch(this.base + endpoint, { method, redirect:'manual', headers, body:payload,
71
- signal: AbortSignal.any([...(signal ? [signal] : []), AbortSignal.timeout(draft ? 120000 : search ? 25000 : 15000)]) });
63
+ signal: AbortSignal.any([...(signal ? [signal] : []), AbortSignal.timeout(effectiveTimeout)]) });
72
64
  // The search proxy may return an upstream service-token rejection, not a user-token rejection.
73
65
  if (response.status === 401 && !search && invalidate) this.store.invalidateToken(token);
74
66
  if (response.status >= 300 && response.status < 400) {
@@ -80,24 +72,11 @@ export class CraftAigc {
80
72
  catch { throw new PlatformError('Craft 接口返回非 JSON 响应,请检查接口路由或服务部署',detail(mutation,'invalid_response')); }
81
73
  const object = data !== null && typeof data === 'object' && !Array.isArray(data);
82
74
  if (!response.ok || (object && Object.hasOwn(data,'code') && data.code !== 0)) {
83
- // Draft errors may echo request data. Only forward the recognized size-limit wording.
84
- const sourceLimit = (data?.code === 80003 || (response.status === 413 && endpoint.endsWith('/source-content'))) &&
85
- /^项目源码超过当前上传上限([1-9]\d{0,9} MB)$/.test(data?.message ?? '');
86
- const draftError = {
87
- 10004:'云端项目正在生成或上传,请等待完成后重试同一次上传',
88
- 10014:endpoint === `${draftAPI}/prepare` && body?.conversation_id
89
- ? 'Craft 找不到这次上传绑定的云端项目。请在同一 Craft 站点用原账号确认该项目还能打开。'
90
- : 'Craft 找不到这次上传的记录或目标云端项目。请确认当前 Craft 账号和站点,并在网页核对项目和版本状态。',
91
- 10015:'上传请求与云端版本冲突,请检查上传状态后重试',
92
- 30006:'Craft 账号的项目数量已达上限,无法新建云端项目。请在 Craft 网页的项目列表中删除不再需要的项目,腾出名额后再重试同一次上传。',
93
- };
94
- const scanFailure = draft && data?.code === 10017 ? parseDraftScanFailure(data.data) : undefined;
95
- if (scanFailure) {
96
- const {message,reason,path} = scanFailure;
97
- throw new PlatformError(message,{...detail(false,'upload_security'),
98
- upload_security:{reason,...(path && !path.includes(token) ? {path} : {})}});
75
+ if (onHttpError) {
76
+ const custom = onHttpError({ endpoint, method, body, response, data, token, mutation, detail, redact });
77
+ if (custom) throw new PlatformError(custom.message, custom.detail);
99
78
  }
100
- const message = (!draft || sourceLimit) && typeof data?.message === 'string' && data.message ? redact(data.message) : (draft && draftError[data?.code]) || 'Craft 平台请求失败';
79
+ const message = typeof data?.message === 'string' && data.message ? redact(data.message) : 'Craft 平台请求失败';
101
80
  throw new PlatformError(message,detail(mutation && response.status >= 500,'http'));
102
81
  }
103
82
  if (!bare && (!object || data.code !== 0 || !Object.hasOwn(data,'data'))) throw new PlatformError('Craft 接口响应格式不正确',detail(mutation,'invalid_response'));
@@ -112,9 +91,18 @@ export class CraftAigc {
112
91
  throw new PlatformError(messages[failure_type],{ ...detail(mutation,failure_type),network_code });
113
92
  }
114
93
  }
94
+ async requestEndpoint({ endpoint, method, body, owner, signal, bare = false, redactResponse = false }) {
95
+ const account = this.account(), token = this.store.getSession().token;
96
+ if (owner !== undefined && owner !== account.user_id) throw new Error('Craft account changed');
97
+ const data = await this.send({ endpoint, method, body, token, signal, bare });
98
+ if (this.store.getSession().token !== token) {
99
+ throw new PlatformError('Craft account changed during request', { delivery_unknown: endpoint !== API.search && method === 'POST' });
100
+ }
101
+ return redactResponse ? JSON.parse(JSON.stringify(data).split(token).join('[REDACTED]')) : data;
102
+ }
115
103
  async login(token) {
116
104
  if (typeof token !== 'string' || token.length < 8 || token.length > 4096 || /\s/.test(token)) throw new Error('Invalid token');
117
- const account = await this.#http(API.me, 'GET', undefined, token, undefined, true);
105
+ const account = await this.send({ endpoint: API.me, method: 'GET', token, bare: true });
118
106
  this.#validateAccount(account);
119
107
  this.store.saveTokenSession({ token, identity: { userId: String(account.user_id), staffName: '',
120
108
  displayName: String(account.nickname || ''), roles: account.roles } });
@@ -128,93 +116,30 @@ export class CraftAigc {
128
116
  logout() { this.store.clearSession(); return { authenticated: false }; }
129
117
  async request(kind, body, owner, signal) {
130
118
  if (!Object.hasOwn(API,kind)) throw new Error('Unknown Craft endpoint');
131
- const account = this.account(), token = this.store.getSession().token;
132
- if (owner !== undefined && owner !== account.user_id) throw new Error('Craft account changed');
133
- const method = ['me','metadata','uploadLimits'].includes(kind) ? 'GET' : 'POST';
134
- const data = await this.#http(API[kind], method, body, token, signal, ['me','search'].includes(kind));
135
- if (this.store.getSession().token !== token) throw new PlatformError('Craft account changed during request', { delivery_unknown: kind !== 'search' && method === 'POST' });
136
- return kind==='search' ? JSON.parse(JSON.stringify(data).split(token).join('[REDACTED]')) : data;
119
+ const method = ['me','metadata'].includes(kind) ? 'GET' : 'POST';
120
+ return this.requestEndpoint({ endpoint: API[kind], method, body, owner, signal,
121
+ bare: ['me','search'].includes(kind), redactResponse: kind === 'search' });
137
122
  }
138
123
  async reportProjectOpen(projectID, workID, owner, location, signal) {
139
- if (!draftId.test(projectID) || !validMcpProduceLocation(location)) throw new Error('Invalid MCP project telemetry');
124
+ if (!projectIdPattern.test(projectID) || !validMcpProduceLocation(location)) throw new Error('Invalid MCP project telemetry');
140
125
  const session = this.store.getSession();
141
126
  if (!session.loggedIn || !session.token || Number(session.identity?.userId) !== owner) throw new Error('Craft account changed');
142
- await this.#http('/api/ms/conversations/' + projectID + '/mcp-open','POST',{ work_id:workID },session.token,signal,false,{ location, invalidate:false });
127
+ await this.send({ endpoint: '/api/ms/conversations/' + projectID + '/mcp-open', method: 'POST',
128
+ body: { work_id: workID }, token: session.token, signal, location, invalidate: false });
143
129
  }
144
130
  async reportProductionEvent(event, signal) {
145
131
  const endpoint = { debug:'/api/ms/versions/debug-run',build:'/api/ms/versions/auto-package-build' }[event.event];
146
- if (!endpoint || !draftId.test(event.project_id) || !validMcpProduceLocation(event.location)) throw new Error('Invalid MCP result telemetry');
132
+ if (!endpoint || !projectIdPattern.test(event.project_id) || !validMcpProduceLocation(event.location)) throw new Error('Invalid MCP result telemetry');
147
133
  const session = this.store.getSession();
148
134
  if (!session.loggedIn || !session.token || Number(session.identity?.userId) !== event.owner) throw new Error('Craft account changed');
149
135
  const body = { app_id:event.project_id,event_id:event.event_id,occurred_at:event.occurred_at,
150
136
  ...(event.event === 'debug' ? { debug_result:event.debug_result } :
151
137
  { build_result:event.build_result,turn_index:event.turn_index,retry_index:event.retry_index }) };
152
- await this.#http(endpoint,'POST',body,session.token,signal,false,
153
- { location:event.location,clientVersion:event.client_version,invalidate:false });
154
- }
155
- draftSession(owner) {
156
- if (new URL(this.base).pathname !== '/') throw new Error('Draft upload requires a Craft platform origin');
157
- const session = this.store.getSession(), token = session.token;
158
- if (!session.loggedIn || owner !== Number(session.identity?.userId) || !token) throw new Error('Craft account changed');
159
- return (kind, options, signal) => this.#draft(kind,options,owner,token,signal);
160
- }
161
- async uploadLimits(owner, signal) {
162
- // Never cache policy: the next attempt must observe configuration changes.
163
- const limits = await this.request('uploadLimits',undefined,owner,signal);
164
- if (!Number.isSafeInteger(limits?.source_max_bytes) || limits.source_max_bytes < 1) {
165
- throw new PlatformError('Craft 返回的工程上传上限无效');
166
- }
167
- return { source_max_bytes:limits.source_max_bytes };
168
- }
169
- async #draft(kind, { id, input, archive, source, sourceFormat }, owner, token, signal) {
170
- const current = () => {
171
- const session = this.store.getSession();
172
- return session.loggedIn && session.token === token && Number(session.identity?.userId) === owner;
173
- };
174
- if (!current()) throw new Error('Craft account changed');
175
- if (id !== undefined && (typeof id !== 'string' || !draftId.test(id) || id.includes(token))) throw new Error('Invalid draft upload ID');
176
- const sourceUpload = kind === 'upload-source';
177
- signal?.throwIfAborted();
178
- if (sourceUpload && id === undefined) throw new Error('Invalid draft upload ID');
179
- const { endpoint,method,body } = sourceUpload
180
- ? { endpoint:`${draftAPI}/${id}/source-content`, method:'POST', body:await encodeDraftSource(source,sourceFormat,signal) }
181
- : await externalGameUploadRequest(kind,{ id,input,archive },signal);
182
- // The prepare JSON is strict on older servers. Keep telemetry in a header.
183
- const location = kind === 'prepare' ? input?.mcp_produce_location : undefined;
184
- if (location !== undefined) {
185
- if (!validMcpProduceLocation(location)) throw new Error('Invalid saved MCP production location');
186
- delete body.mcp_produce_location;
187
- }
188
- if (!current()) throw new Error('Craft account changed');
189
- const data=await this.#http(endpoint,method,body,token,signal,false,{ draft:true, rawJSON:sourceUpload && sourceFormat === legacySourceFormat, location });
190
- if (!current()) throw new PlatformError('Craft account changed during draft upload',{ delivery_unknown:method !== 'GET' });
191
- let result;
192
- try {
193
- result=parseExternalGameUploadReceipt(data,{ uploadId:id,requireUploadPath:kind === 'prepare' });
194
- if (data.audit !== undefined) {
195
- result.audit = parseDraftAudit(data.audit,result.state);
196
- if (result.audit.findings?.some(finding=>finding.path.includes(token))) throw new Error('Craft 返回的上传检查路径无效');
197
- }
198
- if (data.upload_mode !== undefined) {
199
- if (!['current_project','new_project'].includes(data.upload_mode)) throw new Error('Invalid external game upload mode');
200
- result.upload_mode = data.upload_mode;
201
- }
202
- if (data.version_number !== undefined) {
203
- if (!Number.isSafeInteger(data.version_number) || data.version_number < 1 || result.state !== 'draft_ready') throw new Error('Invalid external game version number');
204
- result.version_number = data.version_number;
205
- }
206
- if (data.dist_ready !== undefined || data.source_ready !== undefined) {
207
- if (typeof data.dist_ready !== 'boolean' || typeof data.source_ready !== 'boolean') throw new Error('Invalid external game upload readiness');
208
- result.dist_ready = data.dist_ready;
209
- result.source_ready = data.source_ready;
210
- }
211
- }
212
- catch(error) { throw new PlatformError(error.message); }
213
- for (const key of ['upload_id','conversation_id','version_id']) {
214
- if (typeof result[key] === 'string' && result[key].includes(token)) throw new PlatformError('Invalid Craft draft response');
215
- }
216
- return result;
138
+ await this.send({ endpoint, method: 'POST', body, token: session.token, signal,
139
+ location: event.location, clientVersion: event.client_version, invalidate: false });
217
140
  }
141
+ draftSession(owner) { return createDraftSession(this, owner); }
142
+ uploadLimits(owner, signal) { return fetchDraftUploadLimits(this, owner, signal); }
218
143
  async status(signal) {
219
144
  if (!this.store.getSession().loggedIn) return { authenticated: false, platform: this.base };
220
145
  let account;
@@ -35,12 +35,63 @@ const scanFailures = Object.freeze({
35
35
  internal_error:'服务端安全检查发生内部故障,请联系平台维护者',
36
36
  });
37
37
 
38
+ const modelAuditErrors = Object.freeze({
39
+ model_manifest_invalid:'请检查项目根目录 craft-audit-assets.json 的版本、字段和资产路径。',
40
+ model_rig_missing:'动作缺少可用的蒙皮底模。请在 craft-audit-assets.json 中关联对应的 FBX。',
41
+ model_rig_incompatible:'动作与关联底模的骨骼不匹配。请检查动作和蒙皮模型的绑定。',
42
+ model_unrenderable:'无法生成模型六视图。请检查模型格式、可见网格和内嵌贴图。',
43
+ animation_unrenderable:'无法生成该动作片段的有效预览。请检查蒙皮、关键帧和时长。',
44
+ animation_gif_invalid:'动画预览 GIF 无法通过格式检查。请提供可解码的多帧 GIF。',
45
+ });
46
+
47
+ export function modelAuditErrorMessage(audit) {
48
+ if (audit?.state === 'error' && typeof audit.reason === 'string' && Object.hasOwn(modelAuditErrors,audit.reason)) {
49
+ return modelAuditErrors[audit.reason];
50
+ }
51
+ }
52
+
38
53
  function validAuditPath(value) {
39
54
  return typeof value === 'string' && value.length > 0 && value.length <= 1024 &&
40
55
  !/[\u0000-\u001f\u007f]/u.test(value) && !value.startsWith('/') && !/^[a-z]:/i.test(value) &&
41
56
  !value.includes('\\') && !value.split('/').some(p=>!p || p === '.' || p === '..');
42
57
  }
43
58
 
59
+ export const textAuditProtocol = 'ace-text-v1';
60
+ const maxFilteredFiles = 64;
61
+ const maxFilteredBytes = 1024 * 1024;
62
+
63
+ function parseFilteredFiles(value, token) {
64
+ if (!Array.isArray(value) || value.length === 0 || value.length > maxFilteredFiles) return;
65
+ const out = [], seen = new Set();
66
+ let totalBytes = 0;
67
+ for (const item of value) {
68
+ if (!item || typeof item !== 'object' || Array.isArray(item)) return;
69
+ const { location, filtered_text } = item;
70
+ if (!validAuditPath(location) || !location.startsWith('source/') || /[?#]/.test(location) ||
71
+ !/\.(?:md|txt)$/i.test(location) || (token && location.includes(token)) || seen.has(location)) return;
72
+ if (typeof filtered_text !== 'string' || filtered_text.length === 0 || filtered_text.includes('\0') ||
73
+ (token && filtered_text.includes(token))) return;
74
+ totalBytes += Buffer.byteLength(location) + Buffer.byteLength(filtered_text);
75
+ if (totalBytes > maxFilteredBytes) return;
76
+ seen.add(location);
77
+ out.push({ location, filtered_text });
78
+ }
79
+ return out;
80
+ }
81
+
82
+ export function parseContentAudit(value, uploadState, token) {
83
+ if (value?.protocol !== 1 || !Number.isSafeInteger(value.revision) || value.revision < 0 ||
84
+ !['not_started','queued','auditing','retry_wait','passed','rejected','error'].includes(value.state) ||
85
+ ((uploadState === 'draft_ready') !== (value.state === 'passed')) ||
86
+ (value.state !== 'not_started' && !['uploaded','draft_ready'].includes(uploadState))) {
87
+ throw new Error('Craft 返回的内容审核回执无效');
88
+ }
89
+ const location = validAuditPath(value.location) && !value.location.includes(token) ? value.location : undefined;
90
+ const filtered_files = value.state === 'rejected' ? parseFilteredFiles(value.filtered_files, token) : undefined;
91
+ return { protocol:1, state:value.state, revision:value.revision, ...(location && {location}),
92
+ ...(modelAuditErrorMessage(value) && {reason:value.reason}), ...(filtered_files && {filtered_files}) };
93
+ }
94
+
44
95
  export function parseDraftScanFailure(value) {
45
96
  if (!value || typeof value !== 'object' || Array.isArray(value) ||
46
97
  value.kind !== 'upload_security_unavailable' || typeof value.reason !== 'string' || !Object.hasOwn(scanFailures,value.reason) ||
@@ -0,0 +1,184 @@
1
+ import { externalGameUploadRequest, parseExternalGameUploadReceipt } from '#craft-sdk';
2
+ import { parseContentAudit, parseDraftAudit, parseDraftScanFailure, textAuditProtocol } from './draft-audit.mjs';
3
+ import { encodeDraftSource, legacySourceFormat } from './draft-source.mjs';
4
+ import { validMcpProduceLocation } from '../core/production-source.mjs';
5
+
6
+ const DRAFT_API = '/api/ms/external-game-uploads';
7
+ const DRAFT_LIMITS_API = `${DRAFT_API}/limits`;
8
+ const DRAFT_TIMEOUT_MS = 120000;
9
+ const draftId = /^[a-zA-Z0-9_-]{1,128}$/;
10
+ const sha256Pattern = /^[a-f0-9]{64}$/;
11
+
12
+ function parseChunkIndices(value) {
13
+ if (!Array.isArray(value) || value.some(item => !Number.isSafeInteger(item) || item < 0)) {
14
+ throw new Error('Invalid external game upload chunk progress');
15
+ }
16
+ return [...new Set(value)].sort((a, b) => a - b);
17
+ }
18
+
19
+ function formatDraftError({ endpoint, body, response, data, token, mutation, detail, redact }) {
20
+ // Draft errors may echo request data. Only forward the recognized size-limit wording.
21
+ const sourceLimit = (data?.code === 80003 || (response.status === 413 && endpoint.endsWith('/source-content'))) &&
22
+ /^项目源码超过当前上传上限([1-9]\d{0,9} MB)$/.test(data?.message ?? '');
23
+ const draftError = {
24
+ 50002:endpoint === `${DRAFT_API}/prepare` ? '项目标题未通过文本审核,请调整标题后重新检查并上传' : undefined,
25
+ 10004:'云端项目正在生成或上传,请等待完成后重试同一次上传',
26
+ 10007:'当前账号或 MCP 客户端无权限执行此次上传,请确认已使用有效 CLI Token 登录并升级至最新 Craft MCP 版本',
27
+ 10014:endpoint === `${DRAFT_API}/prepare` && body?.conversation_id
28
+ ? 'Craft 找不到这次上传绑定的云端项目。请在同一 Craft 站点用原账号确认该项目还能打开。'
29
+ : 'Craft 找不到这次上传的记录或目标云端项目。请确认当前 Craft 账号和站点,并在网页核对项目和版本状态。',
30
+ 10015:'上传请求与云端版本冲突,请检查上传状态后重试',
31
+ 10016:'云端正在处理提交或当前服务繁忙,请稍后查询上传状态并重试同一次上传',
32
+ 30006:'Craft 账号的项目数量已达上限,无法新建云端项目。请在 Craft 网页的项目列表中删除不再需要的项目,腾出名额后再重试同一次上传。',
33
+ };
34
+ const scanFailure = data?.code === 10017 ? parseDraftScanFailure(data.data) : undefined;
35
+ if (scanFailure) {
36
+ const { message, reason, path } = scanFailure;
37
+ return {
38
+ message,
39
+ detail: {
40
+ ...detail(false, 'upload_security'),
41
+ upload_security: { reason, ...(path && !path.includes(token) ? { path } : {}) },
42
+ },
43
+ };
44
+ }
45
+ const message = sourceLimit && typeof data?.message === 'string' && data.message
46
+ ? redact(data.message)
47
+ : draftError[data?.code] || 'Craft 平台请求失败';
48
+ return { message, detail: detail(mutation && response.status >= 500, 'http') };
49
+ }
50
+
51
+ function parseDraftReceipt(data, { uploadId, requireUploadPath, token }) {
52
+ const result = parseExternalGameUploadReceipt(data, { uploadId, requireUploadPath });
53
+ if (data.content_audit !== undefined) result.content_audit = parseContentAudit(data.content_audit, result.state, token);
54
+ if (data.audit !== undefined) {
55
+ result.audit = parseDraftAudit(data.audit, result.state);
56
+ if (result.audit.findings?.some(finding => finding.path.includes(token))) {
57
+ throw new Error('Craft 返回的上传检查路径无效');
58
+ }
59
+ }
60
+ if (data.upload_mode !== undefined) {
61
+ if (!['current_project', 'new_project'].includes(data.upload_mode)) throw new Error('Invalid external game upload mode');
62
+ result.upload_mode = data.upload_mode;
63
+ }
64
+ if (data.version_number !== undefined) {
65
+ if (!Number.isSafeInteger(data.version_number) || data.version_number < 1 || result.state !== 'draft_ready') {
66
+ throw new Error('Invalid external game version number');
67
+ }
68
+ result.version_number = data.version_number;
69
+ }
70
+ if (data.dist_ready !== undefined || data.source_ready !== undefined) {
71
+ if (typeof data.dist_ready !== 'boolean' || typeof data.source_ready !== 'boolean') {
72
+ throw new Error('Invalid external game upload readiness');
73
+ }
74
+ result.dist_ready = data.dist_ready;
75
+ result.source_ready = data.source_ready;
76
+ }
77
+ if (data.dist_chunks_received !== undefined) {
78
+ result.dist_chunks_received = parseChunkIndices(data.dist_chunks_received);
79
+ }
80
+ if (data.source_chunks_received !== undefined) {
81
+ result.source_chunks_received = parseChunkIndices(data.source_chunks_received);
82
+ }
83
+ return result;
84
+ }
85
+
86
+ export async function fetchDraftUploadLimits(platform, owner, signal) {
87
+ // Never cache policy: the next attempt must observe configuration changes.
88
+ const limits = await platform.requestEndpoint({ endpoint: DRAFT_LIMITS_API, method: 'GET', owner, signal });
89
+ if (!Number.isSafeInteger(limits?.source_max_bytes) || limits.source_max_bytes < 1) {
90
+ throw platform.createError('Craft 返回的工程上传上限无效');
91
+ }
92
+ if (limits.text_audit_protocol !== undefined && limits.text_audit_protocol !== textAuditProtocol) {
93
+ throw platform.createError('Craft 返回了当前客户端无法识别的内容审核协议,请升级 Craft MCP');
94
+ }
95
+ if (limits.chunk_size_bytes !== undefined && (!Number.isSafeInteger(limits.chunk_size_bytes) || limits.chunk_size_bytes < 1)) {
96
+ throw platform.createError('Craft 返回的分片上传大小无效');
97
+ }
98
+ return {
99
+ source_max_bytes: limits.source_max_bytes,
100
+ ...(limits.chunk_size_bytes !== undefined ? { chunk_size_bytes: limits.chunk_size_bytes } : {}),
101
+ ...(limits.text_audit_protocol !== undefined ? { text_audit_protocol: textAuditProtocol } : {}),
102
+ };
103
+ }
104
+
105
+ export function createDraftSession(platform, owner) {
106
+ if (new URL(platform.base).pathname !== '/') throw new Error('Draft upload requires a Craft platform origin');
107
+ const session = platform.store.getSession(), token = session.token;
108
+ if (!session.loggedIn || owner !== Number(session.identity?.userId) || !token) throw new Error('Craft account changed');
109
+ const current = () => platform.isPinnedSession(owner, token);
110
+
111
+ return async (kind, { id, input, archive, source, sourceFormat, chunkKind, index, total, sha256, chunk, encoding }, signal) => {
112
+ if (!current()) throw new Error('Craft account changed');
113
+ if (id !== undefined && (typeof id !== 'string' || !draftId.test(id) || id.includes(token))) {
114
+ throw new Error('Invalid draft upload ID');
115
+ }
116
+ const sourceUpload = kind === 'upload-source';
117
+ const chunkUpload = kind === 'upload-chunk';
118
+ const chunkComplete = kind === 'complete-chunks';
119
+ signal?.throwIfAborted();
120
+ if ((sourceUpload || chunkUpload || chunkComplete) && id === undefined) throw new Error('Invalid draft upload ID');
121
+ let endpoint, method, body, contentType = 'application/json', rawJSON = false;
122
+ if (sourceUpload) {
123
+ endpoint = `${DRAFT_API}/${id}/source-content`;
124
+ method = 'POST';
125
+ body = await encodeDraftSource(source, sourceFormat, signal);
126
+ rawJSON = sourceFormat === legacySourceFormat;
127
+ } else if (chunkUpload) {
128
+ if (!['dist', 'source'].includes(chunkKind) || !Number.isSafeInteger(index) || index < 0 ||
129
+ !Number.isSafeInteger(total) || total < 1 || index >= total ||
130
+ typeof sha256 !== 'string' || !sha256Pattern.test(sha256) ||
131
+ (encoding !== undefined && encoding !== 'gzip') ||
132
+ !(chunk instanceof Uint8Array) || chunk.byteLength < 1) {
133
+ throw new Error('Invalid draft upload chunk request');
134
+ }
135
+ const encodingQuery = encoding ? `&encoding=${encoding}` : '';
136
+ endpoint = `${DRAFT_API}/${id}/chunks?kind=${chunkKind}&index=${index}&total=${total}&sha256=${sha256}${encodingQuery}`;
137
+ method = 'POST';
138
+ contentType = 'application/octet-stream';
139
+ body = chunk;
140
+ } else if (chunkComplete) {
141
+ if (!['dist', 'source'].includes(chunkKind) || !Number.isSafeInteger(total) || total < 1) {
142
+ throw new Error('Invalid draft chunk completion request');
143
+ }
144
+ endpoint = `${DRAFT_API}/${id}/chunks/complete`;
145
+ method = 'POST';
146
+ body = { kind: chunkKind, total_chunks: total };
147
+ } else {
148
+ ({ endpoint, method, body } = await externalGameUploadRequest(kind, { id, input, archive }, signal));
149
+ }
150
+ // The prepare JSON is strict on older servers. Keep telemetry in a header.
151
+ const location = kind === 'prepare' ? input?.mcp_produce_location : undefined;
152
+ if (location !== undefined) {
153
+ if (!validMcpProduceLocation(location)) throw new Error('Invalid saved MCP production location');
154
+ delete body.mcp_produce_location;
155
+ }
156
+ if (!current()) throw new Error('Craft account changed');
157
+ const data = await platform.send({
158
+ endpoint,
159
+ method,
160
+ body,
161
+ token,
162
+ signal,
163
+ rawJSON,
164
+ contentType,
165
+ uploadProtocol: textAuditProtocol,
166
+ location,
167
+ timeoutMs: DRAFT_TIMEOUT_MS,
168
+ onHttpError: formatDraftError,
169
+ });
170
+ if (!current()) throw platform.createError('Craft account changed during draft upload', { delivery_unknown: method !== 'GET' });
171
+ let result;
172
+ try {
173
+ result = parseDraftReceipt(data, { uploadId: id, requireUploadPath: kind === 'prepare', token });
174
+ } catch (error) {
175
+ throw platform.createError(error.message);
176
+ }
177
+ for (const key of ['upload_id', 'conversation_id', 'version_id']) {
178
+ if (typeof result[key] === 'string' && result[key].includes(token)) {
179
+ throw platform.createError('Invalid Craft draft response');
180
+ }
181
+ }
182
+ return result;
183
+ };
184
+ }
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@craft_eco/craft-mcp",
3
- "version": "0.1.34",
3
+ "version": "0.1.35-beta.2",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=22.12.0"
7
7
  },
8
8
  "craft": {
9
9
  "platform": "https://craft.qq.com",
10
- "source_sha256": "a1fb899b9fe7fe6f1bae09ff53d5912efbf5269b7788d2d2ca06d5a3c46b6d93"
10
+ "source_sha256": "5759f8b39af73b6f8d7edde721d214a74fe1fea66cbd98509115016f05b6e486"
11
11
  },
12
12
  "scripts": {
13
13
  "start": "node bin/craft-mcp.mjs"
@@ -43,6 +43,6 @@
43
43
  "publishConfig": {
44
44
  "registry": "https://registry.npmjs.org/",
45
45
  "access": "public",
46
- "tag": "stable"
46
+ "tag": "beta"
47
47
  }
48
48
  }
@@ -24,4 +24,6 @@ pending_reconnect 时明确告知“新版已安装,等待下次 MCP 启动或
24
24
 
25
25
  程序更新不批量修改旧项目;恢复时 prepare(resume) 才同步项目上下文与 Skill,js/js3d 保持原引擎。旧运行时不可降级新上下文;不删除锁或改版本绕过检查。文件已更新、原生 Skill 已发现与模型已重读分别确认。
26
26
 
27
+ 收到 `channel_not_found` 时,向用户说明已配置的 npm 包当前没有该标签,本次保留原版本。继续已有工作沿用 work_id;恢复已有项目时,使用带 name 的版本检查。只有该检查返回 can_continue=true 才用原实例调用 prepare(resume),并报告 update_warning 中的保留版本。保持原包、源和渠道。
28
+
27
29
  更新失败时告知 message 和实际保留的版本;update_failed 且 can_continue=true 表示旧安装已复核,可继续制作,不能声称升级成功。prepare 返回的 update_warning 也要告知用户。can_continue=false 时按具体诊断处理,不绕过损坏或兼容检查。当前连接缺少 craft_update 时先看 info:已有 pending_reconnect 就等待下次启动或用户重连;尚未安装新版时才使用新版标准 install。离线时说明未确认最新;渠道低于本地时保留本地版本。
@@ -2,8 +2,8 @@
2
2
  "schema": 2,
3
3
  "engine": "js",
4
4
  "host": "claude",
5
- "version": "1.0.15",
6
- "source_revision": "sha256:749ba73c1e36a65cb9ccfa064c9a298f78bab55e50d63fc03c4e3d69aa13902a",
5
+ "version": "1.0.16",
6
+ "source_revision": "sha256:85c2da500fe2471aea5f7932c4591a497f7bddb01246f9a1620fae964885bd4c",
7
7
  "contracts": {
8
8
  "export": 1,
9
9
  "skills": 1,
@@ -14,8 +14,12 @@
14
14
  "runtime_version": "1.1.0",
15
15
  "dependency": "phaser",
16
16
  "dependency_version": "3.90.0",
17
- "template_digest": "eaf561fdc806ffb34b8f3f6ab89f8f877a89059c0a9f87265910e077585df34c"
17
+ "template_digest": "db8e6f3f4be3f6eac0bc688a16094da22796f99508da39146e2444fee45444c3"
18
18
  },
19
+ "template_refresh_paths": [
20
+ "runtime/lightgame",
21
+ "version/craft_feature_version.json"
22
+ ],
19
23
  "files": {
20
24
  "js/context/AGENTS.md": "4a63bbaa3e7bbea6ab2aadc423be6ee9fdc324700e5135819fe47fa63efdeffc",
21
25
  "js/context/hooks/hooks.json": "8becc4a05e25996fb079dcac9b7c2f7c79d719ea0d2cf20dc9b8a91a97a3261d",
@@ -99,16 +103,17 @@
99
103
  "js/project/game-runtime.json": "9e6d4974f371478ce507ae208de580e248175a0d99941aa0d10465243fd4ad69",
100
104
  "js/project/game.config.json": "0d50535f695a1be2c7a1649953fedd112d02a078ceda11c22391b21c05a22c0e",
101
105
  "js/project/index.html": "6968aba482c4fb0d2c6bd0e4effe627837c1a83bf16f185c32dd7b351605c6a2",
102
- "js/project/package.json": "b308908f78564b70471e7c9c762904f497778e2e5dd0512a47e9034ed7c2c8d4",
106
+ "js/project/package.json": "2f027444bee0ec6f1f12aaa1706fae2a6cf0ed960b25f47eae2e92f481a3aeb8",
103
107
  "js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js": "2a2ad154f1f300f188e202100d35d866e81cba0ff603cb9abea8ab1b4f2b909a",
104
108
  "js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs": "6a2716cdb7393cac0b0b231bf1b5f9886e2c876917c7af17913c57a683df2a8a",
105
109
  "js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs": "58855d261455d390e66b8dbfccd6384a3daddcf77615490c744014c695e611b3",
110
+ "js/project/runtime/lightgame/1.1.0/platform/platform-capture-dom.mjs": "679cd9c2d6dbbd76be255181fa832aae639057a1724e865701af3f6c8c511b8f",
106
111
  "js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs": "5137bfd403c8500e1e5b5305ac7f3ca55ee68daaade624333a7c85786077713d",
107
112
  "js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts": "1215d08eaa70c412628e6d160e10f3d1b211be8ff66da5d312684d6fe6905f11",
108
113
  "js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs": "4c80bd843775d687d6015dcde78c3ea2a354923860d1c5d443a6035fcfce5653",
109
- "js/project/runtime/lightgame/1.1.0/platform/platform.d.mts": "27819e8b8730a6af9c84aa4b540fef010e51299f32a76739621d340046e12f11",
110
- "js/project/runtime/lightgame/1.1.0/platform/platform.mjs": "d4848e892f4863003d4022178817cf3c796975f5304bd59530b6574971b4e9c9",
111
- "js/project/runtime/lightgame/1.1.0/release.json": "ddd0894b196b729b9d1e592f204897655c34dc685c0397a6dee267c47d90c55e",
114
+ "js/project/runtime/lightgame/1.1.0/platform/platform.d.mts": "37879825163e64ee3962aee55e14d254c10a5fdf6d0424d5229fa8c60bc052e3",
115
+ "js/project/runtime/lightgame/1.1.0/platform/platform.mjs": "b9ff1ca6a1a6b0293fd3e60f55fe90eb3c9ec0aef3725dbf4855a4eb4e2dbece",
116
+ "js/project/runtime/lightgame/1.1.0/release.json": "b7a33e005807604bbfde648d6603685f0c4cc10f94db3caacbbb4ce89605f4f1",
112
117
  "js/project/runtime/lightgame/1.1.0/tooling/cli.mjs": "ff2a614679a8b2fc3847efe6d0d7194e8c87d8100eaff6b9168e4e3d050465c0",
113
118
  "js/project/runtime/lightgame/1.1.0/tooling/project.d.mts": "d8272a81789094fed7090ae0cd07f597f62b2dca16834fd6b6e9ccea81968ec8",
114
119
  "js/project/runtime/lightgame/1.1.0/tooling/project.mjs": "d1600f6a294fe0399d9d45d20cffb7416318b2bbff497c08142ce1a568c59db2",
@@ -122,6 +127,7 @@
122
127
  "js/project/scripts/config-export/panel-resource-path.mjs": "70f707133498347e6295d82d8da6cc24cd9363b3bd302e1372016a5491f07ba7",
123
128
  "js/project/scripts/config-export/sync-asset-controls.mjs": "ac2c05d52d34ff3f63cd61892db23c5ae3c622d5e6023d9a4b6f221bc4b8bc67",
124
129
  "js/project/scripts/config-export.mjs": "2b36636fda0dac316129c354134a77e18d60a940210d870ae5ba18697c347d49",
130
+ "js/project/scripts/refresh-runtime.mjs": "ad319b9a75f0a694888a356371b0b76dd0ea5334a8b22201e6316bdf3209193c",
125
131
  "js/project/scripts/skill-modules/export-config/cli.mjs": "70c1d67b93a03e64c22a1ec20927304f6c4cbbe5d74b855dd03ed7fa103a821a",
126
132
  "js/project/scripts/skill-modules/export-config/config.d.mts": "25066e71f44ee8b74b2285e3824536afb4cac25f63f4d4c2193da29c237d774d",
127
133
  "js/project/scripts/skill-modules/export-config/config.mjs": "ba99f6f54d0db4fc42d5431d0792c3f5e6981474faef3a0acf924a90b27158f8",
@@ -146,9 +152,9 @@
146
152
  "js/project/vite.config.ts": "3446dbee391e5c15aa3fa1770cadf16c4214d11715881784ed879c2f317d9f8f",
147
153
  "craft-game-maker/SKILL.md": "99e96199b350ccc0cab2436dde06268f675ed702e7a71aab2792ef60b56324da",
148
154
  "craft-game-maker/js.md": "8def56109bf89087e0246b26d9ce9197bc66fc5def9e7d07b3874b11277dc7fa",
149
- "target.json": "706573ee7a52fe080ad3b04e05d7f061bf0eecfd6b280c061e0873ce2e968c48",
155
+ "target.json": "0d9c45a6367fe7d9aa1bbfe88a1a792cad2db0e99eacadd874f1744e88910ae5",
150
156
  "bootstrap/SKILL.md": "1a5f60e1d53fd95dc4788a19f00fc29a105336b435951c9f0efee5bab49aaaea",
151
157
  "recovery.md": "7cdcbf723f3547612e63b7806d762bb2ac06835ac98aeff02b6d11205e01c3b3"
152
158
  },
153
- "id": "4a8fbc4d50e92a2152f8ef2bc8c94e7d695077126415aeb2e544310ebbde85ea"
159
+ "id": "23713fefb885e122797cba55f1a3a6c0edb280c0857c0455efc29a74b588d9d6"
154
160
  }