A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
feat(web): connect Poki channel exports to ads services
yhha116ca22b4b7
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 4302032bc..c692ac36b 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -26,6 +26,8 @@ published separately; it ships inside the editor.### Added+- **Web exports can select the Poki channel.** Project and named export settings inject its official SDK, initialize it with a bounded fallback, report loading after the scene is ready and connect rewarded/commercial breaks to the existing Ads service. The editor exposes the channel choice; standalone keeps its original resource policy. Game logic still reports gameplay transitions explicitly, and official Inspector/device acceptance remains pending.+- **Playable scenarios run in headless Chromium and save bound evidence.** A CLI replays declared canvas clicks and host callbacks, records trusted pointers and user activation, checks hidden input and animation, and fails on unexpected requests, page errors, event mismatches, lost history or changed inputs. Reports and screenshots retain delivery/scenario/tool hashes and pending acceptance; eight network mocks run on the example in CI using that commit's Web runtime. No local editor or browser window is opened.## [0.82.0] - 2026-10-14diff --git a/desktop b/desktopindex 94859b0ca..8820a435b 160000--- a/desktop+++ b/desktop@@ -1 +1 @@-Subproject commit 94859b0cae9cb32eba3a0ee2cc838c0b568b8e38+Subproject commit 8820a435b7b61c4a8dd5ea48bd8c71525fa0eaa1diff --git a/docs/astro/src/content/docs/publishing/ads-sharing.mdx b/docs/astro/src/content/docs/publishing/ads-sharing.mdxindex f1f342d96..8baf779d4 100644--- a/docs/astro/src/content/docs/publishing/ads-sharing.mdx+++ b/docs/astro/src/content/docs/publishing/ads-sharing.mdx@@ -308,3 +308,28 @@ resolving is the cue to go and ask it.There is no local stand-in in play mode, for the same reason sign-in has none —a rehearsed purchase that charges nothing and grants nothing rehearses only thedialog, and the part that goes wrong is behind it.+++## Poki Web exports++In Project Settings → Packaging → Web, select **Poki**. The same choice can be+saved in `packaging.platforms.web.channel` as `"poki"`, including a named Web+export profile. Standalone is the default.++The page loads the official Poki SDK in its head. Boot initializes it before+project scripts and reports `gameLoadingFinished` after scene and asset loading.+Initialization failure continues the game with ads unavailable. A pending SDK+initialization is bounded to ten seconds; this does not bound script downloads.++Use the existing `Ads` resource for rewarded and commercial breaks. Poki ignores+the ad unit identifier: its SDK selects the placement. Grant rewards only when+`completed` is true. The service pauses simulation and suspends audio while the+break is pending, and rejects concurrent breaks without queuing them.++Game logic must call the official `PokiSDK.gameplayStart()` and+`PokiSDK.gameplayStop()` at actual play/pause/end transitions. The exporter does+not infer gameplay from page loading or arbitrary input. These events, no-fill+and successful ad behavior, and audio/input restoration require testing in the+[Poki Inspector](https://developers.poki.com/guide/sdk-html5). A Web export is not+platform approval. The channel page permits HTTPS resources/frames for the+SDK-managed ads; standalone retains its same-origin policy.diff --git a/docs/astro/src/content/docs/zh-cn/publishing/ads-sharing.mdx b/docs/astro/src/content/docs/zh-cn/publishing/ads-sharing.mdxindex 96cba22b3..398bb7289 100644--- a/docs/astro/src/content/docs/zh-cn/publishing/ads-sharing.mdx+++ b/docs/astro/src/content/docs/zh-cn/publishing/ads-sharing.mdx@@ -274,3 +274,25 @@ resolve 只是「去问服务器」的信号。Play 模式里没有本地替身,理由和登录那节一样——一次不扣钱也不发货的排练,排练的只有那个弹窗,而真正会出问题的是弹窗后面。+++## Poki Web 导出++在项目设置 → 打包 → Web 中选择 **Poki**,或设置+`packaging.platforms.web.channel` 为 `"poki"`;命名的 Web 导出配置也可以+保存此设置。默认仍为独立发行。++页面在 head 加载官方 SDK,启动时在项目脚本之前初始化,并在场景与资源+加载完成后发送 `gameLoadingFinished`。初始化失败时继续运行游戏,广告+不可用;SDK 初始化等待上限为十秒,该上限不包含脚本下载时间。++奖励广告与插屏继续使用 `Ads` 资源。Poki 由 SDK 选择广告位置,因此忽略+广告单元 ID。只在 `completed` 为 true 时发放奖励。服务在广告请求期间+暂停模拟、挂起音频,重叠请求直接拒绝且不排队。++游戏逻辑应在实际开始、暂停、结束时调用官方+`PokiSDK.gameplayStart()` / `PokiSDK.gameplayStop()`。导出器不把页面加载或+任意输入推断为 gameplay 开始。事件顺序、无填充/成功广告、音频与输入+恢复仍需在 [Poki Inspector](https://developers.poki.com/guide/sdk-html5)+验证,成功导出不代表平台验收。渠道页面为 SDK 管理的广告允许 HTTPS+资源和 iframe;独立发行继续使用同源资源策略。diff --git a/pipeline/src/export/exportGame.ts b/pipeline/src/export/exportGame.tsindex b64ae6678..d2c5c2aa6 100644--- a/pipeline/src/export/exportGame.ts+++ b/pipeline/src/export/exportGame.ts@@ -338,7 +338,7 @@ function externalEngineImports(metafile: { outputs: Record<string, { imports?: {* for desktop (the Electron shell sizes its own window). */function indexHtml(title: string, map: EngineImportMap, look: SplashLook, orientation?: ScreenOrientation,- debugChannel?: DebugChannelConfig,+ debugChannel?: DebugChannelConfig, webChannel?: 'poki',): string {// The editor a development build dials is the one address beyond 'self' the// page may connect to; a build without a channel lists none.@@ -347,16 +347,22 @@ function indexHtml(const inlineScripts = [map.cspHash, ...(orientation ? [orientationLockCspHash(orientation)] : [])].map((h) => `'${h}'`).join(' ');+ // Poki owns third-party ad frames, scripts and requests; its host policy is+ // incompatible with the standalone page's same-origin resource restriction.+ const channelPolicy = webChannel === 'poki'+ ? `default-src 'self' data: blob: https:; script-src 'self' 'unsafe-eval' blob: https: ${inlineScripts}; style-src 'self' 'unsafe-inline' https:; img-src 'self' data: blob: https:; connect-src 'self' data: blob: https:${connect}; frame-src https:; media-src 'self' data: blob: https:; worker-src 'self' blob:;`+ : `default-src 'self'; script-src 'self' 'unsafe-eval' blob: ${inlineScripts}; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob:; connect-src 'self' data: blob:${connect}; worker-src 'self' blob:;`;return `<!doctype html><html lang="en"><head><meta charset="UTF-8" /><metahttp-equiv="Content-Security-Policy"- content="default-src 'self'; script-src 'self' 'unsafe-eval' blob: ${inlineScripts}; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob:; connect-src 'self' data: blob:${connect}; worker-src 'self' blob:;"+ content="${channelPolicy}"/><meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" /><title>${title}</title>+ ${webChannel === 'poki' ? '<script src="https://game-cdn.poki.com/scripts/v2/poki-sdk.js"></script>' : ''}<script type="importmap">${map.json}</script><style>* { margin: 0; padding: 0; box-sizing: border-box; }@@ -470,6 +476,8 @@ export interface ExportGameOptions {packagesDir: string;/** Project-relative startup entry (e.g. src/main.ts) → bundled to scripts.mjs. */scriptsEntry?: string;+ /** Browser distribution channel; standalone leaves the original Web policy intact. */+ webChannel?: 'poki';sdkDistDir: string;/** The engine runtime to copy. */wasmDir: string;@@ -1162,13 +1170,14 @@ async function produceExport(opts: ExportGameOptions): Promise<ExportGameResult>splashBytes = Buffer.byteLength(splashCss(look.background ?? PAGE_BACKGROUND) + splashHtml(title, look));await writeFile(path.join(payloadDir, 'index.html'),- indexHtml(title, engineMap, look, platform === 'web' ? orientation : undefined, debugChannel),+ indexHtml(title, engineMap, look, platform === 'web' ? orientation : undefined, debugChannel, platform === 'web' ? opts.webChannel : undefined),);}// Typed against the SDK's contract, so a field the runtimes read can never be// spelled differently here — the two sides share one declaration.const gameConfig: PackagedGameConfig = {entryScene: opts.entryScene, scenes,+ ...(platform === 'web' && opts.webChannel ? { webChannel: opts.webChannel } : {}),...(scriptsFile ? { scripts: scriptsFile } : {}),...packagedRuntimeFields(runtime),...(hotUpdate ? { hotUpdate } : {}),diff --git a/pipeline/src/export/projectExportOptions.ts b/pipeline/src/export/projectExportOptions.tsindex 2b0aa8cab..7b16947e2 100644--- a/pipeline/src/export/projectExportOptions.ts+++ b/pipeline/src/export/projectExportOptions.ts@@ -106,6 +106,7 @@ export async function projectExportOptions(...(platform === 'android' && plat?.android?.releaseKey? { androidKey: () => androidReleaseKey(root, plat.android!.releaseKey!, secrets.androidKeyPassphrase) }: {}),+ ...(platform === 'web' && plat?.web?.channel === 'poki' ? { webChannel: 'poki' as const } : {}),desktopProductName: plat?.desktop?.productName,desktopChannel: plat?.desktop?.channel,steam: plat?.desktop?.steam,diff --git a/pipeline/src/project/format.ts b/pipeline/src/project/format.tsindex 5556fc39b..e8d19e97a 100644--- a/pipeline/src/project/format.ts+++ b/pipeline/src/project/format.ts@@ -409,6 +409,7 @@ export interface ProjectPackaging {/** Per-platform packaging config: each target's slice of the app identity, plus* whatever only it has (a WeChat appid, an Android versionCode). */platforms?: {+ web?: { channel?: 'standalone' | 'poki' };wechat?: WeChatPackaging;douyin?: MiniGamePackaging;bilibili?: MiniGamePackaging;@@ -908,6 +909,13 @@ export function parseManifest(raw: unknown): ProjectManifest {if (p.platforms && typeof p.platforms === 'object') {const pl = p.platforms as Record<string, unknown>;const platforms: NonNullable<ProjectPackaging['platforms']> = {};+ const web = pl.web as Record<string, unknown> | undefined;+ if (web && typeof web === 'object') {+ if (web.channel !== undefined && web.channel !== 'standalone' && web.channel !== 'poki') {+ throw new Error('packaging.platforms.web.channel must be standalone or poki');+ }+ if (web.channel) platforms.web = { channel: web.channel as 'standalone' | 'poki' };+ }const wx = pl.wechat as Record<string, unknown> | undefined;if (wx && typeof wx === 'object') {const w: WeChatPackaging = {};diff --git a/pipeline/src/runtime/gameHost.ts b/pipeline/src/runtime/gameHost.tsindex 098c78df0..dfdee6e67 100644--- a/pipeline/src/runtime/gameHost.ts+++ b/pipeline/src/runtime/gameHost.ts@@ -12,7 +12,7 @@* (shared with the play realm's import-map work).*/import {- createWebApp, setEditorMode, setPlayMode, Assets,+ createWebApp, setEditorMode, setPlayMode, Assets, Ads,indexPackagedManifest, createPackagedAssetSource, applyAssetRefResolvers, initRuntime,HttpBackend, fetchDecodePixels, registerPackagedSideModules,packagedAppOptions, packagedRuntimeInit, Transform, SceneManager, UINode,@@ -60,6 +60,7 @@ import type {import type { ESEngineModule } from 'esengine/wasm';import { attachSplash, type Splash } from '../export/splash';import { countedStream, engineDownloadTotal } from './engineDownload';+import { initializePoki, type PokiSdk } from './pokiProfile';/*** Fetch the engine binary through a stream we can count, and hand the SAME@@ -106,6 +107,9 @@ async function boot(): Promise<void> {const cfg = (await (await fetch('./game.config.json')).json()) as PackagedGameConfig;splash?.reach('config');+ const poki = cfg.webChannel === 'poki'+ ? await initializePoki((window as unknown as { PokiSDK?: PokiSdk }).PokiSDK, (message, error) => console.warn(message, error))+ : null;// Before the engine boots, so a boot that fails is still heard by the editor.if (cfg.debugChannel) startDebugChannel(cfg.debugChannel);@@ -202,6 +206,7 @@ async function boot(): Promise<void> {getViewportSize: () => ({ width: canvas.width, height: canvas.height }),wasmBaseUrl: wasmBase.replace(/\/$/, ''), // SDK appends "/<file>" — no trailing slash});+ if (poki?.provider) app.getResource(Ads)?.setProvider(poki.provider);splash?.reach('app');setEditorMode(false);setPlayMode(true);@@ -890,6 +895,7 @@ async function boot(): Promise<void> {// Everything the config APPLIES to a live app: physics, the mixer, the theme....packagedRuntimeInit(cfg),});+ poki?.loaded();splash?.reach('assets');// Before run(), not after: run() may hand control to the emscripten loop and// never return, and the fade is what the first frames should arrive through.diff --git a/pipeline/src/runtime/pokiProfile.ts b/pipeline/src/runtime/pokiProfile.tsnew file mode 100644index 000000000..88678cee3--- /dev/null+++ b/pipeline/src/runtime/pokiProfile.ts@@ -0,0 +1,58 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+import type { AdProvider } from 'esengine';++/** Structural subset of the official HTML5 SDK; loaded by the host page. */+export interface PokiSdk {+ init(): Promise<void>;+ gameLoadingFinished(): void;+ rewardedBreak(): Promise<boolean>;+ commercialBreak(): Promise<void>;+}++/** Ad units use the existing Ads service for pause/audio and overlap protection. */+export function pokiAdProvider(sdk: PokiSdk): AdProvider {+ const unit = <T>(show: () => Promise<T>) => {+ let destroyed = false;+ return {+ preload: async () => { if (destroyed) throw new Error('Poki ad unit destroyed'); },+ show: () => destroyed ? Promise.reject(new Error('Poki ad unit destroyed')) : show(),+ destroy: () => { destroyed = true; },+ };+ };+ return {+ createRewardedAd: () => unit(async () => ({ completed: (await sdk.rewardedBreak()) === true })),+ createInterstitialAd: () => unit(() => sdk.commercialBreak()),+ };+}++/** SDK failure never prevents the game loading, as required by Poki. */+export async function initializePoki(+ sdk: PokiSdk | undefined,+ warn: (message: string, error?: unknown) => void,+ timeoutMs = 10000,+): Promise<{ provider: AdProvider | null; loaded(): void }> {+ let initialized = false;+ let timer: ReturnType<typeof setTimeout> | undefined;+ if (!sdk) warn('[Poki] SDK unavailable; continuing without ads');+ else {+ try {+ await Promise.race([+ sdk.init(),+ new Promise<never>((_, reject) => { timer = setTimeout(() => reject(new Error('Poki SDK initialization timed out')), timeoutMs); }),+ ]);+ initialized = true;+ } catch (error) { warn('[Poki] SDK initialization failed; continuing without ads', error); }+ finally { if (timer !== undefined) clearTimeout(timer); }+ }+ let loaded = false;+ return {+ provider: initialized && sdk ? pokiAdProvider(sdk) : null,+ loaded() {+ if (loaded || !sdk) return;+ loaded = true;+ try { sdk.gameLoadingFinished(); }+ catch (error) { warn('[Poki] loading notification failed', error); }+ },+ };+}diff --git a/pipeline/tests/export-splash.test.ts b/pipeline/tests/export-splash.test.tsindex 5749942b9..ef33aca36 100644--- a/pipeline/tests/export-splash.test.ts+++ b/pipeline/tests/export-splash.test.ts@@ -50,7 +50,7 @@ beforeAll(() => {afterAll(() => rmSync(root, { recursive: true, force: true, maxRetries: 10, retryDelay: 50 }));/** Export for web and hand back the page plus whatever the build said about it. */-async function page(splash?: ProjectPackaging['splash']): Promise<{ html: string; warnings: string[]; splashBytes?: number }> {+async function page(splash?: ProjectPackaging['splash'], webChannel?: 'poki'): Promise<{ html: string; warnings: string[]; splashBytes?: number }> {const outDir = path.join(root, `dist-${Math.random().toString(36).slice(2)}`);const res = await exportGame({root,@@ -60,7 +60,7 @@ async function page(splash?: ProjectPackaging['splash']): Promise<{ html: stringwasmDir: path.join(root, '_wasm'),outDir,title: 'My Game',- platform: 'web',+ platform: 'web', webChannel,runtime: runtimeConfigOf({ designResolution: { width: 800, height: 600 } }),splash,});@@ -127,3 +127,22 @@ describe('the exported page’s start screen', () => {expect(html).toContain('#102030');}, 180_000);});+++describe('Poki host page', () => {+ it('loads the official SDK in the head before the game, with its channel policy', async () => {+ const { html } = await page(undefined, 'poki');+ const script = '<script src="https://game-cdn.poki.com/scripts/v2/poki-sdk.js"></script>';+ expect(html.indexOf(script)).toBeGreaterThan(html.indexOf('<head>'));+ expect(html.indexOf(script)).toBeLessThan(html.indexOf('</head>'));+ expect(html.indexOf(script)).toBeLessThan(html.indexOf('src="./game.js"'));+ expect(html).toContain('frame-src https:');+ expect(html).toContain("script-src 'self' 'unsafe-eval' blob: https:");+ });+ it('keeps standalone exports free of SDK injection and broad HTTPS policy', async () => {+ const { html } = await page();+ expect(html).not.toContain('poki-sdk');+ expect(html).not.toContain('frame-src https:');+ expect(html).toContain("default-src 'self';");+ });+});diff --git a/pipeline/tests/poki-profile.test.ts b/pipeline/tests/poki-profile.test.tsnew file mode 100644index 000000000..2dae72d52--- /dev/null+++ b/pipeline/tests/poki-profile.test.ts@@ -0,0 +1,76 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+import { describe, it, expect, vi } from 'vitest';+import { initializePoki, pokiAdProvider, type PokiSdk } from '../src/runtime/pokiProfile';+import { parseManifest } from '../src/project/format';+import { projectExportOptions, withExportProfile } from '../src/export/projectExportOptions';++const sdkOf = (): PokiSdk => ({ init: vi.fn(async () => {}), gameLoadingFinished: vi.fn(), rewardedBreak: vi.fn(async () => true), commercialBreak: vi.fn(async () => {}) });++describe('Poki Web channel', () => {+ it('preserves channel settings and named profile overrides for Web only', async () => {+ const manifest = parseManifest({ name: 'Game', packaging: { platforms: { web: { channel: 'poki' } }, profiles: { local: { platform: 'web', platforms: { web: { channel: 'standalone' } } } } } });+ expect((await projectExportOptions(process.cwd(), manifest, 'web')).webChannel).toBe('poki');+ expect((await projectExportOptions(process.cwd(), manifest, 'desktop')).webChannel).toBeUndefined();+ expect((await projectExportOptions(process.cwd(), manifest, 'web', 'local')).webChannel).toBeUndefined();+ expect(withExportProfile(manifest, 'local').packaging?.platforms?.web?.channel).toBe('standalone');+ });+ it('rejects misspelled channels rather than silently exporting standalone', () => {+ expect(() => parseManifest({ name: 'Game', packaging: { platforms: { web: { channel: 'pokki' } } } })).toThrow('web.channel');+ });+ it('initializes once and sends loading finished once, only when the caller is ready', async () => {+ const sdk = sdkOf(); const warn = vi.fn();+ const session = await initializePoki(sdk, warn);+ expect(sdk.init).toHaveBeenCalledTimes(1);+ expect(sdk.gameLoadingFinished).not.toHaveBeenCalled();+ expect(session.provider).not.toBeNull();+ session.loaded(); session.loaded();+ expect(sdk.gameLoadingFinished).toHaveBeenCalledTimes(1);+ expect(warn).not.toHaveBeenCalled();+ });+ it('continues after blocked initialization without exposing an ad source', async () => {+ const sdk = sdkOf(); sdk.init = async () => { throw new Error('blocked'); };+ const warn = vi.fn(); const session = await initializePoki(sdk, warn);+ expect(session.provider).toBeNull(); session.loaded();+ expect(warn).toHaveBeenCalledTimes(1);+ expect(sdk.gameLoadingFinished).toHaveBeenCalledTimes(1);+ });+ it('continues when the SDK script is missing', async () => {+ const warn = vi.fn(); const session = await initializePoki(undefined, warn);+ expect(session.provider).toBeNull(); expect(warn).toHaveBeenCalledTimes(1);+ session.loaded();+ });+ it('bounds hanging initialization and ignores later resolution', async () => {+ vi.useFakeTimers();+ try {+ const sdk = sdkOf(); let done!: () => void;+ sdk.init = () => new Promise<void>((resolve) => { done = resolve; });+ const warn = vi.fn(); const pending = initializePoki(sdk, warn, 50);+ await vi.advanceTimersByTimeAsync(51);+ const session = await pending;+ expect(session.provider).toBeNull(); done(); await Promise.resolve();+ expect(session.provider).toBeNull(); expect(warn).toHaveBeenCalledTimes(1);+ } finally { vi.useRealTimers(); }+ });+ it('keeps a loading notification error from stopping gameplay boot', async () => {+ const sdk = sdkOf(); sdk.gameLoadingFinished = () => { throw new Error('notification'); };+ const warn = vi.fn(); const session = await initializePoki(sdk, warn);+ expect(() => session.loaded()).not.toThrow(); expect(warn).toHaveBeenCalledTimes(1);+ });+ it('maps rewarded success and abandoned/no-fill results without inventing rewards', async () => {+ const sdk = sdkOf(); const provider = pokiAdProvider(sdk);+ expect(await provider.createRewardedAd('unused').show()).toEqual({ completed: true });+ sdk.rewardedBreak = async () => false;+ expect(await provider.createRewardedAd('unused').show()).toEqual({ completed: false });+ sdk.rewardedBreak = async () => { throw new Error('no fill'); };+ await expect(provider.createRewardedAd('unused').show()).rejects.toThrow('no fill');+ });+ it('retains the commercial promise until closing and rejects destroyed units', async () => {+ const sdk = sdkOf(); let close!: () => void;+ sdk.commercialBreak = () => new Promise<void>((resolve) => { close = resolve; });+ const ad = pokiAdProvider(sdk).createInterstitialAd('unused');+ let settled = false; const showing = ad.show().then(() => { settled = true; });+ await Promise.resolve(); expect(settled).toBe(false); close(); await showing;+ ad.destroy(); await expect(ad.show()).rejects.toThrow('destroyed'); await expect(ad.preload()).rejects.toThrow('destroyed');+ });+});diff --git a/sdk/etc/index.api.md b/sdk/etc/index.api.mdindex 6ab09968d..56083c4e0 100644--- a/sdk/etc/index.api.md+++ b/sdk/etc/index.api.md@@ -5562,6 +5562,7 @@ sideModules: { id: string; file: string; globalName?: string; }[] | undefinedsteamAppId: number | undefineduiTheme: "light" | undefineduiThemeColors: Record<string, string> | undefined+webChannel: "poki" | undefinedworlds: { scene: string; manifest: string; }[] | undefinedySortLayers: number | undefined```diff --git a/sdk/etc/index.native.api.md b/sdk/etc/index.native.api.mdindex b78d6933b..40b5b5ec7 100644--- a/sdk/etc/index.native.api.md+++ b/sdk/etc/index.native.api.md@@ -5765,6 +5765,7 @@ sideModules: { id: string; file: string; globalName?: string; }[] | undefinedsteamAppId: number | undefineduiTheme: "light" | undefineduiThemeColors: Record<string, string> | undefined+webChannel: "poki" | undefinedworlds: { scene: string; manifest: string; }[] | undefinedySortLayers: number | undefined```diff --git a/sdk/etc/index.node.api.md b/sdk/etc/index.node.api.mdindex 0115504b6..6b9c9dd12 100644--- a/sdk/etc/index.node.api.md+++ b/sdk/etc/index.node.api.md@@ -5557,6 +5557,7 @@ sideModules: { id: string; file: string; globalName?: string; }[] | undefinedsteamAppId: number | undefineduiTheme: "light" | undefineduiThemeColors: Record<string, string> | undefined+webChannel: "poki" | undefinedworlds: { scene: string; manifest: string; }[] | undefinedySortLayers: number | undefined```diff --git a/sdk/etc/minigame.api.md b/sdk/etc/minigame.api.mdindex 1f39a1a89..48329769a 100644--- a/sdk/etc/minigame.api.md+++ b/sdk/etc/minigame.api.md@@ -5850,6 +5850,7 @@ sideModules: { id: string; file: string; globalName?: string; }[] | undefinedsteamAppId: number | undefineduiTheme: "light" | undefineduiThemeColors: Record<string, string> | undefined+webChannel: "poki" | undefinedworlds: { scene: string; manifest: string; }[] | undefinedySortLayers: number | undefined```diff --git a/sdk/etc/wechat.api.md b/sdk/etc/wechat.api.mdindex 417538571..5facc1e8d 100644--- a/sdk/etc/wechat.api.md+++ b/sdk/etc/wechat.api.md@@ -5564,6 +5564,7 @@ sideModules: { id: string; file: string; globalName?: string; }[] | undefinedsteamAppId: number | undefineduiTheme: "light" | undefineduiThemeColors: Record<string, string> | undefined+webChannel: "poki" | undefinedworlds: { scene: string; manifest: string; }[] | undefinedySortLayers: number | undefined```diff --git a/sdk/src/runtime/packagedRuntime.ts b/sdk/src/runtime/packagedRuntime.tsindex b5e367aea..42cc20fef 100644--- a/sdk/src/runtime/packagedRuntime.ts+++ b/sdk/src/runtime/packagedRuntime.ts@@ -37,6 +37,8 @@ import type { AotManifest } from '../ecs/aot/AotSystems';* One declaration so the two sides cannot drift.*/export interface PackagedGameConfig {+ /** External Web distribution SDK selected by this export. */+ webChannel?: 'poki';/** Project-relative path of the scene the game boots into. */entryScene: string;/** Every switchable scene (SceneManager name + cooked path); includes the entry. */diff --git a/tools/releaseNotes.mjs b/tools/releaseNotes.mjsindex fdf01b1d6..ba886efae 100644--- a/tools/releaseNotes.mjs+++ b/tools/releaseNotes.mjs@@ -28,6 +28,10 @@ export const NOTES_FLOOR = 'v0.65.0';* the reader recognises anyway.*/export const NOTED = {+ 'feat(web): connect Poki channel exports to ads services':+ { note: 'Web exports can select the Poki channel.' },+ 'feat(editor): expose Poki Web distribution channel':+ { note: 'Web exports can select the Poki channel.' },'fix(ads): reject overlapping advertising requests':{ note: 'Advertising requests preserve a single active break.' },