Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions compose/api/compose.klib.api
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ final class app.tinyui/BuildManifest { // app.tinyui/BuildManifest|null[0]
final fun <get-files>(): kotlin.collections/Map<kotlin/String, kotlin/String> // app.tinyui/BuildManifest.files.<get-files>|<get-files>(){}[0]
final val hashes // app.tinyui/BuildManifest.hashes|{}hashes[0]
final fun <get-hashes>(): kotlin.collections/Map<kotlin/String, kotlin/String> // app.tinyui/BuildManifest.hashes.<get-hashes>|<get-hashes>(){}[0]
final val hostVersion // app.tinyui/BuildManifest.hostVersion|{}hostVersion[0]
final fun <get-hostVersion>(): kotlin/String? // app.tinyui/BuildManifest.hostVersion.<get-hostVersion>|<get-hostVersion>(){}[0]
final val name // app.tinyui/BuildManifest.name|{}name[0]
final fun <get-name>(): kotlin/String // app.tinyui/BuildManifest.name.<get-name>|<get-name>(){}[0]
final val pages // app.tinyui/BuildManifest.pages|{}pages[0]
Expand All @@ -257,8 +259,6 @@ final class app.tinyui/BuildManifest { // app.tinyui/BuildManifest|null[0]
final fun <get-publicKey>(): kotlin/String // app.tinyui/BuildManifest.publicKey.<get-publicKey>|<get-publicKey>(){}[0]
final val runtime // app.tinyui/BuildManifest.runtime|{}runtime[0]
final fun <get-runtime>(): kotlin.collections/List<kotlin/String> // app.tinyui/BuildManifest.runtime.<get-runtime>|<get-runtime>(){}[0]
final val runtimeVersion // app.tinyui/BuildManifest.runtimeVersion|{}runtimeVersion[0]
final fun <get-runtimeVersion>(): kotlin/String? // app.tinyui/BuildManifest.runtimeVersion.<get-runtimeVersion>|<get-runtimeVersion>(){}[0]
final val version // app.tinyui/BuildManifest.version|{}version[0]
final fun <get-version>(): kotlin/String // app.tinyui/BuildManifest.version.<get-version>|<get-version>(){}[0]

Expand Down
4 changes: 2 additions & 2 deletions compose/src/commonMain/kotlin/app/tinyui/BuildManifest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class BuildManifest(
val protocol: Int,
val hashes: Map<String, String>,
/** Present only in a manifest `tinyui bundle` wrote: the embedded package has none. */
val runtimeVersion: String? = null,
val hostVersion: String? = null,
) {
fun buildId(module: String): String = buildIds[module] ?: ""

Expand Down Expand Up @@ -51,7 +51,7 @@ class BuildManifest(
engine = string("engine"),
protocol = root["protocol"]?.jsonPrimitive?.intOrNull ?: 0,
hashes = strings("hashes"),
runtimeVersion = root["runtimeVersion"]?.jsonPrimitive?.contentOrNull,
hostVersion = root["hostVersion"]?.jsonPrimitive?.contentOrNull,
)
}
}
Expand Down
10 changes: 5 additions & 5 deletions compose/src/commonTest/kotlin/app/tinyui/BundleTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class BundleTest {
assertEquals("shop", bundle.name)
assertEquals("20260922T090000Z-3f2a1c", bundle.manifest.version)
assertEquals(1, bundle.manifest.protocol)
assertNull(bundle.manifest.runtimeVersion, "an embedded manifest has no runtimeVersion")
assertNull(bundle.manifest.hostVersion, "an embedded manifest has no hostVersion")
val page = bundle.page("shop/home")
assertEquals("shop/home", page.module.name)
assertEquals("HOME", page.module.bytecode.decodeToString())
Expand Down Expand Up @@ -93,12 +93,12 @@ class BundleTest {
@Test
fun manifestWithoutPackageIdentityIsRejected() {
assertFailsWith<IllegalArgumentException> { BuildManifest.parse("""{"runtime":[],"pages":[],"files":{},"buildIds":{}}""") }
val bundled = BuildManifest.parse(manifest.removeSuffix("}") + ""","runtimeVersion":"1"}""")
assertEquals("1", bundled.runtimeVersion)
val bundled = BuildManifest.parse(manifest.removeSuffix("}") + ""","hostVersion":"1"}""")
assertEquals("1", bundled.hostVersion)
assertFailsWith<IllegalArgumentException>("a JSON null is not an identity") {
BuildManifest.parse("""{"runtime":[],"pages":[],"files":{},"buildIds":{},"name":null,"publicKey":null}""")
}
val nulls = BuildManifest.parse(manifest.removeSuffix("}") + ""","runtimeVersion":null}""")
assertNull(nulls.runtimeVersion)
val nulls = BuildManifest.parse(manifest.removeSuffix("}") + ""","hostVersion":null}""")
assertNull(nulls.hostVersion)
}
}
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ JS 桥 Kotlin
| [ADR-003](./adr-003-kotlin-node-tree-and-registry.md) | Kotlin 侧节点表与组件注册 | 已定(2026-09-15) | 节点即重组单元;JS 线程直接写快照状态、主线程只重组;App 级注册表 + 清单下发;prop / event schema 写入时转换 |
| [ADR-004](./adr-004-events-and-input-ownership.md) | 事件与输入状态归属 | 已定(2026-09-15) | 事件三分(离散 / 流式输入 / 连续),60 fps 状态留 Kotlin;新增 `x` 命令 op(ref + cmd);文本框 initial prop + 命令 + 事件,不受控回写 |
| [ADR-005](./adr-005-engine.md) | JS 引擎选型 | 已定(2026-09-15) | MicroQuickJS → QuickJS(ES2025,经 quickjs-kmp);原生 ESM 必选;不降级 ES5;热下发不在本期(2026-09-18 起见 ADR-006) |
| [ADR-006](./adr-006-hot-updates.md) | 热下发 | 已定(2026-09-18,2026-09-19 补服务端与签名、改多包模型) | App 由 N≥1 个包组成,包名进模块名与 URL,各包独立发布回退;整包原子、下次启动生效;宿主 `runtimeVersion` 为兼容键;内置包是地板,下发页失败即回退并拉黑;`tinyui-updates` 独立 artifact 不做网络 / 调度 / UI;投递两次 GET、发布 PUT;manifest 签名 ECDSA P-256,密钥按包、公钥随包进 manifest;服务端 `tinyui-updates-server` 独立开源仓、CF 为主可私有化,托管 `updates.tinyui.app`;契约见 [updates.md](./updates.md),实施计划见 [updates-plan.md](./updates-plan.md) |
| [ADR-006](./adr-006-hot-updates.md) | 热下发 | 已定(2026-09-18,2026-09-19 补服务端与签名、改多包模型) | App 由 N≥1 个包组成,包名进模块名与 URL,各包独立发布回退;整包原子、下次启动生效;宿主 `hostVersion` 为兼容键;内置包是地板,下发页失败即回退并拉黑;`tinyui-updates` 独立 artifact 不做网络 / 调度 / UI;投递两次 GET、发布 PUT;manifest 签名 ECDSA P-256,密钥按包、公钥随包进 manifest;服务端 `tinyui-updates-server` 独立开源仓、CF 为主可私有化,托管 `updates.tinyui.app`;契约见 [updates.md](./updates.md),实施计划见 [updates-plan.md](./updates-plan.md) |

## 命名

Expand Down
Loading
Loading