@native-sdk/cli 0.4.3 → 0.5.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 (100) hide show
  1. package/build/app.zig +308 -72
  2. package/build/ts_run.mjs +63 -0
  3. package/build.zig +336 -7
  4. package/build.zig.zon +1 -0
  5. package/package.json +15 -10
  6. package/packages/core/package-lock.json +43 -0
  7. package/packages/core/package.json +37 -0
  8. package/packages/core/rt/rt.zig +1579 -0
  9. package/packages/core/sdk/bytes_text_methods.d.ts +88 -0
  10. package/packages/core/sdk/core.ts +694 -0
  11. package/packages/core/sdk/events.ts +137 -0
  12. package/packages/core/sdk/text.ts +519 -0
  13. package/packages/core/src/checker.ts +1869 -0
  14. package/packages/core/src/cli.ts +68 -0
  15. package/packages/core/src/devhost.ts +291 -0
  16. package/packages/core/src/devhost_resolver.mjs +22 -0
  17. package/packages/core/src/diagnostics.ts +417 -0
  18. package/packages/core/src/emitter.ts +8815 -0
  19. package/packages/core/src/infer.ts +1515 -0
  20. package/packages/core/src/modules.ts +173 -0
  21. package/packages/core/src/ownership.ts +740 -0
  22. package/packages/core/src/text_polyfill.ts +337 -0
  23. package/packages/core/src/text_tables.ts +408 -0
  24. package/packages/core/src/transpile.ts +146 -0
  25. package/packages/core/src/typed_ast.ts +536 -0
  26. package/packages/core/src/types.ts +815 -0
  27. package/skill-data/core/SKILL.md +3 -0
  28. package/skill-data/native-ui/SKILL.md +30 -0
  29. package/skill-data/ts-core/SKILL.md +493 -0
  30. package/skill-data/zig/SKILL.md +208 -0
  31. package/skills/native-sdk/SKILL.md +1 -1
  32. package/src/app_runner/root.zig +75 -9
  33. package/src/app_runner/ts_core_main.zig +231 -0
  34. package/src/platform/linux/gtk_host.c +226 -21
  35. package/src/platform/windows/webview2_host.cpp +16 -10
  36. package/src/primitives/app_manifest/comptime_scene.zig +341 -0
  37. package/src/primitives/app_manifest/root.zig +13 -0
  38. package/src/primitives/app_manifest/types.zig +14 -0
  39. package/src/primitives/app_manifest/validation.zig +18 -0
  40. package/src/primitives/app_manifest/web_layer.zig +366 -0
  41. package/src/primitives/canvas/commands.zig +14 -7
  42. package/src/primitives/canvas/lazy_tls.zig +73 -0
  43. package/src/primitives/canvas/render_generic_resources.zig +22 -15
  44. package/src/primitives/canvas/root.zig +6 -0
  45. package/src/primitives/canvas/tests.zig +1 -0
  46. package/src/primitives/canvas/text_atlas.zig +40 -32
  47. package/src/primitives/canvas/text_layout_cache.zig +29 -22
  48. package/src/primitives/canvas/text_measure_cache.zig +56 -41
  49. package/src/primitives/canvas/text_spans.zig +39 -26
  50. package/src/primitives/canvas/tokens.zig +54 -0
  51. package/src/primitives/canvas/ui.zig +125 -0
  52. package/src/primitives/canvas/ui_markup.zig +22 -3
  53. package/src/primitives/canvas/ui_markup_compiled.zig +97 -7
  54. package/src/primitives/canvas/ui_markup_compiled_tests.zig +275 -0
  55. package/src/primitives/canvas/ui_markup_contract.zig +68 -14
  56. package/src/primitives/canvas/ui_markup_contract_tests.zig +257 -2
  57. package/src/primitives/canvas/ui_markup_reflect.zig +214 -0
  58. package/src/primitives/canvas/ui_markup_view.zig +105 -1
  59. package/src/primitives/canvas/ui_markup_view_tests.zig +336 -0
  60. package/src/primitives/canvas/ui_schema.zig +8 -0
  61. package/src/primitives/canvas/ui_schema_tests.zig +5 -4
  62. package/src/primitives/canvas/widget_invalidation.zig +14 -7
  63. package/src/primitives/canvas/widget_render.zig +25 -15
  64. package/src/primitives/canvas/widget_render_controls.zig +15 -9
  65. package/src/primitives/canvas/widget_runtime_tests.zig +44 -0
  66. package/src/root.zig +7 -0
  67. package/src/runtime/api.zig +7 -0
  68. package/src/runtime/bridge_responses.zig +2 -0
  69. package/src/runtime/builtin_bridge.zig +6 -0
  70. package/src/runtime/canvas_frame.zig +57 -36
  71. package/src/runtime/canvas_images.zig +9 -3
  72. package/src/runtime/canvas_widget_control_tests.zig +5 -6
  73. package/src/runtime/canvas_widget_runtime.zig +7 -4
  74. package/src/runtime/effects.zig +490 -2
  75. package/src/runtime/effects_host_tests.zig +594 -0
  76. package/src/runtime/flow.zig +8 -0
  77. package/src/runtime/platform_bridge_tests.zig +1 -0
  78. package/src/runtime/root.zig +18 -0
  79. package/src/runtime/session_replay.zig +7 -1
  80. package/src/runtime/session_tests.zig +35 -8
  81. package/src/runtime/tests.zig +2 -0
  82. package/src/runtime/ts_core_host.zig +1505 -0
  83. package/src/runtime/ts_core_host_tests.zig +1408 -0
  84. package/src/runtime/ts_ui_app.zig +469 -0
  85. package/src/runtime/ui_app.zig +58 -0
  86. package/src/runtime/view_canvas.zig +24 -17
  87. package/src/runtime/view_widget_tree.zig +2 -2
  88. package/src/runtime/web_layer_gate_tests.zig +242 -0
  89. package/src/runtime/window_storage.zig +5 -0
  90. package/src/runtime/window_view_runtime.zig +1 -0
  91. package/src/tooling/buildgraph.zig +7 -1
  92. package/src/tooling/codesign.zig +212 -105
  93. package/src/tooling/doctor.zig +78 -0
  94. package/src/tooling/manifest.zig +314 -1
  95. package/src/tooling/package.zig +722 -18
  96. package/src/tooling/raw_manifest.zig +16 -0
  97. package/src/tooling/root.zig +1 -0
  98. package/src/tooling/templates.zig +911 -88
  99. package/src/tooling/ts_core.zig +486 -0
  100. package/src/tooling/verbs.zig +22 -0
package/build.zig CHANGED
@@ -195,6 +195,15 @@ pub fn build(b: *std.Build) void {
195
195
  eject_components_mod.addImport("native_sdk", desktop_mod);
196
196
  const eject_components_tests = testArtifact(b, eject_components_mod);
197
197
 
198
+ // Transpiled-core end-to-end suite: tests/ts-core/fixture.ts is
199
+ // emitted by the repo's own transpiler AT BUILD TIME (never a
200
+ // committed Zig snapshot) and driven through the real runtime via
201
+ // `TsCoreHost`. Gated on node plus the transpiler package's
202
+ // installed dependency: absent either, the suite is skipped (the
203
+ // bridge itself stays covered by src/runtime/ts_core_host_tests.zig
204
+ // against a hand-written emitted-ABI core).
205
+ const ts_core_e2e_tests = tsCoreE2eArtifact(b, target, optimize, desktop_mod, tooling_mod);
206
+
198
207
  const ui_markup_mod = module(b, target, optimize, "src/primitives/canvas/ui_markup.zig");
199
208
  const markup_lsp_mod = module(b, target, optimize, "tools/native-sdk/markup_lsp.zig");
200
209
  markup_lsp_mod.addImport("ui_markup", ui_markup_mod);
@@ -205,6 +214,11 @@ pub fn build(b: *std.Build) void {
205
214
  automation_cli_mod.addImport("ui_markup", ui_markup_mod);
206
215
  const automation_cli_tests = testArtifact(b, automation_cli_mod);
207
216
 
217
+ const markup_cli_mod = module(b, target, optimize, "tools/native-sdk/markup.zig");
218
+ markup_cli_mod.addImport("ui_markup", ui_markup_mod);
219
+ markup_cli_mod.addImport("markup_lsp", markup_lsp_mod);
220
+ const markup_cli_tests = testArtifact(b, markup_cli_mod);
221
+
208
222
  // `native version` names the commit the binary was built from, so
209
223
  // binary/framework skew ("your native binary may be stale") is a
210
224
  // one-command check. Falls back to "unknown" outside a git checkout.
@@ -400,8 +414,30 @@ pub fn build(b: *std.Build) void {
400
414
  test_step.dependOn(&b.addRunArtifact(automation_protocol_tests).step);
401
415
  test_step.dependOn(&b.addRunArtifact(tooling_tests).step);
402
416
  test_step.dependOn(&b.addRunArtifact(eject_components_tests).step);
417
+ if (ts_core_e2e_tests) |ts_core_artifacts| {
418
+ const ts_core_e2e_step = b.step("test-ts-core-e2e", "Run the transpiled-core end-to-end suites (requires node)");
419
+ const host_e2e_run = b.addRunArtifact(ts_core_artifacts.host);
420
+ const soundboard_e2e_run = b.addRunArtifact(ts_core_artifacts.soundboard);
421
+ const monitor_e2e_run = b.addRunArtifact(ts_core_artifacts.system_monitor);
422
+ const scaffold_ide_e2e_run = b.addRunArtifact(ts_core_artifacts.scaffold_ide);
423
+ // The suite scaffolds and typechecks real trees under .zig-cache;
424
+ // no build inputs/outputs to hash, so always run it.
425
+ scaffold_ide_e2e_run.has_side_effects = true;
426
+ const ai_chat_e2e_run = b.addRunArtifact(ts_core_artifacts.ai_chat);
427
+ ts_core_e2e_step.dependOn(&host_e2e_run.step);
428
+ ts_core_e2e_step.dependOn(&soundboard_e2e_run.step);
429
+ ts_core_e2e_step.dependOn(&monitor_e2e_run.step);
430
+ ts_core_e2e_step.dependOn(&scaffold_ide_e2e_run.step);
431
+ ts_core_e2e_step.dependOn(&ai_chat_e2e_run.step);
432
+ test_step.dependOn(&host_e2e_run.step);
433
+ test_step.dependOn(&soundboard_e2e_run.step);
434
+ test_step.dependOn(&monitor_e2e_run.step);
435
+ test_step.dependOn(&scaffold_ide_e2e_run.step);
436
+ test_step.dependOn(&ai_chat_e2e_run.step);
437
+ }
403
438
  test_step.dependOn(&b.addRunArtifact(markup_lsp_tests).step);
404
439
  test_step.dependOn(&b.addRunArtifact(automation_cli_tests).step);
440
+ test_step.dependOn(&b.addRunArtifact(markup_cli_tests).step);
405
441
  addFileContainsCheckStep(b, file_contains_checker, test_step, "test-package-types", "Verify package TypeScript platform feature names", &.{
406
442
  .{ .path = "packages/native-sdk/native-sdk.d.ts", .pattern = "NativeSdkCommandInfo" },
407
443
  .{ .path = "packages/native-sdk/native-sdk.d.ts", .pattern = "list(): Promise<NativeSdkCommandInfo[]>" },
@@ -426,6 +462,12 @@ pub fn build(b: *std.Build) void {
426
462
  .{ .path = "packages/native-sdk/native-sdk.d.ts", .pattern = "\"gpuSurfaces\"" },
427
463
  .{ .path = "packages/native-sdk/native-sdk.d.ts", .pattern = "gpuFirstFrameLatencyNs: number" },
428
464
  });
465
+ addFileContainsCheckStep(b, file_contains_checker, test_step, "test-app-test-entry-analysis", "Verify the managed app test step force-analyzes the entry point (UiApp.create's Model-defaults rule must teach at `native test`, not ambush at `native build`)", &.{
466
+ .{ .path = "build/app.zig", .pattern = "app_analysis.zig" },
467
+ .{ .path = "build/app.zig", .pattern = "if (@hasDecl(app, \"main\")) _ = &app.main;" },
468
+ .{ .path = "build/app.zig", .pattern = "test_step.dependOn(&analysis_obj.step);" },
469
+ .{ .path = "src/runtime/ui_app.zig", .pattern = "has no default value - give every Model field a default" },
470
+ });
429
471
  addFileContainsCheckStep(b, file_contains_checker, test_step, "test-bridge-view-selector-helpers", "Verify injected view helpers accept string selectors", &.{
430
472
  .{ .path = "src/platform/macos/appkit_host.m", .pattern = "viewSelectorPayload(options)" },
431
473
  .{ .path = "src/platform/macos/cef_host.mm", .pattern = "viewSelectorPayload(options)" },
@@ -482,22 +524,47 @@ pub fn build(b: *std.Build) void {
482
524
  .{ .path = "src/platform/linux/gtk_host.c", .pattern = "change != NATIVE_SDK_GST_STATE_CHANGE_ASYNC" },
483
525
  .{ .path = "src/platform/linux/gtk_host.c", .pattern = "#define NATIVE_SDK_GST_STATE_CHANGE_ASYNC 2" },
484
526
  });
485
- // The embedded-WebView layer must stay real: the vendored WebView2
486
- // SDK header turns the guard on, every first-party build graph puts
487
- // it on the include path, and a build that cannot see it fails at
488
- // compile time instead of quietly shipping the stubbed host (whose
489
- // WebView loads report WebViewNotFound at runtime).
490
- addFileContainsCheckStep(b, file_contains_checker, test_step, "test-windows-webview2-vendor", "Verify the vendored WebView2 SDK stays wired into every Windows build graph", &.{
527
+ // The embedded-WebView layer must stay real AND declare-to-use: the
528
+ // standard build graph puts the vendored WebView2 SDK header on the
529
+ // include path exactly when app.zon declares web use (`if
530
+ // (web_layer)`), and only the native-only branch passes the stub
531
+ // define. In the guard the stub define is tested FIRST, before
532
+ // header visibility: on a machine where the WebView2 SDK headers are
533
+ // reachable through the system include paths, an
534
+ // include-path-decides guard would compile the full layer into a
535
+ // native-only build and reintroduce the WebView2Loader.dll reference
536
+ // its executable must not carry. Without the define the header is
537
+ // required — a web build that cannot see it fails at compile time
538
+ // instead of quietly shipping the stubbed host (whose WebView loads
539
+ // report WebViewNotFound at runtime).
540
+ addFileContainsCheckStep(b, file_contains_checker, test_step, "test-windows-webview2-vendor", "Verify the vendored WebView2 SDK stays wired into every web-declaring Windows build graph", &.{
491
541
  .{ .path = "third_party/webview2/include/WebView2.h", .pattern = "CreateCoreWebView2EnvironmentWithOptions" },
492
542
  .{ .path = "third_party/webview2/include/EventToken.h", .pattern = "EventRegistrationToken" },
493
543
  .{ .path = "third_party/webview2/LICENSE.txt", .pattern = "Redistribution and use in source and binary forms" },
544
+ .{ .path = "src/platform/windows/webview2_host.cpp", .pattern = "#if defined(NATIVE_SDK_ALLOW_WEBVIEW2_STUB)" },
545
+ .{ .path = "src/platform/windows/webview2_host.cpp", .pattern = "#elif __has_include(<WebView2.h>) && __has_include(<wrl.h>)" },
494
546
  .{ .path = "src/platform/windows/webview2_host.cpp", .pattern = "#error \"WebView2.h not found" },
495
547
  .{ .path = "src/platform/windows/webview2_host.cpp", .pattern = "LoadLibraryW(L\"WebView2Loader.dll\")" },
548
+ .{ .path = "build/app.zig", .pattern = ".system => if (web_layer) {" },
496
549
  .{ .path = "build/app.zig", .pattern = "app_mod.addIncludePath(dep.path(\"third_party/webview2/include\"));" },
497
550
  .{ .path = "build/app.zig", .pattern = "third_party/webview2/x64/WebView2Loader.dll" },
551
+ .{ .path = "build/app.zig", .pattern = "\"-DNATIVE_SDK_ALLOW_WEBVIEW2_STUB\"" },
498
552
  .{ .path = "src/tooling/templates.zig", .pattern = "third_party/webview2/include" },
499
553
  .{ .path = "src/tooling/templates.zig", .pattern = "third_party/webview2/x64/WebView2Loader.dll" },
500
554
  });
555
+ // The Linux mirror of the Windows seam: the stub define wins over
556
+ // header visibility (a native-only build never reintroduces the
557
+ // libwebkitgtk link even where the dev package is installed), the
558
+ // header is required for web builds, and both build graphs compile
559
+ // gtk_host.c with the stub and drop the webkitgtk-6.0 link when the
560
+ // web layer is excluded.
561
+ addFileContainsCheckStep(b, file_contains_checker, test_step, "test-linux-webkitgtk-seam", "Verify the WebKitGTK compile seam stays wired through the GTK host and both Linux build graphs", &.{
562
+ .{ .path = "src/platform/linux/gtk_host.c", .pattern = "#if defined(NATIVE_SDK_ALLOW_WEBKITGTK_STUB)" },
563
+ .{ .path = "src/platform/linux/gtk_host.c", .pattern = "#elif __has_include(<webkit/webkit.h>)" },
564
+ .{ .path = "src/platform/linux/gtk_host.c", .pattern = "#error \"webkit/webkit.h not found" },
565
+ .{ .path = "build/app.zig", .pattern = "\"-DNATIVE_SDK_ALLOW_WEBKITGTK_STUB\"" },
566
+ .{ .path = "src/tooling/templates.zig", .pattern = "\"-DNATIVE_SDK_ALLOW_WEBKITGTK_STUB\"" },
567
+ });
501
568
  addLayoutCheckStep(b, test_step, "test-windows-webview2-loader-layout", "Verify the vendored WebView2 loader binaries are present", &.{
502
569
  "third_party/webview2/x64/WebView2Loader.dll",
503
570
  "third_party/webview2/arm64/WebView2Loader.dll",
@@ -768,6 +835,7 @@ pub fn build(b: *std.Build) void {
768
835
  }
769
836
  addTestStep(b, "test-automation-protocol", "Run automation protocol tests", automation_protocol_tests);
770
837
  addTestStep(b, "test-automation-cli", "Run native automate CLI tests", automation_cli_tests);
838
+ addTestStep(b, "test-markup-cli", "Run native markup CLI tests", markup_cli_tests);
771
839
  addTestStep(b, "test-tooling", "Run Native SDK tooling tests", tooling_tests);
772
840
  addTestStep(b, "test-eject-components", "Run ejected-component widget-identity tests", eject_components_tests);
773
841
 
@@ -797,6 +865,75 @@ pub fn build(b: *std.Build) void {
797
865
  const browser_system_link_step = b.step("test-browser-system-link", "Build the browser example with the system engine");
798
866
  browser_system_link_step.dependOn(&build_browser_system.step);
799
867
 
868
+ // Windows web-layer PE cross-audit: the declare-to-use inference,
869
+ // proven on real executables from any host via cross-compile.
870
+ // ui-inbox's manifest declares no web use, so its exe must carry no
871
+ // WebView2Loader.dll reference (the whole embedded layer compiles
872
+ // out) and no loader may land beside it; the webview example declares
873
+ // the "webview" capability, so its exe must keep the reference. The
874
+ // loader string lives as UTF-16 in the host, so the audit is a
875
+ // dedicated scanner (tools/audit_web_layer.zig), not a text grep.
876
+ const web_layer_auditor = b.addExecutable(.{
877
+ .name = "audit-web-layer",
878
+ .root_module = module(b, host_target, optimize, "tools/audit_web_layer.zig"),
879
+ });
880
+ // A loader installed by a build predating the inference would fail
881
+ // the absence check below without being this build's fault; clear it
882
+ // so the assertion tests what THIS build installs.
883
+ const clean_native_only_loader = b.addSystemCommand(&.{ "sh", "-c", "rm -f examples/ui-inbox/zig-out/bin/WebView2Loader.dll" });
884
+ const build_native_only_windows = b.addSystemCommand(&.{ "zig", "build", "-Dtarget=x86_64-windows-gnu", "-Dplatform=windows" });
885
+ build_native_only_windows.setCwd(b.path("examples/ui-inbox"));
886
+ build_native_only_windows.step.dependOn(&clean_native_only_loader.step);
887
+ const build_webview_windows = b.addSystemCommand(&.{ "zig", "build", "-Dtarget=x86_64-windows-gnu", "-Dplatform=windows", "-Dweb-engine=system" });
888
+ build_webview_windows.setCwd(b.path("examples/webview"));
889
+ const audit_native_only_exe = b.addRunArtifact(web_layer_auditor);
890
+ audit_native_only_exe.addArgs(&.{ "examples/ui-inbox/zig-out/bin/ui-inbox.exe", "absent" });
891
+ audit_native_only_exe.has_side_effects = true;
892
+ audit_native_only_exe.step.dependOn(&build_native_only_windows.step);
893
+ const audit_webview_exe = b.addRunArtifact(web_layer_auditor);
894
+ audit_webview_exe.addArgs(&.{ "examples/webview/zig-out/bin/webview.exe", "present" });
895
+ audit_webview_exe.has_side_effects = true;
896
+ audit_webview_exe.step.dependOn(&build_webview_windows.step);
897
+ const audit_native_only_loader = b.addSystemCommand(&.{
898
+ "sh", "-c",
899
+ \\test ! -f examples/ui-inbox/zig-out/bin/WebView2Loader.dll || {
900
+ \\ echo "web-layer audit FAILED: the native-only build installed WebView2Loader.dll" >&2
901
+ \\ exit 1
902
+ \\}
903
+ });
904
+ audit_native_only_loader.step.dependOn(&build_native_only_windows.step);
905
+ const web_layer_audit_step = b.step("test-windows-web-layer-audit", "Cross-compile a native-only and a web example for Windows and audit the web layer in each exe");
906
+ web_layer_audit_step.dependOn(&audit_native_only_exe.step);
907
+ web_layer_audit_step.dependOn(&audit_webview_exe.step);
908
+ web_layer_audit_step.dependOn(&audit_native_only_loader.step);
909
+
910
+ // Linux web-layer ELF cross-audit: the same declare-to-use proof on
911
+ // real Linux executables. Unlike the Windows step this cannot
912
+ // cross-compile from any host — the GTK host needs the system GTK4
913
+ // (and, for the web example, WebKitGTK) development headers — so the
914
+ // step runs on Linux with both packages installed and proves the
915
+ // SEAM, not the environment: the native-only exe must carry no
916
+ // libwebkitgtk DT_NEEDED entry and no webkit_/jsc_ dynamic symbol
917
+ // even though the dev package was right there, while the web example
918
+ // must keep them. The environment half (a native-only app building
919
+ // on a runner with no WebKitGTK dev package at all) is proven by the
920
+ // linux-canvas-smoke CI job.
921
+ const build_native_only_linux = b.addSystemCommand(&.{ "zig", "build", "-Dplatform=linux" });
922
+ build_native_only_linux.setCwd(b.path("examples/ui-inbox"));
923
+ const build_webview_linux = b.addSystemCommand(&.{ "zig", "build", "-Dplatform=linux", "-Dweb-engine=system" });
924
+ build_webview_linux.setCwd(b.path("examples/webview"));
925
+ const audit_native_only_elf = b.addRunArtifact(web_layer_auditor);
926
+ audit_native_only_elf.addArgs(&.{ "examples/ui-inbox/zig-out/bin/ui-inbox", "absent" });
927
+ audit_native_only_elf.has_side_effects = true;
928
+ audit_native_only_elf.step.dependOn(&build_native_only_linux.step);
929
+ const audit_webview_elf = b.addRunArtifact(web_layer_auditor);
930
+ audit_webview_elf.addArgs(&.{ "examples/webview/zig-out/bin/webview", "present" });
931
+ audit_webview_elf.has_side_effects = true;
932
+ audit_webview_elf.step.dependOn(&build_webview_linux.step);
933
+ const linux_web_layer_audit_step = b.step("test-linux-web-layer-audit", "Build a native-only and a web example for Linux (Linux host with GTK4 + WebKitGTK dev packages) and audit the web layer in each ELF");
934
+ linux_web_layer_audit_step.dependOn(&audit_native_only_elf.step);
935
+ linux_web_layer_audit_step.dependOn(&audit_webview_elf.step);
936
+
800
937
  const frontend_examples_step = b.step("test-examples-frontends", "Run frontend example tests");
801
938
  addExampleTestStep(b, host_cli_exe, frontend_examples_step, "test-example-next", "Run Next example tests", "examples/next", .owned);
802
939
  addExampleTestStep(b, host_cli_exe, frontend_examples_step, "test-example-react", "Run React example tests", "examples/react", .owned);
@@ -820,12 +957,14 @@ pub fn build(b: *std.Build) void {
820
957
  addExampleTestStep(b, host_cli_exe, native_examples_step, "test-example-kanban", "Run ui builder kanban example tests", "examples/kanban", .managed);
821
958
  addExampleTestStep(b, host_cli_exe, native_examples_step, "test-example-habits", "Run markup habits example tests", "examples/habits", .managed);
822
959
  addExampleTestStep(b, host_cli_exe, native_examples_step, "test-example-soundboard", "Run soundboard example tests", "examples/soundboard", .managed);
960
+ addExampleTestStep(b, host_cli_exe, native_examples_step, "test-example-soundboard-ts", "Run soundboard-ts example tests", "examples/soundboard-ts", .managed);
823
961
  addExampleTestStep(b, host_cli_exe, native_examples_step, "test-example-deck", "Run deck example tests", "examples/deck", .managed);
824
962
  addExampleTestStep(b, host_cli_exe, native_examples_step, "test-example-markdown-viewer", "Run markdown viewer example tests", "examples/markdown-viewer", .managed);
825
963
  addExampleTestStep(b, host_cli_exe, native_examples_step, "test-example-calculator", "Run calculator example tests", "examples/calculator", .managed);
826
964
  addExampleTestStep(b, host_cli_exe, native_examples_step, "test-example-notes", "Run notes example tests", "examples/notes", .managed);
827
965
  addExampleTestStep(b, host_cli_exe, native_examples_step, "test-example-split-collapse", "Run split collapse example tests", "examples/split-collapse", .managed);
828
966
  addExampleTestStep(b, host_cli_exe, native_examples_step, "test-example-system-monitor", "Run system monitor example tests", "examples/system-monitor", .managed);
967
+ addExampleTestStep(b, host_cli_exe, native_examples_step, "test-example-system-monitor-ts", "Run system-monitor-ts example tests", "examples/system-monitor-ts", .managed);
829
968
  addExampleTestStep(b, host_cli_exe, native_examples_step, "test-example-effects-probe", "Run effects probe example tests", "examples/effects-probe", .managed);
830
969
  addExampleTestStep(b, host_cli_exe, native_examples_step, "test-example-feed", "Run feed example tests", "examples/feed", .managed);
831
970
  addExampleTestStep(b, host_cli_exe, native_examples_step, "test-example-canvas-preview", "Run canvas preview example tests", "examples/canvas-preview", .managed);
@@ -1406,6 +1545,16 @@ pub fn build(b: *std.Build) void {
1406
1545
  \\ready_budget_ms="$smoke_budget_ms"
1407
1546
  \\if [ "$ready_budget_ms" -lt 500 ]; then ready_budget_ms=500; fi
1408
1547
  \\ready_budget_ns=$((ready_budget_ms * 1000000))
1548
+ \\# gpu-dashboard is a native-only app (nothing in app.zon declares web
1549
+ \\# use), so its macOS host must never boot the WebKit stack: WKWebView
1550
+ \\# instantiation spawns com.apple.WebKit.* XPC helpers. They are
1551
+ \\# launchd-parented (not app children), so the honest cheap probe is
1552
+ \\# the machine-wide helper set before launch vs at the end of the
1553
+ \\# session — a NEW helper during this headless smoke window means the
1554
+ \\# lazy main-WebView path regressed (the failure lists the processes
1555
+ \\# so a coincidental web app launched mid-smoke is tellable apart).
1556
+ \\webkit_helpers() { pgrep -f 'com\.apple\.WebKit\.(WebContent|Networking|GPU)' 2>/dev/null | tr '\n' ' '; }
1557
+ \\webkit_before="$(webkit_helpers)"
1409
1558
  \\pid=""
1410
1559
  \\trap 'status=$?; kill "$pid" >/dev/null 2>&1 || true; wait "$pid" >/dev/null 2>&1 || true; if [ "$status" -ne 0 ]; then echo "---- app log (.zig-cache/native-sdk-gpu-dashboard-smoke.log) ----" >&2; cat .zig-cache/native-sdk-gpu-dashboard-smoke.log >&2 2>/dev/null || true; fi' EXIT
1411
1560
  \\stop_app() {
@@ -1572,6 +1721,19 @@ pub fn build(b: *std.Build) void {
1572
1721
  \\if ! grep -q "gpu incremental verify view=dashboard-canvas checks=" "$verify_log" 2>/dev/null; then echo "dashboard verify mode recorded no incremental checks" >&2; exit 1; fi
1573
1722
  \\if grep -q "verify MISMATCH" "$verify_log" 2>/dev/null; then echo "dashboard incremental present diverged from a full redraw:" >&2; grep "verify MISMATCH" "$verify_log" >&2; exit 1; fi
1574
1723
  \\if grep "gpu incremental verify view=dashboard-canvas checks=" "$verify_log" | grep -qv "mismatches=0"; then echo "dashboard incremental verify reported mismatches" >&2; exit 1; fi
1724
+ \\# The whole session ran (two launches, clicks, resizes): a native-only
1725
+ \\# macOS app must have spawned ZERO new WebKit helper processes.
1726
+ \\webkit_after="$(webkit_helpers)"
1727
+ \\new_webkit=""
1728
+ \\for helper_pid in $webkit_after; do
1729
+ \\ case " $webkit_before " in *" $helper_pid "*) ;; *) new_webkit="$new_webkit $helper_pid" ;; esac
1730
+ \\done
1731
+ \\if [ -n "$new_webkit" ]; then
1732
+ \\ echo "native-only gpu-dashboard session spawned WebKit helper processes:$new_webkit" >&2
1733
+ \\ for helper_pid in $new_webkit; do ps -p "$helper_pid" -o pid,ppid,command >&2 || true; done
1734
+ \\ exit 1
1735
+ \\fi
1736
+ \\echo "zero new WebKit helper processes during the native-only session"
1575
1737
  \\echo "gpu-dashboard smoke ok"
1576
1738
  ,
1577
1739
  "sh",
@@ -2162,10 +2324,15 @@ pub fn build(b: *std.Build) void {
2162
2324
  // carries the CLI as its executable (packaging only needs a real
2163
2325
  // Mach-O to sign); the check skips loudly on hosts without codesign
2164
2326
  // (any non-macOS machine) instead of pretending to have verified.
2327
+ // Signing that claims to sign now fails the package on hosts that
2328
+ // cannot run codesign (that IS the fix this step gates), so only a
2329
+ // macOS host requests adhoc here; elsewhere the package stays
2330
+ // unsigned and the check script below skips loudly as before.
2331
+ const package_signing_mode: []const u8 = if (b.graph.host.result.os.tag == .macos) "adhoc" else "none";
2165
2332
  const package_signing_run = b.addRunArtifact(host_cli_exe);
2166
2333
  package_signing_run.addArgs(&.{ "package", "--target", "macos", "--output", "zig-out/package/native-sdk-signing-verify.app", "--binary" });
2167
2334
  package_signing_run.addFileArg(host_cli_exe.getEmittedBin());
2168
- package_signing_run.addArgs(&.{ "--manifest", "app.zon", "--assets", "assets", "--optimize", optimize_name, "--signing", "adhoc" });
2335
+ package_signing_run.addArgs(&.{ "--manifest", "app.zon", "--assets", "assets", "--optimize", optimize_name, "--signing", package_signing_mode });
2169
2336
  package_signing_run.has_side_effects = true;
2170
2337
  const package_signing_check = b.addSystemCommand(&.{
2171
2338
  "sh", "-c",
@@ -2313,6 +2480,168 @@ fn testArtifact(b: *std.Build, mod: *std.Build.Module) *std.Build.Step.Compile {
2313
2480
  return filteredTestArtifact(b, mod, "test", &.{});
2314
2481
  }
2315
2482
 
2483
+ /// The two transpiled-core end-to-end test binaries: the host/markup
2484
+ /// fixture suite (tests/ts-core) and the soundboard-ts example suite —
2485
+ /// the launch-gate port driven as a REAL app (its committed core, its
2486
+ /// shipping markup). Each runs the @native-sdk/core transpiler (node)
2487
+ /// over the TS core at build time, pairs the emitted core with its rt
2488
+ /// kernel in one generated module, and compiles the Zig test root
2489
+ /// against it plus the framework. Returns null — the suites are
2490
+ /// skipped, not failed — when node or the transpiler package's
2491
+ /// installed dependency (`npm ci` in packages/core) is missing.
2492
+ const TsCoreE2eArtifacts = struct {
2493
+ host: *std.Build.Step.Compile,
2494
+ soundboard: *std.Build.Step.Compile,
2495
+ system_monitor: *std.Build.Step.Compile,
2496
+ /// The stock-IDE contract: a fresh scaffold (and the committed TS
2497
+ /// example ports) typecheck under the REAL tsc with zero injected
2498
+ /// paths, and builds keep working with node_modules deleted.
2499
+ scaffold_ide: *std.Build.Step.Compile,
2500
+ ai_chat: *std.Build.Step.Compile,
2501
+ };
2502
+
2503
+ fn tsCoreE2eArtifact(
2504
+ b: *std.Build,
2505
+ target: std.Build.ResolvedTarget,
2506
+ optimize: std.builtin.OptimizeMode,
2507
+ desktop_mod: *std.Build.Module,
2508
+ tooling_mod: *std.Build.Module,
2509
+ ) ?TsCoreE2eArtifacts {
2510
+ const node = b.findProgram(&.{"node"}, &.{}) catch return null;
2511
+ b.build_root.handle.access(
2512
+ b.graph.io,
2513
+ "packages/core/node_modules/@typescript/typescript6",
2514
+ .{},
2515
+ ) catch return null;
2516
+
2517
+ // Each fixture stages its own copy of rt.zig, so each emitted core
2518
+ // owns a distinct rt kernel instance — the process contract the
2519
+ // coexistence e2e test pins (two live cores, no shared arenas).
2520
+ const fixture_mod = tsCoreFixtureModule(b, target, optimize, node, "tests/ts-core/fixture.ts");
2521
+ const markup_fixture_mod = tsCoreFixtureModule(b, target, optimize, node, "tests/ts-core/markup_fixture.ts");
2522
+
2523
+ const e2e_mod = module(b, target, optimize, "tests/ts-core/host_e2e_tests.zig");
2524
+ e2e_mod.addImport("native_sdk", desktop_mod);
2525
+ e2e_mod.addImport("ts_core_fixture", fixture_mod);
2526
+ e2e_mod.addImport("ts_markup_fixture", markup_fixture_mod);
2527
+
2528
+ // The soundboard-ts example's core and markup, tested as one app:
2529
+ // the test root stages beside a copy of the example's app.native so
2530
+ // the compiled markup engine builds the SHIPPING view over the
2531
+ // emitted model.
2532
+ const soundboard_core_mod = tsCoreFixtureModule(b, target, optimize, node, "examples/soundboard-ts/src/core.ts");
2533
+ const soundboard_stage = b.addWriteFiles();
2534
+ const soundboard_root = soundboard_stage.addCopyFile(b.path("tests/ts-core/soundboard_e2e_tests.zig"), "soundboard_e2e_tests.zig");
2535
+ _ = soundboard_stage.addCopyFile(b.path("examples/soundboard-ts/src/app.native"), "app.native");
2536
+ const soundboard_mod = b.createModule(.{
2537
+ .root_source_file = soundboard_root,
2538
+ .target = target,
2539
+ .optimize = optimize,
2540
+ });
2541
+ soundboard_mod.addImport("native_sdk", desktop_mod);
2542
+ soundboard_mod.addImport("ts_soundboard_core", soundboard_core_mod);
2543
+
2544
+ // The system-monitor-ts example's core and markup, tested the same
2545
+ // way — plus the ORIGINAL Zig example's committed sampler captures,
2546
+ // staged as fixtures so both ports parse the same recorded truth.
2547
+ const monitor_core_mod = tsCoreFixtureModule(b, target, optimize, node, "examples/system-monitor-ts/src/core.ts");
2548
+ const monitor_stage = b.addWriteFiles();
2549
+ const monitor_root = monitor_stage.addCopyFile(b.path("tests/ts-core/system_monitor_e2e_tests.zig"), "system_monitor_e2e_tests.zig");
2550
+ _ = monitor_stage.addCopyFile(b.path("examples/system-monitor-ts/src/app.native"), "app.native");
2551
+ _ = monitor_stage.addCopyFile(b.path("examples/system-monitor/src/fixtures/sysctl.txt"), "fixtures/sysctl.txt");
2552
+ _ = monitor_stage.addCopyFile(b.path("examples/system-monitor/src/fixtures/ps.txt"), "fixtures/ps.txt");
2553
+ _ = monitor_stage.addCopyFile(b.path("examples/system-monitor/src/fixtures/vm_stat.txt"), "fixtures/vm_stat.txt");
2554
+ _ = monitor_stage.addCopyFile(b.path("examples/system-monitor/src/fixtures/ps-edge.txt"), "fixtures/ps-edge.txt");
2555
+ const monitor_mod = b.createModule(.{
2556
+ .root_source_file = monitor_root,
2557
+ .target = target,
2558
+ .optimize = optimize,
2559
+ });
2560
+ monitor_mod.addImport("native_sdk", desktop_mod);
2561
+ monitor_mod.addImport("ts_system_monitor_core", monitor_core_mod);
2562
+
2563
+ // The stock-IDE suite runs the CLI's scaffold + editor-package plumbing
2564
+ // (the tooling module) and shells out to node for the real tsc.
2565
+ const scaffold_ide_mod = module(b, target, optimize, "tests/ts-core/scaffold_ide_e2e_tests.zig");
2566
+ scaffold_ide_mod.addImport("tooling", tooling_mod);
2567
+
2568
+ // The ai-chat-ts example's core and markup, tested the same way:
2569
+ // the chat client for an OpenAI-compatible endpoint, driven through
2570
+ // the fake fetch feed (no network) with its shipping markup.
2571
+ const ai_chat_core_mod = tsCoreFixtureModule(b, target, optimize, node, "examples/ai-chat-ts/src/core.ts");
2572
+ const ai_chat_stage = b.addWriteFiles();
2573
+ const ai_chat_root = ai_chat_stage.addCopyFile(b.path("tests/ts-core/ai_chat_e2e_tests.zig"), "ai_chat_e2e_tests.zig");
2574
+ _ = ai_chat_stage.addCopyFile(b.path("examples/ai-chat-ts/src/app.native"), "app.native");
2575
+ const ai_chat_mod = b.createModule(.{
2576
+ .root_source_file = ai_chat_root,
2577
+ .target = target,
2578
+ .optimize = optimize,
2579
+ });
2580
+ ai_chat_mod.addImport("native_sdk", desktop_mod);
2581
+ ai_chat_mod.addImport("ts_ai_chat_core", ai_chat_core_mod);
2582
+
2583
+ return .{
2584
+ .host = filteredTestArtifact(b, e2e_mod, "ts-core-e2e-tests", &.{}),
2585
+ .soundboard = filteredTestArtifact(b, soundboard_mod, "ts-soundboard-e2e-tests", &.{}),
2586
+ .system_monitor = filteredTestArtifact(b, monitor_mod, "ts-system-monitor-e2e-tests", &.{}),
2587
+ .scaffold_ide = filteredTestArtifact(b, scaffold_ide_mod, "ts-scaffold-ide-e2e-tests", &.{}),
2588
+ .ai_chat = filteredTestArtifact(b, ai_chat_mod, "ts-ai-chat-e2e-tests", &.{}),
2589
+ };
2590
+ }
2591
+
2592
+ /// Transpile one TS fixture core at build time and pair the emitted
2593
+ /// Zig with its rt kernel in one generated module.
2594
+ fn tsCoreFixtureModule(
2595
+ b: *std.Build,
2596
+ target: std.Build.ResolvedTarget,
2597
+ optimize: std.builtin.OptimizeMode,
2598
+ node: []const u8,
2599
+ fixture_path: []const u8,
2600
+ ) *std.Build.Module {
2601
+ const transpile = b.addSystemCommand(&.{node});
2602
+ transpile.addFileArg(b.path("packages/core/src/cli.ts"));
2603
+ transpile.addFileArg(b.path(fixture_path));
2604
+ transpile.addArg("-o");
2605
+ const emitted_core = transpile.addOutputFileArg("core.zig");
2606
+ // The transpiler reads its own sources, the SDK modules, and the
2607
+ // core's WHOLE import graph at run time; declare them all so edits
2608
+ // re-emit the fixture. The graph is declared as every sibling .ts of
2609
+ // the entry (a superset of the reachable imports: over-approximation
2610
+ // only re-runs the transpile, never misses a stale input).
2611
+ tsCoreAddDirInputs(b, transpile, "packages/core/sdk");
2612
+ tsCoreAddDirInputs(b, transpile, std.fs.path.dirname(fixture_path) orelse ".");
2613
+ const transpiler_sources = [_][]const u8{
2614
+ "checker.ts", "cli.ts", "diagnostics.ts", "emitter.ts", "infer.ts", "modules.ts", "transpile.ts", "typed_ast.ts", "types.ts",
2615
+ };
2616
+ for (transpiler_sources) |source| {
2617
+ transpile.addFileInput(b.path(b.fmt("packages/core/src/{s}", .{source})));
2618
+ }
2619
+
2620
+ // The emitted core imports "rt.zig" relatively: stage both files
2621
+ // into one generated directory to root the fixture module there.
2622
+ const staged = b.addWriteFiles();
2623
+ const core_root = staged.addCopyFile(emitted_core, "core.zig");
2624
+ _ = staged.addCopyFile(b.path("packages/core/rt/rt.zig"), "rt.zig");
2625
+ return b.createModule(.{
2626
+ .root_source_file = core_root,
2627
+ .target = target,
2628
+ .optimize = optimize,
2629
+ });
2630
+ }
2631
+
2632
+ /// Declare every .ts file in `dir_path` (relative to the build root) as a
2633
+ /// file input of the transpile step — the multi-file staleness set.
2634
+ fn tsCoreAddDirInputs(b: *std.Build, transpile: *std.Build.Step.Run, dir_path: []const u8) void {
2635
+ var dir = b.build_root.handle.openDir(b.graph.io, dir_path, .{ .iterate = true }) catch return;
2636
+ defer dir.close(b.graph.io);
2637
+ var it = dir.iterate();
2638
+ while (it.next(b.graph.io) catch null) |entry| {
2639
+ if (entry.kind != .file) continue;
2640
+ if (!std.mem.endsWith(u8, entry.name, ".ts")) continue;
2641
+ transpile.addFileInput(b.path(b.fmt("{s}/{s}", .{ dir_path, entry.name })));
2642
+ }
2643
+ }
2644
+
2316
2645
  fn filteredTestArtifact(b: *std.Build, mod: *std.Build.Module, name: []const u8, filters: []const []const u8) *std.Build.Step.Compile {
2317
2646
  // use_llvm: Zig 0.16.0's self-hosted x86_64 backend miscompiles the
2318
2647
  // SysV C ABI for f32-heavy signatures (native_sdk_app_viewport); see
package/build.zig.zon CHANGED
@@ -16,6 +16,7 @@
16
16
  "build.zig.zon",
17
17
  "docs",
18
18
  "examples",
19
+ "packages",
19
20
  "src",
20
21
  "templates",
21
22
  "tests",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@native-sdk/cli",
3
- "version": "0.4.3",
3
+ "version": "0.5.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
  "bin": {
@@ -17,20 +17,25 @@
17
17
  "build.zig",
18
18
  "build.zig.zon",
19
19
  "app.zon",
20
+ "packages/core/src",
21
+ "packages/core/sdk",
22
+ "packages/core/rt",
23
+ "packages/core/package.json",
24
+ "packages/core/package-lock.json",
20
25
  "third_party/webview2",
21
26
  "native-sdk.d.ts",
22
27
  "README.md",
23
28
  "LICENSE"
24
29
  ],
25
30
  "optionalDependencies": {
26
- "@native-sdk/cli-darwin-arm64": "0.4.3",
27
- "@native-sdk/cli-darwin-x64": "0.4.3",
28
- "@native-sdk/cli-linux-arm64-gnu": "0.4.3",
29
- "@native-sdk/cli-linux-arm64-musl": "0.4.3",
30
- "@native-sdk/cli-linux-x64-gnu": "0.4.3",
31
- "@native-sdk/cli-linux-x64-musl": "0.4.3",
32
- "@native-sdk/cli-win32-arm64": "0.4.3",
33
- "@native-sdk/cli-win32-x64": "0.4.3"
31
+ "@native-sdk/cli-darwin-arm64": "0.5.0",
32
+ "@native-sdk/cli-darwin-x64": "0.5.0",
33
+ "@native-sdk/cli-linux-arm64-gnu": "0.5.0",
34
+ "@native-sdk/cli-linux-arm64-musl": "0.5.0",
35
+ "@native-sdk/cli-linux-x64-gnu": "0.5.0",
36
+ "@native-sdk/cli-linux-x64-musl": "0.5.0",
37
+ "@native-sdk/cli-win32-arm64": "0.5.0",
38
+ "@native-sdk/cli-win32-x64": "0.5.0"
34
39
  },
35
40
  "repository": {
36
41
  "type": "git",
@@ -38,7 +43,7 @@
38
43
  },
39
44
  "homepage": "https://native-sdk.dev",
40
45
  "scripts": {
41
- "version": "npm run version:sync && git add ../../tools/native-sdk/main.zig npm/*/package.json package.json",
46
+ "version": "npm run version:sync && git add ../../tools/native-sdk/main.zig ../../packages/core/package.json ../../packages/core/package-lock.json ../../examples/soundboard-ts/package.json ../../examples/system-monitor-ts/package.json npm/*/package.json package.json",
42
47
  "version:sync": "node scripts/sync-version.js",
43
48
  "version:check": "node scripts/check-version-sync.js",
44
49
  "scripts:check": "node --check bin/native.js && node --check scripts/copy-native.js && node --check scripts/copy-framework.js && node --check scripts/sync-version.js && node --check scripts/check-version-sync.js && node --check scripts/check-framework-sync.js && node --check scripts/check-runtime-types.js && node scripts/copy-framework.js && node scripts/check-framework-sync.js && node scripts/check-runtime-types.js",
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@native-sdk/core",
3
+ "version": "0.5.0",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "@native-sdk/core",
9
+ "version": "0.5.0",
10
+ "devDependencies": {
11
+ "@typescript/typescript6": "^6.0.2"
12
+ }
13
+ },
14
+ "node_modules/@typescript/old": {
15
+ "name": "typescript",
16
+ "version": "6.0.3",
17
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz",
18
+ "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==",
19
+ "dev": true,
20
+ "license": "Apache-2.0",
21
+ "bin": {
22
+ "tsc": "bin/tsc",
23
+ "tsserver": "bin/tsserver"
24
+ },
25
+ "engines": {
26
+ "node": ">=14.17"
27
+ }
28
+ },
29
+ "node_modules/@typescript/typescript6": {
30
+ "version": "6.0.2",
31
+ "resolved": "https://registry.npmjs.org/@typescript/typescript6/-/typescript6-6.0.2.tgz",
32
+ "integrity": "sha512-mbCddXd+jm7hfx7w2YU64/Av4/NqqeG3GoRZgxPcgoTxYjhrcfJRw9ULch71SS4G+Q3bOXFhRvPqjguN0Hyp5w==",
33
+ "dev": true,
34
+ "license": "Apache-2.0",
35
+ "dependencies": {
36
+ "@typescript/old": "npm:typescript@^6"
37
+ },
38
+ "bin": {
39
+ "tsc6": "bin/tsc6"
40
+ }
41
+ }
42
+ }
43
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "@native-sdk/core",
3
+ "version": "0.5.0",
4
+ "description": "The TypeScript authoring tier: the app-core subset, its dev-time transpiler to arena-backed Zig, and the SDK module cores import",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/vercel-labs/native.git",
8
+ "directory": "packages/core"
9
+ },
10
+ "homepage": "https://native-sdk.dev",
11
+ "type": "module",
12
+ "types": "./sdk/core.ts",
13
+ "files": [
14
+ "sdk"
15
+ ],
16
+ "exports": {
17
+ ".": {
18
+ "types": "./sdk/core.ts",
19
+ "default": "./sdk/core.ts"
20
+ },
21
+ "./text": {
22
+ "types": "./sdk/text.ts",
23
+ "default": "./sdk/text.ts"
24
+ },
25
+ "./events": {
26
+ "types": "./sdk/events.ts",
27
+ "default": "./sdk/events.ts"
28
+ }
29
+ },
30
+ "scripts": {
31
+ "test": "node --test \"test/*.test.ts\"",
32
+ "gate": "node scripts/gate.mjs"
33
+ },
34
+ "devDependencies": {
35
+ "@typescript/typescript6": "^6.0.2"
36
+ }
37
+ }