@native-sdk/cli 0.8.4 → 0.9.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.
- package/build/app.zig +859 -62
- package/build.zig +543 -13
- package/build.zig.zon +1 -0
- package/native-sdk.d.ts +2 -0
- package/package.json +12 -11
- package/packages/core/compile-surface/core.ts +365 -2
- package/packages/core/package-lock.json +11 -11
- package/packages/core/package.json +2 -2
- package/packages/core/scripts/compiler_typecheck.mjs +116 -15
- package/packages/core/scripts/gen_service_surface.mjs +268 -0
- package/packages/core/scripts/npm_static_spike.mjs +64 -0
- package/packages/core/scripts/run_external_core_compiler.mjs +77 -6
- package/packages/core/scripts/run_external_service_compiler.mjs +240 -0
- package/packages/core/scripts/stage_external_core.mjs +9 -1
- package/packages/core/scripts/stage_external_services.mjs +172 -0
- package/packages/core/scripts/surface_manifest_diff.mjs +253 -0
- package/packages/core/scripts/vendor_service_packages.mjs +189 -0
- package/packages/core/sdk/core.d.ts +149 -0
- package/packages/core/sdk/core.ts +529 -12
- package/packages/core/sdk/events.d.ts +36 -0
- package/packages/core/sdk/events.ts +57 -0
- package/packages/core/src/checker.ts +468 -15
- package/packages/core/src/cli.ts +143 -3
- package/packages/core/src/contract.ts +26 -5
- package/packages/core/src/devhost.ts +1847 -16
- package/packages/core/src/devhost_journal.mjs +181 -0
- package/packages/core/src/devhost_resolver.mjs +17 -1
- package/packages/core/src/devhost_service_worker.mjs +90 -0
- package/packages/core/src/diagnostics.ts +82 -16
- package/packages/core/src/frontend.ts +204 -34
- package/packages/core/src/modules.ts +129 -80
- package/packages/core/src/service_contract.ts +597 -0
- package/packages/core/src/sqlite_cli.ts +93 -0
- package/packages/core/src/sqlite_codegen.ts +806 -0
- package/packages/core/src/sqlite_runtime_policy.ts +364 -0
- package/packages/core/src/typed_ast.ts +36 -8
- package/skill-data/core/references/project-anatomy.md +1 -1
- package/skill-data/native-ui/SKILL.md +47 -0
- package/skill-data/ts-core/SKILL.md +80 -31
- package/skill-data/ts-services/SKILL.md +126 -0
- package/skill-data/ts-services/references/service-surface.md +603 -0
- package/skill-data/zig/SKILL.md +1 -1
- package/skills/native-sdk/SKILL.md +1 -1
- package/src/app_runner/no_migrations.zig +3 -0
- package/src/app_runner/no_services.zig +20 -0
- package/src/app_runner/root.zig +104 -4
- package/src/app_runner/ts_core_main.zig +249 -8
- package/src/automation/snapshot.zig +23 -5
- package/src/embed/app_exports.zig +11 -1
- package/src/embed/c_api.zig +48 -2
- package/src/embed/conversions.zig +4 -5
- package/src/embed/host.zig +109 -1
- package/src/embed/root.zig +7 -0
- package/src/embed/tests.zig +213 -0
- package/src/embed/types.zig +51 -0
- package/src/embed/ui_host.zig +119 -5
- package/src/platform/android/NativeSdkActivity.java +131 -0
- package/src/platform/android/android_host.c +182 -1
- package/src/platform/android/native_sdk_app.h +17 -0
- package/src/platform/ios/native_sdk_app.h +17 -0
- package/src/platform/ios/uikit_host.m +115 -0
- package/src/platform/linux/cef_host.cpp +1 -1
- package/src/platform/linux/gtk_host.c +89 -17
- package/src/platform/linux/gtk_host.h +3 -0
- package/src/platform/linux/root.zig +40 -18
- package/src/platform/macos/appkit_host.h +16 -3
- package/src/platform/macos/appkit_host.m +536 -36
- package/src/platform/macos/cef_host.mm +248 -36
- package/src/platform/macos/root.zig +244 -34
- package/src/platform/null_platform.zig +223 -19
- package/src/platform/null_platform_tests.zig +74 -0
- package/src/platform/root.zig +9 -0
- package/src/platform/types.zig +179 -15
- package/src/platform/windows/root.zig +187 -21
- package/src/platform/windows/webview2_host.cpp +293 -46
- package/src/primitives/app_manifest/comptime_scene.zig +2 -0
- package/src/primitives/app_manifest/root.zig +4 -0
- package/src/primitives/app_manifest/tests.zig +3 -0
- package/src/primitives/app_manifest/types.zig +32 -0
- package/src/primitives/app_manifest/validation.zig +19 -1
- package/src/root.zig +46 -0
- package/src/runtime/api.zig +11 -0
- package/src/runtime/automation_snapshot.zig +4 -0
- package/src/runtime/bridge_permission_tests.zig +23 -2
- package/src/runtime/bridge_responses.zig +3 -1
- package/src/runtime/canvas_frame.zig +18 -11
- package/src/runtime/canvas_frame_animation_tests.zig +4 -0
- package/src/runtime/clock.zig +13 -1
- package/src/runtime/core.zig +133 -1
- package/src/runtime/credentials_store.zig +115 -0
- package/src/runtime/effects.zig +2295 -113
- package/src/runtime/effects_credentials_tests.zig +332 -0
- package/src/runtime/effects_host_tests.zig +208 -1
- package/src/runtime/effects_relational_tests.zig +314 -0
- package/src/runtime/effects_store_tests.zig +211 -0
- package/src/runtime/flow.zig +14 -1
- package/src/runtime/gpu_surface_events.zig +6 -1
- package/src/runtime/native_command_event_tests.zig +42 -0
- package/src/runtime/persist_store.zig +666 -0
- package/src/runtime/record_store.zig +788 -0
- package/src/runtime/relational_store.zig +854 -0
- package/src/runtime/root.zig +49 -0
- package/src/runtime/runtime_event_tests.zig +70 -0
- package/src/runtime/service_host.zig +711 -0
- package/src/runtime/service_pool.zig +1314 -0
- package/src/runtime/session_blobs.zig +1 -1
- package/src/runtime/session_journal.zig +102 -0
- package/src/runtime/session_record.zig +177 -0
- package/src/runtime/session_replay.zig +109 -4
- package/src/runtime/shell_layout.zig +1 -0
- package/src/runtime/shell_layout_tests.zig +120 -0
- package/src/runtime/sqlite_engine.zig +474 -0
- package/src/runtime/state.zig +6 -0
- package/src/runtime/system_services.zig +49 -10
- package/src/runtime/tests.zig +4 -0
- package/src/runtime/ts_core_host.zig +788 -86
- package/src/runtime/ts_core_host_tests.zig +231 -11
- package/src/runtime/ts_ui_app.zig +499 -1
- package/src/runtime/ui_app.zig +142 -16
- package/src/runtime/ui_app_tests.zig +155 -5
- package/src/runtime/validation.zig +22 -0
- package/src/runtime/view.zig +9 -0
- package/src/runtime/window_storage.zig +1 -0
- package/src/runtime/window_view_runtime.zig +2 -3
- package/src/runtime/window_views.zig +19 -0
- package/src/tooling/android.zig +21 -16
- package/src/tooling/db.zig +160 -0
- package/src/tooling/ios.zig +7 -1
- package/src/tooling/manifest.zig +214 -2
- package/src/tooling/package.zig +116 -0
- package/src/tooling/raw_manifest.zig +30 -0
- package/src/tooling/root.zig +1 -0
- package/src/tooling/templates.zig +161 -4
- package/src/tooling/ts_core.zig +283 -17
- package/src/tooling/verbs.zig +7 -0
- package/third_party/sqlite/README.md +13 -0
- package/third_party/sqlite/sqlite3.c +269649 -0
- package/third_party/sqlite/sqlite3.h +14349 -0
- package/tools/corewire/core_abi.zig +14 -2
- package/tools/corewire/emit.zig +98 -29
- package/tools/corewire/emit_facade.zig +378 -23
- package/tools/corewire/emit_profile.zig +6 -2
- package/tools/corewire/emit_service.zig +924 -0
- package/tools/corewire/main.zig +122 -0
- package/tools/corewire/service_contract.zig +250 -0
- package/tools/corewire/sidecar.zig +26 -15
|
@@ -1,4 +1,40 @@
|
|
|
1
1
|
export type { TextCaretDirection, TextCaretMove, TextSelection, TextInputEvent } from "./text.js";
|
|
2
|
+
export type StatusItemTone = "normal" | "warning" | "critical";
|
|
3
|
+
export type StatusItemMenuRole = "command" | "info" | "header" | "hero" | "agent" | "context";
|
|
4
|
+
export interface StatusItemModifiers {
|
|
5
|
+
readonly primary: boolean;
|
|
6
|
+
readonly command: boolean;
|
|
7
|
+
readonly control: boolean;
|
|
8
|
+
readonly option: boolean;
|
|
9
|
+
readonly shift: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface StatusItemPresentation {
|
|
12
|
+
readonly title: Uint8Array;
|
|
13
|
+
readonly width: number;
|
|
14
|
+
readonly tone: StatusItemTone;
|
|
15
|
+
readonly iconOpacity: number;
|
|
16
|
+
readonly monospaced: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface StatusItemMenuItem {
|
|
19
|
+
readonly id: number;
|
|
20
|
+
readonly label: Uint8Array;
|
|
21
|
+
readonly command: Uint8Array;
|
|
22
|
+
readonly separator: boolean;
|
|
23
|
+
readonly enabled: boolean;
|
|
24
|
+
readonly detail: Uint8Array;
|
|
25
|
+
readonly role: StatusItemMenuRole;
|
|
26
|
+
readonly key: Uint8Array;
|
|
27
|
+
readonly modifiers: StatusItemModifiers;
|
|
28
|
+
}
|
|
29
|
+
export interface StatusItemState {
|
|
30
|
+
readonly iconPath: Uint8Array;
|
|
31
|
+
readonly tooltip: Uint8Array;
|
|
32
|
+
readonly activationCommand: Uint8Array;
|
|
33
|
+
readonly alternateActivationCommand: Uint8Array;
|
|
34
|
+
readonly openCommand: Uint8Array;
|
|
35
|
+
readonly presentation: StatusItemPresentation;
|
|
36
|
+
readonly items: readonly StatusItemMenuItem[];
|
|
37
|
+
}
|
|
2
38
|
export interface ScrollState {
|
|
3
39
|
readonly offsetX: number;
|
|
4
40
|
readonly offsetY: number;
|
|
@@ -37,9 +37,66 @@
|
|
|
37
37
|
// - `AppearanceEvent`, `ChromeEvent`, `AudioEvent`: the full arm
|
|
38
38
|
// payload shapes, canonical and importable for helper signatures
|
|
39
39
|
// (an arm value is structurally assignable to its event record).
|
|
40
|
+
// - `StatusItemState` and its nested records: the model-derived shell
|
|
41
|
+
// returned by `statusItem(model)`; the generated launcher installs it
|
|
42
|
+
// and refreshes its presentation and menu after committed model changes.
|
|
40
43
|
|
|
41
44
|
export type { TextCaretDirection, TextCaretMove, TextSelection, TextInputEvent } from "./text.ts";
|
|
42
45
|
|
|
46
|
+
/// One row in a menu-bar status item's menu. Non-separator rows need a
|
|
47
|
+
/// unique non-zero `id`, a non-empty `label`, and (when actionable) a
|
|
48
|
+
/// command name accepted by `commandMsg`. Rich readout roles may carry
|
|
49
|
+
/// secondary `detail`; command rows may carry a key equivalent. Spell
|
|
50
|
+
/// every field explicitly because app-core records have one exact shape.
|
|
51
|
+
/// A status item may expose at most 32 rows.
|
|
52
|
+
export type StatusItemTone = "normal" | "warning" | "critical";
|
|
53
|
+
|
|
54
|
+
export type StatusItemMenuRole = "command" | "info" | "header" | "hero" | "agent" | "context";
|
|
55
|
+
|
|
56
|
+
export interface StatusItemModifiers {
|
|
57
|
+
readonly primary: boolean;
|
|
58
|
+
readonly command: boolean;
|
|
59
|
+
readonly control: boolean;
|
|
60
|
+
readonly option: boolean;
|
|
61
|
+
readonly shift: boolean;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface StatusItemPresentation {
|
|
65
|
+
readonly title: Uint8Array;
|
|
66
|
+
readonly width: number;
|
|
67
|
+
readonly tone: StatusItemTone;
|
|
68
|
+
readonly iconOpacity: number;
|
|
69
|
+
readonly monospaced: boolean;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface StatusItemMenuItem {
|
|
73
|
+
readonly id: number;
|
|
74
|
+
readonly label: Uint8Array;
|
|
75
|
+
readonly command: Uint8Array;
|
|
76
|
+
readonly separator: boolean;
|
|
77
|
+
readonly enabled: boolean;
|
|
78
|
+
readonly detail: Uint8Array;
|
|
79
|
+
readonly role: StatusItemMenuRole;
|
|
80
|
+
readonly key: Uint8Array;
|
|
81
|
+
readonly modifiers: StatusItemModifiers;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/// The generated launcher's model-derived menu-bar status item. Export
|
|
85
|
+
/// `statusItem(model: Model): StatusItemState` from `src/core.ts`; its
|
|
86
|
+
/// install-time shell fields plus the first presentation/menu are captured
|
|
87
|
+
/// on the first frame; presentation and rows are re-derived after every
|
|
88
|
+
/// committed model update. Byte slices are borrowed only for that apply,
|
|
89
|
+
/// so returning literals or freshly built arrays is safe.
|
|
90
|
+
export interface StatusItemState {
|
|
91
|
+
readonly iconPath: Uint8Array;
|
|
92
|
+
readonly tooltip: Uint8Array;
|
|
93
|
+
readonly activationCommand: Uint8Array;
|
|
94
|
+
readonly alternateActivationCommand: Uint8Array;
|
|
95
|
+
readonly openCommand: Uint8Array;
|
|
96
|
+
readonly presentation: StatusItemPresentation;
|
|
97
|
+
readonly items: readonly StatusItemMenuItem[];
|
|
98
|
+
}
|
|
99
|
+
|
|
43
100
|
/// The scroll-state mirror markup's `on-scroll` matches structurally: a
|
|
44
101
|
/// record of exactly these eight numeric fields — the TWO-AXIS shape, one
|
|
45
102
|
/// offset/velocity/viewport/content quartet per axis. Offsets and extents
|