@native-sdk/cli 0.9.5 → 0.10.0

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 (47) hide show
  1. package/build/app.zig +7 -0
  2. package/build/ts_run.mjs +1 -1
  3. package/build.zig +8 -1
  4. package/package.json +10 -10
  5. package/packages/core/package-lock.json +12 -11
  6. package/packages/core/package.json +2 -2
  7. package/packages/core/scripts/compiler_command.mjs +1 -1
  8. package/schemas/app.schema.json +12 -1
  9. package/skill-data/ts-services/references/service-surface.md +1 -1
  10. package/src/app_runner/root.zig +25 -0
  11. package/src/platform/macos/appkit_host.h +25 -0
  12. package/src/platform/macos/appkit_host.m +537 -15
  13. package/src/platform/macos/cef_host.mm +17 -0
  14. package/src/platform/macos/root.zig +95 -0
  15. package/src/platform/root.zig +3 -0
  16. package/src/platform/types.zig +15 -0
  17. package/src/primitives/app_manifest/tests.zig +19 -0
  18. package/src/primitives/app_manifest/validation.zig +14 -2
  19. package/src/primitives/canvas/font_ttf.zig +24 -0
  20. package/src/primitives/canvas/gpu.zig +5 -0
  21. package/src/primitives/canvas/reference.zig +4 -1
  22. package/src/primitives/canvas/render_tests.zig +1 -1
  23. package/src/primitives/canvas/root.zig +1 -0
  24. package/src/primitives/canvas/serialization.zig +1 -0
  25. package/src/primitives/canvas/test_support.zig +1 -0
  26. package/src/primitives/canvas/text.zig +1 -0
  27. package/src/primitives/canvas/text_layout.zig +84 -15
  28. package/src/primitives/canvas/text_layout_hash.zig +3 -1
  29. package/src/primitives/canvas/text_layout_types.zig +3 -0
  30. package/src/primitives/canvas/text_metrics.zig +28 -1
  31. package/src/primitives/canvas/text_tests.zig +61 -6
  32. package/src/primitives/canvas/widget_render.zig +6 -0
  33. package/src/primitives/canvas/widget_render_controls.zig +1 -0
  34. package/src/root.zig +2 -0
  35. package/src/runtime/canvas_fonts.zig +87 -0
  36. package/src/runtime/core.zig +1 -0
  37. package/src/runtime/flow.zig +7 -0
  38. package/src/runtime/native_command_event_tests.zig +58 -0
  39. package/src/tooling/manifest.zig +79 -2
  40. package/src/tooling/package.zig +33 -0
  41. package/src/tooling/raw_manifest.zig +7 -0
  42. package/src/tooling/root.zig +1 -0
  43. package/src/tooling/templates.zig +45 -0
  44. package/src/tooling/update.zig +576 -0
  45. package/src/updater/c_api.zig +123 -0
  46. package/src/updater/feed.zig +215 -0
  47. package/src/updater/root.zig +10 -0
package/build/app.zig CHANGED
@@ -1742,6 +1742,9 @@ pub fn addAppArtifacts(b: *std.Build, dep: *std.Build.Dependency, app_options: A
1742
1742
  @panic("-Dplatform=windows requires a Windows target");
1743
1743
  }
1744
1744
  const web_engine = web_engine_override orelse app_config.web_engine;
1745
+ if (app_config.updates_enabled and selected_platform == .macos and web_engine == .chromium) {
1746
+ @panic("\nnative updates currently require the system macOS host; use web_engine = \"system\" or remove the updates block\n");
1747
+ }
1745
1748
  const cef_dir = cef_dir_override orelse defaultCefDir(selected_platform, app_config.cef_dir);
1746
1749
  const cef_auto_install = cef_auto_install_override orelse app_config.cef_auto_install;
1747
1750
  if (web_engine == .chromium and selected_platform != .macos) {
@@ -1973,6 +1976,7 @@ pub fn addAppArtifacts(b: *std.Build, dep: *std.Build.Dependency, app_options: A
1973
1976
  // runtime (the generated build graph already forwards them).
1974
1977
  package_run.addArgs(&.{ "--web-engine", @tagName(web_engine), "--cef-dir", cef_dir });
1975
1978
  if (cef_auto_install) package_run.addArg("--cef-auto-install");
1979
+ if (app_config.updates_enabled and host_os == .macos) package_run.addArg("--update-archive");
1976
1980
  package_run.has_side_effects = true;
1977
1981
  const package_step = b.step("package", "Create a distributable package via the native CLI");
1978
1982
  package_step.dependOn(&package_run.step);
@@ -2747,6 +2751,7 @@ const AppManifestBuildConfig = struct {
2747
2751
  credentials_permission: bool = false,
2748
2752
  filesystem_permission: bool = false,
2749
2753
  max_image_pixel_bytes: usize = 1024 * 1024,
2754
+ updates_enabled: bool = false,
2750
2755
  sqlite_capability: bool = false,
2751
2756
  /// The first web declaration found (for teaching messages), or null
2752
2757
  /// when app.zon declares no web use. `web_engine = "system"` alone is
@@ -2786,6 +2791,7 @@ const InferenceManifest = struct {
2786
2791
  service_packages: []const ServicePackageConfig = &.{},
2787
2792
  service_carrier: []const u8 = "auto",
2788
2793
  service_pool_size: u8 = 0,
2794
+ updates: ?struct {} = null,
2789
2795
  shell: struct {
2790
2796
  windows: []const struct {
2791
2797
  views: []const struct {
@@ -2851,6 +2857,7 @@ fn appManifestBuildConfig(b: *std.Build, app_root: []const u8, manifest_name: []
2851
2857
  .credentials_permission = hasManifestPermission(raw.permissions, "credentials"),
2852
2858
  .filesystem_permission = hasManifestPermission(raw.permissions, "filesystem"),
2853
2859
  .max_image_pixel_bytes = raw.images.max_image_pixel_bytes,
2860
+ .updates_enabled = raw.updates != null,
2854
2861
  .sqlite_capability = hasManifestCapability(raw.capabilities, "store") or hasManifestCapability(raw.capabilities, "sqlite"),
2855
2862
  .web_declaration = web_layer_contract.manifestDeclaration(raw),
2856
2863
  };
package/build/ts_run.mjs CHANGED
@@ -13,7 +13,7 @@
13
13
  // relied on: it refuses node_modules-resident .ts by design
14
14
  // (ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING), and outside node_modules
15
15
  // it only became DEFAULT in node 22.18. Hooking everything keeps both layouts
16
- // identical. scriptc 0.0.33 requires Node 24 for its published compile-cache
16
+ // identical. scriptc 0.0.35 requires Node 24 for its published compile-cache
17
17
  // bootstrap, so this shared runner enforces the same floor before importing
18
18
  // any frontend module. Then it imports the requested module with argv
19
19
  // respliced so the target sees its usual shape (its own path at argv[1],
package/build.zig CHANGED
@@ -320,6 +320,7 @@ pub fn build(b: *std.Build) void {
320
320
  const ios_host_mod = module(b, target, optimize, "src/platform/ios/files.zig");
321
321
  const android_host_mod = module(b, target, optimize, "src/platform/android/files.zig");
322
322
  const tooling_mod = module(b, target, optimize, "src/tooling/root.zig");
323
+ const update_feed_mod = module(b, target, optimize, "src/updater/feed.zig");
323
324
  tooling_mod.addImport("assets", assets_mod);
324
325
  tooling_mod.addImport("app_dirs", app_dirs_mod);
325
326
  tooling_mod.addImport("app_manifest", app_manifest_mod);
@@ -331,6 +332,7 @@ pub fn build(b: *std.Build) void {
331
332
  tooling_mod.addImport("ios_host", ios_host_mod);
332
333
  tooling_mod.addImport("android_host", android_host_mod);
333
334
  tooling_mod.addImport("sqlite_engine", module(b, target, optimize, "src/runtime/sqlite_engine.zig"));
335
+ tooling_mod.addImport("update_feed", update_feed_mod);
334
336
  tooling_mod.addIncludePath(b.path("third_party/sqlite"));
335
337
  tooling_mod.addCSourceFile(.{
336
338
  .file = b.path("third_party/sqlite/sqlite3.c"),
@@ -440,6 +442,7 @@ pub fn build(b: *std.Build) void {
440
442
  const host_ios_host_mod = module(b, host_target, optimize, "src/platform/ios/files.zig");
441
443
  const host_android_host_mod = module(b, host_target, optimize, "src/platform/android/files.zig");
442
444
  const host_tooling_mod = module(b, host_target, optimize, "src/tooling/root.zig");
445
+ const host_update_feed_mod = module(b, host_target, optimize, "src/updater/feed.zig");
443
446
  host_tooling_mod.addImport("assets", host_assets_mod);
444
447
  host_tooling_mod.addImport("app_dirs", host_app_dirs_mod);
445
448
  host_tooling_mod.addImport("app_manifest", host_app_manifest_mod);
@@ -451,6 +454,7 @@ pub fn build(b: *std.Build) void {
451
454
  host_tooling_mod.addImport("ios_host", host_ios_host_mod);
452
455
  host_tooling_mod.addImport("android_host", host_android_host_mod);
453
456
  host_tooling_mod.addImport("sqlite_engine", module(b, host_target, optimize, "src/runtime/sqlite_engine.zig"));
457
+ host_tooling_mod.addImport("update_feed", host_update_feed_mod);
454
458
  host_tooling_mod.addIncludePath(b.path("third_party/sqlite"));
455
459
  host_tooling_mod.addCSourceFile(.{
456
460
  .file = b.path("third_party/sqlite/sqlite3.c"),
@@ -1347,8 +1351,11 @@ pub fn build(b: *std.Build) void {
1347
1351
  .{ .path = "src/platform/macos/appkit_host.m", .pattern = "NSMutableParagraphStyle" },
1348
1352
  .{ .path = "src/platform/macos/appkit_host.m", .pattern = "NativeSdkPacketTextLineBreakMode" },
1349
1353
  .{ .path = "src/platform/macos/appkit_host.m", .pattern = "NativeSdkPacketTextAlignment" },
1354
+ .{ .path = "src/platform/macos/appkit_host.m", .pattern = "static BOOL NativeSdkPacketDrawAttributedText(" },
1355
+ .{ .path = "src/platform/macos/appkit_host.m", .pattern = "drawGlyphsForGlyphRange:glyphRange atPoint:" },
1356
+ .{ .path = "src/platform/macos/appkit_host.m", .pattern = "glyphRangeForTextContainer:container" },
1350
1357
  .{ .path = "src/platform/macos/appkit_host.m", .pattern = "NativeSdkPacketNumber(layout[@\"maxWidth\"], 0)" },
1351
- .{ .path = "src/platform/macos/appkit_host.m", .pattern = "[value drawWithRect:NSMakeRect(origin.x, origin.y - size, textWidth, textHeight)" },
1358
+ .{ .path = "src/platform/macos/appkit_host.m", .pattern = "native_sdk_appkit_measure_text_ink(" },
1352
1359
  });
1353
1360
  addFileContainsCheckStep(b, file_contains_checker, test_step, "test-appkit-gpu-packet-font-assets", "Verify AppKit GPU packet text registers bundled font assets", &.{
1354
1361
  .{ .path = "src/platform/macos/appkit_host.m", .pattern = "#import <CoreText/CoreText.h>" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@native-sdk/cli",
3
- "version": "0.9.5",
3
+ "version": "0.10.0",
4
4
  "description": "The Native SDK: the complete toolkit for building native desktop applications — declarative markup, native rendering, WebView surfaces, and OS capabilities",
5
5
  "type": "module",
6
6
  "engines": {
@@ -36,17 +36,17 @@
36
36
  ],
37
37
  "dependencies": {
38
38
  "@typescript/old": "npm:typescript@6.0.3",
39
- "scriptc": "0.0.33"
39
+ "scriptc": "0.0.35"
40
40
  },
41
41
  "optionalDependencies": {
42
- "@native-sdk/cli-darwin-arm64": "0.9.5",
43
- "@native-sdk/cli-darwin-x64": "0.9.5",
44
- "@native-sdk/cli-linux-arm64-gnu": "0.9.5",
45
- "@native-sdk/cli-linux-arm64-musl": "0.9.5",
46
- "@native-sdk/cli-linux-x64-gnu": "0.9.5",
47
- "@native-sdk/cli-linux-x64-musl": "0.9.5",
48
- "@native-sdk/cli-win32-arm64": "0.9.5",
49
- "@native-sdk/cli-win32-x64": "0.9.5"
42
+ "@native-sdk/cli-darwin-arm64": "0.10.0",
43
+ "@native-sdk/cli-darwin-x64": "0.10.0",
44
+ "@native-sdk/cli-linux-arm64-gnu": "0.10.0",
45
+ "@native-sdk/cli-linux-arm64-musl": "0.10.0",
46
+ "@native-sdk/cli-linux-x64-gnu": "0.10.0",
47
+ "@native-sdk/cli-linux-x64-musl": "0.10.0",
48
+ "@native-sdk/cli-win32-arm64": "0.10.0",
49
+ "@native-sdk/cli-win32-x64": "0.10.0"
50
50
  },
51
51
  "repository": {
52
52
  "type": "git",
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@native-sdk/core",
3
- "version": "0.9.5",
3
+ "version": "0.10.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@native-sdk/core",
9
- "version": "0.9.5",
9
+ "version": "0.10.0",
10
10
  "dependencies": {
11
- "scriptc": "0.0.33"
11
+ "scriptc": "0.0.35"
12
12
  },
13
13
  "devDependencies": {
14
14
  "@typescript/old": "npm:typescript@6.0.3"
@@ -18,18 +18,18 @@
18
18
  }
19
19
  },
20
20
  "node_modules/@scriptc/compiler": {
21
- "version": "0.0.33",
22
- "integrity": "sha512-Hkxo+Z0WwY/c/X9jR/EXVqQv4uHxRuVoE7THIdfYOgTbnshqVvW2z8k5womnSu33j4pAV8MCo4vDImgOpoAeUw==",
21
+ "version": "0.0.35",
22
+ "integrity": "sha512-OLTmyGpFPJAAVn0RfRBoXuCjpaTfpBC1wt6XdO/SzqMab/DaRjCIJY9vv5b1VspP6zLZP2WEYWZPgP8vHKAJPg==",
23
23
  "license": "Apache-2.0",
24
24
  "dependencies": {
25
- "@scriptc/runtime": "0.0.33",
25
+ "@scriptc/runtime": "0.0.35",
26
26
  "typescript": "7.0.2",
27
27
  "typescript5": "npm:typescript@5.9.3"
28
28
  }
29
29
  },
30
30
  "node_modules/@scriptc/runtime": {
31
- "version": "0.0.33",
32
- "integrity": "sha512-dvmfPdS/Jz4l7rmvnHk76yC469il+zk317RTnTDzP3iW4PHjOhd+W8ZCDgQZEp1VSsNSBy2EQnh2+8Eyv+uVKA==",
31
+ "version": "0.0.35",
32
+ "integrity": "sha512-kjtKfneGr9YGxx631jOPJ1XVh0X6h5LM+rwQmhF6loI9oA+zW7rlYmoF+VkTXLdkre+bu9LptIIgdxKPdAquPA==",
33
33
  "license": "Apache-2.0"
34
34
  },
35
35
  "node_modules/@typescript/old": {
@@ -347,11 +347,12 @@
347
347
  }
348
348
  },
349
349
  "node_modules/scriptc": {
350
- "version": "0.0.33",
351
- "integrity": "sha512-GzNvPRl41xzPA+E9hifmhACoIWPHxx2gU0BT++2T1CatrkQLvt5QKrjPw+OZzRLQBtOD/xGr3Tt4lT5gV/ganA==",
350
+ "version": "0.0.35",
351
+ "integrity": "sha512-46Td/02HJZNLuosdYDiUSQ+auKwGmQ03+odD6Pg+J7D+eAV7sOYQvjZu9M+3ePyYfL3hFQa6wWiGexV/Bd0r+w==",
352
+ "hasInstallScript": true,
352
353
  "license": "Apache-2.0",
353
354
  "dependencies": {
354
- "@scriptc/compiler": "0.0.33"
355
+ "@scriptc/compiler": "0.0.35"
355
356
  },
356
357
  "bin": {
357
358
  "scriptc": "dist/bootstrap.js"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@native-sdk/core",
3
- "version": "0.9.5",
3
+ "version": "0.10.0",
4
4
  "description": "The TypeScript authoring tier: the app-core subset, its checker and contract frontend, the exact-pinned core compiler dependency, and the SDK module cores import",
5
5
  "repository": {
6
6
  "type": "git",
@@ -39,6 +39,6 @@
39
39
  "@typescript/old": "npm:typescript@6.0.3"
40
40
  },
41
41
  "dependencies": {
42
- "scriptc": "0.0.33"
42
+ "scriptc": "0.0.35"
43
43
  }
44
44
  }
@@ -49,7 +49,7 @@ export function compilerArgv(command, options = {}) {
49
49
  }
50
50
 
51
51
  /// Resolve scriptc through its published package `bin` declaration. This is
52
- /// intentionally not `scriptc/dist/main.js`: 0.0.33's bin points at the Node
52
+ /// intentionally not `scriptc/dist/main.js`: 0.0.35's bin points at the Node
53
53
  /// 24 compile-cache bootstrap, and future package entrypoint changes should
54
54
  /// reach every Native check/build invocation automatically.
55
55
  export function publishedScriptcArgv(origin, options = {}) {
@@ -12,7 +12,7 @@
12
12
  "name": { "type": "string", "minLength": 1, "description": "Short machine-readable app name." },
13
13
  "display_name": { "type": "string", "minLength": 1, "description": "Human-readable app name." },
14
14
  "description": { "type": "string", "minLength": 1, "maxLength": 256 },
15
- "version": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
15
+ "version": { "type": "string", "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$" },
16
16
  "icons": { "$ref": "#/$defs/stringArray" },
17
17
  "platforms": {
18
18
  "type": "array",
@@ -77,6 +77,7 @@
77
77
  "type": "array",
78
78
  "items": { "$ref": "#/$defs/urlScheme" }
79
79
  },
80
+ "updates": { "$ref": "#/$defs/updates" },
80
81
  "dmg": { "$ref": "#/$defs/dmg" }
81
82
  },
82
83
  "$defs": {
@@ -130,6 +131,16 @@
130
131
  "content_hash": { "type": "string", "pattern": "^[0-9a-f]{64}$" }
131
132
  }
132
133
  },
134
+ "updates": {
135
+ "type": "object",
136
+ "additionalProperties": false,
137
+ "required": ["feed_url", "public_key"],
138
+ "properties": {
139
+ "feed_url": { "type": "string", "pattern": "^https://", "maxLength": 4096 },
140
+ "public_key": { "type": "string", "pattern": "^[A-Za-z0-9+/]{43}=$" },
141
+ "check_on_start": { "type": "boolean", "default": false }
142
+ }
143
+ },
133
144
  "bridge": {
134
145
  "type": "object",
135
146
  "additionalProperties": false,
@@ -6,7 +6,7 @@
6
6
  Verify without writing:
7
7
  node packages/core/scripts/gen_service_surface.mjs --check -->
8
8
 
9
- # Service compile surface — scriptc 0.0.33
9
+ # Service compile surface — scriptc 0.0.35
10
10
 
11
11
  What TypeScript under `src/services/` can use, as stated by the pinned
12
12
  compiler itself (surface manifest schema 1, 527 entries:
@@ -95,6 +95,9 @@ pub const RunOptions = struct {
95
95
  .window_title = self.window_title,
96
96
  .bundle_id = self.bundle_id,
97
97
  .icon_path = self.icon_path,
98
+ .update_feed_url = manifestUpdateString("feed_url"),
99
+ .update_public_key = manifestUpdateString("public_key"),
100
+ .update_check_on_start = manifestUpdateCheckOnStart(),
98
101
  .main_window = .{
99
102
  .id = 1,
100
103
  .label = "main",
@@ -155,6 +158,23 @@ pub const RunOptions = struct {
155
158
  }
156
159
  };
157
160
 
161
+ fn manifestUpdateString(comptime field: []const u8) []const u8 {
162
+ if (comptime !@hasField(@TypeOf(app_manifest), "updates")) return "";
163
+ const updates = app_manifest.updates;
164
+ if (comptime !@hasField(@TypeOf(updates), field)) return "";
165
+ const value = @field(updates, field);
166
+ return switch (@typeInfo(@TypeOf(value))) {
167
+ .optional => value orelse "",
168
+ else => value,
169
+ };
170
+ }
171
+
172
+ fn manifestUpdateCheckOnStart() bool {
173
+ if (comptime !@hasField(@TypeOf(app_manifest), "updates")) return false;
174
+ if (comptime !@hasField(@TypeOf(app_manifest.updates), "check_on_start")) return false;
175
+ return app_manifest.updates.check_on_start;
176
+ }
177
+
158
178
  const CommandStorage = struct {
159
179
  commands: [native_sdk.app_manifest.max_commands]native_sdk.Command = undefined,
160
180
 
@@ -1256,6 +1276,11 @@ test "RunOptions resolves manifest commands menus and shortcuts" {
1256
1276
  .app_name = "runner-fixture",
1257
1277
  .bundle_id = "dev.native_sdk.runner_fixture",
1258
1278
  };
1279
+ var info_buffers: StateBuffers = .{};
1280
+ const app_info = options.appInfo(&info_buffers);
1281
+ try std.testing.expectEqualStrings("https://example.com/native-update.json", app_info.update_feed_url);
1282
+ try std.testing.expectEqualStrings("11qYAYKxCrfVS/7TyWQHOg7hcvPapiMlrwIaaPcHURo=", app_info.update_public_key);
1283
+ try std.testing.expect(app_info.update_check_on_start);
1259
1284
 
1260
1285
  var command_storage: CommandStorage = .{};
1261
1286
  const commands = options.resolvedCommands(&command_storage);
@@ -367,6 +367,27 @@ typedef struct {
367
367
  typedef void (*native_sdk_appkit_event_callback_t)(void *context, const native_sdk_appkit_event_t *event);
368
368
  typedef void (*native_sdk_appkit_bridge_callback_t)(void *context, uint64_t window_id, const char *webview_label, size_t webview_label_len, const char *message, size_t message_len, const char *origin, size_t origin_len);
369
369
 
370
+ typedef struct native_sdk_update_verify_result {
371
+ int ok;
372
+ int error_code;
373
+ size_t version_len;
374
+ size_t archive_url_len;
375
+ size_t release_notes_len;
376
+ uint64_t archive_bytes;
377
+ char sha256[64];
378
+ } native_sdk_update_verify_result_t;
379
+
380
+ native_sdk_update_verify_result_t native_sdk_update_verify_feed(
381
+ const char *envelope, size_t envelope_len,
382
+ const char *public_key, size_t public_key_len,
383
+ const char *bundle_id, size_t bundle_id_len,
384
+ const char *current_version, size_t current_version_len,
385
+ const char *target, size_t target_len,
386
+ char *version_out, size_t version_capacity,
387
+ char *archive_url_out, size_t archive_url_capacity,
388
+ char *release_notes_out, size_t release_notes_capacity);
389
+ int native_sdk_update_verify_archive(const char *path, size_t path_len, uint64_t expected_bytes, const char *sha256, size_t sha256_len);
390
+
370
391
  // show_policy 0 = immediate (ordered front at create), 1 = deferred to
371
392
  // the first canvas present (present-before-show: the window is created
372
393
  // ordered-out and `makeKeyAndOrderFront` runs after the first
@@ -396,6 +417,8 @@ void native_sdk_appkit_set_dock_icon_rgba(native_sdk_appkit_host_t *host, const
396
417
  // Debug dev-run path falls back to this when its masked render fails,
397
418
  // keeping the pre-masking behavior (icon shown unshaped) as the floor.
398
419
  void native_sdk_appkit_set_dock_icon_file(native_sdk_appkit_host_t *host, const char *path, size_t path_len);
420
+ void native_sdk_appkit_configure_updates(native_sdk_appkit_host_t *host, const char *feed_url, size_t feed_url_len, const char *public_key, size_t public_key_len, int check_on_start, const char *target, size_t target_len);
421
+ int native_sdk_appkit_check_for_updates(native_sdk_appkit_host_t *host, int user_initiated);
399
422
  void native_sdk_appkit_run(native_sdk_appkit_host_t *host, native_sdk_appkit_event_callback_t callback, void *context);
400
423
  // The host-side shutdown request: a failed event emit asks the host to
401
424
  // deliver SHUTDOWN and stop. While the run loop is live the delivery is
@@ -616,6 +639,8 @@ double native_sdk_appkit_measure_text(uint64_t font_id, double size, const char
616
639
  * not valid UTF-8 or the font id cannot resolve (the engine then keeps
617
640
  * its per-prefix path for that run). */
618
641
  int native_sdk_appkit_measure_text_advances(uint64_t font_id, double size, const char *text, size_t text_len, float *advances);
642
+ /* Shaped glyph-path bounds for one line, relative to its baseline. */
643
+ int native_sdk_appkit_measure_text_ink(uint64_t font_id, double size, const char *text, size_t text_len, double *min_x, double *max_x, double *min_y, double *max_y);
619
644
 
620
645
  // Register engine-validated TrueType bytes under a canvas font id so
621
646
  // measurement and packet text drawing resolve the id to this exact face.